From nobody Mon Nov 23 00:16:00 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXmgj2b0Fz71K25
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 00:16: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXmgh32wJz4LdS
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:16:00 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795392960;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=fggmeul5nbmU8iM42N655ZEyyLoiKkcDEwyUBBMw+PQ=;
	b=FASCZV0IAyiSsjTF4pRtR98F19SvwtWD8rPCfVACPKiTqPW4hw3jfyXjb/1K0uTqs1+XIJ
	Jy0enV+0xkchn1NQouLBqa1/tZs2z7H0xjwhYpOjNW5778WCymtQQgSbUI6CuC/x/8SYt/
	eW8Rg53yzPWJbW0cqTQ6LAXwFzh4RbaKKtgltblIUU4wvyOHi/b19MA1HDMSsDJYOm+Kyq
	i3gAdKqsCUlq8pVVCKJvjBm7TxHbQ2NBGXLSZhuwg/fhrOIB6tLXu/6nAjUxU9nj+x/06v
	3uEVV35EsuhWViBry5IRg404xpi57JI9kfjdXzpKDpKbPp8JXEbrQDGy+Q7JxQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795392960;
	b=fQmHo62ymplR9xt0xvhir9iAiskrxJBuL5ZSpuzLbXwLEYIumRbO58MdAxqJ1bOF/5H90Z
	3XK30q8Pmv/jp6DCxocnAA1mY9pit/Z5BNYQGYzroGdR1A+7eQ2NbDRemBXmvAtAfcnxaO
	xfACY91dvZ/VIin6S0OJ4rZH/dsNNOM8k4bYc/LKfCVOplftaZ7T2Haas9VtZG7ZGfhWJg
	BBWBsBx1x8+43Is25SzlSHN2vr3ssv8NTMYg0uGXbMXgBmPeMxUiT5231rBYRyN7b7Wdci
	tRngOzzyM/ZYMyd4OJ+/xgaCWj2wSKUzC0f9WkNhBFoEeCWGaUar5165kpMX7g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795392960;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=fggmeul5nbmU8iM42N655ZEyyLoiKkcDEwyUBBMw+PQ=;
	b=UCifI5oIbnkz6j1ofB35gAGK6tJX8VookElhIGN24Re2Mui4DkJdl6GGf7Wmf8Dm77u7Ft
	0N1ln2EfZz0h3+lHxH6HVJNCM0zjJ2iramyR406Xc+4uMgBH4Zyjs4Paq+PvqJDVF+fX4C
	G1KIHE/NOGbNCqBenql/AUEfU2oUjYgEhgj5RPAGLLHbIbcO4a4vMr3bn6y647XtJB9hCC
	A3UW+w3XJqEwX/2+e7oyzoft1JkhkgWoMSjZN7DcPBpw8UpgnvuVHiyDNH+cibXOlK//ij
	pfDZjU8qKpYB38yAeFHadVENeDpbFPsjIgpbQxYGbrhAfuUiDgn8YE4ltLL9LQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXmgh2jJzzRDZ
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:16:00 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1bf75
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 00:16:00 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Konstantin Belousov <kib@FreeBSD.org>
Subject: git: ef7c9c88e99d - main - kern: add pwd_altroot_clear() helper
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: ef7c9c88e99dbaaad718a2fb302354042c54260e
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 00:16:00 +0000
Message-Id: <6b0385c0.1bf75.a627154@gitrepo.freebsd.org>

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=ef7c9c88e99dbaaad718a2fb302354042c54260e

commit ef7c9c88e99dbaaad718a2fb302354042c54260e
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-11-22 15:29:46 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-23 00:10:23 +0000

    kern: add pwd_altroot_clear() helper
    
    Suggested and reviewed by:      markj
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D61858
---
 sys/compat/linux/linux_util.c | 6 +++---
 sys/kern/kern_descrip.c       | 9 +++++++++
 sys/kern/kern_exec.c          | 2 +-
 sys/kern/sys_capability.c     | 4 +---
 sys/kern/vfs_syscalls.c       | 3 ++-
 sys/sys/filedesc.h            | 1 +
 6 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/sys/compat/linux/linux_util.c b/sys/compat/linux/linux_util.c
index f4701fac87fa..d9f652e55cb2 100644
--- a/sys/compat/linux/linux_util.c
+++ b/sys/compat/linux/linux_util.c
@@ -87,13 +87,13 @@ linux_pwd_onexec(struct thread *td)
 	NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, linux_emul_path);
 	error = namei(&nd);
 	if (error != 0) {
-		pwd_altroot(td, NULL);
+		pwd_altroot_clear(td);
 		return (0);
 	}
 	NDFREE_PNBUF(&nd);
 	error = pwd_altroot(td, nd.ni_vp);
 	if (error != 0)
-		pwd_altroot(td, NULL);
+		pwd_altroot_clear(td);
 	vrele(nd.ni_vp);
 	return (0);
 }
@@ -102,7 +102,7 @@ void
 linux_pwd_onexec_native(struct thread *td)
 {
 
-	pwd_altroot(td, NULL);
+	pwd_altroot_clear(td);
 }
 
 void
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 9066340543d9..ae32f9cffc97 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -4446,6 +4446,15 @@ pwd_altroot(struct thread *td, struct vnode *altroot_vp)
 	return (0);
 }
 
+void
+pwd_altroot_clear(struct thread *td)
+{
+	int error __diagused;
+
+	error = pwd_altroot(td, NULL);
+	KASSERT(error == 0, ("%s: pwd_altroot failed: %d", __func__, error));
+}
+
 /*
  * jail_attach(2) changes both root and working directories.
  */
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 390f4cdaf3ed..df6f04dfecbe 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -1277,7 +1277,7 @@ exec_new_vmspace(struct image_params *imgp, struct sysentvec *sv)
 	if (imgp->credential_setid &&
 	    (p->p_flag2 & P2_NO_NEW_PRIVS) == 0 &&
 	    (sv->sv_flags & SV_ABI_MASK) == SV_ABI_FREEBSD)
-		pwd_altroot(td, NULL);
+		pwd_altroot_clear(td);
 
 	if (p->p_sysent->sv_onexec_old != NULL)
 		p->p_sysent->sv_onexec_old(td);
diff --git a/sys/kern/sys_capability.c b/sys/kern/sys_capability.c
index 3bcfffd1c8fd..43cc89183606 100644
--- a/sys/kern/sys_capability.c
+++ b/sys/kern/sys_capability.c
@@ -122,10 +122,8 @@ sys_cap_enter(struct thread *td, struct cap_enter_args *uap)
 		goto out;
 	}
 	PROC_UNLOCK(p);
-	error = pwd_altroot(td, NULL);
+	pwd_altroot_clear(td);
 	PROC_LOCK(p);
-	if (error != 0)
-		goto out;
 	oldcred = crcopysafe(p, newcred);
 	newcred->cr_flags |= CRED_FLAG_CAPMODE;
 	proc_set_cred(p, newcred);
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 484802b3e29d..1dd29a081a60 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -5435,7 +5435,8 @@ disable_altdir(struct thread *td)
 	if (error != 0)
 		return (error);
 #endif
-	return (pwd_altroot(td, NULL));
+	pwd_altroot_clear(td);
+	return (0);
 }
 
 static int
diff --git a/sys/sys/filedesc.h b/sys/sys/filedesc.h
index 077ffa8a9daa..3dfac6f0ab14 100644
--- a/sys/sys/filedesc.h
+++ b/sys/sys/filedesc.h
@@ -373,6 +373,7 @@ struct pwddesc *pdshare(struct pwddesc *pdp);
 void	pdunshare(struct thread *td);
 
 int	pwd_altroot(struct thread *td, struct vnode *altroot_vp);
+void	pwd_altroot_clear(struct thread *td);
 void	pwd_chdir(struct thread *td, struct vnode *vp);
 int	pwd_chroot(struct thread *td, struct vnode *vp);
 int	pwd_chroot_chdir(struct thread *td, struct vnode *vp);

From nobody Mon Nov 23 00:16:01 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXmgj6lxKz71Jwq
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 00:16: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXmgj3MVQz4LCy
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:16:01 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795392961;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=xhJI1XdQbXxzGjMNF3XLkbqvCsqTXAaWEOmUH2K5Quw=;
	b=IDgzhZpI3BFMyS0SgZQ093qFzsxQsBaeGjD2UpasUEIu4xJg/kzPVVj/6S611U8LzVT3I/
	yzRlJBOYEKLbeC3UTDEDe7PWEPuN601yhsomWlvw/qKVP9oAfvWt85LQ3231htGHtqtW5q
	uRv1ynv4/7+6cUDwAMBaVWzb23y0O1TMFv97oQ29pHpVsB5X7XRq8hHjhu652Woqn6Vl1L
	JElKYsJfvpbeXSyvIdKE2aQABa52T79vvNkH+YfvW956GJqOhRx8NOgz7sk8BMDarDxAat
	RVo0FEXrlI19mio/UYZ754rs5mgwR5Cvc/EkXwBJVBj0G+3MnbCOjYXC+LQ+Dg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795392961;
	b=Lxhn6EBxd5RqZ4/ib0TXdhUIqr+aV9CdjnXr325HyMjcRlKkEijT91JDn5UtQTyhstoBPM
	L924xtjuBGkzFBteDaBWGlr+ifua1vlehaGVDKTcjer4oShgWhSgFQ7CiT2OuVwVt8StNR
	175/Gnb4lF3IZkMrcUKukbHdu47mmcAnDBslYWnE54QdWZTEonfWxTuVMGpGF5vPf6kS+4
	RRMli+hAtUN7/EDRdCjuu4OEVcHq5NY6rkrL2lIRPKQu9eEQaIbxkTSqQSEf5E7cHJxmav
	WLf2zsKZ8SWWKsMy5CIsfIKbdtDAc3LpNnK4B+034y9oX6AOZyeswvfbqdvsLA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795392961;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=xhJI1XdQbXxzGjMNF3XLkbqvCsqTXAaWEOmUH2K5Quw=;
	b=j0gP507hmDU+MVZz0/uPqarSMZOsW/FQoFM31bTwt8wqUyBzlTn/7ZR4EldChWJjqM+S1I
	BeXIY8YxvcjWYkcwv+nz9xzYe/XrsvQMqyLWwf2eX01ifG8qV2vI+bGO66aWMZO6pHR0dz
	8kSCH/1NSwStXN4oSNIUuy2hhAofnTTCzO43lKPXULSiBjSv5K2OLVSnm6aCUCn3xycB6K
	Kx/pTr8715e3H2c26mFWxzjxhROnzy5I+Y5d2SFUT7HTVbov4YOvI1VnrOq92T0q9+z4W/
	Z9i2KM24+IsvGhenqLRJ3YcOTDaWVtqji/GOwJjNFZ3GW/PgEN7SujFI8bLPOg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXmgj322mzQxS
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:16:01 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1bfd6
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 00:16:01 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Konstantin Belousov <kib@FreeBSD.org>
Subject: git: 7396c23e5deb - main - linux: harden the linux_pwd_onexec() altroot entry
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: 7396c23e5deb0713f02c7138834f5a5a963f9f08
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 00:16:01 +0000
Message-Id: <6b0385c1.1bfd6.6902c717@gitrepo.freebsd.org>

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=7396c23e5deb0713f02c7138834f5a5a963f9f08

commit 7396c23e5deb0713f02c7138834f5a5a963f9f08
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-11-21 03:07:58 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-23 00:10:23 +0000

    linux: harden the linux_pwd_onexec() altroot entry
    
    Do not take the native altroot into account when looking up
    linux_emul_path.
    
    Reported by:    llm-postcr
    Reviewed by:    markj
    Fixes:  9757c0cf98e4 ("chaltroot(2) and fchaltroot(2): new syscalls")
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D61858
---
 sys/compat/linux/linux_util.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/sys/compat/linux/linux_util.c b/sys/compat/linux/linux_util.c
index d9f652e55cb2..5e211f3a1180 100644
--- a/sys/compat/linux/linux_util.c
+++ b/sys/compat/linux/linux_util.c
@@ -84,16 +84,18 @@ linux_pwd_onexec(struct thread *td)
 	struct nameidata nd;
 	int error;
 
+	/*
+	 * We never want the native altroot, in particular, for the
+	 * linux_emul_path lookup.
+	 */
+	pwd_altroot_clear(td);
+
 	NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, linux_emul_path);
 	error = namei(&nd);
-	if (error != 0) {
-		pwd_altroot_clear(td);
+	if (error != 0)
 		return (0);
-	}
 	NDFREE_PNBUF(&nd);
-	error = pwd_altroot(td, nd.ni_vp);
-	if (error != 0)
-		pwd_altroot_clear(td);
+	(void)pwd_altroot(td, nd.ni_vp);
 	vrele(nd.ni_vp);
 	return (0);
 }

From nobody Mon Nov 23 00:16:02 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXmgk6w1zz71K8r
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 00:16:02 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXmgk3fy1z4Lgn
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:16:02 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795392962;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=9GIthTn+WleYQkhC1YLlI44Xubz0RnwyU/bTddBEVk4=;
	b=r1Ufmng5zdd000GD0XvkLumsGYulvlW7niRhaGQ2DcBFVMRDNh02duNJLV9IHWGN/tS+PH
	F9kWMOqxBEDHY4D0zGop/JyQ1WUpAX1VpDdsuIPyTHGZOZfWGa0Kw5lyQxxLj1kNa4zbwz
	w28JXvoKZY4gBsgo8tquUBs8rqa7dlAe7l8GNRE/eB8Q8sxx+bMS9N12euwBg9u2caw+Ae
	wzNWOqz8nhePe3AvfC2PckKcL3dLl58MZ6MMqZMT2/6+CAOk6+IUvv9VlgxYXtB1K6RB2P
	Fr13pJCDGb9U1+0tCjIdPYHZOr4R9Io0gA40iOYz+IfPNS6bJmX6szjTbg8H/w==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795392962;
	b=wz3y+hkoaCyQw6ttZT4CO7aSI9snn89rvk3WISkUj6IpsqkAIXSO2HF3Q7YeMqtSERqbZl
	+i67OukpC5XmbGNSBJDk446grxhdVpoObnlqRZORy6j69/ZHyYROt5JjJLej29BfSIV2kj
	TEDa8LNDciEXeDJXimyowOC/k8gwEbuqFRWpyMk+6IwVh+u1O7CSH3nwBoCOoAEqWtWFr2
	b6xbes4xESWwyGWiPiAGANLy64qt3w+oRuiLtJR81HNUfQu6rBbpxr58r1xjryMfTZyeOs
	z8dtPz+zgiLKtih0H+yWVmU4go242yzEWK5B5jQOmU566PZQluEz0Rzt66tUJg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795392962;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=9GIthTn+WleYQkhC1YLlI44Xubz0RnwyU/bTddBEVk4=;
	b=c/ey03Ylpr+2qH6YGeacuZ4wmqaiyIZc39aLUxLFyQNyrhpvQx6uZgmz3a/L87cr2K3HQL
	Mb/mSkvbmosUtULdhXnHnoiYBLK5ku283jhpAeUm2CIS4FD+kfDkgdp6AofCQpgFZljLgA
	lNy5ijPIB0KOWdG6Bnaej9r8ia/qoFEptrKimKYJxytLZGEboCqrRg7Ehf5hp5LQdIdkoJ
	8Ulfa2t/AOPm9ZnKwdIrJ8+CCGJaub/pNMdVBtMC9+2oNGMM/EZufKV45VpZ92yGwLP2xA
	zfnlPcL7q97fohp4NiUyAua3YV/+zNLwXvT5b18gfoGJMGZH5tBpm9/rDacmLw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXmgk3KZtzR9V
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:16:02 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1be5a
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 00:16:02 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Konstantin Belousov <kib@FreeBSD.org>
Subject: git: 77552467648a - main - execve(): unshare pwd
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: 77552467648aa06b8c9ac95fb45099630c2a769b
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 00:16:02 +0000
Message-Id: <6b0385c2.1be5a.46ead8d6@gitrepo.freebsd.org>

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=77552467648aa06b8c9ac95fb45099630c2a769b

commit 77552467648aa06b8c9ac95fb45099630c2a769b
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-11-21 04:02:31 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-23 00:10:23 +0000

    execve(): unshare pwd
    
    Ensure that pwd is not shared when execing into any ABI, so rforked
    siblings are not affected.  The altroot changes made during exec, by
    linux_on_exec() and by the setuid altroot clear, affected rforked
    siblings sharing the pwd.
    
    Remove now always no-op pdunshare() call next to fdunshare().
    
    Reviewed by:    markj
    Fixes:  fd745e1db6b5 ("linux(4): Use pwd_altroot() to tell namei() about ABI root path")
    Fixes:  2137bad49a6f ("exec_new_vmspace(): drop altroot for native processes if setuid")
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D61858
---
 sys/kern/kern_exec.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index df6f04dfecbe..d081ce5dd879 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -858,11 +858,11 @@ interpret:
 	}
 
 	/*
-	 * For security and other reasons, the file descriptor table cannot be
-	 * shared after an exec.
+	 * For security and other reasons, the file descriptor table
+	 * cannot be shared after an exec.  pwd should not be shared
+	 * either, this was handled earlier in exec_new_vmspace().
 	 */
 	fdunshare(td);
-	pdunshare(td);
 	/* close files on exec */
 	fdcloseexec(td);
 
@@ -1265,6 +1265,13 @@ exec_new_vmspace(struct image_params *imgp, struct sysentvec *sv)
 	imgp->vmspace_destroyed = true;
 	imgp->sysent = sv;
 
+	/*
+	 * Prevent an rforked process, possibly sharing pwd with
+	 * us, from being affected by altroot.  Exec is already past
+	 * the point of no return.
+	 */
+	pdunshare(td);
+
 	/*
 	 * Drop altroot if setuid.  It is done so late to avoid
 	 * clearing altroot until there is no way for execve(2) to

From nobody Mon Nov 23 00:16:03 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXmgm4353z71K2L
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 00:16:04 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXmgl43rYz4LbF
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:16:03 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795392963;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=f6W+d+Utgm38/Nb8IYGjZNePWOaNTzeWlurdRPpuiGo=;
	b=Eek6M510WOwaUK2DypDwi7BGVjugzGPfeV5RqApfHR243+YyJdnEjQT3Tl9QhiY1UoHxne
	1v6a3Zf6iVfR8eIrKgEHvU1Hjf2DVuYb8Bxcb23jR9ujLQJ4OJP358rprYjoYLr87w8Zs8
	Z9uWHQFpXSArEpj/cYJe4jRyb0sw+lZ+mEjs0ysXU5kRAXBXStgxCj41BKlOLALci3IRk4
	i7w/6hyZXZssQbzRVQ/S1TqmayF4xmO+DK2kEi7H4Te+NZLLgzyMkssqzQNBtLXlxoTizw
	ua1E0qrVptHCd8SKVyjlH087zCdT8oa0bR6OToTf1ShrMEljvxWEbCJ42iqvDQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795392963;
	b=bvKaoXcRJf/kFrWSe0fxbUHpEcISSbpzEUtJ9C3oc5owDT2GC/Pcf6qENwujrfcdj6knp/
	pfDx8SQhU+7cscovmzCvEyWhKWtQdSBvoSBzIZRPccEFrHfO5NbdjYuPJ/e+qwKSiNfTPq
	VtmfsS64Y7q5h9b9JEjpa0DiINRsaX+pMvgcJEteOIQJWo4RQrBWZEA0v2TeytzJ1EA7Qd
	/9kwxpEa3ZAV9KOPMEP4FPFHF9UoexwlWH0ddVP0bip1hxrjmoMCs5S1CJW3T2Xql4ry3B
	yJCyit1yI0EyzC9VUqvqPl3nVl+jLPMMqugONm7od3oebT1hyIDLrNaiglGm/w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795392963;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=f6W+d+Utgm38/Nb8IYGjZNePWOaNTzeWlurdRPpuiGo=;
	b=FLyllx6Ibk7s153mlv21Swag8D3BOkZurFBjd4zjZ+MZvYcr72+nKwu7etgjhV2EkPhf6N
	lKekOun18C86oG5olx7ExyfRl/8jvNjK4KVN+y2OJIDLJbbPuJ85rVC8yWc2+czaLIjRmp
	sF4HDBJpAAktejWdsBch8F/ATX0Ampw7tac9kP/dmQxfw2iEe35uWDSDIuCnEoePzo/e9b
	w3esr/NDSO+rbn9Tcg3BruWCsPTx/PsP8jNsVaic+UEb9YkwCuj/Ej5WLtkE4PyQUf45gl
	YHCVJWfWFfJlFOdZIZT6+gBOgHwThK49POFjTSDdfxwpAbKEglZDN+n+M0DHRA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXmgl3jnrzR95
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:16:03 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1bbc1
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 00:16:03 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Konstantin Belousov <kib@FreeBSD.org>
Subject: git: 16e5fecccd0e - main - kern/kern_descrip.c: avoid leaking pwd hold when vnode export fails
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: 16e5fecccd0e79fe9439ab526745f23b31051c34
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 00:16:03 +0000
Message-Id: <6b0385c3.1bbc1.3ed2f423@gitrepo.freebsd.org>

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=16e5fecccd0e79fe9439ab526745f23b31051c34

commit 16e5fecccd0e79fe9439ab526745f23b31051c34
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-11-21 03:19:50 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-23 00:10:23 +0000

    kern/kern_descrip.c: avoid leaking pwd hold when vnode export fails
    
    kern_proc_filedesc_out() gotos around the pwd_drop() call on errors from
    export_vnode_to_sb(), leaking the hold.
    
    Reported by:    llm-postcr
    Reviewed by:    markj
    Fixes:  36bd49ac4db8 ("fd: Avoid truncating output buffers for KERN_PROC_{CWD,FILEDESC}")
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D61859
---
 sys/kern/kern_descrip.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index ae32f9cffc97..8968ffa7dea9 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -5095,10 +5095,10 @@ kern_proc_filedesc_out(struct proc *p,  struct sbuf *sb, ssize_t maxlen,
 		}
 	}
 	PWDDESC_XUNLOCK(pdp);
-	if (error != 0)
-		goto fail;
 	if (pwd != NULL)
 		pwd_drop(pwd);
+	if (error != 0)
+		goto fail;
 	FILEDESC_SLOCK(fdp);
 	if (refcount_load(&fdp->fd_refcnt) == 0)
 		goto skip;

From nobody Mon Nov 23 00:16:04 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXmgn352gz71Jx5
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 00:16: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXmgm5K8kz4LGT
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:16:04 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795392964;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=3ErDkjL4q19mY+Finq7YuHxZbrcq4qVm19ZkXvClKzo=;
	b=pDUIAL8C99W89sJKlkTb8OeelZQzKnSHihqnfuLuSCZN95A3RCXQGZgACvk23w3eVizIlY
	42cMv3HAxquP+wTr6Q+QXhYyH6Vyaquahp7mlWX5vp7MrYBSWgP1kirPms3Rp6TmYl8ARz
	qUkqN7zoeyaRwW+/9ZCz6ljttJq+wWl2jF9ZbbJ+aNkadPeuSmZWq+ytaz/thNpZsHbECC
	xZQosuXpnNMHyB/pu4YbwHlkLrFPwo50Iw9P99feKskwpx/aHub7MRJlQykoVAXM66i0nE
	9WiQlqHFzLnpak26yx65zvtSygskKcM1Lli9ugHcBSXbfc72w+JrN36qqLd0GQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795392964;
	b=ZXyfpLPs37Ao5ALGwgEQVjNUcC3b8IPl+evRnk3Jbpauu0VWo3BL8wd6IqTi01nGFNcSYQ
	hYmur7rtIHpM7RT1HFfQz4EQU+Ymwy47ndYcycnBGCZN8eIHGQH0aTawhzlO9v70Z5mMWm
	EQc1zMTF5NIQFpFG2vY939fvnkgCO/rB7yRkga4T87lz5eU0eKPha93C/QSq4ryipVCsOv
	ec72vcNgvYK2arJJxzYyiu2dtmgiiUN7bF3Es6YZRCqbk7i10rl9llEJkW75hJBc+IT/uH
	d0scgGws6eTqmj25BjlhXsCfOpg3aYyjA9gE5OWdAAGnZBwYbLr2QfaPd1V5nw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795392964;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=3ErDkjL4q19mY+Finq7YuHxZbrcq4qVm19ZkXvClKzo=;
	b=w7ClsYPIw3Zp5zOIPdoiUtzE7g/tWYBBuHmZCWMnLsLFZh86CgRnujxiMLF6nXeOMgidmz
	tsfgNVMYCveOwSQckk3RBz/1btWKhtsPmpX8n7YUk4El90zrE2oClVJVmlTzHa+OgDyJiI
	UQKL9o6AV1qg4Lqrg1OO8y6WkM2kyeEwpS3j/4m/ungoA2nQbTzUgvvNKBiT7UkOROk5oH
	5QsV72B8vSii3bBGac+8eGalTf6iKsqwr1C9vjNgSADDQBZOHxorUNfE+lknjXb7DwcU22
	ev0A35Zi5O0ARw/65427d7l7OrOdqiMg3kRgKPp/hTTIugGH8pQUp8ISxexB7A==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXmgm4g46zQl1
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:16:04 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1cb17
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 00:16:04 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Konstantin Belousov <kib@FreeBSD.org>
Subject: git: 8b25c9ed40da - main - kern/kern_descrip.c: avoid leaking vnode use count hold when vnode export fails
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: 8b25c9ed40daf5c1d75c8f08f815a3b267fb1364
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 00:16:04 +0000
Message-Id: <6b0385c4.1cb17.6b59a843@gitrepo.freebsd.org>

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=8b25c9ed40daf5c1d75c8f08f815a3b267fb1364

commit 8b25c9ed40daf5c1d75c8f08f815a3b267fb1364
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-11-21 03:59:55 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-23 00:10:23 +0000

    kern/kern_descrip.c: avoid leaking vnode use count hold when vnode export fails
    
    export_vnode_to_sb() returns on remainder == 0 without calling
    export_vnode_to_kinfo(), which vrele()s it.
    
    Reviewed by:    markj
    Fixes:  fe52cf547580 ("Re-factor the code to provide kern_proc_filedesc_out(), kern_proc_out(), and kern_proc_vmmap_out() functions ...")
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D61859
---
 sys/kern/kern_descrip.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 8968ffa7dea9..ebd91146ef06 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -4996,8 +4996,10 @@ export_vnode_to_sb(struct vnode *vp, int fd, int fflags,
 {
 	int error;
 
-	if (efbuf->remainder == 0)
+	if (efbuf->remainder == 0) {
+		vrele(vp);
 		return (ENOMEM);
+	}
 	if (efbuf->pdp != NULL)
 		PWDDESC_XUNLOCK(efbuf->pdp);
 	export_vnode_to_kinfo(vp, fd, fflags, &efbuf->kif, efbuf->flags);

From nobody Mon Nov 23 00:16:05 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXmgp4Hjhz71Jyp
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 00:16: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXmgn5GxPz4LXh
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:16:05 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795392965;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=e1OfhNknVHCsxL2EeEkx5z1WZD6skvGCzl/d95slRe8=;
	b=MvhfhaxbrhmjlQZhjzlzfZEMwighpDBL9KlnE0FE0Nr1JujQq3YyPK9iq2QnTI8AQ7gfJo
	snrUYZW1HW1pgO1JBk8b2DjIkjzjLMwTx8jurYwj2ZPtLuXwsOPAecJQS0o+Rvmqp5XhpI
	db2tP6t1lfaJ+Cu28dAuwuEXse6+I1rxRSUGUpFpgCdGzOdxDEfsme7IFzdAVkgkMU/2ub
	cJW+4RePz8vocB7YkhkpmXb2pIk2zTrzHiMXX5EXoKjxVLjN/tNjw/IUroD2RJ5n2ldZ1G
	fAS87otif22DOz/qWq3VACqnOPInPHBoLlV1wP9Ny9+BuhRLWfVcLMxsRXcIug==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795392965;
	b=nG4tNYr4pqLz+PfogvYdDCdTL7PE1lV2DqZBkHQmq5N1wwUKZVtgucdzbylMloyo39p/fR
	aHOwYWArBccQ6f6HWWVK7Bkn1SB+xczK90wHXRFXQQ4FIAjOu7KMrTEEzjN/OsGMKHx8nB
	MwIpnE6DbbSdP/93Jhzl2SptYjF0b+6LRI6jWES7tvLE8dEjezTd4MMa0zrb4Oug49z9Zh
	pIzg5J8BzzPFhpuyiJwryGm9SQRBXN8pBxGtotf7nX8Qicy45np8IHtqbX54dR1/zCRKCu
	ET8GGm9S6ugOSeBrAIcVuvQFHkoeyCSkGtL2B7vEpgvvw8XHINmzcxeeLVl6KA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795392965;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=e1OfhNknVHCsxL2EeEkx5z1WZD6skvGCzl/d95slRe8=;
	b=Ipx5rk03/3pjj8pruVahgMlUiRVWmF9UyOGFjWq78dWBgXf+zEsHXjbgXkKmUTmUWVmJOb
	+oOciQo1bViQ/S4fMRMGEA/jwY1766rlR0ZNAziPvLBL5LR8dx3BQmSKhqOjQpYn7Qht0m
	qf4QY+pEpQcWF6uoovnWJgbbq6l4iIii1Q+T0yPHhjlSZDV6uCFCNE/h/cpUi3iBedwSlF
	fa5ScgfcXOn1KcZHnl4ISRgMalt+rhEjFD4/MSRb/4Mz0OozbKbdHsvVNaejFRpr3mWpOI
	InPeY5FC89hOtTtNS5xDA3IMgzA1cv1Hib6DJF8ezvUDi8vLaQvHKkZK0Rx6OA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXmgn4pX4zRG7
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:16:05 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1cfc7
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 00:16:05 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Konstantin Belousov <kib@FreeBSD.org>
Subject: git: ddc7069ba5ad - main - kern/kern_descrip.c: do not leak ctty/textvp/tracevp use counts
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: ddc7069ba5adf6e8f1536b3206030c12fa8eadd1
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 00:16:05 +0000
Message-Id: <6b0385c5.1cfc7.58284031@gitrepo.freebsd.org>

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=ddc7069ba5adf6e8f1536b3206030c12fa8eadd1

commit ddc7069ba5adf6e8f1536b3206030c12fa8eadd1
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-11-21 04:29:44 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-23 00:10:24 +0000

    kern/kern_descrip.c: do not leak ctty/textvp/tracevp use counts
    
    If the export of one of the special process vnodes failed, the
    references on the remaining ones leaked, since export_vnode_to_sb() was
    not called for them.
    
    Each reference is now taken just before its export, with the process
    held in between.
    
    Read the session's ctty vnode and take its reference under the session lock.
    
    Reviewed by:    markj
    Fixes:  36bd49ac4db8 ("fd: Avoid truncating output buffers for KERN_PROC_{CWD,FILEDESC}")
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D61859
---
 sys/kern/kern_descrip.c | 45 +++++++++++++++++++++++++++++----------------
 1 file changed, 29 insertions(+), 16 deletions(-)

diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index ebd91146ef06..c36fc16ef19b 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -5024,24 +5024,13 @@ kern_proc_filedesc_out(struct proc *p,  struct sbuf *sb, ssize_t maxlen,
 	struct export_fd_buf *efbuf;
 	struct vnode *cttyvp, *textvp, *tracevp;
 	struct pwd *pwd;
+	struct session *sess;
 	int error, i;
 	cap_rights_t rights;
 
 	PROC_LOCK_ASSERT(p, MA_OWNED);
+	_PHOLD(p);
 
-	/* ktrace vnode */
-	tracevp = ktr_get_tracevp(p, true);
-	/* text vnode */
-	textvp = p->p_textvp;
-	if (textvp != NULL)
-		vrefact(textvp);
-	/* Controlling tty. */
-	cttyvp = NULL;
-	if (p->p_pgrp != NULL && p->p_pgrp->pg_session != NULL) {
-		cttyvp = p->p_pgrp->pg_session->s_ttyvp;
-		if (cttyvp != NULL)
-			vrefact(cttyvp);
-	}
 	fdp = fdhold(p);
 	pdp = pdhold(p);
 	PROC_UNLOCK(p);
@@ -5054,15 +5043,39 @@ kern_proc_filedesc_out(struct proc *p,  struct sbuf *sb, ssize_t maxlen,
 	efbuf->flags = flags;
 
 	error = 0;
-	if (tracevp != NULL)
+	PROC_LOCK(p);
+	tracevp = ktr_get_tracevp(p, true);
+	if (tracevp != NULL) {
+		PROC_UNLOCK(p);
 		error = export_vnode_to_sb(tracevp, KF_FD_TYPE_TRACE,
 		    FREAD | FWRITE, efbuf);
-	if (error == 0 && textvp != NULL)
+		PROC_LOCK(p);
+	}
+	if (error == 0 && (textvp = p->p_textvp) != NULL) {
+		vrefact(textvp);
+		PROC_UNLOCK(p);
 		error = export_vnode_to_sb(textvp, KF_FD_TYPE_TEXT, FREAD,
 		    efbuf);
-	if (error == 0 && cttyvp != NULL)
+		PROC_LOCK(p);
+	}
+	while (error == 0) {
+		if (p->p_pgrp == NULL || (sess = p->p_session) == NULL)
+			break;
+		SESS_LOCK(sess);
+		if ((cttyvp = sess->s_ttyvp) == NULL) {
+			SESS_UNLOCK(sess);
+			break;
+		}
+		vrefact(cttyvp);
+		SESS_UNLOCK(sess);
+		PROC_UNLOCK(p);
 		error = export_vnode_to_sb(cttyvp, KF_FD_TYPE_CTTY,
 		    FREAD | FWRITE, efbuf);
+		PROC_LOCK(p);
+		break;
+	}
+	_PRELE(p);
+	PROC_UNLOCK(p);
 	if (error != 0 || pdp == NULL || fdp == NULL)
 		goto fail;
 	efbuf->fdp = fdp;

From nobody Mon Nov 23 00:16:06 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXmgq22M6z71Jys
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 00:16: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXmgp6N8wz4LkJ
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:16:06 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795392966;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=9YMQA2WjR8YOoPznDGVmed/1TOyeuDpvWc47n401aWs=;
	b=VKi19KJwJ1ayizLgG5aeIJQvDThncd6Fk8FA5ForfOzcncFOLtwZ36aZgsakLnaVkzwkZj
	6/BidYsVyG46EI5DWfXP59Arl+e7zenbTKMh17yqRy0TtAOcY4YPCeiOI9LBr3mpO/VEaW
	LUUdjHoO2fbmu/bib/4qNu9X4q0r8Ql9PHBHAP8Wiqm7Ko6l42CZp/dtAjI9tiucSUHwtd
	ClmuBuQ+J0dyA/Jg7PLqB6sWE+GopZZWyYSxxYTIbjQ0xFyiu356+R2WNWwKwvh/RIP3pJ
	acZe1/AJLVzEqy6SZ/yagrU6cP8FUvpx54JXmg+3jVajetMxKhaPfQ2JHARPag==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795392966;
	b=EUpsqTgI0GrKyJn1XgA30a0OsRtN25jDwjFejkYxh1t0iWqyktjhJBD1uKvseSiwseQr/4
	lpNnDL5lRrSJAOMPLFwulTGx6ANTRjqcEekBGbo/yl0JciSSObb4as3hMk4gOePAlTW3Lm
	NFqQPNCOj/dlbfxbkjS+8fekJTvk+MC9xHAl2qdfbzKRLSRmc3e6Zjd8Uk2wKBeACBVtFH
	VrOBbxwuq6qm5tnywS4tyRFb4rLpJEpAw62GfPSI6MWpTpGbEma6Fi/tPtigaqwjgv54pJ
	4xYit2b+BpdUTQ3MjlUb3B1AOvyeGPA9SNXsQUTRafXdTT5J6rDFRin51oWMCA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795392966;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=9YMQA2WjR8YOoPznDGVmed/1TOyeuDpvWc47n401aWs=;
	b=nhwIGhb86/Xwy38YC2hNcQyLWYSm+at63IPvHemV9VX/sByOv2oyh9yn/5kPhNVjt7QwLA
	gzH3RqjRBFp4Q+4R5HGHJ5mnl3FvDG1A5FCrvVZfhpzbDLd+K+SdvPy9N/WruVmowMEWAi
	ZXgcLXQnFArEmJVjAkZeChMTfvR52XXM9EwZX+X2KDn0aOh8nb0JtOeInlo39SS2HNzJTV
	wXi9ii5+gJTfahIZaniyDOs5WZf3h0RIsz0yAkEPNtjgkZdAjGVMyJ0CRh4usT3zs/2RYG
	ll9TiUNpX6bU67wKmNUZVH77M0acxkWykcQevbUX2U59kr1afUCoi8REEFf/Iw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXmgp52dHzRG9
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:16:06 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1bbc5
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 00:16:06 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Konstantin Belousov <kib@FreeBSD.org>
Subject: git: a559977dfb37 - main - fchaltroot(2): fix auditing
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: a559977dfb37e01fb95a1386c7734eed72beec75
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 00:16:06 +0000
Message-Id: <6b0385c6.1bbc5.30212acb@gitrepo.freebsd.org>

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=a559977dfb37e01fb95a1386c7734eed72beec75

commit a559977dfb37e01fb95a1386c7734eed72beec75
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-11-21 08:20:07 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-23 00:10:24 +0000

    fchaltroot(2): fix auditing
    
    Audit fd and vnode.
    Move the AUE_FCHALTROOT into the FD_VNODE1_TOKENS group.
    
    Reported by:    llm-postcr
    Reviewed by:    markj
    Fixes:  9757c0cf98e4 ("chaltroot(2) and fchaltroot(2): new syscalls")
    Fixes:  3dac77482537 ("sys: add AUE_CHALTROOT and AUE_FCHALTROOT")
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D61862
---
 sys/kern/vfs_syscalls.c        | 3 +++
 sys/security/audit/audit_bsm.c | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 1dd29a081a60..23de410cc74d 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -5490,6 +5490,8 @@ sys_fchaltroot(struct thread *td, struct fchaltroot_args *uap)
 	int error;
 	uint8_t fdflags;
 
+	AUDIT_ARG_FD(uap->fd);
+
 	error = chroot_check_priv(td);
 	if (error != 0)
 		return (error);
@@ -5508,5 +5510,6 @@ sys_fchaltroot(struct thread *td, struct fchaltroot_args *uap)
 	vrefact(vp);
 	fdrop(fp, td);
 	vn_lock(vp, LK_SHARED | LK_RETRY);
+	AUDIT_ARG_VNODE1(vp);
 	return (change_altdir(td, vp));
 }
diff --git a/sys/security/audit/audit_bsm.c b/sys/security/audit/audit_bsm.c
index b6eb906122bb..ba4f960b988c 100644
--- a/sys/security/audit/audit_bsm.c
+++ b/sys/security/audit/audit_bsm.c
@@ -829,7 +829,6 @@ kaudit_to_bsm(struct kaudit_record *kar, struct au_record **pau)
 	case AUE_CHALTROOT:
 	case AUE_CHDIR:
 	case AUE_CHROOT:
-	case AUE_FCHALTROOT:
 	case AUE_FSTATAT:
 	case AUE_FUTIMESAT:
 	case AUE_GETATTRLIST:
@@ -1045,6 +1044,7 @@ kaudit_to_bsm(struct kaudit_record *kar, struct au_record **pau)
 	/*
 	 * XXXRW: Some of these need to handle non-vnode cases as well.
 	 */
+	case AUE_FCHALTROOT:
 	case AUE_FCHDIR:
 	case AUE_FPATHCONF:
 	case AUE_FSTAT:

From nobody Mon Nov 23 00:36:07 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXn6v4Grrz71N4C
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 00:36: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXn6v2GY8z4Qbw
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:36:07 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795394167;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=6KdhxepJPV0BjUtf5nomFmME18iHgLUua4KhAgpebZ0=;
	b=k5tFX/en+7XbX+03rl717sNWKh2wUJ2U20xzYvvq6kRvvmsON1zGYN1Bsi8p5DCODf1tNF
	TYdZ7WN7DBYOGc9dtOkwAmDu2jewg9BYDbN/P//uWxjTfQsZoQ6ju98fieDFguGCQimF77
	k99LJGJ2Os7VIrMvqH38wGHNfN9sdWwiFj5v38y1+q8BBC8jnDIN1atm4zoIkvRB7+tNv/
	guqGPU2NM0thVeA9KWl2dolEsP2FnyYzzsLXal5FzS4A4GKAsZEFOsNukuzEExl9E3ipuJ
	vFBOZNB3a+UZlOgBY/efiNHgjp5CbHsMcVIgDzcX5KAcGFRM849OjwadBLF67w==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795394167;
	b=iBVSahS6Lf4KXLD0TZ/2nTEFDp/LjEXNO18aW1Epry5rHzuu64RPeXC7OhbgNpNIS3IswH
	ZraTi4m18YM/1GfPzkQcFTmjYjkYMXHOzhPgaNydcqEunZEpe720bBnFTWVrNPAXB2xASS
	nAOfpT69RWSBYywBMBJAzDlWnAMS9Lha4pv9BFbACdNIRrhgUcwqbvkQJGJBUVuap7gZxz
	J3eP2ao1ekRCL/HZ8cyw5nyA2mW5CdsVYSDKlCTn+wf9rBfv9tKeFuYptOfgZxQsaQgS+q
	m1nC5kAouauNpXqfXZKkyTHVue5BVIK1uD3Y/9LAsoBpPjwr9E2KRELm/u2mPw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795394167;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=6KdhxepJPV0BjUtf5nomFmME18iHgLUua4KhAgpebZ0=;
	b=BtTGoWVJBpIGOv7cDgg/qxfYig0QmTkg8wzFhq+WKktsUpdca7z6l7g/JdFgkSkK26AK3i
	x3ctVBIOUzc60s+SxpyrO0T7hfhLq3uFAih2+/4NOleV5pJH6LtC3sqD0pmecyHHdv978C
	aZbXOcTncapfjiEVo79i4YJq+3ePYrW5jEOYY8gpSplasub1Wi3kxMvFvixMFyzc4dwlKs
	5Ae9JurjqU0on6ks/ikEM1UhcQ4vPvpEZmG19oCvqmax+xxzu6qHOsgujQ205ql4I6RU/H
	S3zylng0Yp4o9ren3sLlfjjCmXdq0nkDBRSL6kAMRCBsnYLxyPnG959PigunGw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXn6v1Rc2zRlP
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:36:07 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1d9ec
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 00:36:07 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Konstantin Belousov <kib@FreeBSD.org>
Subject: git: 79f12b52d571 - main - vm/vm_page.c: improve vm_page_alloc_noobj_domain() prototype
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: 79f12b52d571e005e0447e9f2e060579939aedf3
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 00:36:07 +0000
Message-Id: <6b038a77.1d9ec.46ea61c5@gitrepo.freebsd.org>

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=79f12b52d571e005e0447e9f2e060579939aedf3

commit 79f12b52d571e005e0447e9f2e060579939aedf3
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-11-21 23:50:11 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-23 00:35:14 +0000

    vm/vm_page.c: improve vm_page_alloc_noobj_domain() prototype
    
    Put it alphabetically ordered.
    Add argument names.
    
    Reviewed by:    alc
    Sponsored by:   Nvidia networking
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D61860
---
 sys/vm/vm_page.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h
index ee7bcf900b76..5d50b13526cb 100644
--- a/sys/vm/vm_page.h
+++ b/sys/vm/vm_page.h
@@ -568,13 +568,13 @@ vm_page_t vm_page_alloc_domain_iter(vm_object_t object, vm_pindex_t pindex,
 vm_page_t vm_page_alloc_iter(vm_object_t object, vm_pindex_t pindex, int req,
     struct pctrie_iter *pages);
 vm_page_t vm_page_alloc_noobj(int);
-vm_page_t vm_page_alloc_noobj_domain(int, int);
 vm_page_t vm_page_alloc_noobj_contig(int req, u_long npages, vm_paddr_t low,
     vm_paddr_t high, u_long alignment, vm_paddr_t boundary,
     vm_memattr_t memattr);
 vm_page_t vm_page_alloc_noobj_contig_domain(int domain, int req, u_long npages,
     vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary,
     vm_memattr_t memattr);
+vm_page_t vm_page_alloc_noobj_domain(int domain, int req);
 void vm_page_bits_set(vm_page_t m, vm_page_bits_t *bits, vm_page_bits_t set);
 bool vm_page_blacklist_add(vm_paddr_t pa, bool verbose);
 bool vm_page_busy_acquire(vm_page_t m, int allocflags);

From nobody Mon Nov 23 00:36:08 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXn6w4bd0z71N6p
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 00:36: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXn6w2T45z4Qbx
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:36:08 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795394168;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=N/KnKQXS6Mbn9glNsrain7Q14V2Trw/FbNomLD4rhgo=;
	b=NS0NuWj1MYDXF2fl0uHu9H/3sWVs5IP/U3LOsdQxXqexe9J8TgekPuFlawOmmr8V4F85r3
	KR07IEW3T9RxlaVXydof8FQKh+SV87PWXzyb5z8T+Hi0nI+7SGXwk1jLx9eiz+UzwCjUKY
	02ZBYLxK+Qo4trsJq6sym4aZI/fjVveJ4Vzz/bVO5cVeKR8wd7OycT4PxSnuZl++s8Qe/e
	tfgFeZG3/6Uz1EVQGvGEyYAdaFO0wZeiErJcpZFO8iuPdSjdvleEYYcib7lqlbYe4PND5/
	hEpzwYJqt78bNZ91Zwr9c43oPcZc62mAhAFbPSxdAI3g8jNsZM4KOhBottlcxQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795394168;
	b=uA/jZKTacaHUz9m7KE9Rbx4nYEYfadsA33jCC7i6NwOPVUtRmngmNYn1GLcTwtznSHuL2P
	mGFkP/Ya6pJINbJa1MHy7KKDuqAfnVupu6YXTtvxflzNpYicc/5Dk7n47F4K5V3yYgWYaa
	LFsWlPhGWcXHjiOVIe9FPAEipwgLKhUT9BvCEJ1CVYQ8chRsH8NrORlvsBD5RlaWVBTssL
	w7/hdCL/CF9lG9+ftxDp9PzYg0NSR+P7/qPOAsBYMOkX85cpz2npZ4+2bqQqa0+nosbDdU
	goxHfymuMGELpHLdqXT6jDCMyRgdgEWnAKOU13TdILtoLcP1QE9DcDAaSyOJqw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795394168;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=N/KnKQXS6Mbn9glNsrain7Q14V2Trw/FbNomLD4rhgo=;
	b=deM5n3VmRYygVISlKWaeOlLfrYOoCg6uYxEtjdG79sSB4Hej4hWiKYK9wa5IEZoVRr2uyj
	g63DAv4fSSFMpf7TMdFDx8sVmevVZQMpz4KLH6OYLIbffINi5WD+/ebNZ0mhnDdnHeqaLN
	9VL0zX/asNhfdfzGqjYzGcyGsjx121veXJl2Z6oo/PaFUgokIEMUR0X24nEX3jT4+9xaXi
	23WCGEB28NfUxzMuXAmZFl6MDtuS6uWUhvMD5MGfsVxeAI0nBXcfm/yj6BpeJk07sDqDHg
	c/+h44ktYH/MibVVbc/kvVlAA0vES1lWmMNZHFV7SDoqA7gtxuX7cHA1Gn8FKw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXn6w1s9PzRBm
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:36:08 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1df74
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 00:36:08 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Konstantin Belousov <kib@FreeBSD.org>
Subject: git: 916ecca56a92 - main - vm_page_alloc_noobj_domainset(9): noobj page allocator honoring domainset
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: 916ecca56a92e6221320a5c27306da5baa133398
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 00:36:08 +0000
Message-Id: <6b038a78.1df74.3b9e6fb7@gitrepo.freebsd.org>

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=916ecca56a92e6221320a5c27306da5baa133398

commit 916ecca56a92e6221320a5c27306da5baa133398
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2025-03-28 02:29:16 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-23 00:35:14 +0000

    vm_page_alloc_noobj_domainset(9): noobj page allocator honoring domainset
    
    Reviewed by:    alc
    Sponsored by:   Nvidia networking
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D61860
---
 sys/vm/vm_page.c | 20 ++++++++++++++++++++
 sys/vm/vm_page.h |  2 ++
 2 files changed, 22 insertions(+)

diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index 3369179465de..f9ad70b875de 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -2636,6 +2636,26 @@ vm_page_alloc_noobj(int req)
 	return (m);
 }
 
+vm_page_t
+vm_page_alloc_noobj_domainset(struct domainset *ds, int req)
+{
+	struct vm_domainset_iter di;
+	vm_page_t m;
+	int domain, m_flags;
+
+	MPASS((req & (VM_ALLOC_WAITOK | VM_ALLOC_WAITFAIL)) == 0);
+	m_flags = M_NOWAIT;
+	if (vm_domainset_iter_policy_init(&di, ds, &domain, &m_flags) != 0)
+		return (NULL);
+	do {
+		m = vm_page_alloc_noobj_domain(domain, req);
+		if (m != NULL)
+			break;
+	} while (vm_domainset_iter_policy(&di, &domain) == 0);
+
+	return (m);
+}
+
 vm_page_t
 vm_page_alloc_noobj_contig(int req, u_long npages, vm_paddr_t low,
     vm_paddr_t high, u_long alignment, vm_paddr_t boundary,
diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h
index 5d50b13526cb..ef6f94abae02 100644
--- a/sys/vm/vm_page.h
+++ b/sys/vm/vm_page.h
@@ -423,6 +423,7 @@ extern vm_page_t bogus_page;
 
 #include <sys/kassert.h>
 #include <machine/atomic.h>
+struct domainset;
 struct pctrie_iter;
 
 /*
@@ -575,6 +576,7 @@ vm_page_t vm_page_alloc_noobj_contig_domain(int domain, int req, u_long npages,
     vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary,
     vm_memattr_t memattr);
 vm_page_t vm_page_alloc_noobj_domain(int domain, int req);
+vm_page_t vm_page_alloc_noobj_domainset(struct domainset *ds, int req);
 void vm_page_bits_set(vm_page_t m, vm_page_bits_t *bits, vm_page_bits_t set);
 bool vm_page_blacklist_add(vm_paddr_t pa, bool verbose);
 bool vm_page_busy_acquire(vm_page_t m, int allocflags);

From nobody Mon Nov 23 00:36:09 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXn6y01YHz71N2v
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 00:36: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXn6x370Sz4QfS
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:36:09 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795394169;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=japT8ZzEe6EBkZ2eIaSZS9JIUnJYQXw+2S9CJ55+Jrk=;
	b=WlduxVG9AanWmRK1rRHvtbgPiEJeooJGcyoa4bJAelJ7fenKE6iPIxQVWLPmK58QPrai8O
	IuoW3f1a2+haJXKFjqVw1ImG+p17arhahu2cCuRGqbkUspzeYJQzY9xb4jVNqzQsD5Hr/s
	HqPKywtomPrQ4Lr5YwIVP77stut6zaJF+/4Py7DUYqHLjZhk7i8p+YF187PZWAbvpPFrBj
	9sfGJPn9K9sFSrFLwzBSWMOV7zDXYyotTWIltvUNxFMQcSKXGokTGKTTNOenp+Jl755Tp+
	x/h1Rm9InRNJKE1D4rbWmbtYczPRa5aO7kOff9LCr0uLTQD2V6dQFjYSnsatTQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795394169;
	b=fnxnH8oIPH6sxhlR3n/i1D2fEVljNjmTu8zWaIKaH4YOilGlFbAnXwVdbxv5SyRD4V27mJ
	6+SpZVKg37p615fKBnU94Mr07AqO58MNg74l/0ayUIm6D2HBEGUHlIOdx+yn/myueUghv0
	DJvGWcdRoi7vkVdI+EpgOthvl9TkCHlnSYIV1pH04nKgMfqcXZAVee21Jx/hr0matYP6Kt
	RsdG1NsLzmxFvODGVC1lRjTwm9/L+zVEA/bz+wTs0Q5I0RDPz9dUoMhRF0o6AzFXJajloO
	RwyeDn3MB+cbHiniNpOsyYbQpkU6R1oCOSpbtn2rZlDG7ZxE9ApQzP/hQgXAsQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795394169;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=japT8ZzEe6EBkZ2eIaSZS9JIUnJYQXw+2S9CJ55+Jrk=;
	b=ccPgnypqeSmPeGaiqCKgk5ADM3/qxCCysJQezjRjbOuxq5ZMbI/OWfFi7b3a3edVugtrf8
	FvtHuAWPpWrrrYx2blhXvQ3MNttx2xphiRQNg/zOWfQ3s31fIpaQM7858hTCe7x02bZoOB
	ZDQMWOWgY2sbaagttWZA49zXQ5hjg9S+agQcK0hEB2zck6+mVr0zFx8yjg3eY/bNG1VSYy
	vJW1J42THtILJBpDLpnCJJmw6H2uwzumD+YEbB65SHOcKNGgsH58+c4yqyIgaYrZUfy90S
	PnN20rxfozbpE24xhtIxAOPcRWfHCbBBCzBvvHVjsH6cavkUaTR4m9HnTEjw3g==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXn6x2njHzRS3
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:36:09 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1f2b4
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 00:36:09 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Konstantin Belousov <kib@FreeBSD.org>
Subject: git: a69e1831c50c - main - vm_page_alloc.9: document vm_page_alloc_noobj_domainset(9)
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: a69e1831c50c354c61274b26e9c5395e39234944
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 00:36:09 +0000
Message-Id: <6b038a79.1f2b4.31a1619c@gitrepo.freebsd.org>

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=a69e1831c50c354c61274b26e9c5395e39234944

commit a69e1831c50c354c61274b26e9c5395e39234944
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2025-03-28 02:29:16 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-23 00:35:14 +0000

    vm_page_alloc.9: document vm_page_alloc_noobj_domainset(9)
    
    Reviewed by:    alc
    Sponsored by:   Nvidia networking
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D61860
---
 share/man/man9/Makefile        |  3 ++-
 share/man/man9/vm_page_alloc.9 | 18 +++++++++++++++++-
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile
index 9454872d3e53..533b9708f82b 100644
--- a/share/man/man9/Makefile
+++ b/share/man/man9/Makefile
@@ -2471,7 +2471,8 @@ MLINKS+=vm_page_alloc.9 vm_page_alloc_after.9 \
 	vm_page_alloc.9 vm_page_alloc_noobj.9 \
 	vm_page_alloc.9 vm_page_alloc_noobj_contig.9 \
 	vm_page_alloc.9 vm_page_alloc_noobj_contig_domain.9 \
-	vm_page_alloc.9 vm_page_alloc_noobj_domain.9
+	vm_page_alloc.9 vm_page_alloc_noobj_domain.9 \
+	vm_page_alloc.9 vm_page_alloc_noobj_domainset.9
 MLINKS+=vm_page_bits.9 vm_page_clear_dirty.9 \
 	vm_page_bits.9 vm_page_dirty.9 \
 	vm_page_bits.9 vm_page_is_valid.9 \
diff --git a/share/man/man9/vm_page_alloc.9 b/share/man/man9/vm_page_alloc.9
index 4bf8db33a28d..b9e04a6c1ae6 100644
--- a/share/man/man9/vm_page_alloc.9
+++ b/share/man/man9/vm_page_alloc.9
@@ -28,7 +28,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 .\" DAMAGE.
 .\"
-.Dd August 4, 2024
+.Dd November 9, 2026
 .Dt VM_PAGE_ALLOC 9
 .Os
 .Sh NAME
@@ -116,6 +116,11 @@
 .Fa "int domain"
 .Fa "int req"
 .Fc
+.Ft vm_page_t
+.Fo vm_page_alloc_noobj_domainset
+.Fa "struct domainset *ds"
+.Fa "int req"
+.Fc
 .Sh DESCRIPTION
 The
 .Fn vm_page_alloc
@@ -147,6 +152,17 @@ support NUMA-aware allocation by returning pages from the
 .Xr numa 4
 domain specified by
 .Fa domain .
+The
+.Fn vm_page_alloc_noobj_domainset
+function allocates the page from the domains selected by the
+.Xr domainset 9
+policy
+.Fa ds .
+It does not sleep, and the
+.Dv VM_ALLOC_WAITOK
+and
+.Dv VM_ALLOC_WAITFAIL
+flags must not be specified.
 .Pp
 The
 .Fn vm_page_alloc_after

From nobody Mon Nov 23 00:36:10 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXn6y4xshz71N4R
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 00:36: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXn6y2wZdz4Qc2
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:36:10 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795394170;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=MImuoyuCntzrviSBlsAAzC1L+hNWMFCjEUie5XKxuvA=;
	b=B4jG89q14TJagmok8AzM1HfTHBjdgZlYDy6EifJPLdj+vIq+DZtXzU4AC3y85eJBtMb2Bj
	rwaI16/feiTrZZxkE6LZKt8tfRMLwuDQJwTmndNPbGtKKi/6u+2+jVevpb6guj9u9wQhrI
	RBzR+AptfYcHYm6pfdBPBpsKD3bA6W6xMjke3afG+v/QX29QfWaXsvXnqMZFIXsYXSjz9c
	oeuJYwzNgy79ZXdb/jyhx3tT4KEDOtVecPtM/LeePXCPcx0hxWDDGfZy2wgWkjCxzPke7Y
	IRP2+y9h3Qt6iBbLHf+yBYN3c07UdsjIhlyYET8XTXD+xeMM+dCEYfIOd8h31g==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795394170;
	b=Npnpts1k4uW3beOl+9h9TybcDjSG0dotFGQnz1/K87WyjqMYnT+p+Keo9nHpVZF6godFlF
	eWKC9tFlXbVAYffR/fJxHOJfNXqIjY8nv3FVkp8SGxxBdqmL//iGMMs//mp3042kaL67ml
	855W6OJUmSDTAavx3U3MHixOINmemOCQezo8UauHKiUbDPJCAJeichQscD9iOh8TYPelbe
	L/JW/wOe7F720STIioqekp6/tjA252gwX/5QFp4VqeoL+FOCp02z5mQ96Wer1IpzFCZHRn
	r1l467clKUOly3VeuLMExnkP7AvoH5gR/CTM/CzI2cvHI0+6PmeYs3CMVZh86Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795394170;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=MImuoyuCntzrviSBlsAAzC1L+hNWMFCjEUie5XKxuvA=;
	b=QfxiCPearmbxOPIZ142iFvqvnR2GPScwpsMnf1g2SVbtvRkf8o1wQx3Mm1ZOJrc3dazYda
	G3dU6K0ZdWwOHyv7/4G4fcMKGAT3J/cWUrE/1TGLapy59awHSKRFPkzP/mOYsi86wi4aVx
	WDuNY+B5xxLumVCtD+dbfLF8MH8rR+48uGklFIrbRCSVLzwxY4EAEEgIEb7/detvT+3GLX
	LwI+YPetegqp5rj/nDsS1aa9FZOTothDZ9RP5c3UygqMvE1X4tvuxRkcrikjGWe3EdvUpS
	F6EV24sPvUHqccwja5onxMigVy9H2fvnYVlN+xxi4/xtQPf+yEZ1QN/JqAYErg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXn6y2ZlVzRgv
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:36:10 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1f1a7
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 00:36:10 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Konstantin Belousov <kib@FreeBSD.org>
Subject: git: 75dce373664a - main - vm/vm_page.c: extract vm_page_unwire_unmanaged()
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: 75dce373664aea1206f68897a9eb1f6e638a85e3
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 00:36:10 +0000
Message-Id: <6b038a7a.1f1a7.4b0b33b4@gitrepo.freebsd.org>

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=75dce373664aea1206f68897a9eb1f6e638a85e3

commit 75dce373664aea1206f68897a9eb1f6e638a85e3
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-11-21 06:22:21 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-23 00:35:14 +0000

    vm/vm_page.c: extract vm_page_unwire_unmanaged()
    
    Refactored function returns indicator when the page was actually freed.
    
    Reviewed by:    alc
    Sponsored by:   Nvidia networking
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D61860
---
 sys/vm/vm_page.c | 19 +++++++++++++++++--
 sys/vm/vm_page.h |  1 +
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index f9ad70b875de..6ead05a274b2 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -4378,6 +4378,22 @@ vm_page_unwire_managed(vm_page_t m, uint8_t nqueue, bool noreuse)
 	}
 }
 
+/*
+ * Release one wiring of an unmanaged page.  Return true if that was the
+ * last reference to the page and the page was freed.
+ */
+bool
+vm_page_unwire_unmanaged(vm_page_t m)
+{
+	MPASS((m->oflags & VPO_UNMANAGED) != 0);
+
+	if (vm_page_unwire_noq(m) && m->ref_count == 0) {
+		vm_page_free(m);
+		return (true);
+	}
+	return (false);
+}
+
 /*
  * Release one wiring of the specified page, potentially allowing it to be
  * paged out.
@@ -4394,8 +4410,7 @@ vm_page_unwire(vm_page_t m, uint8_t nqueue)
             ("%s: invalid queue %u request for page %p", __func__, nqueue, m));
 
 	if ((m->oflags & VPO_UNMANAGED) != 0) {
-		if (vm_page_unwire_noq(m) && m->ref_count == 0)
-			vm_page_free(m);
+		vm_page_unwire_unmanaged(m);
 	} else {
 		vm_page_unwire_managed(m, nqueue, false);
 	}
diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h
index ef6f94abae02..0dfa9642f93c 100644
--- a/sys/vm/vm_page.h
+++ b/sys/vm/vm_page.h
@@ -663,6 +663,7 @@ void vm_page_unhold_pages(vm_page_t *ma, int count);
 void vm_page_unswappable(vm_page_t m);
 void vm_page_unwire(vm_page_t m, uint8_t queue);
 bool vm_page_unwire_noq(vm_page_t m);
+bool vm_page_unwire_unmanaged(vm_page_t m);
 void vm_page_updatefake(vm_page_t m, vm_paddr_t paddr, vm_memattr_t memattr);
 void vm_page_wire(vm_page_t);
 bool vm_page_wire_mapped(vm_page_t m);

From nobody Mon Nov 23 00:36:11 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXn6z5rBTz71NFj
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 00:36: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXn6z3cSwz4QTW
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:36:11 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795394171;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=pI0ZfdUK1io2VLuYlV9pvT6UBJOPN2/0nIV2Jp7RIb0=;
	b=DQFWfDP3Mj3nTO49yVe72CY9QQOQQYtSmolh7HsXUGtj6aMO8BIwvTEzr2624sev5vQ/Vv
	OTzAjMdAEewPNoZUclvQttbKRJYi44Tg9c/A/cZVyyNK8bggA11ldo1rOyt8nek2QfSwQU
	+bWVQ5Y7plLGbtJNuR210ZTFbG2CwP+IyVct3KqN0+pQLHmgdV4bnAaCuqPJ4wgakRgKyE
	N0PBcYYtqiOlDBAYBpyPzwhE+XtiTAZnBC32z75a0v4nCYZDD+78T5QOlgRGLziZkfbwrC
	OmUjDym4RVaqVdKQcf7iY4i/guVES+LrMb/AY3DiHFpS+qVezorHf+hjgtaYTA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795394171;
	b=cQpNm76z5hihJ/UKU3USi3l4CNuxWAHnzdcU/IbVYkGrs7YULohE5ewARz7UVsyJ9G8jHU
	qayeqrMjlomWUFmZJ+NtcKRMW82FBsGCTeAcSxuZmxlDNg/AYSdn5xB11Pt4mtyzlipgyY
	nrGOpBVyhkAe2QYQJvj59rm5CiYJBK7YasxxfoTefa/3k2tZlECjGiLLHzsi+3UN0vYZGY
	8Kt5GiY/UdPzy2c9g6qRQik1JBE1oSCOilWM3MAN1sZ3KG49qoImK60BiuBB+KfHdrognv
	09F01dB4shmyigtsz0Ouy94ZYyQKCk747f4IriYKQRgOo3luZ+Eel7YCiGNs/g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795394171;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=pI0ZfdUK1io2VLuYlV9pvT6UBJOPN2/0nIV2Jp7RIb0=;
	b=crHJ5nJZfKiIUUJzt9DSQzOOcSdf9FYIuXDKzc0YYz8yQ80RFhSgqz5zcx1UkLo8tNE0kM
	3+pe4MyK7io8YURJPxd7HBA+FE4ckW0jbBNa2dGF+RwN0UPBeGznHbVQEg8vMGdZLVyCJx
	RHk5FOdLoZ9JzhuWVRRpKu1tqcLPnpzisTpmtStZRobMYnOLOmZ1nOwgMzRoS59pI0KZME
	pOuqFp6JLDg3lzLueagZZyk6kjTGYyXzZrw3Fzp19crxABupDPwdQylV0C/npvOxRDluJa
	nBS+9C6ypragKV0/fJsHbgdBQG5FtCtOZ2zWKwRfX07a1h3c4wwesrh6XQcRMg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXn6z30PLzRlQ
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:36:11 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1ef81
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 00:36:11 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Konstantin Belousov <kib@FreeBSD.org>
Subject: git: a4a353f0d089 - main - vm_page_unwire_unmanaged(): fix a double free of the page
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: a4a353f0d089d35aceeaf26df7ab436de20fc8cb
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 00:36:11 +0000
Message-Id: <6b038a7b.1ef81.7760a761@gitrepo.freebsd.org>

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=a4a353f0d089d35aceeaf26df7ab436de20fc8cb

commit a4a353f0d089d35aceeaf26df7ab436de20fc8cb
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-11-22 00:31:44 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-23 00:35:14 +0000

    vm_page_unwire_unmanaged(): fix a double free of the page
    
    The function decided to free the page when vm_page_unwire_noq() reported
    that the last wiring was released and a separate load of ref_count then
    returned zero. For a page that belongs to an object, the object can drop
    its VPRC_OBJREF reference between the decrement and the load. The load
    then sees zero, and both threads free the page, which ends up on the
    free lists twice and is later handed out to two owners.
    
    Decide from the value returned by our own atomic decrement instead.
    
    Reported by:    alc
    Reviewed by:    alc
    Fixes:  fee2a2fa3983 ("Change synchonization rules for vm_page reference counting.")
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D61860
---
 sys/vm/vm_page.c | 26 +++++++++++++++++++++-----
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index 6ead05a274b2..b69443088002 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -4385,13 +4385,29 @@ vm_page_unwire_managed(vm_page_t m, uint8_t nqueue, bool noreuse)
 bool
 vm_page_unwire_unmanaged(vm_page_t m)
 {
+	u_int old;
+
 	MPASS((m->oflags & VPO_UNMANAGED) != 0);
 
-	if (vm_page_unwire_noq(m) && m->ref_count == 0) {
-		vm_page_free(m);
-		return (true);
-	}
-	return (false);
+	/*
+	 * Decide from the value returned by our own decrement.  If the page
+	 * belongs to an object, the object may drop its VPRC_OBJREF
+	 * reference concurrently, see vm_object_terminate_single_page(),
+	 * and a later load of ref_count could make both threads free the
+	 * page.
+	 */
+	old = vm_page_drop(m, 1);
+	KASSERT(VPRC_WIRE_COUNT(old) != 0,
+	    ("%s: counter underflow for page %p", __func__, m));
+	KASSERT((m->flags & PG_FICTITIOUS) == 0 || VPRC_WIRE_COUNT(old) > 1,
+	    ("%s: missing ref on fictitious page %p", __func__, m));
+	if (VPRC_WIRE_COUNT(old) > 1)
+		return (false);
+	vm_wire_sub(1);
+	if (old != 1)
+		return (false);
+	vm_page_free(m);
+	return (true);
 }
 
 /*

From nobody Mon Nov 23 00:49:11 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXnPz4lhcz71PXY
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 00:49: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXnPz3fhrz4XZv
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:49:11 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795394951;
	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=5hqtZHWOKy8kT+eZnkqN6EsvnE89PYDwgUsbljqriBw=;
	b=D7RB0EvxxWAn7PfSSGPiZLgI7Tbw0zusH4wVzr8Pk7LXgYFRdx4G6ADwA7PW7QN2s4FvZd
	liio2N/iX4zbX43eoWIlNxKbdJ/7Z6EgZpb4p9KGBWoRBaPXQ1YeKv6n1hrhiv4YfoW7bd
	q8OZI9kK/x/zs3saEvr4Ru1FXZds81nKcfq9WIeU91lGVpxZ6HwcuRDNFOLKoA5q70rIsU
	AlxoCJ09XDzEwjbEEDu0JrhQ5SFuiZ6HVZ5BguAq6lH08NoZGMuA5N8hTmKBx11Ie8HfL6
	SmgSrH/9lNelaLsEYV/Gl0u0Vjrm/ypwqKgazCOyPT2a/Fv681BTtiVFQ0VorA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795394951;
	b=TFgGLMhXc1UaeoaQnF/o0xGjpcxOUKJ2FTHOjjKl/MTVE5cG3ueBVXOcs/RQ2GgM5sDXZE
	WnhYvRZtsqWrPf92F3xl2if0L+cXzFaw3jUZUdd+ugP6eGo9WCjKJtQbo4TzV2y9AYWspr
	kYXfYYV81Aw6oCsuivupq8YhhafFrCMj5J3BCHhEUpgRU/8tZQ4U8ANVZn4PRbT5dgAcag
	WCTSnBPxvv3Vo+YYyyOPtd7Rz8YdbcAEf+HfHSMUeWA8942StxK61VvQ+3yd0fUVimcToQ
	AC3UwLkOybVBRKw6IDzMqd0TK91lRmquq6fLvPpxBxboi200pn3RP1XhK9aMkw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795394951;
	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=5hqtZHWOKy8kT+eZnkqN6EsvnE89PYDwgUsbljqriBw=;
	b=b7YVD6MvpNicegFHN6q5RQb5+OAqaYzvU41z7j0+AU6SXh5UqKuZlJNCNrlK+0cH6X0h/D
	tU4D/3ZXwtrMz6T0O+LSEBlRSAOPOdYKSdEVwSRwxTJM3zpVKglXFHK5l9+dhx0suHcOFi
	2dI499ZrRRFwmS/wVG4J16JvC33+HcxubV+cjtopZY8Bhy+IH2FOpSY+LyPm5lUZyMQwym
	lslUTcyq0/xA+x2Fb91im5kWx/DWEHCcakVwe0C95rPgvEWoP6mL9xTxs7RYbbUUaWDUTB
	gW8g5y/zBAOpIAbXVMyA3TZreYBE1QO/Ge3/7Xj1sFGE7VBDRFvLWbOfvWsUrw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXnPz3KQWzRNX
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:49:11 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1fc95
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 00:49:11 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Vinicius Ferrao <ferrao@versatuphpc.com.br>
From: Rick Macklem <rmacklem@FreeBSD.org>
Subject: git: 00c640349654 - stable/15 - xdr_mbuf.c: Add a check for the return value for xdrmbuf_getbytes()
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: rmacklem
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 00c640349654063dd729b1af85def3b6159c9bc2
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 00:49:11 +0000
Message-Id: <6b038d87.1fc95.3b14e3d8@gitrepo.freebsd.org>

The branch stable/15 has been updated by rmacklem:

URL: https://cgit.FreeBSD.org/src/commit/?id=00c640349654063dd729b1af85def3b6159c9bc2

commit 00c640349654063dd729b1af85def3b6159c9bc2
Author:     Vinicius Ferrao <ferrao@versatuphpc.com.br>
AuthorDate: 2026-11-05 23:58:56 +0000
Commit:     Rick Macklem <rmacklem@FreeBSD.org>
CommitDate: 2026-11-23 00:45:41 +0000

    xdr_mbuf.c: Add a check for the return value for xdrmbuf_getbytes()
    
    The xdrmbuf_getlong() function failed to check for the return
    value from xdrmbuf_getbytes().  This could have resulted in
    a failure during NFS RPC message processing.
    
    (cherry picked from commit cf59649539e653db8285996af2b161be9693a49d)
---
 sys/xdr/xdr_mbuf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/xdr/xdr_mbuf.c b/sys/xdr/xdr_mbuf.c
index 6cb72f8fe1b4..27ff71848574 100644
--- a/sys/xdr/xdr_mbuf.c
+++ b/sys/xdr/xdr_mbuf.c
@@ -151,7 +151,8 @@ xdrmbuf_getlong(XDR *xdrs, long *lp)
 	if (p) {
 		t = *p;
 	} else {
-		xdrmbuf_getbytes(xdrs, (char *) &t, sizeof(int32_t));
+		if (!xdrmbuf_getbytes(xdrs, (char *) &t, sizeof(int32_t)))
+			return (FALSE);
 	}
 
 	*lp = ntohl(t);

From nobody Mon Nov 23 00:50:22 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXnRM46g0z71PXj
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 00:50:23 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXnRL5zhjz4XqT
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:50:22 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795395023;
	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=9vO+kD8UZD9sX32UdmqbJHaCUFZAfkWwqwqcVYPr8Fw=;
	b=dpAKdzr0jeOAGc6k/Xq9HzbCYilFCH362YLKsBVAJn1Dfn3qdwrIhCKBUQ6C6tRztsdxmP
	B4UcRM/WSj3kMXMTrwTI7/Dx2+IUhyr1amisG/DiECh+lkKapuoondHohHiUSclgFW42ly
	vIhFQsqsS3mtQlkvoXGg/ZnrawLZeOLDuCl5EDVL7Z+UvCWnYAOLYoTaxF6h7VDgmdkmfm
	oZXEvCBopYph2ICW0SZKo2FmQkW4pK/dXU4ld6RM6S4viycgqhxM3X2ttbd+A+4NJEd08R
	JmyyhSjjkdYZE/otviN4L87k9ICstGgwoY9o3/aRZzYI/iL2T+b2bKRwD4BnIw==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795395023;
	b=i3540BpW3OkgP2QrAXcNlCazmhZPHm+3zuWBro6DvJvu0u3vWBqz6POeA0Us98G8ugEB6n
	dm9Sra4Yn2lxrZ6Dd5BNHkYHhK7zj+EtbCcAPY827VHU6NRa1tC9/Iysj5UPPHau3op7WG
	kjay2WSC7wgDbqZXcnQt/rpZtkcrQ25ZLb5tFn02NBc5YEqgZG7NF/BwiOI9tsIQm2ucmR
	K5G4EwW8ctolzgDkkeDwAT5p0W6CjYsNASEoTWX7dVQx2lyx6zDZOvPmoYhbaqr25DJCpY
	uFuziFMKI7XLZjAOpvHvRWaBC7vTjwHj/55WaX6aA9KZnc9rEZe0Za1CvRO0og==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795395023;
	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=9vO+kD8UZD9sX32UdmqbJHaCUFZAfkWwqwqcVYPr8Fw=;
	b=ICVJlketaUwqLU6sy7WDOwRcLI5swPMQW7pI5v3CWa4naeXBFGcT8WQ4WPAN0siDzPQyev
	3cPfQICeqZPWomZmvdBaXrOBBY607NeR2zzURvRnG10mTmJrc0dFz1RexL6lJcbf4+Dh16
	8vfkxTd3GKnbms343UC2CBK0cceNxntDWUYjWcjQLhaL0LQItWosut1ezFP2kg3hgDLWKF
	2WMgZlM88bGx6DpGi2r2Le+p8RLlAxJKQoo0gJ+/AYppdOYNCSOVEVp0aORHGisY3V9C2Q
	vWyEQafc9ywq+KWhTFs/k9x3dE9b7m9fatkR/8ROLu2lW8BzO9kp8D40LlC1Zw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXnRL4H1szRCW
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:50:22 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 17cf
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 00:50:22 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Osvaldo Janeri Filho <ojanerif_amd.com>
From: Rick Macklem <rmacklem@FreeBSD.org>
Subject: git: 0ecd86d21057 - stable/15 - rpc.tlsservd.c: Check the malloc return
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: rmacklem
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 0ecd86d21057f7a0089359d8f2753be1f2ba1e15
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 00:50:22 +0000
Message-Id: <6b038dce.17cf.4998b1b@gitrepo.freebsd.org>

The branch stable/15 has been updated by rmacklem:

URL: https://cgit.FreeBSD.org/src/commit/?id=0ecd86d21057f7a0089359d8f2753be1f2ba1e15

commit 0ecd86d21057f7a0089359d8f2753be1f2ba1e15
Author:     Osvaldo Janeri Filho <ojanerif_amd.com>
AuthorDate: 2026-10-31 03:04:10 +0000
Commit:     Rick Macklem <rmacklem@FreeBSD.org>
CommitDate: 2026-11-23 00:48:39 +0000

    rpc.tlsservd.c: Check the malloc return
    
    The NULL return is used by the following memcpy()
    call.  Fail the request instead.
    
    Unlikely to happen in practice, since the rpc.tlsservd
    daemon runs as root and does not allocate a lot or memory.
    
    (cherry picked from commit 6d705f2bf17f2c221ffd0d9b0824ba0fb429392e)
---
 usr.sbin/rpc.tlsservd/rpc.tlsservd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/usr.sbin/rpc.tlsservd/rpc.tlsservd.c b/usr.sbin/rpc.tlsservd/rpc.tlsservd.c
index fb0501b2db4c..40dbb7c4ff2b 100644
--- a/usr.sbin/rpc.tlsservd/rpc.tlsservd.c
+++ b/usr.sbin/rpc.tlsservd/rpc.tlsservd.c
@@ -365,6 +365,8 @@ rpctlssd_connect_2_svc(struct rpctlssd_connect_arg *argp,
 	assert(rqstp->rq_xprt == xprt);
 
 	ctx = malloc(sizeof(*ctx));
+	if (ctx == NULL)
+		return (FALSE);
 	memcpy(&ctx->arg, argp, sizeof(ctx->arg));
 	ctx->xid = *(uint32_t *)pthread_getspecific(xidkey);
 

From nobody Mon Nov 23 00:54:38 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXnXG3L4wz71Q6t
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 00:54: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXnXG1JMkz4YNP
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:54:38 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795395278;
	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=KVb3iW/Q+aGc7tv4jHPxyuP6YN5EcUHFB0ojByAZBJg=;
	b=ITrDgsR6ZpXs4LQ+uLI4/4pkaXRSVrynWzWL60Pu4dPsEXXcYtGOZFkB7jCimqc+XDUW97
	XT1jOVvC9z/qgGnezAq5lP3PxzwJDtCQmayULAm9+44sMQVn0SQB+QEXduTq7M60pTk3hW
	qVwtzsP6j5fBXrw0Qu0VexQ30KN68pnHj7UbcWBsWOwMhdOvbUBgmML0obj0SGzn25ceUi
	jk7Ao7a7RxsrU7wh7OlBm2+SAq+CmeeAiwcDgJM7pLkI/3bxjoFSs+uMb3QGmHqKbwJTAs
	pnk/Qs5paKmiZU8oSNveEUyJhzgGvs/LWOg0K23OzrB3BFAdS4KK32wzsygutA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795395278;
	b=wzVMsXOVePJr4TNa4ESirdWlheIpKszmwh6ho6S5fa0PYLj6BYkBc752CBHfBRmxkllgIN
	dqd3z1B0nbSpnxrqmtzbRy8zW4V/yUbFKjF9GUT9dMuLwHw+uliNZhbcjkSG8MD728AXt4
	DluKpcKG6g9BFZNjJkRov4nBKlsnwGjhtl+Z5lMScOgY5SzVBZu9Gu91ImBp6zj9OVNvAB
	dVztf5Yvx0Vb8644kleQu3xlPZwKMV48Yil2drQaEVluxnasVd2HHHkfnbxc9qLEHJ4+dp
	vZuH02rvQEJAibi3v5Pa86mJM43E5C4sO+MC7xKFEz7epvrMiaCgwePJbm/ghg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795395278;
	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=KVb3iW/Q+aGc7tv4jHPxyuP6YN5EcUHFB0ojByAZBJg=;
	b=IQ/fQWUx9wE+iBbNeQbHHcR02LfzZ6jYj3ULh13Wa+jh/UO0rj5GCbhOaZlaMyJfI7MAEI
	XYP6wdTF6YOvrgyJcD2grx5pkpycMMp9xrbd3QRSTkuEH1M2Gc1VY5/pGsUyhZQ0BoeCCj
	iMWwbJGELKxFSUPQwQ3leArTeN0j2ArnDcKvFqwuVScDsqbZpnKsUimT/7t0fAE2Oc8VO7
	8OpjKJnTmn1qUZcgO5rqcPEbIH47EAJFCUV3zALY8fpy+eXxNbjKV5j9QfOnRQZYWAoQ1f
	LcSutAzQVSPc/Rg3nBxng14yR82HIjBh9kcmL5lvdcb+aHHeiwi5RdljKucojA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXnXG0yGczSBJ
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 00:54:38 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 17da
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 00:54:38 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Vinicius Ferrao <ferrao@versatuphpc.com.br>
From: Rick Macklem <rmacklem@FreeBSD.org>
Subject: git: 9c766ce61064 - stable/14 - xdr_mbuf.c: Add a check for the return value for xdrmbuf_getbytes()
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: rmacklem
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 9c766ce61064ad6e2968ba918dcdb80b2c6d1a75
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 00:54:38 +0000
Message-Id: <6b038ece.17da.7423a0e7@gitrepo.freebsd.org>

The branch stable/14 has been updated by rmacklem:

URL: https://cgit.FreeBSD.org/src/commit/?id=9c766ce61064ad6e2968ba918dcdb80b2c6d1a75

commit 9c766ce61064ad6e2968ba918dcdb80b2c6d1a75
Author:     Vinicius Ferrao <ferrao@versatuphpc.com.br>
AuthorDate: 2026-11-05 23:58:56 +0000
Commit:     Rick Macklem <rmacklem@FreeBSD.org>
CommitDate: 2026-11-23 00:52:52 +0000

    xdr_mbuf.c: Add a check for the return value for xdrmbuf_getbytes()
    
    The xdrmbuf_getlong() function failed to check for the return
    value from xdrmbuf_getbytes().  This could have resulted in
    a failure during NFS RPC message processing.
    
    (cherry picked from commit cf59649539e653db8285996af2b161be9693a49d)
---
 sys/xdr/xdr_mbuf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/xdr/xdr_mbuf.c b/sys/xdr/xdr_mbuf.c
index 99fdeef8fe23..611036db1032 100644
--- a/sys/xdr/xdr_mbuf.c
+++ b/sys/xdr/xdr_mbuf.c
@@ -148,7 +148,8 @@ xdrmbuf_getlong(XDR *xdrs, long *lp)
 	if (p) {
 		t = *p;
 	} else {
-		xdrmbuf_getbytes(xdrs, (char *) &t, sizeof(int32_t));
+		if (!xdrmbuf_getbytes(xdrs, (char *) &t, sizeof(int32_t)))
+			return (FALSE);
 	}
 
 	*lp = ntohl(t);

From nobody Mon Nov 23 01:18:34 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXp3v04qbz71TPK
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:18: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp3t5C9Vz4bhZ
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:34 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795396714;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=anSfb6uw06KGfT9W15FyHVPmGPSzWjLUysSWoIJ79JE=;
	b=ioEotcbO1y9c/vKO77XkZrYNKpTrDf9IAx6akQA8EJB92K6F4QeUGF/x+3rpN5VHQ7Rdbu
	ebIw5XC3Q44ogWUrgy5oVr4oJ9p3JUNyilgcb92R412CY+vHb3DGSEjo8HlKUnp1dCUJGp
	+OrFAfXq8mzBt2OmFWPDTBZc2kdZPXW9N+C8FFhA78TuY917P/wT3dcgnRxWnB8ZvMDm2+
	5hyMXIfRQ6fgPo26CWFvbJa7jtgcIgzrwPvcNe+m7QJHhiDM6Ng++OqMFahc1KA35f2FRJ
	O8V3Hl+6xlt/xrX1BFiKhibY5Wg5z4DJG88rRqTSGHzLfDIw7TMdkizATWeknA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396714;
	b=o0JE1hDd4T5/zgz0XKpOrOaT/E2sqDGVlDg1I5q+kd00M2hNksyCE4MRMTFeMd9LjiIJlo
	0blWTh9wRRjeZloveWvWdLQ6bUA0xzXjyxNXyDdXbQSx/yXaXxZ6aAi21cpUn+a6yUx32u
	sX2JECWkUsda1xQJXvMgZwb7jjw7XREQ+oDltA1209L3ZcFmGwuh0cLASBEFF+zWvdI4/e
	OAoU8jYm3+5lhkTzgsDTmX81N2Rrlp3Nqz+8dXR87E+KYQ6hko82MTCwiDefffel57HsME
	JnQlYLu/UiJSG5HefYJbz1ftnvaOJ00/oqXrKZm0bRVf26vkUkew5hZl//uvVw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795396714;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=anSfb6uw06KGfT9W15FyHVPmGPSzWjLUysSWoIJ79JE=;
	b=fubxIyv9knPZF7nzQ3JATEUllZC1lVkiv3gmTAc5FNXZZCxP/7BtMWKdqhyhb/rhwS8Spr
	zdZVBjC2t0h4ZqMAaHSWk3uSQvXhx6Mne1rVUpIzcLfLgprsRaMuPZuY5edlW99pJpMLT2
	VA4HO4twPHmfmbYuB83Ypxffe5ZN7xCzlvKht6+XKWMHfPPkghvKEbuOQfb5ynv4kg5fpw
	fhGZ28FoDpz8O8e6067lmBf7UWwQvzzGXAGneIft3y/51HMd1koa8oYFt/FSGwFn+yacBj
	xFG+CEnGS3VRpPW7HkzbJVxhd/pvM8o3D0ZPwCZbDO5zvZaQUFiT/qd8uDg7ZA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp3t3rpHzSH0
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:34 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 25fe
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:18:34 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: ff3af1fa23d1 - stable/15 - contrib/kyua: update to 0.15.0
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: ff3af1fa23d16817003aef81aaa5157711077afc
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:18:34 +0000
Message-Id: <6b03946a.25fe.78e8c644@gitrepo.freebsd.org>

The branch stable/15 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=ff3af1fa23d16817003aef81aaa5157711077afc

commit ff3af1fa23d16817003aef81aaa5157711077afc
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-10-07 17:50:26 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:17:39 +0000

    contrib/kyua: update to 0.15.0
    
    This new release contains multiple feature updates and bugfixes. Please
    see the release notes mentioned in the merge commit for more details.
    
    MFC after:      1 month
    Merge commit '144afd05f8a2300361ec30c1c2020e4022ddd943'
    
    Conflicts:
            contrib/kyua/cli/cmd_debug.cpp
            contrib/kyua/doc/kyua-debug.1.in
            contrib/kyua/doc/kyuafile.5.in
            contrib/kyua/engine/config.cpp
            contrib/kyua/engine/execenv/execenv.cpp
            contrib/kyua/engine/execenv/execenv.hpp
            contrib/kyua/engine/execenv/execenv_host.hpp
            contrib/kyua/engine/requirements.cpp
            contrib/kyua/engine/requirements.hpp
            contrib/kyua/engine/scheduler.cpp
            contrib/kyua/model/metadata.cpp
            contrib/kyua/os/freebsd/execenv_jail.hpp
            contrib/kyua/os/freebsd/execenv_jail_stub.cpp
            contrib/kyua/os/freebsd/main.cpp
            contrib/kyua/os/freebsd/reqs_checker_kmods.cpp
            contrib/kyua/os/freebsd/utils/jail.hpp
            contrib/kyua/utils/fs/directory.cpp
            contrib/kyua/utils/process/executor.cpp
    
    (cherry picked from commit eb8f69902f7de8012a31a85db2f88a54584f81af)
---
 contrib/kyua/.cirrus.yml                           |  25 -
 contrib/kyua/.gitignore                            |  23 -
 contrib/kyua/.travis.yml                           |  49 --
 contrib/kyua/Doxyfile.in                           |   1 -
 contrib/kyua/FREEBSD-Xlist                         |  12 +
 contrib/kyua/INSTALL.md                            | 268 ------
 contrib/kyua/Makefile.am                           | 186 ----
 contrib/kyua/{NEWS.md => NEWS}                     | 163 +++-
 contrib/kyua/README.md                             |  33 +-
 contrib/kyua/admin/.gitignore                      |   6 -
 contrib/kyua/admin/Makefile.am.inc                 |  41 -
 contrib/kyua/admin/build-bintray-dist.sh           | 131 ---
 contrib/kyua/admin/check-api-docs.awk              |  72 --
 contrib/kyua/admin/check-style-common.awk          |  79 --
 contrib/kyua/admin/check-style-cpp.awk             |  87 --
 contrib/kyua/admin/check-style-make.awk            |  71 --
 contrib/kyua/admin/check-style-man.awk             |  71 --
 contrib/kyua/admin/check-style-shell.awk           |  95 --
 contrib/kyua/admin/check-style.sh                  | 170 ----
 contrib/kyua/admin/clean-all.sh                    |  90 --
 contrib/kyua/admin/travis-build.sh                 |  98 ---
 contrib/kyua/admin/travis-install-deps.sh          |  83 --
 contrib/kyua/bootstrap/.gitignore                  |   4 -
 contrib/kyua/bootstrap/Kyuafile                    |   5 -
 contrib/kyua/bootstrap/Makefile.am.inc             |  90 --
 contrib/kyua/bootstrap/plain_helpers.cpp           | 141 ---
 contrib/kyua/bootstrap/testsuite.at                | 200 -----
 contrib/kyua/cli/Makefile.am.inc                   | 123 ---
 contrib/kyua/cli/cmd_debug.cpp                     |   7 +-
 contrib/kyua/cli/main.cpp                          |   4 +
 contrib/kyua/config.h                              | 139 +++
 contrib/kyua/configure.ac                          | 173 ----
 contrib/kyua/doc/.gitignore                        |  14 -
 contrib/kyua/doc/Makefile.am.inc                   | 152 ----
 contrib/kyua/doc/kyua-about.1.in                   |   2 +-
 contrib/kyua/doc/kyua-config.1.in                  |   2 +-
 contrib/kyua/doc/kyua-db-exec.1.in                 |   2 +-
 contrib/kyua/doc/kyua-db-migrate.1.in              |   2 +-
 contrib/kyua/doc/kyua-debug.1.in                   |   4 +-
 contrib/kyua/doc/kyua-help.1.in                    |   2 +-
 contrib/kyua/doc/kyua-list.1.in                    |   2 +-
 contrib/kyua/doc/kyua-report-html.1.in             |   2 +-
 contrib/kyua/doc/kyua-report-junit.1.in            |   2 +-
 contrib/kyua/doc/kyua-report.1.in                  |   2 +-
 contrib/kyua/doc/kyua-test.1.in                    |   2 +-
 contrib/kyua/doc/kyua.1.in                         |   6 +-
 contrib/kyua/doc/kyua.conf.5.in                    |   2 +-
 contrib/kyua/doc/kyuafile.5.in                     |  18 +-
 contrib/kyua/drivers/Makefile.am.inc               |  72 --
 contrib/kyua/engine/Kyuafile                       |   3 +
 contrib/kyua/engine/Makefile.am.inc                | 155 ----
 contrib/kyua/engine/atf.hpp                        |  21 +-
 contrib/kyua/engine/atf_result.cpp                 |  16 +-
 contrib/kyua/engine/atf_result_test.cpp            |   7 +-
 contrib/kyua/engine/atf_test.cpp                   |   2 +-
 contrib/kyua/engine/config.cpp                     |   4 +-
 contrib/kyua/engine/execenv/execenv.cpp            |   3 -
 contrib/kyua/engine/execenv/execenv.hpp            |   6 +-
 contrib/kyua/engine/execenv/execenv_fwd.hpp        |  44 +
 contrib/kyua/engine/execenv/execenv_host.hpp       |   2 +-
 contrib/kyua/engine/googletest.cpp                 | 219 +++++
 contrib/kyua/engine/googletest.hpp                 |  68 ++
 contrib/kyua/engine/googletest_helpers.cpp         | 330 +++++++
 contrib/kyua/engine/googletest_list.cpp            | 111 +++
 .../atf_helpers.cpp => engine/googletest_list.hpp} |  49 +-
 contrib/kyua/engine/googletest_list_test.cpp       | 208 +++++
 contrib/kyua/engine/googletest_result.cpp          | 528 ++++++++++++
 contrib/kyua/engine/googletest_result.hpp          | 111 +++
 contrib/kyua/engine/googletest_result_fwd.hpp      |  43 +
 contrib/kyua/engine/googletest_result_test.cpp     | 427 +++++++++
 contrib/kyua/engine/googletest_test.cpp            | 361 ++++++++
 contrib/kyua/engine/kyuafile.hpp                   |   5 -
 contrib/kyua/engine/kyuafile_test.cpp              |  10 +-
 contrib/kyua/engine/plain.hpp                      |  13 +-
 contrib/kyua/engine/requirements.cpp               |   4 +-
 contrib/kyua/engine/requirements.hpp               |   4 +-
 contrib/kyua/engine/scheduler.cpp                  |   4 +-
 contrib/kyua/engine/scheduler.hpp                  |  26 +-
 contrib/kyua/engine/scheduler_test.cpp             |  24 +-
 contrib/kyua/engine/tap.hpp                        |  13 +-
 contrib/kyua/examples/Makefile.am.inc              |  45 -
 contrib/kyua/integration/Makefile.am.inc           | 150 ----
 contrib/kyua/integration/cmd_about_test.sh         |   2 +-
 contrib/kyua/integration/cmd_report_test.sh        |   2 +-
 contrib/kyua/integration/cmd_test_test.sh          |   4 +-
 contrib/kyua/integration/helpers/.gitignore        |  11 -
 contrib/kyua/integration/helpers/Makefile.am.inc   |  90 --
 contrib/kyua/integration/utils.sh                  |  34 +-
 contrib/kyua/m4/ax_cxx_compile_stdcxx.m4           | 951 ---------------------
 contrib/kyua/m4/compiler-features.m4               | 122 ---
 contrib/kyua/m4/compiler-flags.m4                  | 169 ----
 contrib/kyua/m4/developer-mode.m4                  | 112 ---
 contrib/kyua/m4/doxygen.m4                         |  62 --
 contrib/kyua/m4/fs.m4                              | 125 ---
 contrib/kyua/m4/getopt.m4                          | 213 -----
 contrib/kyua/m4/memory.m4                          | 122 ---
 contrib/kyua/m4/signals.m4                         |  92 --
 contrib/kyua/m4/uname.m4                           |  63 --
 contrib/kyua/misc/Makefile.am.inc                  |  32 -
 contrib/kyua/model/Makefile.am.inc                 |  89 --
 contrib/kyua/model/README                          |  11 -
 contrib/kyua/model/metadata.cpp                    |   4 +-
 contrib/kyua/os/freebsd/execenv_jail.hpp           |   2 +-
 contrib/kyua/os/freebsd/execenv_jail_stub.cpp      |   2 +-
 contrib/kyua/os/freebsd/reqs_checker_kmods.cpp     |   2 +-
 contrib/kyua/os/freebsd/utils/jail.hpp             |   7 +-
 contrib/kyua/store/Makefile.am.inc                 | 145 ----
 contrib/kyua/store/write_transaction_test.cpp      |   2 +-
 contrib/kyua/utils/.gitignore                      |   2 -
 contrib/kyua/utils/Makefile.am.inc                 | 133 ---
 contrib/kyua/utils/cmdline/Makefile.am.inc         |  96 ---
 contrib/kyua/utils/config/Makefile.am.inc          |  87 --
 contrib/kyua/utils/config/nodes.cpp                |  20 +-
 contrib/kyua/utils/config/nodes.hpp                |   2 +
 contrib/kyua/utils/config/nodes_test.cpp           |  15 +-
 contrib/kyua/utils/defs.hpp.in                     |  15 +-
 contrib/kyua/utils/format/Makefile.am.inc          |  59 --
 contrib/kyua/utils/fs/Makefile.am.inc              |  84 --
 contrib/kyua/utils/fs/directory.cpp                |  13 +-
 contrib/kyua/utils/fs/operations.cpp               | 120 +--
 contrib/kyua/utils/logging/Makefile.am.inc         |  53 --
 contrib/kyua/utils/process/.gitignore              |   1 -
 contrib/kyua/utils/process/Kyuafile                |   1 -
 contrib/kyua/utils/process/Makefile.am.inc         | 118 ---
 contrib/kyua/utils/process/child.hpp               |   4 +-
 contrib/kyua/utils/process/child_test.cpp          |   2 +-
 contrib/kyua/utils/process/executor.cpp            |   2 +
 contrib/kyua/utils/process/executor_pid_test.cpp   | 208 -----
 contrib/kyua/utils/process/executor_test.cpp       |  23 +-
 contrib/kyua/utils/process/isolation.cpp           |   2 +-
 contrib/kyua/utils/process/operations.cpp          |   3 +-
 contrib/kyua/utils/process/operations.hpp          |   6 +-
 contrib/kyua/utils/process/operations_test.cpp     |   4 +-
 contrib/kyua/utils/sanity.hpp                      |   4 +-
 contrib/kyua/utils/signals/Makefile.am.inc         |  73 --
 contrib/kyua/utils/signals/misc_test.cpp           |   2 +-
 contrib/kyua/utils/sqlite/Makefile.am.inc          |  82 --
 contrib/kyua/utils/sqlite/database.hpp             |   1 +
 contrib/kyua/utils/sqlite/test_utils.hpp           |   4 +-
 contrib/kyua/utils/stacktrace.cpp                  |   2 +-
 contrib/kyua/utils/stacktrace_test.cpp             |   9 +-
 contrib/kyua/utils/test_utils.ipp                  |   2 +-
 contrib/kyua/utils/text/Makefile.am.inc            |  74 --
 contrib/kyua/utils/text/operations.ipp             |   1 +
 contrib/kyua/utils/text/regex.cpp                  |   4 +-
 contrib/kyua/utils/text/regex.hpp                  |   1 +
 146 files changed, 3003 insertions(+), 6843 deletions(-)

diff --git a/contrib/kyua/.cirrus.yml b/contrib/kyua/.cirrus.yml
deleted file mode 100644
index 855693b34fa1..000000000000
--- a/contrib/kyua/.cirrus.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-env:
-  ARCH: amd64
-
-task:
-  matrix:
-    - name: 14.0-RELEASE
-      freebsd_instance:
-        image_family: freebsd-14-0
-    - name: 14.0-STABLE
-      freebsd_instance:
-        image_family: freebsd-14-0-snap
-    - name: 13.2-RELEASE
-      freebsd_instance:
-        image_family: freebsd-13-2
-    - name: 13.2-STABLE
-      freebsd_instance:
-        image_family: freebsd-13-2-snap
-  env:
-    DO: distcheck
-  install_script:
-    - sed -i.bak -e 's,pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly,pkg+http://pkg.FreeBSD.org/\${ABI}/latest,' /etc/pkg/FreeBSD.conf
-    - ASSUME_ALWAYS_YES=yes pkg bootstrap -f
-    - pkg install -y autoconf automake atf lutok pkgconf sqlite3
-  script:
-    - ./admin/travis-build.sh
diff --git a/contrib/kyua/.gitignore b/contrib/kyua/.gitignore
deleted file mode 100644
index d7f1a180d6fb..000000000000
--- a/contrib/kyua/.gitignore
+++ /dev/null
@@ -1,23 +0,0 @@
-*.a
-*.o
-*_helpers
-*_inttest
-*_test
-*~
-
-.deps
-.dirstamp
-Doxyfile
-Makefile
-Makefile.in
-aclocal.m4
-api-docs
-autom4te.cache
-config.h
-config.h.in
-config.log
-config.status
-configure
-kyua
-local-kyua
-stamp-h1
diff --git a/contrib/kyua/.travis.yml b/contrib/kyua/.travis.yml
deleted file mode 100644
index 619dceaf3d2d..000000000000
--- a/contrib/kyua/.travis.yml
+++ /dev/null
@@ -1,49 +0,0 @@
-language: cpp
-sudo: required
-
-before_install:
-    - ./admin/travis-install-deps.sh
-
-matrix:
-    include:
-        - os: linux
-          dist: xenial
-          compiler: clang
-          env: ARCH=amd64 DO=distcheck AS_ROOT=no
-        - os: linux
-          dist: xenial
-          compiler: gcc
-          env: ARCH=amd64 DO=distcheck AS_ROOT=no
-        - os: linux
-          dist: xenial
-          compiler: clang
-          env: ARCH=amd64 DO=apidocs
-        - os: linux
-          dist: xenial
-          compiler: clang
-          env: ARCH=amd64 DO=style
-        - os: linux
-          dist: xenial
-          compiler: clang
-          env: ARCH=amd64 DO=distcheck AS_ROOT=yes UNPRIVILEGED_USER=no
-        - os: linux
-          dist: xenial
-          compiler: clang
-          env: ARCH=amd64 DO=distcheck AS_ROOT=yes UNPRIVILEGED_USER=yes
-        # TODO(ngie): reenable i386; the libraries were not available in the
-        #             Ubuntu Xenial x86_64 docker image.
-        #- os: linux
-        #  dist: xenial
-        #  compiler: clang
-        #  env: ARCH=i386 DO=distcheck AS_ROOT=no
-        #- os: linux
-        #  dist: xenial
-        #  compiler: gcc
-        #  env: ARCH=i386 DO=distcheck AS_ROOT=no
-
-script:
-    - ./admin/travis-build.sh
-
-notifications:
-    email:
-        - kyua-log@googlegroups.com
diff --git a/contrib/kyua/Doxyfile.in b/contrib/kyua/Doxyfile.in
index e28d82f8999a..ac1dbf3398b6 100644
--- a/contrib/kyua/Doxyfile.in
+++ b/contrib/kyua/Doxyfile.in
@@ -45,7 +45,6 @@ JAVADOC_AUTOBRIEF = YES
 MACRO_EXPANSION = YES
 OUTPUT_DIRECTORY = @top_builddir@/api-docs
 OUTPUT_LANGUAGE = English
-PREDEFINED += "KYUA_DEFS_NORETURN="
 PREDEFINED += "KYUA_DEFS_FORMAT_PRINTF(x, y)="
 PROJECT_NAME = "@PACKAGE_NAME@"
 PROJECT_NUMBER = @VERSION@
diff --git a/contrib/kyua/FREEBSD-Xlist b/contrib/kyua/FREEBSD-Xlist
new file mode 100644
index 000000000000..06fef93a4024
--- /dev/null
+++ b/contrib/kyua/FREEBSD-Xlist
@@ -0,0 +1,12 @@
+*/*/Makefile*
+*/Makefile*
+*/*.m4
+*/*.pc.in
+INSTALL.md
+Makefile*
+aclocal.m4
+admin/
+config.h.in
+bootstrap/
+configure*
+m4/
diff --git a/contrib/kyua/INSTALL.md b/contrib/kyua/INSTALL.md
deleted file mode 100644
index d3dcab49cb74..000000000000
--- a/contrib/kyua/INSTALL.md
+++ /dev/null
@@ -1,268 +0,0 @@
-Installation instructions
-=========================
-
-Kyua uses the GNU Automake, GNU Autoconf and GNU Libtool utilities as
-its build system.  These are used only when compiling the application
-from the source code package.  If you want to install Kyua from a binary
-package, you do not need to read this document.
-
-For the impatient:
-
-    $ ./configure
-    $ make
-    $ make check
-    Gain root privileges
-    # make install
-    Drop root privileges
-    $ make installcheck
-
-Or alternatively, install as a regular user into your home directory:
-
-    $ ./configure --prefix ~/local
-    $ make
-    $ make check
-    $ make install
-    $ make installcheck
-
-
-Dependencies
-------------
-
-To build and use Kyua successfully you need:
-
-* A standards-compliant C and C++ complier.
-* Lutok 0.4.
-* pkg-config.
-* SQLite 3.6.22.
-
-To build the Kyua tests, you optionally need:
-
-* The Automated Testing Framework (ATF), version 0.15 or greater.  This
-  is required if you want to create a distribution file.
-
-If you are building Kyua from the code on the repository, you will also
-need the following tools:
-
-* GNU Autoconf.
-* GNU Automake.
-* GNU Libtool.
-
-
-Regenerating the build system
------------------------------
-
-This is not necessary if you are building from a formal release
-distribution file.
-
-On the other hand, if you are building Kyua from code extracted from the
-repository, you must first regenerate the files used by the build
-system.  You will also need to do this if you modify `configure.ac`,
-`Makefile.am` or any of the other build system files.  To do this, simply
-run:
-
-    $ autoreconf -i -s
-
-If ATF is installed in a different prefix than Autoconf, you will also
-need to tell autoreconf where the ATF M4 macros are located.  Otherwise,
-the configure script will be incomplete and will show confusing syntax
-errors mentioning, for example, `ATF_CHECK_SH`.  To fix this, you have
-to run autoreconf in the following manner, replacing `<atf-prefix>` with
-the appropriate path:
-
-    $ autoreconf -i -s -I <atf-prefix>/share/aclocal
-
-
-General build procedure
------------------------
-
-To build and install the source package, you must follow these steps:
-
-1. Configure the sources to adapt to your operating system.  This is
-   done using the `configure` script located on the sources' top
-   directory, and it is usually invoked without arguments unless you
-   want to change the installation prefix.  More details on this
-   procedure are given on a later section.
-
-2. Build the sources to generate the binaries and scripts.  Simply run
-   `make` on the sources' top directory after configuring them.  No
-   problems should arise.
-
-3. Check that the built programs work by running `make check`.  You do
-   not need to be root to do this, but if you are not, some checks will
-   be skipped.
-
-4. Install the program by running `make install`.  You may need to
-   become root to issue this step.
-
-5. Issue any manual installation steps that may be required.  These are
-   described later in their own section.
-
-6. Check that the installed programs work by running `make
-   installcheck`.  You do not need to be root to do this, but if you are
-   not, some checks will be skipped.
-
-
-Configuration flags
--------------------
-
-The most common, standard flags given to `configure` are:
-
-* `--prefix=directory`:
-  **Possible values:** Any path.
-  **Default:** `/usr/local`.
-
-  Specifies where the program (binaries and all associated files) will
-  be installed.
-
-* `--sysconfdir=directory`:
-  **Possible values:** Any path.
-  **Default:** `/usr/local/etc`.
-
-  Specifies where the installed programs will look for configuration
-  files.  `/kyua` will be appended to the given path unless
-  `KYUA_CONFSUBDIR` is redefined as explained later on.
-
-* `--help`:
-
-  Shows information about all available flags and exits immediately,
-  without running any configuration tasks.
-
-The following environment variables are specific to Kyua's `configure`
-script:
-
-* `GDB`:
-  **Possible values:** empty, absolute path to GNU GDB.
-  **Default:** empty.
-
-  Specifies the path to the GNU GDB binary that Kyua will use to gather a
-  stack trace of a crashing test program.  If empty, the configure script
-  will try to find a suitable binary for you and, if not found, Kyua will
-  attempt to do the search at run time.
-
-* `KYUA_ARCHITECTURE`:
-  **Possible values:** name of a CPU architecture (e.g. `x86_64`, `powerpc`).
-  **Default:** autodetected; typically the output of `uname -p`.
-
-  Specifies the name of the CPU architecture on which Kyua will run.
-  This value is used at run-time to determine tests that are not
-  applicable to the host system.
-
-* `KYUA_CONFSUBDIR`:
-  **Possible values:** empty, a relative path.
-  **Default:** `kyua`.
-
-  Specifies the subdirectory of the configuration directory (given by
-  the `--sysconfdir` argument) under which Kyua will search for its
-  configuration files.
-
-* `KYUA_CONFIG_FILE_FOR_CHECK`:
-  **Possible values:** none, an absolute path to an existing file.
-  **Default:** none.
-
-  Specifies the `kyua.conf` configuration file to use when running any
-  of the `check`, `installcheck` or `distcheck` targets on this source
-  tree.  This setting is exclusively used to customize the test runs of
-  Kyua itself and has no effect whatsoever on the built product.
-
-* `KYUA_MACHINE`:
-  **Possible values:** name of a machine type (e.g. `amd64`, `macppc`).
-  **Default:** autodetected; typically the output of `uname -m`.
-
-  Specifies the name of the machine type on which Kyua will run.  This
-  value is used at run-time to determine tests that are not applicable
-  to the host system.
-
-* `KYUA_TMPDIR`:
-  **Possible values:** an absolute path to a temporary directory.
-  **Default:** `/tmp`.
-
-  Specifies the path that Kyua will use to create temporary directories
-  in by default.
-
-The following flags are specific to Kyua's `configure` script:
-
-* `--enable-developer`:
-  **Possible values:** `yes`, `no`.
-  **Default:** `yes` in Git `HEAD` builds; `no` in formal releases.
-
-  Enables several features useful for development, such as the inclusion
-  of debugging symbols in all objects or the enforcement of compilation
-  warnings.
-
-  The compiler will be executed with an exhaustive collection of warning
-  detection features regardless of the value of this flag.  However, such
-  warnings are only fatal when `--enable-developer` is `yes`.
-
-* `--with-atf`:
-  **Possible values:** `yes`, `no`, `auto`.
-  **Default:** `auto`.
-
-  Enables usage of ATF to build (and later install) the tests.
-
-  Setting this to `yes` causes the configure script to look for ATF
-  unconditionally and abort if not found.  Setting this to `auto` lets
-  configure perform the best decision based on availability of ATF.
-  Setting this to `no` explicitly disables ATF usage.
-
-  When support for tests is enabled, the build process will generate the
-  test programs and will later install them into the tests tree.
-  Running `make check` or `make installcheck` from within the source
-  directory will cause these tests to be run with Kyua.
-
-* `--with-doxygen`:
-  **Possible values:** `yes`, `no`, `auto` or a path.
-  **Default:** `auto`.
-
-  Enables usage of Doxygen to generate documentation for internal APIs.
-  This documentation is *not* installed and is only provided to help the
-  developer of this package.  Therefore, enabling or disabling Doxygen
-  causes absolutely no differences on the files installed by this
-  package.
-
-  Setting this to `yes` causes the configure script to look for Doxygen
-  unconditionally and abort if not found.  Setting this to `auto` lets
-  configure perform the best decision based on availability of Doxygen.
-  Setting this to `no` explicitly disables Doxygen usage.  And, lastly,
-  setting this to a path forces configure to use a specific Doxygen
-  binary, which must exist.
-
-
-Post-installation steps
------------------------
-
-Copy the `Kyuafile.top` file installed in the examples directory to the
-root of your tests hierarchy and name it `Kyuafile`.  For example:
-
-    # cp /usr/local/share/kyua/examples/Kyuafile.top \
-         /usr/local/tests/Kyuafile
-
-This will allow you to simply go into `/usr/tests` and run the tests
-from there.
-
-
-Run the tests!
---------------
-
-Lastly, after a successful installation, you should periodically run the
-tests from the final location to ensure things remain stable.  Do so as
-follows:
-
-    $ cd /usr/local/kyua && kyua test
-
-The following configuration variables are specific to the 'kyua' test
-suite and can be given to Kyua with arguments of the form
-`-v test_suites.kyua.<variable_name>=<value>`:
-
-* `run_coredump_tests`:
-  **Possible values:** `true` or `false`.
-  **Default:** `true`.
-
-  Avoids running tests that crash subprocesses on purpose to make them
-  dump core.  Such tests are particularly slow on macOS, and it is
-  sometimes handy to disable them for quicker development iteration.
-
-If you see any tests fail, do not hesitate to report them in:
-
-    https://github.com/jmmv/kyua/issues/
-
-Thank you!
diff --git a/contrib/kyua/Makefile.am b/contrib/kyua/Makefile.am
deleted file mode 100644
index d7f3cd27e73b..000000000000
--- a/contrib/kyua/Makefile.am
+++ /dev/null
@@ -1,186 +0,0 @@
-# Copyright 2010 The Kyua Authors.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# * 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.
-# * Neither the name of Google Inc. nor the names of its contributors
-#   may be used to endorse or promote products derived from this software
-#   without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER 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.
-
-ACLOCAL_AMFLAGS = -I m4
-
-CHECK_BOOTSTRAP_DEPS =
-CHECK_KYUA_DEPS =
-CHECK_LOCAL =
-CLEAN_TARGETS =
-DIST_HOOKS =
-PHONY_TARGETS =
-CLEANFILES =
-
-EXTRA_DIST =
-noinst_DATA =
-noinst_LIBRARIES =
-noinst_SCRIPTS =
-
-doc_DATA = AUTHORS CONTRIBUTING.md CONTRIBUTORS LICENSE NEWS.md
-noinst_DATA += INSTALL.md README.md
-EXTRA_DIST += $(doc_DATA) INSTALL.md README.md
-
-if WITH_ATF
-tests_topdir = $(pkgtestsdir)
-
-tests_top_DATA = Kyuafile
-EXTRA_DIST += $(tests_top_DATA)
-endif
-
-include admin/Makefile.am.inc
-include bootstrap/Makefile.am.inc
-include cli/Makefile.am.inc
-include doc/Makefile.am.inc
-include drivers/Makefile.am.inc
-include engine/Makefile.am.inc
-include examples/Makefile.am.inc
-include integration/Makefile.am.inc
-include misc/Makefile.am.inc
-include model/Makefile.am.inc
-include store/Makefile.am.inc
-include utils/Makefile.am.inc
-
-bin_PROGRAMS = kyua
-kyua_SOURCES = main.cpp
-kyua_CXXFLAGS = $(CLI_CFLAGS) $(ENGINE_CFLAGS) $(UTILS_CFLAGS)
-kyua_LDADD = $(CLI_LIBS) $(ENGINE_LIBS) $(UTILS_LIBS)
-
-CHECK_ENVIRONMENT = KYUA_CONFDIR="/non-existent" \
-                    KYUA_DOCDIR="$(abs_top_srcdir)" \
-                    KYUA_EXAMPLESDIR="$(abs_top_srcdir)/examples" \
-                    KYUA_MISCDIR="$(abs_top_srcdir)/misc" \
-                    KYUA_STOREDIR="$(abs_top_srcdir)/store" \
-                    KYUA_STORETESTDATADIR="$(abs_top_srcdir)/store" \
-                    PATH="$(abs_top_builddir):$${PATH}"
-INSTALLCHECK_ENVIRONMENT = KYUA_CONFDIR="/non-existent" \
-                           PATH="$(prefix)/bin:$${PATH}"
-
-# Generate local-kyua, a wrapper shell script to run the just-built 'kyua'
-# binary by pointing it to the possibly not-yet-installed data files in the
-# build tree.
-noinst_SCRIPTS += local-kyua
-CLEANFILES += local-kyua local-kyua.tmp
-local-kyua: Makefile
-	$(AM_V_GEN)echo '#!/bin/sh' >local-kyua.tmp; \
-	echo 'env $(CHECK_ENVIRONMENT) $(TESTS_ENVIRONMENT)' \
-	    '"$(abs_top_builddir)/kyua" \
-	    --config='$(KYUA_CONFIG_FILE_FOR_CHECK)' \
-	    "$${@}"' >>local-kyua.tmp; \
-	chmod +x local-kyua.tmp; \
-	mv -f local-kyua.tmp local-kyua
-
-if WITH_ATF
-CHECK_LOCAL += dump-ulimits check-kyua
-PHONY_TARGETS += check-kyua
-check-kyua: $(CHECK_KYUA_DEPS)
-	@failed=no; \
-	./local-kyua test \
-	    --kyuafile='$(top_srcdir)/Kyuafile' --build-root='$(top_builddir)' \
-	    || failed=yes; \
-	if [ "$${failed}" = yes ]; then \
-	    ./local-kyua report --results-file='$(abs_top_srcdir)' \
-	        --verbose --results-filter=broken,failed; \
-	    exit 1; \
-	fi
-
-installcheck-local: dump-ulimits installcheck-kyua
-PHONY_TARGETS += installcheck-kyua
-installcheck-kyua:
-	@failed=no; \
-	cd $(pkgtestsdir) && $(INSTALLCHECK_ENVIRONMENT) $(TESTS_ENVIRONMENT) \
-	    kyua --config='$(KYUA_CONFIG_FILE_FOR_CHECK)' test \
-	    || failed=yes; \
-	if [ "$${failed}" = yes ]; then \
-	    cd $(pkgtestsdir) && $(INSTALLCHECK_ENVIRONMENT) \
-	        $(TESTS_ENVIRONMENT) \
-	        kyua --config='$(KYUA_CONFIG_FILE_FOR_CHECK)' report \
-	        --verbose --results-filter=broken,failed; \
-	    exit 1; \
-	fi
-
-# TODO(jmmv): kyua should probably be recording this information itself as part
-# of the execution context, just as we record environment variables.
-PHONY_TARGETS += dump-ulimits
-dump-ulimits:
-	@echo "Resource limits:"
-	@{ \
-	    ulimit -a | sed -e 's,$$, (soft),'; \
-	    ulimit -a -H | sed -e 's,$$, (hard),'; \
-	} | sort | sed -e 's,^,    ,'
-	@echo
-else
-DIST_HOOKS += forbid-dist
-PHONY_TARGETS += forbid-dist
-forbid-dist:
-	@echo "Sorry; cannot make dist without atf."
-	@false
-endif
-check-local: $(CHECK_LOCAL)
-
-if WITH_DOXYGEN
-# Runs doxygen on the source tree and validates the contents of the docstrings.
-# We do not do this by default, even if doxygen has been enabled, because this
-# step takes a long time.  Instead, we just rely on a Travis CI build to catch
-# inconsistencies.
-PHONY_TARGETS += check-api-docs
-check-api-docs: api-docs/api-docs.tag
-	@$(AWK) -f $(srcdir)/admin/check-api-docs.awk api-docs/doxygen.out
-
-api-docs/api-docs.tag: $(builddir)/Doxyfile $(SOURCES)
-	@$(MKDIR_P) api-docs
-	@rm -f api-docs/doxygen.out api-docs/doxygen.out.tmp
-	$(AM_V_GEN)$(DOXYGEN) $(builddir)/Doxyfile \
-	    >api-docs/doxygen.out.tmp 2>&1 && \
-	    mv api-docs/doxygen.out.tmp api-docs/doxygen.out
-
-CLEAN_TARGETS += clean-api-docs
-clean-api-docs:
-	rm -rf api-docs
-endif
-
-# Replace Automake's builtin check-news functionality so that we can validate
-# the NEWS.md file instead of NEWS.
-DIST_HOOKS += check-news
-PHONY_TARGETS += check-news
-check-news:
-	@case "$$(sed 15q "$(srcdir)/NEWS.md")" in \
-	*"$(VERSION)"*) : ;; \
-	*) \
-	    echo "NEWS.md not updated; not releasing" 1>&2; \
-	    exit 1 \
-	    ;; \
-	esac
-
-clean-local: $(CLEAN_TARGETS)
-dist-hook: $(DIST_HOOKS)
-
-PHONY_TARGETS += clean-all
-clean-all:
-	GIT="$(GIT)" $(SH) $(srcdir)/admin/clean-all.sh
-
-.PHONY: $(PHONY_TARGETS)
diff --git a/contrib/kyua/NEWS.md b/contrib/kyua/NEWS
similarity index 85%
rename from contrib/kyua/NEWS.md
rename to contrib/kyua/NEWS
index 304cfe94695a..c794e6e60092 100644
--- a/contrib/kyua/NEWS.md
+++ b/contrib/kyua/NEWS
@@ -1,17 +1,119 @@
-Major changes between releases
-==============================
+# Major changes between releases
 
+## Changes in version 0.15.0
 
-Changes in version 0.14
------------------------
+**Released on 2026/10/07.**
 
-**NOT RELEASED YET; STILL UNDER DEVELOPMENT.**
+### Bugfixes
 
-* Explicitly require C++11 language features when compiling Kyua.
+* #265: Null cleanups
+* #271: kyua: Try harder to delete directories.
+* #300: Implement utils::config::positive_int_node::deep_copy
 
+### Developer Workflow Changes
 
-Changes in version 0.13
------------------------
+* #254: Add initial GitHub Actions support for kyua
+* #288: [CI] remove legacy CI scripts and files
+* #291: Remove Travis CI config
+* #298: Add sanitizers and code coverage support
+* #301: Add FreeBSD CI support via vmactions
+* #305: Automate uploading release assets
+
+### Feature Enhancements
+
+* #203: Add GoogleTest support
+* #230: Do not count skipped as passed in test cmd
+* #260: Support require.diskspace ATF metadata
+* #261: Pass unprivileged user config prop to ATF using all known names
+* #266: Add "kyua debug -p" option
+* #270: Add required_kmods metadata
+* #272: Make "test" command actually report about workdir cleanup issues
+* #273: Make "debug -p" skip writing stdout/stderr to tmp files
+* #277: kyua-debug: Add -P option
+* #290: Require C++-20 in order to build kyua
+* #307: Upstream multiple items from FreeBSD
+
+### Documentation
+
+* #258: kyuafile.5: Add ATF metadata mapping reference
+* #275: kyua manuals: Correct --results-file short form
+* #279: docs: Standardize document description tone
+
+### Miscellaneous
+
+* #264: Switch from std::auto_ptr<> to std::unique_ptr<>
+* #269: Fix cmd_about_test:topic__version test case
+* #297: Reduce overall lutok dependency
+* #312: Replace KYUA_ATTRIBUTE_{NORETURN,UNUSED}} with C++ attributes
+* #318: utils::fs: remove umount(8) support
+
+**Full Changelog**: https://github.com/freebsd/lutok/compare/kyua-0.14.1...kyua-0.15.0
+
+## Changes in version 0.14.1
+
+**Released on March 29th, 2025.**
+
+* Issue #263: fix release tarball by relying on `make dist`.
+
+* Document ATF to Kyua mappings for metadata properties.
+
+* Support `require.diskspace` ATF metadata property.
+
+* Support backwards compatible `unprivileged_user` metadata property for ease
+  of use dealing with ATF vs Kyua.
+
+* Fix building from source by tracking `utils/process/Kyuafile.in` and
+  `engine/execenv/execenv_fwd.hpp` with automake.
+
+## Changes in version 0.14
+
+**Released on December 31st, 2024.**
+
+* Replace `--with-atf` with `--enable-atf`. The latter must be specified
+  to enable ATF support and the Kyua tests by proxy.
+
+* Require newer versions of ATF (0.21) and Lutok (0.5). This is being done
+  as part of a multi-phase deprecation of pre-C++11 environments.
+
+* Vendor the ATF m4 files from the freebsd/atf repo.
+
+* Translate `is_exclusive` metadata to its ATF counterpart.
+
+* Issue #236: fix accidental test forkbomb in specific user environments
+  with `integration` tests by avoiding infinite recursion calling kyua.
+
+* Fix the build on Ubuntu 24.04.
+
+- execenv support added. This FreeBSD-specific feature allows tests to be
+  executed in jails.
+
+* Issue #169: Remove deprecated `readdir_r` use.
+
+* Fix build issue on more recent versions of MacOS.
+
+* Fix build issue on IllumOS.
+
+* Fix issues with PID reuse in testcases.
+
+* Escape characters captured from stderr and stdout in HTML output.
+
+* `integration/cmd_report_test:verbose`: fix regular expression used in
+  tests which would break in certain user environments.
+
+* Add Cirrus CI support for testing Kyua on FreeBSD.
+
+* Remove `UTILS_UNUSED_PARAM` macro.
+
+* Fix document rendering with newer versions of doxygen.
+
+* Issue #152: explicitly require C++11 language features when compiling Kyua.
+  Remove `std::shared_ptr` compatibility header, `utils/shared_ptr.hpp`.
+
+* Fix `igor` and `mandoc -Tlint` reported issues with generated manpages.
+
+* Issue #167: fix typos in kyua(1) manpage.
+
+## Changes in version 0.13
 
 **Released on August 26th, 2016.**
 
@@ -36,8 +138,7 @@ Changes in version 0.13
   timers to control test deadlines.
 
 
-Changes in version 0.12
------------------------
+## Changes in version 0.12
 
 **Released on November 22nd, 2015.**
 
@@ -129,8 +230,7 @@ parallelization possibilities.
   Markdown for better formatting online.
 
 
-Changes in version 0.11
------------------------
+## Changes in version 0.11
 
 **Released on October 23rd, 2014.**
 
@@ -211,8 +311,7 @@ Changes in version 0.11
   examples.
 
 
-Changes in version 0.10
------------------------
+## Changes in version 0.10
 
 **Experimental version released on August 14th, 2014.**
 
@@ -232,8 +331,7 @@ Changes in version 0.10
   prevent triggering a core dump that made the test fail in some platforms.
 
 
-Changes in kyua-cli version 0.9
--------------------------------
+## Changes in kyua-cli version 0.9
 
 **Experimental version released on August 8th, 2014.**
 
@@ -276,8 +374,7 @@ Changes in more detail:
   files.
 
 
-Changes in kyua-testers version 0.3
------------------------------------
+## Changes in kyua-testers version 0.3
 
 **Experimental version released on August 8th, 2014.**
 
@@ -293,8 +390,7 @@ Changes in kyua-testers version 0.3
   handle test programs that report a pass but exit with a non-zero code.
 
*** 10874 LINES SKIPPED ***

From nobody Mon Nov 23 01:18:35 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXp3v5lWJz71TGj
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:18: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp3v4ZhDz4bv8
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:35 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795396715;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=RQ9VVOOSkgPu/F/mKjDLviLTINv7RWJoGlKQuL0Jw+M=;
	b=MMIzZMnVB6KA0o/Ij9Y2V/lZd7m3Wwg52TP4NGmizabngiZvHwacl3EXBVcMSQCqxdBbJO
	Q1GU4Q+nETIXoamWF0Mi7XSSc/cttWOnHG1TkKdpYBKjDhhu4eKkokvGmLqEO38gnjRtK+
	AskHB3gieyOJNC1BvfbeWNN3Y4kKQyXvvBVqXUjrQYPkh/UsnKEAnrXW2tF+L3u7BQGeZp
	8wyf7aQkAkoMB/GCfnvtXUS8bd7MjgDS9+ikplGMnnZBi8apXKzhU6mS+3m3rsqTMz+ior
	3aW1g3//yZtJ173N81ak7pu0pbn/xYmmYrUnqTo1C9Hj1fl+kFibsIAm2HgRng==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396715;
	b=uOuoi73o5r8HJ8S0pADT9AQgNpA5ojoQ+wWVGdXO9vVncE8RYAEwouJ4kYD69UW41F2vie
	MGSS1hmDej6BJef8azQD/lVbGNBIkI31qXG/si44yvLDz+WkoBYoz1mIkxNwaLq3VDqnBV
	Ojtl+cr86dGMOwrN659JTLqTLjTKNER5lcZcOKksQvoFyg6tdjKgPv4qKTrpGKlpDCLwsi
	JfOmS/ngoW3jmBO625zl8AiPlRj3kpM+gDFWwiYrej5Up5X0ryg9X4JPLJR3iRiKDDsrrH
	ms/s6mYWjytPFJWD1vY3osW4deORWBwcXGgY6twH6aSg8IzzS4mBbb4PWIIyCg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795396715;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=RQ9VVOOSkgPu/F/mKjDLviLTINv7RWJoGlKQuL0Jw+M=;
	b=FsRWzYtyHz4w5uxeWJS4Fl/WMA7iFRGZv3NWyEKkaQdmyONm/y6vxoKMXBt4ylaP6EKkU+
	3ZUxZtH5ITKmSZN3RQbYYvBAFgzV30WlvTp66bSSwVR/38ILAs5Wjsy8SL6S+vyM7f4PDJ
	rcHQEnOkAFbdGviwN5bJiXekOup4SrUujSrFgbDEH+C0jKAIszC5QJpxa6XcvyDjUa3iHS
	cDY9n3cXokJeRspRRoxE49/TdYrU7CuvgnjvER/fExiH6dCQS8BWyxlRn29V4/LAjkinUa
	Yzi2WRmH2JnJyxTEp+fwPgv5y0HG3xsJ7mLjpfzGYh3ip56l6BbWq6Z88QhLGg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp3v3xH7zS2C
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:35 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 2d4e
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:18:35 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: fd5c67bde707 - stable/15 - contrib/kyua: commit Makefile changes for version update
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: fd5c67bde70740a3d9a409205e11e78d82f207fc
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:18:35 +0000
Message-Id: <6b03946b.2d4e.988b549@gitrepo.freebsd.org>

The branch stable/15 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=fd5c67bde70740a3d9a409205e11e78d82f207fc

commit fd5c67bde70740a3d9a409205e11e78d82f207fc
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-10-07 17:55:21 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:17:39 +0000

    contrib/kyua: commit Makefile changes for version update
    
    This was accidentally missed in the version update.
    
    MFC after:      1 month
    Fixes: eb8f69902 ("contrib/kyua: update to 0.15.0")
    
    (cherry picked from commit b836604e126d5b3d0d3dee5da6c4168d3ec43fea)
---
 usr.bin/kyua/Makefile | 25 ++++---------------------
 1 file changed, 4 insertions(+), 21 deletions(-)

diff --git a/usr.bin/kyua/Makefile b/usr.bin/kyua/Makefile
index 82a2b0d03821..192a4e68734a 100644
--- a/usr.bin/kyua/Makefile
+++ b/usr.bin/kyua/Makefile
@@ -5,7 +5,6 @@ KYUA_DOCDIR=	/usr/share/doc/kyua
 KYUA_EGDIR=	/usr/share/examples/kyua
 KYUA_MISCDIR=	/usr/share/kyua/misc
 KYUA_STOREDIR=	/usr/share/kyua/store
-KYUA_VERSION=	0.13
 
 KYUA_SRCDIR=	${SRCTOP}/contrib/kyua
 .PATH: ${KYUA_SRCDIR}
@@ -15,6 +14,7 @@ PROG_CXX=	kyua
 SRCS=		main.cpp
 LIBADD=		lutok sqlite3 util
 
+.PATH: ${KYUA_SRCDIR}/doc
 MAN=		kyua-about.1 \
 		kyua-config.1 \
 		kyua-db-exec.1 \
@@ -44,10 +44,6 @@ CFLAGS+=	-DGDB=\"/usr/local/bin/gdb\"			\
 		-DKYUA_MISCDIR=\"${KYUA_MISCDIR}\"		\
 		-DKYUA_PLATFORM=\"${MACHINE}\"			\
 		-DKYUA_STOREDIR=\"${KYUA_STOREDIR}\"		\
-		-DPACKAGE=\"kyua\"				\
-		-DPACKAGE_NAME=\"Kyua\"				\
-		-DPACKAGE_VERSION=\"${KYUA_VERSION}\"		\
-		-DVERSION=\"${KYUA_VERSION}\"
 
 CXXWARNFLAGS.gcc+=	-Wno-free-nonheap-object
 
@@ -120,6 +116,9 @@ SRCS+=	engine/atf.cpp			\
 	engine/config.cpp		\
 	engine/exceptions.cpp		\
 	engine/filters.cpp		\
+	engine/googletest.cpp		\
+	engine/googletest_list.cpp	\
+	engine/googletest_result.cpp	\
 	engine/kyuafile.cpp		\
 	engine/plain.cpp		\
 	engine/requirements.cpp		\
@@ -205,20 +204,4 @@ STOREDIR=	${KYUA_STOREDIR}
 STORETAGS=	package=tests
 .PATH:		${KYUA_SRCDIR}/store
 
-CLEANFILES+=	${MAN}
-.PATH: ${KYUA_SRCDIR}/doc
-.for man in ${MAN}
-${man}: ${man}.in
-	sh ${KYUA_SRCDIR}/doc/manbuild.sh \
-	    -v "CONFDIR=${KYUA_CONFDIR}" \
-	    -v "DOCDIR=${KYUA_DOCDIR}" \
-	    -v "EGDIR=${KYUA_EGDIR}" \
-	    -v "MISCDIR=${KYUA_MISCDIR}" \
-	    -v "PACKAGE=kyua" \
-	    -v "STOREDIR=${KYUA_STOREDIR}" \
-	    -v "TESTSDIR=${TESTSBASE}" \
-	    -v "VERSION=${KYUA_VERSION}" \
-	    ${.ALLSRC} ${.TARGET}
-.endfor
-
 .include <bsd.prog.mk>

From nobody Mon Nov 23 01:18:36 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXp3x0PHjz71TZ1
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:18: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp3w4fM4z4bmk
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:36 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795396716;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=jEyF9sgfPoYcP5LoIAX7MRAmGFMHLrbkTbu1I6/t4ck=;
	b=ZGbjSTLXdKJHETctP2VDFDlzaHYK6HpoQLbHCMGhuoIBhiMTjSAUPgWFBOw7W09b7roz4P
	7AfPe7r0oJWKQDOlkwlcm6SYw373chlIL6Ih91Az9feNLvzDsLA+808MouF5rc1zMXb3V3
	zmhTtHPdUZLrkHil5jVEtMRhtPb08qkjwOOcCzbP+n2kvCCPB5Y2DwH/nogI1BY6l9jYYd
	0YVgWjJzGFxHrovPSdalY50+64sz51LPBRjMb2uQfuNymv/HzXGyLXGdsvqn7jz9l12U0B
	F6pBZNS8j+0nWd2/mD4Oserd2gu/Zos0bHDOaxm9zYAWPbYMj+fhme47ZFieow==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396716;
	b=DrvEak/zTk3qYBn8Na+3QsmiFyjGlBrVOsp4nC5zA3OKNRNDnyhZQo3jJPDsJMQeZWXXu7
	glZPaArSwdTM6wNi1ohU2W2cCIzCCLAuSaQT0fTmAicAFCHgxY5Zd4VIfVqE6c1+Ke0cis
	OlJkTcaKsMBhiifDTIHCfdz4v0kUJAFcmd7Ao5ZByWEngGOayqVaxoSvyED7AzjY/7p0fJ
	LqjZGig0N26DHqB1ZFE141o5oQPbVJ9VvxxwmoLeLw/6pjM/O0vYs4zSHLzZzMPSVMtDXx
	DIazeLc6VAccY53hQSzED5vWW672NcDKkXngn8tH5cWOusfIVj7L2yQm+VVQRw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795396716;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=jEyF9sgfPoYcP5LoIAX7MRAmGFMHLrbkTbu1I6/t4ck=;
	b=dHNH0gwgvYliOQDdsLq6JYwYZ/W2VF45xCpc5MmVp4MMQ31OL4mYH8GVbK8S1eYj9AJrv4
	sx/lDZR14w/VkJFawcgLP9bgA4DnKEAklp9xsie5g5DPLqp4kPwCBjulk0QPS1EYvil3jc
	GtRiTzwo7NMRUDH9JFxI/UCzq0c0JIfnOX7MhLz0KYC7498cH+bU5RQaud8HICog3itevt
	npu+l+i9xK9k1HIIbT12Pf4//Cfbv0vVrxxKisu7ojDjMnXfUN0mXeM3A37M3k0hdKcd1N
	vgWXUmQOcb+D1kA9viTyyEsLfASDTkZ4qGh4zdgMKHwerd+MTRPrRsVvV8EGbw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp3w4C2WzSKF
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:36 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1dee
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:18:36 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 5b6a6588388d - stable/15 - contrib/kyua: commit generated files
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 5b6a6588388dee241f5ffe84c768887cc9ae4eb6
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:18:36 +0000
Message-Id: <6b03946c.1dee.5e2419bd@gitrepo.freebsd.org>

The branch stable/15 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=5b6a6588388dee241f5ffe84c768887cc9ae4eb6

commit 5b6a6588388dee241f5ffe84c768887cc9ae4eb6
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-10-07 18:04:21 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:17:39 +0000

    contrib/kyua: commit generated files
    
    MFC after:      1 month
    Fixes: eb8f69902 ("contrib/kyua: update to 0.15.0")
    
    (cherry picked from commit 26eb328b52c3ec0ff79c8914b1993dfad03a0a7d)
---
 contrib/kyua/doc/kyua-about.1        |  95 ++++++
 contrib/kyua/doc/kyua-config.1       |  59 ++++
 contrib/kyua/doc/kyua-db-exec.1      | 199 ++++++++++++
 contrib/kyua/doc/kyua-db-migrate.1   | 182 +++++++++++
 contrib/kyua/doc/kyua-debug.1        | 417 +++++++++++++++++++++++++
 contrib/kyua/doc/kyua-help.1         |  64 ++++
 contrib/kyua/doc/kyua-list.1         | 232 ++++++++++++++
 contrib/kyua/doc/kyua-report-html.1  | 253 +++++++++++++++
 contrib/kyua/doc/kyua-report-junit.1 | 237 +++++++++++++++
 contrib/kyua/doc/kyua-report.1       | 307 +++++++++++++++++++
 contrib/kyua/doc/kyua-test.1         | 498 ++++++++++++++++++++++++++++++
 contrib/kyua/doc/kyua.1              | 405 ++++++++++++++++++++++++
 contrib/kyua/doc/kyua.conf.5         | 150 +++++++++
 contrib/kyua/doc/kyuafile.5          | 574 +++++++++++++++++++++++++++++++++++
 14 files changed, 3672 insertions(+)

diff --git a/contrib/kyua/doc/kyua-about.1 b/contrib/kyua/doc/kyua-about.1
new file mode 100644
index 000000000000..ba3041f14447
--- /dev/null
+++ b/contrib/kyua/doc/kyua-about.1
@@ -0,0 +1,95 @@
+.\" Copyright 2012 The Kyua Authors.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are
+.\" met:
+.\"
+.\" * Redistributions of source code must retain the above copyright
+.\"   notice, this list of conditions and the following disclaimer.
+.\" * 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.
+.\" * Neither the name of Google Inc. nor the names of its contributors
+.\"   may be used to endorse or promote products derived from this software
+.\"   without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" OWNER 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.
+.Dd May 20, 2015
+.Dt KYUA-ABOUT 1
+.Os
+.Sh NAME
+.Nm "kyua about"
+.Nd show detailed authors, license, and version information
+.Sh SYNOPSIS
+.Nm
+.Op Ar authors | license | version
+.Sh DESCRIPTION
+The
+.Sq about
+command provides generic information about the
+.Xr kyua 1
+tool.
+In the default synopsis form (no arguments), the information printed
+includes:
+.Bl -enum
+.It
+The name of the package, which is
+.Sq kyua .
+.It
+The version number, which is
+.Sq 0.15.0 .
+.It
+License information.
+.It
+Authors information.
+.It
+A link to the project web site.
+.El
+.Pp
+You can customize the information printed by this command by specifying
+the desired topic as the single argument to the command.
+This can be one of:
+.Bl -tag -width authorsXX
+.It Ar authors
+Displays the list of authors and contributors only.
+.It Ar license
+Displays the license information and the list of copyrights.
+.It Ar version
+Displays the package name and the version number in a format that is
+compatible with the output of GNU tools that support a
+.Fl -version
+flag.
+Use this whenever you have to query the version number of the package.
+.El
+.Sh FILES
+The following files are read by the
+.Nm
+command:
+.Bl -tag -width XX
+.It Pa /usr/share/doc/kyua/AUTHORS
+List of authors (aka copyright holders).
+.It Pa /usr/share/doc/kyua/CONTRIBUTORS
+List of contributors (aka individuals that have contributed to the project).
+.It Pa /usr/share/doc/kyua/LICENSE
+License information.
+.El
+.Sh EXIT STATUS
+The
+.Nm
+command always returns 0.
+.Pp
+Additional exit codes may be returned as described in
+.Xr kyua 1 .
+.Sh SEE ALSO
+.Xr kyua 1
diff --git a/contrib/kyua/doc/kyua-config.1 b/contrib/kyua/doc/kyua-config.1
new file mode 100644
index 000000000000..ae08ad9e013a
--- /dev/null
+++ b/contrib/kyua/doc/kyua-config.1
@@ -0,0 +1,59 @@
+.\" Copyright 2012 The Kyua Authors.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are
+.\" met:
+.\"
+.\" * Redistributions of source code must retain the above copyright
+.\"   notice, this list of conditions and the following disclaimer.
+.\" * 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.
+.\" * Neither the name of Google Inc. nor the names of its contributors
+.\"   may be used to endorse or promote products derived from this software
+.\"   without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" OWNER 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.
+.Dd September 9, 2012
+.Dt KYUA-CONFIG 1
+.Os
+.Sh NAME
+.Nm "kyua config"
+.Nd inspect the values of the loaded configuration
+.Sh SYNOPSIS
+.Nm
+.Op Ar variable1 .. variableN
+.Sh DESCRIPTION
+The
+.Nm
+command provides a way to list all defined configuration variables and
+their current values.
+.Pp
+This command is intended to help you in resolving the values of the
+configuration variables without having to scan over configuration files.
+.Pp
+In the default synopsis form (no arguments), the command prints all
+configuration variables.
+If any arguments are provided, the command will only print the
+requested variables.
+.Sh EXIT STATUS
+The
+.Nm
+command returns 0 on success or 1 if any of the specified configuration
+variables does not exist.
+.Pp
+Additional exit codes may be returned as described in
+.Xr kyua 1 .
+.Sh SEE ALSO
+.Xr kyua 1
diff --git a/contrib/kyua/doc/kyua-db-exec.1 b/contrib/kyua/doc/kyua-db-exec.1
new file mode 100644
index 000000000000..8769ac534aa3
--- /dev/null
+++ b/contrib/kyua/doc/kyua-db-exec.1
@@ -0,0 +1,199 @@
+.\" Copyright 2012 The Kyua Authors.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are
+.\" met:
+.\"
+.\" * Redistributions of source code must retain the above copyright
+.\"   notice, this list of conditions and the following disclaimer.
+.\" * 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.
+.\" * Neither the name of Google Inc. nor the names of its contributors
+.\"   may be used to endorse or promote products derived from this software
+.\"   without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" OWNER 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.
+.Dd October 13, 2014
+.Dt KYUA-DB-EXEC 1
+.Os
+.Sh NAME
+.Nm "kyua db-exec"
+.Nd execute a SQL statement in a results file
+.Sh SYNOPSIS
+.Nm
+.Op Fl -no-headers
+.Op Fl -results-file Ar file
+.Ar statement
+.Sh DESCRIPTION
+The
+.Nm
+command provides a way to execute an arbitrary SQL statement within the
+database.
+This command is mostly intended to aid in debugging, but can also be used to
+extract information from the database when the current interfaces do not
+provide the desired functionality.
+.Pp
+The input database must exist.
+It makes no sense to use
+.Nm
+on a nonexistent or empty database.
+.Pp
+The
+.Nm
+command takes one or more arguments, all of which are concatenated to form
+a single SQL statement.
+Once the statement is executed,
+.Nm
+prints the resulting table on the screen, if any.
+.Pp
+The following subcommand options are recognized:
+.Bl -tag -width XX
+.It Fl -no-headers
+Avoids printing the headers of the table in the output of the command.
+.It Fl -results-file Ar path , Fl r Ar path
+.\" Copyright 2014 The Kyua Authors.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are
+.\" met:
+.\"
+.\" * Redistributions of source code must retain the above copyright
+.\"   notice, this list of conditions and the following disclaimer.
+.\" * 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.
+.\" * Neither the name of Google Inc. nor the names of its contributors
+.\"   may be used to endorse or promote products derived from this software
+.\"   without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" OWNER 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.
+Specifies the results file to operate on.
+Defaults to
+.Sq LATEST ,
+which causes
+.Nm
+to automatically load the latest results file from the current test suite.
+.Pp
+The following values are accepted:
+.Bl -tag -width XX
+.It Sq LATEST
+Requests the load of the latest results file available for the test suite rooted
+at the current directory.
+.It Directory
+Requests the load of the latest results file available for the test suite rooted
+at the given directory.
+.It Test suite name
+Requests the load of the latest results file available for the given test suite.
+.It Results identifier
+Requests the load of a specific results file.
+.It Explicit file name (aka everything else)
+Load the specified results file.
+.El
+.Pp
+See
+.Sx Results files
+for more details.
+.El
+.Ss Results files
+.\" Copyright 2014 The Kyua Authors.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are
+.\" met:
+.\"
+.\" * Redistributions of source code must retain the above copyright
+.\"   notice, this list of conditions and the following disclaimer.
+.\" * 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.
+.\" * Neither the name of Google Inc. nor the names of its contributors
+.\"   may be used to endorse or promote products derived from this software
+.\"   without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" OWNER 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.
+Results files contain, as their name implies, the results of the execution of a
+test suite.
+Each test suite executed by
+.Xr kyua-test 1
+generates a new results file, and such results files can be loaded later on by
+inspection commands such as
+.Xr kyua-report 1
+to analyze their contents.
+.Pp
+Results files support identifier-based lookups and also path name lookups.
+The differences between the two are described below.
+.Pp
+The default naming scheme for the results files provides simple support for
+identifier-based lookups and historical recording of test suite runs.
+Each results file is given an identifier derived from the test suite that
+generated it and the time the test suite was run.
+Kyua can later look up results files by these fields.
+.Pp
+The identifier follows this pattern:
+.Bd -literal -offset indent
+\*(Lttest_suite\*(Gt.\*(LtYYYYMMDD\*(Gt-\*(LtHHMMSS\*(Gt-\*(Ltuuuuuu\*(Gt
+.Ed
+.Pp
+where
+.Sq test_suite
+is the path to the root of the test suite that was run with all slashes replaced
+by underscores and
+.Sq YYYYMMDD-HHMMSS-uuuuuu
+is a timestamp with microsecond resolution.
+.Pp
+When using the default naming scheme, results files are stored in the
+.Pa ~/.kyua/store/
+subdirectory and each file holds a name of the form:
+.Bd -literal -offset indent
+~/.kyua/store/results.\*(Ltidentifier\*(Gt.db
+.Ed
+.Pp
+Results files are simple SQLite databases with the schema described in the
+.Pa /usr/share/kyua/store/schema_v?.sql
+files.
+For details on the schema, please refer to the heavily commented SQL file.
+.Sh EXIT STATUS
+The
+.Nm
+command returns 0 on success or 1 if the SQL statement is invalid or fails
+to run.
+.Pp
+Additional exit codes may be returned as described in
+.Xr kyua 1 .
+.Sh SEE ALSO
+.Xr kyua 1 ,
+.Xr kyua-test 1
diff --git a/contrib/kyua/doc/kyua-db-migrate.1 b/contrib/kyua/doc/kyua-db-migrate.1
new file mode 100644
index 000000000000..177dd0795d10
--- /dev/null
+++ b/contrib/kyua/doc/kyua-db-migrate.1
@@ -0,0 +1,182 @@
+.\" Copyright 2013 The Kyua Authors.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are
+.\" met:
+.\"
+.\" * Redistributions of source code must retain the above copyright
+.\"   notice, this list of conditions and the following disclaimer.
+.\" * 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.
+.\" * Neither the name of Google Inc. nor the names of its contributors
+.\"   may be used to endorse or promote products derived from this software
+.\"   without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" OWNER 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.
+.Dd October 13, 2014
+.Dt KYUA-DB-MIGRATE 1
+.Os
+.Sh NAME
+.Nm "kyua db-migrate"
+.Nd upgrade the schema of an existing results file
+.Sh SYNOPSIS
+.Nm
+.Op Fl -results-file Ar file
+.Sh DESCRIPTION
+The
+.Nm
+command migrates the schema of an existing database to the latest
+version implemented in
+.Xr kyua 1 .
+.Pp
+This operation is not reversible.
+However, a backup of the database is created in the same directory where the
+database lives.
+.Pp
+The following subcommand options are recognized:
+.Bl -tag -width XX
+.It Fl -results-file Ar path , Fl r Ar path
+.\" Copyright 2014 The Kyua Authors.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are
+.\" met:
+.\"
+.\" * Redistributions of source code must retain the above copyright
+.\"   notice, this list of conditions and the following disclaimer.
+.\" * 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.
+.\" * Neither the name of Google Inc. nor the names of its contributors
+.\"   may be used to endorse or promote products derived from this software
+.\"   without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" OWNER 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.
+Specifies the results file to operate on.
+Defaults to
+.Sq LATEST ,
+which causes
+.Nm
+to automatically load the latest results file from the current test suite.
+.Pp
+The following values are accepted:
+.Bl -tag -width XX
+.It Sq LATEST
+Requests the load of the latest results file available for the test suite rooted
+at the current directory.
+.It Directory
+Requests the load of the latest results file available for the test suite rooted
+at the given directory.
+.It Test suite name
+Requests the load of the latest results file available for the given test suite.
+.It Results identifier
+Requests the load of a specific results file.
+.It Explicit file name (aka everything else)
+Load the specified results file.
+.El
+.Pp
+See
+.Sx Results files
+for more details.
+.El
+.Ss Results files
+.\" Copyright 2014 The Kyua Authors.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are
+.\" met:
+.\"
+.\" * Redistributions of source code must retain the above copyright
+.\"   notice, this list of conditions and the following disclaimer.
+.\" * 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.
+.\" * Neither the name of Google Inc. nor the names of its contributors
+.\"   may be used to endorse or promote products derived from this software
+.\"   without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" OWNER 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.
+Results files contain, as their name implies, the results of the execution of a
+test suite.
+Each test suite executed by
+.Xr kyua-test 1
+generates a new results file, and such results files can be loaded later on by
+inspection commands such as
+.Xr kyua-report 1
+to analyze their contents.
+.Pp
+Results files support identifier-based lookups and also path name lookups.
+The differences between the two are described below.
+.Pp
+The default naming scheme for the results files provides simple support for
+identifier-based lookups and historical recording of test suite runs.
+Each results file is given an identifier derived from the test suite that
+generated it and the time the test suite was run.
+Kyua can later look up results files by these fields.
+.Pp
+The identifier follows this pattern:
+.Bd -literal -offset indent
+\*(Lttest_suite\*(Gt.\*(LtYYYYMMDD\*(Gt-\*(LtHHMMSS\*(Gt-\*(Ltuuuuuu\*(Gt
+.Ed
+.Pp
+where
+.Sq test_suite
+is the path to the root of the test suite that was run with all slashes replaced
+by underscores and
+.Sq YYYYMMDD-HHMMSS-uuuuuu
+is a timestamp with microsecond resolution.
+.Pp
+When using the default naming scheme, results files are stored in the
+.Pa ~/.kyua/store/
+subdirectory and each file holds a name of the form:
+.Bd -literal -offset indent
+~/.kyua/store/results.\*(Ltidentifier\*(Gt.db
+.Ed
+.Pp
+Results files are simple SQLite databases with the schema described in the
+.Pa /usr/share/kyua/store/schema_v?.sql
+files.
+For details on the schema, please refer to the heavily commented SQL file.
+.Sh EXIT STATUS
+The
+.Nm
+command returns 0 on success or 1 if the migration fails.
+.Pp
+Additional exit codes may be returned as described in
+.Xr kyua 1 .
+.Sh SEE ALSO
+.Xr kyua 1
diff --git a/contrib/kyua/doc/kyua-debug.1 b/contrib/kyua/doc/kyua-debug.1
new file mode 100644
index 000000000000..760cf097a349
--- /dev/null
+++ b/contrib/kyua/doc/kyua-debug.1
@@ -0,0 +1,417 @@
+.\" Copyright 2012 The Kyua Authors.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are
+.\" met:
+.\"
+.\" * Redistributions of source code must retain the above copyright
+.\"   notice, this list of conditions and the following disclaimer.
+.\" * 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.
+.\" * Neither the name of Google Inc. nor the names of its contributors
+.\"   may be used to endorse or promote products derived from this software
+.\"   without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" OWNER 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.
+.Dd April 18, 2026
+.Dt KYUA-DEBUG 1
+.Os
+.Sh NAME
+.Nm "kyua debug"
+.Nd execute a single test case with facilities for debugging
+.Sh SYNOPSIS
+.Nm
+.Op Fl -build-root Ar path
+.Op Fl -kyuafile Ar file
+.Op Fl -pause-before-cleanup-upon-fail
+.Op Fl -pause-before-cleanup
+.Op Fl -stdout Ar path
+.Op Fl -stderr Ar path
+.Ar test_case
+.Sh DESCRIPTION
+The
+.Nm
+command provides a mechanism to execute a single test case bypassing some
+of the Kyua infrastructure and allowing the user to poke into the execution
+behavior of the test.
+.Pp
+The test case to run is selected by providing a test filter, described below in
+.Sx Test filters ,
+that matches a single test case.
+The test case is executed and its result is printed as the last line of the
+output of the tool.
+.Pp
+The test executed by
+.Nm
+is run under a controlled environment as described in
+.Sx Test isolation .
+.Pp
+At the moment, the
+.Nm
+command allows the following aspects of a test case execution to be
+tweaked:
+.Bl -bullet
+.It
+Redirection of the test case's stdout and stderr to the console (the
+default) or to arbitrary files.
+See the
+.Fl -stdout
+and
+.Fl -stderr
+options below.
+.El
+.Pp
+The following subcommand options are recognized:
+.Bl -tag -width XX
+.It Fl -build-root Ar path
+Specifies the build root in which to find the test programs referenced
+by the Kyuafile, if different from the Kyuafile's directory.
+See
+.Sx Build directories
+below for more information.
+.It Fl -kyuafile Ar file , Fl k Ar file
+Specifies the Kyuafile to process.
+Defaults to
+.Pa Kyuafile
+file in the current directory.
+.It Fl -pause-before-cleanup-upon-fail , Fl p
+Causes Kyua to pause right before the test cleanup routine is invoked if the
+test fails.
+When paused, Kyua waits for input on stdin, and any key press resumes
+execution.
+.sp
+This can be useful for debugging system or end-to-end tests
+which alter the system by creating artifacts such as files, network
+interfaces, routing entries, firewall configuration, containers, etc.
+This flag makes it possible to preserve such artifacts immediately after a test
+failure, simplifying debugging.
+Otherwise, these artifacts would be removed by the test cleanup routine or
+by Kyua built-in cleanup mechanism.
+.It Fl -pause-before-cleanup , Fl P
+The unconditional variant of the previous option.
+This can be helpful for reproducing the infrastructure or fixture of a passing
+test for further development or additional analysis.
+.It Fl -stderr Ar path
+Specifies the file to which to send the standard error of the test
+program's body.
+The default is
+.Pa /dev/stderr ,
+which is a special character device that redirects the output to
+standard error on the console.
+.It Fl -stdout Ar path
+Specifies the file to which to send the standard output of the test
+program's body.
+The default is
+.Pa /dev/stdout ,
+which is a special character device that redirects the output to
+standard output on the console.
+.El
+.Pp
+For example, consider the following Kyua session:
+.Bd -literal -offset indent
+$ kyua test
+kernel/fs:mkdir  ->  passed
+kernel/fs:rmdir  ->  failed: Invalid argument
+
+1/2 passed (1 failed)
+.Ed
+.Pp
+At this point, we do not have a lot of information regarding the
+failure of the
+.Sq kernel/fs:rmdir
+test.
+We can run this test through the
+.Nm
+command to inspect its output a bit closer, hoping that the test case is
+kind enough to log its progress:
+.Bd -literal -offset indent
+$ kyua debug kernel/fs:rmdir
+Trying rmdir('foo')
+Trying rmdir(NULL)
+kernel/fs:rmdir  ->  failed: Invalid argument
+.Ed
+.Pp
+Luckily, the offending test case was printing status lines as it
+progressed, so we could see the last attempted call and we can know match
+the failure message to the problem.
+.Ss Build directories
+.\" Copyright 2012 The Kyua Authors.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are
+.\" met:
+.\"
+.\" * Redistributions of source code must retain the above copyright
+.\"   notice, this list of conditions and the following disclaimer.
+.\" * 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.
+.\" * Neither the name of Google Inc. nor the names of its contributors
+.\"   may be used to endorse or promote products derived from this software
+.\"   without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" OWNER 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.
+.Em Build directories
+(or object directories, target directories, product directories, etc.) is
+the concept that allows a developer to keep the source tree clean from
+build products by asking the build system to place such build products
+under a separate subtree.
+.Pp
+Most build systems today support build directories.
+For example, the GNU Automake/Autoconf build system exposes such concept when
+invoked as follows:
+.Bd -literal -offset indent
+$ cd my-project-1.0
+$ mkdir build
+$ cd build
+$ ../configure
+$ make
+.Ed
+.Pp
+Under such invocation, all the results of the build are left in the
+.Pa my-project-1.0/build/
+subdirectory while maintaining the contents of
+.Pa my-project-1.0/
+intact.
+.Pp
+Because build directories are an integral part of most build systems, and
+because they are a tool that developers use frequently,
+.Nm
+supports build directories too.
+This manifests in the form of
+.Nm
+being able to run tests from build directories while reading the (often
+immutable) test suite definition from the source tree.
+.Pp
+One important property of build directories is that they follow (or need to
+follow) the exact same layout as the source tree.
+For example, consider the following directory listings:
+.Bd -literal -offset indent
+src/Kyuafile
+src/bin/ls/
+src/bin/ls/Kyuafile
+src/bin/ls/ls.c
+src/bin/ls/ls_test.c
+src/sbin/su/
+src/sbin/su/Kyuafile
+src/sbin/su/su.c
+src/sbin/su/su_test.c
+
+obj/bin/ls/
+obj/bin/ls/ls*
+obj/bin/ls/ls_test*
+obj/sbin/su/
+obj/sbin/su/su*
+obj/sbin/su/su_test*
+.Ed
+.Pp
+Note how the directory layout within
+.Pa src/
+matches that of
+.Pa obj/ .
+The
+.Pa src/
+directory contains only source files and the definition of the test suite
+(the Kyuafiles), while the
+.Pa obj/
+directory contains only the binaries generated during a build.
+.Pp
+All commands that deal with the workspace support the
+.Fl -build-root Ar path
+option.
+When this option is provided, the directory specified by the
+option is considered to be the root of the build directory.
+For example, considering our previous fake tree layout, we could invoke
+.Nm
+as any of the following:
+.Bd -literal -offset indent
+$ kyua debug --kyuafile=src/Kyuafile --build-root=obj
+$ cd src && kyua debug --build-root=../obj
+.Ed
+.Ss Test filters
+.\" Copyright 2012 The Kyua Authors.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are
+.\" met:
+.\"
+.\" * Redistributions of source code must retain the above copyright
+.\"   notice, this list of conditions and the following disclaimer.
+.\" * 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.
+.\" * Neither the name of Google Inc. nor the names of its contributors
+.\"   may be used to endorse or promote products derived from this software
+.\"   without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" OWNER 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.
+A
+.Em test filter
+is a string that is used to match test cases or test programs in a test suite.
+Filters have the following form:
+.Bd -literal -offset indent
+test_program_name[:test_case_name]
+.Ed
+.Pp
+Where
+.Sq test_program_name
+is the name of a test program or a subdirectory in the test suite, and
+.Sq test_case_name
+is the name of a test case.
+.Ss Test isolation
+.\" Copyright 2014 The Kyua Authors.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are
+.\" met:
+.\"
+.\" * Redistributions of source code must retain the above copyright
+.\"   notice, this list of conditions and the following disclaimer.
+.\" * 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.
+.\" * Neither the name of Google Inc. nor the names of its contributors
+.\"   may be used to endorse or promote products derived from this software
+.\"   without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" OWNER 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.
+The test programs and test cases run by
+.Nm
+are all executed in a deterministic environment.
+This known, clean environment serves to make the test execution as
+reproducible as possible and also to prevent clashes between tests that may,
+for example, create auxiliary files with overlapping names.
+.Pp
+For plain test programs and for TAP test programs, the whole test program
+is run under a single instance of the environment described in this page.
+For ATF test programs (see
+.Xr atf 7 ) ,
+each individual test case
+.Em and
+test cleanup routine are executed in separate environments.
+.Bl -tag -width XX
+.It Process space
+Each test is executed in an independent processes.
+Corollary: the test can do whatever it wants to the current process (such
+as modify global variables) without having to undo such changes.
+.It Session and process group
+The test is executed in its own session and its own process group.
+There is no controlling terminal attached to the session.
+.Pp
+Should the test spawn any children, the children should maintain the same
+session and process group.
+Modifying any of these settings prevents
+.Nm
+from being able to kill any stray subprocess as part of the cleanup phase.
+If modifying these settings is necessary, or if any subprocess started by
+the test decides to use a different process group or session, it is the
+responsibility of the test to ensure those subprocesses are forcibly
+terminated during cleanup.
+.It Work directory
+The test is executed in a temporary directory automatically created by the
+runtime engine.
+Corollary: the test can write to its current directory
+without needing to clean any files and/or directories it creates.
+The runtime engine takes care to recursively delete the temporary directories
+after the execution of a test case.
+Any file systems mounted within the temporary directory are also unmounted.
+.It Home directory
+The
+.Va HOME
+environment variable is set to the absolute path of the work directory.
+.It Umask
+The value of the umask is set to 0022.
+.It Environment
+The
+.Va LANG ,
+.Va LC_ALL ,
+.Va LC_COLLATE ,
+.Va LC_CTYPE ,
+.Va LC_MESSAGES ,
+.Va LC_MONETARY ,
+.Va LC_NUMERIC
+and
+.Va LC_TIME
+variables are unset.
+.Pp
+The
+.Va TZ
+variable is set to
+.Sq UTC .
+.Pp
+The
+.Va TMPDIR
+variable is set to the absolute path of the work directory.
*** 2802 LINES SKIPPED ***

From nobody Mon Nov 23 01:18:38 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXp3z10F9z71TPZ
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:18: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp3y5Pm8z4bpx
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:38 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795396718;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=UtZUZOay4Q6R+YzBBj/ej0rBQ+5UetzFC/BNt6c9bNI=;
	b=iCFQRWBALGCOj4upwYS7Qo1ma0WzrcptcN/+xV4WxtjiGtfb4+nnRV61P/cGyjqHS6DWRk
	J71OCmYltvlLwYPJfAIFNiNDwb852aszsLo6OuTgX73FiAsrayNb7k503r2qkcmNeMvaY9
	4ki1bX2Ik/nsYhWP9COHDKZfHGH0bxeIiFpIy89syQgjzlVFdTRlRGNHEycwKDnSUzMLXc
	FfFkOz7ABz8qE1oE9g3yVO1QFfdkVenLHW2JTmyWyM6K7iW+FzCaZ2Fh5DdY4IbAh7TtDa
	7XEbSA8Zxn5dvIeB8yfppUY8xag+ZmZ9p0+CIdiSDk9Hk5RSSsKBmNGPjXWwFw==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396718;
	b=xJMosJB29m+ZV6yv4Se1BBcmM8UTwsCL633+U+QsXReElcdPwDJynu5FLdsCAxluqbL9JV
	bLrK8daNmPheJke6RU5oLKDxz7cg3zmWMtNxopIyyTXHNNYSyraU2S/BCpW3MWqNMMgIVV
	4iPzp2ZOJjA0RP80biKZvebrWXq8mMGGSz9pG7fsOwSh1fA/bcNnDEq8iS6N2L4vO/CxBC
	yko8uiGFzQF1IlVceIE4DCC4pUTTiqJRhto5JIirJqAFEZtBVnuUX1vVjJdaJcduqkb9dM
	WNw1r96lv93Z3NpwmYqkvgiVJFmFVtn5QbeYKRUdKkXU6HkDF8Dqvuka3OjnaA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795396718;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=UtZUZOay4Q6R+YzBBj/ej0rBQ+5UetzFC/BNt6c9bNI=;
	b=bzF1GQSa0hnt6b21o0N+yqXdSAyTtmju91QKuVVFvYCtFxMMyHSxKSAaYxD9TVpYgJLVEu
	hFQME+HOrpKBDbYj758q012/rEiWEACWvPrm2TBsYaIV5Qf/6qwVmbSk3ll3i8cyr0xlJO
	dKs6pdOXuqehbuuY+fPTFtxpi6tCCZ42N1ToULJFE1G0bbIJX1bMDi8KvBicWzPWSX6efd
	+qLKZubmonbpOqiws3jSa6TlvmBhvNe9Hjlfjlr7oR2+LHBQTTJkSLfif3PxTBr0jJKR9Z
	kG1N5Jpo6Tli+AZUOM8BtKBwzj50vwuiG8WqHBHhI+TbdsAEnfRYQ5BWK6fY6Q==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp3y520lzSpL
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:38 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 38a3
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:18:38 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: d43321455c1d - stable/15 - [tests] switch GoogleTest tests to `googletest` interface
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: d43321455c1d227764b54a9c68e04daf7fcaaf77
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:18:38 +0000
Message-Id: <6b03946e.38a3.6c05203a@gitrepo.freebsd.org>

The branch stable/15 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=d43321455c1d227764b54a9c68e04daf7fcaaf77

commit d43321455c1d227764b54a9c68e04daf7fcaaf77
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-10-07 18:53:15 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:17:40 +0000

    [tests] switch GoogleTest tests to `googletest` interface
    
    The new `googletest` kyua test interface--added in 0.15.0 and fixed in
    0.15.1--allows tests to be executed and handled in a more fine-grained
    manner than the way it was prior to this commit.
    
    This change deletes the `capsicum-test` ATF wrapper script,
    `functional.sh`, and all supporting logic in `googletest.test.mk` as
    well as this change makes that logic unnecessary.
    
    MFC after:      1 month
    MFC with:       b68969979d6b ("contrib/kyua: update to 0.15.1")
    
    (cherry picked from commit 3fb03fb35b20d259e0a3a07fc48f2ecc3c5da6e8)
---
 share/mk/googletest.test.mk      | 11 +-------
 tests/sys/capsicum/Makefile      |  1 -
 tests/sys/capsicum/functional.sh | 60 ----------------------------------------
 3 files changed, 1 insertion(+), 71 deletions(-)

diff --git a/share/mk/googletest.test.mk b/share/mk/googletest.test.mk
index 026f6dcacce3..b21576112a78 100644
--- a/share/mk/googletest.test.mk
+++ b/share/mk/googletest.test.mk
@@ -6,10 +6,6 @@
 # GoogleTest is a C++ test framework, thus, it does not describe/articulate how
 # to write tests in other languages, e.g., C or shell, unlike the ATF, plain,
 # and TAP raw test interfaces.
-#
-# For now this is a thin wrapper around the `plain` test interface, but in the
-# future this will rely on a newer version of kyua which will integrate in
-# GoogleTest support.
 
 .if !target(__<bsd.test.mk>__)
 .error googletest.test.mk cannot be included directly.
@@ -34,13 +30,8 @@ BINDIR.${_T}= ${TESTSDIR}
 CXXFLAGS.${_T}+= ${GTESTS_CXXFLAGS}
 MAN.${_T}?= # empty
 SRCS.${_T}?= ${_T}.cc
-.if !empty(GTESTS_WRAPPER_SH.${_T})
-# A stopgap/workaround to let kyua execute test case one by one
-ATF_TESTS_SH+= ${GTESTS_WRAPPER_SH.${_T}}
-.else
 _TESTS+= ${_T}
-TEST_INTERFACE.${_T}= plain
-.endif
+TEST_INTERFACE.${_T}= googletest
 
 .endfor
 .endif
diff --git a/tests/sys/capsicum/Makefile b/tests/sys/capsicum/Makefile
index a8f72d399af9..788fa9f9394c 100644
--- a/tests/sys/capsicum/Makefile
+++ b/tests/sys/capsicum/Makefile
@@ -10,7 +10,6 @@ CFLAGS+=	-I${SRCTOP}/tests
 .if ${MK_GOOGLETEST} != no
 
 GTESTS+=	capsicum-test
-GTESTS_WRAPPER_SH.capsicum-test=	functional
 # This test script runs the same test suite twice, once as root and once as an
 # unprivileged user.  Serialize them since some tests access global namespaces,
 # e.g., mqueuefs, and can trample on each other.
diff --git a/tests/sys/capsicum/functional.sh b/tests/sys/capsicum/functional.sh
deleted file mode 100755
index 8d4a7eef2dec..000000000000
--- a/tests/sys/capsicum/functional.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#-
-# SPDX-License-Identifier: BSD-2-Clause
-#
-# Copyright (c) 2020 The FreeBSD Foundation
-#
-# This software was developed by Li-Wen Hsu <lwhsu@FreeBSD.org>
-# under sponsorship from the FreeBSD Foundation.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-#
-
-CAPSICUM_TEST_BIN=capsicum-test
-
-atf_test_case "test_root"
-test_root_head() {
-
-	atf_set descr 'Run capsicum-test as root'
-	atf_set require.user root
-}
-
-test_root_body() {
-	atf_check -s exit:0 -o match:PASSED -e ignore \
-		"$(atf_get_srcdir)/${CAPSICUM_TEST_BIN}" -u "$(id -u tests)"
-}
-
-atf_test_case "test_unprivileged"
-test_unprivileged_head() {
-
-	atf_set descr 'Run capsicum-test as an unprivileged user'
-	atf_set require.user unprivileged
-}
-
-test_unprivileged_body() {
-	atf_check -s exit:0 -o match:PASSED -e ignore \
-		"$(atf_get_srcdir)/${CAPSICUM_TEST_BIN}" -u "$(id -u)"
-}
-
-atf_init_test_cases() {
-	atf_add_test_case test_root
-	atf_add_test_case test_unprivileged
-}

From nobody Mon Nov 23 01:18:37 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXp3x6XWdz71TZ2
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:18: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp3x5SG5z4bY6
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:37 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795396717;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=cf16ZMubgfvLnSHVH1V1pHFfY9MYi75+2Y4zt6sv0gY=;
	b=yB0QQPFOIwOy+ifCTFQNPjvGDn28fVkepkOIpzBKfiw7W7KQKNPbBeFgRd0WtyIVUto4kD
	Di7FkSGLt4ipHuQNtVRrnudwwgHP/NmtR1ZaPFWQnReI2zjZXHcU+ImAKOiH0KnEEfuTVg
	YOO2ZJfnd9KHDJuTIOBennn0wHMRfZkKBYVB+g0oMxOXDb25SYv3HhYwJr+0XZ0uEE+0GH
	+kIxRYOl7u/07XFTahTwGfOJ+XeU9hJDd1xUY7cNuPkR2Q7BuYe57G+hmCoEoZ+ZmYzsbW
	KfCeyl1eS8SoVCJYImS/clxYpKInUDyF5fDsqTIRAJPD//xnnMa4zScVm6vAtw==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396717;
	b=L4NjyxRsbK3ZhyzNflLUcI9LsIp1Ugh8IyR+Tbr5gtxBrg6gSU4ObmNShTDyyxz77sZSwu
	JCvhhvPqN15GGGcq6kpssZyLVuTPSCxWyXB/6ycKNky/WtQVmZrgbIrtPcemloYDL9II4q
	VYgWi8w2TNj9ecUmEasDccW5Acp0Rx93ZdCoxPmNMpLrSfiA/eHbS/snZZqhsjxZA0Ckwk
	Oaqn2x9uUW7GvwrPiIH5H4muuUhUb97DLRHWrDRtKmmUQQwqweHdHKjmUHijylK3SH1t7w
	s+cTOURKA/Y1qhDJ98uxwk2AhZO29TydqEFfyIWQZoHvFovgPzkwOAsJutDgQA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795396717;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=cf16ZMubgfvLnSHVH1V1pHFfY9MYi75+2Y4zt6sv0gY=;
	b=aID+nybAusxSuGKX1cgAdJ3HeJNxdNtO1mL2s9StSOIfZtfXE8foZzcy58AOJU9sPO9en1
	poV4iTdGHPvUBpUPPAh+VpgDzh9Nse0xa0bhmcDzMs+X8/koX8DVKCeZprSQdn6GPZF1WU
	kDuu4eGTt5kUiJA/ke7qpdXE63PXeLySEbkw27sQgVWdxg6Re9REh4PfzcjJYCZCo1ggyX
	2mdGZCNNQmv/KJuFaeaWF52Qrgw4jfqS0YtFnP3GuXA4hoj+/TljLZuIPJ2Dw19Grrkbsg
	fezJ38OwtYChW8K6eEMPK2hNn5iuKJKLda0HFcwJD9sLFC3dD0UqQFcmhVSyIA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp3x4k59zSbT
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:37 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 2ea9
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:18:37 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: a657b45bed31 - stable/15 - contrib/kyua: update to 0.15.1
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: a657b45bed31f1755d1fd7337094550f3b94991b
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:18:37 +0000
Message-Id: <6b03946d.2ea9.3512c628@gitrepo.freebsd.org>

The branch stable/15 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=a657b45bed31f1755d1fd7337094550f3b94991b

commit a657b45bed31f1755d1fd7337094550f3b94991b
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-10-28 22:02:27 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:17:40 +0000

    contrib/kyua: update to 0.15.1
    
    This new release contains multiple bugfixes. Please see the release
    notes mentioned in the merge commit for more details.
    
    MFC after:      2 weeks
    Merge commit '3e05143b80d1537cdd51a5dcf742da31f400507e'
    
    (cherry picked from commit b68969979d6b590247290b4fe26212d201c3ad96)
---
 contrib/kyua/NEWS                              |  19 +++
 contrib/kyua/README.md                         |   4 +-
 contrib/kyua/config.h                          |   6 +-
 contrib/kyua/doc/kyua-about.1                  |   2 +-
 contrib/kyua/drivers/debug_test.cpp            |   3 +
 contrib/kyua/drivers/run_tests.cpp             |   3 +
 contrib/kyua/engine/atf_test.cpp               |   1 +
 contrib/kyua/engine/googletest.cpp             |  27 +---
 contrib/kyua/engine/googletest_helpers.cpp     |  27 +---
 contrib/kyua/engine/googletest_list.cpp        |  27 +---
 contrib/kyua/engine/googletest_list_test.cpp   |  27 +---
 contrib/kyua/engine/googletest_result.cpp      | 195 +++++++++++++++++--------
 contrib/kyua/engine/googletest_result.hpp      |  31 +---
 contrib/kyua/engine/googletest_result_test.cpp | 141 ++++++++++++++----
 contrib/kyua/engine/googletest_test.cpp        |  28 +---
 contrib/kyua/engine/plain_test.cpp             |   1 +
 contrib/kyua/engine/scanner_test.cpp           |   1 +
 contrib/kyua/engine/scheduler_test.cpp         |  11 ++
 contrib/kyua/engine/tap_test.cpp               |   1 +
 contrib/kyua/utils/config/nodes.cpp            |   6 +-
 contrib/kyua/utils/config/tree.cpp             |  11 +-
 contrib/kyua/utils/sqlite/test_utils.hpp       |   4 +-
 22 files changed, 316 insertions(+), 260 deletions(-)

diff --git a/contrib/kyua/NEWS b/contrib/kyua/NEWS
index c794e6e60092..50a2c8257370 100644
--- a/contrib/kyua/NEWS
+++ b/contrib/kyua/NEWS
@@ -1,5 +1,24 @@
 # Major changes between releases
 
+## Changes in version 0.15.1
+
+**Released on 2026/10/25.**
+
+### Bugfixes
+
+* #324: googletest: fix "failed without a reason" scenario
+* #328: utils::sqlite: restore static on test helpers
+* #330: Address a number of issues with the GoogleTest parser
+* #331: GoogleTest: licensing and style cleanup
+* #332: model/metadata: source code cleanup post-748e27bb
+* #339: Guard dynamic_cast results before dereferencing
+
+### Developer Workflow Changes
+
+* #338: add 30 minutes timeout for Distcheck step of CI
+
+**Full Changelog**: https://github.com/freebsd/lutok/compare/kyua-0.15.0...kyua-0.15.1
+
 ## Changes in version 0.15.0
 
 **Released on 2026/10/07.**
diff --git a/contrib/kyua/README.md b/contrib/kyua/README.md
index e42d6da35377..b8b54d0413de 100644
--- a/contrib/kyua/README.md
+++ b/contrib/kyua/README.md
@@ -27,9 +27,9 @@ This is not an official Google product.
 
 ## Download
 
-The latest version of Kyua is 0.14.1 and was released on March 29th, 2025.
+The latest version of Kyua is 0.15.0 and was released on October 7th, 2026.
 
-Download: [kyua-0.14.1](../../releases/tag/kyua-0.14.1).
+Download: [kyua-0.15.0](../../releases/tag/kyua-0.15.0).
 
 See the [release notes](NEWS) for information about the changes in this
 and all previous releases.
diff --git a/contrib/kyua/config.h b/contrib/kyua/config.h
index d2e8728dde38..eba9c9cb1448 100644
--- a/contrib/kyua/config.h
+++ b/contrib/kyua/config.h
@@ -119,7 +119,7 @@
 #define PACKAGE_NAME "Kyua"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "Kyua 0.15.0"
+#define PACKAGE_STRING "Kyua 0.15.1"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "kyua"
@@ -128,7 +128,7 @@
 #define PACKAGE_URL "https://github.com/freebsd/kyua/"
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "0.15.0"
+#define PACKAGE_VERSION "0.15.1"
 
 /* Define to 1 if all of the C89 standard headers exist (not just the ones
    required in a freestanding environment). This macro is provided for
@@ -136,4 +136,4 @@
 #define STDC_HEADERS 1
 
 /* Version number of package */
-#define VERSION "0.15.0"
+#define VERSION "0.15.1"
diff --git a/contrib/kyua/doc/kyua-about.1 b/contrib/kyua/doc/kyua-about.1
index ba3041f14447..c914fa33374e 100644
--- a/contrib/kyua/doc/kyua-about.1
+++ b/contrib/kyua/doc/kyua-about.1
@@ -48,7 +48,7 @@ The name of the package, which is
 .Sq kyua .
 .It
 The version number, which is
-.Sq 0.15.0 .
+.Sq 0.15.1 .
 .It
 License information.
 .It
diff --git a/contrib/kyua/drivers/debug_test.cpp b/contrib/kyua/drivers/debug_test.cpp
index 6bd3d4dc0731..2e0e56d22f46 100644
--- a/contrib/kyua/drivers/debug_test.cpp
+++ b/contrib/kyua/drivers/debug_test.cpp
@@ -42,6 +42,7 @@
 #include "utils/format/macros.hpp"
 #include "utils/fs/auto_cleaners.hpp"
 #include "utils/optional.ipp"
+#include "utils/sanity.hpp"
 
 namespace config = utils::config;
 namespace fs = utils::fs;
@@ -103,6 +104,8 @@ drivers::debug_test::drive(engine::debugger_ptr debugger,
     const scheduler::test_result_handle* test_result_handle =
         dynamic_cast< const scheduler::test_result_handle* >(
             result_handle.get());
+    if (test_result_handle == nullptr)
+        UNREACHABLE_MSG("Expected a test result handle from the scheduler");
     const model::test_result test_result = test_result_handle->test_result();
     result_handle->cleanup();
 
diff --git a/contrib/kyua/drivers/run_tests.cpp b/contrib/kyua/drivers/run_tests.cpp
index d92940005242..e8ee03385184 100644
--- a/contrib/kyua/drivers/run_tests.cpp
+++ b/contrib/kyua/drivers/run_tests.cpp
@@ -50,6 +50,7 @@
 #include "utils/noncopyable.hpp"
 #include "utils/optional.ipp"
 #include "utils/passwd.hpp"
+#include "utils/sanity.hpp"
 #include "utils/text/operations.ipp"
 
 namespace config = utils::config;
@@ -202,6 +203,8 @@ finish_test(scheduler::result_handle_ptr result_handle,
     const scheduler::test_result_handle* test_result_handle =
         dynamic_cast< const scheduler::test_result_handle* >(
             result_handle.get());
+    if (test_result_handle == nullptr)
+        UNREACHABLE_MSG("Expected a test result handle from the scheduler");
 
     put_test_result(test_case_id, *test_result_handle, tx);
 
diff --git a/contrib/kyua/engine/atf_test.cpp b/contrib/kyua/engine/atf_test.cpp
index 5f9b8c59663e..6c3f1cf03b06 100644
--- a/contrib/kyua/engine/atf_test.cpp
+++ b/contrib/kyua/engine/atf_test.cpp
@@ -150,6 +150,7 @@ run_one(const atf::tests::tc* tc, const char* test_case_name,
     const scheduler::test_result_handle* test_result_handle =
         dynamic_cast< const scheduler::test_result_handle* >(
             result_handle.get());
+    ATF_REQUIRE(test_result_handle != nullptr);
     atf::utils::cat_file(result_handle->stdout_file().str(), "stdout: ");
     atf::utils::cat_file(result_handle->stderr_file().str(), "stderr: ");
     ATF_REQUIRE_EQ(exp_result, test_result_handle->test_result());
diff --git a/contrib/kyua/engine/googletest.cpp b/contrib/kyua/engine/googletest.cpp
index e050410ba1f5..37d979585718 100644
--- a/contrib/kyua/engine/googletest.cpp
+++ b/contrib/kyua/engine/googletest.cpp
@@ -1,30 +1,7 @@
-// Copyright 2024 The Kyua Authors.
+// Copyright 2026 The Kyua Authors.
 // All rights reserved.
 //
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-//   notice, this list of conditions and the following disclaimer.
-// * 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.
-// * Neither the name of Google Inc. nor the names of its contributors
-//   may be used to endorse or promote products derived from this software
-//   without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER 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.
+// SPDX-License-Identifier: BSD-2-Clause
 
 #include "engine/googletest.hpp"
 
diff --git a/contrib/kyua/engine/googletest_helpers.cpp b/contrib/kyua/engine/googletest_helpers.cpp
index 129a08a89b7c..1a57fa0e977e 100644
--- a/contrib/kyua/engine/googletest_helpers.cpp
+++ b/contrib/kyua/engine/googletest_helpers.cpp
@@ -1,30 +1,7 @@
-// Copyright 2024 The Kyua Authors.
+// Copyright 2026 The Kyua Authors.
 // All rights reserved.
 //
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-//   notice, this list of conditions and the following disclaimer.
-// * 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.
-// * Neither the name of Google Inc. nor the names of its contributors
-//   may be used to endorse or promote products derived from this software
-//   without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER 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.
+// SPDX-License-Identifier: BSD-2-Clause
 
 extern "C" {
 #include <sys/stat.h>
diff --git a/contrib/kyua/engine/googletest_list.cpp b/contrib/kyua/engine/googletest_list.cpp
index f231cb9e7021..6c006687fe49 100644
--- a/contrib/kyua/engine/googletest_list.cpp
+++ b/contrib/kyua/engine/googletest_list.cpp
@@ -1,30 +1,7 @@
-// Copyright 2024 The Kyua Authors.
+// Copyright 2026 The Kyua Authors.
 // All rights reserved.
 //
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-//   notice, this list of conditions and the following disclaimer.
-// * 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.
-// * Neither the name of Google Inc. nor the names of its contributors
-//   may be used to endorse or promote products derived from this software
-//   without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER 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.
+// SPDX-License-Identifier: BSD-2-Clause
 
 #include "engine/googletest_list.hpp"
 
diff --git a/contrib/kyua/engine/googletest_list_test.cpp b/contrib/kyua/engine/googletest_list_test.cpp
index 5052c2f133ad..d5e9545b15ba 100644
--- a/contrib/kyua/engine/googletest_list_test.cpp
+++ b/contrib/kyua/engine/googletest_list_test.cpp
@@ -1,30 +1,7 @@
-// Copyright 2024 The Kyua Authors.
+// Copyright 2026 The Kyua Authors.
 // All rights reserved.
 //
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-//   notice, this list of conditions and the following disclaimer.
-// * 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.
-// * Neither the name of Google Inc. nor the names of its contributors
-//   may be used to endorse or promote products derived from this software
-//   without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER 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.
+// SPDX-License-Identifier: BSD-2-Clause
 
 #include "engine/googletest_list.hpp"
 
diff --git a/contrib/kyua/engine/googletest_result.cpp b/contrib/kyua/engine/googletest_result.cpp
index a1fc1f72da4d..9616fc292b86 100644
--- a/contrib/kyua/engine/googletest_result.cpp
+++ b/contrib/kyua/engine/googletest_result.cpp
@@ -1,30 +1,7 @@
-// Copyright 2024 The Kyua Authors.
+// Copyright 2026 The Kyua Authors.
 // All rights reserved.
 //
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-//   notice, this list of conditions and the following disclaimer.
-// * 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.
-// * Neither the name of Google Inc. nor the names of its contributors
-//   may be used to endorse or promote products derived from this software
-//   without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER 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.
+// SPDX-License-Identifier: BSD-2-Clause
 
 #include "engine/googletest_result.hpp"
 
@@ -53,21 +30,46 @@ using utils::optional;
 
 namespace {
 
-/// Internal string for specifying invalid output.
-const std::string invalid_output_message = "invalid output";
-
 /// Regular expression for disabled tests line.
 const std::regex disabled_re(
     R"RE((YOU HAVE [[:digit:]]+ DISABLED TESTS?))RE"
 );
 
+/// Regular expression for buggy skipped message output. Should be resolved via
+/// google/googletest#5098 .
+const std::regex global_env_buggy_skip_prefix_re(
+    R"RE(.+: Skipped\n)RE"
+);
+
+/// Regular expression for starting sentinel for Global test environment.
+const std::regex global_env_context_start_re(
+    R"(\[\-+\][[:space:]]+Global test environment set-up)"
+);
+
+/// Regular expression for ending sentinel for Global test environment.
+const std::regex global_env_context_end_re(
+    R"(\[\-+\][[:space:]]+Global test environment tear-down)"
+);
+
+// CHECK_STYLE_DISABLE
+
+/// Regular expression for setup or teardown fixtures that fail for test
+/// suites.
+///
+/// This only applies to the failure result type, not the other ones.
+const std::regex suite_setup_or_teardown_failure_re(
+    R"RE(\[[[:space:]]+FAILED[[:space:]]+\][[:space:]]+[^:]+:[[:space:]]SetUpTestSuite or TearDownTestSuite)RE"
+);
+
+// CHECK_STYLE_ENABLE
+
 /// Regular expression for starting sentinel of results block.
-const std::regex starting_sentinel_re(
-    R"(\[[[:space:]]+RUN[[:space:]]+\][[:space:]]+[A-Za-z0-9]+\.[A-Za-z0-9]+)"
+const std::regex test_context_start_re(
+    R"(\[[[:space:]]+RUN[[:space:]]+\][[:space:]]+[^[:space:]]+)"
 );
 
 /// Regular expression for ending sentinel of results block.
-const std::regex ending_sentinel_re(
+const std::regex test_context_end_re(
     R"RE(\[[[:space:]]+(FAILED|OK|SKIPPED)[[:space:]]+\])RE"
 );
 
@@ -89,10 +91,13 @@ parse_without_reason(const std::string& status, const std::string& rest)
 
     if (status == "skipped")
         return engine::googletest_result(engine::googletest_result::skipped);
-    else {
-        INV(status == "successful");
+    else if (status == "successful")
         return engine::googletest_result(engine::googletest_result::successful);
-    }
+    else if (status == "failed")
+        return engine::googletest_result(engine::googletest_result::failed);
+    else
+        return engine::googletest_result(engine::googletest_result::broken,
+            F("bad status: '%s'; output was:\n%s") % status % rest);
 }
 
 
@@ -121,8 +126,10 @@ parse_with_reason(const std::string& status, const std::string& rest)
         return googletest_result(googletest_result::failed, rest);
     else if (status == "skipped")
         return googletest_result(googletest_result::skipped, rest);
+    else if (status == "successful")
+        return googletest_result(googletest_result::successful, rest);
     else
-        PRE_MSG(false, "Unexpected status");
+        PRE_MSG(false, F("Unexpected status: %s") % status);
 }
 
 
@@ -178,6 +185,9 @@ engine::googletest_result::googletest_result(
 /// have a bug), and thus why they are reported as broken instead of just failed
 /// (which is a legitimate result for a test case).
 ///
+/// TODO(ngie): replace ad hoc output format parsing with a structured file
+///             format, e.g., JSON or XML.
+///
 /// \param input The stream to read from.
 ///
 /// \return A generic representation of the result of the test case.
@@ -187,6 +197,7 @@ engine::googletest_result
 engine::googletest_result::parse(std::istream& input)
 {
     std::vector<std::string> lines;
+    std::string all_context;
 
     do {
         std::string line;
@@ -194,50 +205,107 @@ engine::googletest_result::parse(std::istream& input)
         if (!input.eof())
             line.push_back('\n');
         lines.push_back(line);
+        all_context += line;
     } while (input.good());
 
-    bool capture_context = false;
-    bool valid_output = false;
     std::string context, status;
+    bool capture_immediate_context = false;
+    bool global_env_message_start_seen = false;
+    bool valid_output = false;
 
     for (auto& line: lines) {
+        // FIXME: drop the line-by-line parsing and just use multiline regular
+        // expressions with associated matching or just bite the bullet and
+        // switch to a structured format like JSON or XML.
         std::smatch matches;
 
-        if (regex_search(line, matches, disabled_re)) {
+        if (std::regex_search(line, global_env_context_start_re)) {
+            global_env_message_start_seen = true;
+            // Issue 326: it's a common pattern for folks to use GoogleTest
+            // Environments to run checks and skip entire test suites if
+            // preconditions aren't met. We need to start capturing the context
+            // in this block, just in case no testcases are run.
+            //
+            // In the event test output is found later on, the context will be
+            // reset by design.
+            capture_immediate_context = true;
+            context = "";
+            continue;
+        }
+
+        if (std::regex_search(line, matches, disabled_re)) {
             context = matches[1];
             status = "disabled";
             valid_output = true;
             break;
         }
-        if (regex_search(line, matches, starting_sentinel_re)) {
-            capture_context = true;
+
+        if (!global_env_message_start_seen) {
+            continue;
+        }
+
+        if (std::regex_search(line, test_context_start_re)) {
+            capture_immediate_context = true;
+            // (Re)set the context to ensure that the test result information
+            // doesn't show up in the context parsed by kyua.
             context = "";
             continue;
         }
-        if (regex_search(line, matches, ending_sentinel_re)) {
+        if (std::regex_search(line, matches, test_context_end_re)) {
             std::string googletest_res = matches[1];
+
             if (googletest_res == "OK") {
-                context = "";
                 status = "successful";
             } else if (googletest_res == "FAILED") {
                 status = "failed";
             } else {
-                INV(googletest_res == "SKIPPED");
+                INV_MSG(googletest_res == "SKIPPED",
+                    F("expected SKIPPED; got %s") % googletest_res);
                 status = "skipped";
             }
-            capture_context = false;
+            capture_immediate_context = false;
+        }
+        if (std::regex_search(line, global_env_context_end_re)) {
+            capture_immediate_context = false;
             valid_output = true;
+            // Keep scanning in case, in case we run into
+            // `suite_setup_or_teardown_failure_re`.
         }
-        if (capture_context) {
+
+        if (std::regex_search(line, suite_setup_or_teardown_failure_re)) {
+            // Any failure context should get printed out earlier on, but in
+            // the event it isn't, just dump the whole test output for sanity's
+            // sake/debuggability.
+            if (context.empty()) {
+                context = \
+                    F("kyua: could not 'summarize' failure context; "
+                      "see full process output for more details:\n\n%s") %
+                    all_context;
+            }
+            status = "failed";
+        }
+
+        if (capture_immediate_context) {
             context += line;
         }
     }
+
     if (!valid_output) {
-        context = invalid_output_message;
+        context = googletest_invalid_output_message;
         status = "broken";
+    } else {
+        // See Issue 326 comments.
+        if (std::regex_search(context, global_env_buggy_skip_prefix_re)) {
+            // It is easier to replace the existing string instead of
+            // extracting the multiline match.
+            context = std::regex_replace(context,
+                global_env_buggy_skip_prefix_re, "");
+            status = "skipped";
+        }
     }
     if (status == "skipped" && context.empty())
-        context = bogus_googletest_skipped_nul_message;
+        context = googletest_bogus_skipped_nul_message;
+
     if (context.empty())
         return parse_without_reason(status, context);
     else
@@ -388,18 +456,21 @@ engine::googletest_result::apply(const optional< process::status >& status)
 model::test_result
 engine::googletest_result::externalize(void) const
 {
+
+    // FIXME(ngie,#323): some of these test result types may require a reason, and thus the
+    // `.get()` -> `.get_default("")` change might be a bug.
     switch (_type) {
     case googletest_result::broken:
-        return model::test_result(model::test_result_broken, _reason.get());
+        return model::test_result(model::test_result_broken, _reason.get_default(""));
 
     case googletest_result::disabled:
-        return model::test_result(model::test_result_skipped, _reason.get());
+        return model::test_result(model::test_result_skipped, _reason.get_default(""));
 
     case googletest_result::failed:
-        return model::test_result(model::test_result_failed, _reason.get());
+        return model::test_result(model::test_result_failed, _reason.get_default(""));
 
     case googletest_result::skipped:
-        return model::test_result(model::test_result_skipped, _reason.get());
+        return model::test_result(model::test_result_skipped, _reason.get_default(""));
 
     case googletest_result::successful:
         return model::test_result(model::test_result_passed);
@@ -486,16 +557,16 @@ engine::calculate_googletest_result(
     googletest_result result(googletest_result::broken, "Unknown result");
     try {
         result = googletest_result::load(results_file);
-        /// atf_result.cpp handles this by side-effect by setting a broken
-        /// result with "", which results in a std::runtime_error throw from
-        /// atf_result::parse(..). googletest_result::parse doesn't do that and
-        /// instead returns a broken result with a reason of
-        /// `invalid_output_message`, so that case needs to be tested for after
-        /// the fact to make sure the reason why `invalid_output_message` was
-        /// because of a program that crashed or failed.
+        // atf_result.cpp handles this by side-effect by setting a broken
+        // result with "", which results in a std::runtime_error throw from
+        // atf_result::parse(..). googletest_result::parse doesn't do that and
+        // instead returns a broken result with a reason of
+        // `googletest_invalid_output_message`, so that case needs to be
+        // tested for after the fact to confirm whether or not program crashed
+        // or failed.
         if (result.type() == googletest_result::broken && body_status) {
             const optional< std::string >& reason = result.reason();
-            if (reason && reason.get() == invalid_output_message) {
+            if (reason && reason.get() == googletest_invalid_output_message) {
                 result = googletest_result(
                     googletest_result::broken,
                     F("Error: Premature exit. Test case %s") %
@@ -506,11 +577,11 @@ engine::calculate_googletest_result(
         if (body_status)
             result = googletest_result(googletest_result::broken,
                 F("Error: %s. Test case %s") %
-		error.what() %
+                error.what() %
                 format_status(body_status.get()));
-	else {
+        else {
             // The test case timed out.  apply() handles this case later.
-	}
+        }
     } catch (const std::runtime_error& error) {
         if (body_status)
             result = googletest_result(
diff --git a/contrib/kyua/engine/googletest_result.hpp b/contrib/kyua/engine/googletest_result.hpp
index 325995be3221..f296ea701203 100644
--- a/contrib/kyua/engine/googletest_result.hpp
+++ b/contrib/kyua/engine/googletest_result.hpp
@@ -1,30 +1,7 @@
-// Copyright 2024 The Kyua Authors.
+// Copyright 2026 The Kyua Authors.
 // All rights reserved.
 //
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-//   notice, this list of conditions and the following disclaimer.
-// * 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.
-// * Neither the name of Google Inc. nor the names of its contributors
-//   may be used to endorse or promote products derived from this software
-//   without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER 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.
+// SPDX-License-Identifier: BSD-2-Clause
 
 /// \file engine/googletest_result.hpp
 /// Functions and types to process the results of googletest-based test cases.
@@ -99,11 +76,13 @@ model::test_result calculate_googletest_result(
     const utils::optional< utils::process::status >&,
     const utils::fs::path&);
 
+/// Internal string for specifying invalid output.
+const std::string googletest_invalid_output_message = "invalid output";
 
 /// A bogus identifier for nul reasons provided by the test writer.
 ///
 /// TODO: Support nul messages with skipped results in the schema, etc.
-const std::string bogus_googletest_skipped_nul_message = "\n";
+const std::string googletest_bogus_skipped_nul_message = "\n";
 
 
 }  // namespace engine
diff --git a/contrib/kyua/engine/googletest_result_test.cpp b/contrib/kyua/engine/googletest_result_test.cpp
index 90bc2cc62b7d..0398a11359ee 100644
--- a/contrib/kyua/engine/googletest_result_test.cpp
+++ b/contrib/kyua/engine/googletest_result_test.cpp
@@ -1,30 +1,7 @@
-// Copyright 2024 The Kyua Authors.
+// Copyright 2026 The Kyua Authors.
 // All rights reserved.
 //
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-//   notice, this list of conditions and the following disclaimer.
-// * 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.
-// * Neither the name of Google Inc. nor the names of its contributors
-//   may be used to endorse or promote products derived from this software
-//   without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER 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.
+// SPDX-License-Identifier: BSD-2-Clause
 
 #include "engine/googletest_result.hpp"
 
@@ -96,7 +73,8 @@ parse_ok_test(const engine::googletest_result::types& exp_type,
 
 
 PARSE(broken,
-      engine::googletest_result::broken, "invalid output",
+      engine::googletest_result::broken,
+      engine::googletest_invalid_output_message.c_str(),
       "invalid input");
 
 const char disabled_context[] = (
@@ -150,6 +128,71 @@ PARSE(failed,
       engine::googletest_result::failed, failed_context,
       failed_message);
 
+// CHECK_STYLE_DISABLE
+#if 0
+const char failed_parameterized_context[] = (
+"/usr/src/contrib/googletest/googletest/test/googletest-param-test-test.cc:882: Failure\n"
+"Expected: (global_count_) >= (2), actual: 1 vs 2\n"
+"If some (but not all) SeparateInstanceTest tests have been filtered out this test will fail. Make sure that all GeneratorEvaluationTest are selected or de-selected together by the test filter.\n"
+"\n"
+);
+#else
+const char failed_parameterized_context[] = (
+"kyua: could not 'summarize' failure context; see full process output for more details:\n"
+"\n"
+"Note: Google Test filter = FourElemSequence/SeparateInstanceTest.TestsRunInSeparateInstances/0\n"
+"[==========] Running 1 test from 1 test suite.\n"
+"[----------] Global test environment set-up.\n"
+"[----------] 1 test from FourElemSequence/SeparateInstanceTest\n"
+"[ RUN      ] FourElemSequence/SeparateInstanceTest.TestsRunInSeparateInstances/0\n"
+"[       OK ] FourElemSequence/SeparateInstanceTest.TestsRunInSeparateInstances/0 (0 ms)\n"
+"/usr/src/contrib/googletest/googletest/test/googletest-param-test-test.cc:882: Failure\n"
+"Expected: (global_count_) >= (2), actual: 1 vs 2\n"
+"If some (but not all) SeparateInstanceTest tests have been filtered out this test will fail. Make sure that all GeneratorEvaluationTest are selected or de-selected together by the test filter.\n"
+"\n"
+"[----------] 1 test from FourElemSequence/SeparateInstanceTest (0 ms total)\n"
+"\n"
+"[----------] Global test environment tear-down\n"
+"[==========] 1 test from 1 test suite ran. (0 ms total)\n"
+"[  PASSED  ] 1 test.\n"
+"[  FAILED  ] 0 tests, listed below:\n"
+"\n"
+" 0 FAILED TESTS\n"
+"[  FAILED  ] FourElemSequence/SeparateInstanceTest: SetUpTestSuite or TearDownTestSuite\n"
+"\n"
+" 1 FAILED TEST SUITE\n"
+);
+#endif
+
+const char failed_parameterized_message[] = (
+"Note: Google Test filter = FourElemSequence/SeparateInstanceTest.TestsRunInSeparateInstances/0\n"
+"[==========] Running 1 test from 1 test suite.\n"
+"[----------] Global test environment set-up.\n"
+"[----------] 1 test from FourElemSequence/SeparateInstanceTest\n"
+"[ RUN      ] FourElemSequence/SeparateInstanceTest.TestsRunInSeparateInstances/0\n"
+"[       OK ] FourElemSequence/SeparateInstanceTest.TestsRunInSeparateInstances/0 (0 ms)\n"
+"/usr/src/contrib/googletest/googletest/test/googletest-param-test-test.cc:882: Failure\n"
+"Expected: (global_count_) >= (2), actual: 1 vs 2\n"
+"If some (but not all) SeparateInstanceTest tests have been filtered out this test will fail. Make sure that all GeneratorEvaluationTest are selected or de-selected together by the test filter.\n"
+"\n"
+"[----------] 1 test from FourElemSequence/SeparateInstanceTest (0 ms total)\n"
+"\n"
+"[----------] Global test environment tear-down\n"
+"[==========] 1 test from 1 test suite ran. (0 ms total)\n"
+"[  PASSED  ] 1 test.\n"
+"[  FAILED  ] 0 tests, listed below:\n"
+"\n"
+" 0 FAILED TESTS\n"
+"[  FAILED  ] FourElemSequence/SeparateInstanceTest: SetUpTestSuite or TearDownTestSuite\n"
+"\n"
+" 1 FAILED TEST SUITE\n"
+);
+// CHECK_STYLE_ENABLE
+
+PARSE(failed_parameterized,
+      engine::googletest_result::failed, failed_parameterized_context,
+      failed_parameterized_message);
+
 const char skipped_message[] = (
 "Note: Google Test filter = SkipTest.DoesSkip\n"
 "[==========] Running 1 test from 1 test suite.\n"
@@ -168,7 +211,7 @@ const char skipped_message[] = (
 
 PARSE(skipped,
       engine::googletest_result::skipped,
-      engine::bogus_googletest_skipped_nul_message.c_str(),
+      engine::googletest_bogus_skipped_nul_message.c_str(),
       skipped_message
 );
 
@@ -197,6 +240,36 @@ PARSE(skipped_with_reason,
       engine::googletest_result::skipped, skipped_with_reason_context,
       skipped_with_reason_message);
 
+// Issue 326: test suites built against 0.18.0 which skip in
+// `Environment::SetUp` misreport tests passing instead of being skipped.
+//
+// https://github.com/google/googletest/issues/4653
+const char skipped_from_environment_with_buggy_output_context[] = (
+"current user is not allowed to mount\n"
+"\n"
+"current user is not allowed to mount\n"
+"\n"
+);
+
+const char skipped_from_environment_with_buggy_output_message[] = (
+"Note: Google Test filter = Setattr.eacces\n"
+"[==========] Running 1 test from 1 test suite.\n"
+"[----------] Global test environment set-up.\n"
+"/usr/src/tests/sys/fs/fusefs/utils.cc:95: Skipped\n"
+"current user is not allowed to mount\n"
+"\n"
+"current user is not allowed to mount\n"
+"\n"
+"[----------] Global test environment tear-down\n"
+"[==========] 1 test from 1 test suite ran. (0 ms total)\n"
+"[  PASSED  ] 1 test.\n"
+);
+
+PARSE(skipped_from_environment_with_buggy_output,
+      engine::googletest_result::skipped,
+      skipped_from_environment_with_buggy_output_context,
+      skipped_from_environment_with_buggy_output_message);
+
 const char successful_message[] = (
 "Note: Google Test filter = PassFailTest.Passes\n"
 "[==========] Running 1 test from 1 test case.\n"
@@ -251,7 +324,11 @@ PARSE(successful_parameterized,
       engine::googletest_result::successful, NULL,
       successful_parameterized_message);
 
-const char successful_message_with_reason[] = (
+const char successful_with_reason_context[] = (
+"This is a reason\n"
+);
+
+const char successful_with_reason_message[] = (
 "Note: Google Test filter = PassFailTest.PassesWithReason\n"
 "[==========] Running 1 test from 1 test suite.\n"
 "[----------] Global test environment set-up.\n"
@@ -267,8 +344,9 @@ const char successful_message_with_reason[] = (
 );
 
 PARSE(successful_with_reason,
-      engine::googletest_result::successful, NULL,
-      successful_message_with_reason);
+      engine::googletest_result::successful,
+      successful_with_reason_context,
+      successful_with_reason_message);
 
 ATF_TEST_CASE_WITHOUT_HEAD(googletest_result__load__ok);
 ATF_TEST_CASE_BODY(googletest_result__load__ok)
@@ -403,7 +481,10 @@ ATF_INIT_TEST_CASES(tcs)
     ATF_ADD_TEST_CASE(tcs, googletest_result__parse__broken);
     ATF_ADD_TEST_CASE(tcs, googletest_result__parse__disabled);
     ATF_ADD_TEST_CASE(tcs, googletest_result__parse__failed);
+    ATF_ADD_TEST_CASE(tcs, googletest_result__parse__failed_parameterized);
     ATF_ADD_TEST_CASE(tcs, googletest_result__parse__skipped);
+    ATF_ADD_TEST_CASE(tcs,
+        googletest_result__parse__skipped_from_environment_with_buggy_output);
     ATF_ADD_TEST_CASE(tcs, googletest_result__parse__skipped_with_reason);
     ATF_ADD_TEST_CASE(tcs, googletest_result__parse__successful);
     ATF_ADD_TEST_CASE(tcs, googletest_result__parse__successful2);
diff --git a/contrib/kyua/engine/googletest_test.cpp b/contrib/kyua/engine/googletest_test.cpp
index 3af4d6801e70..0e74dc80ce6a 100644
--- a/contrib/kyua/engine/googletest_test.cpp
+++ b/contrib/kyua/engine/googletest_test.cpp
@@ -1,30 +1,7 @@
-// Copyright 2024 The Kyua Authors.
+// Copyright 2026 The Kyua Authors.
 // All rights reserved.
 //
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-//   notice, this list of conditions and the following disclaimer.
-// * 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.
-// * Neither the name of Google Inc. nor the names of its contributors
-//   may be used to endorse or promote products derived from this software
-//   without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER 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.
+// SPDX-License-Identifier: BSD-2-Clause
 
 #include "engine/googletest.hpp"
 
@@ -146,6 +123,7 @@ run_one(const atf::tests::tc* tc, const char* test_case_name,
     const scheduler::test_result_handle* test_result_handle =
         dynamic_cast< const scheduler::test_result_handle* >(
             result_handle.get());
+    ATF_REQUIRE(test_result_handle != nullptr);
     atf::utils::cat_file(result_handle->stdout_file().str(), "stdout: ");
     atf::utils::cat_file(result_handle->stderr_file().str(), "stderr: ");
     ATF_REQUIRE_EQ(exp_result, test_result_handle->test_result());
diff --git a/contrib/kyua/engine/plain_test.cpp b/contrib/kyua/engine/plain_test.cpp
index cc3326e4c581..b9c81747bd2c 100644
--- a/contrib/kyua/engine/plain_test.cpp
+++ b/contrib/kyua/engine/plain_test.cpp
@@ -99,6 +99,7 @@ run_one(const atf::tests::tc* tc, const char* test_case_name,
     const scheduler::test_result_handle* test_result_handle =
         dynamic_cast< const scheduler::test_result_handle* >(
             result_handle.get());
+    ATF_REQUIRE(test_result_handle != nullptr);
     atf::utils::cat_file(result_handle->stdout_file().str(), "stdout: ");
     atf::utils::cat_file(result_handle->stderr_file().str(), "stderr: ");
     ATF_REQUIRE_EQ(exp_result, test_result_handle->test_result());
diff --git a/contrib/kyua/engine/scanner_test.cpp b/contrib/kyua/engine/scanner_test.cpp
index f79717eca49e..6d8aba1ac2e0 100644
--- a/contrib/kyua/engine/scanner_test.cpp
+++ b/contrib/kyua/engine/scanner_test.cpp
@@ -327,6 +327,7 @@ ATF_TEST_CASE_BODY(scanner__no_filters__verify_lazy_loads)
          iter != results.end(); ++iter) {
         const mock_test_program* mock_program =
             dynamic_cast< const mock_test_program* >((*iter).first.get());
+        ATF_REQUIRE(mock_program != nullptr);
         ATF_REQUIRE_EQ(1, mock_program->num_calls());
     }
 }
diff --git a/contrib/kyua/engine/scheduler_test.cpp b/contrib/kyua/engine/scheduler_test.cpp
index 93e7627f291a..ed7d23ccc0fa 100644
--- a/contrib/kyua/engine/scheduler_test.cpp
+++ b/contrib/kyua/engine/scheduler_test.cpp
@@ -577,6 +577,7 @@ ATF_TEST_CASE_BODY(integration__run_one)
     const scheduler::test_result_handle* test_result_handle =
         dynamic_cast< const scheduler::test_result_handle* >(
             result_handle.get());
+    ATF_REQUIRE(test_result_handle != nullptr);
     ATF_REQUIRE_EQ(exec_handle, result_handle->original_pid());
*** 171 LINES SKIPPED ***

From nobody Mon Nov 23 01:18:39 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXp4014qHz71TTn
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:18: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp3z5z5Qz4bs5
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:39 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795396719;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=KyDY67m2tq7lcFX3awfO9rsk7hA4OXpf/eVm75b5/s0=;
	b=diWZt7kihE17PAeDFQRMLguTQw1ut+1O7tFsXkk15x0PFJ0yx7RrOnESbAk0iQJyv4WXIb
	eahQEaK8lB8E/Qe0HxpPNdG6swbAqutpEzZuOER9daiAqFhOBKeeHLaZ3TgD8qvaI/C4c+
	BN1oMXW/pn0G/LeITJZmVtY5XsFEl9QRG21wZ5NDHZOy3Wnq+ZB1+1MP7u7NIO4LNN1uU7
	YElmd6O4l1Ci1IzjOdLEqLX0cWVccnJWAvIj1G0uLqkeYLVcQcZfBNfQL+RGF2fHiBZbEf
	fNA2N+BHvSGJEtvI7n7x12M6Sa5PK3Eu2xeQS8Pvn6nTeifmpdz+pEAPd9cHeQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396719;
	b=Vd1VICDV14Nun9BwyJzd7hxZkgTmSBPWLoQtx/adIPVJCadx4ow0Ge7BxlDT73X+NCZ1l0
	VqWINDIHGcUow/P9m7iB5Z1uD9zEbGpeKXjVCfjwTSYpknplXnV96bh7EVtDq3o+q5N0JY
	rmgVnsvkLLePvpdKq3vKJs3hkspluKJPIFltQ4gUnSlXJw/MbO76d2i/mpUPy4D/Uau8vj
	Mo+vvdOXcuqKMkdWUGr10KVOA6twvIfP3JZeTNuJImWormpAuyDoyELdGPZjyiczApXF/n
	25VO970W2ElYn9xfGduFuJwyph4AIqofDpSitJKdTQAurqp0EqzPltBTR+dFpg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795396719;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=KyDY67m2tq7lcFX3awfO9rsk7hA4OXpf/eVm75b5/s0=;
	b=i7wQjtfmuhKF1/i50eI0Y9VNIyjt2pGyOurP3CnHXjj3HMaS7co11/pPKAVmahLR1yBrsp
	bWIE9qEhAzXvYcWWAkIYCxU9tNeFrhF6yvJ94CBO0A3F6pVKD9nt0E0sfxu9WHRrzlKoDi
	HUnWNMmT0JNsvZs1Q1TmH6jNFMYoOTPaXv9NKh0A8VpafG1ScPmDHLi+1mB9kAOo21IG0Q
	wElkLGbShNMVmljiFqEmC7OS3S/KniY8Vau96MH5yQ3V8veHIFSrSDzyKKBrQyjunyI90k
	u+wTMi2lusMbrwBYUfgwzmcrbzJP3cB725bbwQRsuu6/Mym0zkpVm0zYfwY/yQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp3z5QWrzS2F
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:39 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 2f8f
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:18:39 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: c99a199c0f54 - stable/15 - GoogleTest: run several tests as plain C++ tests
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: c99a199c0f54515b79f8beee26f42f51701d982f
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:18:39 +0000
Message-Id: <6b03946f.2f8f.789d798d@gitrepo.freebsd.org>

The branch stable/15 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=c99a199c0f54515b79f8beee26f42f51701d982f

commit c99a199c0f54515b79f8beee26f42f51701d982f
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-10-09 21:33:50 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:17:40 +0000

    GoogleTest: run several tests as plain C++ tests
    
    Some of the tests provided by GoogleTest don't play well with the kyua
    GoogleTest engine available in 0.15.0, in part because they test
    edgecases that the kyua GoogleTest engine does not expect or handle
    gracefully.
    
    Treat the tests as plain C++ tests to keep parity (result-wise) before
    switching the testcase type from `plain` (what it is today under the
    covers) to `googletest`.
    
    MFC after:      1 month
    MFC with:       3fb03fb35b20 ("[tests] switch GoogleTest tests to ...")
    
    (cherry picked from commit eecc84de3572d1ee6caac1fa14dd3140c9601c9c)
---
 lib/googletest/tests/gmock/Makefile      |  3 ++-
 lib/googletest/tests/gtest/Makefile      | 21 ++++++++++++++-------
 lib/googletest/tests/gtest_main/Makefile | 17 ++++++++++++-----
 3 files changed, 28 insertions(+), 13 deletions(-)

diff --git a/lib/googletest/tests/gmock/Makefile b/lib/googletest/tests/gmock/Makefile
index 493567100630..6ac12d2814d4 100644
--- a/lib/googletest/tests/gmock/Makefile
+++ b/lib/googletest/tests/gmock/Makefile
@@ -2,7 +2,8 @@
 
 .PATH:	${GOOGLEMOCK_SRCROOT}/src ${GOOGLEMOCK_SRCROOT}/test
 
-GTESTS+=	gmock_stress_test
+# This doesn't work with the googletest engine in kyua 0.15.0.
+PLAIN_TESTS_CXX+= gmock_stress_test
 
 LIBADD+=	pthread gtest gmock
 
diff --git a/lib/googletest/tests/gtest/Makefile b/lib/googletest/tests/gtest/Makefile
index 5834ca788985..691dd5ce25ff 100644
--- a/lib/googletest/tests/gtest/Makefile
+++ b/lib/googletest/tests/gtest/Makefile
@@ -2,14 +2,21 @@
 
 .PATH:	${GOOGLETEST_SRCROOT}/src ${GOOGLETEST_SRCROOT}/test
 
-GTESTS+=	gtest_environment_test
-GTESTS+=	gtest_no_test_unittest
-GTESTS+=	googletest-param-test-test
 GTESTS+=	gtest_premature_exit_test
-GTESTS+=	gtest_repeat_test
-GTESTS+=	gtest_stress_test
-GTESTS+=	gtest_throw_on_failure_ex_test
-GTESTS+=	gtest-unittest-api_test
+# These test scenarios are't handled properly with the googletest engine in
+# kyua 0.15.0.
+PLAIN_TESTS_CXX+= gtest_environment_test
+PLAIN_TESTS_CXX+= gtest_no_test_unittest
+PLAIN_TESTS_CXX+= gtest_throw_on_failure_ex_test
+
+# NOTE: these tests rely on testing by side-effect with global variables/state
+# used in multiple testcases.
+#
+# Running this plain C++ tests gets around that problem.
+PLAIN_TESTS_CXX+= googletest-param-test-test
+PLAIN_TESTS_CXX+= gtest_repeat_test
+PLAIN_TESTS_CXX+= gtest_stress_test
+PLAIN_TESTS_CXX+= gtest-unittest-api_test
 
 CXXFLAGS+=	-I${GOOGLETEST_SRCROOT}/include
 CXXFLAGS+=	-I${GOOGLETEST_SRCROOT}
diff --git a/lib/googletest/tests/gtest_main/Makefile b/lib/googletest/tests/gtest_main/Makefile
index de9bc2f4a78a..517ec804692a 100644
--- a/lib/googletest/tests/gtest_main/Makefile
+++ b/lib/googletest/tests/gtest_main/Makefile
@@ -3,8 +3,6 @@
 .PATH:	${GOOGLETEST_SRCROOT}/src ${GOOGLETEST_SRCROOT}/test
 
 GTESTS+=	googletest-death-test-test
-GTESTS+=	googletest-filepath-test
-GTESTS+=	googletest-listener-test
 GTESTS+=	googletest-message-test
 GTESTS+=	googletest-options-test
 GTESTS+=	googletest-port-test
@@ -14,10 +12,19 @@ GTESTS+=	gtest-typed-test_test
 GTESTS+=	gtest_main_unittest
 GTESTS+=	gtest_pred_impl_unittest
 GTESTS+=	gtest_prod_test
-GTESTS+=	gtest_skip_test
-GTESTS+=	gtest_skip_in_environment_setup_test
 GTESTS+=	gtest_sole_header_test
-GTESTS+=	gtest_unittest
+
+# Crashes when listing testcases using googletest engine in kyua 0.15.0
+# (probably test bugs).
+PLAIN_TESTS_CXX+= googletest-filepath-test
+PLAIN_TESTS_CXX+= googletest-listener-test
+# These test scearios don't work with the googletest engine in kyua 0.15.0.
+PLAIN_TESTS_CXX+= gtest_skip_in_environment_setup_test
+PLAIN_TESTS_CXX+= gtest_skip_test
+# Some of the test scenarios show up as "skipped", when in reality they're just
+# testing skipped functionality. Don't inflate the testcase numbers
+# unnecessarily as it can serve to confuse downstream users.
+PLAIN_TESTS_CXX+= gtest_unittest
 
 CXXFLAGS+=	-I${GOOGLETEST_SRCROOT}/include
 CXXFLAGS+=	-I${GOOGLETEST_SRCROOT}

From nobody Mon Nov 23 01:18:40 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXp4129rXz71TMK
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:18: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp406tyNz4bvt
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:40 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795396721;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=DbnMWgYJiIhA5jQHlkYfOoZs/J5pg4TMcpym6IOfWf4=;
	b=tVHCuG+8QrRKcSHDG1NhRRffmP+kWYJpgeWGQ3je6CGUSs5tdMlyDQxYeT7etXeFS8ro9b
	EmQ0hcJabZSmZ2SwfE7NwwSIpTx/+hNzMqVp4tuOq9VZXKiq/0/KN19IMb++XEEKdatxWN
	Xir/5+iq7+W2wF5GbDyZxYyZZOexsCmaT+q5ma7X8xxTWcAkyrZBjwVunuRGhcrjklWjdm
	+cfv+wHurwicG2riuO2IgeiPck+LZl1cqy0KgkkoICqxcZJ56P5rDUDuDbV8IHYKTBs39y
	ts8SCU+D1kEl7gwyuAmzVcgezAeInaGWm+ybyt3cySyVy8dQU/I5Ua5dsu7JyA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396721;
	b=gLn5wgsBQctGSz9PjD7dFVO0AakLiryoK+6t3ytFXIrsZxhZ7hzkEMy9f/OrkItaSVtAdd
	wYniifn/Z+gGvZO7zEjJT1H8NyUE1Cv8ttXee10uqBd5sZIUA5Q/PHAFPvOo/HKhrHe/np
	MurAQyHN4hibAFHvNEKsxaAooTxWF5+quifO7+JGQA0BLatyKoDSO0wZDTqMo+lyysMTti
	awv3Snm19Vu5DmVanjYeOJZOHVmUBQwq7dsdpHYaUCFDNAgU5kdhTTmDToHLFf8oe8lGcb
	xhexcSr5LeTJTUKOZ3shfHrIydNG8DrlA7BdhqyhyDQQ/Vw4KTWTsA4GUW8Mvg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795396721;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=DbnMWgYJiIhA5jQHlkYfOoZs/J5pg4TMcpym6IOfWf4=;
	b=Se8nX/vptfKmfBxEoHzdG73x97z24ogcoRZnm32wccaKuxi0XkrmM5RmTA+GIgEPvGVKer
	UytCAgtmCJTR3i6+VB2faGnAEM7gJPvVXNCzzFsNj01a6Nf/eib/uLaMN15mSsLtLfw5d9
	gEUnt17ooYlhTZlKtb4kb5D9NUZEOoPN+Q3t4rmv5VKFFuixSFb5ce/VXd57Y/rLGNd5pM
	pMY3XxSr++vL0iaaGbJdyb8+RcHnImBppknfO/LiQgFfrvh8/ZvSfPCWemj5gePpCMLoI3
	56B3IFxB0DSMINO4vWL50a3/RUFYesDL5RqMTZhT6P8zF5lrAevxBFoh45ktzw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp405nY3zSYj
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:40 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 30f6
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:18:40 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: c07ae9b28fca - stable/15 - tests/sys/capsicum: restore test coverage with root user
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: c07ae9b28fca411d25d01c21ba9312f55b32b437
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:18:40 +0000
Message-Id: <6b039470.30f6.5db99141@gitrepo.freebsd.org>

The branch stable/15 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=c07ae9b28fca411d25d01c21ba9312f55b32b437

commit c07ae9b28fca411d25d01c21ba9312f55b32b437
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-11-10 01:55:45 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:17:40 +0000

    tests/sys/capsicum: restore test coverage with root user
    
    This change builds capsicum_test and installs/runs it as an unprivileged
    user ("tests" in vanilla FreeBSD) and root.
    
    This required adjusting logic in the Makefile in order to build two
    binaries with the same sources and running them as separate binaries.
    
    Moreover, in order to restore coverage and ensure that some tests which
    require `other_uid` (typically specified via `-u` on the CLI with the
    test program) don't fail, become the "tests" user when run as root. This
    technically doesn't honor unprivileged_user property in kyua.conf: the
    property needs to be passed via a command-line parameter to the test
    program.
    
    MFC after:      1 week
    Reported by:    markj
    Fixes:          3fb03fb35b20 ("[tests] switch GoogleTest tests ...")
    
    Reviewed by:    markj
    Differential Revision:  https://reviews.freebsd.org/D61066
    
    (cherry picked from commit 58e5c5cac1e7c8c99a6e7f8846b655afed05b74f)
---
 tests/sys/capsicum/Makefile              | 27 ++++++++++++++++++---------
 tests/sys/capsicum/capsicum-test-main.cc | 24 ++++++++++++++++++++++++
 2 files changed, 42 insertions(+), 9 deletions(-)

diff --git a/tests/sys/capsicum/Makefile b/tests/sys/capsicum/Makefile
index 788fa9f9394c..ddd6eadcfc0e 100644
--- a/tests/sys/capsicum/Makefile
+++ b/tests/sys/capsicum/Makefile
@@ -9,14 +9,11 @@ CFLAGS+=	-I${SRCTOP}/tests
 
 .if ${MK_GOOGLETEST} != no
 
-GTESTS+=	capsicum-test
-# This test script runs the same test suite twice, once as root and once as an
-# unprivileged user.  Serialize them since some tests access global namespaces,
-# e.g., mqueuefs, and can trample on each other.
-TEST_METADATA.functional+=	is_exclusive="true"
-TEST_METADATA.functional+=	required_kmods="mqueuefs"
+GTESTS+=	capsicum-test_privileged
+GTESTS+=	capsicum-test_unprivileged
 
-SRCS.capsicum-test+=	\
+# SRCS required for `capsicum-test*`.
+SRCS.capsicum-test=	\
 	capsicum-test-main.cc \
 	capsicum-test.cc \
 	capability-fd.cc \
@@ -36,8 +33,20 @@ SRCS.capsicum-test+=	\
 	overhead.cc \
 	rename.cc
 
-LIBADD.capsicum-test+=	gtest pthread procstat
-TEST_METADATA.capsicum-test=	required_user="unprivileged"
+.for gtest in ${GTESTS}
+SRCS.${gtest}=			${SRCS.capsicum-test}
+
+LIBADD.${gtest}+=		gtest pthread procstat
+
+# This test script runs the same test suite twice, once as root and once as an
+# unprivileged user.  Serialize them since some tests access global namespaces,
+# e.g., mqueuefs, and can trample on each other.
+TEST_METADATA.${gtest}+=	is_exclusive="true"
+TEST_METADATA.${gtest}+=	required_kmods="mqueuefs"
+.endfor
+
+TEST_METADATA.capsicum-test_privileged+=	required_user="root"
+TEST_METADATA.capsicum-test_unprivileged+=	required_user="unprivileged"
 
 .for p in mini-me mini-me.noexec mini-me.setuid
 PROGS+=		$p
diff --git a/tests/sys/capsicum/capsicum-test-main.cc b/tests/sys/capsicum/capsicum-test-main.cc
index 2a2c75000039..308c121a0281 100644
--- a/tests/sys/capsicum/capsicum-test-main.cc
+++ b/tests/sys/capsicum/capsicum-test-main.cc
@@ -136,6 +136,30 @@ int main(int argc, char* argv[]) {
     }
   }
 
+  // Last ditch effort to get an unprivileged user on the fly from /etc/passwd
+  // for testcases that need it.
+  //
+  // This must be done this way because the typical way of handling this (via
+  // the `-u` argument) isn't supported yet with kyua:
+  // https://github.com/freebsd/kyua/issues/354 .
+  //
+  // IMPORTANT:
+  // - this doesn't honor `unprivileged_user` in `kyua.conf`.
+  // - this doesn't fail because doing that could break all testing on systems
+  //   where the `tests` user isn't available.
+  if (other_uid == 0) {
+    const char *test_user = "tests";
+
+    struct passwd *test_user_entry = getpwnam(test_user);
+
+    if (test_user_entry) {
+       other_uid = test_user_entry->pw_uid;
+    } else {
+       std::cerr << "Failed to get entry for " << test_user << ", errno=" << errno << "; some tests may fail" << std::endl;
+    }
+
+  }
+
   testing::AddGlobalTestEnvironment(new SetupEnvironment());
   return RUN_ALL_TESTS();
 }

From nobody Mon Nov 23 01:18:41 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXp4216Yhz71TTs
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:18: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp416dw9z4bkk
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:41 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795396722;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Ha1aEWCxrPNDkwqRNP0Wc9OfG7aPpHoo6OQvBX/njwk=;
	b=amx8KQ/LwdsijWQE20W5qUI5Ol2lpwNRHBdKR87HQRHGwDcEaEOBnr/qEy7+Iz51YP8gIX
	g/Ru3GsaQ5FjFy7m5E0dkJb4ktEiC+Q2C4dZljXE9tkZqVtegWV7gOel6BIAwDCNM9gddh
	yQSOVCjz0QM13g1jAY1OtSbhXPn8lIiTgU9QqeFKpk7yaLPUlAnTCj/sUsfRtZvX0cyRjc
	j/VQ7i1oKHO6YGgIL6mce2BO06dts7uMTfvgGFgu1EN08naLVAcSPS0iVDfCebvcbJhHrV
	RwGQ/Ri1+bCpIxHV6aeG/CmttQvzTTfY6u8cpAny/NbOeTSAxStGCd4hQzkTCg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396722;
	b=P80FoMfM0sJCQsy4/WZPlAiaUL3TNvGqNSANEWwyJIN0/uSUxSCjHrl8e3x8a9s3lwEfcR
	uGq8gSYtcs48ZxibpJQoOsn5VkdYk0EEkgFH2O1rfPL8sKsYjM9BSyoAECypBoaqMAdaWP
	a4R4MyIEzeHHrceWdljcI85PuzufnHqra6vEdgx61Tf7mTE3/WzGelINwpL3YuKR7ObzQc
	HdJNz5Bjc+pM9vywPQGkimkyMb+4JrbnM2gSHB1Kc6e0Cb1eKU6OrSqwv6WDIUHnjYV6HY
	WSGgfxRf81akyU5KqRoi9gpLn5bx8btqRmTgrku8NE/P/aoALYzg53QuA6BFdA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795396722;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Ha1aEWCxrPNDkwqRNP0Wc9OfG7aPpHoo6OQvBX/njwk=;
	b=wdYYXfh91qnTxc0tqI20012Lq26gws7iEc7fMgDoTciZYBFKfRJCHcSzp/tboHkXvPXT6Q
	0N0+WfbGRQ2ZDrDjpKiCH9YZI+/J2uavmEJyuP4A1x9qwtRRCN8UqGLFKZgfryctNMy+Dv
	iS2Q+O9c6G70mFlHUHWZyLkBLBxC8KxBn8D9C8XCXi2gcQ6Vn2AIZ/rQouCBSc+5H/9sO5
	hkjQLKXeZWvZNeBPvKtF48NEBvn98I/3nMReStKyr/9/NWOY60Dq2aGAxGSdwoaJM7gy28
	hSUzKGRa0+64bWYOvj85v3RPPsMKxnLjSCVU+7suKohHJycRFgodmJAA2dcHoA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp416G0FzSbY
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:41 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 2f93
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:18:41 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 0c2d403b0a2d - stable/15 - capsicum-test: make the code WARNS=6 clean
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 0c2d403b0a2d0bcf729ec413d16ee84f01c5c807
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:18:41 +0000
Message-Id: <6b039471.2f93.6bf34e66@gitrepo.freebsd.org>

The branch stable/15 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=0c2d403b0a2d0bcf729ec413d16ee84f01c5c807

commit 0c2d403b0a2d0bcf729ec413d16ee84f01c5c807
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-11-10 01:52:55 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:17:40 +0000

    capsicum-test: make the code WARNS=6 clean
    
    Make the code WARNS=6 clean by doing the following:
    - Renaming variables (-Wshadow).
    - Use memcpy instead of assigning the result of CMSG_DATA to a variable
      (-Wcast-align).
    - Wrap some macros with do-while(0) to avoid variable collisions
      (-Wshadow).
    - Push one of the TRACE statements up by 1 layer to avoid a collision
      between 2 calls of TRACE via the same overarching macro.
    
    This was needed in order for the code to build properly with D61066,
    since the code was not compiling with WARNS set to 3 at the testcase
    level.
    
    MFC after: 1 week
    Reviewed by:    markj
    Differential Revision:  https://reviews.freebsd.org/D61080
    
    (cherry picked from commit 04c4b2084eb93fc2374dbb89f343f3941585a640)
---
 tests/sys/capsicum/capability-fd.cc      | 10 +++--
 tests/sys/capsicum/capmode.cc            |  2 +-
 tests/sys/capsicum/capsicum-freebsd.h    | 15 +++----
 tests/sys/capsicum/capsicum-test-main.cc |  8 +++-
 tests/sys/capsicum/capsicum-test.h       | 36 +++++++++++-----
 tests/sys/capsicum/fexecve.cc            | 12 +++---
 tests/sys/capsicum/procdesc.cc           |  6 ++-
 tests/sys/capsicum/sctp.cc               | 30 +++++++-------
 tests/sys/capsicum/socket.cc             | 70 ++++++++++++++++----------------
 9 files changed, 107 insertions(+), 82 deletions(-)

diff --git a/tests/sys/capsicum/capability-fd.cc b/tests/sys/capsicum/capability-fd.cc
index a9e4d30ac4b9..d79f3e4be917 100644
--- a/tests/sys/capsicum/capability-fd.cc
+++ b/tests/sys/capsicum/capability-fd.cc
@@ -974,6 +974,8 @@ FORK_TEST_ON(Capability, SocketTransfer, TmpFile("cap_fd_transfer")) {
 
   pid_t child = fork();
   if (child == 0) {
+    int child_cap_fd;
+
     // Child: enter cap mode
     EXPECT_OK(cap_enter());
     // Child: send startup notification
@@ -984,16 +986,16 @@ FORK_TEST_ON(Capability, SocketTransfer, TmpFile("cap_fd_transfer")) {
     EXPECT_OK(rc);
     EXPECT_LE(CMSG_LEN(sizeof(int)), mh.msg_controllen);
     cmptr = CMSG_FIRSTHDR(&mh);
-    int cap_fd = *(int*)CMSG_DATA(cmptr);
+    memcpy(&child_cap_fd, CMSG_DATA(cmptr), sizeof(child_cap_fd));
     EXPECT_EQ(CMSG_LEN(sizeof(int)), cmptr->cmsg_len);
     cmptr = CMSG_NXTHDR(&mh, cmptr);
     EXPECT_TRUE(cmptr == NULL);
 
     // Child: confirm we can do the right operations on the capability
     cap_rights_t rights;
-    EXPECT_OK(cap_rights_get(cap_fd, &rights));
+    EXPECT_OK(cap_rights_get(child_cap_fd, &rights));
     EXPECT_RIGHTS_EQ(&r_rs, &rights);
-    TryReadWrite(cap_fd);
+    TryReadWrite(child_cap_fd);
 
     // Child: acknowledge that we have received and tested the file descriptor
     SEND_INT_MESSAGE(sock_fds[0], MSG_CHILD_FD_RECEIVED);
@@ -1024,7 +1026,7 @@ FORK_TEST_ON(Capability, SocketTransfer, TmpFile("cap_fd_transfer")) {
   cmptr->cmsg_level = SOL_SOCKET;
   cmptr->cmsg_type = SCM_RIGHTS;
   cmptr->cmsg_len = CMSG_LEN(sizeof(int));
-  *(int *)CMSG_DATA(cmptr) = cap_fd;
+  memcpy(CMSG_DATA(cmptr), &cap_fd, sizeof(cap_fd));
   buffer1[0] = 0;
   iov[0].iov_len = 1;
   int rc = sendmsg(sock_fds[1], &mh, 0);
diff --git a/tests/sys/capsicum/capmode.cc b/tests/sys/capsicum/capmode.cc
index fdc572f11b5b..4cf6f24420e3 100644
--- a/tests/sys/capsicum/capmode.cc
+++ b/tests/sys/capsicum/capmode.cc
@@ -158,7 +158,7 @@ FORK_TEST_F(WithFiles, AllowedSocketSyscalls) {
   if (rc < 0) {
     EXPECT_EQ(EAGAIN, errno);
   }
-  char ch;
+  char ch = 'a';
   EXPECT_OK(write(fd_file_, &ch, sizeof(ch)));
 
   // These calls will fail for lack of e.g. a proper name to send to,
diff --git a/tests/sys/capsicum/capsicum-freebsd.h b/tests/sys/capsicum/capsicum-freebsd.h
index 9cb3149a05a4..82ee9cf9d91c 100644
--- a/tests/sys/capsicum/capsicum-freebsd.h
+++ b/tests/sys/capsicum/capsicum-freebsd.h
@@ -4,15 +4,15 @@
  * FreeBSD Capsicum Functionality.
  ************************************************************/
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
 
 /* FreeBSD definitions. */
-#include <errno.h>
 #include <sys/param.h>
 #include <sys/capsicum.h>
 #include <sys/procdesc.h>
+#include <errno.h>
 
 #define AT_SYSCALLS_IN_CAPMODE
 #define HAVE_CAP_RIGHTS_GET
@@ -27,9 +27,7 @@ typedef unsigned long cap_ioctl_t;
 
 #define HAVE_OPENAT_INTERMEDIATE_DOTDOT
 
-#ifdef __cplusplus
-}
-#endif
+__END_DECLS
 
 // Use fexecve_() in tests to allow Linux variant to bypass glibc version.
 #define fexecve_(F, A, E) fexecve(F, A, E)
@@ -50,4 +48,7 @@ typedef unsigned long cap_ioctl_t;
 // FreeBSD generates a capability from sctp_peeloff(cap_fd,...).
 #define CAP_FROM_PEELOFF
 
+#define	HAVE_PIPE2
+#define	HAVE_SEND_RECV_MMSG
+
 #endif /*__CAPSICUM_FREEBSD_H__*/
diff --git a/tests/sys/capsicum/capsicum-test-main.cc b/tests/sys/capsicum/capsicum-test-main.cc
index 308c121a0281..a39e192aa385 100644
--- a/tests/sys/capsicum/capsicum-test-main.cc
+++ b/tests/sys/capsicum/capsicum-test-main.cc
@@ -75,12 +75,16 @@ std::string capsicum_test_bindir;
 // Adds a directory to $PATH.
 static void AddDirectoryToPath(const char *dir) {
   char *new_path, *old_path;
+  int rc [[maybe_unused]];
 
   old_path = getenv("PATH");
   assert(old_path);
 
-  assert(asprintf(&new_path, "%s:%s", dir, old_path) > 0);
-  assert(setenv("PATH", new_path, 1) == 0);
+  rc = asprintf(&new_path, "%s:%s", dir, old_path);
+  assert(rc != -1);
+  rc = setenv("PATH", new_path, 1);
+  assert(rc == 0);
+  free(new_path);
 }
 
 int main(int argc, char* argv[]) {
diff --git a/tests/sys/capsicum/capsicum-test.h b/tests/sys/capsicum/capsicum-test.h
index 7433814b31c8..5503a7ef260f 100644
--- a/tests/sys/capsicum/capsicum-test.h
+++ b/tests/sys/capsicum/capsicum-test.h
@@ -67,7 +67,7 @@ const char *TmpFile(const char *pathname);
 // Implemented as a macro to allow access to the test case instance's
 // HasFailure() method, which is reported as the forked process's
 // exit status.
-#define _RUN_FORKED(INNERCODE, TESTCASENAME, TESTNAME)         \
+#define _RUN_FORKED(INNERCODE, TESTCASENAME, TESTNAME) do {    \
     pid_t pid = force_nofork ? 0 : fork();                     \
     if (pid == 0) {                                            \
       INNERCODE;                                               \
@@ -95,10 +95,13 @@ const char *TmpFile(const char *pathname);
                         strerror(errno), errno);               \
         ADD_FAILURE() << "Failed to wait for child";           \
       } else {                                                 \
-        int rc = WIFEXITED(status) ? WEXITSTATUS(status) : -1; \
-        EXPECT_EQ(0, rc);                                      \
+        int exit_status =                                      \
+          WIFEXITED(status) ? WEXITSTATUS(status) : -1;        \
+        EXPECT_EQ(0, exit_status);                             \
       }                                                        \
-    }
+    }                                                          \
+} while (0)
+
 #define _RUN_FORKED_MEM(THIS, TESTFN, TESTCASENAME, TESTNAME)  \
   _RUN_FORKED(MaybeRunWithThread(THIS, &TESTFN), TESTCASENAME, TESTNAME);
 #define _RUN_FORKED_FN(TESTFN, TESTCASENAME, TESTNAME)   \
@@ -137,15 +140,28 @@ const char *TmpFile(const char *pathname);
 // Emit errno information on failure
 #define EXPECT_OK(v) EXPECT_LE(0, v) << "   errno " << errno << " " << strerror(errno)
 
-// Expect a syscall to fail with the given error.
-#define EXPECT_SYSCALL_FAIL(E, C) \
+// Expect a syscall to fail with the given error (inner).
+//
+// This is required because unfortunately googletest "computes" trace variables
+// using line numbers instead of another unique ID and 2 calls to
+// `SCOPED_TRACE(..)` via the same macro results in `-Wshadow`-related compiler
+// errors: https://github.com/google/googletest/issues/5143
+#define EXPECT_SYSCALL_FAIL_NO_TRACE(E, C) \
     do { \
-      SCOPED_TRACE(#C); \
       EXPECT_GT(0, C); \
       EXPECT_EQ(E, errno) << "expected '" << strerror(E) \
                           << "' but got '" << strerror(errno) << "'"; \
     } while (0)
 
+// Expect a syscall to fail with the given error (with tracing).
+//
+// See the comment above (for `EXPECT_SYSCALL_FAIL_NO_TRACE`).
+#define EXPECT_SYSCALL_FAIL(E, C) \
+    do { \
+      SCOPED_TRACE(#C); \
+      EXPECT_SYSCALL_FAIL_NO_TRACE((E), (C)); \
+    } while (0)
+
 // Expect a syscall to fail with anything other than the given error.
 #define EXPECT_SYSCALL_FAIL_NOT(E, C) \
     do { \
@@ -169,9 +185,9 @@ const char *TmpFile(const char *pathname);
       SCOPED_TRACE(GTEST_STRINGIFY_(openat((fd), (path), (flags)))); \
       const int result = openat((fd), (path), (flags)); \
       if (((flags) & O_BENEATH) == O_BENEATH) { \
-        EXPECT_SYSCALL_FAIL(E_NO_TRAVERSE_O_BENEATH, result); \
+        EXPECT_SYSCALL_FAIL_NO_TRACE(E_NO_TRAVERSE_O_BENEATH, result); \
       } else { \
-        EXPECT_SYSCALL_FAIL(E_NO_TRAVERSE_CAPABILITY, result); \
+        EXPECT_SYSCALL_FAIL_NO_TRACE(E_NO_TRAVERSE_CAPABILITY, result); \
       } \
       if (result >= 0) { close(result); } \
     } while (0)
@@ -180,7 +196,7 @@ const char *TmpFile(const char *pathname);
     do { \
       SCOPED_TRACE(GTEST_STRINGIFY_(openat((fd), (path), (flags)))); \
       const int result = openat((fd), (path), (flags)); \
-      EXPECT_SYSCALL_FAIL(E_NO_TRAVERSE_CAPABILITY, result); \
+      EXPECT_SYSCALL_FAIL_NO_TRACE(E_NO_TRAVERSE_CAPABILITY, result); \
       if (result >= 0) { close(result); } \
     } while (0)
 #endif
diff --git a/tests/sys/capsicum/fexecve.cc b/tests/sys/capsicum/fexecve.cc
index 86df2af06388..6ff5a657c35a 100644
--- a/tests/sys/capsicum/fexecve.cc
+++ b/tests/sys/capsicum/fexecve.cc
@@ -32,9 +32,9 @@ class Execve : public ::testing::Test {
     if (exec_fd_ < 0) {
       fprintf(stderr, "Error! Failed to open %s\n", exec_prog_.c_str());
     }
-    argv_checkroot_[0] = (char*)exec_prog_.c_str();
-    argv_fail_[0] = (char*)exec_prog_.c_str();
-    argv_pass_[0] = (char*)exec_prog_.c_str();
+    argv_checkroot_[0] = __DECONST(char*, exec_prog_.c_str());
+    argv_fail_[0] = __DECONST(char*, exec_prog_.c_str());
+    argv_pass_[0] = __DECONST(char*, exec_prog_.c_str());
   }
   ~Execve() {
     if (exec_fd_ >= 0) {
@@ -43,9 +43,9 @@ class Execve : public ::testing::Test {
     }
   }
 protected:
-  char* argv_checkroot_[3] = {nullptr, (char*)"--checkroot", nullptr};
-  char* argv_fail_[3] = {nullptr, (char*)"--fail", nullptr};
-  char* argv_pass_[3] = {nullptr, (char*)"--pass", nullptr};
+  char* argv_checkroot_[3] = {nullptr, __DECONST(char*, "--checkroot"), nullptr};
+  char* argv_fail_[3] = {nullptr, __DECONST(char*, "--fail"), nullptr};
+  char* argv_pass_[3] = {nullptr, __DECONST(char*, "--pass"), nullptr};
   std::string exec_prog_, exec_prog_noexec_, exec_prog_setuid_;
   int exec_fd_;
 };
diff --git a/tests/sys/capsicum/procdesc.cc b/tests/sys/capsicum/procdesc.cc
index f25324e4efc7..c92edaf4b695 100644
--- a/tests/sys/capsicum/procdesc.cc
+++ b/tests/sys/capsicum/procdesc.cc
@@ -983,6 +983,8 @@ TEST_F(PipePdfork, PassProcessDescriptor) {
   if (verbose) fprintf(stderr, "[%d] about to fork()\n", getpid_());
   pid_t child2 = fork();
   if (child2 == 0) {
+    int pd;
+
     // Child: close our copy of the original process descriptor.
     close(pd_);
     SEND_INT_MESSAGE(sock_fds[0], MSG_CHILD_STARTED);
@@ -992,7 +994,7 @@ TEST_F(PipePdfork, PassProcessDescriptor) {
     EXPECT_OK(rc);
     EXPECT_LE(CMSG_LEN(sizeof(int)), mh.msg_controllen);
     cmptr = CMSG_FIRSTHDR(&mh);
-    int pd = *(int*)CMSG_DATA(cmptr);
+    memcpy(&pd, CMSG_DATA(cmptr), sizeof(pd));
     EXPECT_EQ(CMSG_LEN(sizeof(int)), cmptr->cmsg_len);
     cmptr = CMSG_NXTHDR(&mh, cmptr);
     EXPECT_TRUE(cmptr == NULL);
@@ -1024,7 +1026,7 @@ TEST_F(PipePdfork, PassProcessDescriptor) {
   cmptr->cmsg_level = SOL_SOCKET;
   cmptr->cmsg_type = SCM_RIGHTS;
   cmptr->cmsg_len = CMSG_LEN(sizeof(int));
-  *(int *)CMSG_DATA(cmptr) = pd_;
+  memcpy(CMSG_DATA(cmptr), &pd_, sizeof(pd_));
   buffer1[0] = 0;
   iov[0].iov_len = 1;
   if (verbose) fprintf(stderr, "[%d] send process descriptor %d on socket\n", getpid_(), pd_);
diff --git a/tests/sys/capsicum/sctp.cc b/tests/sys/capsicum/sctp.cc
index aa84653c5b2a..a36a242f8c9b 100644
--- a/tests/sys/capsicum/sctp.cc
+++ b/tests/sys/capsicum/sctp.cc
@@ -92,13 +92,13 @@ TEST(Sctp, Socket) {
   addr.sin_family = AF_INET;
   addr.sin_port = htons(0);
   addr.sin_addr.s_addr = htonl(INADDR_ANY);
-  socklen_t len = sizeof(addr);
+  socklen_t addr_len = sizeof(addr);
 
   // Can only bind the fully-capable socket.
-  EXPECT_NOTCAPABLE(bind(cap_sock_rw, (struct sockaddr *)&addr, len));
-  EXPECT_OK(bind(cap_sock_all, (struct sockaddr *)&addr, len));
+  EXPECT_NOTCAPABLE(bind(cap_sock_rw, (struct sockaddr *)&addr, addr_len));
+  EXPECT_OK(bind(cap_sock_all, (struct sockaddr *)&addr, addr_len));
 
-  EXPECT_OK(getsockname(cap_sock_all, (struct sockaddr *)&addr, &len));
+  EXPECT_OK(getsockname(cap_sock_all, (struct sockaddr *)&addr, &addr_len));
   int port = ntohs(addr.sin_port);
 
   // Now we know the port involved, fork off children to run clients.
@@ -128,43 +128,43 @@ TEST(Sctp, Socket) {
   EXPECT_OK(listen(cap_sock_all, 3));
 
   // Can only do socket operations on the fully-capable socket.
-  len = sizeof(addr);
-  EXPECT_NOTCAPABLE(getsockname(cap_sock_rw, (struct sockaddr*)&addr, &len));
+  addr_len = sizeof(addr);
+  EXPECT_NOTCAPABLE(getsockname(cap_sock_rw, (struct sockaddr*)&addr, &addr_len));
 
   struct sctp_event_subscribe events;
   memset(&events, 0, sizeof(events));
   events.sctp_association_event = 1;
   events.sctp_data_io_event = 1;
   EXPECT_NOTCAPABLE(setsockopt(cap_sock_rw, IPPROTO_SCTP, SCTP_EVENTS, &events, sizeof(events)));
-  len = sizeof(events);
-  EXPECT_NOTCAPABLE(getsockopt(cap_sock_rw, IPPROTO_SCTP, SCTP_EVENTS, &events, &len));
+  socklen_t eventslen = sizeof(events);
+  EXPECT_NOTCAPABLE(getsockopt(cap_sock_rw, IPPROTO_SCTP, SCTP_EVENTS, &events, &eventslen));
   memset(&events, 0, sizeof(events));
   events.sctp_association_event = 1;
   events.sctp_data_io_event = 1;
   EXPECT_OK(setsockopt(cap_sock_all, IPPROTO_SCTP, SCTP_EVENTS, &events, sizeof(events)));
-  len = sizeof(events);
-  EXPECT_OK(getsockopt(cap_sock_all, IPPROTO_SCTP, SCTP_EVENTS, &events, &len));
+  eventslen = sizeof(events);
+  EXPECT_OK(getsockopt(cap_sock_all, IPPROTO_SCTP, SCTP_EVENTS, &events, &eventslen));
 
-  len = sizeof(addr);
+  addr_len = sizeof(addr);
   memset(&addr, 0, sizeof(addr));
-  EXPECT_OK(getsockname(cap_sock_all, (struct sockaddr*)&addr, &len));
+  EXPECT_OK(getsockname(cap_sock_all, (struct sockaddr*)&addr, &addr_len));
   EXPECT_EQ(AF_INET, addr.sin_family);
   EXPECT_EQ(htons(port), addr.sin_port);
 
   struct sockaddr_in client_addr;
-  socklen_t addr_len = sizeof(client_addr);
+  socklen_t client_addr_len = sizeof(client_addr);
   unsigned char buffer[1024];
   struct sctp_sndrcvinfo sri;
   memset(&sri, 0, sizeof(sri));
   int flags = 0;
   EXPECT_NOTCAPABLE(sctp_recvmsg(cap_sock_wo, buffer, sizeof(buffer),
-                                 (struct sockaddr*)&client_addr, &addr_len,
+                                 (struct sockaddr*)&client_addr, &client_addr_len,
                                  &sri, &flags));
   while (true) {
   retry:
     memset(&sri, 0, sizeof(sri));
     int len = sctp_recvmsg(cap_sock_rw, buffer, sizeof(buffer),
-                           (struct sockaddr*)&client_addr, &addr_len,
+                           (struct sockaddr*)&client_addr, &client_addr_len,
                            &sri, &flags);
     if (len < 0 && errno == EAGAIN) goto retry;
     EXPECT_OK(len);
diff --git a/tests/sys/capsicum/socket.cc b/tests/sys/capsicum/socket.cc
index 5bb7e9d3e180..ff21d3020a83 100644
--- a/tests/sys/capsicum/socket.cc
+++ b/tests/sys/capsicum/socket.cc
@@ -166,26 +166,26 @@ TEST(Socket, TCP) {
     AWAIT_INT_MESSAGE(pipefds[1], MSG_PARENT_CHILD_SHOULD_RUN);
 
     // Create sockets
-    int sock = socket(AF_INET, SOCK_STREAM, 0);
-    EXPECT_OK(sock);
-    if (sock < 0) return;
-    int cap_sock_rw = dup(sock);
-    EXPECT_OK(cap_sock_rw);
-    EXPECT_OK(cap_rights_limit(cap_sock_rw, &r_rw));
-    int cap_sock_all = dup(sock);
-    EXPECT_OK(cap_sock_all);
-    EXPECT_OK(cap_rights_limit(cap_sock_all, &r_all));
-    close(sock);
+    int child_sock = socket(AF_INET, SOCK_STREAM, 0);
+    EXPECT_OK(child_sock);
+    if (child_sock < 0) return;
+    int child_cap_sock_rw = dup(child_sock);
+    EXPECT_OK(child_cap_sock_rw);
+    EXPECT_OK(cap_rights_limit(child_cap_sock_rw, &r_rw));
+    int child_cap_sock_all = dup(child_sock);
+    EXPECT_OK(child_cap_sock_all);
+    EXPECT_OK(cap_rights_limit(child_cap_sock_all, &r_all));
+    close(child_sock);
 
     // Connect socket
-    struct sockaddr_in addr;
-    memset(&addr, 0, sizeof(addr));
-    addr.sin_family = AF_INET;
-    addr.sin_port = htons(port);  // Pick unused port
-    addr.sin_addr.s_addr = inet_addr("127.0.0.1");
-    socklen_t len = sizeof(addr);
-    EXPECT_NOTCAPABLE(connect_(cap_sock_rw, (struct sockaddr *)&addr, len));
-    EXPECT_OK(connect_(cap_sock_all, (struct sockaddr *)&addr, len));
+    struct sockaddr_in child_addr;
+    memset(&child_addr, 0, sizeof(child_addr));
+    child_addr.sin_family = AF_INET;
+    child_addr.sin_port = htons(port);  // Pick unused port
+    child_addr.sin_addr.s_addr = inet_addr("127.0.0.1");
+    socklen_t child_addr_len = sizeof(child_addr);
+    EXPECT_NOTCAPABLE(connect_(child_cap_sock_rw, (struct sockaddr *)&child_addr, child_addr_len));
+    EXPECT_OK(connect_(child_cap_sock_all, (struct sockaddr *)&child_addr, child_addr_len));
 
     exit(HasFailure());
   }
@@ -291,15 +291,15 @@ TEST(Socket, UDP) {
 
   pid_t child = fork();
   if (child == 0) {
-    int sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
-    EXPECT_OK(sock);
-    int cap_sock_rw = dup(sock);
-    EXPECT_OK(cap_sock_rw);
-    EXPECT_OK(cap_rights_limit(cap_sock_rw, &r_rw));
-    int cap_sock_connect = dup(sock);
+    int child_sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
+    EXPECT_OK(child_sock);
+    int child_cap_sock_rw = dup(child_sock);
+    EXPECT_OK(child_cap_sock_rw);
+    EXPECT_OK(cap_rights_limit(child_cap_sock_rw, &r_rw));
+    int cap_sock_connect = dup(child_sock);
     EXPECT_OK(cap_sock_connect);
     EXPECT_OK(cap_rights_limit(cap_sock_connect, &r_connect));
-    close(sock);
+    close(child_sock);
 
     // Can only sendmsg(2) to an address over a socket with CAP_CONNECT.
     unsigned char buffer[256];
@@ -313,25 +313,25 @@ TEST(Socket, UDP) {
     mh.msg_iov = &iov;
     mh.msg_iovlen = 1;
 
-    struct sockaddr_in addr;
-    memset(&addr, 0, sizeof(addr));
-    addr.sin_family = AF_INET;
-    addr.sin_port = htons(port);
-    addr.sin_addr.s_addr = inet_addr("127.0.0.1");
-    mh.msg_name = &addr;
-    mh.msg_namelen = sizeof(addr);
+    struct sockaddr_in child_addr;
+    memset(&child_addr, 0, sizeof(child_addr));
+    child_addr.sin_family = AF_INET;
+    child_addr.sin_port = htons(port);
+    child_addr.sin_addr.s_addr = inet_addr("127.0.0.1");
+    mh.msg_name = &child_addr;
+    mh.msg_namelen = sizeof(child_addr);
 
-    EXPECT_NOTCAPABLE(sendmsg(cap_sock_rw, &mh, 0));
+    EXPECT_NOTCAPABLE(sendmsg(child_cap_sock_rw, &mh, 0));
     EXPECT_OK(sendmsg(cap_sock_connect, &mh, 0));
 
 #ifdef HAVE_SEND_RECV_MMSG
     struct mmsghdr mv;
     memset(&mv, 0, sizeof(mv));
     memcpy(&mv.msg_hdr, &mh, sizeof(struct msghdr));
-    EXPECT_NOTCAPABLE(sendmmsg(cap_sock_rw, &mv, 1, 0));
+    EXPECT_NOTCAPABLE(sendmmsg(child_cap_sock_rw, &mv, 1, 0));
     EXPECT_OK(sendmmsg(cap_sock_connect, &mv, 1, 0));
 #endif
-    close(cap_sock_rw);
+    close(child_cap_sock_rw);
     close(cap_sock_connect);
     exit(HasFailure());
   }

From nobody Mon Nov 23 01:18:42 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXp4321NKz71Tc2
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:18: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp426wwgz4c3f
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:42 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795396723;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=bRuL6+Fy7rrj277VT9rZs1mOkHQrJHncIB+tD1H783M=;
	b=Q4nuoiOoXrC8HlTfxK5bTlyliQ+SSXk3rjZZQGNhTrrvrwJ9DGopCCYfbCcY5IiHLPklcE
	MsVvHg7VJ9JlclPCupcRnPPr8xIG+VHCYDRqXEq9D5uTMKRO/7P9/lbpSYkziCL7D8Fvur
	l1jICJOZLeJ22egDllC2cS3nxdbedANldRYtjH2d+nmT4KYHIUEEOKnT/guE0V7XVc8d3n
	ij31lZUQU+JUl2Np3S3wrN82p+gBNNsxs5ybgjpvYlwoYzuB7nUhpkFzjBd1ObZyaDMxxF
	FlLKlsJ4GbC1KG4FBtnWMDtXzHpRQFXrPmx6NQ1JJ/YnaEA3DE8XN0VZ4tVMFA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396723;
	b=KxP9D88MnFVPtxdcc5EyrEN66AiVPKDEMfDlmwIvaZOsoR+qLvkMPDltsmVK3S+oo3JRCz
	CxqMpUpHEuOvI/7yWU3OmMoiDe0SGBWvW8mipY5s6ZwowvLu2liErr1iSd+Fv7HycGyiiu
	cv8hxga4lJptQnMFVV6CKCpUll8aLvYvOChJFzeemQplYisMxxAzpp0B20QXiDksEgRttA
	uvuQ7srfs1JPW14ZTi6E4dK4f35vVFPmvyYfrRJ28Do5tNYHtPAl8ZqHuZLlrOfvxJDROA
	FFxwqgFhmEIGLhuTHpmZERFF/bqsp7qQIteut7OvPBCjcLCjundorfDlB7Lm9A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795396723;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=bRuL6+Fy7rrj277VT9rZs1mOkHQrJHncIB+tD1H783M=;
	b=W1Zojr3InVxqzA4DeHphnctsKALcywud+rGL+5Y3taVFwuqliZB2zZE3z09y/SXSOmqqMG
	qqSiGHPOZn1cX5RVcwZefZ9LcOcUfrZBmaieO8XCYJBdaT09t/DUhXs07h1B8oYRkSbJYc
	KBC2HhGQTvfRe2wlCB6p2P1GGAQ5RdfPtbalQldjC9zwMAVvjGPqPNoQ0BZiK2Vkntp5Fk
	t8qmyblHvqjIQwU3iTov5lJoFS0ScyJQlqwOiuyxH1OVCttQ5rvnwi6ft3fgU6sZxiWd6/
	28GGjuP/vbqF23Z9Xgg+VmFyWAs68Rc67Tzkg9PDHNoEFZZL8wmf/Q41jp6EIA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp426VKhzRl1
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:42 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1ee7
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:18:42 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: da540afdf40e - stable/15 - capsicum-test: Disable `HAVE_SEND_RECV_MMSG` again
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: da540afdf40eebd457e036934705643d6c33e55f
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:18:42 +0000
Message-Id: <6b039472.1ee7.22604c9d@gitrepo.freebsd.org>

The branch stable/15 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=da540afdf40eebd457e036934705643d6c33e55f

commit da540afdf40eebd457e036934705643d6c33e55f
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-11-10 02:05:33 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:17:40 +0000

    capsicum-test: Disable `HAVE_SEND_RECV_MMSG` again
    
    04c4b2084eb9 accidentally added some changes from another WIP commit into that
    diff. Instead of wholesale reverting the change, just revert the part that's
    currently broken (`HAVE_SEND_RECV_MMSG`). While some of the related tests pass,
    one of the testcases (`capmode.cc:AllowedMmsgSendRecv`) doesn't currently pass.
    
    Revert the change to make the CI run more green again.
    
    MFC after:      1 week
    Fixes:  04c4b2084eb9 ("capsicum-test: make the code WARNS=6 clean")
    
    (cherry picked from commit 71eddb44d7dfa60e43f77c90b51bd091f0693f85)
---
 tests/sys/capsicum/capsicum-freebsd.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/sys/capsicum/capsicum-freebsd.h b/tests/sys/capsicum/capsicum-freebsd.h
index 82ee9cf9d91c..ea14dd76a505 100644
--- a/tests/sys/capsicum/capsicum-freebsd.h
+++ b/tests/sys/capsicum/capsicum-freebsd.h
@@ -49,6 +49,10 @@ __END_DECLS
 #define CAP_FROM_PEELOFF
 
 #define	HAVE_PIPE2
+
+/* capmode.cc:AllowedMmsgSendRecv: the tests don't pass on FreeBSD (yet?). */
+#if 0
 #define	HAVE_SEND_RECV_MMSG
+#endif
 
 #endif /*__CAPSICUM_FREEBSD_H__*/

From nobody Mon Nov 23 01:18:43 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXp444fSfz71THd
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:18: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp4403jhz4bnJ
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:44 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795396724;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=6QZuznel/qYxSBzWBnR6eQDq43z+g7UaLgB0HoVyF0c=;
	b=fRE5BMArygwIc0zlofuK5yw0n80t6THtWzn4MG9irhQIE5XEZFSzAvhpVmf89uejcSCHNr
	Rh5xRiXa/x6BecqPqHCGuDPQNf1sLOI1uA1+n4xWIs7ZZz8liCxgATP4XteDOrFzi+GGep
	8EQqLTq11r/8uZ8wjYmzD6n2VgEPF1A/NpWfnkzo0Pko+eFIPNjKBk8WW++g8VQlLqi0+U
	WC3t8tlknV1lePiuUEMSbXSaVmqXEWit+xjD8z5CFidXXmDlsM+xKfntqzRG3QvSwpLKIe
	kA4yS3KD1oQZP3UG/Sg4GWF6+i235DNUfLY9j4R+25WJ73FaTP1AZNn/KCUBbQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396724;
	b=Sc6ADoaEBNwC5AN3mEjocQiuFrYrXJzoW/807xrDrsnliXxGTepJ7/+T/vV74/Mb9CbABS
	GVLnX9Fjq4chUozZsT7dAqLteuYzQucaRT02Pjnh82Mz2i+l09JqrzNfQEKnSh+HgxlOvj
	itiIR05gk5U7nGRbkbuWYLyTwpkHDOQhWbSv2avJI50h04p5NR8g8hydUsDzigrAU3piBE
	86tB9B2GTI5tZAKNVcj6W+MmmXRRmdQSA3CTIGueHQJTJDkVtJiakWc7lLJOU+lPsupUb7
	MU5uf+qCMT6BaDR0wodSaio/pqil8G1us8Kdvv4uMKj1vtvXXssLe1ETF+3S+g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795396724;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=6QZuznel/qYxSBzWBnR6eQDq43z+g7UaLgB0HoVyF0c=;
	b=sxysSXrX3D2d3764YuRHm2CzDPN6WBeRbrmh/8S4Iu+//vawWjnhhfKo4kyhDULIFN29QV
	YsDhW+LJqbUxkIaCOFR++K5iN9QzQu724pporv8K7sjebF+ZdiNCMTF9fOM8rEv9/9OpMC
	fLoR3C5U/pKDqqcL7HjNFpT2VyQC9yyhSIR2s9frKKMgPxpOVZR162VeKfAdpUgscx0gb2
	bSBqzo6eLxyBuGYl9h/Htn2Mstrd/mH3RcOmExeCpXELRLnKBsCqSIomllERaspXDn8JSq
	UIPUBbBJhbjBmdorvJY9bq8hSM4pxTmVKEMQL5tSBnVRhKjNCwkchFcz+mAwaQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp436rBSzSpN
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:43 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 2eaf
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:18:43 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 349720311347 - stable/15 - tests/sys/capsicum: Fix -Wshadow issue with `fd_set`
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 34972031134731b95b9c5dc5fe200e1236f3ad1c
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:18:43 +0000
Message-Id: <6b039473.2eaf.5f0e141@gitrepo.freebsd.org>

The branch stable/15 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=34972031134731b95b9c5dc5fe200e1236f3ad1c

commit 34972031134731b95b9c5dc5fe200e1236f3ad1c
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-11-10 05:17:26 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:17:40 +0000

    tests/sys/capsicum: Fix -Wshadow issue with `fd_set`
    
    `fd_set` is defined in `sys/select.h`, and prior to this change, was in fcntl.cc as well.
    
    This change renames `fd_set` to `fd_set_` to avoid the name collision.
    
    MFC after:      1 week
    Reported by:    gcc 14
    Fixes:          04c4b2084eb9 ("capsicum-test: make the code WARNS=6 clean")
    
    (cherry picked from commit a479301abb2c7b384f574fcc641e502f70654835)
---
 tests/sys/capsicum/fcntl.cc | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/sys/capsicum/fcntl.cc b/tests/sys/capsicum/fcntl.cc
index 1ae33c2e051e..a9349b153cdc 100644
--- a/tests/sys/capsicum/fcntl.cc
+++ b/tests/sys/capsicum/fcntl.cc
@@ -332,17 +332,17 @@ TEST(Fcntl, FLSubRights) {
 
   // Check operations that need CAP_FCNTL with specific subrights.
   int fd_get = dup(fd);
-  int fd_set = dup(fd);
+  int fd_set_ = dup(fd);
   EXPECT_OK(cap_fcntls_limit(fd_get, CAP_FCNTL_GETFL));
-  EXPECT_OK(cap_fcntls_limit(fd_set, CAP_FCNTL_SETFL));
+  EXPECT_OK(cap_fcntls_limit(fd_set_, CAP_FCNTL_SETFL));
 
   fd_flag = fcntl(fd_get, F_GETFL, 0);
   EXPECT_OK(fd_flag);
-  EXPECT_NOTCAPABLE(fcntl(fd_set, F_GETFL, 0));
-  EXPECT_OK(fcntl(fd_set, F_SETFL, fd_flag));
+  EXPECT_NOTCAPABLE(fcntl(fd_set_, F_GETFL, 0));
+  EXPECT_OK(fcntl(fd_set_, F_SETFL, fd_flag));
   EXPECT_NOTCAPABLE(fcntl(fd_get, F_SETFL, fd_flag));
   close(fd_get);
-  close(fd_set);
+  close(fd_set_);
 
   // Check operations that need CAP_FCNTL with no subrights => ENOTCAPABLE.
   EXPECT_OK(cap_fcntls_limit(fd, 0));

From nobody Mon Nov 23 01:18:45 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXp454Q2vz71TXD
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:18: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp450QmKz4bwb
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:45 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795396725;
	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=yG9fiUd/7ioNdwGYEPKSbEjmFxDXCwGvRk9uUl5WB74=;
	b=q0wYesZqbOtwCHQfxMZW7Ek2z1PokQ1fHMnEOmW4zN5RFd4wdYgcMUtp2XhmNKmKDvQ9SD
	ihBZhM/VLtHuc1/ome0prmnc81ozi6dv/h+jgHEBotTaZAQ/x9eIuOrRSbPHbEQBVI+MAa
	1dsTohmN2wy7AL+5tJcbMVowasC0xELrjE6ukOmMPlrKrkS5icQOUwBGJVPK4m+tw6ETZx
	eEr9hjHFZI2AXFHwRHve7CQw/QMx/g4i/CdVgjagcaymXCuF9V8yXCb5VIjy6UXlf6A/JB
	btP38o2q/w5GrXo5FSiqVduoXINPVZyXh0BIWWQvtc787YOG0nfHd5XlpTlzjA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396725;
	b=U6Ae6PKNJBgmIkEhyeT6HCJv8qqxtohjZCQQN7UK5CtGg5TaYaxOto+AlZm9V08PoHMFP9
	XGoGZOdULEXdikVkC4zZtk43heMFPGPmBFbxW2QA6ZhMktVavhL/JPEV1+jPUhMxZ5HTIG
	80izNuXMU3Cua3TdLYdlvSS0W4qakKBQIKk1veCpJlODIq1orGlwY1iXT/+cgTDraUR28i
	3g4SDMQNGtQoIHuasIx5mPnUFSADJxEi5Iph1fotOqAfO7A67GAKGG/xANGNB15bp/HJNZ
	p8bKEqfIe3N6P6wNs8n6k7tQvTr+DmcK2f3ll51oEgzz3TS03JyCajngE91DYg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795396725;
	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=yG9fiUd/7ioNdwGYEPKSbEjmFxDXCwGvRk9uUl5WB74=;
	b=VApxC0AF1C9zXcQtj4Giq1qhhE7/ab7P/vsbh+4UyeZz5QLC+Pfv3r7UYFytTL4H2NhsOO
	OkLnzEGJB4Jf1rVFQV6dt0wdCo3m0eqUqXgE59qPzSp0tEqq2m5IexmYI0bxvOwbOL8RqO
	FGp3ZosCX2AimzDBpHQZm0pxB5RR0IyaCC/jGSCbM0yDVauO2kiRdaaf9CPdE54J+Q0p6f
	98TGvjcpAjFx4k3imWLvBZWBWeYrBM1t1zKoqk8DS9As0msUdAo9eZikQvSZne9dX1+NYN
	tGN1EqkW+boAuVWewVVicqdIHr82emk0MLKmtHjb+f5hvzaU+fmxyX4FX0WC8g==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp4503nrzSH1
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:45 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 3782
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:18:45 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Igor Ostapenko <igoro@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 22ba656e3a8a - stable/15 - kyua: Fixes after vendor merge
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 22ba656e3a8a376cee93fbb2e7d1da1a935a749e
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:18:45 +0000
Message-Id: <6b039475.3782.d23026e@gitrepo.freebsd.org>

The branch stable/15 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=22ba656e3a8a376cee93fbb2e7d1da1a935a749e

commit 22ba656e3a8a376cee93fbb2e7d1da1a935a749e
Author:     Igor Ostapenko <igoro@FreeBSD.org>
AuthorDate: 2026-10-18 17:22:55 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:17:41 +0000

    kyua: Fixes after vendor merge
    
    Reviewed by:    ngie
    MFC after:      1 month
    Differential Revision:  https://reviews.freebsd.org/D60446
    
    (cherry picked from commit af238d55d313a4a99fe9a3492755eb152b17bca0)
---
 contrib/kyua/cli/cmd_debug.cpp    |  4 ++--
 contrib/kyua/doc/kyuafile.5       |  1 +
 contrib/kyua/doc/kyuafile.5.in    |  1 +
 contrib/kyua/engine/scheduler.cpp |  4 ++--
 contrib/kyua/model/metadata.cpp   | 47 ++++++++++++++++++++++++++-------------
 contrib/kyua/os/freebsd/main.cpp  | 16 ++++++++-----
 6 files changed, 47 insertions(+), 26 deletions(-)

diff --git a/contrib/kyua/cli/cmd_debug.cpp b/contrib/kyua/cli/cmd_debug.cpp
index f5e48572407e..f43be8fe85f2 100644
--- a/contrib/kyua/cli/cmd_debug.cpp
+++ b/contrib/kyua/cli/cmd_debug.cpp
@@ -155,14 +155,14 @@ public:
                 _ui->out("The test failed and paused right before its cleanup "
                     "routine.");
                 _ui->out(F("Test work dir: %s") % eh.work_directory().str());
-                _ui->out("Press any key to continue...");
+                _ui->out("Press <Enter> to continue...");
                 (void) std::cin.get();
             }
         } else if (_cmdline.has_option(pause_before_cleanup_option
             .long_name())) {
             _ui->out("The test paused right before its cleanup routine.");
             _ui->out(F("Test work dir: %s") % eh.work_directory().str());
-            _ui->out("Press any key to continue...");
+            _ui->out("Press <Enter> to continue...");
             (void) std::cin.get();
         }
     };
diff --git a/contrib/kyua/doc/kyuafile.5 b/contrib/kyua/doc/kyuafile.5
index 1990e7bba3a3..d26312dd0d18 100644
--- a/contrib/kyua/doc/kyuafile.5
+++ b/contrib/kyua/doc/kyuafile.5
@@ -311,6 +311,7 @@ Supported platforms:
 .Pp
 ATF:
 .Va require.kmods
+(appends to the list declared at the Kyuafile level instead of overwriting it)
 .It Va required_memory
 Amount of physical memory that the test needs to run successfully.
 .Pp
diff --git a/contrib/kyua/doc/kyuafile.5.in b/contrib/kyua/doc/kyuafile.5.in
index ae4b8ebfa3fe..9485ed187814 100644
--- a/contrib/kyua/doc/kyuafile.5.in
+++ b/contrib/kyua/doc/kyuafile.5.in
@@ -311,6 +311,7 @@ Supported platforms:
 .Pp
 ATF:
 .Va require.kmods
+(appends to the list declared at the Kyuafile level instead of overwriting it)
 .It Va required_memory
 Amount of physical memory that the test needs to run successfully.
 .Pp
diff --git a/contrib/kyua/engine/scheduler.cpp b/contrib/kyua/engine/scheduler.cpp
index 6e19a1598f8c..d04fc1dfbd3d 100644
--- a/contrib/kyua/engine/scheduler.cpp
+++ b/contrib/kyua/engine/scheduler.cpp
@@ -1653,8 +1653,8 @@ scheduler::generate_config(const config::tree& user_config,
     if (user_config.is_set("unprivileged_user")) {
         const passwd::user& user =
             user_config.lookup< engine::user_node >("unprivileged_user");
-	// The property is duplicated using both ATF and Kyua naming styles
-	// for better UX.
+        // The property is duplicated using both ATF and Kyua naming styles
+        // for better UX.
         props["unprivileged-user"] = user.name;
         props["unprivileged_user"] = user.name;
     }
diff --git a/contrib/kyua/model/metadata.cpp b/contrib/kyua/model/metadata.cpp
index 8bb071163c10..51a7b03e4599 100644
--- a/contrib/kyua/model/metadata.cpp
+++ b/contrib/kyua/model/metadata.cpp
@@ -255,8 +255,8 @@ init_tree(config::tree& tree)
     tree.define< config::strings_set_node >("required_configs");
     tree.define< bytes_node >("required_disk_space");
     tree.define< paths_set_node >("required_files");
-    tree.define< bytes_node >("required_memory");
     tree.define< config::strings_set_node >("required_kmods");
+    tree.define< bytes_node >("required_memory");
     tree.define< paths_set_node >("required_programs");
     tree.define< user_node >("required_user");
     tree.define< delta_node >("timeout");
@@ -282,8 +282,8 @@ set_defaults(config::tree& tree)
                                          model::strings_set());
     tree.set< bytes_node >("required_disk_space", units::bytes(0));
     tree.set< paths_set_node >("required_files", model::paths_set());
-    tree.set< bytes_node >("required_memory", units::bytes(0));
     tree.set< config::strings_set_node >("required_kmods", model::strings_set());
+    tree.set< bytes_node >("required_memory", units::bytes(0));
     tree.set< paths_set_node >("required_programs", model::paths_set());
     tree.set< user_node >("required_user", "");
     // TODO(jmmv): We shouldn't be setting a default timeout like this.  See
@@ -585,20 +585,6 @@ model::metadata::required_files(void) const
 }
 
 
-/// Returns the amount of memory required by the test.
-///
-/// \return Number of bytes, or 0 if this does not apply.
-const units::bytes&
-model::metadata::required_memory(void) const
-{
-    if (_pimpl->props.is_set("required_memory")) {
-        return _pimpl->props.lookup< bytes_node >("required_memory");
-    } else {
-        return get_defaults().lookup< bytes_node >("required_memory");
-    }
-}
-
-
 /// Returns the list of kernel modules needed by the test.
 ///
 /// \return Set of kernel module names.
@@ -615,6 +601,20 @@ model::metadata::required_kmods(void) const
 }
 
 
+/// Returns the amount of memory required by the test.
+///
+/// \return Number of bytes, or 0 if this does not apply.
+const units::bytes&
+model::metadata::required_memory(void) const
+{
+    if (_pimpl->props.is_set("required_memory")) {
+        return _pimpl->props.lookup< bytes_node >("required_memory");
+    } else {
+        return get_defaults().lookup< bytes_node >("required_memory");
+    }
+}
+
+
 /// Returns the list of programs needed by the test.
 ///
 /// \return Set of paths.
@@ -1059,6 +1059,21 @@ model::metadata_builder::set_required_files(const model::paths_set& files)
 }
 
 
+/// Sets the list of required kernel modules.
+///
+/// \param vars Set of kernel module names.
+///
+/// \return A reference to this builder.
+///
+/// \throw model::error If the value is invalid.
+model::metadata_builder&
+model::metadata_builder::set_required_kmods(const model::strings_set& kmods)
+{
+    set< config::strings_set_node >(_pimpl->props, "required_kmods", kmods);
+    return *this;
+}
+
+
 /// Sets the amount of memory required by the test.
 ///
 /// \param bytes Number of bytes.
diff --git a/contrib/kyua/os/freebsd/main.cpp b/contrib/kyua/os/freebsd/main.cpp
index 700284b64b78..1fe4fca8cae4 100644
--- a/contrib/kyua/os/freebsd/main.cpp
+++ b/contrib/kyua/os/freebsd/main.cpp
@@ -34,7 +34,12 @@
 #include "engine/requirements.hpp"
 #include "os/freebsd/reqs_checker_kmods.hpp"
 
+#include "engine/prepare/prepare.hpp"
+#include "os/freebsd/prepare_kmods.hpp"
+
 namespace execenv = engine::execenv;
+namespace prepare = engine::prepare;
+
 
 /// FreeBSD related features initialization.
 ///
@@ -50,15 +55,14 @@ int
 freebsd::main(const int, const char* const* const)
 {
     execenv::register_execenv(
-        std::shared_ptr< execenv::manager >(new freebsd::execenv_jail_manager())
-    );
+        std::make_shared<freebsd::execenv_jail_manager>());
 
 #ifdef __FreeBSD__
     engine::register_reqs_checker(
-        std::shared_ptr< engine::reqs_checker >(
-            new freebsd::reqs_checker_kmods()
-        )
-    );
+        std::make_shared<freebsd::reqs_checker_kmods>());
+
+    prepare::register_handler(
+        std::make_shared<freebsd::prepare_kmods>());
 #endif
 
     return 0;

From nobody Mon Nov 23 01:18:46 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXp464tvWz71TVJ
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:18: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp461FR4z4bnb
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:46 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795396726;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=4kJFA4zP9IikrdIM/bcmqP3Pg5ob1TzTGxWybXu78n8=;
	b=TwzWahGljBKCVWpq6w4nBPWbCcDGCX95mZx6jga49Dm8MNvCol4msImOtily6HCyJcuoQY
	3JN7oln620HhsvlY+xA6AGbKYlq9TBQPxvu0QWiY6yiBav1jvASU8OkqPZTdtUL3MVYojk
	A3sF4xy505zsxX9ib+c6vSS5cEWVaaHM7w+O1C7fDatlfVf6A7Kso2wtXF1dYXvW4J+2B+
	AIuBiDG5N0Z+0YVIaotCQpyxFduRExPfeKNHvTQWGs66IqcUBLFiMH22pOiNsktRMRDraS
	7W9U/q88fqaGfJJ8P0KdaOq7SWMYyoak/GqMcmquRwsgEQZYaB6ZRyh/IyNYbQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396726;
	b=j1wS02OteI/EEh1EuHLrcHGm8yVLy5MauM3cGQpxOtiAr8jZWPIOzJ2ZKym6X8ada6Wcvv
	5cUS3FDl222SWAhUiDRLBUU4NXuWjXJbXbg5KoLeiVCEPMP3MXJQn0nbzAOgeaEZKNlF9v
	GJw1++B7GvkzgeGqEzrIIxCb7gl5+ha84nolhLQ+38FaHC8UHNGla810T5RVjxW9M/LXbz
	NVJ8N/x87IMCsZgwjw/RCo21mhzp2yWAqjoJtrfIXkjPVD5FlOdBWN153u8EyP1WvPU8rC
	ueeNHPxVNu+wOXkfJpDe9kdOo3Fqc1OCTfN/oejqvydhiDwk+zSN+yrTiHA0bQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795396726;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=4kJFA4zP9IikrdIM/bcmqP3Pg5ob1TzTGxWybXu78n8=;
	b=vUW43yEZpbtBfbNNebhnAvQ/Yqguq1J4nLLhqXWWD4yIDyaAp3n45nvMoXXuOFzXob7jId
	P57uu6pb6o0yWL0NcUyabLE87y8j7f8Ldb7KblZdz/QrWWySEZ4hWGQ9xpuYZkCNQs/RN+
	VCSA3deGpYNoFhIu2PrELbMcG/hDItF9uyhj/2pbbJvZBIWrWofqyOYAZ8CmgXw8NK2VRo
	hAAsAcmW9Cj7vbC6lEApA0WrjZydAOrFKJ9jOigaZ6zV1q5VaADIgUW4bhHXVg2ustB+AB
	uD1ZZ2MiAIKmScWMRflnAP3KYZ8RaYYsM2P2MCo5omZJfzTCrqe7LdLTQ4shsA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp460W3MzS2H
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:46 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 3787
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:18:46 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 77c26601e625 - stable/15 - contrib/kyua: update to 0.15.2
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 77c26601e6255c515e0d0d1c21b1b0e8d617d16a
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:18:46 +0000
Message-Id: <6b039476.3787.39c4b792@gitrepo.freebsd.org>

The branch stable/15 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=77c26601e6255c515e0d0d1c21b1b0e8d617d16a

commit 77c26601e6255c515e0d0d1c21b1b0e8d617d16a
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-11-19 07:02:06 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:17:41 +0000

    contrib/kyua: update to 0.15.2
    
    This change contains a few bugfixes to the test executor.
    
    MFC after:      1 week
    Merge commit 'dab80d5deaf7d998d587b99f7941890237960638'
    
    (cherry picked from commit c16da33701d07751bbe6871ad39582006d5281fc)
---
 contrib/kyua/NEWS                         |  18 ++
 contrib/kyua/README.md                    |   4 +-
 contrib/kyua/config.h                     |   3 +
 contrib/kyua/utils/Kyuafile               |   1 -
 contrib/kyua/utils/auto_array.hpp         | 102 ----------
 contrib/kyua/utils/auto_array.ipp         | 227 ----------------------
 contrib/kyua/utils/auto_array_fwd.hpp     |  43 ----
 contrib/kyua/utils/auto_array_test.cpp    | 312 ------------------------------
 contrib/kyua/utils/cmdline/parser.cpp     |  16 +-
 contrib/kyua/utils/datetime.cpp           |  88 +++++++++
 contrib/kyua/utils/datetime.hpp           |  28 +++
 contrib/kyua/utils/datetime_fwd.hpp       |   1 +
 contrib/kyua/utils/datetime_test.cpp      | 117 +++++++++++
 contrib/kyua/utils/fs/operations.cpp      |  16 +-
 contrib/kyua/utils/process/systembuf.cpp  |   7 +-
 contrib/kyua/utils/signals/timer.cpp      |  75 +++++--
 contrib/kyua/utils/signals/timer.hpp      |   8 +-
 contrib/kyua/utils/signals/timer_test.cpp | 111 +++++++++--
 contrib/kyua/utils/text/regex.cpp         |  33 ++--
 contrib/kyua/utils/text/templates.cpp     |   2 +-
 20 files changed, 442 insertions(+), 770 deletions(-)

diff --git a/contrib/kyua/NEWS b/contrib/kyua/NEWS
index 50a2c8257370..3b7099fc6dbd 100644
--- a/contrib/kyua/NEWS
+++ b/contrib/kyua/NEWS
@@ -1,5 +1,23 @@
 # Major changes between releases
 
+## Changes in version 0.15.2
+
+**Released on 2026/11/19.**
+
+### Bugfixes
+
+* #345: Use monotonic time for timer deadlines
+* #352: Get rid of utils::auto_array
+* #355: Use absolute deadlines in some timer activation tests
+* #357: Fix UB related to iterator lifetime in text templates
+* #360: fix(ci): update LLVM toolchains on macOS and Ubuntu
+
+### Developer Workflow Changes
+
+* #361: Port over dev workflow items from ATF project (commit-check, pre-commit)
+
+**Full Changelog**: https://github.com/freebsd/lutok/compare/kyua-0.15.1...kyua-0.15.2
+
 ## Changes in version 0.15.1
 
 **Released on 2026/10/25.**
diff --git a/contrib/kyua/README.md b/contrib/kyua/README.md
index b8b54d0413de..a5bc8db0509b 100644
--- a/contrib/kyua/README.md
+++ b/contrib/kyua/README.md
@@ -27,9 +27,9 @@ This is not an official Google product.
 
 ## Download
 
-The latest version of Kyua is 0.15.0 and was released on October 7th, 2026.
+The latest version of Kyua is 0.15.1 and was released on October 25th, 2026.
 
-Download: [kyua-0.15.0](../../releases/tag/kyua-0.15.0).
+Download: [kyua-0.15.1](../../releases/tag/kyua-0.15.1).
 
 See the [release notes](NEWS) for information about the changes in this
 and all previous releases.
diff --git a/contrib/kyua/config.h b/contrib/kyua/config.h
index eba9c9cb1448..cccfe36ae3a2 100644
--- a/contrib/kyua/config.h
+++ b/contrib/kyua/config.h
@@ -4,6 +4,9 @@
 /* Define to the optind value to reset getopt processing */
 #define GETOPT_OPTIND_RESET_VALUE 1
 
+/* Define to 1 if you have the 'clock_gettime' function. */
+#undef HAVE_CLOCK_GETTIME
+
 /* define if the compiler supports basic C++20 syntax */
 #define HAVE_CXX20 1
 
diff --git a/contrib/kyua/utils/Kyuafile b/contrib/kyua/utils/Kyuafile
index 042ad77a3fe4..4955349f2ac9 100644
--- a/contrib/kyua/utils/Kyuafile
+++ b/contrib/kyua/utils/Kyuafile
@@ -2,7 +2,6 @@ syntax(2)
 
 test_suite("kyua")
 
-atf_test_program{name="auto_array_test"}
 atf_test_program{name="datetime_test"}
 atf_test_program{name="env_test"}
 atf_test_program{name="memory_test"}
diff --git a/contrib/kyua/utils/auto_array.hpp b/contrib/kyua/utils/auto_array.hpp
deleted file mode 100644
index 93b3e20223cf..000000000000
--- a/contrib/kyua/utils/auto_array.hpp
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright 2010 The Kyua Authors.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-//   notice, this list of conditions and the following disclaimer.
-// * 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.
-// * Neither the name of Google Inc. nor the names of its contributors
-//   may be used to endorse or promote products derived from this software
-//   without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER 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.
-
-/// \file utils/auto_array.hpp
-/// Provides the utils::auto_array class.
-///
-/// The class is provided as a separate module on its own to minimize
-/// header-inclusion side-effects.
-
-#if !defined(UTILS_AUTO_ARRAY_HPP)
-#define UTILS_AUTO_ARRAY_HPP
-
-#include "utils/auto_array_fwd.hpp"
-
-#include <cstddef>
-
-namespace utils {
-
-
-namespace detail {
-
-
-/// Wrapper class to provide reference semantics for utils::auto_array.
-///
-/// This class is internally used, for example, to allow returning a
-/// utils::auto_array from a function.
-template< class T >
-class auto_array_ref {
-    /// Internal pointer to the dynamically-allocated array.
-    T* _ptr;
-
-    template< class > friend class utils::auto_array;
-
-public:
-    explicit auto_array_ref(T*);
-};
-
-
-}  // namespace detail
-
-
-/// A simple smart pointer for arrays providing strict ownership semantics.
-///
-/// This class is the counterpart of std::unique_ptr for arrays.  The semantics of
-/// the API of this class are the same as those of std::unique_ptr.
-///
-/// The wrapped pointer must be NULL or must have been allocated using operator
-/// new[].
-template< class T >
-class auto_array {
-    /// Internal pointer to the dynamically-allocated array.
-    T* _ptr;
-
-public:
-    auto_array(T* = NULL) throw();
-    auto_array(auto_array< T >&) throw();
-    auto_array(detail::auto_array_ref< T >) throw();
-    ~auto_array(void) throw();
-
-    T* get(void) throw();
-    const T* get(void) const throw();
-
-    T* release(void) throw();
-    void reset(T* = NULL) throw();
-
-    auto_array< T >& operator=(auto_array< T >&) throw();
-    auto_array< T >& operator=(detail::auto_array_ref< T >) throw();
-    T& operator[](int) throw();
-    const T& operator[](int) const throw();
-    operator detail::auto_array_ref< T >(void) throw();
-};
-
-
-}  // namespace utils
-
-
-#endif  // !defined(UTILS_AUTO_ARRAY_HPP)
diff --git a/contrib/kyua/utils/auto_array.ipp b/contrib/kyua/utils/auto_array.ipp
deleted file mode 100644
index fd29311def8c..000000000000
--- a/contrib/kyua/utils/auto_array.ipp
+++ /dev/null
@@ -1,227 +0,0 @@
-// Copyright 2010 The Kyua Authors.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-//   notice, this list of conditions and the following disclaimer.
-// * 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.
-// * Neither the name of Google Inc. nor the names of its contributors
-//   may be used to endorse or promote products derived from this software
-//   without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER 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.
-
-#if !defined(UTILS_AUTO_ARRAY_IPP)
-#define UTILS_AUTO_ARRAY_IPP
-
-#include "utils/auto_array.hpp"
-
-namespace utils {
-
-
-namespace detail {
-
-
-/// Constructs a new auto_array_ref from a pointer.
-///
-/// \param ptr The pointer to wrap.
-template< class T > inline
-auto_array_ref< T >::auto_array_ref(T* ptr) :
-    _ptr(ptr)
-{
-}
-
-
-}  // namespace detail
-
-
-/// Constructs a new auto_array from a given pointer.
-///
-/// This grabs ownership of the pointer unless it is NULL.
-///
-/// \param ptr The pointer to wrap.  If not NULL, the memory pointed to must
-/// have been allocated with operator new[].
-template< class T > inline
-auto_array< T >::auto_array(T* ptr) throw() :
-    _ptr(ptr)
-{
-}
-
-
-/// Constructs a copy of an auto_array.
-///
-/// \param ptr The pointer to copy from.  This pointer is invalidated and the
-/// new copy grabs ownership of the object pointed to.
-template< class T > inline
-auto_array< T >::auto_array(auto_array< T >& ptr) throw() :
-    _ptr(ptr.release())
-{
-}
-
-
-/// Constructs a new auto_array form a reference.
-///
-/// Internal function used to construct a new auto_array from an object
-/// returned, for example, from a function.
-///
-/// \param ref The reference.
-template< class T > inline
-auto_array< T >::auto_array(detail::auto_array_ref< T > ref) throw() :
-    _ptr(ref._ptr)
-{
-}
-
-
-/// Destructor for auto_array objects.
-template< class T > inline
-auto_array< T >::~auto_array(void) throw()
-{
-    if (_ptr != NULL)
-        delete [] _ptr;
-}
-
-
-/// Gets the value of the wrapped pointer without releasing ownership.
-///
-/// \return The raw mutable pointer.
-template< class T > inline
-T*
-auto_array< T >::get(void) throw()
-{
-    return _ptr;
-}
-
-
-/// Gets the value of the wrapped pointer without releasing ownership.
-///
-/// \return The raw immutable pointer.
-template< class T > inline
-const T*
-auto_array< T >::get(void) const throw()
-{
-    return _ptr;
-}
-
-
-/// Gets the value of the wrapped pointer and releases ownership.
-///
-/// \return The raw mutable pointer.
-template< class T > inline
-T*
-auto_array< T >::release(void) throw()
-{
-    T* ptr = _ptr;
-    _ptr = NULL;
-    return ptr;
-}
-
-
-/// Changes the value of the wrapped pointer.
-///
-/// If the auto_array was pointing to an array, such array is released and the
-/// wrapped pointer is replaced with the new pointer provided.
-///
-/// \param ptr The pointer to use as a replacement; may be NULL.
-template< class T > inline
-void
-auto_array< T >::reset(T* ptr) throw()
-{
-    if (_ptr != NULL)
-        delete [] _ptr;
-    _ptr = ptr;
-}
-
-
-/// Assignment operator.
-///
-/// \param ptr The object to copy from.  This is invalidated after the copy.
-/// \return A reference to the auto_array object itself.
-template< class T > inline
-auto_array< T >&
-auto_array< T >::operator=(auto_array< T >& ptr) throw()
-{
-    reset(ptr.release());
-    return *this;
-}
-
-
-/// Internal assignment operator for function returns.
-///
-/// \param ref The reference object to copy from.
-/// \return A reference to the auto_array object itself.
-template< class T > inline
-auto_array< T >&
-auto_array< T >::operator=(detail::auto_array_ref< T > ref) throw()
-{
-    if (_ptr != ref._ptr) {
-        delete [] _ptr;
-        _ptr = ref._ptr;
-    }
-    return *this;
-}
-
-
-/// Subscript operator to access the array by position.
-///
-/// This does not perform any bounds checking, in particular because auto_array
-/// does not know the size of the arrays pointed to by it.
-///
-/// \param pos The position to access, indexed from zero.
-///
-/// \return A mutable reference to the element at the specified position.
-template< class T > inline
-T&
-auto_array< T >::operator[](int pos) throw()
-{
-    return _ptr[pos];
-}
-
-
-/// Subscript operator to access the array by position.
-///
-/// This does not perform any bounds checking, in particular because auto_array
-/// does not know the size of the arrays pointed to by it.
-///
-/// \param pos The position to access, indexed from zero.
-///
-/// \return An immutable reference to the element at the specified position.
-template< class T > inline
-const T&
-auto_array< T >::operator[](int pos) const throw()
-{
-    return _ptr[pos];
-}
-
-
-/// Internal conversion to a reference wrapper.
-///
-/// This is used internally to support returning auto_array objects from
-/// functions.  The auto_array is invalidated when used.
-///
-/// \return A new detail::auto_array_ref object holding the pointer.
-template< class T > inline
-auto_array< T >::operator detail::auto_array_ref< T >(void) throw()
-{
-    return detail::auto_array_ref< T >(release());
-}
-
-
-}  // namespace utils
-
-
-#endif  // !defined(UTILS_AUTO_ARRAY_IPP)
diff --git a/contrib/kyua/utils/auto_array_fwd.hpp b/contrib/kyua/utils/auto_array_fwd.hpp
deleted file mode 100644
index e1522a25bf7d..000000000000
--- a/contrib/kyua/utils/auto_array_fwd.hpp
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2015 The Kyua Authors.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-//   notice, this list of conditions and the following disclaimer.
-// * 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.
-// * Neither the name of Google Inc. nor the names of its contributors
-//   may be used to endorse or promote products derived from this software
-//   without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER 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.
-
-/// \file utils/auto_array_fwd.hpp
-/// Forward declarations for utils/auto_array.hpp
-
-#if !defined(UTILS_AUTO_ARRAY_FWD_HPP)
-#define UTILS_AUTO_ARRAY_FWD_HPP
-
-namespace utils {
-
-
-template< class > class auto_array;
-
-
-}  // namespace utils
-
-#endif  // !defined(UTILS_AUTO_ARRAY_FWD_HPP)
diff --git a/contrib/kyua/utils/auto_array_test.cpp b/contrib/kyua/utils/auto_array_test.cpp
deleted file mode 100644
index 041eb65863ba..000000000000
--- a/contrib/kyua/utils/auto_array_test.cpp
+++ /dev/null
@@ -1,312 +0,0 @@
-// Copyright 2010 The Kyua Authors.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-//   notice, this list of conditions and the following disclaimer.
-// * 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.
-// * Neither the name of Google Inc. nor the names of its contributors
-//   may be used to endorse or promote products derived from this software
-//   without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER 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 "utils/auto_array.ipp"
-
-extern "C" {
-#include <sys/types.h>
-}
-
-#include <iostream>
-
-#include <atf-c++.hpp>
-
-#include "utils/defs.hpp"
-
-using utils::auto_array;
-
-
-namespace {
-
-
-/// Mock class to capture calls to the new and delete operators.
-class test_array {
-public:
-    /// User-settable cookie to disambiguate instances of this class.
-    int m_value;
-
-    /// The current balance of existing test_array instances.
-    static ssize_t m_nblocks;
-
-    /// Captures invalid calls to new on an array.
-    ///
-    /// \return Nothing; this always fails the test case.
-    void*
-    operator new(const size_t /* size */)
-    {
-        ATF_FAIL("New called but should have been new[]");
-        return new int(5);
-    }
-
-    /// Obtains memory for a new instance and increments m_nblocks.
-    ///
-    /// \param size The amount of memory to allocate, in bytes.
-    ///
-    /// \return A pointer to the allocated memory.
-    ///
-    /// \throw std::bad_alloc If the memory cannot be allocated.
-    void*
-    operator new[](const size_t size)
-    {
-        void* mem = ::operator new(size);
-        m_nblocks++;
-        std::cout << "Allocated 'test_array' object " << mem << "\n";
-        return mem;
-    }
-
-    /// Captures invalid calls to delete on an array.
-    ///
-    /// \return Nothing; this always fails the test case.
-    void
-    operator delete(void* /* mem */)
-    {
-        ATF_FAIL("Delete called but should have been delete[]");
-    }
-
-    /// Deletes a previously allocated array and decrements m_nblocks.
-    ///
-    /// \param mem The pointer to the memory to be deleted.
-    void
-    operator delete[](void* mem)
-    {
-        std::cout << "Releasing 'test_array' object " << mem << "\n";
-        if (m_nblocks == 0)
-            ATF_FAIL("Unbalanced delete[]");
-        m_nblocks--;
-        ::operator delete(mem);
-    }
-};
-
-
-ssize_t test_array::m_nblocks = 0;
-
-
-}  // anonymous namespace
-
-
-ATF_TEST_CASE(scope);
-ATF_TEST_CASE_HEAD(scope)
-{
-    set_md_var("descr", "Tests the automatic scope handling in the "
-               "auto_array smart pointer class");
-}
-ATF_TEST_CASE_BODY(scope)
-{
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-    {
-        auto_array< test_array > t(new test_array[10]);
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-    }
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-}
-
-
-ATF_TEST_CASE(copy);
-ATF_TEST_CASE_HEAD(copy)
-{
-    set_md_var("descr", "Tests the auto_array smart pointer class' copy "
-               "constructor");
-}
-ATF_TEST_CASE_BODY(copy)
-{
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-    {
-        auto_array< test_array > t1(new test_array[10]);
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-
-        {
-            auto_array< test_array > t2(t1);
-            ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-        }
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-    }
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-}
-
-
-ATF_TEST_CASE(copy_ref);
-ATF_TEST_CASE_HEAD(copy_ref)
-{
-    set_md_var("descr", "Tests the auto_array smart pointer class' copy "
-               "constructor through the auxiliary ref object");
-}
-ATF_TEST_CASE_BODY(copy_ref)
-{
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-    {
-        auto_array< test_array > t1(new test_array[10]);
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-
-        {
-            auto_array< test_array > t2 = t1;
-            ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-        }
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-    }
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-}
-
-
-ATF_TEST_CASE(get);
-ATF_TEST_CASE_HEAD(get)
-{
-    set_md_var("descr", "Tests the auto_array smart pointer class' get "
-               "method");
-}
-ATF_TEST_CASE_BODY(get)
-{
-    test_array* ta = new test_array[10];
-    auto_array< test_array > t(ta);
-    ATF_REQUIRE_EQ(t.get(), ta);
-}
-
-
-ATF_TEST_CASE(release);
-ATF_TEST_CASE_HEAD(release)
-{
-    set_md_var("descr", "Tests the auto_array smart pointer class' release "
-               "method");
-}
-ATF_TEST_CASE_BODY(release)
-{
-    test_array* ta1 = new test_array[10];
-    {
-        auto_array< test_array > t(ta1);
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-        test_array* ta2 = t.release();
-        ATF_REQUIRE_EQ(ta2, ta1);
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-    }
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-    delete [] ta1;
-}
-
-
-ATF_TEST_CASE(reset);
-ATF_TEST_CASE_HEAD(reset)
-{
-    set_md_var("descr", "Tests the auto_array smart pointer class' reset "
-               "method");
-}
-ATF_TEST_CASE_BODY(reset)
-{
-    test_array* ta1 = new test_array[10];
-    test_array* ta2 = new test_array[10];
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 2);
-
-    {
-        auto_array< test_array > t(ta1);
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 2);
-        t.reset(ta2);
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-        t.reset();
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-    }
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-}
-
-
-ATF_TEST_CASE(assign);
-ATF_TEST_CASE_HEAD(assign)
-{
-    set_md_var("descr", "Tests the auto_array smart pointer class' "
-               "assignment operator");
-}
-ATF_TEST_CASE_BODY(assign)
-{
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-    {
-        auto_array< test_array > t1(new test_array[10]);
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-
-        {
-            auto_array< test_array > t2;
-            t2 = t1;
-            ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-        }
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-    }
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-}
-
-
-ATF_TEST_CASE(assign_ref);
-ATF_TEST_CASE_HEAD(assign_ref)
-{
-    set_md_var("descr", "Tests the auto_array smart pointer class' "
-               "assignment operator through the auxiliary ref "
-               "object");
-}
-ATF_TEST_CASE_BODY(assign_ref)
-{
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-    {
-        auto_array< test_array > t1(new test_array[10]);
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-
-        {
-            auto_array< test_array > t2;
-            t2 = t1;
-            ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-        }
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-    }
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-}
-
-
-ATF_TEST_CASE(access);
-ATF_TEST_CASE_HEAD(access)
-{
-    set_md_var("descr", "Tests the auto_array smart pointer class' access "
-               "operator");
-}
-ATF_TEST_CASE_BODY(access)
-{
-    auto_array< test_array > t(new test_array[10]);
-
-    for (int i = 0; i < 10; i++)
-        t[i].m_value = i * 2;
-
-    for (int i = 0; i < 10; i++)
-        ATF_REQUIRE_EQ(t[i].m_value, i * 2);
-}
-
-
-ATF_INIT_TEST_CASES(tcs)
-{
-    ATF_ADD_TEST_CASE(tcs, scope);
-    ATF_ADD_TEST_CASE(tcs, copy);
-    ATF_ADD_TEST_CASE(tcs, copy_ref);
-    ATF_ADD_TEST_CASE(tcs, get);
-    ATF_ADD_TEST_CASE(tcs, release);
-    ATF_ADD_TEST_CASE(tcs, reset);
-    ATF_ADD_TEST_CASE(tcs, assign);
-    ATF_ADD_TEST_CASE(tcs, assign_ref);
-    ATF_ADD_TEST_CASE(tcs, access);
-}
diff --git a/contrib/kyua/utils/cmdline/parser.cpp b/contrib/kyua/utils/cmdline/parser.cpp
index 29dd4612f6ad..32fb14c25e97 100644
--- a/contrib/kyua/utils/cmdline/parser.cpp
+++ b/contrib/kyua/utils/cmdline/parser.cpp
@@ -39,8 +39,8 @@ extern "C" {
 #include <cstdlib>
 #include <cstring>
 #include <limits>
+#include <vector>
 
-#include "utils/auto_array.ipp"
 #include "utils/cmdline/exceptions.hpp"
 #include "utils/cmdline/options.hpp"
 #include "utils/format/macros.hpp"
@@ -61,7 +61,7 @@ struct getopt_data : utils::noncopyable {
     std::string short_options;
 
     /// Representation of the long options as expected by getopt_long(3).
-    utils::auto_array< ::option > long_options;
+    std::vector< ::option > long_options;
 
     /// Auto-generated identifiers to be able to parse long options.
     std::map< int, const cmdline::base_option* > ids;
@@ -78,7 +78,7 @@ options_to_getopt_data(const cmdline::options_vector& options,
                        getopt_data& data)
 {
     data.short_options.clear();
-    data.long_options.reset(new ::option[options.size() + 1]);
+    data.long_options.resize(options.size() + 1);
 
     int cur_id = 512;
 
@@ -189,7 +189,7 @@ find_option_name(const getopt_data& data, const int getopt_optopt,
         const char ch = static_cast< char >(getopt_optopt);
         return F("-%s") % ch;
     } else {
-        for (const ::option* opt = &data.long_options[0]; opt->name != NULL;
+        for (const ::option* opt = data.long_options.data(); opt->name != NULL;
              opt++) {
             if (opt->val == getopt_optopt)
                 return F("--%s") % opt->name;
@@ -284,11 +284,11 @@ cmdline::parse(const cmdline::args_vector& args,
 {
     PRE_MSG(args.size() >= 1, "No progname or command name found");
 
-    utils::auto_array< const char* > argv(new const char*[args.size() + 1]);
+    std::vector< const char* > argv(args.size() + 1);
     for (args_vector::size_type i = 0; i < args.size(); i++)
         argv[i] = args[i].c_str();
-    argv[args.size()] = NULL;
-    return parse(static_cast< int >(args.size()), argv.get(), options);
+    argv.back() = nullptr;
+    return parse(static_cast< int >(args.size()), argv.data(), options);
 }
 
 
@@ -342,7 +342,7 @@ cmdline::parse(const int argc, const char* const* argv,
 
         while ((ch = ::getopt_long(mutable_argc, mutable_argv,
                                    ("+:" + data.short_options).c_str(),
-                                   data.long_options.get(), NULL)) != -1) {
+                                   data.long_options.data(), NULL)) != -1) {
             if (ch == ':' ) {
                 const std::string name = find_option_name(
                     data, ::optopt, mutable_argv, ::optind);
diff --git a/contrib/kyua/utils/datetime.cpp b/contrib/kyua/utils/datetime.cpp
index 174d830031d2..62101637b3b9 100644
--- a/contrib/kyua/utils/datetime.cpp
+++ b/contrib/kyua/utils/datetime.cpp
@@ -612,3 +612,91 @@ datetime::operator<<(std::ostream& output, const timestamp& object)
 {
     return (output << object.to_microseconds() << "us");
 }
+
+
+/// Constructs a monotonic time point measured in microseconds.
+///
+/// \param useconds Microseconds since the monotonic clock's origin.
+datetime::monotonic_timestamp::monotonic_timestamp(const int64_t useconds) :
+    _useconds(useconds)
+{
+}
+
+
+/// Constructs a monotonic time point from a count of microseconds.
+///
+/// \param useconds Microseconds since the monotonic clock's origin.
+///
+/// \return A new monotonic time point.
+datetime::monotonic_timestamp
+datetime::monotonic_timestamp::from_microseconds(const int64_t useconds)
+{
+    return monotonic_timestamp(useconds);
+}
+
+
+/// Constructs a time point representing the current monotonic time.
+///
+/// The monotonic clock is independent of calendar clock adjustments.
+///
+/// \return A new monotonic time point.
+datetime::monotonic_timestamp
+datetime::monotonic_timestamp::now(void)
+{
+    ::timespec data;
+    if (::clock_gettime(CLOCK_MONOTONIC, &data) == -1)
+        UNREACHABLE_MSG("clock_gettime(CLOCK_MONOTONIC) failed");
+    return monotonic_timestamp(static_cast< int64_t >(data.tv_sec) * 1000000 +
+                               data.tv_nsec / 1000);
+}
+
+
+/// Returns the number of microseconds since the monotonic clock's origin.
+///
+/// \return A number of microseconds, unrelated to the calendar epoch.
+int64_t
+datetime::monotonic_timestamp::to_microseconds(void) const
+{
+    return _useconds;
+}
+
+
+/// Calculates the addition of a delta to a monotonic time point.
+///
+/// \param other The delta to add.
+///
+/// \return A new monotonic time point at the resulting deadline.
+datetime::monotonic_timestamp
+datetime::monotonic_timestamp::operator+(const datetime::delta& other) const
+{
+    return monotonic_timestamp(_useconds + other.to_microseconds());
+}
+
+
+/// Calculates the delta between two monotonic time points.
+///
+/// \param other The subtrahend.
+///
+/// \return The difference between this object and the other object.
+///
+/// \throw std::runtime_error If the subtraction would result in a negative time
+///     delta, which is not supported.
+datetime::delta
+datetime::monotonic_timestamp::operator-(
+    const monotonic_timestamp& other) const
+{
+    return delta::from_microseconds(_useconds - other._useconds);
+}
+
+
+/// Injects the object into a stream.
+///
+/// \param output The stream into which to inject the object.
+/// \param object The object to format.
+///
+/// \return The output stream.
+std::ostream&
+datetime::operator<<(std::ostream& output, const monotonic_timestamp& object)
+{
+    return output << object.to_microseconds() << "us";
+}
diff --git a/contrib/kyua/utils/datetime.hpp b/contrib/kyua/utils/datetime.hpp
index 0c24f332f6d3..83ff866dc9c8 100644
--- a/contrib/kyua/utils/datetime.hpp
+++ b/contrib/kyua/utils/datetime.hpp
@@ -38,6 +38,7 @@ extern "C" {
 #include <stdint.h>
 }
*** 740 LINES SKIPPED ***

From nobody Mon Nov 23 01:18:47 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXp472mLwz71Tj3
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:18: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp471V1yz4bwx
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:47 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795396727;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=1ILmz+YhDRjHqq58u6YWMeWpeJpNxOzMWCxOx2+FkWY=;
	b=qMYaMcu0umwqLWfOOpNpt92tYkMc6NF19FQQrygxecOoWxmrCFWbjAKL2w+yP35HhREIVJ
	58rP+3BW7Ca5MextIA7l+5fsW+Yr87idf9M4wwh8sxTJQjNuYymJJKmnGvCnc8UOBDUZHb
	cjrol7d7bZ58KLr+DvqUHkJaI104tils1DR4sg79e4Z792v5onebSW91ge21l/BUcfOJHO
	PUPLKiG6xXYSAXdskZ1XAN1szvKnQAv5TAAvlHamjVr2D5XrBkwpOadmOoMFIhLeGUvziV
	lrJp1nwAThRv58FaFGjlhQOumOKcJUnSrzeCZ83sBNYGqSlz5/RUWjDFJXiJqw==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396727;
	b=GzJ0D0p+kysAVPptfRDbFRzW0YOnw8YDxLSDhL5WyDO4XBvK0RlaTInnMRYHteHlSHjXTa
	8j6unsAetKNqgJtqzX+snLdX/93leH1P+2vmo08cKH8hKzYhapgCcb07UADaD7stsoHFGo
	l60Y5IRFecqp6KCaTgRfbZU2CZW3sFsil0T/ojAYDl0x7ETRYhh8Cetkw25wOzaCB6iVvo
	Gzh4C54/2/TAbOxbwHET94h53ARsFDPwExpm3TpNq4fGaTir9ftCeIjPXnTFUxsVB+O2r6
	D8X3k0a1JBudL90oI3KJ5awQy9L2Jin4xT0u69aMgNfLLn05Y43E7HE+xHzwPA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795396727;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=1ILmz+YhDRjHqq58u6YWMeWpeJpNxOzMWCxOx2+FkWY=;
	b=NXWvJYYota3y92NE1zRt+QscW313EgIIdp6uD9TrsUIOsMPOnmihec7L2lBLCWmgyqMIhQ
	QIpflVdkYE/lCHQky6bO1QLdIdHTlPais2olECaO3+PbPC7R+/Eg7uclFFExdYu782l85N
	75sgiuxhU1JaqAk/Zh5IuAio+djlGtZVUDIzhTewxy8UBNDlBE9S0Gw8SfuMgwCtjJgMew
	jCOWzSQkWzaJkZb8oeDJoYpMNVOuQd6b1DY/xdi3++WdIkwe5W4DBwqoWckzn/BesrO3u2
	wQHeaHzPn4HnQ/igTw4MNawCjf2CHFYlqI0/W0cNR+W7OzrJZ6yLrl7BIUfDMA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp470rl1zSYp
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:47 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 405a
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:18:47 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 6c5fc2ba4239 - stable/15 - contrib/kyua: update config.h for 0.15.1 -> 0.15.2
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 6c5fc2ba4239d899c07693644912a575363a9757
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:18:47 +0000
Message-Id: <6b039477.405a.35f290b4@gitrepo.freebsd.org>

The branch stable/15 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=6c5fc2ba4239d899c07693644912a575363a9757

commit 6c5fc2ba4239d899c07693644912a575363a9757
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-11-20 00:03:26 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:17:41 +0000

    contrib/kyua: update config.h for 0.15.1 -> 0.15.2
    
    This was accidentally missed in the prior commit.
    
    This commit addresses a largely cosmetic issue.
    
    MFC after:      6 days
    MFC with:       c16da33701d0
    Fixes:          c16da33701d0 contrib/kyua: update to 0.15.2
    
    (cherry picked from commit d9daf5ae796518af1793f919156fb6feba05959d)
---
 contrib/kyua/config.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/contrib/kyua/config.h b/contrib/kyua/config.h
index cccfe36ae3a2..d456545697b3 100644
--- a/contrib/kyua/config.h
+++ b/contrib/kyua/config.h
@@ -122,7 +122,7 @@
 #define PACKAGE_NAME "Kyua"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "Kyua 0.15.1"
+#define PACKAGE_STRING "Kyua 0.15.2"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "kyua"
@@ -131,7 +131,7 @@
 #define PACKAGE_URL "https://github.com/freebsd/kyua/"
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "0.15.1"
+#define PACKAGE_VERSION "0.15.2"
 
 /* Define to 1 if all of the C89 standard headers exist (not just the ones
    required in a freestanding environment). This macro is provided for
@@ -139,4 +139,4 @@
 #define STDC_HEADERS 1
 
 /* Version number of package */
-#define VERSION "0.15.1"
+#define VERSION "0.15.2"

From nobody Mon Nov 23 01:18:48 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXp486NTNz71Tlb
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:18: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp481Wkbz4bt9
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:48 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795396728;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=+QZh0e7IWNLX0I/2GpcXd6RXkAabyg3ExX4QALzGQAA=;
	b=vi14ng7NUeRifKpmS2b5Qz+2oXEXwrIPYWyQYDg9NcjmxwYlKdf9eEg1+HRqeeRadYpBRx
	uDzc5k2AYJNy8bkwvYGDZSX682kU6CH5c20h0136Kf6sQFTkrArSs4g+2wQUDsq+E6mKWa
	ufV49FGKppnAk79F7FeX9jgGe9vHXGtbhYsm5/xCDOQ5Lutzmp7Cd/WpeamSjm/JgaXTO0
	bfYaIFhpRuFt05kCPmRH9qGWpgcwiFYP/DlG8P/rsjwkJKFkHHSpeHVd/eHrLvk6k4ifo0
	/PLPUe5Ej4DFo8EmE7rHUUCKEuEU1PCXSK+Cd/ABSgH08SpsIFSXJU4XfjiPKg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396728;
	b=HnvKaLot5U5AnYi5miXKSKrCABedWKbgznRkDRCGWnMW6QvWofTefG1msta738REw6g2mh
	G3+eFgZB85Al1wfHPXT55NrpZEcz7GHTJj7S8Np1l2QuKcwnTN0SF0IolslfVkmKrQt6Jj
	WIjCDFkvhGd6zPTIS51mzuRb7ji//WEeQo7SrUDSyRx8dllp1aG5lG2qxfkPQlgEGiOdV5
	MsM6Zwe7ARWzONdNhYjdSUF1mN6+kW/asbulEx6zouAngcj/EHdNOBLvgqv4Czsv57WoiY
	9bwgyRnYoyZ+hAPmyqhWjuT+3QLCpCPLBWZEgX5HyKg93JdJ0mx8BnTf8viYDg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795396728;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=+QZh0e7IWNLX0I/2GpcXd6RXkAabyg3ExX4QALzGQAA=;
	b=tCb2/k+7KXnwCJz2ftUlL3cgfeNC+7Il4JZe3lj5b7f+fK9SikG4tiKQzuzbionVtNjLBw
	InbJWCAOCnsOp9rhA5AiJZkPuLdHkhXcslpOYmY1jnyhUC9soz6pPvo87NRroXZX1vSlcb
	lhxJKx3pXwNxCLi/+qt20CzPCnuvRH5eQmmCfL5NbHIz6pgrmdaSe/AWPF8RnVl5VkO80I
	GKCiXoQaN7OiDWpvP1jVte0TAr/tK3fhc4usBQuGRm3885oLpbNRYwvmIW/Swm2Qc5jvM8
	sJG7PDQsK5nY5PdBy3yt15nLEAJFrrQEctgHTnNx+i4NtbEP3yp1Aw3UoWvEuw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp481B7szRl3
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:48 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 36b1
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:18:48 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 7687d4ca4600 - stable/15 - atf, lutok, kyua: compile with CXXSTD=gnu++20
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 7687d4ca4600a633fbd103f7ab9a38db0cb3ccc4
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:18:48 +0000
Message-Id: <6b039478.36b1.1bfb55e9@gitrepo.freebsd.org>

The branch stable/15 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=7687d4ca4600a633fbd103f7ab9a38db0cb3ccc4

commit 7687d4ca4600a633fbd103f7ab9a38db0cb3ccc4
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-10-31 20:13:06 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:17:41 +0000

    atf, lutok, kyua: compile with CXXSTD=gnu++20
    
    All three of the test infrastructure components require at least C++20
    in order to build. Make that version the default to better match what
    is required in recent versions of the projects.
    
    MFC after:      1 week
    
    (cherry picked from commit 0e58fb271c6e1cbd4b2ae5d33da181b7e7c2f0d5)
---
 lib/atf/common.mk     | 2 ++
 lib/liblutok/Makefile | 2 ++
 usr.bin/kyua/Makefile | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/lib/atf/common.mk b/lib/atf/common.mk
index e1967097d2c1..4b0f9911eecd 100644
--- a/lib/atf/common.mk
+++ b/lib/atf/common.mk
@@ -16,3 +16,5 @@ atf-version-real: .PHONY
 	@grep 'define VERSION' ${ATF}/config.h \
 	    | cut -d '"' -f 2 >atf-version-real
 CLEANFILES+= atf-version atf-version-real
+
+CXXSTD=		gnu++20
diff --git a/lib/liblutok/Makefile b/lib/liblutok/Makefile
index 08737afbb61a..a145cf3dab52 100644
--- a/lib/liblutok/Makefile
+++ b/lib/liblutok/Makefile
@@ -18,4 +18,6 @@ CFLAGS+=	-I${SRCTOP}/contrib/lutok/include \
 WARNS?=	3
 SHLIB_MAJOR=	0
 
+CXXSTD=		gnu++20
+
 .include <bsd.lib.mk>
diff --git a/usr.bin/kyua/Makefile b/usr.bin/kyua/Makefile
index 192a4e68734a..1b6889376f60 100644
--- a/usr.bin/kyua/Makefile
+++ b/usr.bin/kyua/Makefile
@@ -172,6 +172,8 @@ SRCS+=	os/freebsd/execenv_jail.cpp	\
 LIBADD+=	jail
 .endif
 
+CXXSTD=		gnu++20
+
 FILESGROUPS=	DOCS MISC STORE
 
 .if ${MK_EXAMPLES} != "no"

From nobody Mon Nov 23 01:18:49 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXp495Sj2z71TZW
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:18: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp493YQKz4btN
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:49 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795396729;
	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=2pTIVEp6VlhCeurK2/RmoO+4R4AouBwiKI38Dx6H9Fw=;
	b=g1K+lET9BPe49cdOKfGCP8ftzq1BeiqE62XjAXacqcSyMFnLWRB+HQNQULVu9gUBPdw2d6
	WcPw8ao1Unzk/lLi6cDkYxS2qgRaUr7t8nJIfjJ3cg7aLyDBGhZpSXQSAP5WzacKBi1eqj
	yEFE9NRLn08iQ9TkDww45EW5bXq0OU8+YG8PmuXR4gRQKfp/oc2aD7jBjblisB+Qwlujix
	GGG8IJraT+kyY2w6HpyOhIVZeKa3ecLl/y6b+F8hWOLncaEIimU4tMKplAMIWWA/sSl7t5
	2l9UrevQ0youmg/UAKL4rcdQ2m3MtbvnN30NWi4Pt4cix2THpJ+HUok68dB5qw==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396729;
	b=xEOCTNdxnALd0h7FEymbVzb2gfO7uqCYi6b0cCSvopzp8mCkBGxbFRbuC6eaMggY4HL6tW
	02B5UCjHKfPFj1uktk6Jm6sKJmt7zKnzlvHFsf/rmrz/AWH3b2JtM+uDP56Kzq4l32LHow
	K76znaiC9J5MiyqRUFhutCt8FeJV0gOFWWUsqjymfD2+0BC77kU4fg8xSUApZekKL7eP91
	xg/pALo9Z53+AiQSC59PeUZHyg1fvEqPCgGTQiP5NYMdCOxL9x67iriDHl3lw2r5tRNo/l
	CLUXaawspRZAanzalwBz4xstSQA0SEPkqBgTygvb+qEiHEhTQHDI5yVYZZW/Zg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795396729;
	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=2pTIVEp6VlhCeurK2/RmoO+4R4AouBwiKI38Dx6H9Fw=;
	b=EnhgtEYEwnP2QfyBLy4Hl7/Nc761p4QMNqIR/K1vXiUm1KPBuT3jfh35UI8Gsc8vyNjQF8
	/n0U3S/MOwpS9BIrDVSbwSjKbZ8KOymY9mpxXkDaXymDAFD1EJccVPTkev/jCUZjs27AgK
	ckiVtQ2KKICRVuTvCIvUyuh/JCj+DC5YQKBU/delkU0H3agujCoEd26ET9gFP7JVzyi2OQ
	pvttAP8y9uC6sHCCjz1lBkJT5EZC0/APzRsXZq4SgGw37uVT0xKYL+8FCednfeWqWUT6m3
	RTbpB1PQGc151PHjI1ywD0dQTeTCbKNnyi7B820jbWsVuXJoSPBhFVWb7Q8yDw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp491lnjzS2J
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:49 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 3acb
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:18:49 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Igor Ostapenko <igoro@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: d0322012f076 - stable/15 - kyua: Add "prepare" command
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: d0322012f0767cbb32ff5f1a098509e634a8e428
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:18:49 +0000
Message-Id: <6b039479.3acb.4c6e4146@gitrepo.freebsd.org>

The branch stable/15 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=d0322012f0767cbb32ff5f1a098509e634a8e428

commit d0322012f0767cbb32ff5f1a098509e634a8e428
Author:     Igor Ostapenko <igoro@FreeBSD.org>
AuthorDate: 2026-08-23 22:42:48 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:17:41 +0000

    kyua: Add "prepare" command
    
    This introduces the requirement preparation handler concept, with the
    first handler implemented to load the required kernel modules.
    
    Running without arguments lists all available handlers:
    
      kyua prepare
    
    Currently there are only two handlers:
    
      all: runs all available handlers
      kmods: loads the modules declared by required_kmods metadata
    
    The dry run option lists the required modules without actual loading:
    
      kyua prepare { --dry-run | -n } kmods
    
    The "prepare" command traverses only the given tree of tests, i.e., the
    following invocation lists all required modules for the whole test
    suite:
    
      kyua prepare -k /usr/tests/Kyuafile -n kmods
    
    , while this one is limited to the pf tests only:
    
      kyua prepare -k /usr/tests/sys/netpfil/pf/Kyuafile -n kmods
    
    Reviewed by:    ngie
    Differential Revision:  https://reviews.freebsd.org/D48087
    
    (cherry picked from commit edb230c4af499203d7a6894b3711fe6574b26040)
---
 contrib/kyua/cli/cmd_prepare.cpp            |  76 +++++++++++++++
 contrib/kyua/cli/cmd_prepare.hpp            |  53 +++++++++++
 contrib/kyua/cli/main.cpp                   |   2 +
 contrib/kyua/engine/prepare/prepare.cpp     |  83 ++++++++++++++++
 contrib/kyua/engine/prepare/prepare.hpp     | 107 +++++++++++++++++++++
 contrib/kyua/engine/prepare/prepare_all.cpp |  66 +++++++++++++
 contrib/kyua/engine/prepare/prepare_all.hpp |  53 +++++++++++
 contrib/kyua/model/metadata.hpp             |   4 +-
 contrib/kyua/os/freebsd/main.cpp            |   3 +
 contrib/kyua/os/freebsd/prepare_kmods.cpp   | 143 ++++++++++++++++++++++++++++
 contrib/kyua/os/freebsd/prepare_kmods.hpp   |  55 +++++++++++
 usr.bin/kyua/Makefile                       |   8 +-
 12 files changed, 649 insertions(+), 4 deletions(-)

diff --git a/contrib/kyua/cli/cmd_prepare.cpp b/contrib/kyua/cli/cmd_prepare.cpp
new file mode 100644
index 000000000000..a3ba5c3285a1
--- /dev/null
+++ b/contrib/kyua/cli/cmd_prepare.cpp
@@ -0,0 +1,76 @@
+// Copyright 2024 The Kyua Authors.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+//   notice, this list of conditions and the following disclaimer.
+// * 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.
+// * Neither the name of Google Inc. nor the names of its contributors
+//   may be used to endorse or promote products derived from this software
+//   without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER 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 "cli/cmd_prepare.hpp"
+
+#include "cli/common.ipp"
+#include "engine/prepare/prepare.hpp"
+#include "utils/cmdline/options.hpp"
+
+namespace cmdline = utils::cmdline;
+namespace config = utils::config;
+namespace prepare = engine::prepare;
+
+using cli::cmd_prepare;
+
+
+/// Default constructor for cmd_prepare.
+cmd_prepare::cmd_prepare(void) : cli_command(
+    "prepare", "[handler-name ...]", 0, -1,
+    "Prepares environment and declared requirements before testing")
+{
+    add_option(kyuafile_option);
+    add_option(build_root_option);
+    add_option(cmdline::bool_option('n', "dry-run", "Do not alter the system"));
+}
+
+
+/// Entry point for the "prepare" subcommand.
+///
+/// \param ui Object to interact with the I/O of the program.
+/// \param cmdline Representation of the command line to the subcommand.
+/// \param user_config The runtime configuration of the program.
+///
+/// \return 0 if successful, 1 otherwise.
+int
+cmd_prepare::run(cmdline::ui* ui, const cmdline::parsed_cmdline& cmdline,
+            const config::tree& user_config)
+{
+    // List available preparation handlers
+    if (cmdline.arguments().empty()) {
+        for (auto& h : prepare::handlers()) {
+            ui->out(h->name(), false);
+            ui->out("\t\t\t", false);
+            ui->out(h->description());
+        }
+        return EXIT_SUCCESS;
+    }
+
+    // Or run the given ones
+    return prepare::run(cmdline.arguments(), ui, cmdline, user_config);
+}
diff --git a/contrib/kyua/cli/cmd_prepare.hpp b/contrib/kyua/cli/cmd_prepare.hpp
new file mode 100644
index 000000000000..322b2baf9e8f
--- /dev/null
+++ b/contrib/kyua/cli/cmd_prepare.hpp
@@ -0,0 +1,53 @@
+// Copyright 2024 The Kyua Authors.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+//   notice, this list of conditions and the following disclaimer.
+// * 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.
+// * Neither the name of Google Inc. nor the names of its contributors
+//   may be used to endorse or promote products derived from this software
+//   without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER 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.
+
+/// \file cli/cmd_prepare.hpp
+/// Provides the cmd_prepare class.
+
+#if !defined(CLI_CMD_PREPARE_HPP)
+#define CLI_CMD_PREPARE_HPP
+
+#include "cli/common.hpp"
+
+namespace cli {
+
+
+/// Implementation of the "prepare" subcommand.
+class cmd_prepare : public cli_command
+{
+public:
+    cmd_prepare(void);
+
+    int run(utils::cmdline::ui*, const utils::cmdline::parsed_cmdline&,
+            const utils::config::tree&);
+};
+
+
+}  // namespace cli
+
+#endif  // !defined(CLI_CMD_PREPARE_HPP)
diff --git a/contrib/kyua/cli/main.cpp b/contrib/kyua/cli/main.cpp
index 6fd17c140270..ca15a06a999a 100644
--- a/contrib/kyua/cli/main.cpp
+++ b/contrib/kyua/cli/main.cpp
@@ -49,6 +49,7 @@ extern "C" {
 #include "cli/cmd_debug.hpp"
 #include "cli/cmd_help.hpp"
 #include "cli/cmd_list.hpp"
+#include "cli/cmd_prepare.hpp"
 #include "cli/cmd_report.hpp"
 #include "cli/cmd_report_html.hpp"
 #include "cli/cmd_report_junit.hpp"
@@ -195,6 +196,7 @@ safe_main(cmdline::ui* ui, int argc, const char* const argv[],
 
     commands.insert(new cli::cmd_debug(), "Workspace");
     commands.insert(new cli::cmd_list(), "Workspace");
+    commands.insert(new cli::cmd_prepare(), "Workspace");
     commands.insert(new cli::cmd_test(), "Workspace");
 
     commands.insert(new cli::cmd_report(), "Reporting");
diff --git a/contrib/kyua/engine/prepare/prepare.cpp b/contrib/kyua/engine/prepare/prepare.cpp
new file mode 100644
index 000000000000..218b236450c0
--- /dev/null
+++ b/contrib/kyua/engine/prepare/prepare.cpp
@@ -0,0 +1,83 @@
+// Copyright 2024 The Kyua Authors.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+//   notice, this list of conditions and the following disclaimer.
+// * 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.
+// * Neither the name of Google Inc. nor the names of its contributors
+//   may be used to endorse or promote products derived from this software
+//   without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER 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 "engine/prepare/prepare.hpp"
+
+#include "engine/prepare/prepare_all.hpp"
+
+namespace prepare = engine::prepare;
+
+
+/// List of registered requirement preparation handlers.
+///
+/// Use register_handler() to add an entry to this global list.
+static std::vector< std::shared_ptr< prepare::handler > > _handlers = {
+    std::shared_ptr< prepare::handler >(new prepare::prepare_all())
+};
+
+
+void
+prepare::register_handler(const std::shared_ptr< handler > handler)
+{
+    _handlers.push_back(handler);
+}
+
+
+const std::vector< std::shared_ptr< prepare::handler > >
+prepare::handlers()
+{
+    return _handlers;
+}
+
+
+int
+prepare::run(const std::vector< std::string >& handler_names,
+        cmdline::ui* ui,
+        const cmdline::parsed_cmdline& cmdline,
+        const config::tree& user_config)
+{
+    for (auto& hname : handler_names) {
+        std::shared_ptr< prepare::handler > handler = nullptr;
+        for (auto& h : prepare::handlers())
+            if (h->name() == hname) {
+                handler = h;
+                break;
+            }
+
+        if (handler == nullptr) {
+            ui->out(F("Unknown requirement preparation handler: %s") % hname);
+            return EXIT_FAILURE;
+        }
+
+        if (handler->exec(ui, cmdline, user_config) != 0)
+            // suppress the actual code -- main limits possible exit codes
+            return EXIT_FAILURE;
+    }
+
+    return EXIT_SUCCESS;
+}
diff --git a/contrib/kyua/engine/prepare/prepare.hpp b/contrib/kyua/engine/prepare/prepare.hpp
new file mode 100644
index 000000000000..2ee12b11a623
--- /dev/null
+++ b/contrib/kyua/engine/prepare/prepare.hpp
@@ -0,0 +1,107 @@
+// Copyright 2024 The Kyua Authors.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+//   notice, this list of conditions and the following disclaimer.
+// * 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.
+// * Neither the name of Google Inc. nor the names of its contributors
+//   may be used to endorse or promote products derived from this software
+//   without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER 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.
+
+/// \file engine/prepare/prepare.hpp
+/// Requirement preparation subsystem interface.
+
+#if !defined(ENGINE_PREPARE_HPP)
+#define ENGINE_PREPARE_HPP
+
+#include <string>
+#include <vector>
+
+#include "utils/cmdline/parser.ipp"
+#include "utils/cmdline/ui.hpp"
+#include "utils/config/tree.ipp"
+
+namespace cmdline = utils::cmdline;
+namespace config = utils::config;
+
+
+namespace engine {
+namespace prepare {
+
+
+/// Abstract interface of a requirement preparation handler.
+class handler {
+public:
+    /// Constructor.
+    handler() {}
+
+    /// Destructor.
+    virtual ~handler() {}
+
+    /// Returns name of the handler.
+    virtual const std::string& name() const = 0;
+
+    /// Returns short description of the handler.
+    virtual const std::string& description() const = 0;
+
+    /// Runs the requirement preparation handler.
+    ///
+    /// \param ui Object to interact with the I/O of the program.
+    /// \param cmdline Representation of the command line to the subcommand.
+    /// \param user_config The runtime configuration of the program.
+    ///
+    /// \return 0 to indicate success.
+    virtual int exec(cmdline::ui* ui,
+                     const cmdline::parsed_cmdline& cmdline,
+                     const config::tree& user_config) const = 0;
+};
+
+
+/// Registers a requirement preparation handler.
+///
+/// \param handler A requirement preparation handler.
+void register_handler(const std::shared_ptr< handler > handler);
+
+
+/// Returns the list of registered requirement preparation handlers.
+///
+/// \return A vector of pointers to requirement preparation handlers.
+const std::vector< std::shared_ptr< handler > > handlers();
+
+
+/// Run named handlers.
+///
+/// \param handler_names Names of the handlers to run.
+/// \param ui Object to interact with the I/O of the program.
+/// \param cmdline Representation of the command line to the subcommand.
+/// \param user_config The runtime configuration of the program.
+///
+/// \return 0 to indicate success.
+int run(const std::vector< std::string >& handler_names,
+        cmdline::ui* ui,
+        const cmdline::parsed_cmdline& cmdline,
+        const config::tree& user_config);
+
+
+}  // namespace prepare
+}  // namespace engine
+
+#endif  // !defined(ENGINE_PREPARE_HPP)
diff --git a/contrib/kyua/engine/prepare/prepare_all.cpp b/contrib/kyua/engine/prepare/prepare_all.cpp
new file mode 100644
index 000000000000..db8ea330a51e
--- /dev/null
+++ b/contrib/kyua/engine/prepare/prepare_all.cpp
@@ -0,0 +1,66 @@
+// Copyright 2024 The Kyua Authors.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+//   notice, this list of conditions and the following disclaimer.
+// * 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.
+// * Neither the name of Google Inc. nor the names of its contributors
+//   may be used to endorse or promote products derived from this software
+//   without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER 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 "engine/prepare/prepare_all.hpp"
+
+static const std::string _name = "all";
+static const std::string _description = "Run all preparations";
+
+namespace prepare = engine::prepare;
+
+
+const std::string&
+prepare::prepare_all::name() const
+{
+    return _name;
+}
+
+
+const std::string&
+prepare::prepare_all::description() const
+{
+    return _description;
+}
+
+
+int
+prepare::prepare_all::exec(cmdline::ui* ui,
+                           const cmdline::parsed_cmdline& cmdline,
+                           const config::tree& user_config) const
+{
+    for (auto& handler : prepare::handlers()) {
+        if (handler->name() == this->name())
+            continue;
+
+        int error = handler->exec(ui, cmdline, user_config);
+        if (error != EXIT_SUCCESS)
+            return error;
+    }
+
+    return EXIT_SUCCESS;
+}
diff --git a/contrib/kyua/engine/prepare/prepare_all.hpp b/contrib/kyua/engine/prepare/prepare_all.hpp
new file mode 100644
index 000000000000..7c5c54fe269c
--- /dev/null
+++ b/contrib/kyua/engine/prepare/prepare_all.hpp
@@ -0,0 +1,53 @@
+// Copyright 2024 The Kyua Authors.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+//   notice, this list of conditions and the following disclaimer.
+// * 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.
+// * Neither the name of Google Inc. nor the names of its contributors
+//   may be used to endorse or promote products derived from this software
+//   without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER 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.
+
+/// \file engine/prepare/prepare_all.hpp
+/// The requirement preparation handler which runs all registered handlers.
+
+#if !defined(ENGINE_PREPARE_ALL_HPP)
+#define ENGINE_PREPARE_ALL_HPP
+
+#include "engine/prepare/prepare.hpp"
+
+namespace engine {
+namespace prepare {
+
+
+class prepare_all : public prepare::handler {
+public:
+    const std::string& name() const;
+    const std::string& description() const;
+    int exec(cmdline::ui*, const cmdline::parsed_cmdline&,
+             const config::tree&) const;
+};
+
+
+}  // namespace prepare
+}  // namespace engine
+
+#endif  // !defined(ENGINE_PREPARE_ALL_HPP)
diff --git a/contrib/kyua/model/metadata.hpp b/contrib/kyua/model/metadata.hpp
index eee7eaf0f7c4..d915677eb41d 100644
--- a/contrib/kyua/model/metadata.hpp
+++ b/contrib/kyua/model/metadata.hpp
@@ -75,8 +75,8 @@ public:
     const strings_set& required_configs(void) const;
     const utils::units::bytes& required_disk_space(void) const;
     const paths_set& required_files(void) const;
-    const utils::units::bytes& required_memory(void) const;
     const strings_set& required_kmods(void) const;
+    const utils::units::bytes& required_memory(void) const;
     const paths_set& required_programs(void) const;
     const std::string& required_user(void) const;
     const utils::datetime::delta& timeout(void) const;
@@ -121,8 +121,8 @@ public:
     metadata_builder& set_required_configs(const strings_set&);
     metadata_builder& set_required_disk_space(const utils::units::bytes&);
     metadata_builder& set_required_files(const paths_set&);
-    metadata_builder& set_required_memory(const utils::units::bytes&);
     metadata_builder& set_required_kmods(const strings_set&);
+    metadata_builder& set_required_memory(const utils::units::bytes&);
     metadata_builder& set_required_programs(const paths_set&);
     metadata_builder& set_required_user(const std::string&);
     metadata_builder& set_string(const std::string&, const std::string&);
diff --git a/contrib/kyua/os/freebsd/main.cpp b/contrib/kyua/os/freebsd/main.cpp
index 1fe4fca8cae4..57e5cc8e8d97 100644
--- a/contrib/kyua/os/freebsd/main.cpp
+++ b/contrib/kyua/os/freebsd/main.cpp
@@ -63,6 +63,9 @@ freebsd::main(const int, const char* const* const)
 
     prepare::register_handler(
         std::make_shared<freebsd::prepare_kmods>());
+
+    prepare::register_handler(
+        std::shared_ptr< prepare::handler >(new freebsd::prepare_kmods()));
 #endif
 
     return 0;
diff --git a/contrib/kyua/os/freebsd/prepare_kmods.cpp b/contrib/kyua/os/freebsd/prepare_kmods.cpp
new file mode 100644
index 000000000000..91771f3aedfd
--- /dev/null
+++ b/contrib/kyua/os/freebsd/prepare_kmods.cpp
@@ -0,0 +1,143 @@
+// Copyright 2024 The Kyua Authors.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+//   notice, this list of conditions and the following disclaimer.
+// * 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.
+// * Neither the name of Google Inc. nor the names of its contributors
+//   may be used to endorse or promote products derived from this software
+//   without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER 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 "os/freebsd/prepare_kmods.hpp"
+
+#include "cli/common.hpp"
+#include "drivers/list_tests.hpp"
+#include "engine/filters.hpp"
+#include "model/metadata.hpp"
+#include "model/test_case.hpp"
+#include "model/test_program.hpp"
+
+#include <system_error>
+
+// FreeBSD kldload syscall
+extern "C" {
+#include <sys/param.h>
+#include <sys/linker.h>
+}
+
+
+namespace {
+
+
+static const std::string _name = "kmods";
+static const std::string _description = "FreeBSD: load modules specified "
+    "in the required_kmods metadata";
+
+
+/// Hooks for list_tests to examine test cases as they come.
+class list_hooks : public drivers::list_tests::base_hooks {
+    /// Collected names of required kernel modules.
+    std::set< std::string >& _modules;
+
+public:
+    /// Initializes the hooks.
+    ///
+    /// \param modules_ The set of modules to fill.
+    list_hooks(std::set< std::string >& modules_) :
+        _modules(modules_)
+    {
+    }
+
+    /// Examine a test case as soon as it is found.
+    ///
+    /// \param test_program The test program containing the test case.
+    /// \param test_case_name The name of the located test case.
+    void
+    got_test_case(const model::test_program& test_program,
+                  const std::string& test_case_name)
+    {
+        auto test_case = test_program.find(test_case_name);
+        auto kmods = test_case.get_metadata().required_kmods();
+        _modules.insert(kmods.begin(), kmods.end());
+    }
+};
+
+
+}  // anonymous namespace
+
+
+namespace freebsd {
+
+
+const std::string&
+prepare_kmods::name() const
+{
+    return _name;
+}
+
+
+const std::string&
+prepare_kmods::description() const
+{
+    return _description;
+}
+
+
+int
+prepare_kmods::exec(cmdline::ui* ui, const cmdline::parsed_cmdline& cmdline,
+               const config::tree& user_config) const
+{
+    int err = 0;
+
+    // Collect required modules
+    std::set< std::string > modules;
+    list_hooks hooks(modules);
+    const std::set< engine::test_filter > nofilters;
+    const drivers::list_tests::result result = drivers::list_tests::drive(
+        cli::kyuafile_path(cmdline), cli::build_root_path(cmdline),
+        nofilters, user_config, hooks);
+
+    // Nothing to do
+    if (modules.empty())
+        return 0;
+
+    // Announce the work
+    ui->out("kldload", false);
+    for (auto& m : modules)
+        ui->out(F(" %s") % m, false);
+    ui->out("");
+
+    if (cmdline.has_option("dry-run"))
+        return 0;
+
+    // Load the modules
+    for (auto& m : modules) {
+        if (::kldload(m.c_str()) != -1 || errno == EEXIST)
+            continue;
+        ui->out(F("WARN: cannot kldload %s") % m);
+        err = EINVAL;
+    }
+
+    return err;
+}
+
+
+}  // namespace freebsd
diff --git a/contrib/kyua/os/freebsd/prepare_kmods.hpp b/contrib/kyua/os/freebsd/prepare_kmods.hpp
new file mode 100644
index 000000000000..36a3236a4e2d
--- /dev/null
+++ b/contrib/kyua/os/freebsd/prepare_kmods.hpp
@@ -0,0 +1,55 @@
+// Copyright 2024 The Kyua Authors.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+//   notice, this list of conditions and the following disclaimer.
+// * 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.
+// * Neither the name of Google Inc. nor the names of its contributors
+//   may be used to endorse or promote products derived from this software
+//   without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER 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.
+
+/// \file os/freebsd/prepare_kmods.hpp
+/// The preparation handler which loads FreeBSD modules declared via
+/// "required_kmods" metadata.
+
+#if !defined(FREEBSD_PREPARE_KMODS_HPP)
+#define FREEBSD_PREPARE_KMODS_HPP
+
+#include "engine/prepare/prepare.hpp"
+
+namespace prepare = engine::prepare;
+
+
+namespace freebsd {
+
+
+class prepare_kmods : public prepare::handler {
+public:
+    const std::string& name() const;
+    const std::string& description() const;
+    int exec(cmdline::ui*, const cmdline::parsed_cmdline&,
+             const config::tree&) const;
+};
+
+
+}  // namespace freebsd
+
+#endif  // !defined(FREEBSD_PREPARE_KMODS_HPP)
diff --git a/usr.bin/kyua/Makefile b/usr.bin/kyua/Makefile
index 1b6889376f60..68b3a064280b 100644
--- a/usr.bin/kyua/Makefile
+++ b/usr.bin/kyua/Makefile
@@ -127,11 +127,14 @@ SRCS+=	engine/atf.cpp			\
 	engine/tap_parser.cpp		\
 	engine/scheduler.cpp		\
 	engine/execenv/execenv.cpp	\
-	engine/execenv/execenv_host.cpp
+	engine/execenv/execenv_host.cpp	\
+	engine/prepare/prepare.cpp	\
+	engine/prepare/prepare_all.cpp
 
 SRCS+=	os/freebsd/execenv_jail_manager.cpp	\
 	os/freebsd/main.cpp			\
-	os/freebsd/reqs_checker_kmods.cpp
+	os/freebsd/reqs_checker_kmods.cpp	\
+	os/freebsd/prepare_kmods.cpp
 
 SRCS+=	store/dbtypes.cpp		\
 	store/exceptions.cpp		\
@@ -156,6 +159,7 @@ SRCS+=	cli/cmd_about.cpp		\
 	cli/cmd_debug.cpp		\
 	cli/cmd_help.cpp		\
 	cli/cmd_list.cpp		\
+	cli/cmd_prepare.cpp		\
 	cli/cmd_report.cpp		\
 	cli/cmd_report_html.cpp		\
 	cli/cmd_report_junit.cpp	\

From nobody Mon Nov 23 01:18:50 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXp4B5Dw0z71Tfr
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:18:50 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp4B3zCcz4c0C
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:50 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795396730;
	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=rS7YxNrRjI6EPu4IgoMjXDw316m/InE2uk9mdP37hkM=;
	b=B0euwRJpbxEX3yhw4AgIIhWnkWrJ9jlY+d/qPrgRo78cpJVbPyzJFtoOc78f/UqEIL3+Ac
	ZYwDrhN9o43mWDms5JV1ygEt9p9ltiBotfXkkJPQ2gYguUDvlkdF1qOGowDUmd+vQloSOq
	O2jh93pLBQDPdanhufEQ3cXEfO/U87XkwBFaoQEJ+fZcQTCyp5GHnhegM/jcWsVEwHEM+7
	5VutOqcE3K684ZNeEeCvB2advyhEmeK3IY0AEA2K7DUyuXYfveo0uwX6MM7dQbKj61qZVL
	grdfPzB2oKjhwQNVIE5KHqfrg+dV6HLEqyGIyTHbWpqX8o08ds7dcM5dEYN5wg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396730;
	b=kBS0fs0nd4DXs1SXtBk1mbTrCK/wnH4JNFibf7EVyTKnwoIeQ0f4mBFKu8VV0hXVhD+rqp
	Ax7drGevtf/XbywlP2oVpOGAQ7tUZ8Qd6SF0Uk8c/fjU9iEowZFAjEUjxpAlfXHcF2km2x
	UvDfNqz/gBuI3ePOYDbcZb9LpS6D3VWdOuRf4L8wBAzhxleZtuP7ufpNhXOpUkUZbq/OpZ
	NKk2Os+wxNCoUfXTVvpw10TZWCnavuEabpk3Z2CIJ/SpjFsP5d5Zdzo5UQzoJ56rtzJwdf
	cMZcSOdvfrYQC8JagETxLBLBxbzeqPJWVPfd5AN4QtFTlZMvUhA88xLUFPfdsQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795396730;
	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=rS7YxNrRjI6EPu4IgoMjXDw316m/InE2uk9mdP37hkM=;
	b=MiWTyEHYGlBWo/Ptcf5ykZ+qP4UjRd/TO2rKTzVmqa0CW0pI5uQQ28yIgmRZipDaLtS0T6
	PsyvVTuLV2+FOEdi/FzSGJj6dTp267FfqFd1HUBeLNVI9iLXLzfDFSn+T4Yv4fzFtGskCB
	1BZBHK5peeL7MBpcpYaHhzCKUEyDg48xpFC8g2Z9+LGgRo/hbkNlwFNacBrfGSjc74jrfx
	817TIQXdmDBzOPEJK+X7ASnwIC3Mj8QeZMTvhi1cMwI+pRddIt8vEs4I/8KNVSmTEefl8L
	mG38mb5w88or3GhWCUWGok8xaVeR7kMmmR0ZfJGa4d7/Ks+w41Lu+4OBzOIQ6g==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp4B1vN7zSbd
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:50 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id f35
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:18:50 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Siva Mahadevan <siva@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 281f1610f178 - stable/15 - contrib/kyua: fix -Wshadow error
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 281f1610f178192bb708083f768d5bf5135a2769
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:18:50 +0000
Message-Id: <6b03947a.f35.51005ac7@gitrepo.freebsd.org>

The branch stable/15 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=281f1610f178192bb708083f768d5bf5135a2769

commit 281f1610f178192bb708083f768d5bf5135a2769
Author:     Siva Mahadevan <siva@FreeBSD.org>
AuthorDate: 2026-09-05 14:12:11 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:17:41 +0000

    contrib/kyua: fix -Wshadow error
    
    This fixes the build with gcc 14:
    
    /usr/src/contrib/kyua/engine/prepare/prepare_all.cpp:56:16: error: declaration of 'handler' shadows a member of 'engine::prepare::prepare_all' [-Werror=shadow]
       56 |     for (auto& handler : prepare::handlers()) {
          |                ^~~~~~~
    In file included from /usr/src/contrib/kyua/engine/prepare/prepare_all.hpp:35,
                     from /usr/src/contrib/kyua/engine/prepare/prepare_all.cpp:29:
    /usr/src/contrib/kyua/engine/prepare/prepare.hpp:51:15: note: shadowed declaration is here
       51 | class handler {
          |               ^
    
    Fixes:  edb230c4af499203d7a6894b3711fe6574b26040
    
    Reviewed by:    igoro, rlibby, ngie
    MFC after:      3 days
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D59346
    
    (cherry picked from commit a73bb621ca361edc678bbf49f3ca1acca8aa0344)
---
 contrib/kyua/engine/prepare/prepare_all.cpp | 6 +++---
 contrib/kyua/os/freebsd/main.cpp            | 3 ---
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/contrib/kyua/engine/prepare/prepare_all.cpp b/contrib/kyua/engine/prepare/prepare_all.cpp
index db8ea330a51e..73591ef5822a 100644
--- a/contrib/kyua/engine/prepare/prepare_all.cpp
+++ b/contrib/kyua/engine/prepare/prepare_all.cpp
@@ -53,11 +53,11 @@ prepare::prepare_all::exec(cmdline::ui* ui,
                            const cmdline::parsed_cmdline& cmdline,
                            const config::tree& user_config) const
 {
-    for (auto& handler : prepare::handlers()) {
-        if (handler->name() == this->name())
+    for (auto& h : prepare::handlers()) {
+        if (h->name() == this->name())
             continue;
 
-        int error = handler->exec(ui, cmdline, user_config);
+        int error = h->exec(ui, cmdline, user_config);
         if (error != EXIT_SUCCESS)
             return error;
     }
diff --git a/contrib/kyua/os/freebsd/main.cpp b/contrib/kyua/os/freebsd/main.cpp
index 57e5cc8e8d97..1fe4fca8cae4 100644
--- a/contrib/kyua/os/freebsd/main.cpp
+++ b/contrib/kyua/os/freebsd/main.cpp
@@ -63,9 +63,6 @@ freebsd::main(const int, const char* const* const)
 
     prepare::register_handler(
         std::make_shared<freebsd::prepare_kmods>());
-
-    prepare::register_handler(
-        std::shared_ptr< prepare::handler >(new freebsd::prepare_kmods()));
 #endif
 
     return 0;

From nobody Mon Nov 23 01:18:51 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXp4C5bG0z71TZc
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:18: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp4C2gYYz4br8
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:51 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795396731;
	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=8D6Ftbs1mUMLjjv/crBLpWST0nBaHqjzNWqEgjdOOkg=;
	b=nKzA8QUM3tEuCpu3rd6MUjCPDJxeWn4iMWJKC3bTvpdL59O84/7Wtg0Y1k2wpekhnMmCkn
	BrsDbMXWN/H2DSd4thefpJgEj6osyMdQL24IedaEr9DxLEMK72QZL3aRNDhFXYBasNDftg
	0fTfJ3z8YlkNA4lBXrsKyBReo7pPTZci9/Wj/iWYfcngFt/mTH++gw2msQ1FeXgNmwU6aD
	5/PtfL+DVfvvzpfmAhg2xefj8YXRHC7ckAuabUdhGiyURc39ku8+wupXDWmO9nRc//rww3
	/a7SLKr6IPeBRw2a0wUupliRkvrHew6RZq16k/yNvr6UPmeZo5er+xFVzA6nyg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396731;
	b=qDl8FbkHTvk1mg0CHrQD2aO72BSBNFtNPzHorDRN6yfUW5YgbuwUBh6pb5y+7V3fq2x0fB
	7b5LhPuXBr6r9Uwfuz6oQYUjWSxaeFZPU247g9fnfcr6J4vznk+5eQjiS87lhV3FBrQdxV
	9k7f7LzQt9EjF3s52sBIunAuYBhx4ktABLM5Mq1qTv/jGTT0vKyGLhYtVLbe5DBoSTgUEV
	eyrPABpDG8m5gq8szEJrSc+jIrpx+2N0HY4Lkz2XRWUydSIq+QkmhW+CQdCG08pKbi1aAW
	t5WyLJ9Whyy/Wqnfletp38GBfZAcxSsVMGStuzMoGKPoA5Kgo3647fj3UjAfPA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795396731;
	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=8D6Ftbs1mUMLjjv/crBLpWST0nBaHqjzNWqEgjdOOkg=;
	b=lwBZEDqjJ3Vi1EUvhWcswYIfRFbhpqk1FKGj6U2w2+O8ocWoKdPNgb6iFt8NY/SyMZaR4i
	36Sm1CYhT9MKneJZjbzsL59dnWhJKFpOdDZBVPbRhSSKOM5COmblOkW8C0JS3SKmUwtRbg
	s0w7tEQKMGU0sULER8fgtDrzD2nbpaUyt6pQBjcLFVnxDaqey0UazUfzXsybK4UEhTp5J9
	PveGaYM4gYs0R1YWbIQdmPX+KZhY+xIyK5xISJQx4KXsL6ActVYjM1Sk7bsCQXi045r6Az
	n8xz6krowbf/4TePcvqRJlc9V4LripIckCAfIUQRYd/HcfaBrLOPtrE0tXxfNA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp4C2HG3zSYq
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:18:51 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1ef7
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:18:51 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Igor Ostapenko <igoro@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: cf6c2bf648a1 - stable/15 - kyua: Make "test" command actually report about workdir cleanup issues
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: cf6c2bf648a1c42134cb66dff02b6498c4c1a865
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:18:51 +0000
Message-Id: <6b03947b.1ef7.31132342@gitrepo.freebsd.org>

The branch stable/15 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=cf6c2bf648a1c42134cb66dff02b6498c4c1a865

commit cf6c2bf648a1c42134cb66dff02b6498c4c1a865
Author:     Igor Ostapenko <igoro@FreeBSD.org>
AuthorDate: 2025-10-11 13:14:16 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:17:41 +0000

    kyua: Make "test" command actually report about workdir cleanup issues
    
    Reviewed by:    ngie
    MFC after:      1 month
    Differential Revision:  https://reviews.freebsd.org/D51136
    
    (cherry picked from commit 21716b6c3ed6e28fe5cc14ee3ffe93f44c458b09)
---
 contrib/kyua/drivers/run_tests.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/kyua/drivers/run_tests.cpp b/contrib/kyua/drivers/run_tests.cpp
index e8ee03385184..b5231ac07f92 100644
--- a/contrib/kyua/drivers/run_tests.cpp
+++ b/contrib/kyua/drivers/run_tests.cpp
@@ -212,7 +212,7 @@ finish_test(scheduler::result_handle_ptr result_handle,
     hooks.got_result(
         *test_result_handle->test_program(),
         test_result_handle->test_case_name(),
-        test_result_handle->test_result(),
+        test_result,
         result_handle->end_time() - result_handle->start_time());
 }
 

From nobody Mon Nov 23 01:21:06 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXp6q3Httz71Tyh
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:21:07 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXp6p6TwNz4gNL
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:21:06 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795396866;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=kZaq16cKffD8XD0xhEOjLuEhq2TQI49kAkxI/uOUdsI=;
	b=NuuathuSfhNcvrSStjSQB194rUN31SxQQ6Bxds6+YSTDjP6ZBWVG0w50Eonx2IcD4MboM6
	83h+42mm9kYrrk66bT4Ira5K8hrKWBCc8J4ZD7tocL5tKW91EyeO98Ksx8RE8waIwMf+0H
	LSrlHsbQA4gYySDtktzTikMFSrIxoG8aqH+gqMa4FM1VQ7rnhJub3D55izulUF6NVDL5kK
	1yx9SFCLuqFWQMcFUi2vfFiRWjAb62m81FqzihdAhg23VmSjdBg9YWYmk950rw8xT2MUpl
	kS5fUwtZV82b9noRnZv5VVkyHy5wTDayI9o76JcGa0ofFzYmKaaKxLU1GivmFg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795396866;
	b=BhaA9MYqEqb7q6o9lTApsQb9Q9IcOmoUBDmq215MPRCSxzKvuG+QNOpUB3hQ3RMwfxgkhg
	6ke8pdBG753y74Ef6ODJyEMPYoZGOW8tTEloIXiTv9ZaEsQ3uVdFLTz2lWTcSTEl5cJaXT
	bTtZNkzSYa69bXhyLvzEoiYEYrjIp5fu/ciz5kmU+jHWxwT4UI5woMhQeaGc/EpucZ9KqZ
	bpqfd6eSVarjYTMEH5/ujBcCYuNc2ewYyeH+eFhDnwpIuAqPQDCDmWm7947EtR+PMmk+E2
	0ic6pCR/pemfUECXmwif1I4i6uJ8avYLqeiOeH0nb/YY/KePSLe8TM0g4nWiEw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795396866;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=kZaq16cKffD8XD0xhEOjLuEhq2TQI49kAkxI/uOUdsI=;
	b=F4gYnSlTnWzqfLkpA46i3teLdx/AnaDYUSszmY+vit042erm/p4qHE34GCgWhZ1or/kzns
	5XejPYXv9myJM2tpRXNTX+vIIKCqP78ojX5AAKBNXY861QbWtk3i7HBi91LJ7L8Ll1eSYi
	ydmdWxPOxyNwpae5Hcmz8KKMmC08pUEzowQhcPgIVny4fuVHAeRzCbjcQOiZJH435CArEV
	e6HOIc/PHZ5Wq8F3Tb+iBd+UuEDByE4FFToQM0DAjvmeDwrLSWcaGeWHlznaXgqRQyG93D
	BKQIzdGMrXvyz7BKf8+xgJ5T4OHK5f+8Nti5OwNB8AlOtO4XIHomrdbgTIBkIA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXp6p5hclzSHK
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:21:06 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 4928
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:21:06 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Mark Johnston <markj@FreeBSD.org>
Subject: git: 24e09265f924 - main - swap_pager: Keep the object stable in swap_pager_swapoff_object()
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: 24e09265f9242965180c6c8b03f3c5c79acf1006
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:21:06 +0000
Message-Id: <6b039502.4928.63a49d90@gitrepo.freebsd.org>

The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=24e09265f9242965180c6c8b03f3c5c79acf1006

commit 24e09265f9242965180c6c8b03f3c5c79acf1006
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-11-23 01:19:56 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-11-23 01:19:56 +0000

    swap_pager: Keep the object stable in swap_pager_swapoff_object()
    
    Several operations in the inner loop may drop the object lock, with
    nothing preventing the object from being freed and recycled in that
    window.
    
    Fix this: bump the paging-in-progress counter across the whole
    operation.  Don't bother freeing swap blocks from a dead object: the
    terminating thread deals with that, and swap_pager_swapoff_object()'s
    caller will retry if needed.
    
    Reported by:    llm-postcr
    Reviewed by:    alc, kib
    MFC after:      1 week
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D61932
---
 sys/vm/swap_pager.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c
index ff29d93c552a..29d01b97f4a4 100644
--- a/sys/vm/swap_pager.c
+++ b/sys/vm/swap_pager.c
@@ -1923,6 +1923,12 @@ swap_pager_swapoff_object(struct swdevt *sp, vm_object_t object,
 	KASSERT((sp->sw_flags & SW_CLOSING) != 0,
 	    ("%s: Device not blocking further allocations", __func__));
 
+	/*
+	 * Make sure that the object doesn't get freed while paging or
+	 * allocating memory.
+	 */
+	vm_object_pip_add(object, 1);
+
 	vm_page_iter_init(&pages, object);
 	swp_pager_init_freerange(&range);
 	sb = swblk_iter_init(&blks, object, 0);
@@ -1972,7 +1978,6 @@ swap_pager_swapoff_object(struct swdevt *sp, vm_object_t object,
 			}
 
 			/* Get the page from swap, and restart the scan. */
-			vm_object_pip_add(object, 1);
 			rahead = SWAP_META_PAGES;
 			rv = swap_pager_getpages_locked(&blks, object, &m, 1,
 			    NULL, &rahead, *bp);
@@ -1981,7 +1986,6 @@ swap_pager_swapoff_object(struct swdevt *sp, vm_object_t object,
 				    __func__, rv);
 			*bp = uma_zalloc(swrbuf_zone, M_WAITOK);
 			VM_OBJECT_WLOCK(object);
-			vm_object_pip_wakeupn(object, 1);
 			KASSERT(vm_page_all_valid(m),
 			    ("%s: Page %p not all valid", __func__, m));
 			vm_page_deactivate_noreuse(m);
@@ -1991,17 +1995,11 @@ swap_pager_swapoff_object(struct swdevt *sp, vm_object_t object,
 		if (i < SWAP_META_PAGES) {
 			/*
 			 * The object lock has been released and regained.
-			 * Perhaps the object is now dead.
+			 * Perhaps the object is now dead.  If so, the
+			 * terminating thread will free its swap blocks.
 			 */
-			if ((object->flags & OBJ_DEAD) != 0) {
-				/*
-				 * Make sure that pending writes finish before
-				 * returning.
-				 */
-				vm_object_pip_wait(object, "swpoff");
-				swp_pager_meta_free_all(object);
+			if ((object->flags & OBJ_DEAD) != 0)
 				break;
-			}
 
 			/*
 			 * The swapblk could have been freed, so reset the pages
@@ -2025,6 +2023,8 @@ swap_pager_swapoff_object(struct swdevt *sp, vm_object_t object,
 		sb = swblk_iter_next(&blks);
 	}
 	swp_pager_freeswapspace(&range);
+
+	vm_object_pip_wakeupn(object, 1);
 }
 
 /*

From nobody Mon Nov 23 01:31:41 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXpM13mYNz71YmT
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:31: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpM12FRXz4ks1
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:31:41 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795397501;
	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=VeRcXRR09xAKCY8SbukZBDXvhmOLxMxKBtXIPBN3zYk=;
	b=QeqM5mqNUrCRE256TeUgMmeSDpW4maBE5uiXrTMFLXqdzgVg3MKmbVfoFAbnDuaqBsptwR
	wKN7v0NSVqMuwciEbZCIdwxQfJ92vLPzph0pN9C8/NaCAPSHsItvuNZ3AqLrM7pOzkxLXM
	FbOQmZcyiB14p88RWusHFQ15GZUnMVmVKAC7b5+qpDpE6CGo85oKouzc0s5W6kJfE8hkoS
	ZLgEe0b79kCh6UGwIxVo/DQ0xW+GDNfgw6mlUBwmgpiIqN3hKEPr76HmZtUOUfjBmUAdXj
	DTLqJcI92SxO3uiYi/9YHx/KRa+GI7N1wjU2Lmn7Kpb5vgj6lz9PCAcxK6pO2Q==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397501;
	b=uf7GUdbWRGc2Tn/dQj9EF3ZjepXW8i6kmEEnU2q0Z53KMYwGoV/qtKSeyg23x6GPY6CQGu
	ZM8z95nUEyWztzd7i/DCbOyWSbADoFXybQvM4lPp12RKozQzNWnyKkrwTsxgE4Iq0LzkUH
	bTwe4wa0xnVIf5GJGJoGwBSM3bVAMiNd2VrRsTPNdUlO1tQEz+r/E0cALconOkZZiekH2y
	MtqStaazHxEL5w8yXyIdU3Mz+wrg3NiZ+9a/G1NAi/ZMg3l8TH4CBdIAjMNe894XWz0Q/v
	yuafknoSAqtB9i96BtZzWDC1Oyt1OudOiv4Ycc8E/zg02JlvGFTgsXl4L9UUAg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795397501;
	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=VeRcXRR09xAKCY8SbukZBDXvhmOLxMxKBtXIPBN3zYk=;
	b=YUIP1CgM8MGFrCVC4O91ImTjUeezQcWvHfZ6IUlej674dsTLk1BOOv0/pqUUduZOvbgs89
	NrNnO8QY+T+e86uCPi+AVeFiqmEZFwxVyDfTevadja4zBrGoY3SEjsND6TuVibc7NnX955
	Z7sRJ35iv8qRxNtZbjhdhL7aWqwU8lBmaSPxiRpJ9/WCYMGCLMbm6GPej/7UxmGaUKdpOU
	QG2HfPTxHeLhPn6jpn5Y0hAR2C2j4/faN18wEP3cDbruYna7kaKEpk+aLplL3Dzy48D/4s
	MIdIq0wnhedySboC8z1Dk2fvBqV2ZVJi1OCKIg8mLtH5YuTAxla8m8Ek8bnCFA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpM11w6FzT16
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:31:41 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 552d
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:31:41 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Muhammad Moinur Rahman <bofh@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 652eb5e0ba14 - stable/14 - contrib/kyua: Merge vendor import
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 652eb5e0ba14d4fdd2b605cecb2b25779df1ed6c
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:31:41 +0000
Message-Id: <6b03977d.552d.5f694169@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=652eb5e0ba14d4fdd2b605cecb2b25779df1ed6c

commit 652eb5e0ba14d4fdd2b605cecb2b25779df1ed6c
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2024-01-18 16:26:13 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:29:16 +0000

    contrib/kyua: Merge vendor import
    
    * commit '5f174897f67783925f4ec69122673f9bad6ee6fe':
      vendor/kyua: Update to snapshot 84c8ec8
      Vendor import of freebsd/kyua@a0d44bb356e0c816
    Approved by:    markj
    Differential Revision:  https://reviews.freebsd.org/D43475
    
    (cherry picked from commit 6b13d60bf49ee40626d7e3a5d5a80519f0067307)
---
 contrib/kyua/.cirrus.yml                          |  25 +++
 contrib/kyua/AUTHORS                              |   1 +
 contrib/kyua/admin/travis-build.sh                |   2 +-
 contrib/kyua/cli/cmd_report_html.cpp              |   5 +-
 contrib/kyua/doc/kyua.1.in                        |   5 +
 contrib/kyua/doc/manbuild_test.sh                 |   0
 contrib/kyua/integration/cmd_about_test.sh        |   0
 contrib/kyua/integration/cmd_config_test.sh       |   0
 contrib/kyua/integration/cmd_db_exec_test.sh      |   0
 contrib/kyua/integration/cmd_db_migrate_test.sh   |   0
 contrib/kyua/integration/cmd_debug_test.sh        |   0
 contrib/kyua/integration/cmd_help_test.sh         |   0
 contrib/kyua/integration/cmd_list_test.sh         |   0
 contrib/kyua/integration/cmd_report_html_test.sh  |   0
 contrib/kyua/integration/cmd_report_junit_test.sh |   0
 contrib/kyua/integration/cmd_report_test.sh       |   0
 contrib/kyua/integration/cmd_test_test.sh         |   0
 contrib/kyua/integration/global_test.sh           |   0
 contrib/kyua/integration/utils.sh                 |   4 +-
 contrib/kyua/utils/datetime.cpp                   |  11 +-
 contrib/kyua/utils/datetime_test.cpp              |  10 +-
 contrib/kyua/utils/process/Kyuafile               |   1 +
 contrib/kyua/utils/process/Makefile.am.inc        |   5 +
 contrib/kyua/utils/process/executor.cpp           |  58 ++++--
 contrib/kyua/utils/process/executor_pid_test.cpp  | 208 ++++++++++++++++++++++
 25 files changed, 304 insertions(+), 31 deletions(-)

diff --git a/contrib/kyua/.cirrus.yml b/contrib/kyua/.cirrus.yml
new file mode 100644
index 000000000000..855693b34fa1
--- /dev/null
+++ b/contrib/kyua/.cirrus.yml
@@ -0,0 +1,25 @@
+env:
+  ARCH: amd64
+
+task:
+  matrix:
+    - name: 14.0-RELEASE
+      freebsd_instance:
+        image_family: freebsd-14-0
+    - name: 14.0-STABLE
+      freebsd_instance:
+        image_family: freebsd-14-0-snap
+    - name: 13.2-RELEASE
+      freebsd_instance:
+        image_family: freebsd-13-2
+    - name: 13.2-STABLE
+      freebsd_instance:
+        image_family: freebsd-13-2-snap
+  env:
+    DO: distcheck
+  install_script:
+    - sed -i.bak -e 's,pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly,pkg+http://pkg.FreeBSD.org/\${ABI}/latest,' /etc/pkg/FreeBSD.conf
+    - ASSUME_ALWAYS_YES=yes pkg bootstrap -f
+    - pkg install -y autoconf automake atf lutok pkgconf sqlite3
+  script:
+    - ./admin/travis-build.sh
diff --git a/contrib/kyua/AUTHORS b/contrib/kyua/AUTHORS
index 26bfcd3471d3..4cf65083015a 100644
--- a/contrib/kyua/AUTHORS
+++ b/contrib/kyua/AUTHORS
@@ -8,5 +8,6 @@
 #     * Name <email address>
 #     * Organization <optional email address>
 
+* The FreeBSD Foundation
 * Google Inc.
 * Igor Ostapenko <pm@igoro.pro>
diff --git a/contrib/kyua/admin/travis-build.sh b/contrib/kyua/admin/travis-build.sh
index e69f271c13f1..0ccf1cc41efb 100755
--- a/contrib/kyua/admin/travis-build.sh
+++ b/contrib/kyua/admin/travis-build.sh
@@ -61,7 +61,7 @@ syntax(2)
 parallelism = 4
 EOF
     [ "${UNPRIVILEGED_USER:-no}" = no ] || \
-        echo "unprivileged_user = 'travis'" >>kyua.conf
+        echo "unprivileged_user = 'nobody'" >>kyua.conf
 
     local f=
     f="${f} CFLAGS='${archflags}'"
diff --git a/contrib/kyua/cli/cmd_report_html.cpp b/contrib/kyua/cli/cmd_report_html.cpp
index b2133a8de047..9c99e4348252 100644
--- a/contrib/kyua/cli/cmd_report_html.cpp
+++ b/contrib/kyua/cli/cmd_report_html.cpp
@@ -54,6 +54,7 @@
 #include "utils/fs/operations.hpp"
 #include "utils/fs/path.hpp"
 #include "utils/optional.ipp"
+#include "utils/text/operations.hpp"
 #include "utils/text/templates.hpp"
 
 namespace cmdline = utils::cmdline;
@@ -365,12 +366,12 @@ public:
         {
             const std::string stdout_text = iter.stdout_contents();
             if (!stdout_text.empty())
-                templates.add_variable("stdout", stdout_text);
+                templates.add_variable("stdout", text::escape_xml(stdout_text));
         }
         {
             const std::string stderr_text = iter.stderr_contents();
             if (!stderr_text.empty())
-                templates.add_variable("stderr", stderr_text);
+                templates.add_variable("stderr", text::escape_xml(stderr_text));
         }
 
         generate(templates, "test_result.html",
diff --git a/contrib/kyua/doc/kyua.1.in b/contrib/kyua/doc/kyua.1.in
index 2fca5eb09f9f..4a3ab7852b11 100644
--- a/contrib/kyua/doc/kyua.1.in
+++ b/contrib/kyua/doc/kyua.1.in
@@ -392,6 +392,11 @@ codes above 1 can be returned.
 .Xr atf 7 ,
 .Xr tests 7
 .Sh AUTHORS
+The original author of
+.Nm
+was
+.An Julio Merino .
+.Pp
 For more details on the people that made
 .Nm
 possible and the license terms, run:
diff --git a/contrib/kyua/doc/manbuild_test.sh b/contrib/kyua/doc/manbuild_test.sh
old mode 100755
new mode 100644
diff --git a/contrib/kyua/integration/cmd_about_test.sh b/contrib/kyua/integration/cmd_about_test.sh
old mode 100755
new mode 100644
diff --git a/contrib/kyua/integration/cmd_config_test.sh b/contrib/kyua/integration/cmd_config_test.sh
old mode 100755
new mode 100644
diff --git a/contrib/kyua/integration/cmd_db_exec_test.sh b/contrib/kyua/integration/cmd_db_exec_test.sh
old mode 100755
new mode 100644
diff --git a/contrib/kyua/integration/cmd_db_migrate_test.sh b/contrib/kyua/integration/cmd_db_migrate_test.sh
old mode 100755
new mode 100644
diff --git a/contrib/kyua/integration/cmd_debug_test.sh b/contrib/kyua/integration/cmd_debug_test.sh
old mode 100755
new mode 100644
diff --git a/contrib/kyua/integration/cmd_help_test.sh b/contrib/kyua/integration/cmd_help_test.sh
old mode 100755
new mode 100644
diff --git a/contrib/kyua/integration/cmd_list_test.sh b/contrib/kyua/integration/cmd_list_test.sh
old mode 100755
new mode 100644
diff --git a/contrib/kyua/integration/cmd_report_html_test.sh b/contrib/kyua/integration/cmd_report_html_test.sh
old mode 100755
new mode 100644
diff --git a/contrib/kyua/integration/cmd_report_junit_test.sh b/contrib/kyua/integration/cmd_report_junit_test.sh
old mode 100755
new mode 100644
diff --git a/contrib/kyua/integration/cmd_report_test.sh b/contrib/kyua/integration/cmd_report_test.sh
old mode 100755
new mode 100644
diff --git a/contrib/kyua/integration/cmd_test_test.sh b/contrib/kyua/integration/cmd_test_test.sh
old mode 100755
new mode 100644
diff --git a/contrib/kyua/integration/global_test.sh b/contrib/kyua/integration/global_test.sh
old mode 100755
new mode 100644
diff --git a/contrib/kyua/integration/utils.sh b/contrib/kyua/integration/utils.sh
old mode 100755
new mode 100644
index 99565a1c9857..d1462a5a9b01
--- a/contrib/kyua/integration/utils.sh
+++ b/contrib/kyua/integration/utils.sh
@@ -42,7 +42,7 @@
 # script that automatically does this.
 # CHECK_STYLE_DISABLE
 utils_strip_times='sed -E \
-    -e "s,( |\[|\")[0-9][0-9]*.[0-9][0-9][0-9](s]|s|\"),\1S.UUU\2,g" \
+    -e "s,( |\[|\")[0-9][0-9]*\.[0-9][0-9][0-9](s]|s|\"),\1S.UUU\2,g" \
     -e "s,[0-9]{8}-[0-9]{6}-[0-9]{6},YYYYMMDD-HHMMSS-ssssss,g" \
     -e "s,[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{6}Z,YYYY-MM-DDTHH:MM:SS.ssssssZ,g"'
 # CHECK_STYLE_ENABLE
@@ -55,7 +55,7 @@ utils_strip_times='sed -E \
 # replaced by the fixed string YYYY-MM-DDTHH:MM:SS.ssssssZ.
 # CHECK_STYLE_DISABLE
 utils_strip_times_but_not_ids='sed -E \
-    -e "s,( |\[|\")[0-9][0-9]*.[0-9][0-9][0-9](s]|s|\"),\1S.UUU\2,g" \
+    -e "s,( |\[|\")[0-9][0-9]*\.[0-9][0-9][0-9](s]|s|\"),\1S.UUU\2,g" \
     -e "s,[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{6}Z,YYYY-MM-DDTHH:MM:SS.ssssssZ,g"'
 # CHECK_STYLE_ENABLE
 
diff --git a/contrib/kyua/utils/datetime.cpp b/contrib/kyua/utils/datetime.cpp
index ae3fdb62fe55..174d830031d2 100644
--- a/contrib/kyua/utils/datetime.cpp
+++ b/contrib/kyua/utils/datetime.cpp
@@ -590,11 +590,12 @@ datetime::timestamp::operator-=(const datetime::delta& other)
 datetime::delta
 datetime::timestamp::operator-(const datetime::timestamp& other) const
 {
-    if ((*this) < other) {
-        throw std::runtime_error(
-            F("Cannot subtract %s from %s as it would result in a negative "
-              "datetime::delta, which are not supported") % other % (*this));
-    }
+    /*
+     * XXX-BD: gettimeofday isn't necessarily monotonic so return the
+     * smallest non-zero delta if time went backwards.
+     */
+    if ((*this) < other)
+        return datetime::delta::from_microseconds(1);
     return datetime::delta::from_microseconds(to_microseconds() -
                                               other.to_microseconds());
 }
diff --git a/contrib/kyua/utils/datetime_test.cpp b/contrib/kyua/utils/datetime_test.cpp
index 9f8ff50cd0f8..a2d3a3c0cdad 100644
--- a/contrib/kyua/utils/datetime_test.cpp
+++ b/contrib/kyua/utils/datetime_test.cpp
@@ -532,11 +532,11 @@ ATF_TEST_CASE_BODY(timestamp__subtraction)
     ATF_REQUIRE_EQ(datetime::delta(100, 0), ts3 - ts1);
     ATF_REQUIRE_EQ(datetime::delta(99, 999988), ts3 - ts2);
 
-    ATF_REQUIRE_THROW_RE(
-        std::runtime_error,
-        "Cannot subtract 1291970850123456us from 1291970750123468us "
-        ".*negative datetime::delta.*not supported",
-        ts2 - ts3);
+    /*
+     * NOTE (ngie): behavior change for
+     * https://github.com/jmmv/kyua/issues/155 .
+     */
+    ATF_REQUIRE_EQ(datetime::delta::from_microseconds(1), ts2 - ts3);
 }
 
 
diff --git a/contrib/kyua/utils/process/Kyuafile b/contrib/kyua/utils/process/Kyuafile
index 92e62cfac6fc..37ab662982d5 100644
--- a/contrib/kyua/utils/process/Kyuafile
+++ b/contrib/kyua/utils/process/Kyuafile
@@ -6,6 +6,7 @@ atf_test_program{name="child_test"}
 atf_test_program{name="deadline_killer_test"}
 atf_test_program{name="exceptions_test"}
 atf_test_program{name="executor_test"}
+atf_test_program{name="executor_pid_test"}
 atf_test_program{name="fdstream_test"}
 atf_test_program{name="isolation_test"}
 atf_test_program{name="operations_test"}
diff --git a/contrib/kyua/utils/process/Makefile.am.inc b/contrib/kyua/utils/process/Makefile.am.inc
index 3cff02e7e455..5ce894091a53 100644
--- a/contrib/kyua/utils/process/Makefile.am.inc
+++ b/contrib/kyua/utils/process/Makefile.am.inc
@@ -83,6 +83,11 @@ utils_process_executor_test_SOURCES = utils/process/executor_test.cpp
 utils_process_executor_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS)
 utils_process_executor_test_LDADD = $(UTILS_LIBS) $(ATF_CXX_LIBS)
 
+tests_utils_process_PROGRAMS += utils/process/executor_pid_test
+utils_process_executor_pid_test_SOURCES = utils/process/executor_pid_test.cpp
+utils_process_executor_pid_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS)
+utils_process_executor_pid_test_LDADD = $(UTILS_LIBS) $(ATF_CXX_LIBS)
+
 tests_utils_process_PROGRAMS += utils/process/fdstream_test
 utils_process_fdstream_test_SOURCES = utils/process/fdstream_test.cpp
 utils_process_fdstream_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS)
diff --git a/contrib/kyua/utils/process/executor.cpp b/contrib/kyua/utils/process/executor.cpp
index 7aa3d14d313a..bddbeee7605f 100644
--- a/contrib/kyua/utils/process/executor.cpp
+++ b/contrib/kyua/utils/process/executor.cpp
@@ -39,10 +39,12 @@ extern "C" {
 #include <signal.h>
 }
 
+#include <forward_list>
 #include <fstream>
 #include <map>
 #include <memory>
 #include <stdexcept>
+#include <utility>
 
 #include "utils/datetime.hpp"
 #include "utils/format/macros.hpp"
@@ -123,7 +125,7 @@ utils::process::executor::detail::setup_child(
 }
 
 
-/// Internal implementation for the exit_handle class.
+/// Internal implementation for the exec_handle class.
 struct utils::process::executor::exec_handle::impl : utils::noncopyable {
     /// PID of the process being run.
     int pid;
@@ -547,6 +549,9 @@ struct utils::process::executor::executor_handle::impl : utils::noncopyable {
     /// Mapping of PIDs to the data required at run time.
     exec_handles_map all_exec_handles;
 
+    /// Former members of all_exec_handles removed due to PID reuse.
+    std::forward_list<exec_handle> stale_exec_handles;
+
     /// Whether the executor state has been cleaned yet or not.
     ///
     /// Used to keep track of explicit calls to the public cleanup().
@@ -558,6 +563,8 @@ struct utils::process::executor::executor_handle::impl : utils::noncopyable {
         interrupts_handler(new signals::interrupts_handler()),
         root_work_directory(new fs::auto_directory(
             fs::auto_directory::mkdtemp_public(work_directory_template))),
+        all_exec_handles(),
+        stale_exec_handles(),
         cleaned(false)
     {
     }
@@ -603,6 +610,17 @@ struct utils::process::executor::executor_handle::impl : utils::noncopyable {
         }
         all_exec_handles.clear();
 
+        for (auto iter : stale_exec_handles) {
+            // The process already exited, so no need to kill and wait.
+            try {
+                fs::rm_r(iter.control_directory());
+            } catch (const fs::error& e) {
+                LE(F("Failed to clean up stale subprocess work directory "
+                    "%s: %s") % iter.control_directory() % e.what());
+            }
+        }
+        stale_exec_handles.clear();
+
         try {
             // The following only causes the work directory to be deleted, not
             // any of its contents, so we expect this to always succeed.  This
@@ -611,9 +629,9 @@ struct utils::process::executor::executor_handle::impl : utils::noncopyable {
             // subprocesses.
             root_work_directory->cleanup();
         } catch (const fs::error& e) {
-            LE(F("Failed to clean up executor work directory %s: %s; this is "
-                 "an internal error") % root_work_directory->directory()
-               % e.what());
+            LE(F("Failed to clean up executor work directory %s: %s; "
+                "this could be an internal error or a buggy test") %
+                root_work_directory->directory() % e.what());
         }
         root_work_directory.reset();
 
@@ -801,12 +819,16 @@ executor::executor_handle::spawn_post(
             timeout,
             unprivileged_user,
             detail::refcnt_t(new detail::refcnt_t::element_type(0)))));
-    INV_MSG(_pimpl->all_exec_handles.find(handle.pid()) ==
-            _pimpl->all_exec_handles.end(),
-            F("PID %s already in all_exec_handles; not properly cleaned "
-              "up or reused too fast") % handle.pid());;
-    _pimpl->all_exec_handles.insert(exec_handles_map::value_type(
-        handle.pid(), handle));
+    const auto value = exec_handles_map::value_type(handle.pid(), handle);
+    auto insert_pair = _pimpl->all_exec_handles.insert(value);
+    if (!insert_pair.second) {
+        LI(F("PID %s already in all_exec_handles") % handle.pid());
+        _pimpl->stale_exec_handles.push_front(insert_pair.first->second);
+        _pimpl->all_exec_handles.erase(insert_pair.first);
+        insert_pair = _pimpl->all_exec_handles.insert(value);
+        INV_MSG(insert_pair.second, F("PID %s still in all_exec_handles") %
+            handle.pid());
+    }
     LI(F("Spawned subprocess with exec_handle %s") % handle.pid());
     return handle;
 }
@@ -844,12 +866,16 @@ executor::executor_handle::spawn_followup_post(
             timeout,
             base.unprivileged_user(),
             base.state_owners())));
-    INV_MSG(_pimpl->all_exec_handles.find(handle.pid()) ==
-            _pimpl->all_exec_handles.end(),
-            F("PID %s already in all_exec_handles; not properly cleaned "
-              "up or reused too fast") % handle.pid());;
-    _pimpl->all_exec_handles.insert(exec_handles_map::value_type(
-        handle.pid(), handle));
+    const auto value = exec_handles_map::value_type(handle.pid(), handle);
+    auto insert_pair = _pimpl->all_exec_handles.insert(value);
+    if (!insert_pair.second) {
+        LI(F("PID %s already in all_exec_handles") % handle.pid());
+        _pimpl->stale_exec_handles.push_front(insert_pair.first->second);
+        _pimpl->all_exec_handles.erase(insert_pair.first);
+        insert_pair = _pimpl->all_exec_handles.insert(value);
+        INV_MSG(insert_pair.second, F("PID %s still in all_exec_handles") %
+            handle.pid());
+    }
     LI(F("Spawned subprocess with exec_handle %s") % handle.pid());
     return handle;
 }
diff --git a/contrib/kyua/utils/process/executor_pid_test.cpp b/contrib/kyua/utils/process/executor_pid_test.cpp
new file mode 100644
index 000000000000..22e0b90ba14b
--- /dev/null
+++ b/contrib/kyua/utils/process/executor_pid_test.cpp
@@ -0,0 +1,208 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2022 Dell Inc.
+ * Author: Eric van Gyzen
+ *
+ * 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.
+ */
+
+#if 0
+
+1. Run some "bad" tests that prevent kyua from removing the work directory.
+   We use "chflags uunlink".  Mounting a file system from an md(4) device
+   is another common use case.
+2. Fork a lot, nearly wrapping the PID number space, so step 3 will re-use
+   a PID from step 1.  Running the entire FreeBSD test suite is a more
+   realistic scenario for this step.
+3. Run some more tests.  If the stars align, the bug is not fixed yet, and
+   kyua is built with debugging, kyua will abort with the following messages.
+   Without debugging, the tests in step 3 will reuse the context from step 1,
+   including stdout, stderr, and working directory, which are still populated
+   with stuff from step 1.  When I found this bug, step 3 was
+   __test_cases_list__, which expects a certain format in stdout and failed
+   when it found something completely unrelated.
+4. You can clean up with: chflags -R nouunlink /tmp/kyua.*; rm -rf /tmp/kyua.*
+
+$ cc -o pid_wrap -latf-c pid_wrap.c
+$ kyua test
+pid_wrap:leak_0  ->  passed  [0.001s]
+pid_wrap:leak_1  ->  passed  [0.001s]
+pid_wrap:leak_2  ->  passed  [0.001s]
+pid_wrap:leak_3  ->  passed  [0.001s]
+pid_wrap:leak_4  ->  passed  [0.001s]
+pid_wrap:leak_5  ->  passed  [0.001s]
+pid_wrap:leak_6  ->  passed  [0.001s]
+pid_wrap:leak_7  ->  passed  [0.001s]
+pid_wrap:leak_8  ->  passed  [0.001s]
+pid_wrap:leak_9  ->  passed  [0.001s]
+pid_wrap:pid_wrap  ->  passed  [1.113s]
+pid_wrap:pid_wrap_0  ->  passed  [0.001s]
+pid_wrap:pid_wrap_1  ->  passed  [0.001s]
+pid_wrap:pid_wrap_2  ->  passed  [0.001s]
+pid_wrap:pid_wrap_3  ->  *** /usr/src/main/contrib/kyua/utils/process/executor.cpp:779: Invariant check failed: PID 60876 already in all_exec_handles; not properly cleaned up or reused too fast
+*** Fatal signal 6 received
+*** Log file is /home/vangyzen/.kyua/logs/kyua.20221006-193544.log
+*** Please report this problem to kyua-discuss@googlegroups.com detailing what you were doing before the crash happened; if possible, include the log file mentioned above
+Abort trap (core dumped)
+
+#endif
+
+#include <sys/stat.h>
+
+#include <atf-c++.hpp>
+
+#include <fcntl.h>
+#include <signal.h>
+#include <unistd.h>
+
+#include <cerrno>
+#include <cstring>
+
+void
+leak_work_dir()
+{
+	int fd;
+
+	ATF_REQUIRE((fd = open("unforgettable", O_CREAT|O_EXCL|O_WRONLY, 0600))
+	    >= 0);
+	ATF_REQUIRE_EQ(0, fchflags(fd, UF_NOUNLINK));
+	ATF_REQUIRE_EQ(0, close(fd));
+}
+
+void
+wrap_pids()
+{
+	pid_t begin, current, target;
+	bool wrapped;
+
+	begin = getpid();
+	target = begin - 15;
+	if (target <= 1) {
+		target += 99999;    // PID_MAX
+		wrapped = true;
+	} else {
+		wrapped = false;
+	}
+
+	ATF_REQUIRE(signal(SIGCHLD, SIG_IGN) != SIG_ERR);
+
+	do {
+		current = vfork();
+		if (current == 0) {
+			_exit(0);
+		}
+		ATF_REQUIRE(current != -1);
+		if (current < begin) {
+			wrapped = true;
+		}
+	} while (!wrapped || current < target);
+}
+
+void
+test_work_dir_reuse()
+{
+	// If kyua is built with debugging, it would abort here before the fix.
+}
+
+void
+clean_up()
+{
+	(void)system("chflags -R nouunlink ../..");
+}
+
+ATF_TEST_CASE_WITHOUT_HEAD(leak_0);
+ATF_TEST_CASE_BODY(leak_0) { leak_work_dir(); }
+ATF_TEST_CASE_WITHOUT_HEAD(leak_1);
+ATF_TEST_CASE_BODY(leak_1) { leak_work_dir(); }
+ATF_TEST_CASE_WITHOUT_HEAD(leak_2);
+ATF_TEST_CASE_BODY(leak_2) { leak_work_dir(); }
+ATF_TEST_CASE_WITHOUT_HEAD(leak_3);
+ATF_TEST_CASE_BODY(leak_3) { leak_work_dir(); }
+ATF_TEST_CASE_WITHOUT_HEAD(leak_4);
+ATF_TEST_CASE_BODY(leak_4) { leak_work_dir(); }
+ATF_TEST_CASE_WITHOUT_HEAD(leak_5);
+ATF_TEST_CASE_BODY(leak_5) { leak_work_dir(); }
+ATF_TEST_CASE_WITHOUT_HEAD(leak_6);
+ATF_TEST_CASE_BODY(leak_6) { leak_work_dir(); }
+ATF_TEST_CASE_WITHOUT_HEAD(leak_7);
+ATF_TEST_CASE_BODY(leak_7) { leak_work_dir(); }
+ATF_TEST_CASE_WITHOUT_HEAD(leak_8);
+ATF_TEST_CASE_BODY(leak_8) { leak_work_dir(); }
+ATF_TEST_CASE_WITHOUT_HEAD(leak_9);
+ATF_TEST_CASE_BODY(leak_9) { leak_work_dir(); }
+
+ATF_TEST_CASE_WITHOUT_HEAD(pid_wrap);
+ATF_TEST_CASE_BODY(pid_wrap) { wrap_pids(); }
+
+ATF_TEST_CASE_WITHOUT_HEAD(pid_wrap_0);
+ATF_TEST_CASE_BODY(pid_wrap_0) { test_work_dir_reuse(); }
+ATF_TEST_CASE_WITHOUT_HEAD(pid_wrap_1);
+ATF_TEST_CASE_BODY(pid_wrap_1) { test_work_dir_reuse(); }
+ATF_TEST_CASE_WITHOUT_HEAD(pid_wrap_2);
+ATF_TEST_CASE_BODY(pid_wrap_2) { test_work_dir_reuse(); }
+ATF_TEST_CASE_WITHOUT_HEAD(pid_wrap_3);
+ATF_TEST_CASE_BODY(pid_wrap_3) { test_work_dir_reuse(); }
+ATF_TEST_CASE_WITHOUT_HEAD(pid_wrap_4);
+ATF_TEST_CASE_BODY(pid_wrap_4) { test_work_dir_reuse(); }
+ATF_TEST_CASE_WITHOUT_HEAD(pid_wrap_5);
+ATF_TEST_CASE_BODY(pid_wrap_5) { test_work_dir_reuse(); }
+ATF_TEST_CASE_WITHOUT_HEAD(pid_wrap_6);
+ATF_TEST_CASE_BODY(pid_wrap_6) { test_work_dir_reuse(); }
+ATF_TEST_CASE_WITHOUT_HEAD(pid_wrap_7);
+ATF_TEST_CASE_BODY(pid_wrap_7) { test_work_dir_reuse(); }
+ATF_TEST_CASE_WITHOUT_HEAD(pid_wrap_8);
+ATF_TEST_CASE_BODY(pid_wrap_8) { test_work_dir_reuse(); }
+ATF_TEST_CASE_WITHOUT_HEAD(pid_wrap_9);
+ATF_TEST_CASE_BODY(pid_wrap_9) { test_work_dir_reuse(); }
+
+ATF_TEST_CASE_WITHOUT_HEAD(really_clean_up);
+ATF_TEST_CASE_BODY(really_clean_up) { clean_up(); }
+
+ATF_INIT_TEST_CASES(tcs)
+{
+	ATF_ADD_TEST_CASE(tcs, leak_0);
+	ATF_ADD_TEST_CASE(tcs, leak_1);
+	ATF_ADD_TEST_CASE(tcs, leak_2);
+	ATF_ADD_TEST_CASE(tcs, leak_3);
+	ATF_ADD_TEST_CASE(tcs, leak_4);
+	ATF_ADD_TEST_CASE(tcs, leak_5);
+	ATF_ADD_TEST_CASE(tcs, leak_6);
+	ATF_ADD_TEST_CASE(tcs, leak_7);
+	ATF_ADD_TEST_CASE(tcs, leak_8);
+	ATF_ADD_TEST_CASE(tcs, leak_9);
+
+	ATF_ADD_TEST_CASE(tcs, pid_wrap);
+
+	ATF_ADD_TEST_CASE(tcs, pid_wrap_0);
+	ATF_ADD_TEST_CASE(tcs, pid_wrap_1);
+	ATF_ADD_TEST_CASE(tcs, pid_wrap_2);
+	ATF_ADD_TEST_CASE(tcs, pid_wrap_3);
+	ATF_ADD_TEST_CASE(tcs, pid_wrap_4);
+	ATF_ADD_TEST_CASE(tcs, pid_wrap_5);
+	ATF_ADD_TEST_CASE(tcs, pid_wrap_6);
+	ATF_ADD_TEST_CASE(tcs, pid_wrap_7);
+	ATF_ADD_TEST_CASE(tcs, pid_wrap_8);
+	ATF_ADD_TEST_CASE(tcs, pid_wrap_9);
+
+	ATF_ADD_TEST_CASE(tcs, really_clean_up);
+}

From nobody Mon Nov 23 01:39:28 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX03Gr5z71bt8
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:39: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpX01NSKz4m58
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:39:28 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795397968;
	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=P419yUDMEtHYg5G+GkBjSNo8AezbP1AQlg42b/uB1v0=;
	b=GYJ2I2HLUc1twYmLqchK6QBUFWrfz9ttrV24aXX65grm6OevfljyjGqxAIX5W1SHAo4pdx
	D5P1ax9M6lpYb0qbxGtMsViMbtGAB7+gv8fKNgSqu9CGK93sX+V5nbISXwEGJMeSGp/1WX
	F86OkPL4+SOlo0Df35ArZqPoNVzHStwZ6f7MEC2Q1tz7kBenACnBJ6G1nXirdXflxIr73U
	wz0+uIj3GQ9L7QMdr1Cd4AkMUIgjwhbyI2l0N3bGyaFlSXdNOsW44AAqFp1OW/YEDaXb9T
	gryIKDBElME4ZhjsgBU80AFnqzSElB/DjLR8hOYguSXjrtd4iC2zCQwbpOkMtA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397968;
	b=V2++YIrP0TePF5W0a7oU/qZfa0/U4lJm/g6x0ivYXRyX8Ix/cXZUdtMUNQi/4ZzKEG50WY
	kpgIs6gus1OJQbbqJH2VlinSEd4SHxXTEpX8jH0FnS4YlyAB/EHQsgTjPgVxGhMLH8y01+
	X+eSr9G9TFEQt3KYhe1LjYnveVyDjPXhbOJ9rwpAvFkzPf+AwtPgSUP/+fC8FxLVi+lABd
	D1MTZEAbYgWT4A8vuFJlARlEJrJ6ZgUyaAWSivHM1WSTleBU7SU+Yowv/UQP5Szu7sXdfR
	zRa1I9jdbDnYkFf7F5qspUrLEslaJeHkhCqIkC1XXhcWQMdx4Li5KYiIGXNf2A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795397968;
	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=P419yUDMEtHYg5G+GkBjSNo8AezbP1AQlg42b/uB1v0=;
	b=pnnTaLLG0R3iX7Nh6H0+0PpvJdbDAFlTY+4OzScozks9ySimTwzLT2rOR0Yuf/2zuaJspp
	azlRwOqcqYi0bYgdMYJQlM920BqjLV4agAlZN1KV5eRikIT5K3GnvfhKCrvHVK9ibSLfoP
	b1LI6XUVOH0Y1ox6jKlK85Ay9Oz0rJuWuQ9ep7FJp2onuMBwQl4HgQZvpfDOhuxE0YfaYU
	GLUq6ajjCO5QE8IeSzmlIV+VTUtPtLQmAccekpDcmNPCVGwCcMPWjwp59HiLYc2z73kX46
	x6TXa2b6ecqwLWD7USHpVqqDS4pJrJuwQVH0FEmKHaUnO945OYmYOl4W3DHNDg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX012F1zT3H
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:39:28 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 65b0
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:39:28 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Igor Ostapenko <igoro@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 1d9dc50bf98c - stable/14 - kyua: Add "kyua debug -p" option
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 1d9dc50bf98cba7be55ab8a57c7b2f2ddf7a2e0b
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:39:28 +0000
Message-Id: <6b039950.65b0.babdb04@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=1d9dc50bf98cba7be55ab8a57c7b2f2ddf7a2e0b

commit 1d9dc50bf98cba7be55ab8a57c7b2f2ddf7a2e0b
Author:     Igor Ostapenko <igoro@FreeBSD.org>
AuthorDate: 2025-05-17 09:30:55 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:32:48 +0000

    kyua: Add "kyua debug -p" option
    
    This allows the test engine to be paused right before the test cleanup
    routine, simplifying debugging.
    
    Reviewed by:    ziaee, ngie
    Differential Revision:  https://reviews.freebsd.org/D49463
    
    (cherry picked from commit 6b8222793fbb4c0e162232716bc454dad31b709f)
---
 contrib/kyua/cli/cmd_debug.cpp      | 70 ++++++++++++++++++++++++++++++++++++
 contrib/kyua/doc/kyua-debug.1.in    | 21 ++++++++++-
 contrib/kyua/drivers/debug_test.cpp |  7 +++-
 contrib/kyua/drivers/debug_test.hpp |  6 +++-
 contrib/kyua/engine/debugger.hpp    | 71 +++++++++++++++++++++++++++++++++++++
 contrib/kyua/engine/scheduler.cpp   |  8 +++++
 contrib/kyua/model/test_case.cpp    | 21 +++++++++++
 contrib/kyua/model/test_case.hpp    |  5 +++
 8 files changed, 206 insertions(+), 3 deletions(-)

diff --git a/contrib/kyua/cli/cmd_debug.cpp b/contrib/kyua/cli/cmd_debug.cpp
index b7a29b7ab804..c00920c1a3f7 100644
--- a/contrib/kyua/cli/cmd_debug.cpp
+++ b/contrib/kyua/cli/cmd_debug.cpp
@@ -29,6 +29,7 @@
 #include "cli/cmd_debug.hpp"
 
 #include <cstdlib>
+#include <iostream>
 
 #include "cli/common.ipp"
 #include "drivers/debug_test.hpp"
@@ -38,13 +39,76 @@
 #include "utils/cmdline/parser.ipp"
 #include "utils/cmdline/ui.hpp"
 #include "utils/format/macros.hpp"
+#include "utils/process/executor.hpp"
 
 namespace cmdline = utils::cmdline;
 namespace config = utils::config;
+namespace executor = utils::process::executor;
 
 using cli::cmd_debug;
 
 
+namespace {
+
+
+const cmdline::bool_option pause_before_cleanup_upon_fail_option(
+    'p',
+    "pause-before-cleanup-upon-fail",
+    "Pauses right before the test cleanup upon fail");
+
+
+const cmdline::bool_option pause_before_cleanup_option(
+    "pause-before-cleanup",
+    "Pauses right before the test cleanup");
+
+
+/// The debugger interface implementation.
+class dbg : public engine::debugger {
+    /// Object to interact with the I/O of the program.
+    cmdline::ui* _ui;
+
+    /// Representation of the command line to the subcommand.
+    const cmdline::parsed_cmdline& _cmdline;
+
+public:
+    /// Constructor.
+    ///
+    /// \param ui_ Object to interact with the I/O of the program.
+    /// \param cmdline Representation of the command line to the subcommand.
+    dbg(cmdline::ui* ui, const cmdline::parsed_cmdline& cmdline) :
+        _ui(ui), _cmdline(cmdline)
+    {}
+
+    void before_cleanup(
+        const model::test_program_ptr&,
+        const model::test_case&,
+        optional< model::test_result >& result,
+        executor::exit_handle& eh) const
+    {
+        if (_cmdline.has_option(pause_before_cleanup_upon_fail_option
+            .long_name())) {
+            if (result && !result.get().good()) {
+                _ui->out("The test failed and paused right before its cleanup "
+                    "routine.");
+                _ui->out(F("Test work dir: %s") % eh.work_directory().str());
+                _ui->out("Press any key to continue...");
+                (void) std::cin.get();
+            }
+        } else if (_cmdline.has_option(pause_before_cleanup_option
+            .long_name())) {
+            _ui->out("The test paused right before its cleanup routine.");
+            _ui->out(F("Test work dir: %s") % eh.work_directory().str());
+            _ui->out("Press any key to continue...");
+            (void) std::cin.get();
+        }
+    };
+
+};
+
+
+}  // anonymous namespace
+
+
 /// Default constructor for cmd_debug.
 cmd_debug::cmd_debug(void) : cli_command(
     "debug", "test_case", 1, 1,
@@ -53,6 +117,9 @@ cmd_debug::cmd_debug(void) : cli_command(
     add_option(build_root_option);
     add_option(kyuafile_option);
 
+    add_option(pause_before_cleanup_upon_fail_option);
+    add_option(pause_before_cleanup_option);
+
     add_option(cmdline::path_option(
         "stdout", "Where to direct the standard output of the test case",
         "path", "/dev/stdout"));
@@ -82,7 +149,10 @@ cmd_debug::run(cmdline::ui* ui, const cmdline::parsed_cmdline& cmdline,
     const engine::test_filter filter = engine::test_filter::parse(
         test_case_name);
 
+    auto debugger = std::shared_ptr< engine::debugger >(new dbg(ui, cmdline));
+
     const drivers::debug_test::result result = drivers::debug_test::drive(
+        debugger,
         kyuafile_path(cmdline), build_root_path(cmdline), filter, user_config,
         cmdline.get_option< cmdline::path_option >("stdout"),
         cmdline.get_option< cmdline::path_option >("stderr"));
diff --git a/contrib/kyua/doc/kyua-debug.1.in b/contrib/kyua/doc/kyua-debug.1.in
index 9e962a465421..263aef3667a7 100644
--- a/contrib/kyua/doc/kyua-debug.1.in
+++ b/contrib/kyua/doc/kyua-debug.1.in
@@ -25,7 +25,7 @@
 .\" 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.
-.Dd October 13, 2014
+.Dd March 25, 2025
 .Dt KYUA-DEBUG 1
 .Os
 .Sh NAME
@@ -35,6 +35,8 @@
 .Nm
 .Op Fl -build-root Ar path
 .Op Fl -kyuafile Ar file
+.Op Fl -pause-before-cleanup-upon-fail
+.Op Fl -pause-before-cleanup
 .Op Fl -stdout Ar path
 .Op Fl -stderr Ar path
 .Ar test_case
@@ -84,6 +86,23 @@ Specifies the Kyuafile to process.
 Defaults to
 .Pa Kyuafile
 file in the current directory.
+.It Fl -pause-before-cleanup-upon-fail , Fl p
+Causes Kyua to pause right before the test cleanup routine is invoked if the
+test fails.
+When paused, Kyua waits for input on stdin, and any key press resumes
+execution.
+.sp
+This can be useful for debugging system or end-to-end tests
+which alter the system by creating artifacts such as files, network
+interfaces, routing entries, firewall configuration, containers, etc.
+This flag makes it possible to preserve such artifacts immediately after a test
+failure, simplifying debugging.
+Otherwise, these artifacts would be removed by the test cleanup routine or
+by Kyua built-in cleanup mechanism.
+.It Fl -pause-before-cleanup
+The unconditional variant of the previous option.
+This can be helpful for reproducing the infrastructure or fixture of a passing
+test for further development or additional analysis.
 .It Fl -stderr Ar path
 Specifies the file to which to send the standard error of the test
 program's body.
diff --git a/contrib/kyua/drivers/debug_test.cpp b/contrib/kyua/drivers/debug_test.cpp
index 0717a9ad9419..6bd3d4dc0731 100644
--- a/contrib/kyua/drivers/debug_test.cpp
+++ b/contrib/kyua/drivers/debug_test.cpp
@@ -63,7 +63,8 @@ using utils::optional;
 ///
 /// \returns A structure with all results computed by this driver.
 drivers::debug_test::result
-drivers::debug_test::drive(const fs::path& kyuafile_path,
+drivers::debug_test::drive(engine::debugger_ptr debugger,
+                           const fs::path& kyuafile_path,
                            const optional< fs::path > build_root,
                            const engine::test_filter& filter,
                            const config::tree& user_config,
@@ -92,6 +93,10 @@ drivers::debug_test::drive(const fs::path& kyuafile_path,
     const model::test_program_ptr test_program = match.get().first;
     const std::string& test_case_name = match.get().second;
 
+    const model::test_case test_case = test_program->find(test_case_name);
+    if (debugger)
+        test_case.attach_debugger(debugger);
+
     scheduler::result_handle_ptr result_handle = handle.debug_test(
         test_program, test_case_name, user_config,
         stdout_path, stderr_path);
diff --git a/contrib/kyua/drivers/debug_test.hpp b/contrib/kyua/drivers/debug_test.hpp
index cbaa2f6acea0..0b4abce6f2ea 100644
--- a/contrib/kyua/drivers/debug_test.hpp
+++ b/contrib/kyua/drivers/debug_test.hpp
@@ -36,12 +36,15 @@
 #if !defined(DRIVERS_DEBUG_TEST_HPP)
 #define DRIVERS_DEBUG_TEST_HPP
 
+#include "engine/debugger.hpp"
 #include "engine/filters.hpp"
 #include "model/test_result.hpp"
 #include "utils/config/tree_fwd.hpp"
 #include "utils/fs/path_fwd.hpp"
 #include "utils/optional_fwd.hpp"
 
+using engine::debugger;
+
 namespace drivers {
 namespace debug_test {
 
@@ -68,7 +71,8 @@ public:
 };
 
 
-result drive(const utils::fs::path&, const utils::optional< utils::fs::path >,
+result drive(std::shared_ptr< debugger >,
+             const utils::fs::path&, const utils::optional< utils::fs::path >,
              const engine::test_filter&, const utils::config::tree&,
              const utils::fs::path&, const utils::fs::path&);
 
diff --git a/contrib/kyua/engine/debugger.hpp b/contrib/kyua/engine/debugger.hpp
new file mode 100644
index 000000000000..3c4d087f8ad0
--- /dev/null
+++ b/contrib/kyua/engine/debugger.hpp
@@ -0,0 +1,71 @@
+// Copyright 2025 The Kyua Authors.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+//   notice, this list of conditions and the following disclaimer.
+// * 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.
+// * Neither the name of Google Inc. nor the names of its contributors
+//   may be used to endorse or promote products derived from this software
+//   without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER 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.
+
+/// \file engine/debugger.hpp
+/// The interface between the engine and the users outside.
+
+#if !defined(ENGINE_DEBUGGER_HPP)
+#define ENGINE_DEBUGGER_HPP
+
+#include "model/test_case_fwd.hpp"
+#include "model/test_program_fwd.hpp"
+#include "model/test_result_fwd.hpp"
+#include "utils/optional_fwd.hpp"
+#include "utils/process/executor_fwd.hpp"
+
+namespace executor = utils::process::executor;
+
+using utils::optional;
+
+
+namespace engine {
+
+
+/// Abstract debugger interface.
+class debugger {
+public:
+    debugger() {}
+    virtual ~debugger() {}
+
+    /// Called right before test cleanup.
+    virtual void before_cleanup(
+        const model::test_program_ptr&,
+        const model::test_case&,
+        optional< model::test_result >&,
+        executor::exit_handle&) const = 0;
+};
+
+
+/// Pointer to a debugger implementation.
+typedef std::shared_ptr< debugger > debugger_ptr;
+
+
+}  // namespace engine
+
+
+#endif  // !defined(ENGINE_DEBUGGER_HPP)
diff --git a/contrib/kyua/engine/scheduler.cpp b/contrib/kyua/engine/scheduler.cpp
index 7291f0fa1bb6..4c40bf31046e 100644
--- a/contrib/kyua/engine/scheduler.cpp
+++ b/contrib/kyua/engine/scheduler.cpp
@@ -39,6 +39,7 @@ extern "C" {
 #include <stdexcept>
 
 #include "engine/config.hpp"
+#include "engine/debugger.hpp"
 #include "engine/exceptions.hpp"
 #include "engine/execenv/execenv.hpp"
 #include "engine/requirements.hpp"
@@ -1396,8 +1397,15 @@ scheduler::scheduler_handle::wait_any(void)
                                  handle.stderr_file());
         }
 
+        std::shared_ptr< debugger > debugger = test_case.get_debugger();
+        if (debugger) {
+            debugger->before_cleanup(test_data->test_program, test_case,
+                result, handle);
+        }
+
         if (test_data->needs_cleanup) {
             INV(test_case.get_metadata().has_cleanup());
+
             // The test body has completed and we have processed it.  If there
             // is a cleanup routine, trigger it now and wait for any other test
             // completion.  The caller never knows about cleanup routines.
diff --git a/contrib/kyua/model/test_case.cpp b/contrib/kyua/model/test_case.cpp
index f5f6a979eed3..faa4f3cebaf2 100644
--- a/contrib/kyua/model/test_case.cpp
+++ b/contrib/kyua/model/test_case.cpp
@@ -60,6 +60,9 @@ struct model::test_case::impl : utils::noncopyable {
     /// Fake result to return instead of running the test case.
     optional< model::test_result > fake_result;
 
+    /// Optional pointer to a debugger attached.
+    engine::debugger_ptr debugger;
+
     /// Constructor.
     ///
     /// \param name_ The name of the test case within the test program.
@@ -233,6 +236,24 @@ model::test_case::get_raw_metadata(void) const
 }
 
 
+/// Attach a debugger to the test case.
+void
+model::test_case::attach_debugger(engine::debugger_ptr debugger) const
+{
+    _pimpl->debugger = debugger;
+}
+
+
+/// Gets the optional pointer to a debugger.
+///
+/// \return An optional pointer to a debugger.
+engine::debugger_ptr
+model::test_case::get_debugger() const
+{
+    return _pimpl->debugger;
+}
+
+
 /// Gets the fake result pre-stored for this test case.
 ///
 /// \return A fake result, or none if not defined.
diff --git a/contrib/kyua/model/test_case.hpp b/contrib/kyua/model/test_case.hpp
index 3c6fe32c8e62..c92ebacff98d 100644
--- a/contrib/kyua/model/test_case.hpp
+++ b/contrib/kyua/model/test_case.hpp
@@ -38,11 +38,13 @@
 #include <ostream>
 #include <string>
 
+#include "engine/debugger.hpp"
 #include "model/metadata_fwd.hpp"
 #include "model/test_result_fwd.hpp"
 #include "utils/noncopyable.hpp"
 #include "utils/optional_fwd.hpp"
 
+
 namespace model {
 
 
@@ -71,6 +73,9 @@ public:
     const metadata& get_raw_metadata(void) const;
     utils::optional< test_result > fake_result(void) const;
 
+    void attach_debugger(engine::debugger_ptr) const;
+    engine::debugger_ptr get_debugger() const;
+
     bool operator==(const test_case&) const;
     bool operator!=(const test_case&) const;
 };

From nobody Mon Nov 23 01:39:29 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX14crXz71bld
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:39:29 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpX11mRnz4lxR
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:39:29 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795397969;
	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=VcCKYSDiRS3b8/KjdSFUCKoC5bfEwbmb4uTitZQ75Z4=;
	b=efeNH0tAm5DzIk0e17wfT9iId8JoKa47SNqilnHM7t+JvcokkKCiocrAd6/qKzSHVUo80Z
	gNAIJ7dMHP5lUIsVlv52cgquJoQXQlFU2EnMRdjOH0EKS9oNdvOxfuBKemBHVmrgATl5pH
	ILVhj5IIPjjKAvR8Vk+JGS5LckVsRN3VZP/wXr+qWIRkg5axEgH18qWHTFumQGLZo5yoWn
	IGrUaPHwNPxaAOwCbCfxTseFhegVY3mgCACuXX2XYS7gmXMCSqLs2IsHkA+n6drB7hfjVy
	ZFjos33yB2i8na3ByFiPdsUIWOG9e1GacreBmqv1SEhIEM8fB0yr8IYWSm6BDA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397969;
	b=KhrGh9bRcrddVYh/rk0oEMl9fLOfXZ0pDfMdYWyNmSGSW+FbifuUTkIE3SpciS/p/ewej3
	VQDR+/8JkRfksuWktiL0BnZsy7+C2pNju9Ydw4gR9YTCTBrPX3g1oFV/XVMCuhtmTgWEdK
	sPUIAJDJNH1+ISNlGtXbPWZVyZ3BqaWRQ9eWqx6NnW667soZPSAzN42FV/xmPNwflNwHPi
	/pESz/d6oOw6wJLshrkB9eTPVwNpU18nXzJlpEAYd+er80RCvfxK81YI9RT3d8GYdDEtiY
	V6h5IHZP7Q9qxnzwYsexbb/0r4Z9g+eWF7CV6b3yCZaGvb0cuPxDScb+oTdFKw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795397969;
	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=VcCKYSDiRS3b8/KjdSFUCKoC5bfEwbmb4uTitZQ75Z4=;
	b=MY+RwnLVEEnBPrCtv2Q5s02xPQx2OZPCHsTSkCeFFKvlQjxagZg+S4SDM7H08L+GyQfLCa
	fLtTTzWG8LiDISymDrggyhSDa01pFmAEqY4LQpoDXADvoaPbqj2vrZ2xT5iTx34tMRYYn6
	MAzeJqi3sGmjUGcwh731PW23yR8DKRTKGWvBcBnyBLDdIUDXV16d477uxVKDOn/sAiwEPy
	avzojZjbMPt04V025h4TBr1ukRXyWCHrYedvMgcxsvjBA9uc6+QgrApZP2yVwv92nee25C
	kioouqADpIIWQhWaRn5FO02sqYOfJ9kM61awJSs68RMK7wNEcevOBCo85Ufpyw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX11QPJzT3J
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:39:29 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 665c
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:39:29 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Igor Ostapenko <igoro@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: da0015f4e55b - stable/14 - kyua: Make "test" command actually report about workdir cleanup issues
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: da0015f4e55baf72f12658f9ffdb50bdc99ca8c8
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:39:29 +0000
Message-Id: <6b039951.665c.14712ab9@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=da0015f4e55baf72f12658f9ffdb50bdc99ca8c8

commit da0015f4e55baf72f12658f9ffdb50bdc99ca8c8
Author:     Igor Ostapenko <igoro@FreeBSD.org>
AuthorDate: 2025-10-11 13:14:16 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:33:54 +0000

    kyua: Make "test" command actually report about workdir cleanup issues
    
    Reviewed by:    ngie
    MFC after:      1 month
    Differential Revision:  https://reviews.freebsd.org/D51136
    
    (cherry picked from commit 21716b6c3ed6e28fe5cc14ee3ffe93f44c458b09)
---
 contrib/kyua/drivers/run_tests.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/kyua/drivers/run_tests.cpp b/contrib/kyua/drivers/run_tests.cpp
index d92940005242..3af9a1268815 100644
--- a/contrib/kyua/drivers/run_tests.cpp
+++ b/contrib/kyua/drivers/run_tests.cpp
@@ -209,7 +209,7 @@ finish_test(scheduler::result_handle_ptr result_handle,
     hooks.got_result(
         *test_result_handle->test_program(),
         test_result_handle->test_case_name(),
-        test_result_handle->test_result(),
+        test_result,
         result_handle->end_time() - result_handle->start_time());
 }
 

From nobody Mon Nov 23 01:39:31 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX41Rcdz71btR
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:39: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpX32Zq8z4lvX
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:39:31 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795397971;
	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=bW/7ctPsU0nlozSQ1RTsroIOygw7kAMF4vup5L9EELY=;
	b=QCbvEei/xfi0YG/eXo4mM2BIDwSrIDDvsJtmAaS8AiIWxDi1HFUC/1yezJgOChrkgYEDGc
	ICUdSvHNvq01iVRUZR8W1wM7xWwMC8jGiAVQGalAEB5hjAGyOeMOw7Fz3EsfcEI5SVprQ+
	9QCwUm1uIuXzJooWBlpVesoyideh6Hpu0TwFt6QMteExxar7OzKjbuT+NuEecnLpRDlMWz
	2zWeX+ma4ZsbNQTb3hBjk7VtaUasy8aWX+aHw6Qf1Fbo2vM4D6v4kXXQY1hrTTbHxb5Kyt
	TsfNr3OsKhbLIQdAM1kWyPkhST1nVYkhXFYU7E/Z+eKjiLntGYlwLhzSfifb8A==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397971;
	b=JWLYKvNkvCwKvldvAmcnyNQgQIEU9rxJR3Jr0vdaJ7+dvyBxKg2cnHbQct2ccD3ILApuaY
	F7sLJlvY3r09BxeJ54RT3UfLfx7KQFpqpyvJtLyI6ouc/B0CbsQhJtluQMCP9xiENXFDDT
	/KGFWLO3HFe7p7vm/5xxEgLLanC5x8Mta3+ihUUXVM2/WeLbf2vPYXiaB7tRFXiHwnH1zn
	/G0hE4yri0pMaoW7aMMwZgwqgdHHuXtoPi/k4G3vyL4owxOpsLC9T48xRCKKpz9ZqESeEj
	hHMQ6n/JMVIDJItWhKqT8JRnbGNcRtMDVhNS3S375VsDrdn39+S+kaNnRp0MCQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795397971;
	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=bW/7ctPsU0nlozSQ1RTsroIOygw7kAMF4vup5L9EELY=;
	b=g7/A/lyXPH4VtqB9uwy9qZhTSL3JxBpY8igE0gpuIh6HmNDq4i+DG/Hu0WMJvTuaHKYiD+
	NbIhiewVEb9lun+jU/ye+Pv/p8W3apjtGQ80+IyLtVXpL/Nf0zLFYWOzrVWZoe3bdo+QP7
	Pck2mDPKsyVvNTGOfGJsCrLaKYpWk4V0tr8iFD5Y3rZyzKnrU/ZYfG6vIDoEclJtmZT57M
	k4u2xDTh4s4xhju4x3h4Zg56UfDw8Hp9uk5D4NL8ilcKQGonVW3vmtAg3eley4A/smETMi
	ZOkoqcDH1X3UloS8+dw/Kjd1fcBPSYG7Ts1RL74xp3PBIX8J03y4KSO+NJxwWw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX327qVzSk5
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:39:31 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 5532
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:39:31 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Igor Ostapenko <igoro@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 5ffb27477ba0 - stable/14 - kyua: Make "debug -p" skip writing stdout/stderr to tmp files
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 5ffb27477ba09f4400ee4e3e5784887d139069f1
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:39:31 +0000
Message-Id: <6b039953.5532.54f83cd2@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=5ffb27477ba09f4400ee4e3e5784887d139069f1

commit 5ffb27477ba09f4400ee4e3e5784887d139069f1
Author:     Igor Ostapenko <igoro@FreeBSD.org>
AuthorDate: 2025-12-26 20:06:56 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:34:33 +0000

    kyua: Make "debug -p" skip writing stdout/stderr to tmp files
    
    Reviewed by:    kp, ngie
    Differential Revision:  https://reviews.freebsd.org/D54363
    
    (cherry picked from commit 350f319731897f741b516db99636e7ced071dfa4)
---
 contrib/kyua/cli/cmd_debug.cpp    |  6 +++++-
 contrib/kyua/engine/scheduler.cpp | 20 +++++++++++++++-----
 contrib/kyua/engine/scheduler.hpp |  6 +++++-
 3 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/contrib/kyua/cli/cmd_debug.cpp b/contrib/kyua/cli/cmd_debug.cpp
index 700c4b3ea851..978ccae0fdf1 100644
--- a/contrib/kyua/cli/cmd_debug.cpp
+++ b/contrib/kyua/cli/cmd_debug.cpp
@@ -149,7 +149,11 @@ cmd_debug::run(cmdline::ui* ui, const cmdline::parsed_cmdline& cmdline,
     const engine::test_filter filter = engine::test_filter::parse(
         test_case_name);
 
-    auto debugger = std::shared_ptr< engine::debugger >(new dbg(ui, cmdline));
+    engine::debugger_ptr debugger = nullptr;
+    if (cmdline.has_option(pause_before_cleanup_upon_fail_option.long_name())
+        || cmdline.has_option(pause_before_cleanup_option.long_name())) {
+        debugger = std::shared_ptr< engine::debugger >(new dbg(ui, cmdline));
+    }
 
     const drivers::debug_test::result result = drivers::debug_test::drive(
         debugger,
diff --git a/contrib/kyua/engine/scheduler.cpp b/contrib/kyua/engine/scheduler.cpp
index 4c40bf31046e..a0719ec461ab 100644
--- a/contrib/kyua/engine/scheduler.cpp
+++ b/contrib/kyua/engine/scheduler.cpp
@@ -1283,7 +1283,9 @@ scheduler::exec_handle
 scheduler::scheduler_handle::spawn_test(
     const model::test_program_ptr test_program,
     const std::string& test_case_name,
-    const config::tree& user_config)
+    const config::tree& user_config,
+    const utils::optional<utils::fs::path>& stdout_target,
+    const utils::optional<utils::fs::path>& stderr_target)
 {
     _pimpl->generic.check_interrupt();
 
@@ -1305,7 +1307,7 @@ scheduler::scheduler_handle::spawn_test(
         run_test_program(interface, test_program, test_case_name,
                          user_config),
         test_case.get_metadata().timeout(),
-        unprivileged_user);
+        unprivileged_user, stdout_target, stderr_target);
 
     const exec_data_ptr data(new test_exec_data(
         test_program, test_case_name, interface, user_config, handle.pid()));
@@ -1563,8 +1565,16 @@ scheduler::scheduler_handle::debug_test(
     const fs::path& stdout_target,
     const fs::path& stderr_target)
 {
+    optional<fs::path> out = none;
+    optional<fs::path> err = none;
+    const model::test_case& test_case = test_program->find(test_case_name);
+    if (test_case.get_debugger() != nullptr) {
+        out = stdout_target;
+        err = stderr_target;
+    }
+
     const exec_handle exec_handle = spawn_test(
-        test_program, test_case_name, user_config);
+        test_program, test_case_name, user_config, out, err);
     result_handle_ptr result_handle = wait_any();
 
     // TODO(jmmv): We need to do this while the subprocess is alive.  This is
@@ -1574,12 +1584,12 @@ scheduler::scheduler_handle::debug_test(
     // Unfortunately, we cannot do so.  We cannot just read and block from a
     // file, waiting for further output to appear... as this only works on pipes
     // or sockets.  We need a better interface for this whole thing.
-    {
+    if (test_case.get_debugger() == nullptr) {
         std::unique_ptr< std::ostream > output = utils::open_ostream(
             stdout_target);
         *output << utils::read_file(result_handle->stdout_file());
     }
-    {
+    if (test_case.get_debugger() == nullptr) {
         std::unique_ptr< std::ostream > output = utils::open_ostream(
             stderr_target);
         *output << utils::read_file(result_handle->stderr_file());
diff --git a/contrib/kyua/engine/scheduler.hpp b/contrib/kyua/engine/scheduler.hpp
index ee01c83b4991..508a0c0cbfd9 100644
--- a/contrib/kyua/engine/scheduler.hpp
+++ b/contrib/kyua/engine/scheduler.hpp
@@ -74,6 +74,8 @@
 #include "utils/process/executor_fwd.hpp"
 #include "utils/process/status_fwd.hpp"
 
+using utils::none;
+
 namespace engine {
 namespace scheduler {
 
@@ -248,7 +250,9 @@ public:
                                      const utils::config::tree&);
     exec_handle spawn_test(const model::test_program_ptr,
                            const std::string&,
-                           const utils::config::tree&);
+                           const utils::config::tree&,
+                           const utils::optional<utils::fs::path>& = none,
+                           const utils::optional<utils::fs::path>& = none);
     result_handle_ptr wait_any(void);
 
     result_handle_ptr debug_test(const model::test_program_ptr,

From nobody Mon Nov 23 01:39:30 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX25KXXz71c1y
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:39: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpX22X0Gz4ls2
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:39:30 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795397970;
	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=6kSal/W94vpJ4lG6rKpn3sHst54QQnCmtKWt6zAcbfY=;
	b=D4wvNJ+zRQfnvbgdYef1xcdG5Y6opPYB3NvRxTLmYYPDtI2DyLgZpav2FM+FAi5/OuKsgM
	Lsv73v7DZ5mBQ1oRZQyazqFHnrRODldtnpg/mQ0mvTVeB+MVA6JIo76bHieTTTnz7unGuW
	ZHFSRnVxkMckyzuQ0u+LSVPrYYKBieVVxKssqrar66ywEumEGlBnu6Q/ZHKnz/IvOMilJt
	rIhHWRUayYKWMnjpurPlCB6T0Gzm3mJwW/QL9Y3p5/mPvM0CClUuaF3JhRNX6Be9In66s1
	LUrZJdC8iZBoWKA7Lvuj6TzNnuTv0PmffTa/+tNviCx9XAxIO8BTihEQpt2xVA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397970;
	b=Gngwa4IMEiEZcHzo7Q6P+ydMkCUZjZnak+oqPuUxPMWSrIdb4Qje3qqTrFySMHnOmY/f50
	A5+Ej2/CjvqNNv1wlY72Otl92mhpdLfwlJ/G3sWf0vmiiLdZ9iyJhi4mCHVana6S8PzDkX
	B8mEndi/HdBbunqCj0STMiXB8F3mm53KtxtRsfR/FYULgYm9IPwBmIozHAb93N2KIHMauA
	C26uvNGTEQYfNXXhKQ+BAktgeXcK3+dc7us3AED8zR1YsINOCR3kPeJr8RcI38eZHGWL9R
	8B1tGWoOH/+DW1jPWX735jDzBGkzC1iUYfx2z5F0CSOrcBDlPGyOU3QYDiURVw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795397970;
	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=6kSal/W94vpJ4lG6rKpn3sHst54QQnCmtKWt6zAcbfY=;
	b=p0c+1Hg86BVD5Vy1gZfGFXc/XsHO3hfTeSUTixLZEDbADosoJD6SBTm+RfEtDXRT8ZrfQc
	oupfckQryzVEvswvmdtePzucAzh6Xu1qKLF9XoajZYOt5ex+lGRGKMJHC5qihgWDRNAYwK
	ri/JnK2pQj5IPKNwKwi96fOaYUPFOKdMsmVjRUUER6TMZoxH6RHZchodng40gHKj1PKD7w
	P2u6wsDa7md3jmHHoPEw1ystTFtx8kSD2VcvxC+WmqKyvEhYghFhYdAxmdIXesAXBzq4bg
	Y9XYZk3Kx4BjPguU92ZNKUkO+/YODaK0Xw3flDpGBQUzvU5hooNr8u+mbqarfA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX21jlmzTHN
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:39:30 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 4452
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:39:30 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Igor Ostapenko <igoro@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 5a6495835e45 - stable/14 - kyua: Fix prompt of "debug -p" command
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 5a6495835e45f9ee31f190345d38fc4178fd9fe3
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:39:30 +0000
Message-Id: <6b039952.4452.52d7704e@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=5a6495835e45f9ee31f190345d38fc4178fd9fe3

commit 5a6495835e45f9ee31f190345d38fc4178fd9fe3
Author:     Igor Ostapenko <igoro@FreeBSD.org>
AuthorDate: 2025-12-25 20:41:22 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:34:14 +0000

    kyua: Fix prompt of "debug -p" command
    
    (cherry picked from commit ecb58f931d45d6fe4e8b60a172415cc387657a6b)
---
 contrib/kyua/cli/cmd_debug.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/kyua/cli/cmd_debug.cpp b/contrib/kyua/cli/cmd_debug.cpp
index c00920c1a3f7..700c4b3ea851 100644
--- a/contrib/kyua/cli/cmd_debug.cpp
+++ b/contrib/kyua/cli/cmd_debug.cpp
@@ -91,14 +91,14 @@ public:
                 _ui->out("The test failed and paused right before its cleanup "
                     "routine.");
                 _ui->out(F("Test work dir: %s") % eh.work_directory().str());
-                _ui->out("Press any key to continue...");
+                _ui->out("Press <Enter> to continue...");
                 (void) std::cin.get();
             }
         } else if (_cmdline.has_option(pause_before_cleanup_option
             .long_name())) {
             _ui->out("The test paused right before its cleanup routine.");
             _ui->out(F("Test work dir: %s") % eh.work_directory().str());
-            _ui->out("Press any key to continue...");
+            _ui->out("Press <Enter> to continue...");
             (void) std::cin.get();
         }
     };

From nobody Mon Nov 23 01:39:32 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX4518rz71bsD
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:39: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpX42t2gz4lxp
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:39:32 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795397972;
	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=C+5ZcbqSTG/Qu7VxtoNutGk44HlifFEcrSEJsWZ3BmY=;
	b=Spza32Ov1mOhsbiw0MvcNOYY0Uz133Xq+ddjgZoC5bXucrZoLNFOOj1LNfQlf/CvsEcEIV
	+j05y+m02Yj+72G1CGxDAlM5cf4UihDhUdRPuplZ/YbehJitz10Yq5FqfyNeyOCITcEuoM
	d2xtm7wxZJCbOoBxmptVHB3/mBedllXx/+soHMBIgrtzDgIVvehQpiCCgtzCAmzwBrkUN7
	HG6H1WuqajiNM8DOQvpe4mLLt6jhBIveCD8xgnv+t8o6QwD956Ryc+o+sstVRjqw59VxEs
	iA4miU2kHOyjNH3Ju9RuRhpnsMUC8HdGIcEIyHn9kLFXGtMyE+vxLtIgndLXgA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397972;
	b=OY0lMTWcFJq1hxDS1XZieaUVOJjPqPqtrnwcPyN2yGEWnMcoJogA9ezkDbNJxNQPLLlOmH
	i6CKIFWq8Dh+v6WC7KMHS2PxPTbU8CjZpoHEoc1q3MvH0wNSuRlpU+FtMeAQLZR0f453dd
	n7UvQ3ekyji4HqDdPCVEEL+6zswamN0pHRluhB55yvIHKK/9YyxvTOa9ZjrIBlecou6a2B
	98hVw/ygyddOGvt+dWV/CSBPNMkllYqx3nIpwIK1vNOidHffEAHjHUDilp1E1CpBA4uGee
	m8wGvtoh+KDGSKX3hOLPNAVuGHoTHd+AW0AIpMPOdw+oKtEFet3Oxvt9GoqBtQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795397972;
	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=C+5ZcbqSTG/Qu7VxtoNutGk44HlifFEcrSEJsWZ3BmY=;
	b=JVjk46zezkTvovW37KNpjKIWevsk7hRjL3Kr4W9PH2ogFCtbvJD2rtsySYQJEBLugeQz4O
	czMZZBKdeTiFiwBMKax1vhD5fSfywj8A/Sj/i3uOalVHZQShxSK1PPkwz5Q/EvrbZ6G7is
	gOIgTpPkcjgwEa1T7JPFvuFvnZF5FIvGia5LZTkv5tb/7JVcWrMvz7X22ba4A8yEX7D6yV
	ros8H3xTAqDre1ngY7q0Uy/AbH8zmruXsr0DWW3t3ulEQs0aF6Fnjvd9gNZkCl3Nr6NBut
	RZbf6ISaf0CbZconIFFG0BM54B0N6XcRVSMKl7aH83kcR/Y9Cp0IhNy88slr9A==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX42Xs9zT1Q
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:39:32 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 414c
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:39:32 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Igor Ostapenko <igoro@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: fb62ef32e6ca - stable/14 - kyua: Add "debug -x|--execute cmd" option
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: fb62ef32e6ca321c138090e8df1abfe75e7997ba
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:39:32 +0000
Message-Id: <6b039954.414c.21786e85@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=fb62ef32e6ca321c138090e8df1abfe75e7997ba

commit fb62ef32e6ca321c138090e8df1abfe75e7997ba
Author:     Igor Ostapenko <igoro@FreeBSD.org>
AuthorDate: 2026-01-11 13:43:33 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:35:11 +0000

    kyua: Add "debug -x|--execute cmd" option
    
    With execenv=jail specified, the "cmd" runs inside the test's jail.
    
    Reviewed by:    ngie, markj
    Differential Revision:  https://reviews.freebsd.org/D52642
    
    (cherry picked from commit 8a21c17ccfecf0ee54becd46d3e08ccab76ca3d6)
---
 contrib/kyua/cli/cmd_debug.cpp         | 82 +++++++++++++++++++++++++++++++++-
 contrib/kyua/engine/debugger.hpp       |  7 +++
 contrib/kyua/engine/scheduler.cpp      |  3 ++
 contrib/kyua/utils/cmdline/options.cpp | 20 +++++++--
 contrib/kyua/utils/cmdline/options.hpp |  8 +++-
 contrib/kyua/utils/cmdline/parser.cpp  | 20 ++++++---
 contrib/kyua/utils/process/child.cpp   | 24 ++++++++++
 contrib/kyua/utils/process/child.hpp   |  5 +++
 contrib/kyua/utils/process/child.ipp   | 20 +++++++++
 9 files changed, 178 insertions(+), 11 deletions(-)

diff --git a/contrib/kyua/cli/cmd_debug.cpp b/contrib/kyua/cli/cmd_debug.cpp
index 978ccae0fdf1..060113d137fa 100644
--- a/contrib/kyua/cli/cmd_debug.cpp
+++ b/contrib/kyua/cli/cmd_debug.cpp
@@ -28,6 +28,10 @@
 
 #include "cli/cmd_debug.hpp"
 
+extern "C" {
+#include <unistd.h>
+}
+
 #include <cstdlib>
 #include <iostream>
 
@@ -39,13 +43,20 @@
 #include "utils/cmdline/parser.ipp"
 #include "utils/cmdline/ui.hpp"
 #include "utils/format/macros.hpp"
+#include "utils/fs/path.hpp"
+#include "utils/process/child.ipp"
 #include "utils/process/executor.hpp"
+#include "utils/process/operations.hpp"
+#include "utils/process/status.hpp"
 
 namespace cmdline = utils::cmdline;
 namespace config = utils::config;
 namespace executor = utils::process::executor;
+namespace process = utils::process;
 
 using cli::cmd_debug;
+using utils::process::args_vector;
+using utils::process::child;
 
 
 namespace {
@@ -62,6 +73,57 @@ const cmdline::bool_option pause_before_cleanup_option(
     "Pauses right before the test cleanup");
 
 
+static const char* DEFAULT_CMD = "$SHELL";
+const cmdline::string_option execute_option(
+    'x', "execute",
+    "A command to run within the given execenv upon test failure",
+    "cmd", DEFAULT_CMD, true);
+
+
+/// Functor to execute a program.
+class execute {
+    const std::string& _cmd;
+    executor::exit_handle& _eh;
+
+public:
+    /// Constructor.
+    ///
+    /// \param program Program binary absolute path.
+    /// \param args Program arguments.
+    execute(
+        const std::string& cmd_,
+        executor::exit_handle& eh_) :
+        _cmd(cmd_),
+        _eh(eh_)
+    {
+    }
+
+    /// Body of the subprocess.
+    void
+    operator()(void)
+    {
+        if (::chdir(_eh.work_directory().c_str()) == -1) {
+            std::cerr << "execute: chdir() errors: "
+                << strerror(errno) << ".\n";
+            std::exit(EXIT_FAILURE);
+        }
+
+        std::string program_path = "/bin/sh";
+        const char* shell = std::getenv("SHELL");
+        if (shell)
+            program_path = shell;
+
+        args_vector av;
+        if (!(_cmd.empty() || _cmd == DEFAULT_CMD)) {
+            av.push_back("-c");
+            av.push_back(_cmd);
+        }
+
+        process::exec(utils::fs::path(program_path), av);
+    }
+};
+
+
 /// The debugger interface implementation.
 class dbg : public engine::debugger {
     /// Object to interact with the I/O of the program.
@@ -103,6 +165,21 @@ public:
         }
     };
 
+    void upon_test_failure(
+        const model::test_program_ptr&,
+        const model::test_case&,
+        optional< model::test_result >&,
+        executor::exit_handle& eh) const
+    {
+        if (!_cmdline.has_option(execute_option.long_name()))
+            return;
+        const std::string& cmd = _cmdline.get_option<cmdline::string_option>(
+            execute_option.long_name());
+        std::unique_ptr< process::child > child = child::fork_interactive(
+            execute(cmd, eh));
+        (void) child->wait();
+    };
+
 };
 
 
@@ -127,6 +204,8 @@ cmd_debug::cmd_debug(void) : cli_command(
     add_option(cmdline::path_option(
         "stderr", "Where to direct the standard error of the test case",
         "path", "/dev/stderr"));
+
+    add_option(execute_option);
 }
 
 
@@ -151,7 +230,8 @@ cmd_debug::run(cmdline::ui* ui, const cmdline::parsed_cmdline& cmdline,
 
     engine::debugger_ptr debugger = nullptr;
     if (cmdline.has_option(pause_before_cleanup_upon_fail_option.long_name())
-        || cmdline.has_option(pause_before_cleanup_option.long_name())) {
+        || cmdline.has_option(pause_before_cleanup_option.long_name())
+        || cmdline.has_option(execute_option.long_name())) {
         debugger = std::shared_ptr< engine::debugger >(new dbg(ui, cmdline));
     }
 
diff --git a/contrib/kyua/engine/debugger.hpp b/contrib/kyua/engine/debugger.hpp
index 3c4d087f8ad0..ce87d41ed94d 100644
--- a/contrib/kyua/engine/debugger.hpp
+++ b/contrib/kyua/engine/debugger.hpp
@@ -58,6 +58,13 @@ public:
         const model::test_case&,
         optional< model::test_result >&,
         executor::exit_handle&) const = 0;
+
+    /// Called upon test failure.
+    virtual void upon_test_failure(
+        const model::test_program_ptr&,
+        const model::test_case&,
+        optional< model::test_result >&,
+        executor::exit_handle&) const = 0;
 };
 
 
diff --git a/contrib/kyua/engine/scheduler.cpp b/contrib/kyua/engine/scheduler.cpp
index a0719ec461ab..d04fc1dfbd3d 100644
--- a/contrib/kyua/engine/scheduler.cpp
+++ b/contrib/kyua/engine/scheduler.cpp
@@ -1403,6 +1403,9 @@ scheduler::scheduler_handle::wait_any(void)
         if (debugger) {
             debugger->before_cleanup(test_data->test_program, test_case,
                 result, handle);
+            if (!result.get().good())
+                debugger->upon_test_failure(test_data->test_program, test_case,
+                    result, handle);
         }
 
         if (test_data->needs_cleanup) {
diff --git a/contrib/kyua/utils/cmdline/options.cpp b/contrib/kyua/utils/cmdline/options.cpp
index 61736e31c11e..9d448503e3f9 100644
--- a/contrib/kyua/utils/cmdline/options.cpp
+++ b/contrib/kyua/utils/cmdline/options.cpp
@@ -53,15 +53,18 @@ namespace text = utils::text;
 ///     purposes.
 /// \param default_value_ If not NULL, specifies that the option has a default
 ///     value for the mandatory argument.
+/// \param arg_is_optional_ Specifies if a value must be provided or not.
 cmdline::base_option::base_option(const char short_name_,
                                   const char* long_name_,
                                   const char* description_,
                                   const char* arg_name_,
-                                  const char* default_value_) :
+                                  const char* default_value_,
+                                  bool arg_is_optional_) :
     _short_name(short_name_),
     _long_name(long_name_),
     _description(description_),
     _arg_name(arg_name_ == NULL ? "" : arg_name_),
+    _arg_is_optional(arg_is_optional_),
     _has_default_value(default_value_ != NULL),
     _default_value(default_value_ == NULL ? "" : default_value_)
 {
@@ -164,6 +167,16 @@ cmdline::base_option::arg_name(void) const
 }
 
 
+/// Returns optionality of the argument.
+///
+/// \return The optionality.
+bool
+cmdline::base_option::arg_is_optional(void) const
+{
+    return _arg_is_optional;
+}
+
+
 /// Checks whether the option has a default value for its argument.
 ///
 /// \pre needs_arg() must be true.
@@ -558,9 +571,10 @@ cmdline::string_option::string_option(const char short_name_,
                                       const char* long_name_,
                                       const char* description_,
                                       const char* arg_name_,
-                                      const char* default_value_) :
+                                      const char* default_value_,
+                                      bool arg_is_optional_) :
     base_option(short_name_, long_name_, description_, arg_name_,
-                default_value_)
+                default_value_, arg_is_optional_)
 {
 }
 
diff --git a/contrib/kyua/utils/cmdline/options.hpp b/contrib/kyua/utils/cmdline/options.hpp
index f3a83889e491..d11de14af514 100644
--- a/contrib/kyua/utils/cmdline/options.hpp
+++ b/contrib/kyua/utils/cmdline/options.hpp
@@ -91,6 +91,9 @@ class base_option {
     /// Descriptive name of the required argument; empty if not allowed.
     std::string _arg_name;
 
+    /// If the option can be used without an explicit argument provided.
+    bool _arg_is_optional = false;
+
     /// Whether the option has a default value or not.
     ///
     /// \todo We should probably be using the optional class here.
@@ -101,7 +104,7 @@ class base_option {
 
 public:
     base_option(const char, const char*, const char*, const char* = NULL,
-                const char* = NULL);
+                const char* = NULL, bool = false);
     base_option(const char*, const char*, const char* = NULL,
                 const char* = NULL);
     virtual ~base_option(void);
@@ -113,6 +116,7 @@ public:
 
     bool needs_arg(void) const;
     const std::string& arg_name(void) const;
+    bool arg_is_optional(void) const;
 
     bool has_default_value(void) const;
     const std::string& default_value(void) const;
@@ -219,7 +223,7 @@ public:
 class string_option : public base_option {
 public:
     string_option(const char, const char*, const char*, const char*,
-                  const char* = NULL);
+                  const char* = NULL, bool = false);
     string_option(const char*, const char*, const char*, const char* = NULL);
     virtual ~string_option(void) {}
 
diff --git a/contrib/kyua/utils/cmdline/parser.cpp b/contrib/kyua/utils/cmdline/parser.cpp
index 5c83f6d69cc4..29dd4612f6ad 100644
--- a/contrib/kyua/utils/cmdline/parser.cpp
+++ b/contrib/kyua/utils/cmdline/parser.cpp
@@ -88,7 +88,10 @@ options_to_getopt_data(const cmdline::options_vector& options,
 
         long_option.name = option->long_name().c_str();
         if (option->needs_arg())
-            long_option.has_arg = required_argument;
+            if (option->arg_is_optional())
+                long_option.has_arg = optional_argument;
+            else
+                long_option.has_arg = required_argument;
         else
             long_option.has_arg = no_argument;
 
@@ -96,7 +99,7 @@ options_to_getopt_data(const cmdline::options_vector& options,
         if (option->has_short_name()) {
             data.short_options += option->short_name();
             if (option->needs_arg())
-                data.short_options += ':';
+                data.short_options += option->arg_is_optional() ? "::" : ":";
             id = option->short_name();
         } else {
             id = cur_id++;
@@ -320,9 +323,11 @@ cmdline::parse(const int argc, const char* const* argv,
     for (cmdline::options_vector::const_iterator iter = options.begin();
          iter != options.end(); iter++) {
         const cmdline::base_option* option = *iter;
-        if (option->needs_arg() && option->has_default_value())
+        if (option->needs_arg() && option->has_default_value() &&
+            !option->arg_is_optional()) {
             option_values[option->long_name()].push_back(
                 option->default_value());
+        }
     }
 
     args_vector args;
@@ -357,8 +362,13 @@ cmdline::parse(const int argc, const char* const* argv,
                 if (::optarg != NULL) {
                     option->validate(::optarg);
                     option_values[option->long_name()].push_back(::optarg);
-                } else
-                    INV(option->has_default_value());
+                } else {
+                    if (option->arg_is_optional())
+                        option_values[option->long_name()].push_back(
+                            option->default_value());
+                    else
+                        INV(option->has_default_value());
+                }
             } else {
                 option_values[option->long_name()].push_back("");
             }
diff --git a/contrib/kyua/utils/process/child.cpp b/contrib/kyua/utils/process/child.cpp
index 36b6b6b3e51f..c51c39e6d1ff 100644
--- a/contrib/kyua/utils/process/child.cpp
+++ b/contrib/kyua/utils/process/child.cpp
@@ -235,6 +235,30 @@ process::child::fork_capture_aux(void)
 }
 
 
+std::unique_ptr< process::child >
+process::child::fork_interactive(void)
+{
+    std::cout.flush();
+    std::cerr.flush();
+
+    std::unique_ptr< signals::interrupts_inhibiter > inhibiter(
+        new signals::interrupts_inhibiter);
+    pid_t pid = detail::syscall_fork();
+    if (pid == -1) {
+        inhibiter.reset();  // Unblock signals.
+        throw process::system_error("fork(2) failed", errno);
+    } else if (pid == 0) {
+        inhibiter.reset();  // Unblock signals.
+        return {};
+    } else {
+        signals::add_pid_to_kill(pid);
+        inhibiter.reset(NULL);  // Unblock signals.
+        return std::unique_ptr< process::child >(
+            new process::child(new impl(pid, NULL)));
+    }
+}
+
+
 /// Helper function for fork().
 ///
 /// Please note: if you update this function to change the return type or to
diff --git a/contrib/kyua/utils/process/child.hpp b/contrib/kyua/utils/process/child.hpp
index 3e00cea8752c..fbe32311a05b 100644
--- a/contrib/kyua/utils/process/child.hpp
+++ b/contrib/kyua/utils/process/child.hpp
@@ -80,6 +80,8 @@ class child : noncopyable {
 
     static std::unique_ptr< child > fork_capture_aux(void);
 
+    static std::unique_ptr< child > fork_interactive(void);
+
     static std::unique_ptr< child > fork_files_aux(const fs::path&,
                                                  const fs::path&);
 
@@ -92,6 +94,9 @@ public:
     static std::unique_ptr< child > fork_capture(Hook);
     std::istream& output(void);
 
+    template< typename Hook >
+    static std::unique_ptr< child > fork_interactive(Hook);
+
     template< typename Hook >
     static std::unique_ptr< child > fork_files(Hook, const fs::path&,
                                              const fs::path&);
diff --git a/contrib/kyua/utils/process/child.ipp b/contrib/kyua/utils/process/child.ipp
index beb2ea3b0b0a..86bc01fc0d6e 100644
--- a/contrib/kyua/utils/process/child.ipp
+++ b/contrib/kyua/utils/process/child.ipp
@@ -104,6 +104,26 @@ child::fork_capture(Hook hook)
 }
 
 
+template< typename Hook >
+std::unique_ptr< child >
+child::fork_interactive(Hook hook)
+{
+    std::unique_ptr< child > child = fork_interactive();
+    if (child.get() == NULL) {
+        try {
+            hook();
+            std::abort();
+        } catch (const std::runtime_error& e) {
+            detail::report_error_and_abort(e);
+        } catch (...) {
+            detail::report_error_and_abort();
+        }
+    }
+
+    return child;
+}
+
+
 }  // namespace process
 }  // namespace utils
 

From nobody Mon Nov 23 01:39:33 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX56GhBz71c4K
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:39: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpX53pklz4lvn
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:39:33 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795397973;
	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=8QtH4WtKrihEWPAI3i+9uOO0nEZAckvudiQm/QHcZ0Q=;
	b=Ya7xX44I7o1Qn1UZXRnXwQsCIShliVEuRTkVU36OSB5ahiRqpn+39hopc902f/fOcKqxP3
	G3ENAJR8TPdXFBlGNJB7BjzI/Jqf289tX1H6jluPLg+nnX8RHFU7E2uRyvWiU0V4sA1kRK
	R5yToEmS2LJdFbRXclUQpwpArOup3m0zEm38aYHBIVJxochrrlmkR/rg/dvHzUJBFa3lqJ
	tyGXbnN1CAY4nuo2CfozGvldPHcuqi0n2CXH5Ry+LXoptuOAOSafAa8wzIfQk54IAxS3IS
	ybcYy9tu6ej1oJeByGh5b22eEQ/BlS8vREBdRgQyrrVTOBK8vUR6SEWDuHZBlA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397973;
	b=KIuqvPc/pPp1Fm5y/ZxrijqEDHcVT3lQ0Um8R/D8JT3I5NUSqz+zKp0JZnsrqFZAvzN3mX
	VU5K0Xx8nwHOtGtKmL42dagwuz7C/aeOobyWZknuuc1mQdi1bum2YRg0xP0UbFNCFsJieY
	kfWU2CyRcIQAb/VrIV06WECvpeNAf6kFR76p0AHq1k360vAAMmtJPouPHp1iEOsZSntMwc
	qhtD4BykX84hzbKLH808+hBFxgPduyd949uG2wEBhGoWdcF/2KWQrPFg6fFprzZJN1R5hK
	WHx2W7jGaVUHILNCrSMq9MG1PP8wnsPi9etbl3jAa+pIu4ohCVevuRRa/G0Whw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795397973;
	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=8QtH4WtKrihEWPAI3i+9uOO0nEZAckvudiQm/QHcZ0Q=;
	b=Ql4e1iXKhsLePTn+TcsB0E1nIh0MAjaTTWmRDmCPSLc3OF88eTaspImDYyUjwdL8/e/VAg
	haP8aIfbY1IB0cHWDUkN///r/5WuMxpbToOwqbRjWFxIQDGQY2LTNcIozVtJjjGhdREr2P
	oP5D8wUOfVPXfnZ+VCz0cGx2syiG2U64rOJEjaXH7G1B/K+EVeQKve+WFrcALHWo3FUi5v
	5j+nVLIIlURpA0C4ygauY6NDJAhUu8De3qb6aOfZyA0MwwMsKwbXf5uwb9+l3e9EC6XX6F
	rPJE5TadvnjWFFK63D0tut3iQUNg1UWil4czcn26gju6tfcNwLVmvnvtzLQbeA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX52xRLzTHR
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:39:33 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 6661
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:39:33 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav <des@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: db951ba365a4 - stable/14 - kyua-debug: Add -P option
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: db951ba365a49a0024da90a6c71a1abe08edbcdb
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:39:33 +0000
Message-Id: <6b039955.6661.4b8e7fc9@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=db951ba365a49a0024da90a6c71a1abe08edbcdb

commit db951ba365a49a0024da90a6c71a1abe08edbcdb
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2026-07-22 08:37:56 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:35:33 +0000

    kyua-debug: Add -P option
    
    Add -P as shorthand for --pause-before-cleanup.
    
    MFC after:      1 week
    Reviewed by:    ngie
    Differential Revision:  https://reviews.freebsd.org/D56613
    
    (cherry picked from commit 7c51da13ae55dc98e9cc1b794e1fe6fc001d7f42)
---
 contrib/kyua/cli/cmd_debug.cpp   | 1 +
 contrib/kyua/doc/kyua-debug.1.in | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/contrib/kyua/cli/cmd_debug.cpp b/contrib/kyua/cli/cmd_debug.cpp
index 060113d137fa..8ad52afb73a6 100644
--- a/contrib/kyua/cli/cmd_debug.cpp
+++ b/contrib/kyua/cli/cmd_debug.cpp
@@ -69,6 +69,7 @@ const cmdline::bool_option pause_before_cleanup_upon_fail_option(
 
 
 const cmdline::bool_option pause_before_cleanup_option(
+    'P',
     "pause-before-cleanup",
     "Pauses right before the test cleanup");
 
diff --git a/contrib/kyua/doc/kyua-debug.1.in b/contrib/kyua/doc/kyua-debug.1.in
index 263aef3667a7..a28c82dc270f 100644
--- a/contrib/kyua/doc/kyua-debug.1.in
+++ b/contrib/kyua/doc/kyua-debug.1.in
@@ -25,7 +25,7 @@
 .\" 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.
-.Dd March 25, 2025
+.Dd July 22, 2026
 .Dt KYUA-DEBUG 1
 .Os
 .Sh NAME
@@ -99,7 +99,7 @@ This flag makes it possible to preserve such artifacts immediately after a test
 failure, simplifying debugging.
 Otherwise, these artifacts would be removed by the test cleanup routine or
 by Kyua built-in cleanup mechanism.
-.It Fl -pause-before-cleanup
+.It Fl -pause-before-cleanup , Fl P
 The unconditional variant of the previous option.
 This can be helpful for reproducing the infrastructure or fixture of a passing
 test for further development or additional analysis.

From nobody Mon Nov 23 01:39:34 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX66HKyz71btg
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:39: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpX64j4xz4m45
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:39:34 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795397974;
	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=cFOM6xLFCBzoxvEqgYcZwndTeGrm3UlgsfBLZynH6L4=;
	b=Y4LgvIqCPcg9PycDGchEV4CfaNjosf20YCihuCtB18R55k5ebuQiUfumXXIt9VMpROO27R
	TIHq8I5ej8Ll+jvfJDmTshzlgR42Ln0Vm60QRPJJdWirWi/T+oc7wlIdVfoATffalWLJs8
	0hIgpaIW4Yrp56HNkqN6Zy2tyYgMqzfa4Qt3hFagFtN52M961e6VS1CkkBHR5S0mXrqHP9
	5sQEE1QX5DH/OdKhrhrzwCBgOBKcR246gLLlhz0Wag8lFNqwFsUa7d/aPm5QUYo6ecPVzp
	sWc3ulcEMQwuhLQj3uNuQX7EWuqCKb7kYgduLcBFdM6ja2k2SMhzIxEnWr3acQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397974;
	b=g7ChgB8cbBIiFxNx/Rhy9C6IiFrGG+tq8B5LzTBeZq6l+0PiKAAkQexgDo3zJJEUluHMJu
	OJOs2PFYRZpS8z5i7kerFWy89mVp2a9KFhst8aekpVjvEg3Y0+B62hG9uptvTfHcNdwljj
	NNXIzjAPfvkvPQ5g7mKOmc22pYv237yWyUiSW0FsZG3tyLY07Mqr4vdeMeFuj89Y+zkC5T
	EZaQmMSzESSGfZeYbd2ldmelUWACggiPmFWWn0qSSmBfc9ApvCr5YpnUHwdKLTNIVzUlWI
	63BjmL1U9Tgm/zef/lVU9Dvb+5oMbl9QXRqBSzSUFV7ZNXLhFIL2MCF+AGK+wg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795397974;
	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=cFOM6xLFCBzoxvEqgYcZwndTeGrm3UlgsfBLZynH6L4=;
	b=voUN8h/Ykml1IYBf6pfYxbRo4Jo6j6Ga/8SEfV7qfRJ1YQXT0qtf1H9LUtUaMU6aFLLTMl
	3/xxHF5mF3IrTNgdqx/B0jUDNz7UdKz9kfJ+Nlkq1EjZrF/x+Cp+Fh9ftJ6Wyzxmx7CylV
	qC1s5ca/IFDFcBMdVFQ4+Apvhg6GHUU3nbQgBtwj2aOD3XFXFtOv9aLnZf4mKmkaiWKrT2
	nP2Vb93wjdNYv3ZwQn5VslDJjBpqoseZPGj4HNfOktGlS7oRd9BJi+vP558Ri2i4XJZrbU
	UFgslD3hK7/mBLYGnL6Ipqq9fIVEKmqYK2ncSVRHBLzrjkJ7faO9HPDbD+ryWA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX63XcCzTL1
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:39:34 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 454b
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:39:34 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Igor Ostapenko <igoro@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: f203a6264f00 - stable/14 - kyua: Add "prepare" command
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: f203a6264f00ad780f17608c1806258907d93e7e
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:39:34 +0000
Message-Id: <6b039956.454b.30b99735@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=f203a6264f00ad780f17608c1806258907d93e7e

commit f203a6264f00ad780f17608c1806258907d93e7e
Author:     Igor Ostapenko <igoro@FreeBSD.org>
AuthorDate: 2026-08-23 22:42:48 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:35:53 +0000

    kyua: Add "prepare" command
    
    This introduces the requirement preparation handler concept, with the
    first handler implemented to load the required kernel modules.
    
    Running without arguments lists all available handlers:
    
      kyua prepare
    
    Currently there are only two handlers:
    
      all: runs all available handlers
      kmods: loads the modules declared by required_kmods metadata
    
    The dry run option lists the required modules without actual loading:
    
      kyua prepare { --dry-run | -n } kmods
    
    The "prepare" command traverses only the given tree of tests, i.e., the
    following invocation lists all required modules for the whole test
    suite:
    
      kyua prepare -k /usr/tests/Kyuafile -n kmods
    
    , while this one is limited to the pf tests only:
    
      kyua prepare -k /usr/tests/sys/netpfil/pf/Kyuafile -n kmods
    
    Reviewed by:    ngie
    Differential Revision:  https://reviews.freebsd.org/D48087
    
    (cherry picked from commit edb230c4af499203d7a6894b3711fe6574b26040)
---
 contrib/kyua/cli/cmd_prepare.cpp            |  76 +++++++++++++++
 contrib/kyua/cli/cmd_prepare.hpp            |  53 +++++++++++
 contrib/kyua/cli/main.cpp                   |   2 +
 contrib/kyua/doc/kyuafile.5.in              |   1 +
 contrib/kyua/engine/prepare/prepare.cpp     |  83 ++++++++++++++++
 contrib/kyua/engine/prepare/prepare.hpp     | 107 +++++++++++++++++++++
 contrib/kyua/engine/prepare/prepare_all.cpp |  66 +++++++++++++
 contrib/kyua/engine/prepare/prepare_all.hpp |  53 +++++++++++
 contrib/kyua/model/metadata.cpp             |  47 +++++----
 contrib/kyua/model/metadata.hpp             |   4 +-
 contrib/kyua/os/freebsd/main.cpp            |   8 ++
 contrib/kyua/os/freebsd/prepare_kmods.cpp   | 143 ++++++++++++++++++++++++++++
 contrib/kyua/os/freebsd/prepare_kmods.hpp   |  55 +++++++++++
 usr.bin/kyua/Makefile                       |   8 +-
 14 files changed, 686 insertions(+), 20 deletions(-)

diff --git a/contrib/kyua/cli/cmd_prepare.cpp b/contrib/kyua/cli/cmd_prepare.cpp
new file mode 100644
index 000000000000..a3ba5c3285a1
--- /dev/null
+++ b/contrib/kyua/cli/cmd_prepare.cpp
@@ -0,0 +1,76 @@
+// Copyright 2024 The Kyua Authors.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+//   notice, this list of conditions and the following disclaimer.
+// * 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.
+// * Neither the name of Google Inc. nor the names of its contributors
+//   may be used to endorse or promote products derived from this software
+//   without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER 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 "cli/cmd_prepare.hpp"
+
+#include "cli/common.ipp"
+#include "engine/prepare/prepare.hpp"
+#include "utils/cmdline/options.hpp"
+
+namespace cmdline = utils::cmdline;
+namespace config = utils::config;
+namespace prepare = engine::prepare;
+
+using cli::cmd_prepare;
+
+
+/// Default constructor for cmd_prepare.
+cmd_prepare::cmd_prepare(void) : cli_command(
+    "prepare", "[handler-name ...]", 0, -1,
+    "Prepares environment and declared requirements before testing")
+{
+    add_option(kyuafile_option);
+    add_option(build_root_option);
+    add_option(cmdline::bool_option('n', "dry-run", "Do not alter the system"));
+}
+
+
+/// Entry point for the "prepare" subcommand.
+///
+/// \param ui Object to interact with the I/O of the program.
+/// \param cmdline Representation of the command line to the subcommand.
+/// \param user_config The runtime configuration of the program.
+///
+/// \return 0 if successful, 1 otherwise.
+int
+cmd_prepare::run(cmdline::ui* ui, const cmdline::parsed_cmdline& cmdline,
+            const config::tree& user_config)
+{
+    // List available preparation handlers
+    if (cmdline.arguments().empty()) {
+        for (auto& h : prepare::handlers()) {
+            ui->out(h->name(), false);
+            ui->out("\t\t\t", false);
+            ui->out(h->description());
+        }
+        return EXIT_SUCCESS;
+    }
+
+    // Or run the given ones
+    return prepare::run(cmdline.arguments(), ui, cmdline, user_config);
+}
diff --git a/contrib/kyua/cli/cmd_prepare.hpp b/contrib/kyua/cli/cmd_prepare.hpp
new file mode 100644
index 000000000000..322b2baf9e8f
--- /dev/null
+++ b/contrib/kyua/cli/cmd_prepare.hpp
@@ -0,0 +1,53 @@
+// Copyright 2024 The Kyua Authors.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+//   notice, this list of conditions and the following disclaimer.
+// * 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.
+// * Neither the name of Google Inc. nor the names of its contributors
+//   may be used to endorse or promote products derived from this software
+//   without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER 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.
+
+/// \file cli/cmd_prepare.hpp
+/// Provides the cmd_prepare class.
+
+#if !defined(CLI_CMD_PREPARE_HPP)
+#define CLI_CMD_PREPARE_HPP
+
+#include "cli/common.hpp"
+
+namespace cli {
+
+
+/// Implementation of the "prepare" subcommand.
+class cmd_prepare : public cli_command
+{
+public:
+    cmd_prepare(void);
+
+    int run(utils::cmdline::ui*, const utils::cmdline::parsed_cmdline&,
+            const utils::config::tree&);
+};
+
+
+}  // namespace cli
+
+#endif  // !defined(CLI_CMD_PREPARE_HPP)
diff --git a/contrib/kyua/cli/main.cpp b/contrib/kyua/cli/main.cpp
index dd7ce939e162..ad679f0949b3 100644
--- a/contrib/kyua/cli/main.cpp
+++ b/contrib/kyua/cli/main.cpp
@@ -49,6 +49,7 @@ extern "C" {
 #include "cli/cmd_debug.hpp"
 #include "cli/cmd_help.hpp"
 #include "cli/cmd_list.hpp"
+#include "cli/cmd_prepare.hpp"
 #include "cli/cmd_report.hpp"
 #include "cli/cmd_report_html.hpp"
 #include "cli/cmd_report_junit.hpp"
@@ -191,6 +192,7 @@ safe_main(cmdline::ui* ui, int argc, const char* const argv[],
 
     commands.insert(new cli::cmd_debug(), "Workspace");
     commands.insert(new cli::cmd_list(), "Workspace");
+    commands.insert(new cli::cmd_prepare(), "Workspace");
     commands.insert(new cli::cmd_test(), "Workspace");
 
     commands.insert(new cli::cmd_report(), "Reporting");
diff --git a/contrib/kyua/doc/kyuafile.5.in b/contrib/kyua/doc/kyuafile.5.in
index a9106e95d790..eddb8f92cb86 100644
--- a/contrib/kyua/doc/kyuafile.5.in
+++ b/contrib/kyua/doc/kyuafile.5.in
@@ -300,6 +300,7 @@ Supported platforms:
 .Pp
 ATF:
 .Va require.kmods
+(appends to the list declared at the Kyuafile level instead of overwriting it)
 .It Va required_memory
 Amount of physical memory that the test needs to run successfully.
 .Pp
diff --git a/contrib/kyua/engine/prepare/prepare.cpp b/contrib/kyua/engine/prepare/prepare.cpp
new file mode 100644
index 000000000000..218b236450c0
--- /dev/null
+++ b/contrib/kyua/engine/prepare/prepare.cpp
@@ -0,0 +1,83 @@
+// Copyright 2024 The Kyua Authors.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+//   notice, this list of conditions and the following disclaimer.
+// * 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.
+// * Neither the name of Google Inc. nor the names of its contributors
+//   may be used to endorse or promote products derived from this software
+//   without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER 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 "engine/prepare/prepare.hpp"
+
+#include "engine/prepare/prepare_all.hpp"
+
+namespace prepare = engine::prepare;
+
+
+/// List of registered requirement preparation handlers.
+///
+/// Use register_handler() to add an entry to this global list.
+static std::vector< std::shared_ptr< prepare::handler > > _handlers = {
+    std::shared_ptr< prepare::handler >(new prepare::prepare_all())
+};
+
+
+void
+prepare::register_handler(const std::shared_ptr< handler > handler)
+{
+    _handlers.push_back(handler);
+}
+
+
+const std::vector< std::shared_ptr< prepare::handler > >
+prepare::handlers()
+{
+    return _handlers;
+}
+
+
+int
+prepare::run(const std::vector< std::string >& handler_names,
+        cmdline::ui* ui,
+        const cmdline::parsed_cmdline& cmdline,
+        const config::tree& user_config)
+{
+    for (auto& hname : handler_names) {
+        std::shared_ptr< prepare::handler > handler = nullptr;
+        for (auto& h : prepare::handlers())
+            if (h->name() == hname) {
+                handler = h;
+                break;
+            }
+
+        if (handler == nullptr) {
+            ui->out(F("Unknown requirement preparation handler: %s") % hname);
+            return EXIT_FAILURE;
+        }
+
+        if (handler->exec(ui, cmdline, user_config) != 0)
+            // suppress the actual code -- main limits possible exit codes
+            return EXIT_FAILURE;
+    }
+
+    return EXIT_SUCCESS;
+}
diff --git a/contrib/kyua/engine/prepare/prepare.hpp b/contrib/kyua/engine/prepare/prepare.hpp
new file mode 100644
index 000000000000..2ee12b11a623
--- /dev/null
+++ b/contrib/kyua/engine/prepare/prepare.hpp
@@ -0,0 +1,107 @@
+// Copyright 2024 The Kyua Authors.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+//   notice, this list of conditions and the following disclaimer.
+// * 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.
+// * Neither the name of Google Inc. nor the names of its contributors
+//   may be used to endorse or promote products derived from this software
+//   without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER 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.
+
+/// \file engine/prepare/prepare.hpp
+/// Requirement preparation subsystem interface.
+
+#if !defined(ENGINE_PREPARE_HPP)
+#define ENGINE_PREPARE_HPP
+
+#include <string>
+#include <vector>
+
+#include "utils/cmdline/parser.ipp"
+#include "utils/cmdline/ui.hpp"
+#include "utils/config/tree.ipp"
+
+namespace cmdline = utils::cmdline;
+namespace config = utils::config;
+
+
+namespace engine {
+namespace prepare {
+
+
+/// Abstract interface of a requirement preparation handler.
+class handler {
+public:
+    /// Constructor.
+    handler() {}
+
+    /// Destructor.
+    virtual ~handler() {}
+
+    /// Returns name of the handler.
+    virtual const std::string& name() const = 0;
+
+    /// Returns short description of the handler.
+    virtual const std::string& description() const = 0;
+
+    /// Runs the requirement preparation handler.
+    ///
+    /// \param ui Object to interact with the I/O of the program.
+    /// \param cmdline Representation of the command line to the subcommand.
+    /// \param user_config The runtime configuration of the program.
+    ///
+    /// \return 0 to indicate success.
+    virtual int exec(cmdline::ui* ui,
+                     const cmdline::parsed_cmdline& cmdline,
+                     const config::tree& user_config) const = 0;
+};
+
+
+/// Registers a requirement preparation handler.
+///
+/// \param handler A requirement preparation handler.
+void register_handler(const std::shared_ptr< handler > handler);
+
+
+/// Returns the list of registered requirement preparation handlers.
+///
+/// \return A vector of pointers to requirement preparation handlers.
+const std::vector< std::shared_ptr< handler > > handlers();
+
+
+/// Run named handlers.
+///
+/// \param handler_names Names of the handlers to run.
+/// \param ui Object to interact with the I/O of the program.
+/// \param cmdline Representation of the command line to the subcommand.
+/// \param user_config The runtime configuration of the program.
+///
+/// \return 0 to indicate success.
+int run(const std::vector< std::string >& handler_names,
+        cmdline::ui* ui,
+        const cmdline::parsed_cmdline& cmdline,
+        const config::tree& user_config);
+
+
+}  // namespace prepare
+}  // namespace engine
+
+#endif  // !defined(ENGINE_PREPARE_HPP)
diff --git a/contrib/kyua/engine/prepare/prepare_all.cpp b/contrib/kyua/engine/prepare/prepare_all.cpp
new file mode 100644
index 000000000000..db8ea330a51e
--- /dev/null
+++ b/contrib/kyua/engine/prepare/prepare_all.cpp
@@ -0,0 +1,66 @@
+// Copyright 2024 The Kyua Authors.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+//   notice, this list of conditions and the following disclaimer.
+// * 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.
+// * Neither the name of Google Inc. nor the names of its contributors
+//   may be used to endorse or promote products derived from this software
+//   without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER 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 "engine/prepare/prepare_all.hpp"
+
+static const std::string _name = "all";
+static const std::string _description = "Run all preparations";
+
+namespace prepare = engine::prepare;
+
+
+const std::string&
+prepare::prepare_all::name() const
+{
+    return _name;
+}
+
+
+const std::string&
+prepare::prepare_all::description() const
+{
+    return _description;
+}
+
+
+int
+prepare::prepare_all::exec(cmdline::ui* ui,
+                           const cmdline::parsed_cmdline& cmdline,
+                           const config::tree& user_config) const
+{
+    for (auto& handler : prepare::handlers()) {
+        if (handler->name() == this->name())
+            continue;
+
+        int error = handler->exec(ui, cmdline, user_config);
+        if (error != EXIT_SUCCESS)
+            return error;
+    }
+
+    return EXIT_SUCCESS;
+}
diff --git a/contrib/kyua/engine/prepare/prepare_all.hpp b/contrib/kyua/engine/prepare/prepare_all.hpp
new file mode 100644
index 000000000000..7c5c54fe269c
--- /dev/null
+++ b/contrib/kyua/engine/prepare/prepare_all.hpp
@@ -0,0 +1,53 @@
+// Copyright 2024 The Kyua Authors.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+//   notice, this list of conditions and the following disclaimer.
+// * 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.
+// * Neither the name of Google Inc. nor the names of its contributors
+//   may be used to endorse or promote products derived from this software
+//   without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER 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.
+
+/// \file engine/prepare/prepare_all.hpp
+/// The requirement preparation handler which runs all registered handlers.
+
+#if !defined(ENGINE_PREPARE_ALL_HPP)
+#define ENGINE_PREPARE_ALL_HPP
+
+#include "engine/prepare/prepare.hpp"
+
+namespace engine {
+namespace prepare {
+
+
+class prepare_all : public prepare::handler {
+public:
+    const std::string& name() const;
+    const std::string& description() const;
+    int exec(cmdline::ui*, const cmdline::parsed_cmdline&,
+             const config::tree&) const;
+};
+
+
+}  // namespace prepare
+}  // namespace engine
+
+#endif  // !defined(ENGINE_PREPARE_ALL_HPP)
diff --git a/contrib/kyua/model/metadata.cpp b/contrib/kyua/model/metadata.cpp
index afb31435a238..708a01667bbb 100644
--- a/contrib/kyua/model/metadata.cpp
+++ b/contrib/kyua/model/metadata.cpp
@@ -255,8 +255,8 @@ init_tree(config::tree& tree)
     tree.define< config::strings_set_node >("required_configs");
     tree.define< bytes_node >("required_disk_space");
     tree.define< paths_set_node >("required_files");
-    tree.define< bytes_node >("required_memory");
     tree.define< config::strings_set_node >("required_kmods");
+    tree.define< bytes_node >("required_memory");
     tree.define< paths_set_node >("required_programs");
     tree.define< user_node >("required_user");
     tree.define< delta_node >("timeout");
@@ -282,8 +282,8 @@ set_defaults(config::tree& tree)
                                          model::strings_set());
     tree.set< bytes_node >("required_disk_space", units::bytes(0));
     tree.set< paths_set_node >("required_files", model::paths_set());
-    tree.set< bytes_node >("required_memory", units::bytes(0));
     tree.set< config::strings_set_node >("required_kmods", model::strings_set());
+    tree.set< bytes_node >("required_memory", units::bytes(0));
     tree.set< paths_set_node >("required_programs", model::paths_set());
     tree.set< user_node >("required_user", "");
     // TODO(jmmv): We shouldn't be setting a default timeout like this.  See
@@ -585,20 +585,6 @@ model::metadata::required_files(void) const
 }
 
 
-/// Returns the amount of memory required by the test.
-///
-/// \return Number of bytes, or 0 if this does not apply.
-const units::bytes&
-model::metadata::required_memory(void) const
-{
-    if (_pimpl->props.is_set("required_memory")) {
-        return _pimpl->props.lookup< bytes_node >("required_memory");
-    } else {
-        return get_defaults().lookup< bytes_node >("required_memory");
-    }
-}
-
-
 /// Returns the list of kernel modules needed by the test.
 ///
 /// \return Set of kernel module names.
@@ -615,6 +601,20 @@ model::metadata::required_kmods(void) const
 }
 
 
+/// Returns the amount of memory required by the test.
+///
+/// \return Number of bytes, or 0 if this does not apply.
+const units::bytes&
+model::metadata::required_memory(void) const
+{
+    if (_pimpl->props.is_set("required_memory")) {
+        return _pimpl->props.lookup< bytes_node >("required_memory");
+    } else {
+        return get_defaults().lookup< bytes_node >("required_memory");
+    }
+}
+
+
 /// Returns the list of programs needed by the test.
 ///
 /// \return Set of paths.
@@ -1059,6 +1059,21 @@ model::metadata_builder::set_required_files(const model::paths_set& files)
 }
 
 
+/// Sets the list of required kernel modules.
+///
+/// \param vars Set of kernel module names.
+///
+/// \return A reference to this builder.
+///
+/// \throw model::error If the value is invalid.
+model::metadata_builder&
+model::metadata_builder::set_required_kmods(const model::strings_set& kmods)
+{
+    set< config::strings_set_node >(_pimpl->props, "required_kmods", kmods);
+    return *this;
+}
+
+
 /// Sets the amount of memory required by the test.
 ///
 /// \param bytes Number of bytes.
diff --git a/contrib/kyua/model/metadata.hpp b/contrib/kyua/model/metadata.hpp
index eee7eaf0f7c4..d915677eb41d 100644
--- a/contrib/kyua/model/metadata.hpp
+++ b/contrib/kyua/model/metadata.hpp
@@ -75,8 +75,8 @@ public:
     const strings_set& required_configs(void) const;
     const utils::units::bytes& required_disk_space(void) const;
     const paths_set& required_files(void) const;
-    const utils::units::bytes& required_memory(void) const;
     const strings_set& required_kmods(void) const;
+    const utils::units::bytes& required_memory(void) const;
     const paths_set& required_programs(void) const;
     const std::string& required_user(void) const;
     const utils::datetime::delta& timeout(void) const;
@@ -121,8 +121,8 @@ public:
     metadata_builder& set_required_configs(const strings_set&);
     metadata_builder& set_required_disk_space(const utils::units::bytes&);
     metadata_builder& set_required_files(const paths_set&);
-    metadata_builder& set_required_memory(const utils::units::bytes&);
     metadata_builder& set_required_kmods(const strings_set&);
+    metadata_builder& set_required_memory(const utils::units::bytes&);
     metadata_builder& set_required_programs(const paths_set&);
     metadata_builder& set_required_user(const std::string&);
     metadata_builder& set_string(const std::string&, const std::string&);
diff --git a/contrib/kyua/os/freebsd/main.cpp b/contrib/kyua/os/freebsd/main.cpp
index 700284b64b78..30f1a3fa7142 100644
--- a/contrib/kyua/os/freebsd/main.cpp
+++ b/contrib/kyua/os/freebsd/main.cpp
@@ -34,7 +34,12 @@
 #include "engine/requirements.hpp"
 #include "os/freebsd/reqs_checker_kmods.hpp"
 
+#include "engine/prepare/prepare.hpp"
+#include "os/freebsd/prepare_kmods.hpp"
+
 namespace execenv = engine::execenv;
+namespace prepare = engine::prepare;
+
 
 /// FreeBSD related features initialization.
 ///
@@ -59,6 +64,9 @@ freebsd::main(const int, const char* const* const)
             new freebsd::reqs_checker_kmods()
         )
     );
+
+    prepare::register_handler(
+        std::shared_ptr< prepare::handler >(new freebsd::prepare_kmods()));
 #endif
 
     return 0;
diff --git a/contrib/kyua/os/freebsd/prepare_kmods.cpp b/contrib/kyua/os/freebsd/prepare_kmods.cpp
new file mode 100644
index 000000000000..91771f3aedfd
--- /dev/null
+++ b/contrib/kyua/os/freebsd/prepare_kmods.cpp
@@ -0,0 +1,143 @@
+// Copyright 2024 The Kyua Authors.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+//   notice, this list of conditions and the following disclaimer.
+// * 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.
+// * Neither the name of Google Inc. nor the names of its contributors
+//   may be used to endorse or promote products derived from this software
+//   without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER 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 "os/freebsd/prepare_kmods.hpp"
+
+#include "cli/common.hpp"
+#include "drivers/list_tests.hpp"
+#include "engine/filters.hpp"
+#include "model/metadata.hpp"
+#include "model/test_case.hpp"
+#include "model/test_program.hpp"
+
+#include <system_error>
+
+// FreeBSD kldload syscall
+extern "C" {
+#include <sys/param.h>
+#include <sys/linker.h>
+}
+
+
+namespace {
+
+
+static const std::string _name = "kmods";
+static const std::string _description = "FreeBSD: load modules specified "
+    "in the required_kmods metadata";
+
+
+/// Hooks for list_tests to examine test cases as they come.
+class list_hooks : public drivers::list_tests::base_hooks {
+    /// Collected names of required kernel modules.
+    std::set< std::string >& _modules;
+
+public:
+    /// Initializes the hooks.
+    ///
+    /// \param modules_ The set of modules to fill.
+    list_hooks(std::set< std::string >& modules_) :
+        _modules(modules_)
+    {
+    }
+
+    /// Examine a test case as soon as it is found.
+    ///
+    /// \param test_program The test program containing the test case.
+    /// \param test_case_name The name of the located test case.
+    void
+    got_test_case(const model::test_program& test_program,
+                  const std::string& test_case_name)
+    {
+        auto test_case = test_program.find(test_case_name);
+        auto kmods = test_case.get_metadata().required_kmods();
+        _modules.insert(kmods.begin(), kmods.end());
+    }
+};
+
+
+}  // anonymous namespace
+
+
+namespace freebsd {
+
+
+const std::string&
+prepare_kmods::name() const
+{
+    return _name;
+}
+
+
+const std::string&
+prepare_kmods::description() const
+{
+    return _description;
+}
+
+
+int
+prepare_kmods::exec(cmdline::ui* ui, const cmdline::parsed_cmdline& cmdline,
+               const config::tree& user_config) const
+{
+    int err = 0;
+
+    // Collect required modules
+    std::set< std::string > modules;
+    list_hooks hooks(modules);
+    const std::set< engine::test_filter > nofilters;
+    const drivers::list_tests::result result = drivers::list_tests::drive(
+        cli::kyuafile_path(cmdline), cli::build_root_path(cmdline),
+        nofilters, user_config, hooks);
+
+    // Nothing to do
+    if (modules.empty())
+        return 0;
+
+    // Announce the work
+    ui->out("kldload", false);
+    for (auto& m : modules)
+        ui->out(F(" %s") % m, false);
+    ui->out("");
+
+    if (cmdline.has_option("dry-run"))
+        return 0;
+
+    // Load the modules
+    for (auto& m : modules) {
+        if (::kldload(m.c_str()) != -1 || errno == EEXIST)
+            continue;
+        ui->out(F("WARN: cannot kldload %s") % m);
+        err = EINVAL;
+    }
+
+    return err;
+}
+
+
+}  // namespace freebsd
diff --git a/contrib/kyua/os/freebsd/prepare_kmods.hpp b/contrib/kyua/os/freebsd/prepare_kmods.hpp
new file mode 100644
index 000000000000..36a3236a4e2d
--- /dev/null
+++ b/contrib/kyua/os/freebsd/prepare_kmods.hpp
@@ -0,0 +1,55 @@
+// Copyright 2024 The Kyua Authors.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+//   notice, this list of conditions and the following disclaimer.
+// * 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.
+// * Neither the name of Google Inc. nor the names of its contributors
+//   may be used to endorse or promote products derived from this software
+//   without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER 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.
+
+/// \file os/freebsd/prepare_kmods.hpp
+/// The preparation handler which loads FreeBSD modules declared via
+/// "required_kmods" metadata.
+
+#if !defined(FREEBSD_PREPARE_KMODS_HPP)
+#define FREEBSD_PREPARE_KMODS_HPP
+
+#include "engine/prepare/prepare.hpp"
+
+namespace prepare = engine::prepare;
+
+
+namespace freebsd {
+
+
+class prepare_kmods : public prepare::handler {
+public:
+    const std::string& name() const;
+    const std::string& description() const;
+    int exec(cmdline::ui*, const cmdline::parsed_cmdline&,
+             const config::tree&) const;
+};
+
+
+}  // namespace freebsd
+
+#endif  // !defined(FREEBSD_PREPARE_KMODS_HPP)
diff --git a/usr.bin/kyua/Makefile b/usr.bin/kyua/Makefile
index 931958f09f2c..593eaee9d378 100644
--- a/usr.bin/kyua/Makefile
+++ b/usr.bin/kyua/Makefile
@@ -127,11 +127,14 @@ SRCS+=	engine/atf.cpp			\
 	engine/tap_parser.cpp		\
 	engine/scheduler.cpp		\
 	engine/execenv/execenv.cpp	\
-	engine/execenv/execenv_host.cpp
+	engine/execenv/execenv_host.cpp	\
+	engine/prepare/prepare.cpp	\
+	engine/prepare/prepare_all.cpp
 
 SRCS+=	os/freebsd/execenv_jail_manager.cpp	\
 	os/freebsd/main.cpp			\
-	os/freebsd/reqs_checker_kmods.cpp
+	os/freebsd/reqs_checker_kmods.cpp	\
+	os/freebsd/prepare_kmods.cpp
 
 SRCS+=	store/dbtypes.cpp		\
 	store/exceptions.cpp		\
@@ -156,6 +159,7 @@ SRCS+=	cli/cmd_about.cpp		\
 	cli/cmd_debug.cpp		\
 	cli/cmd_help.cpp		\
 	cli/cmd_list.cpp		\
+	cli/cmd_prepare.cpp		\
 	cli/cmd_report.cpp		\
 	cli/cmd_report_html.cpp		\
 	cli/cmd_report_junit.cpp	\

From nobody Mon Nov 23 01:39:35 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX806N8z71c2S
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:39: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpX74NK2z4lw0
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:39:35 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795397975;
	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=SyH/hfZAJoU+68TU8wP9GWCAfmGJ90fSUhSrQNpfjJo=;
	b=sX/AuTg+AngPvMijpZbmFYOHFzY+ozGuKXhkjJAfh5fm9GDlBDkNkT42HMtkl0Yv4CGx9Q
	0xhEXFgQ4RnXoUyPMcf+wouIcK9b9No92reL0aInPzBriO9Q2350asA8pDbNyrAoqz2pbj
	aXflSU5+xMLLX4JL+hnapR4ctlLpH40wfwXTuuLArprC59w1g6YV6EnkxTRcp1fFvFGPcI
	KHrFrio95HlKQLDYdI1vgNMPauR+4+lvsQZdwhEw3gx/oBttzuQuQDh05QYK0zYVBmXvSM
	UGpIR30F/zZRaxQ0qmw2Bc2AZ99fkkgeiBKYGxiuF6Y/IEgKGX6QTxPQBoqfCA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397975;
	b=jI7trwc9jY1vdu85b+mEvtT96oH4yEByxXvct2iIgjwjUDQ8hpUOf7kdC/3aMAEhOVU1z1
	WLmdPk892abG2d8sVhdDSaI/y7dWR8XnmZGCsCSj2DLS1nX7EIPPaQjTAk8FWC3r6+j/Pv
	yAurwH9SPIvv0ESAJuzq8bklxn0qghLEocEaD1PcdrMs4kkzpkxZ1eqpLkH6lRH07kd5Ba
	YTRLrb+3PWqvZKwQc8jMQf+d96841XFuttNAB8NhyKmFnquwln2UYzdP3hR41R8GlCVYqE
	TWEX1TklaV2/zKO5AGy8Z+UEvGu2SgoEehEYm1QOnueWb/B4+yrZvhtMaz1JLA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795397975;
	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=SyH/hfZAJoU+68TU8wP9GWCAfmGJ90fSUhSrQNpfjJo=;
	b=DDN8YWuFxjQgsfe6sHbTZsQRg4c3HUooPtkAZ4/IM6z76rBRyaPZvhSQfiV1RTBKQycNt2
	RaIGqXGG7bUSUK7pHr4OFBgW8DPkzYkIjGYJ1g7UypZQ2q0JqyyV/WMRdQ1tnlhymuFoJC
	JQWmU/E5U+F5tywAkBllp/WabouK65UOROrGs2OQWpMs4ckaC0Rq+jOH1rq/MZQaMGs+IJ
	ta4OSXtpUNrcgk6lkwElyF2PvUXqQI9i+v21o5lxsOcxCCn37SgqtnNIoQhY9hbMwmIlR6
	aQXwZZ/I060Q4glFKcQKCNEGcso/PaTuIwZtAp6PUOaigSc3AOwu4Mjv7qLHuA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX73hmGzTHS
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:39:35 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 54eb
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:39:35 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Siva Mahadevan <siva@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: c0e03beeee8c - stable/14 - contrib/kyua: fix -Wshadow error
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: c0e03beeee8c84bcbdc1605065f43408b2fb7ac3
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:39:35 +0000
Message-Id: <6b039957.54eb.1c779d2a@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=c0e03beeee8c84bcbdc1605065f43408b2fb7ac3

commit c0e03beeee8c84bcbdc1605065f43408b2fb7ac3
Author:     Siva Mahadevan <siva@FreeBSD.org>
AuthorDate: 2026-09-05 14:12:11 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:35:53 +0000

    contrib/kyua: fix -Wshadow error
    
    This fixes the build with gcc 14:
    
    /usr/src/contrib/kyua/engine/prepare/prepare_all.cpp:56:16: error: declaration of 'handler' shadows a member of 'engine::prepare::prepare_all' [-Werror=shadow]
       56 |     for (auto& handler : prepare::handlers()) {
          |                ^~~~~~~
    In file included from /usr/src/contrib/kyua/engine/prepare/prepare_all.hpp:35,
                     from /usr/src/contrib/kyua/engine/prepare/prepare_all.cpp:29:
    /usr/src/contrib/kyua/engine/prepare/prepare.hpp:51:15: note: shadowed declaration is here
       51 | class handler {
          |               ^
    
    Fixes:  edb230c4af499203d7a6894b3711fe6574b26040
    
    Reviewed by:    igoro, rlibby, ngie
    MFC after:      3 days
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D59346
    
    (cherry picked from commit a73bb621ca361edc678bbf49f3ca1acca8aa0344)
---
 contrib/kyua/engine/prepare/prepare_all.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/contrib/kyua/engine/prepare/prepare_all.cpp b/contrib/kyua/engine/prepare/prepare_all.cpp
index db8ea330a51e..73591ef5822a 100644
--- a/contrib/kyua/engine/prepare/prepare_all.cpp
+++ b/contrib/kyua/engine/prepare/prepare_all.cpp
@@ -53,11 +53,11 @@ prepare::prepare_all::exec(cmdline::ui* ui,
                            const cmdline::parsed_cmdline& cmdline,
                            const config::tree& user_config) const
 {
-    for (auto& handler : prepare::handlers()) {
-        if (handler->name() == this->name())
+    for (auto& h : prepare::handlers()) {
+        if (h->name() == this->name())
             continue;
 
-        int error = handler->exec(ui, cmdline, user_config);
+        int error = h->exec(ui, cmdline, user_config);
         if (error != EXIT_SUCCESS)
             return error;
     }

From nobody Mon Nov 23 01:39:36 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX90vWRz71bwV
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:39: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpX85N9Hz4m4Q
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:39:36 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795397976;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=EjIKksdq04rNgucySjEICpGu5WP6MZ9ID05kmR5E7Is=;
	b=Z5Bl3lWbZGtIjS5yt8ubKSkEOXfPURgX0nVPJ0ulH1JcyU+GXse9E1AXd6nJSIMwAqiZ/h
	46DhO28GImUb1z8U4QGJSxmsJVmkm6cQwKbYO7yF0ZpKDT3jLEVYcsJN1JnKA5N0tKuXK4
	f5iVPTHPKK5sLUiBqy2V8GSwF5s65+riTbYjxXrX+GUAOJTz3jyVxnUE2ESd1gH3jSHjSw
	TttEch5Id8z8wWncr+VwuA+wRGEqwh8ZbtPiXxPx2OQY3q2Pue9S12IOChtMkwW/f5KBxi
	LzpHGYA635CJbbg1TscwFq7jIc1zf4ACPOY+O4SEd9LSImrsnm99sjXA4QUuTw==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397976;
	b=E96pUGue2MsmKo2W/qns/rat9Ud2PYVb84k+BP76LUwaSuAF4TnhnbI594Dqaiaus5TNo3
	T13npc/oswpRFSIwGhXOItF2NCmF0Y+bqY4aEkHJLec6AIGXOCng4NnOIG86h+a76mCqg+
	C/SJWfwMgnZD4uMCPHbgoHUDluLtd5WDVFNtz/VO24oD8XozK1e8bC4us96f4Xaj7TkVQp
	mBLfGMn4keBjyGwaojHIPy3S3SHcs7tnmKKkPP7+OKbDFbYjowHIk9BaVUOH2nO19Ukf4M
	RDUwBU9Ri9dIvyb3JNjBrTWa4bQlBd9llvDxgbzO2xbhP+djAqaS+cB9Sx9C3Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795397976;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=EjIKksdq04rNgucySjEICpGu5WP6MZ9ID05kmR5E7Is=;
	b=Wnsk68yQwBJb4VUngIauS6niozEJ6EhQHTMqUkXWDMd2tnEcAPy1RgU/Qa1yQVINA2FyZ3
	FFkffxRStZQcA+xSF9K3RutX7ZHhODoOoUyPZY/UdB4Aw0STmUFSsxZhHF6aULKuJXB80H
	mpL8EQ/FaIcfMbeHgAbd+5Vj7v782+2XgMmYtq1/dbvOrtF/hVzJsk9CInSueb+xgtSPQ1
	8zzBk0VXGfkamjx0DGbgTi3ALKVUvnrICBd953rsx7nX413qlatnE2Lboj+e6t6Mp5ZAWX
	GXfCZ0fqr1BDa/ofH4NMm4C60kaBSIRT/JdKqmWCHjUb6qzunm6wK9fjRT/m4w==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX851ypzTHT
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:39:36 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 4457
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:39:36 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 1c503e031aa7 - stable/14 - contrib/kyua: update to 0.15.0
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 1c503e031aa7e468a127b0ad2adec8e2bc3b8f56
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:39:36 +0000
Message-Id: <6b039958.4457.6d1a1138@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=1c503e031aa7e468a127b0ad2adec8e2bc3b8f56

commit 1c503e031aa7e468a127b0ad2adec8e2bc3b8f56
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-10-07 17:50:26 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:36:15 +0000

    contrib/kyua: update to 0.15.0
    
    This new release contains multiple feature updates and bugfixes. Please
    see the release notes mentioned in the merge commit for more details.
    
    MFC after:      1 month
    Merge commit '144afd05f8a2300361ec30c1c2020e4022ddd943'
    
    Conflicts:
            contrib/kyua/cli/cmd_debug.cpp
            contrib/kyua/doc/kyua-debug.1.in
            contrib/kyua/doc/kyuafile.5.in
            contrib/kyua/engine/config.cpp
            contrib/kyua/engine/execenv/execenv.cpp
            contrib/kyua/engine/execenv/execenv.hpp
            contrib/kyua/engine/execenv/execenv_host.hpp
            contrib/kyua/engine/requirements.cpp
            contrib/kyua/engine/requirements.hpp
            contrib/kyua/engine/scheduler.cpp
            contrib/kyua/model/metadata.cpp
            contrib/kyua/os/freebsd/execenv_jail.hpp
            contrib/kyua/os/freebsd/execenv_jail_stub.cpp
            contrib/kyua/os/freebsd/main.cpp
            contrib/kyua/os/freebsd/reqs_checker_kmods.cpp
            contrib/kyua/os/freebsd/utils/jail.hpp
            contrib/kyua/utils/fs/directory.cpp
            contrib/kyua/utils/process/executor.cpp
    
    (cherry picked from commit eb8f69902f7de8012a31a85db2f88a54584f81af)
---
 contrib/kyua/.cirrus.yml                           |  25 -
 contrib/kyua/.gitignore                            |  23 -
 contrib/kyua/.travis.yml                           |  49 --
 contrib/kyua/Doxyfile.in                           |   1 -
 contrib/kyua/FREEBSD-Xlist                         |  12 +
 contrib/kyua/INSTALL.md                            | 268 ------
 contrib/kyua/Makefile.am                           | 186 ----
 contrib/kyua/{NEWS.md => NEWS}                     | 163 +++-
 contrib/kyua/README.md                             |  33 +-
 contrib/kyua/admin/.gitignore                      |   6 -
 contrib/kyua/admin/Makefile.am.inc                 |  41 -
 contrib/kyua/admin/build-bintray-dist.sh           | 131 ---
 contrib/kyua/admin/check-api-docs.awk              |  72 --
 contrib/kyua/admin/check-style-common.awk          |  79 --
 contrib/kyua/admin/check-style-cpp.awk             |  87 --
 contrib/kyua/admin/check-style-make.awk            |  71 --
 contrib/kyua/admin/check-style-man.awk             |  71 --
 contrib/kyua/admin/check-style-shell.awk           |  95 --
 contrib/kyua/admin/check-style.sh                  | 170 ----
 contrib/kyua/admin/clean-all.sh                    |  90 --
 contrib/kyua/admin/travis-build.sh                 |  98 ---
 contrib/kyua/admin/travis-install-deps.sh          |  83 --
 contrib/kyua/bootstrap/.gitignore                  |   4 -
 contrib/kyua/bootstrap/Kyuafile                    |   5 -
 contrib/kyua/bootstrap/Makefile.am.inc             |  90 --
 contrib/kyua/bootstrap/plain_helpers.cpp           | 141 ---
 contrib/kyua/bootstrap/testsuite.at                | 200 -----
 contrib/kyua/cli/Makefile.am.inc                   | 123 ---
 contrib/kyua/cli/cmd_debug.cpp                     |   7 +-
 contrib/kyua/cli/main.cpp                          |   4 +
 contrib/kyua/config.h                              | 139 +++
 contrib/kyua/configure.ac                          | 173 ----
 contrib/kyua/doc/.gitignore                        |  14 -
 contrib/kyua/doc/Makefile.am.inc                   | 152 ----
 contrib/kyua/doc/kyua-about.1.in                   |   2 +-
 contrib/kyua/doc/kyua-config.1.in                  |   2 +-
 contrib/kyua/doc/kyua-db-exec.1.in                 |   2 +-
 contrib/kyua/doc/kyua-db-migrate.1.in              |   2 +-
 contrib/kyua/doc/kyua-debug.1.in                   |   4 +-
 contrib/kyua/doc/kyua-help.1.in                    |   2 +-
 contrib/kyua/doc/kyua-list.1.in                    |   2 +-
 contrib/kyua/doc/kyua-report-html.1.in             |   2 +-
 contrib/kyua/doc/kyua-report-junit.1.in            |   2 +-
 contrib/kyua/doc/kyua-report.1.in                  |   2 +-
 contrib/kyua/doc/kyua-test.1.in                    |   2 +-
 contrib/kyua/doc/kyua.1.in                         |   6 +-
 contrib/kyua/doc/kyua.conf.5.in                    |   2 +-
 contrib/kyua/doc/kyuafile.5.in                     |  19 +-
 contrib/kyua/drivers/Makefile.am.inc               |  72 --
 contrib/kyua/engine/Kyuafile                       |   3 +
 contrib/kyua/engine/Makefile.am.inc                | 155 ----
 contrib/kyua/engine/atf.hpp                        |  21 +-
 contrib/kyua/engine/atf_result.cpp                 |  16 +-
 contrib/kyua/engine/atf_result_test.cpp            |   7 +-
 contrib/kyua/engine/atf_test.cpp                   |   2 +-
 contrib/kyua/engine/config.cpp                     |   4 +-
 contrib/kyua/engine/execenv/execenv.cpp            |   3 -
 contrib/kyua/engine/execenv/execenv.hpp            |   6 +-
 contrib/kyua/engine/execenv/execenv_fwd.hpp        |  44 +
 contrib/kyua/engine/execenv/execenv_host.hpp       |   2 +-
 contrib/kyua/engine/googletest.cpp                 | 219 +++++
 contrib/kyua/engine/googletest.hpp                 |  68 ++
 contrib/kyua/engine/googletest_helpers.cpp         | 330 +++++++
 contrib/kyua/engine/googletest_list.cpp            | 111 +++
 .../atf_helpers.cpp => engine/googletest_list.hpp} |  49 +-
 contrib/kyua/engine/googletest_list_test.cpp       | 208 +++++
 contrib/kyua/engine/googletest_result.cpp          | 528 ++++++++++++
 contrib/kyua/engine/googletest_result.hpp          | 111 +++
 contrib/kyua/engine/googletest_result_fwd.hpp      |  43 +
 contrib/kyua/engine/googletest_result_test.cpp     | 427 +++++++++
 contrib/kyua/engine/googletest_test.cpp            | 361 ++++++++
 contrib/kyua/engine/kyuafile.hpp                   |   5 -
 contrib/kyua/engine/kyuafile_test.cpp              |  10 +-
 contrib/kyua/engine/plain.hpp                      |  13 +-
 contrib/kyua/engine/requirements.cpp               |   4 +-
 contrib/kyua/engine/requirements.hpp               |   4 +-
 contrib/kyua/engine/scheduler.cpp                  |   4 +-
 contrib/kyua/engine/scheduler.hpp                  |  26 +-
 contrib/kyua/engine/scheduler_test.cpp             |  24 +-
 contrib/kyua/engine/tap.hpp                        |  13 +-
 contrib/kyua/examples/Makefile.am.inc              |  45 -
 contrib/kyua/integration/Makefile.am.inc           | 150 ----
 contrib/kyua/integration/cmd_about_test.sh         |   2 +-
 contrib/kyua/integration/cmd_report_test.sh        |   2 +-
 contrib/kyua/integration/cmd_test_test.sh          |   4 +-
 contrib/kyua/integration/helpers/.gitignore        |  11 -
 contrib/kyua/integration/helpers/Makefile.am.inc   |  90 --
 contrib/kyua/integration/utils.sh                  |  34 +-
 contrib/kyua/m4/ax_cxx_compile_stdcxx.m4           | 951 ---------------------
 contrib/kyua/m4/compiler-features.m4               | 122 ---
 contrib/kyua/m4/compiler-flags.m4                  | 169 ----
 contrib/kyua/m4/developer-mode.m4                  | 112 ---
 contrib/kyua/m4/doxygen.m4                         |  62 --
 contrib/kyua/m4/fs.m4                              | 125 ---
 contrib/kyua/m4/getopt.m4                          | 213 -----
 contrib/kyua/m4/memory.m4                          | 122 ---
 contrib/kyua/m4/signals.m4                         |  92 --
 contrib/kyua/m4/uname.m4                           |  63 --
 contrib/kyua/misc/Makefile.am.inc                  |  32 -
 contrib/kyua/model/Makefile.am.inc                 |  89 --
 contrib/kyua/model/README                          |  11 -
 contrib/kyua/model/metadata.cpp                    |  51 +-
 contrib/kyua/os/freebsd/execenv_jail.hpp           |   2 +-
 contrib/kyua/os/freebsd/execenv_jail_stub.cpp      |   2 +-
 contrib/kyua/os/freebsd/main.cpp                   |   8 -
 contrib/kyua/os/freebsd/reqs_checker_kmods.cpp     |   2 +-
 contrib/kyua/os/freebsd/utils/jail.hpp             |   7 +-
 contrib/kyua/store/Makefile.am.inc                 | 145 ----
 contrib/kyua/store/write_transaction_test.cpp      |   2 +-
 contrib/kyua/utils/.gitignore                      |   2 -
 contrib/kyua/utils/Makefile.am.inc                 | 133 ---
 contrib/kyua/utils/cmdline/Makefile.am.inc         |  96 ---
 contrib/kyua/utils/config/Makefile.am.inc          |  87 --
 contrib/kyua/utils/config/nodes.cpp                |  20 +-
 contrib/kyua/utils/config/nodes.hpp                |   2 +
 contrib/kyua/utils/config/nodes_test.cpp           |  15 +-
 contrib/kyua/utils/defs.hpp.in                     |  15 +-
 contrib/kyua/utils/format/Makefile.am.inc          |  59 --
 contrib/kyua/utils/fs/Makefile.am.inc              |  84 --
 contrib/kyua/utils/fs/directory.cpp                |  13 +-
 contrib/kyua/utils/fs/operations.cpp               | 120 +--
 contrib/kyua/utils/logging/Makefile.am.inc         |  53 --
 contrib/kyua/utils/process/.gitignore              |   1 -
 contrib/kyua/utils/process/Kyuafile                |   1 -
 contrib/kyua/utils/process/Makefile.am.inc         | 118 ---
 contrib/kyua/utils/process/child.hpp               |   4 +-
 contrib/kyua/utils/process/child_test.cpp          |   2 +-
 contrib/kyua/utils/process/executor.cpp            |   2 +
 contrib/kyua/utils/process/executor_pid_test.cpp   | 208 -----
 contrib/kyua/utils/process/executor_test.cpp       |  23 +-
 contrib/kyua/utils/process/isolation.cpp           |   2 +-
 contrib/kyua/utils/process/operations.cpp          |   3 +-
 contrib/kyua/utils/process/operations.hpp          |   6 +-
 contrib/kyua/utils/process/operations_test.cpp     |   4 +-
 contrib/kyua/utils/sanity.hpp                      |   4 +-
 contrib/kyua/utils/signals/Makefile.am.inc         |  73 --
 contrib/kyua/utils/signals/misc_test.cpp           |   2 +-
 contrib/kyua/utils/sqlite/Makefile.am.inc          |  82 --
 contrib/kyua/utils/sqlite/database.hpp             |   1 +
 contrib/kyua/utils/sqlite/test_utils.hpp           |   4 +-
 contrib/kyua/utils/stacktrace.cpp                  |   2 +-
 contrib/kyua/utils/stacktrace_test.cpp             |   9 +-
 contrib/kyua/utils/test_utils.ipp                  |   2 +-
 contrib/kyua/utils/text/Makefile.am.inc            |  74 --
 contrib/kyua/utils/text/operations.ipp             |   1 +
 contrib/kyua/utils/text/regex.cpp                  |   4 +-
 contrib/kyua/utils/text/regex.hpp                  |   1 +
 147 files changed, 3019 insertions(+), 6883 deletions(-)

diff --git a/contrib/kyua/.cirrus.yml b/contrib/kyua/.cirrus.yml
deleted file mode 100644
index 855693b34fa1..000000000000
--- a/contrib/kyua/.cirrus.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-env:
-  ARCH: amd64
-
-task:
-  matrix:
-    - name: 14.0-RELEASE
-      freebsd_instance:
-        image_family: freebsd-14-0
-    - name: 14.0-STABLE
-      freebsd_instance:
-        image_family: freebsd-14-0-snap
-    - name: 13.2-RELEASE
-      freebsd_instance:
-        image_family: freebsd-13-2
-    - name: 13.2-STABLE
-      freebsd_instance:
-        image_family: freebsd-13-2-snap
-  env:
-    DO: distcheck
-  install_script:
-    - sed -i.bak -e 's,pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly,pkg+http://pkg.FreeBSD.org/\${ABI}/latest,' /etc/pkg/FreeBSD.conf
-    - ASSUME_ALWAYS_YES=yes pkg bootstrap -f
-    - pkg install -y autoconf automake atf lutok pkgconf sqlite3
-  script:
-    - ./admin/travis-build.sh
diff --git a/contrib/kyua/.gitignore b/contrib/kyua/.gitignore
deleted file mode 100644
index d7f1a180d6fb..000000000000
--- a/contrib/kyua/.gitignore
+++ /dev/null
@@ -1,23 +0,0 @@
-*.a
-*.o
-*_helpers
-*_inttest
-*_test
-*~
-
-.deps
-.dirstamp
-Doxyfile
-Makefile
-Makefile.in
-aclocal.m4
-api-docs
-autom4te.cache
-config.h
-config.h.in
-config.log
-config.status
-configure
-kyua
-local-kyua
-stamp-h1
diff --git a/contrib/kyua/.travis.yml b/contrib/kyua/.travis.yml
deleted file mode 100644
index 619dceaf3d2d..000000000000
--- a/contrib/kyua/.travis.yml
+++ /dev/null
@@ -1,49 +0,0 @@
-language: cpp
-sudo: required
-
-before_install:
-    - ./admin/travis-install-deps.sh
-
-matrix:
-    include:
-        - os: linux
-          dist: xenial
-          compiler: clang
-          env: ARCH=amd64 DO=distcheck AS_ROOT=no
-        - os: linux
-          dist: xenial
-          compiler: gcc
-          env: ARCH=amd64 DO=distcheck AS_ROOT=no
-        - os: linux
-          dist: xenial
-          compiler: clang
-          env: ARCH=amd64 DO=apidocs
-        - os: linux
-          dist: xenial
-          compiler: clang
-          env: ARCH=amd64 DO=style
-        - os: linux
-          dist: xenial
-          compiler: clang
-          env: ARCH=amd64 DO=distcheck AS_ROOT=yes UNPRIVILEGED_USER=no
-        - os: linux
-          dist: xenial
-          compiler: clang
-          env: ARCH=amd64 DO=distcheck AS_ROOT=yes UNPRIVILEGED_USER=yes
-        # TODO(ngie): reenable i386; the libraries were not available in the
-        #             Ubuntu Xenial x86_64 docker image.
-        #- os: linux
-        #  dist: xenial
-        #  compiler: clang
-        #  env: ARCH=i386 DO=distcheck AS_ROOT=no
-        #- os: linux
-        #  dist: xenial
-        #  compiler: gcc
-        #  env: ARCH=i386 DO=distcheck AS_ROOT=no
-
-script:
-    - ./admin/travis-build.sh
-
-notifications:
-    email:
-        - kyua-log@googlegroups.com
diff --git a/contrib/kyua/Doxyfile.in b/contrib/kyua/Doxyfile.in
index e28d82f8999a..ac1dbf3398b6 100644
--- a/contrib/kyua/Doxyfile.in
+++ b/contrib/kyua/Doxyfile.in
@@ -45,7 +45,6 @@ JAVADOC_AUTOBRIEF = YES
 MACRO_EXPANSION = YES
 OUTPUT_DIRECTORY = @top_builddir@/api-docs
 OUTPUT_LANGUAGE = English
-PREDEFINED += "KYUA_DEFS_NORETURN="
 PREDEFINED += "KYUA_DEFS_FORMAT_PRINTF(x, y)="
 PROJECT_NAME = "@PACKAGE_NAME@"
 PROJECT_NUMBER = @VERSION@
diff --git a/contrib/kyua/FREEBSD-Xlist b/contrib/kyua/FREEBSD-Xlist
new file mode 100644
index 000000000000..06fef93a4024
--- /dev/null
+++ b/contrib/kyua/FREEBSD-Xlist
@@ -0,0 +1,12 @@
+*/*/Makefile*
+*/Makefile*
+*/*.m4
+*/*.pc.in
+INSTALL.md
+Makefile*
+aclocal.m4
+admin/
+config.h.in
+bootstrap/
+configure*
+m4/
diff --git a/contrib/kyua/INSTALL.md b/contrib/kyua/INSTALL.md
deleted file mode 100644
index d3dcab49cb74..000000000000
--- a/contrib/kyua/INSTALL.md
+++ /dev/null
@@ -1,268 +0,0 @@
-Installation instructions
-=========================
-
-Kyua uses the GNU Automake, GNU Autoconf and GNU Libtool utilities as
-its build system.  These are used only when compiling the application
-from the source code package.  If you want to install Kyua from a binary
-package, you do not need to read this document.
-
-For the impatient:
-
-    $ ./configure
-    $ make
-    $ make check
-    Gain root privileges
-    # make install
-    Drop root privileges
-    $ make installcheck
-
-Or alternatively, install as a regular user into your home directory:
-
-    $ ./configure --prefix ~/local
-    $ make
-    $ make check
-    $ make install
-    $ make installcheck
-
-
-Dependencies
-------------
-
-To build and use Kyua successfully you need:
-
-* A standards-compliant C and C++ complier.
-* Lutok 0.4.
-* pkg-config.
-* SQLite 3.6.22.
-
-To build the Kyua tests, you optionally need:
-
-* The Automated Testing Framework (ATF), version 0.15 or greater.  This
-  is required if you want to create a distribution file.
-
-If you are building Kyua from the code on the repository, you will also
-need the following tools:
-
-* GNU Autoconf.
-* GNU Automake.
-* GNU Libtool.
-
-
-Regenerating the build system
------------------------------
-
-This is not necessary if you are building from a formal release
-distribution file.
-
-On the other hand, if you are building Kyua from code extracted from the
-repository, you must first regenerate the files used by the build
-system.  You will also need to do this if you modify `configure.ac`,
-`Makefile.am` or any of the other build system files.  To do this, simply
-run:
-
-    $ autoreconf -i -s
-
-If ATF is installed in a different prefix than Autoconf, you will also
-need to tell autoreconf where the ATF M4 macros are located.  Otherwise,
-the configure script will be incomplete and will show confusing syntax
-errors mentioning, for example, `ATF_CHECK_SH`.  To fix this, you have
-to run autoreconf in the following manner, replacing `<atf-prefix>` with
-the appropriate path:
-
-    $ autoreconf -i -s -I <atf-prefix>/share/aclocal
-
-
-General build procedure
------------------------
-
-To build and install the source package, you must follow these steps:
-
-1. Configure the sources to adapt to your operating system.  This is
-   done using the `configure` script located on the sources' top
-   directory, and it is usually invoked without arguments unless you
-   want to change the installation prefix.  More details on this
-   procedure are given on a later section.
-
-2. Build the sources to generate the binaries and scripts.  Simply run
-   `make` on the sources' top directory after configuring them.  No
-   problems should arise.
-
-3. Check that the built programs work by running `make check`.  You do
-   not need to be root to do this, but if you are not, some checks will
-   be skipped.
-
-4. Install the program by running `make install`.  You may need to
-   become root to issue this step.
-
-5. Issue any manual installation steps that may be required.  These are
-   described later in their own section.
-
-6. Check that the installed programs work by running `make
-   installcheck`.  You do not need to be root to do this, but if you are
-   not, some checks will be skipped.
-
-
-Configuration flags
--------------------
-
-The most common, standard flags given to `configure` are:
-
-* `--prefix=directory`:
-  **Possible values:** Any path.
-  **Default:** `/usr/local`.
-
-  Specifies where the program (binaries and all associated files) will
-  be installed.
-
-* `--sysconfdir=directory`:
-  **Possible values:** Any path.
-  **Default:** `/usr/local/etc`.
-
-  Specifies where the installed programs will look for configuration
-  files.  `/kyua` will be appended to the given path unless
-  `KYUA_CONFSUBDIR` is redefined as explained later on.
-
-* `--help`:
-
-  Shows information about all available flags and exits immediately,
-  without running any configuration tasks.
-
-The following environment variables are specific to Kyua's `configure`
-script:
-
-* `GDB`:
-  **Possible values:** empty, absolute path to GNU GDB.
-  **Default:** empty.
-
-  Specifies the path to the GNU GDB binary that Kyua will use to gather a
-  stack trace of a crashing test program.  If empty, the configure script
-  will try to find a suitable binary for you and, if not found, Kyua will
-  attempt to do the search at run time.
-
-* `KYUA_ARCHITECTURE`:
-  **Possible values:** name of a CPU architecture (e.g. `x86_64`, `powerpc`).
-  **Default:** autodetected; typically the output of `uname -p`.
-
-  Specifies the name of the CPU architecture on which Kyua will run.
-  This value is used at run-time to determine tests that are not
-  applicable to the host system.
-
-* `KYUA_CONFSUBDIR`:
-  **Possible values:** empty, a relative path.
-  **Default:** `kyua`.
-
-  Specifies the subdirectory of the configuration directory (given by
-  the `--sysconfdir` argument) under which Kyua will search for its
-  configuration files.
-
-* `KYUA_CONFIG_FILE_FOR_CHECK`:
-  **Possible values:** none, an absolute path to an existing file.
-  **Default:** none.
-
-  Specifies the `kyua.conf` configuration file to use when running any
-  of the `check`, `installcheck` or `distcheck` targets on this source
-  tree.  This setting is exclusively used to customize the test runs of
-  Kyua itself and has no effect whatsoever on the built product.
-
-* `KYUA_MACHINE`:
-  **Possible values:** name of a machine type (e.g. `amd64`, `macppc`).
-  **Default:** autodetected; typically the output of `uname -m`.
-
-  Specifies the name of the machine type on which Kyua will run.  This
-  value is used at run-time to determine tests that are not applicable
-  to the host system.
-
-* `KYUA_TMPDIR`:
-  **Possible values:** an absolute path to a temporary directory.
-  **Default:** `/tmp`.
-
-  Specifies the path that Kyua will use to create temporary directories
-  in by default.
-
-The following flags are specific to Kyua's `configure` script:
-
-* `--enable-developer`:
-  **Possible values:** `yes`, `no`.
-  **Default:** `yes` in Git `HEAD` builds; `no` in formal releases.
-
-  Enables several features useful for development, such as the inclusion
-  of debugging symbols in all objects or the enforcement of compilation
-  warnings.
-
-  The compiler will be executed with an exhaustive collection of warning
-  detection features regardless of the value of this flag.  However, such
-  warnings are only fatal when `--enable-developer` is `yes`.
-
-* `--with-atf`:
-  **Possible values:** `yes`, `no`, `auto`.
-  **Default:** `auto`.
-
-  Enables usage of ATF to build (and later install) the tests.
-
-  Setting this to `yes` causes the configure script to look for ATF
-  unconditionally and abort if not found.  Setting this to `auto` lets
-  configure perform the best decision based on availability of ATF.
-  Setting this to `no` explicitly disables ATF usage.
-
-  When support for tests is enabled, the build process will generate the
-  test programs and will later install them into the tests tree.
-  Running `make check` or `make installcheck` from within the source
-  directory will cause these tests to be run with Kyua.
-
-* `--with-doxygen`:
-  **Possible values:** `yes`, `no`, `auto` or a path.
-  **Default:** `auto`.
-
-  Enables usage of Doxygen to generate documentation for internal APIs.
-  This documentation is *not* installed and is only provided to help the
-  developer of this package.  Therefore, enabling or disabling Doxygen
-  causes absolutely no differences on the files installed by this
-  package.
-
-  Setting this to `yes` causes the configure script to look for Doxygen
-  unconditionally and abort if not found.  Setting this to `auto` lets
-  configure perform the best decision based on availability of Doxygen.
-  Setting this to `no` explicitly disables Doxygen usage.  And, lastly,
-  setting this to a path forces configure to use a specific Doxygen
-  binary, which must exist.
-
-
-Post-installation steps
------------------------
-
-Copy the `Kyuafile.top` file installed in the examples directory to the
-root of your tests hierarchy and name it `Kyuafile`.  For example:
-
-    # cp /usr/local/share/kyua/examples/Kyuafile.top \
-         /usr/local/tests/Kyuafile
-
-This will allow you to simply go into `/usr/tests` and run the tests
-from there.
-
-
-Run the tests!
---------------
-
-Lastly, after a successful installation, you should periodically run the
-tests from the final location to ensure things remain stable.  Do so as
-follows:
-
-    $ cd /usr/local/kyua && kyua test
-
-The following configuration variables are specific to the 'kyua' test
-suite and can be given to Kyua with arguments of the form
-`-v test_suites.kyua.<variable_name>=<value>`:
-
-* `run_coredump_tests`:
-  **Possible values:** `true` or `false`.
-  **Default:** `true`.
-
-  Avoids running tests that crash subprocesses on purpose to make them
-  dump core.  Such tests are particularly slow on macOS, and it is
-  sometimes handy to disable them for quicker development iteration.
-
-If you see any tests fail, do not hesitate to report them in:
-
-    https://github.com/jmmv/kyua/issues/
-
-Thank you!
diff --git a/contrib/kyua/Makefile.am b/contrib/kyua/Makefile.am
deleted file mode 100644
index d7f3cd27e73b..000000000000
--- a/contrib/kyua/Makefile.am
+++ /dev/null
@@ -1,186 +0,0 @@
-# Copyright 2010 The Kyua Authors.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# * 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.
-# * Neither the name of Google Inc. nor the names of its contributors
-#   may be used to endorse or promote products derived from this software
-#   without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER 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.
-
-ACLOCAL_AMFLAGS = -I m4
-
-CHECK_BOOTSTRAP_DEPS =
-CHECK_KYUA_DEPS =
-CHECK_LOCAL =
-CLEAN_TARGETS =
-DIST_HOOKS =
-PHONY_TARGETS =
-CLEANFILES =
-
-EXTRA_DIST =
-noinst_DATA =
-noinst_LIBRARIES =
-noinst_SCRIPTS =
-
-doc_DATA = AUTHORS CONTRIBUTING.md CONTRIBUTORS LICENSE NEWS.md
-noinst_DATA += INSTALL.md README.md
-EXTRA_DIST += $(doc_DATA) INSTALL.md README.md
-
-if WITH_ATF
-tests_topdir = $(pkgtestsdir)
-
-tests_top_DATA = Kyuafile
-EXTRA_DIST += $(tests_top_DATA)
-endif
-
-include admin/Makefile.am.inc
-include bootstrap/Makefile.am.inc
-include cli/Makefile.am.inc
-include doc/Makefile.am.inc
-include drivers/Makefile.am.inc
-include engine/Makefile.am.inc
-include examples/Makefile.am.inc
-include integration/Makefile.am.inc
-include misc/Makefile.am.inc
-include model/Makefile.am.inc
-include store/Makefile.am.inc
-include utils/Makefile.am.inc
-
-bin_PROGRAMS = kyua
-kyua_SOURCES = main.cpp
-kyua_CXXFLAGS = $(CLI_CFLAGS) $(ENGINE_CFLAGS) $(UTILS_CFLAGS)
-kyua_LDADD = $(CLI_LIBS) $(ENGINE_LIBS) $(UTILS_LIBS)
-
-CHECK_ENVIRONMENT = KYUA_CONFDIR="/non-existent" \
-                    KYUA_DOCDIR="$(abs_top_srcdir)" \
-                    KYUA_EXAMPLESDIR="$(abs_top_srcdir)/examples" \
-                    KYUA_MISCDIR="$(abs_top_srcdir)/misc" \
-                    KYUA_STOREDIR="$(abs_top_srcdir)/store" \
-                    KYUA_STORETESTDATADIR="$(abs_top_srcdir)/store" \
-                    PATH="$(abs_top_builddir):$${PATH}"
-INSTALLCHECK_ENVIRONMENT = KYUA_CONFDIR="/non-existent" \
-                           PATH="$(prefix)/bin:$${PATH}"
-
-# Generate local-kyua, a wrapper shell script to run the just-built 'kyua'
-# binary by pointing it to the possibly not-yet-installed data files in the
-# build tree.
-noinst_SCRIPTS += local-kyua
-CLEANFILES += local-kyua local-kyua.tmp
-local-kyua: Makefile
-	$(AM_V_GEN)echo '#!/bin/sh' >local-kyua.tmp; \
-	echo 'env $(CHECK_ENVIRONMENT) $(TESTS_ENVIRONMENT)' \
-	    '"$(abs_top_builddir)/kyua" \
-	    --config='$(KYUA_CONFIG_FILE_FOR_CHECK)' \
-	    "$${@}"' >>local-kyua.tmp; \
-	chmod +x local-kyua.tmp; \
-	mv -f local-kyua.tmp local-kyua
-
-if WITH_ATF
-CHECK_LOCAL += dump-ulimits check-kyua
-PHONY_TARGETS += check-kyua
-check-kyua: $(CHECK_KYUA_DEPS)
-	@failed=no; \
-	./local-kyua test \
-	    --kyuafile='$(top_srcdir)/Kyuafile' --build-root='$(top_builddir)' \
-	    || failed=yes; \
-	if [ "$${failed}" = yes ]; then \
-	    ./local-kyua report --results-file='$(abs_top_srcdir)' \
-	        --verbose --results-filter=broken,failed; \
-	    exit 1; \
-	fi
-
-installcheck-local: dump-ulimits installcheck-kyua
-PHONY_TARGETS += installcheck-kyua
-installcheck-kyua:
-	@failed=no; \
-	cd $(pkgtestsdir) && $(INSTALLCHECK_ENVIRONMENT) $(TESTS_ENVIRONMENT) \
-	    kyua --config='$(KYUA_CONFIG_FILE_FOR_CHECK)' test \
-	    || failed=yes; \
-	if [ "$${failed}" = yes ]; then \
-	    cd $(pkgtestsdir) && $(INSTALLCHECK_ENVIRONMENT) \
-	        $(TESTS_ENVIRONMENT) \
-	        kyua --config='$(KYUA_CONFIG_FILE_FOR_CHECK)' report \
-	        --verbose --results-filter=broken,failed; \
-	    exit 1; \
-	fi
-
-# TODO(jmmv): kyua should probably be recording this information itself as part
-# of the execution context, just as we record environment variables.
-PHONY_TARGETS += dump-ulimits
-dump-ulimits:
-	@echo "Resource limits:"
-	@{ \
-	    ulimit -a | sed -e 's,$$, (soft),'; \
-	    ulimit -a -H | sed -e 's,$$, (hard),'; \
-	} | sort | sed -e 's,^,    ,'
-	@echo
-else
-DIST_HOOKS += forbid-dist
-PHONY_TARGETS += forbid-dist
-forbid-dist:
-	@echo "Sorry; cannot make dist without atf."
-	@false
-endif
-check-local: $(CHECK_LOCAL)
-
-if WITH_DOXYGEN
-# Runs doxygen on the source tree and validates the contents of the docstrings.
-# We do not do this by default, even if doxygen has been enabled, because this
-# step takes a long time.  Instead, we just rely on a Travis CI build to catch
-# inconsistencies.
-PHONY_TARGETS += check-api-docs
-check-api-docs: api-docs/api-docs.tag
-	@$(AWK) -f $(srcdir)/admin/check-api-docs.awk api-docs/doxygen.out
-
-api-docs/api-docs.tag: $(builddir)/Doxyfile $(SOURCES)
-	@$(MKDIR_P) api-docs
-	@rm -f api-docs/doxygen.out api-docs/doxygen.out.tmp
-	$(AM_V_GEN)$(DOXYGEN) $(builddir)/Doxyfile \
-	    >api-docs/doxygen.out.tmp 2>&1 && \
-	    mv api-docs/doxygen.out.tmp api-docs/doxygen.out
-
-CLEAN_TARGETS += clean-api-docs
-clean-api-docs:
-	rm -rf api-docs
-endif
-
-# Replace Automake's builtin check-news functionality so that we can validate
-# the NEWS.md file instead of NEWS.
-DIST_HOOKS += check-news
-PHONY_TARGETS += check-news
-check-news:
-	@case "$$(sed 15q "$(srcdir)/NEWS.md")" in \
-	*"$(VERSION)"*) : ;; \
-	*) \
-	    echo "NEWS.md not updated; not releasing" 1>&2; \
-	    exit 1 \
-	    ;; \
-	esac
-
-clean-local: $(CLEAN_TARGETS)
-dist-hook: $(DIST_HOOKS)
-
-PHONY_TARGETS += clean-all
-clean-all:
-	GIT="$(GIT)" $(SH) $(srcdir)/admin/clean-all.sh
-
-.PHONY: $(PHONY_TARGETS)
diff --git a/contrib/kyua/NEWS.md b/contrib/kyua/NEWS
similarity index 85%
rename from contrib/kyua/NEWS.md
rename to contrib/kyua/NEWS
index 304cfe94695a..c794e6e60092 100644
--- a/contrib/kyua/NEWS.md
+++ b/contrib/kyua/NEWS
@@ -1,17 +1,119 @@
-Major changes between releases
-==============================
+# Major changes between releases
 
+## Changes in version 0.15.0
 
-Changes in version 0.14
------------------------
+**Released on 2026/10/07.**
 
-**NOT RELEASED YET; STILL UNDER DEVELOPMENT.**
+### Bugfixes
 
-* Explicitly require C++11 language features when compiling Kyua.
+* #265: Null cleanups
+* #271: kyua: Try harder to delete directories.
+* #300: Implement utils::config::positive_int_node::deep_copy
 
+### Developer Workflow Changes
 
-Changes in version 0.13
------------------------
+* #254: Add initial GitHub Actions support for kyua
+* #288: [CI] remove legacy CI scripts and files
+* #291: Remove Travis CI config
+* #298: Add sanitizers and code coverage support
+* #301: Add FreeBSD CI support via vmactions
+* #305: Automate uploading release assets
+
+### Feature Enhancements
+
+* #203: Add GoogleTest support
+* #230: Do not count skipped as passed in test cmd
+* #260: Support require.diskspace ATF metadata
+* #261: Pass unprivileged user config prop to ATF using all known names
+* #266: Add "kyua debug -p" option
+* #270: Add required_kmods metadata
+* #272: Make "test" command actually report about workdir cleanup issues
+* #273: Make "debug -p" skip writing stdout/stderr to tmp files
+* #277: kyua-debug: Add -P option
+* #290: Require C++-20 in order to build kyua
+* #307: Upstream multiple items from FreeBSD
+
+### Documentation
+
+* #258: kyuafile.5: Add ATF metadata mapping reference
+* #275: kyua manuals: Correct --results-file short form
+* #279: docs: Standardize document description tone
+
+### Miscellaneous
+
+* #264: Switch from std::auto_ptr<> to std::unique_ptr<>
+* #269: Fix cmd_about_test:topic__version test case
+* #297: Reduce overall lutok dependency
+* #312: Replace KYUA_ATTRIBUTE_{NORETURN,UNUSED}} with C++ attributes
+* #318: utils::fs: remove umount(8) support
+
+**Full Changelog**: https://github.com/freebsd/lutok/compare/kyua-0.14.1...kyua-0.15.0
+
+## Changes in version 0.14.1
+
+**Released on March 29th, 2025.**
+
+* Issue #263: fix release tarball by relying on `make dist`.
+
+* Document ATF to Kyua mappings for metadata properties.
+
+* Support `require.diskspace` ATF metadata property.
+
+* Support backwards compatible `unprivileged_user` metadata property for ease
+  of use dealing with ATF vs Kyua.
+
+* Fix building from source by tracking `utils/process/Kyuafile.in` and
+  `engine/execenv/execenv_fwd.hpp` with automake.
+
+## Changes in version 0.14
+
+**Released on December 31st, 2024.**
+
+* Replace `--with-atf` with `--enable-atf`. The latter must be specified
+  to enable ATF support and the Kyua tests by proxy.
+
+* Require newer versions of ATF (0.21) and Lutok (0.5). This is being done
+  as part of a multi-phase deprecation of pre-C++11 environments.
+
+* Vendor the ATF m4 files from the freebsd/atf repo.
+
+* Translate `is_exclusive` metadata to its ATF counterpart.
+
+* Issue #236: fix accidental test forkbomb in specific user environments
+  with `integration` tests by avoiding infinite recursion calling kyua.
+
+* Fix the build on Ubuntu 24.04.
+
+- execenv support added. This FreeBSD-specific feature allows tests to be
+  executed in jails.
+
+* Issue #169: Remove deprecated `readdir_r` use.
+
+* Fix build issue on more recent versions of MacOS.
+
+* Fix build issue on IllumOS.
+
+* Fix issues with PID reuse in testcases.
+
+* Escape characters captured from stderr and stdout in HTML output.
+
+* `integration/cmd_report_test:verbose`: fix regular expression used in
+  tests which would break in certain user environments.
+
+* Add Cirrus CI support for testing Kyua on FreeBSD.
+
+* Remove `UTILS_UNUSED_PARAM` macro.
+
+* Fix document rendering with newer versions of doxygen.
+
+* Issue #152: explicitly require C++11 language features when compiling Kyua.
+  Remove `std::shared_ptr` compatibility header, `utils/shared_ptr.hpp`.
+
+* Fix `igor` and `mandoc -Tlint` reported issues with generated manpages.
+
+* Issue #167: fix typos in kyua(1) manpage.
+
+## Changes in version 0.13
 
 **Released on August 26th, 2016.**
 
@@ -36,8 +138,7 @@ Changes in version 0.13
   timers to control test deadlines.
 
 
-Changes in version 0.12
------------------------
+## Changes in version 0.12
 
 **Released on November 22nd, 2015.**
 
@@ -129,8 +230,7 @@ parallelization possibilities.
   Markdown for better formatting online.
 
 
-Changes in version 0.11
------------------------
+## Changes in version 0.11
 
 **Released on October 23rd, 2014.**
 
@@ -211,8 +311,7 @@ Changes in version 0.11
   examples.
 
 
-Changes in version 0.10
------------------------
+## Changes in version 0.10
 
 **Experimental version released on August 14th, 2014.**
 
@@ -232,8 +331,7 @@ Changes in version 0.10
   prevent triggering a core dump that made the test fail in some platforms.
 
 
-Changes in kyua-cli version 0.9
--------------------------------
+## Changes in kyua-cli version 0.9
 
 **Experimental version released on August 8th, 2014.**
 
@@ -276,8 +374,7 @@ Changes in more detail:
   files.
 
 
-Changes in kyua-testers version 0.3
------------------------------------
+## Changes in kyua-testers version 0.3
 
 **Experimental version released on August 8th, 2014.**
 
@@ -293,8 +390,7 @@ Changes in kyua-testers version 0.3
   handle test programs that report a pass but exit with a non-zero code.
*** 10994 LINES SKIPPED ***

From nobody Mon Nov 23 01:39:37 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXpXB1fHfz71c4c
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:39: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpX95khlz4m4X
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:39:37 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795397977;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=JxSq8WbCqT5eMhMmisyTP45Z65L5RD9reffby7bAp7M=;
	b=fKEf1P/8JmTxBVdVPTmw6kCKb9cd4biRCVyXy+itlC3vUHTVxplHFAO2AdCuevF7pSbdj5
	4zlY0jcs9czxy0tZ1jplbOCvC6x5gzqpsflt7cD8OiIsVtgAjPndYUHgoCECrRcHM9KMrb
	itnriijB8QbtoFQDjGW0vX5M/+YrFYPqZnpfZOTwQa9IK6bbRr6M4fk4LseeEC/4Kzmw4C
	LoBJOm3Zmpr/TpUeXAtCGd/zFUNXvqE/F98Wl8drtqUl9rXLMpbFsXNrD6HgiD98gLXggU
	rdkR6puJjLxlNyAhWstCTpFEFk5zKYJd9OX3Jgp+E7M3G6LWXH3G1kcmpFK5VQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397977;
	b=vacsgL14qcSn+RiFHvFtKRzYHGz5whR7nRQ1hgFtNbtFx7FVPZ+VtzF3DgwVwn/PbZm1X2
	oHU+pZVNizbDg/nBQHUHL/Q79+UXYPcnenMFdmMqC8f4yF4eaTc40Es7ATK3FhW3+wzvm8
	dP6m6a+LfdhbSzLeCR1BSVBlle4Zz0ZIqqcjj/EWZMSmuXbcVoG7qd5YyHOAvgO+Lb1dUt
	H2PypxRIWysNs+gwh35q+UhcH7hs0iNSxadZixW+2p/btzkbVYMe7cG7qE7AM3iKde0DF2
	Onqh/9HunusTnlYyjyUBF/e1v1E5gPhtIVdMqcqCmEIrQs2POyuBM+Qa1eCGrA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795397977;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=JxSq8WbCqT5eMhMmisyTP45Z65L5RD9reffby7bAp7M=;
	b=N/wCDjK4/C65ZSEs6+jdkxzdjwXi6SG5MtIgGHMeinAN06OTFgMVt3fZB12IScbxE+if01
	sgEOy799p3346GuugGUcwoeTR/QapbhS4rosp5o1dZOTv55i0d9PIBLaInub0N5Nwg0Q/T
	BGs4KwThL1REU6QYkIteBFsUmmi+Mlziyvsgd07N4s36RR+vbxVQgMAL+mTw64Bt5kOxlQ
	GnMnG2+7ySZxRZBfOBfZz070t23LHjYDBV4NlfMWY/GlsgHXScBUbP8TWWISbo6lzJsOdo
	mZv5DmmXxwsOqxcoH10MaH91bp8SYpgNTF+IA9Z1yrtfwbqfuzsqAQFTJUXUzw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpX95P2BzTDT
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:39:37 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 40e4
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:39:37 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 540eaf68d99e - stable/14 - contrib/kyua: commit Makefile changes for version update
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 540eaf68d99ec1833a5d94748b60abcec890a8e4
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:39:37 +0000
Message-Id: <6b039959.40e4.6ad20095@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=540eaf68d99ec1833a5d94748b60abcec890a8e4

commit 540eaf68d99ec1833a5d94748b60abcec890a8e4
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-10-07 17:55:21 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:36:15 +0000

    contrib/kyua: commit Makefile changes for version update
    
    This was accidentally missed in the version update.
    
    MFC after:      1 month
    Fixes: eb8f69902 ("contrib/kyua: update to 0.15.0")
    
    (cherry picked from commit b836604e126d5b3d0d3dee5da6c4168d3ec43fea)
---
 usr.bin/kyua/Makefile | 25 ++++---------------------
 1 file changed, 4 insertions(+), 21 deletions(-)

diff --git a/usr.bin/kyua/Makefile b/usr.bin/kyua/Makefile
index 593eaee9d378..3a126640c84e 100644
--- a/usr.bin/kyua/Makefile
+++ b/usr.bin/kyua/Makefile
@@ -6,7 +6,6 @@ KYUA_DOCDIR=	/usr/share/doc/kyua
 KYUA_EGDIR=	/usr/share/examples/kyua
 KYUA_MISCDIR=	/usr/share/kyua/misc
 KYUA_STOREDIR=	/usr/share/kyua/store
-KYUA_VERSION=	0.13
 
 KYUA_SRCDIR=	${SRCTOP}/contrib/kyua
 .PATH: ${KYUA_SRCDIR}
@@ -16,6 +15,7 @@ PROG_CXX=	kyua
 SRCS=		main.cpp
 LIBADD=		lutok sqlite3 util
 
+.PATH: ${KYUA_SRCDIR}/doc
 MAN=		kyua-about.1 \
 		kyua-config.1 \
 		kyua-db-exec.1 \
@@ -45,10 +45,6 @@ CFLAGS+=	-DGDB=\"/usr/local/bin/gdb\"			\
 		-DKYUA_MISCDIR=\"${KYUA_MISCDIR}\"		\
 		-DKYUA_PLATFORM=\"${MACHINE}\"			\
 		-DKYUA_STOREDIR=\"${KYUA_STOREDIR}\"		\
-		-DPACKAGE=\"kyua\"				\
-		-DPACKAGE_NAME=\"Kyua\"				\
-		-DPACKAGE_VERSION=\"${KYUA_VERSION}\"		\
-		-DVERSION=\"${KYUA_VERSION}\"
 
 SRCS+=	utils/datetime.cpp			\
 	utils/env.cpp				\
@@ -119,6 +115,9 @@ SRCS+=	engine/atf.cpp			\
 	engine/config.cpp		\
 	engine/exceptions.cpp		\
 	engine/filters.cpp		\
+	engine/googletest.cpp		\
+	engine/googletest_list.cpp	\
+	engine/googletest_result.cpp	\
 	engine/kyuafile.cpp		\
 	engine/plain.cpp		\
 	engine/requirements.cpp		\
@@ -208,20 +207,4 @@ STOREDIR=	${KYUA_STOREDIR}
 STORETAGS=	package=tests
 .PATH:		${KYUA_SRCDIR}/store
 
-CLEANFILES+=	${MAN}
-.PATH: ${KYUA_SRCDIR}/doc
-.for man in ${MAN}
-${man}: ${man}.in
-	sh ${KYUA_SRCDIR}/doc/manbuild.sh \
-	    -v "CONFDIR=${KYUA_CONFDIR}" \
-	    -v "DOCDIR=${KYUA_DOCDIR}" \
-	    -v "EGDIR=${KYUA_EGDIR}" \
-	    -v "MISCDIR=${KYUA_MISCDIR}" \
-	    -v "PACKAGE=kyua" \
-	    -v "STOREDIR=${KYUA_STOREDIR}" \
-	    -v "TESTSDIR=${TESTSBASE}" \
-	    -v "VERSION=${KYUA_VERSION}" \
-	    ${.ALLSRC} ${.TARGET}
-.endfor
-
 .include <bsd.prog.mk>

From nobody Mon Nov 23 01:39:38 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXpXC2Bg3z71byq
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:39: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpXB6JMqz4mBT
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:39:38 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795397978;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=BwxWoo6jEEgLP/YHGohWN7y5ShTKW7gjsxCQ5/6xpQw=;
	b=mTyd69x0RvYOQd5C5pHU8WJOCy/fjvyhZry0D/QinfxAndbVjPDf7WQIytxDpZORkv1LgA
	sA0815h3ryGueJiBr47mPUIESDY/b4OfecIQf7HbgLnqL9xwypJ3BEQ2gsImb8FLbT6dUF
	Dj2k/VSKbdsMAmZvRFHUYU3BnPr2LAdnvnIv6zLD/3kppcEu7rm2csvfOUbcUJcEpDtwEr
	cQEVLbFD9UqMN8ul4wtJEBxqeLGVntLqcXca0NBPCoVMdr0mh0sOb031Hx74VKb7KWCy5u
	vGGZCz0xAjlwjwXeOaRzb0kW40tgSdb0M2NrktNwpMydWDpIALiqUCEYM2JIvw==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397978;
	b=bC6W3DnF2HhD65SFtLq70cTFm7K8jIyWTZXbJHr80RGk74IJIJSmqVb4fH4LyHrzL9B5zA
	M+UKd0jtGrw0s3Mqlo95CQUSu3FYYzEmBOq9zMg6jS5hLZrvVawKq0kXocOmFCLYoJzUza
	4PO9rl8ji9ls0Xhvl99DsSy2BnXbbZ6E/NPfTwNkdHj9F2FcI+WboKT2PuIz5diJKhOrBP
	RGXzzX5yLANAkUDs5P4dVMeTnCX893K0r/hCxnqggMe5NPDm89vmTojnXkEDz6X3mpKORb
	hTUJwO70hM7w8YTTtDiU/NyBk1p13Txjw51Wjj4p9yWD/KzLGcqbyrzyoXWjkQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795397978;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=BwxWoo6jEEgLP/YHGohWN7y5ShTKW7gjsxCQ5/6xpQw=;
	b=A4OsYRBgfFpnlS6ShYiUoojIS0pOgwFxCw7ONoB0669jlJR26Hpbvi5SIJRWG5dRtm8Rah
	AiidxjoGVndkYX8vw5Ai8qFR8T/PA/2VW6sdOQBlxZFlmnaK4zuGk/k9HJKJ3wxPRcdE4x
	xPyIGC0IoUL3/rUDe9hEs3kdyZdWeDibUcq9leZ81uPm/lESATPimQRCQZbvQVFTxo9FdU
	vGeKEPIMByVx5bNtmtJ+CW07MkFywFbHghqxLG5bubU/KNTr3L3AlHfkFzd+4DAoewLDoR
	uM7WpLlC4aWJT8/nCpf5hd1mz79hnpTRIte2EGOefT/y+KeG2H8O/rzj+BFoDQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpXB5zK4zTFG
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:39:38 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 489e
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:39:38 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 62b649e7dca2 - stable/14 - contrib/kyua: commit generated files
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 62b649e7dca2f43ebe6902bdee6987f0a8cd58c8
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:39:38 +0000
Message-Id: <6b03995a.489e.1122738d@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=62b649e7dca2f43ebe6902bdee6987f0a8cd58c8

commit 62b649e7dca2f43ebe6902bdee6987f0a8cd58c8
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-10-07 18:04:21 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:36:15 +0000

    contrib/kyua: commit generated files
    
    MFC after:      1 month
    Fixes: eb8f69902 ("contrib/kyua: update to 0.15.0")
    
    (cherry picked from commit 26eb328b52c3ec0ff79c8914b1993dfad03a0a7d)
---
 contrib/kyua/doc/kyua-about.1        |  95 ++++++
 contrib/kyua/doc/kyua-config.1       |  59 ++++
 contrib/kyua/doc/kyua-db-exec.1      | 199 ++++++++++++
 contrib/kyua/doc/kyua-db-migrate.1   | 182 +++++++++++
 contrib/kyua/doc/kyua-debug.1        | 417 +++++++++++++++++++++++++
 contrib/kyua/doc/kyua-help.1         |  64 ++++
 contrib/kyua/doc/kyua-list.1         | 232 ++++++++++++++
 contrib/kyua/doc/kyua-report-html.1  | 253 +++++++++++++++
 contrib/kyua/doc/kyua-report-junit.1 | 237 +++++++++++++++
 contrib/kyua/doc/kyua-report.1       | 307 +++++++++++++++++++
 contrib/kyua/doc/kyua-test.1         | 498 ++++++++++++++++++++++++++++++
 contrib/kyua/doc/kyua.1              | 405 ++++++++++++++++++++++++
 contrib/kyua/doc/kyua.conf.5         | 150 +++++++++
 contrib/kyua/doc/kyuafile.5          | 574 +++++++++++++++++++++++++++++++++++
 14 files changed, 3672 insertions(+)

diff --git a/contrib/kyua/doc/kyua-about.1 b/contrib/kyua/doc/kyua-about.1
new file mode 100644
index 000000000000..ba3041f14447
--- /dev/null
+++ b/contrib/kyua/doc/kyua-about.1
@@ -0,0 +1,95 @@
+.\" Copyright 2012 The Kyua Authors.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are
+.\" met:
+.\"
+.\" * Redistributions of source code must retain the above copyright
+.\"   notice, this list of conditions and the following disclaimer.
+.\" * 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.
+.\" * Neither the name of Google Inc. nor the names of its contributors
+.\"   may be used to endorse or promote products derived from this software
+.\"   without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" OWNER 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.
+.Dd May 20, 2015
+.Dt KYUA-ABOUT 1
+.Os
+.Sh NAME
+.Nm "kyua about"
+.Nd show detailed authors, license, and version information
+.Sh SYNOPSIS
+.Nm
+.Op Ar authors | license | version
+.Sh DESCRIPTION
+The
+.Sq about
+command provides generic information about the
+.Xr kyua 1
+tool.
+In the default synopsis form (no arguments), the information printed
+includes:
+.Bl -enum
+.It
+The name of the package, which is
+.Sq kyua .
+.It
+The version number, which is
+.Sq 0.15.0 .
+.It
+License information.
+.It
+Authors information.
+.It
+A link to the project web site.
+.El
+.Pp
+You can customize the information printed by this command by specifying
+the desired topic as the single argument to the command.
+This can be one of:
+.Bl -tag -width authorsXX
+.It Ar authors
+Displays the list of authors and contributors only.
+.It Ar license
+Displays the license information and the list of copyrights.
+.It Ar version
+Displays the package name and the version number in a format that is
+compatible with the output of GNU tools that support a
+.Fl -version
+flag.
+Use this whenever you have to query the version number of the package.
+.El
+.Sh FILES
+The following files are read by the
+.Nm
+command:
+.Bl -tag -width XX
+.It Pa /usr/share/doc/kyua/AUTHORS
+List of authors (aka copyright holders).
+.It Pa /usr/share/doc/kyua/CONTRIBUTORS
+List of contributors (aka individuals that have contributed to the project).
+.It Pa /usr/share/doc/kyua/LICENSE
+License information.
+.El
+.Sh EXIT STATUS
+The
+.Nm
+command always returns 0.
+.Pp
+Additional exit codes may be returned as described in
+.Xr kyua 1 .
+.Sh SEE ALSO
+.Xr kyua 1
diff --git a/contrib/kyua/doc/kyua-config.1 b/contrib/kyua/doc/kyua-config.1
new file mode 100644
index 000000000000..ae08ad9e013a
--- /dev/null
+++ b/contrib/kyua/doc/kyua-config.1
@@ -0,0 +1,59 @@
+.\" Copyright 2012 The Kyua Authors.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are
+.\" met:
+.\"
+.\" * Redistributions of source code must retain the above copyright
+.\"   notice, this list of conditions and the following disclaimer.
+.\" * 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.
+.\" * Neither the name of Google Inc. nor the names of its contributors
+.\"   may be used to endorse or promote products derived from this software
+.\"   without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" OWNER 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.
+.Dd September 9, 2012
+.Dt KYUA-CONFIG 1
+.Os
+.Sh NAME
+.Nm "kyua config"
+.Nd inspect the values of the loaded configuration
+.Sh SYNOPSIS
+.Nm
+.Op Ar variable1 .. variableN
+.Sh DESCRIPTION
+The
+.Nm
+command provides a way to list all defined configuration variables and
+their current values.
+.Pp
+This command is intended to help you in resolving the values of the
+configuration variables without having to scan over configuration files.
+.Pp
+In the default synopsis form (no arguments), the command prints all
+configuration variables.
+If any arguments are provided, the command will only print the
+requested variables.
+.Sh EXIT STATUS
+The
+.Nm
+command returns 0 on success or 1 if any of the specified configuration
+variables does not exist.
+.Pp
+Additional exit codes may be returned as described in
+.Xr kyua 1 .
+.Sh SEE ALSO
+.Xr kyua 1
diff --git a/contrib/kyua/doc/kyua-db-exec.1 b/contrib/kyua/doc/kyua-db-exec.1
new file mode 100644
index 000000000000..8769ac534aa3
--- /dev/null
+++ b/contrib/kyua/doc/kyua-db-exec.1
@@ -0,0 +1,199 @@
+.\" Copyright 2012 The Kyua Authors.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are
+.\" met:
+.\"
+.\" * Redistributions of source code must retain the above copyright
+.\"   notice, this list of conditions and the following disclaimer.
+.\" * 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.
+.\" * Neither the name of Google Inc. nor the names of its contributors
+.\"   may be used to endorse or promote products derived from this software
+.\"   without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" OWNER 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.
+.Dd October 13, 2014
+.Dt KYUA-DB-EXEC 1
+.Os
+.Sh NAME
+.Nm "kyua db-exec"
+.Nd execute a SQL statement in a results file
+.Sh SYNOPSIS
+.Nm
+.Op Fl -no-headers
+.Op Fl -results-file Ar file
+.Ar statement
+.Sh DESCRIPTION
+The
+.Nm
+command provides a way to execute an arbitrary SQL statement within the
+database.
+This command is mostly intended to aid in debugging, but can also be used to
+extract information from the database when the current interfaces do not
+provide the desired functionality.
+.Pp
+The input database must exist.
+It makes no sense to use
+.Nm
+on a nonexistent or empty database.
+.Pp
+The
+.Nm
+command takes one or more arguments, all of which are concatenated to form
+a single SQL statement.
+Once the statement is executed,
+.Nm
+prints the resulting table on the screen, if any.
+.Pp
+The following subcommand options are recognized:
+.Bl -tag -width XX
+.It Fl -no-headers
+Avoids printing the headers of the table in the output of the command.
+.It Fl -results-file Ar path , Fl r Ar path
+.\" Copyright 2014 The Kyua Authors.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are
+.\" met:
+.\"
+.\" * Redistributions of source code must retain the above copyright
+.\"   notice, this list of conditions and the following disclaimer.
+.\" * 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.
+.\" * Neither the name of Google Inc. nor the names of its contributors
+.\"   may be used to endorse or promote products derived from this software
+.\"   without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" OWNER 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.
+Specifies the results file to operate on.
+Defaults to
+.Sq LATEST ,
+which causes
+.Nm
+to automatically load the latest results file from the current test suite.
+.Pp
+The following values are accepted:
+.Bl -tag -width XX
+.It Sq LATEST
+Requests the load of the latest results file available for the test suite rooted
+at the current directory.
+.It Directory
+Requests the load of the latest results file available for the test suite rooted
+at the given directory.
+.It Test suite name
+Requests the load of the latest results file available for the given test suite.
+.It Results identifier
+Requests the load of a specific results file.
+.It Explicit file name (aka everything else)
+Load the specified results file.
+.El
+.Pp
+See
+.Sx Results files
+for more details.
+.El
+.Ss Results files
+.\" Copyright 2014 The Kyua Authors.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are
+.\" met:
+.\"
+.\" * Redistributions of source code must retain the above copyright
+.\"   notice, this list of conditions and the following disclaimer.
+.\" * 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.
+.\" * Neither the name of Google Inc. nor the names of its contributors
+.\"   may be used to endorse or promote products derived from this software
+.\"   without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" OWNER 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.
+Results files contain, as their name implies, the results of the execution of a
+test suite.
+Each test suite executed by
+.Xr kyua-test 1
+generates a new results file, and such results files can be loaded later on by
+inspection commands such as
+.Xr kyua-report 1
+to analyze their contents.
+.Pp
+Results files support identifier-based lookups and also path name lookups.
+The differences between the two are described below.
+.Pp
+The default naming scheme for the results files provides simple support for
+identifier-based lookups and historical recording of test suite runs.
+Each results file is given an identifier derived from the test suite that
+generated it and the time the test suite was run.
+Kyua can later look up results files by these fields.
+.Pp
+The identifier follows this pattern:
+.Bd -literal -offset indent
+\*(Lttest_suite\*(Gt.\*(LtYYYYMMDD\*(Gt-\*(LtHHMMSS\*(Gt-\*(Ltuuuuuu\*(Gt
+.Ed
+.Pp
+where
+.Sq test_suite
+is the path to the root of the test suite that was run with all slashes replaced
+by underscores and
+.Sq YYYYMMDD-HHMMSS-uuuuuu
+is a timestamp with microsecond resolution.
+.Pp
+When using the default naming scheme, results files are stored in the
+.Pa ~/.kyua/store/
+subdirectory and each file holds a name of the form:
+.Bd -literal -offset indent
+~/.kyua/store/results.\*(Ltidentifier\*(Gt.db
+.Ed
+.Pp
+Results files are simple SQLite databases with the schema described in the
+.Pa /usr/share/kyua/store/schema_v?.sql
+files.
+For details on the schema, please refer to the heavily commented SQL file.
+.Sh EXIT STATUS
+The
+.Nm
+command returns 0 on success or 1 if the SQL statement is invalid or fails
+to run.
+.Pp
+Additional exit codes may be returned as described in
+.Xr kyua 1 .
+.Sh SEE ALSO
+.Xr kyua 1 ,
+.Xr kyua-test 1
diff --git a/contrib/kyua/doc/kyua-db-migrate.1 b/contrib/kyua/doc/kyua-db-migrate.1
new file mode 100644
index 000000000000..177dd0795d10
--- /dev/null
+++ b/contrib/kyua/doc/kyua-db-migrate.1
@@ -0,0 +1,182 @@
+.\" Copyright 2013 The Kyua Authors.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are
+.\" met:
+.\"
+.\" * Redistributions of source code must retain the above copyright
+.\"   notice, this list of conditions and the following disclaimer.
+.\" * 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.
+.\" * Neither the name of Google Inc. nor the names of its contributors
+.\"   may be used to endorse or promote products derived from this software
+.\"   without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" OWNER 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.
+.Dd October 13, 2014
+.Dt KYUA-DB-MIGRATE 1
+.Os
+.Sh NAME
+.Nm "kyua db-migrate"
+.Nd upgrade the schema of an existing results file
+.Sh SYNOPSIS
+.Nm
+.Op Fl -results-file Ar file
+.Sh DESCRIPTION
+The
+.Nm
+command migrates the schema of an existing database to the latest
+version implemented in
+.Xr kyua 1 .
+.Pp
+This operation is not reversible.
+However, a backup of the database is created in the same directory where the
+database lives.
+.Pp
+The following subcommand options are recognized:
+.Bl -tag -width XX
+.It Fl -results-file Ar path , Fl r Ar path
+.\" Copyright 2014 The Kyua Authors.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are
+.\" met:
+.\"
+.\" * Redistributions of source code must retain the above copyright
+.\"   notice, this list of conditions and the following disclaimer.
+.\" * 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.
+.\" * Neither the name of Google Inc. nor the names of its contributors
+.\"   may be used to endorse or promote products derived from this software
+.\"   without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" OWNER 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.
+Specifies the results file to operate on.
+Defaults to
+.Sq LATEST ,
+which causes
+.Nm
+to automatically load the latest results file from the current test suite.
+.Pp
+The following values are accepted:
+.Bl -tag -width XX
+.It Sq LATEST
+Requests the load of the latest results file available for the test suite rooted
+at the current directory.
+.It Directory
+Requests the load of the latest results file available for the test suite rooted
+at the given directory.
+.It Test suite name
+Requests the load of the latest results file available for the given test suite.
+.It Results identifier
+Requests the load of a specific results file.
+.It Explicit file name (aka everything else)
+Load the specified results file.
+.El
+.Pp
+See
+.Sx Results files
+for more details.
+.El
+.Ss Results files
+.\" Copyright 2014 The Kyua Authors.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are
+.\" met:
+.\"
+.\" * Redistributions of source code must retain the above copyright
+.\"   notice, this list of conditions and the following disclaimer.
+.\" * 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.
+.\" * Neither the name of Google Inc. nor the names of its contributors
+.\"   may be used to endorse or promote products derived from this software
+.\"   without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" OWNER 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.
+Results files contain, as their name implies, the results of the execution of a
+test suite.
+Each test suite executed by
+.Xr kyua-test 1
+generates a new results file, and such results files can be loaded later on by
+inspection commands such as
+.Xr kyua-report 1
+to analyze their contents.
+.Pp
+Results files support identifier-based lookups and also path name lookups.
+The differences between the two are described below.
+.Pp
+The default naming scheme for the results files provides simple support for
+identifier-based lookups and historical recording of test suite runs.
+Each results file is given an identifier derived from the test suite that
+generated it and the time the test suite was run.
+Kyua can later look up results files by these fields.
+.Pp
+The identifier follows this pattern:
+.Bd -literal -offset indent
+\*(Lttest_suite\*(Gt.\*(LtYYYYMMDD\*(Gt-\*(LtHHMMSS\*(Gt-\*(Ltuuuuuu\*(Gt
+.Ed
+.Pp
+where
+.Sq test_suite
+is the path to the root of the test suite that was run with all slashes replaced
+by underscores and
+.Sq YYYYMMDD-HHMMSS-uuuuuu
+is a timestamp with microsecond resolution.
+.Pp
+When using the default naming scheme, results files are stored in the
+.Pa ~/.kyua/store/
+subdirectory and each file holds a name of the form:
+.Bd -literal -offset indent
+~/.kyua/store/results.\*(Ltidentifier\*(Gt.db
+.Ed
+.Pp
+Results files are simple SQLite databases with the schema described in the
+.Pa /usr/share/kyua/store/schema_v?.sql
+files.
+For details on the schema, please refer to the heavily commented SQL file.
+.Sh EXIT STATUS
+The
+.Nm
+command returns 0 on success or 1 if the migration fails.
+.Pp
+Additional exit codes may be returned as described in
+.Xr kyua 1 .
+.Sh SEE ALSO
+.Xr kyua 1
diff --git a/contrib/kyua/doc/kyua-debug.1 b/contrib/kyua/doc/kyua-debug.1
new file mode 100644
index 000000000000..760cf097a349
--- /dev/null
+++ b/contrib/kyua/doc/kyua-debug.1
@@ -0,0 +1,417 @@
+.\" Copyright 2012 The Kyua Authors.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are
+.\" met:
+.\"
+.\" * Redistributions of source code must retain the above copyright
+.\"   notice, this list of conditions and the following disclaimer.
+.\" * 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.
+.\" * Neither the name of Google Inc. nor the names of its contributors
+.\"   may be used to endorse or promote products derived from this software
+.\"   without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" OWNER 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.
+.Dd April 18, 2026
+.Dt KYUA-DEBUG 1
+.Os
+.Sh NAME
+.Nm "kyua debug"
+.Nd execute a single test case with facilities for debugging
+.Sh SYNOPSIS
+.Nm
+.Op Fl -build-root Ar path
+.Op Fl -kyuafile Ar file
+.Op Fl -pause-before-cleanup-upon-fail
+.Op Fl -pause-before-cleanup
+.Op Fl -stdout Ar path
+.Op Fl -stderr Ar path
+.Ar test_case
+.Sh DESCRIPTION
+The
+.Nm
+command provides a mechanism to execute a single test case bypassing some
+of the Kyua infrastructure and allowing the user to poke into the execution
+behavior of the test.
+.Pp
+The test case to run is selected by providing a test filter, described below in
+.Sx Test filters ,
+that matches a single test case.
+The test case is executed and its result is printed as the last line of the
+output of the tool.
+.Pp
+The test executed by
+.Nm
+is run under a controlled environment as described in
+.Sx Test isolation .
+.Pp
+At the moment, the
+.Nm
+command allows the following aspects of a test case execution to be
+tweaked:
+.Bl -bullet
+.It
+Redirection of the test case's stdout and stderr to the console (the
+default) or to arbitrary files.
+See the
+.Fl -stdout
+and
+.Fl -stderr
+options below.
+.El
+.Pp
+The following subcommand options are recognized:
+.Bl -tag -width XX
+.It Fl -build-root Ar path
+Specifies the build root in which to find the test programs referenced
+by the Kyuafile, if different from the Kyuafile's directory.
+See
+.Sx Build directories
+below for more information.
+.It Fl -kyuafile Ar file , Fl k Ar file
+Specifies the Kyuafile to process.
+Defaults to
+.Pa Kyuafile
+file in the current directory.
+.It Fl -pause-before-cleanup-upon-fail , Fl p
+Causes Kyua to pause right before the test cleanup routine is invoked if the
+test fails.
+When paused, Kyua waits for input on stdin, and any key press resumes
+execution.
+.sp
+This can be useful for debugging system or end-to-end tests
+which alter the system by creating artifacts such as files, network
+interfaces, routing entries, firewall configuration, containers, etc.
+This flag makes it possible to preserve such artifacts immediately after a test
+failure, simplifying debugging.
+Otherwise, these artifacts would be removed by the test cleanup routine or
+by Kyua built-in cleanup mechanism.
+.It Fl -pause-before-cleanup , Fl P
+The unconditional variant of the previous option.
+This can be helpful for reproducing the infrastructure or fixture of a passing
+test for further development or additional analysis.
+.It Fl -stderr Ar path
+Specifies the file to which to send the standard error of the test
+program's body.
+The default is
+.Pa /dev/stderr ,
+which is a special character device that redirects the output to
+standard error on the console.
+.It Fl -stdout Ar path
+Specifies the file to which to send the standard output of the test
+program's body.
+The default is
+.Pa /dev/stdout ,
+which is a special character device that redirects the output to
+standard output on the console.
+.El
+.Pp
+For example, consider the following Kyua session:
+.Bd -literal -offset indent
+$ kyua test
+kernel/fs:mkdir  ->  passed
+kernel/fs:rmdir  ->  failed: Invalid argument
+
+1/2 passed (1 failed)
+.Ed
+.Pp
+At this point, we do not have a lot of information regarding the
+failure of the
+.Sq kernel/fs:rmdir
+test.
+We can run this test through the
+.Nm
+command to inspect its output a bit closer, hoping that the test case is
+kind enough to log its progress:
+.Bd -literal -offset indent
+$ kyua debug kernel/fs:rmdir
+Trying rmdir('foo')
+Trying rmdir(NULL)
+kernel/fs:rmdir  ->  failed: Invalid argument
+.Ed
+.Pp
+Luckily, the offending test case was printing status lines as it
+progressed, so we could see the last attempted call and we can know match
+the failure message to the problem.
+.Ss Build directories
+.\" Copyright 2012 The Kyua Authors.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are
+.\" met:
+.\"
+.\" * Redistributions of source code must retain the above copyright
+.\"   notice, this list of conditions and the following disclaimer.
+.\" * 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.
+.\" * Neither the name of Google Inc. nor the names of its contributors
+.\"   may be used to endorse or promote products derived from this software
+.\"   without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" OWNER 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.
+.Em Build directories
+(or object directories, target directories, product directories, etc.) is
+the concept that allows a developer to keep the source tree clean from
+build products by asking the build system to place such build products
+under a separate subtree.
+.Pp
+Most build systems today support build directories.
+For example, the GNU Automake/Autoconf build system exposes such concept when
+invoked as follows:
+.Bd -literal -offset indent
+$ cd my-project-1.0
+$ mkdir build
+$ cd build
+$ ../configure
+$ make
+.Ed
+.Pp
+Under such invocation, all the results of the build are left in the
+.Pa my-project-1.0/build/
+subdirectory while maintaining the contents of
+.Pa my-project-1.0/
+intact.
+.Pp
+Because build directories are an integral part of most build systems, and
+because they are a tool that developers use frequently,
+.Nm
+supports build directories too.
+This manifests in the form of
+.Nm
+being able to run tests from build directories while reading the (often
+immutable) test suite definition from the source tree.
+.Pp
+One important property of build directories is that they follow (or need to
+follow) the exact same layout as the source tree.
+For example, consider the following directory listings:
+.Bd -literal -offset indent
+src/Kyuafile
+src/bin/ls/
+src/bin/ls/Kyuafile
+src/bin/ls/ls.c
+src/bin/ls/ls_test.c
+src/sbin/su/
+src/sbin/su/Kyuafile
+src/sbin/su/su.c
+src/sbin/su/su_test.c
+
+obj/bin/ls/
+obj/bin/ls/ls*
+obj/bin/ls/ls_test*
+obj/sbin/su/
+obj/sbin/su/su*
+obj/sbin/su/su_test*
+.Ed
+.Pp
+Note how the directory layout within
+.Pa src/
+matches that of
+.Pa obj/ .
+The
+.Pa src/
+directory contains only source files and the definition of the test suite
+(the Kyuafiles), while the
+.Pa obj/
+directory contains only the binaries generated during a build.
+.Pp
+All commands that deal with the workspace support the
+.Fl -build-root Ar path
+option.
+When this option is provided, the directory specified by the
+option is considered to be the root of the build directory.
+For example, considering our previous fake tree layout, we could invoke
+.Nm
+as any of the following:
+.Bd -literal -offset indent
+$ kyua debug --kyuafile=src/Kyuafile --build-root=obj
+$ cd src && kyua debug --build-root=../obj
+.Ed
+.Ss Test filters
+.\" Copyright 2012 The Kyua Authors.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are
+.\" met:
+.\"
+.\" * Redistributions of source code must retain the above copyright
+.\"   notice, this list of conditions and the following disclaimer.
+.\" * 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.
+.\" * Neither the name of Google Inc. nor the names of its contributors
+.\"   may be used to endorse or promote products derived from this software
+.\"   without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" OWNER 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.
+A
+.Em test filter
+is a string that is used to match test cases or test programs in a test suite.
+Filters have the following form:
+.Bd -literal -offset indent
+test_program_name[:test_case_name]
+.Ed
+.Pp
+Where
+.Sq test_program_name
+is the name of a test program or a subdirectory in the test suite, and
+.Sq test_case_name
+is the name of a test case.
+.Ss Test isolation
+.\" Copyright 2014 The Kyua Authors.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are
+.\" met:
+.\"
+.\" * Redistributions of source code must retain the above copyright
+.\"   notice, this list of conditions and the following disclaimer.
+.\" * 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.
+.\" * Neither the name of Google Inc. nor the names of its contributors
+.\"   may be used to endorse or promote products derived from this software
+.\"   without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" OWNER 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.
+The test programs and test cases run by
+.Nm
+are all executed in a deterministic environment.
+This known, clean environment serves to make the test execution as
+reproducible as possible and also to prevent clashes between tests that may,
+for example, create auxiliary files with overlapping names.
+.Pp
+For plain test programs and for TAP test programs, the whole test program
+is run under a single instance of the environment described in this page.
+For ATF test programs (see
+.Xr atf 7 ) ,
+each individual test case
+.Em and
+test cleanup routine are executed in separate environments.
+.Bl -tag -width XX
+.It Process space
+Each test is executed in an independent processes.
+Corollary: the test can do whatever it wants to the current process (such
+as modify global variables) without having to undo such changes.
+.It Session and process group
+The test is executed in its own session and its own process group.
+There is no controlling terminal attached to the session.
+.Pp
+Should the test spawn any children, the children should maintain the same
+session and process group.
+Modifying any of these settings prevents
+.Nm
+from being able to kill any stray subprocess as part of the cleanup phase.
+If modifying these settings is necessary, or if any subprocess started by
+the test decides to use a different process group or session, it is the
+responsibility of the test to ensure those subprocesses are forcibly
+terminated during cleanup.
+.It Work directory
+The test is executed in a temporary directory automatically created by the
+runtime engine.
+Corollary: the test can write to its current directory
+without needing to clean any files and/or directories it creates.
+The runtime engine takes care to recursively delete the temporary directories
+after the execution of a test case.
+Any file systems mounted within the temporary directory are also unmounted.
+.It Home directory
+The
+.Va HOME
+environment variable is set to the absolute path of the work directory.
+.It Umask
+The value of the umask is set to 0022.
+.It Environment
+The
+.Va LANG ,
+.Va LC_ALL ,
+.Va LC_COLLATE ,
+.Va LC_CTYPE ,
+.Va LC_MESSAGES ,
+.Va LC_MONETARY ,
+.Va LC_NUMERIC
+and
+.Va LC_TIME
+variables are unset.
+.Pp
+The
+.Va TZ
+variable is set to
+.Sq UTC .
+.Pp
+The
+.Va TMPDIR
+variable is set to the absolute path of the work directory.
*** 2802 LINES SKIPPED ***

From nobody Mon Nov 23 01:39:39 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXpXD1pWTz71c2f
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:39: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpXC6fmXz4m6v
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:39:39 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795397979;
	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=PJaKWiBWi5IEijBpk9s1hg0faMBxWfwsmFKdvsOi9DA=;
	b=NPBrX3ICfLRDn6sYf0Y82F9P572Z71UBKjvCKU/g4Mnr2Io7r5M+6i6cN7cqDlDSEMgHUW
	sh0GXJY5ow5p513VCGRGWzuNDWp2+OnXZ+3iGS16q38EJXSFTqSOGJR7y76xhCd6fEbqx4
	i1V7xD+qZwC1S7dU5TwSsru2FT7rVtADVM+d5YY2xOnyAcR+Mh13R2dL3eSrDUh3ovlDmF
	JuglAtyz3s/r4QyFtzcx2rvjF0DCcVMM0e5NautztVJB2kTUY/Oa7kCtnyAjd8FLoWPU9F
	F+P6ad/SFMDBNfk5X1Qw/aSXTVNwqIGPcV0Yk96J3D4bsakb6btr7dXtDKkjdA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397979;
	b=DXnk1+l8hFZ0Sx1Pu6CQKNmkPIPYatrk5yHM+qT8CDJKqTsrr2GYxmmtRKZrv7DDmC7gae
	l/bNcpNNEbtF+rN+UeeYtktIlQ5jyG8vxnTfUEjW3oKmCvMAJAAwJuBFjlZMtqc9oGaN8E
	EqUhbE7lTkt/6euXutffN5irg3f2ChuxmEysTnO7bQN5k8PqOz2ZjVelqv1BSbRlwBuOdb
	cfCgXF1doaF0NTFV5fnxENh/mqwM8aAMyTg4d+KfaJn9jCfguCmBC84Yt+JFwEVFUdpDkV
	BRFHNh240RUNRwyPAKj53h5n1jwXDKj4/rawzsjEygGPWLiZ8ZcHD/04CYtuPA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795397979;
	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=PJaKWiBWi5IEijBpk9s1hg0faMBxWfwsmFKdvsOi9DA=;
	b=W2JIY6dtbAwkDeU04GhRVcejd60JcEZdmAECO5r/oqs9aa+5E3mEOMWNN2AP4T5QAusblF
	lZ5YI31TVmtS8gLwLWsOQHc/cIXXeJ4UsMx8px5a20dPZGlbfAczTrBD49zR1FI3/Z7iuX
	H5R2X/3AIhaqi7qQMIUjfjvwZ0YN7DVsHXMl7N09C/twqAgsHoCe/hJ+yzBmT9jA9AUgXF
	0+vefwwPGjeZZipI5+fDgaD6NtMgl6WBmM8wnvH2jxAnvnpJe6S2aFjTpMtNwQKgLFI1+6
	dpIHfRRgaS1ohaFpzimv/JyHD42pyr2xW4QbkBz9oQDJ7LYauGnhLsmmaT6MOQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpXC6K1TzSyb
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:39:39 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 56d1
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:39:39 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Igor Ostapenko <igoro@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: c92c1d38ecd6 - stable/14 - kyua: Fixes after vendor merge
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: c92c1d38ecd6c2d2e33879e7b7adfa214839f003
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:39:39 +0000
Message-Id: <6b03995b.56d1.68314f99@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=c92c1d38ecd6c2d2e33879e7b7adfa214839f003

commit c92c1d38ecd6c2d2e33879e7b7adfa214839f003
Author:     Igor Ostapenko <igoro@FreeBSD.org>
AuthorDate: 2026-10-18 17:22:55 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:36:35 +0000

    kyua: Fixes after vendor merge
    
    Reviewed by:    ngie
    MFC after:      1 month
    Differential Revision:  https://reviews.freebsd.org/D60446
    
    (cherry picked from commit af238d55d313a4a99fe9a3492755eb152b17bca0)
---
 contrib/kyua/cli/cmd_debug.cpp    |  4 ++--
 contrib/kyua/doc/kyuafile.5       |  1 +
 contrib/kyua/doc/kyuafile.5.in    |  1 +
 contrib/kyua/engine/scheduler.cpp |  4 ++--
 contrib/kyua/model/metadata.cpp   | 47 ++++++++++++++++++++++++++-------------
 contrib/kyua/os/freebsd/main.cpp  | 16 ++++++++-----
 6 files changed, 47 insertions(+), 26 deletions(-)

diff --git a/contrib/kyua/cli/cmd_debug.cpp b/contrib/kyua/cli/cmd_debug.cpp
index f5e48572407e..f43be8fe85f2 100644
--- a/contrib/kyua/cli/cmd_debug.cpp
+++ b/contrib/kyua/cli/cmd_debug.cpp
@@ -155,14 +155,14 @@ public:
                 _ui->out("The test failed and paused right before its cleanup "
                     "routine.");
                 _ui->out(F("Test work dir: %s") % eh.work_directory().str());
-                _ui->out("Press any key to continue...");
+                _ui->out("Press <Enter> to continue...");
                 (void) std::cin.get();
             }
         } else if (_cmdline.has_option(pause_before_cleanup_option
             .long_name())) {
             _ui->out("The test paused right before its cleanup routine.");
             _ui->out(F("Test work dir: %s") % eh.work_directory().str());
-            _ui->out("Press any key to continue...");
+            _ui->out("Press <Enter> to continue...");
             (void) std::cin.get();
         }
     };
diff --git a/contrib/kyua/doc/kyuafile.5 b/contrib/kyua/doc/kyuafile.5
index 1990e7bba3a3..d26312dd0d18 100644
--- a/contrib/kyua/doc/kyuafile.5
+++ b/contrib/kyua/doc/kyuafile.5
@@ -311,6 +311,7 @@ Supported platforms:
 .Pp
 ATF:
 .Va require.kmods
+(appends to the list declared at the Kyuafile level instead of overwriting it)
 .It Va required_memory
 Amount of physical memory that the test needs to run successfully.
 .Pp
diff --git a/contrib/kyua/doc/kyuafile.5.in b/contrib/kyua/doc/kyuafile.5.in
index ae4b8ebfa3fe..9485ed187814 100644
--- a/contrib/kyua/doc/kyuafile.5.in
+++ b/contrib/kyua/doc/kyuafile.5.in
@@ -311,6 +311,7 @@ Supported platforms:
 .Pp
 ATF:
 .Va require.kmods
+(appends to the list declared at the Kyuafile level instead of overwriting it)
 .It Va required_memory
 Amount of physical memory that the test needs to run successfully.
 .Pp
diff --git a/contrib/kyua/engine/scheduler.cpp b/contrib/kyua/engine/scheduler.cpp
index 6e19a1598f8c..d04fc1dfbd3d 100644
--- a/contrib/kyua/engine/scheduler.cpp
+++ b/contrib/kyua/engine/scheduler.cpp
@@ -1653,8 +1653,8 @@ scheduler::generate_config(const config::tree& user_config,
     if (user_config.is_set("unprivileged_user")) {
         const passwd::user& user =
             user_config.lookup< engine::user_node >("unprivileged_user");
-	// The property is duplicated using both ATF and Kyua naming styles
-	// for better UX.
+        // The property is duplicated using both ATF and Kyua naming styles
+        // for better UX.
         props["unprivileged-user"] = user.name;
         props["unprivileged_user"] = user.name;
     }
diff --git a/contrib/kyua/model/metadata.cpp b/contrib/kyua/model/metadata.cpp
index 8bb071163c10..51a7b03e4599 100644
--- a/contrib/kyua/model/metadata.cpp
+++ b/contrib/kyua/model/metadata.cpp
@@ -255,8 +255,8 @@ init_tree(config::tree& tree)
     tree.define< config::strings_set_node >("required_configs");
     tree.define< bytes_node >("required_disk_space");
     tree.define< paths_set_node >("required_files");
-    tree.define< bytes_node >("required_memory");
     tree.define< config::strings_set_node >("required_kmods");
+    tree.define< bytes_node >("required_memory");
     tree.define< paths_set_node >("required_programs");
     tree.define< user_node >("required_user");
     tree.define< delta_node >("timeout");
@@ -282,8 +282,8 @@ set_defaults(config::tree& tree)
                                          model::strings_set());
     tree.set< bytes_node >("required_disk_space", units::bytes(0));
     tree.set< paths_set_node >("required_files", model::paths_set());
-    tree.set< bytes_node >("required_memory", units::bytes(0));
     tree.set< config::strings_set_node >("required_kmods", model::strings_set());
+    tree.set< bytes_node >("required_memory", units::bytes(0));
     tree.set< paths_set_node >("required_programs", model::paths_set());
     tree.set< user_node >("required_user", "");
     // TODO(jmmv): We shouldn't be setting a default timeout like this.  See
@@ -585,20 +585,6 @@ model::metadata::required_files(void) const
 }
 
 
-/// Returns the amount of memory required by the test.
-///
-/// \return Number of bytes, or 0 if this does not apply.
-const units::bytes&
-model::metadata::required_memory(void) const
-{
-    if (_pimpl->props.is_set("required_memory")) {
-        return _pimpl->props.lookup< bytes_node >("required_memory");
-    } else {
-        return get_defaults().lookup< bytes_node >("required_memory");
-    }
-}
-
-
 /// Returns the list of kernel modules needed by the test.
 ///
 /// \return Set of kernel module names.
@@ -615,6 +601,20 @@ model::metadata::required_kmods(void) const
 }
 
 
+/// Returns the amount of memory required by the test.
+///
+/// \return Number of bytes, or 0 if this does not apply.
+const units::bytes&
+model::metadata::required_memory(void) const
+{
+    if (_pimpl->props.is_set("required_memory")) {
+        return _pimpl->props.lookup< bytes_node >("required_memory");
+    } else {
+        return get_defaults().lookup< bytes_node >("required_memory");
+    }
+}
+
+
 /// Returns the list of programs needed by the test.
 ///
 /// \return Set of paths.
@@ -1059,6 +1059,21 @@ model::metadata_builder::set_required_files(const model::paths_set& files)
 }
 
 
+/// Sets the list of required kernel modules.
+///
+/// \param vars Set of kernel module names.
+///
+/// \return A reference to this builder.
+///
+/// \throw model::error If the value is invalid.
+model::metadata_builder&
+model::metadata_builder::set_required_kmods(const model::strings_set& kmods)
+{
+    set< config::strings_set_node >(_pimpl->props, "required_kmods", kmods);
+    return *this;
+}
+
+
 /// Sets the amount of memory required by the test.
 ///
 /// \param bytes Number of bytes.
diff --git a/contrib/kyua/os/freebsd/main.cpp b/contrib/kyua/os/freebsd/main.cpp
index 700284b64b78..1fe4fca8cae4 100644
--- a/contrib/kyua/os/freebsd/main.cpp
+++ b/contrib/kyua/os/freebsd/main.cpp
@@ -34,7 +34,12 @@
 #include "engine/requirements.hpp"
 #include "os/freebsd/reqs_checker_kmods.hpp"
 
+#include "engine/prepare/prepare.hpp"
+#include "os/freebsd/prepare_kmods.hpp"
+
 namespace execenv = engine::execenv;
+namespace prepare = engine::prepare;
+
 
 /// FreeBSD related features initialization.
 ///
@@ -50,15 +55,14 @@ int
 freebsd::main(const int, const char* const* const)
 {
     execenv::register_execenv(
-        std::shared_ptr< execenv::manager >(new freebsd::execenv_jail_manager())
-    );
+        std::make_shared<freebsd::execenv_jail_manager>());
 
 #ifdef __FreeBSD__
     engine::register_reqs_checker(
-        std::shared_ptr< engine::reqs_checker >(
-            new freebsd::reqs_checker_kmods()
-        )
-    );
+        std::make_shared<freebsd::reqs_checker_kmods>());
+
+    prepare::register_handler(
+        std::make_shared<freebsd::prepare_kmods>());
 #endif
 
     return 0;

From nobody Mon Nov 23 01:39:40 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXpXF2QDHz71bwd
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:39: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpXD742hz4mN1
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:39:40 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795397981;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=J3hXlsuEtZPnHheD53IeYGnxaZCM0UYy/hVmx0NdUZo=;
	b=ejsLb8dLkZZTkfBBIvEEbxF67W7ttNo1rd+AEthjktpfru3q1HCBInN+DHrA1+ogGP8u9S
	3MKRjFy8vkjgsczdDjj8NWj7pROYNsFS3ufFby4Zhxogzbt8GW6dBhJyK9dQlvoCBrzHj7
	Tqz+A5d8/2wy9/Sf7oJ1JBUYfxy21XvdO/WxK/zTRJ4Sp0DGTwCJGEgObDTMJmXq2C4DeM
	Lrb4I+Wwi6rcWZIcFheDRq//OolNYwM3BYGeYR4ITy3uOdiEm2xInP+ZyxWnWe4dmRv1kh
	FrqvH3yin6Z2PCyoPB9M6q0I6RVNExzczrVO0Ai46rpUB7GJc7dFccCBoGv4vw==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795397981;
	b=Y3hGV3eZGJgpvkEDh1HonASq18kJLdHvhfQMvZy/39ZkMS/OE5+1mcYAvAYVu9ImGEsbZF
	TxTbZo7akqJUjjtp4/uNQnMtL3cPTLtv1VfUHRXcpq3mUeV3dJ22zXBeOY/rX06W3HVkk1
	7t/Ol4uBPJ/7Ri9aTF1iOZRvwpj4mggcVkzkfaODP28bw54sSFSLQbgFfWdZLmxU2et5BS
	EeMFvfwyLRTfF83PRexCvlXoTylEtgzltTJ25ahNpDZYbxC0OsGoa8JRHnCYmt+HjEYWWp
	TAV2Y7z6wurDYxNNTfIKg9hVBw6k8L2BDYHN7+iAtGZljzbUx92m1TIELggpUg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795397981;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=J3hXlsuEtZPnHheD53IeYGnxaZCM0UYy/hVmx0NdUZo=;
	b=dZD7tiaXCvIU5hMpAHBZrWI3CZWqusXz5yUmjyOQFozsmAui6xzcEmHg5dbuAd4XY+IlV3
	i/Yg7GttKUiJC74pYswDBk9vK/cI+zTJ8KixWJ1JgrrrOWwCLTNIVVKbpCH10qh1H1DRq1
	YYTfx7NsRGolrYM6HEOz6/RYHdw+C2/T8vg6DAOb5KxIESbHX41B1i7XzbBIzLMQzzVckL
	BanckcDXIt0C1pwJt2it/OahMqDbeDwPxHW9p+TZqCrolKboeE9/Sc/ysnSeogLCUQreGx
	Oy3GxSRbLMdab/CFpStBAYWm7IGg1Vh7ASFzZz1Phe8j5ytntKNc4zUcm581Zw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpXD6jGBzSk7
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:39:40 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 56d6
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:39:40 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: f46766b0190c - stable/14 - atf, lutok, kyua: compile with CXXSTD=gnu++20
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: f46766b0190c67c560d22fabee1f29fefbb3793d
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:39:40 +0000
Message-Id: <6b03995c.56d6.3c0856a2@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=f46766b0190c67c560d22fabee1f29fefbb3793d

commit f46766b0190c67c560d22fabee1f29fefbb3793d
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-10-31 20:13:06 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:38:03 +0000

    atf, lutok, kyua: compile with CXXSTD=gnu++20
    
    All three of the test infrastructure components require at least C++20
    in order to build. Make that version the default to better match what
    is required in recent versions of the projects.
    
    MFC after:      1 week
    
    (cherry picked from commit 0e58fb271c6e1cbd4b2ae5d33da181b7e7c2f0d5)
---
 lib/atf/common.mk     | 2 ++
 lib/liblutok/Makefile | 2 ++
 usr.bin/kyua/Makefile | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/lib/atf/common.mk b/lib/atf/common.mk
index e1967097d2c1..4b0f9911eecd 100644
--- a/lib/atf/common.mk
+++ b/lib/atf/common.mk
@@ -16,3 +16,5 @@ atf-version-real: .PHONY
 	@grep 'define VERSION' ${ATF}/config.h \
 	    | cut -d '"' -f 2 >atf-version-real
 CLEANFILES+= atf-version atf-version-real
+
+CXXSTD=		gnu++20
diff --git a/lib/liblutok/Makefile b/lib/liblutok/Makefile
index 1ac88cfa06b3..56c1225a237b 100644
--- a/lib/liblutok/Makefile
+++ b/lib/liblutok/Makefile
@@ -19,4 +19,6 @@ CFLAGS+=	-I${SRCTOP}/contrib/lutok/include \
 WARNS?=	3
 SHLIB_MAJOR=	0
 
+CXXSTD=		gnu++20
+
 .include <bsd.lib.mk>
diff --git a/usr.bin/kyua/Makefile b/usr.bin/kyua/Makefile
index 3a126640c84e..44a38b33ca86 100644
--- a/usr.bin/kyua/Makefile
+++ b/usr.bin/kyua/Makefile
@@ -175,6 +175,8 @@ SRCS+=	os/freebsd/execenv_jail.cpp	\
 LIBADD+=	jail
 .endif
 
+CXXSTD=		gnu++20
+
 FILESGROUPS=	DOCS MISC STORE
 
 .if ${MK_EXAMPLES} != "no"

From nobody Mon Nov 23 01:43:56 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXpd85wGmz71dZC
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:43: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpd81qGnz4r3d
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:43:56 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795398236;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=JPw5oKwidYaE86QJrELMWTs0sTua/aJv5RfiI62MSlE=;
	b=qZXswHGnfOUQZ7bH0qlRYzEhNdPV6RJj3fmflhWs3WdlfzDPHOveRUKf9Tkc1YX9BrwHaL
	L09aSkrQuS7ekTgiOVmAMhi2zpg04QL6oeif0V0skZTVMpWLELsUEHotxdPNEW5gHO1shM
	93m5pjy0+BV5O5Zu6tzxnQyODipPECuRhMEB4MZwLBn+z+O9gW5882ghOto6y5TD6e1L5L
	SEOQhoF7ThAcSWGi3slcA6+8Bussru10zQEyDaa1od9E8rgiYc/D0hhHlsdC8hZbSbXf0S
	/8AcGnyr97udODXcgP0baDdXSDOQLkUFQ0gjNj3FOsrTOYNyWF3pJj0VGsUd+A==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795398236;
	b=BIlymu1Lvjh0lGvgGlwDQP7rXv2xc2DYvkyMtIp4pWElJLsL4uKHx3vECEzT48JYYv+jr2
	pJ2qRHKDMI++DRexWlfkgOquWWvyXu0GuGBVJWJb/jrpaFmCdP5MjMoU2LMBrrO45ZPLEJ
	PXFhiLiXjeyzOO3NTUyGx42Tn31xa+5Kqu0QM8RKCn68R0/F1nEv4tJlvAzZZzjMqDT41Y
	MB0CVC78vCrQVzJq+iHDJo0fAcR3Hl89tb3x51j21dZSNrE+7BnTirEVYHAQaxQ8wtNw6a
	tBQFeZF3n1Pf2FQVN0430QxJ6almuCK0cJgRJoSDgT+jx3vTdXLg3/ntNt7n4g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795398236;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=JPw5oKwidYaE86QJrELMWTs0sTua/aJv5RfiI62MSlE=;
	b=yOI2SIU8m1PYQuOHYcYt44OyyLrKwMivpWRfDhpNxXc+AEQHpDY/7O5NizUCUc9LrQ08gO
	CyzTwjTbTYIlX9r9L0v+F99ArNb7/znnfsSOSo0gD4lN92cXL2PT8ik9w73eR69jeH2UZB
	Kg6b477V8iQgcHKTOKJFbraq25J2jD0Ij5iK5mbd3kbSRzKoT2XlIeao7MdactaqiaSias
	xdI3ApA70Gp03oij6b6H3JSziP00SWyAGARjxwLk7/Dtea5YFPFm0V3mbHv6npbv0XELX9
	c36cjOWUqaxDPOqLWB5pDiVmJ7FpTK3hHDo29aOaXmEDzk9lAD+RLjPcfOZzNQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpd81Nw9zTlZ
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:43:56 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 55be
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:43:56 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Konstantin Belousov <kib@FreeBSD.org>
Subject: git: fe75f57be9a5 - main - sys/mount.h: wrap long lines
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: fe75f57be9a5f23c5a47601ca5249f1974c1e1a5
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:43:56 +0000
Message-Id: <6b039a5c.55be.7c5bf946@gitrepo.freebsd.org>

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=fe75f57be9a5f23c5a47601ca5249f1974c1e1a5

commit fe75f57be9a5f23c5a47601ca5249f1974c1e1a5
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-11-20 00:56:15 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-23 01:43:22 +0000

    sys/mount.h: wrap long lines
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
---
 sys/sys/mount.h | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/sys/sys/mount.h b/sys/sys/mount.h
index bc14a59da716..30f4cc35dac0 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -238,7 +238,8 @@ struct mount {
 	struct vnode	*mnt_vnodecovered;	/* vnode we mounted on */
 	struct vfsops	*mnt_op;		/* operations on fs */
 	struct vfsconf	*mnt_vfc;		/* configuration info */
-	struct mtx __aligned(CACHE_LINE_SIZE)	mnt_mtx; /* mount structure interlock */
+	struct mtx __aligned(CACHE_LINE_SIZE)	mnt_mtx; /* mount structure
+						   interlock */
 	int		mnt_gen;		/* struct mount generation */
 #define	mnt_startzero	mnt_list
 	TAILQ_ENTRY(mount) mnt_list;		/* (m) mount list */
@@ -267,14 +268,19 @@ struct mount {
 	struct mtx	mnt_listmtx;
 	struct vnodelst	mnt_lazyvnodelist;	/* (l) list of lazy vnodes */
 	int		mnt_lazyvnodelistsize;	/* (l) # of lazy vnodes */
-	int		mnt_upper_pending;	/* (i) # of pending ops on mnt_uppers */
+	int		mnt_upper_pending;	/* (i) # of pending ops on
+						   mnt_uppers */
 	struct lock	mnt_explock;		/* vfs_export walkers lock */
 	struct lock	mnt_renamelock;		/* renames and O_RESOLVE_BENEATH */
 	TAILQ_HEAD(, mount_upper_node) mnt_uppers; /* (i) upper mounts over us */
-	TAILQ_HEAD(, mount_upper_node) mnt_notify; /* (i) upper mounts for notification */
-	STAILQ_ENTRY(mount) mnt_taskqueue_link;	/* (d) our place in deferred unmount list */
-	uint64_t	mnt_taskqueue_flags;	/* (d) unmount flags passed from taskqueue */
-	unsigned int	mnt_unmount_retries;	/* (d) # of failed deferred unmount attempts */
+	TAILQ_HEAD(, mount_upper_node) mnt_notify; /* (i) upper mounts for
+						      notification */
+	STAILQ_ENTRY(mount) mnt_taskqueue_link;	/* (d) our place in deferred
+						   unmount list */
+	uint64_t	mnt_taskqueue_flags;	/* (d) unmount flags passed from
+						   taskqueue */
+	unsigned int	mnt_unmount_retries;	/* (d) # of failed deferred
+						   unmount attempts */
 };
 #endif	/* _WANT_MOUNT || _KERNEL */
 

From nobody Mon Nov 23 01:43:57 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXpd95qlrz71dbj
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:43: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpd93GJqz4r3h
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:43:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795398237;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=rFMM+wIffD8/4cWfsXSskscr5HW0kXAXvp5nk/Ts7Aw=;
	b=ww7Q1GJMcN53Oqs7PICyXqilzAgbmPa4tc3nFhGzDlvg9h1/ihAhrd7Iy07ecb/8F8ws9o
	vCA8NrUKfVtkjoD8Ya9BcrVziVzgO99kcJyzXAgL1dujmbu7h7KjrDOFTR6b7fjbmmjcFu
	99tb0EuFJiigAZ0k15t3I5n6zanPNT2+m5AzA15+U6yCmuCbCAgXux9ijhXZCECFKkTtJc
	Nd0WC+u6BunSv2sDBR+G/5m16I4DkkxLALF5BJ22dvD9+CR7ApWjVbHN63vFf64pQXqv7U
	MviFGazY4XnMTPRyv4p6nWlfvAXW3YtKNjqsGQeY5ThP5iCg7FmMETknYvALRg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795398237;
	b=IfQgLobbMEifUV2R0DIBuF+KTqYGJK8m0I7w3PZBEU006pAjAjcaY9TCu4rToGfs0064Sc
	RTtWoe9q5xrx9yg5kLHs58TLqHMYrJxPulfS24INLNxzXEaI/PWG+gDKmV4t7MhnUZdjny
	aN4V7L0YQUmJTXPpcrkRqOQE6e3opYslVR0uCVJJI2EKvlzZ0JaNfCpw+21szNp96g8+fq
	OSpKlB1A9dEhQbZbm64elpf+zDrUYOgu9J4b7fRyCvtncmXb4E3xaCfezjv1GmkvvMd4X0
	LPlQzglyX2DkvcVbHOGUXJmPXs7Xj1l/ge6n5Kw+QoZtbBw79edbSxLdQkQjDA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795398237;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=rFMM+wIffD8/4cWfsXSskscr5HW0kXAXvp5nk/Ts7Aw=;
	b=hZHQBA9kiD4WuJI8LZ9lZmMJB69ceoEArG+c3tJLtuLQzJ4xJUsSvMC1JEYmA3008F7pP6
	0KeLZGrOG9/4fwxiN7ujzN8Sp/8P9xV9c6KT0fDpx4697039cGv3z+WPIBSba7OL1+3iY9
	3OUcD7CLQ4+EG8pWjQq/pk2SfUdAQiIuiqhtBZHez0z/PbrJp0iz+g1VLoDo9kTETcbmNo
	GC4h2FqaU5FnJEWzXGAP61qHEanur6EVqgrjrP3ZbbB+GHp6ixb/8EqU7d9U9AaRADjep2
	XcShmd/wsX6qlWuHhVr+XtZeipnR3SbaIpwxyeP9zbAdEE4rc6842rPvdnzTqQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpd92S6fzTdm
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:43:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 55c2
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:43:57 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Konstantin Belousov <kib@FreeBSD.org>
Subject: git: d689a4aad9cf - main - sys: use bdflush task to fsync mntfs devvp for all filesystems
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: d689a4aad9cf058b7a842d53b71903b25201f2f0
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:43:57 +0000
Message-Id: <6b039a5d.55c2.3075ac95@gitrepo.freebsd.org>

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=d689a4aad9cf058b7a842d53b71903b25201f2f0

commit d689a4aad9cf058b7a842d53b71903b25201f2f0
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-11-20 01:17:02 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-23 01:43:25 +0000

    sys: use bdflush task to fsync mntfs devvp for all filesystems
    
    The bufbdflush() function calls VOP_FSYNC() on unlocked devvp similarly
    to ffs_bdflush() in ffs_snapshot.c. Move the bdflush task into struct
    mount as a generic facility. Convert both UFS and msdosfs to use it.
    
    Reported by:    llm-postcr
    Tested by:      pho
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
---
 sys/fs/mntfs/mntfs_vnops.c      | 26 ++++++++++++++++++++++++++
 sys/fs/msdosfs/msdosfs_vfsops.c |  2 ++
 sys/kern/vfs_bio.c              |  2 +-
 sys/kern/vfs_mount.c            |  1 +
 sys/sys/mount.h                 |  5 +++++
 sys/ufs/ffs/ffs_extern.h        |  1 -
 sys/ufs/ffs/ffs_snapshot.c      | 24 ++----------------------
 sys/ufs/ffs/ffs_vfsops.c        |  7 ++-----
 sys/ufs/ufs/ufsmount.h          |  1 -
 9 files changed, 39 insertions(+), 30 deletions(-)

diff --git a/sys/fs/mntfs/mntfs_vnops.c b/sys/fs/mntfs/mntfs_vnops.c
index 45c429c34c07..e2ca132d61c4 100644
--- a/sys/fs/mntfs/mntfs_vnops.c
+++ b/sys/fs/mntfs/mntfs_vnops.c
@@ -28,6 +28,7 @@
 #include <sys/param.h>
 #include <sys/conf.h>
 #include <sys/mount.h>
+#include <sys/taskqueue.h>
 #include <sys/vnode.h>
 
 /*
@@ -51,6 +52,17 @@ mntfs_reclaim(struct vop_reclaim_args *ap)
 	return (0);
 }
 
+void
+mntfs_fsync_task(void *arg, int pending)
+{
+	struct vnode *devvp;
+
+	devvp = arg;
+	vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
+	(void)vn_fsync_buf(devvp, MNT_NOWAIT);
+	VOP_UNLOCK(devvp);
+}
+
 struct vop_vector mntfs_vnodeops = {
 	.vop_default =		&default_vnodeops,
 
@@ -79,6 +91,7 @@ mntfs_allocvp(struct mount *mp, struct vnode *ovp)
 	getnewvnode("mntfs", mp, &mntfs_vnodeops, &vp);
 	vp->v_type = VCHR;
 	vp->v_data = mp;
+	mp->mnt_bdflush_task.ta_context = vp;
 	dev_ref(dev);
 	vp->v_rdev = dev;
 
@@ -95,3 +108,16 @@ mntfs_freevp(struct vnode *vp)
 	vgone(vp);
 	vput(vp);
 }
+
+void
+mntfs_fsync_delayed(struct vnode *vp)
+{
+	struct mount *mp;
+
+	if (vp->v_op == &mntfs_vnodeops) {
+		mp = vp->v_data;
+		taskqueue_enqueue(taskqueue_thread, &mp->mnt_bdflush_task);
+	} else {
+		(void)VOP_FSYNC(vp, MNT_NOWAIT, curthread);
+	}
+}
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c
index cdb3cc30fdff..236ebc5575bf 100644
--- a/sys/fs/msdosfs/msdosfs_vfsops.c
+++ b/sys/fs/msdosfs/msdosfs_vfsops.c
@@ -863,6 +863,7 @@ mountmsdosfs(struct vnode *odevvp, struct mount *mp)
 error_exit:
 	if (bp != NULL)
 		brelse(bp);
+	taskqueue_drain(taskqueue_thread, &mp->mnt_bdflush_task);
 	if (cp != NULL)
 		g_vfs_close_unlocked(cp);
 	if (pmp != NULL) {
@@ -953,6 +954,7 @@ msdosfs_unmount(struct mount *mp, int mntflags)
 	if (susp)
 		vfs_write_resume(mp, VR_START_WRITE);
 
+	taskqueue_drain(taskqueue_thread, &mp->mnt_bdflush_task);
 	vn_lock(pmp->pm_devvp, LK_EXCLUSIVE | LK_RETRY);
 	g_topology_lock();
 	g_vfs_close(pmp->pm_cp);
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 868d7de7d6c8..f0f042147b55 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -2410,7 +2410,7 @@ bufbdflush(struct bufobj *bo, struct buf *bp)
 
 	bd = &bdomain[bo->bo_domain];
 	if (bo->bo_dirty.bv_cnt > bd->bd_dirtybufthresh + 10) {
-		(void) VOP_FSYNC(bp->b_vp, MNT_NOWAIT, curthread);
+		mntfs_fsync_delayed(bp->b_vp);
 		altbufferflushes++;
 	} else if (bo->bo_dirty.bv_cnt > bd->bd_dirtybufthresh) {
 		BO_LOCK(bo);
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index 39c9135f3f4c..27852c25961d 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -715,6 +715,7 @@ vfs_mount_alloc(struct vnode *vp, struct vfsconf *vfsp, const char *fspath,
 	TAILQ_INIT(&mp->mnt_notify);
 	mp->mnt_taskqueue_flags = 0;
 	mp->mnt_unmount_retries = 0;
+	TASK_INIT(&mp->mnt_bdflush_task, 0, mntfs_fsync_task, NULL);
 	return (mp);
 }
 
diff --git a/sys/sys/mount.h b/sys/sys/mount.h
index 30f4cc35dac0..962e4f9d7511 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -43,10 +43,12 @@
 #include <sys/tslog.h>
 #include <sys/_mutex.h>
 #include <sys/_sx.h>
+#include <sys/_task.h>
 #elif defined(_WANT_MOUNT)
 #include <sys/_lock.h>
 #include <sys/_lockmgr.h>
 #include <sys/_mutex.h>
+#include <sys/_task.h>
 #endif
 
 /*
@@ -281,6 +283,7 @@ struct mount {
 						   taskqueue */
 	unsigned int	mnt_unmount_retries;	/* (d) # of failed deferred
 						   unmount attempts */
+	struct task	mnt_bdflush_task;
 };
 #endif	/* _WANT_MOUNT || _KERNEL */
 
@@ -1109,6 +1112,8 @@ extern	struct sx vfsconf_sx;
 #define	vfsconf_sunlock()	sx_sunlock(&vfsconf_sx)
 struct vnode *mntfs_allocvp(struct mount *, struct vnode *);
 void   mntfs_freevp(struct vnode *);
+void   mntfs_fsync_delayed(struct vnode *);
+void   mntfs_fsync_task(void *, int);
 
 /*
  * Declarations for these vfs default operations are located in
diff --git a/sys/ufs/ffs/ffs_extern.h b/sys/ufs/ffs/ffs_extern.h
index 8ac2a6c44809..0dc52ee48b1e 100644
--- a/sys/ufs/ffs/ffs_extern.h
+++ b/sys/ufs/ffs/ffs_extern.h
@@ -228,7 +228,6 @@ void	softdep_freework(struct workhead *);
 #define	DATA_ONLY		0x00000002
 
 int	ffs_rdonly(struct inode *);
-void	ffs_devvp_bdflush_fsync(void *arg, int pending);
 
 TAILQ_HEAD(snaphead, inode);
 
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c
index 1a6e6b880822..121837647b33 100644
--- a/sys/ufs/ffs/ffs_snapshot.c
+++ b/sys/ufs/ffs/ffs_snapshot.c
@@ -123,11 +123,6 @@ ffs_sync_snap(struct mount *mp, int waitfor)
 {
 }
 
-void
-ffs_devvp_bdflush_fsync(void *arg, int pending)
-{
-}
-
 #else
 FEATURE(ffs_snapshot, "FFS snapshot support");
 
@@ -2200,26 +2195,11 @@ ffs_bp_snapblk(struct vnode *devvp, struct buf *bp)
 	return (0);
 }
 
-void
-ffs_devvp_bdflush_fsync(void *arg, int pending)
-{
-	struct ufsmount *ump;
-	struct vnode *devvp;
-
-	ump = arg;
-	devvp = ump->um_devvp;
-	vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
-	(void)VOP_FSYNC(devvp, MNT_NOWAIT, curthread);
-	VOP_UNLOCK(devvp);
-	altbufferflushes++;
-}
-
 void
 ffs_bdflush(struct bufobj *bo, struct buf *bp)
 {
 	struct vnode *devvp;
 	struct buf *nbp;
-	struct ufsmount *ump;
 	int bp_bdskip;
 
 	if (bo->bo_dirty.bv_cnt <= dirtybufthresh)
@@ -2234,8 +2214,8 @@ ffs_bdflush(struct bufobj *bo, struct buf *bp)
 		bdwriteskip++;
 	VI_UNLOCK(devvp);
 	if (bo->bo_dirty.bv_cnt > dirtybufthresh + 10 && !bp_bdskip) {
-		ump = VFSTOUFS((struct mount *)devvp->v_data);
-		taskqueue_enqueue(taskqueue_thread, &ump->um_devvp_fsync_task);
+		mntfs_fsync_delayed(devvp);
+		altbufferflushes++;
 	} else {
 		BO_LOCK(bo);
 		/*
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 9f13f049f7a2..5b6558f7fde6 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -1146,8 +1146,6 @@ ffs_mountfs(struct vnode *odevvp, struct mount *mp, struct thread *td)
 	ufs_extattr_uepm_init(&ump->um_extattr);
 #endif
 
-	TASK_INIT(&ump->um_devvp_fsync_task, 0, ffs_devvp_bdflush_fsync, ump);
-
 	/*
 	 * Set FS local "last mounted on" information (NULL pad)
 	 */
@@ -1206,8 +1204,7 @@ out:
 		free(fs->fs_si, M_UFSMNT);
 		free(fs, M_UFSMNT);
 	}
-	if (ump != NULL)
-		taskqueue_drain(taskqueue_thread, &ump->um_devvp_fsync_task);
+	taskqueue_drain(taskqueue_thread, &mp->mnt_bdflush_task);
 	if (cp != NULL)
 		g_vfs_close_unlocked(cp);
 	if (ump != NULL) {
@@ -1323,7 +1320,7 @@ ffs_unmount(struct mount *mp, int mntflags)
 		taskqueue_free(ump->um_trim_tq);
 		free (ump->um_trimhash, M_TRIM);
 	}
-	taskqueue_drain(taskqueue_thread, &ump->um_devvp_fsync_task);
+	taskqueue_drain(taskqueue_thread, &mp->mnt_bdflush_task);
 	vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY);
 	g_topology_lock();
 	g_vfs_close(ump->um_cp);
diff --git a/sys/ufs/ufs/ufsmount.h b/sys/ufs/ufs/ufsmount.h
index 4f57ef715865..d33b01e4425e 100644
--- a/sys/ufs/ufs/ufsmount.h
+++ b/sys/ufs/ufs/ufsmount.h
@@ -117,7 +117,6 @@ struct ufsmount {
 	struct	trimlist_hashhead *um_trimhash;	/* (i) trimlist hash table */
 	u_long	um_trimlisthashsize;		/* (i) trim hash table size-1 */
 						/* (c) - below function ptrs */
-	struct	task um_devvp_fsync_task;
 	int	(*um_balloc)(struct vnode *, off_t, int, struct ucred *,
 		    int, struct buf **);
 	int	(*um_blkatoff)(struct vnode *, off_t, char **, struct buf **);

From nobody Mon Nov 23 01:57:46 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXpx715hnz71flX
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 01:57: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXpx708Y5z4tJs
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:57:47 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795399067;
	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=WHPjNsmDeILrzHyh9TtmZ5UC4cdYiIMYY5Qo4yqaY1o=;
	b=L1DyNZNCUOR/Yrbs+DyQ0foZcVLMqNQRgF90UmBvYlCjVtrnt4dmRfSaXtyKgQKTwgBYu/
	NAtAWfeW0N5aadFglZT6UE2v7Z8LBZHPB87vMM/HRvbQnOuDbMtrshK4Tygv2Ob5zuZZbJ
	rU4DakwW3+wNaeiureXKblhzFjUdAXB7mIFHvToClYM5sgNhWvAA9Of/nLWPYoIfepmwYr
	acJ+0FKx+bJwCcOMbfVHZVvhsXvXFpsGhTy0pzraoO88NEVQn5dduHuTMcaeAEeYuik4/l
	zm9dGz2FlnwE6sZ2BBx1g57CrCd36E5ZmPrObtiWgCdrOWtkYlVGkrXdH4BEtQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399067;
	b=yiyJRNztugcPzQ54HxaUilpPvfIfvu3gUEx186LjdQPLaOc9qqS11PGLFYjd0RMC+SayMI
	i6ii093dIu1kC3CwHbOxN864xoWrViMVMzVlFu53M4DMcvonjrXzBjZKjA7mtWLCoOpfRG
	nxjB6CLIIABglbq5cEf1ZqfKdSquXyYUD4WqkpFvA8zGEzAdr5Au2h6Kk+UVw3cgd14gY+
	EtETU7egXmTdME0t6t82vd1fdzJbRLN/U9JdUUGXqI4AFR6A4d9IP/h8155i++cCBAH5dr
	+Qs+hrbv10SFEaIsuG1REZ/sC5+6UzxLf6AFfqwT+TTMTrkDfQASez452O7rrQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795399067;
	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=WHPjNsmDeILrzHyh9TtmZ5UC4cdYiIMYY5Qo4yqaY1o=;
	b=DeFw1eOzsgZoQiHjjXsWsCgM8XGU4QBUgVpLX4G9uqMyWyVwV+VlekP8ZTT36inHVtGm+0
	uK9M8nigMDqzGEhbZ1xXbiEDfHESvRB5/W73I/LAqGhMgeokufU09Y9ypE6YHnQNXTCbBv
	FTRELYU17mDl9ThFK04/VICg5V7AVQkirrspHCpTAt1SChB+bxZnvaHPNgT/+6jmj/swpm
	4sd2ZbaIzcl/AEjLjYHUJytEHjx/7m7RvPqhFlmYTWg3OULMkP1KwMjNlOFFwf/Rbn4ltR
	k57alh7oRgNHeVYOXEFHq2XLmd47IbFyDTqPOw4qTECyB3k76RX0gWBKLKpZeQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXpx66whGzTSM
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 01:57:46 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 7e0a
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 01:57:46 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Mariusz Zaborski <oshogbo@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 005e2e59079c - stable/14 - capsicum: add tests for copy_file_range
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 005e2e59079c88481f6a90384e85366946a2d827
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 01:57:46 +0000
Message-Id: <6b039d9a.7e0a.3fb71972@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=005e2e59079c88481f6a90384e85366946a2d827

commit 005e2e59079c88481f6a90384e85366946a2d827
Author:     Mariusz Zaborski <oshogbo@FreeBSD.org>
AuthorDate: 2023-09-28 13:27:27 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:57:36 +0000

    capsicum: add tests for copy_file_range
    
    Reviewed by:    emaste, theraven, kib, markj (all previous version)
    Differential Revision:  https://reviews.freebsd.org/D41967
    
    (cherry picked from commit 62d3f57c22eea353dcc3c4a2f70ef72a42a8cd83)
---
 contrib/capsicum-test/copy_file_range.cc | 228 +++++++++++++++++++++++++++++++
 contrib/capsicum-test/makefile           |   2 +-
 tests/sys/capsicum/Makefile              |   1 +
 3 files changed, 230 insertions(+), 1 deletion(-)

diff --git a/contrib/capsicum-test/copy_file_range.cc b/contrib/capsicum-test/copy_file_range.cc
new file mode 100644
index 000000000000..b785eb7f1e97
--- /dev/null
+++ b/contrib/capsicum-test/copy_file_range.cc
@@ -0,0 +1,228 @@
+#include <sys/types.h>
+#include <fcntl.h>
+
+#include <string>
+
+#include "capsicum.h"
+#include "capsicum-test.h"
+#include "syscalls.h"
+
+#define TOPDIR "cap_copy_file_range"
+#define INFILE "infile"
+#define OUTFILE "outfile"
+
+/* Test that copy_file_range() checks capabilities correctly.
+ * When used without offset arguments, copy_file_range() should
+ * require only CAP_READ on the source and CAP_WRITE on the destination
+ * file descriptors, respectively.
+ * When used with offset arguments, copy_file_range() should
+ * additionally require CAP_SEEK.
+ */
+class CopyFileRangeTest : public ::testing::Test {
+ public:
+  CopyFileRangeTest() {
+    int rc = mkdir(TmpFile(TOPDIR), 0755);
+    EXPECT_OK(rc);
+    if (rc < 0) {
+      EXPECT_EQ(EEXIST, errno);
+    }
+    wd_ = open(TmpFile(TOPDIR), O_DIRECTORY);
+    EXPECT_OK(wd_);
+    CreateFile(TmpFile(TOPDIR "/" INFILE));
+    CreateFile(TmpFile(TOPDIR "/" OUTFILE));
+  }
+  ~CopyFileRangeTest() {
+    close(wd_);
+    unlink(TmpFile(TOPDIR "/" INFILE));
+    unlink(TmpFile(TOPDIR "/" OUTFILE));
+    rmdir(TmpFile(TOPDIR));
+  }
+
+ private:
+  void CreateFile(const char *filename) {
+    int fd = open(filename, O_CREAT|O_RDWR, 0644);
+    const char *contents = "lorem ipsum dolor sit amet";
+    EXPECT_OK(fd);
+    for (int i = 0; i < 100; i++) {
+      EXPECT_OK(write(fd, contents, strlen(contents)));
+    }
+    close(fd);
+  }
+
+ protected:
+  int wd_;
+
+  int openInFile(cap_rights_t *rights) {
+    int fd = openat(wd_, INFILE, O_RDONLY);
+    EXPECT_OK(fd);
+    EXPECT_OK(cap_rights_limit(fd, rights));
+    return fd;
+  }
+  int openOutFile(cap_rights_t *rights) {
+    int fd = openat(wd_, OUTFILE, O_WRONLY);
+    EXPECT_OK(fd);
+    EXPECT_OK(cap_rights_limit(fd, rights));
+    return fd;
+  }
+};
+
+TEST_F(CopyFileRangeTest, WriteReadNeg) {
+  cap_rights_t rights_in, rights_out;
+
+  cap_rights_init(&rights_in, CAP_WRITE);
+  cap_rights_init(&rights_out, CAP_READ);
+
+  int fd_in = openInFile(&rights_in);
+  int fd_out = openOutFile(&rights_out);
+  off_t off_in = 0, off_out = 0;
+
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, NULL, 8, 0));
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0));
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0));
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0));
+  off_in = 20;
+  off_out = 20;
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0));
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0));
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0));
+  close(fd_in);
+  close(fd_out);
+}
+
+TEST_F(CopyFileRangeTest, ReadReadNeg) {
+  cap_rights_t rights_in, rights_out;
+
+  cap_rights_init(&rights_in, CAP_READ);
+  cap_rights_init(&rights_out, CAP_READ);
+
+  int fd_in = openInFile(&rights_in);
+  int fd_out = openOutFile(&rights_out);
+  off_t off_in = 0, off_out = 0;
+
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, NULL, 8, 0));
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0));
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0));
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0));
+  off_in = 20;
+  off_out = 20;
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0));
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0));
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0));
+  close(fd_in);
+  close(fd_out);
+}
+
+TEST_F(CopyFileRangeTest, WriteWriteNeg) {
+  cap_rights_t rights_in, rights_out;
+
+  cap_rights_init(&rights_in, CAP_WRITE);
+  cap_rights_init(&rights_out, CAP_WRITE);
+
+  int fd_in = openInFile(&rights_in);
+  int fd_out = openOutFile(&rights_out);
+  off_t off_in = 0, off_out = 0;
+
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, NULL, 8, 0));
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0));
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0));
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0));
+  off_in = 20;
+  off_out = 20;
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0));
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0));
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0));
+  close(fd_in);
+  close(fd_out);
+}
+
+TEST_F(CopyFileRangeTest, ReadWrite) {
+  cap_rights_t rights_in, rights_out;
+
+  cap_rights_init(&rights_in, CAP_READ);
+  cap_rights_init(&rights_out, CAP_WRITE);
+
+  int fd_in = openInFile(&rights_in);
+  int fd_out = openOutFile(&rights_out);
+  off_t off_in = 0, off_out = 0;
+
+  EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, NULL, 8, 0));
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0));
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0));
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0));
+  off_in = 20;
+  off_out = 20;
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0));
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0));
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0));
+  close(fd_in);
+  close(fd_out);
+}
+
+TEST_F(CopyFileRangeTest, ReadSeekWrite) {
+  cap_rights_t rights_in, rights_out;
+
+  cap_rights_init(&rights_in, CAP_READ, CAP_SEEK);
+  cap_rights_init(&rights_out, CAP_WRITE);
+
+  int fd_in = openInFile(&rights_in);
+  int fd_out = openOutFile(&rights_out);
+  off_t off_in = 0, off_out = 0;
+
+  EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, NULL, 8, 0));
+  EXPECT_OK(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0));
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0));
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0));
+  off_in = 20;
+  off_out = 20;
+  EXPECT_OK(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0));
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0));
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0));
+  close(fd_in);
+  close(fd_out);
+}
+
+TEST_F(CopyFileRangeTest, ReadWriteSeek) {
+  cap_rights_t rights_in, rights_out;
+
+  cap_rights_init(&rights_in, CAP_READ);
+  cap_rights_init(&rights_out, CAP_WRITE, CAP_SEEK);
+
+  int fd_in = openInFile(&rights_in);
+  int fd_out = openOutFile(&rights_out);
+  off_t off_in = 0, off_out = 0;
+
+  EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, NULL, 8, 0));
+  EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0));
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0));
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0));
+  off_in = 20;
+  off_out = 20;
+  EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0));
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0));
+  EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0));
+  close(fd_in);
+  close(fd_out);
+}
+
+TEST_F(CopyFileRangeTest, ReadSeekWriteSeek) {
+  cap_rights_t rights_in, rights_out;
+
+  cap_rights_init(&rights_in, CAP_READ, CAP_SEEK);
+  cap_rights_init(&rights_out, CAP_WRITE, CAP_SEEK);
+
+  int fd_in = openInFile(&rights_in);
+  int fd_out = openOutFile(&rights_out);
+  off_t off_in = 0, off_out = 0;
+
+  EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, NULL, 8, 0));
+  EXPECT_OK(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0));
+  EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0));
+  EXPECT_OK(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0));
+  off_in = 20;
+  off_out = 20;
+  EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0));
+  EXPECT_OK(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0));
+  EXPECT_OK(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0));
+  close(fd_in);
+  close(fd_out);
+}
diff --git a/contrib/capsicum-test/makefile b/contrib/capsicum-test/makefile
index ad697f160e2e..e55393bbf131 100644
--- a/contrib/capsicum-test/makefile
+++ b/contrib/capsicum-test/makefile
@@ -1,5 +1,5 @@
 all: capsicum-test smoketest mini-me mini-me.noexec mini-me.setuid $(EXTRA_PROGS)
-OBJECTS=capsicum-test-main.o capsicum-test.o capability-fd.o fexecve.o procdesc.o capmode.o fcntl.o ioctl.o openat.o sysctl.o select.o mqueue.o socket.o sctp.o capability-fd-pair.o linux.o overhead.o rename.o
+OBJECTS=capsicum-test-main.o capsicum-test.o capability-fd.o copy_file_range.o fexecve.o procdesc.o capmode.o fcntl.o ioctl.o openat.o sysctl.o select.o mqueue.o socket.o sctp.o capability-fd-pair.o linux.o overhead.o rename.o
 
 GTEST_DIR=gtest-1.10.0
 GTEST_INCS=-I$(GTEST_DIR)/include -I$(GTEST_DIR)
diff --git a/tests/sys/capsicum/Makefile b/tests/sys/capsicum/Makefile
index 2dc499a14b42..24f488b2d14f 100644
--- a/tests/sys/capsicum/Makefile
+++ b/tests/sys/capsicum/Makefile
@@ -23,6 +23,7 @@ SRCS.capsicum-test+=	\
 	capsicum-test-main.cc \
 	capsicum-test.cc \
 	capability-fd.cc \
+	copy_file_range.cc \
 	fexecve.cc \
 	procdesc.cc \
 	capmode.cc \

From nobody Mon Nov 23 02:02:24 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXq2S4Wx0z71gKY
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 02:02: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXq2S3VcPz4vLk
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:02:24 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795399344;
	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=AktSkVNQGCNjPibjE0D7qeK9aZUIoPpZxtzEI7ns0C0=;
	b=gEnsAl/dUBnPXi+COyDttd7fTIREHz+otahqdnWi9kB6evzUNykWTlwi/W3oUfjf57Ziyp
	oo4HWxj/p1RPx7eAatASqDxItPxzWpCO3CaOzlSDQYfyHhamOuHAW3ei6Wt8IySu5b0WHU
	m7wnXgcYYy+gZa8iAIvb1FdVKC7/R43d53Ss/5yBoRlWRZp+g6mjm4NrWN5atK4teeQDai
	l25LQdzDOEi5xa6/1UqQyI5vfNCmgr+4/zPMchwBK9lQg17QPKtc+/1iHxydAK+371wXyo
	iHU7eH295w+mOtBeCD52kUlVyoOgakHq5vxHwc2d/ZetD5T6jypqrAJDe2K9tA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399344;
	b=BRuEsbSraIPUOwuCDejeBnpo9gJgajSkILX4zPllK1/x6CvzV/YpjISY4f8wv0NTEMTu29
	NPDu9sVVx02wOvcOt9UNTIsT73fTAJP0TeAe7q92f3uelca1gZgUo4bdVjnUlquql5jRL0
	bd1OmRAHHWSFsCiUlVVniFfVx7KyRGE3aUVSpym9hJ2Ir/DS3YiiYul+0Jupdh7xk2kaax
	EEsUx4BGK0Lrpu2Zm5xB/B533tLRMSpQ2jUj8MfXrc7IKaQm6dMMmcra9JHXc5CduaIa6t
	EUU9i1VPT0UH0GufPRRZTgcgzWBtwngjB6InEAMobEtLRD4MSNOVKt6REW09EQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795399344;
	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=AktSkVNQGCNjPibjE0D7qeK9aZUIoPpZxtzEI7ns0C0=;
	b=Mv9jwLLOKOBGRBJ6tMYQ17pZX7MP+wPuUJiOrm2nmesF8eHNCuRlEt2DCCDKV/ESXfypaf
	Sgxp8ZZnCEayG8AxPUSTEneTmAePY+BAoCvra0AUTNoYxwaqqWGlip9o2ZScVG26eQ5rA3
	+2Za69Wo0Y0ZJ5ZZpkpZSxKrJ1JfOXw19mRUnQcWju/OTOxfnM3FBpurtYMxQCRQcq/uF0
	oVn08wVRvpetbwkYooMcr3HFelqvuDLivLOdYFECu3/2GZdNPxDn+7AiWU0aQbQnXJcpDL
	aLvZiZVDQ/M1EhVIYFF//7lVgtOoiEqWv35INKzHepWkXnApGXvhrrCvNfysnw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXq2S38dszV8j
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:02:24 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 96b0
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 02:02:24 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: _ov4 <ov4@ov4.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 2a25b514f1c6 - stable/15 - poll.2: document that poll is not restarted after signals
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 2a25b514f1c6198698ace227d1db3ec67e124010
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 02:02:24 +0000
Message-Id: <6b039eb0.96b0.e516935@gitrepo.freebsd.org>

The branch stable/15 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=2a25b514f1c6198698ace227d1db3ec67e124010

commit 2a25b514f1c6198698ace227d1db3ec67e124010
Author:     _ov4 <ov4@ov4.org>
AuthorDate: 2026-11-06 06:16:28 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 02:01:15 +0000

    poll.2: document that poll is not restarted after signals
    
    Signed-off-by: _ov4 <ov4@ov4.org>
    Reviewed-by: ngie
    Pull-Request: https://github.com/freebsd/freebsd-src/pull/2526
    (cherry picked from commit 72a80a4733b2e2cf7a3e004e961f0fbba9aaa31f)
---
 lib/libsys/poll.2 | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/lib/libsys/poll.2 b/lib/libsys/poll.2
index 6e6ed33f7a6b..12ceb35d22ec 100644
--- a/lib/libsys/poll.2
+++ b/lib/libsys/poll.2
@@ -195,6 +195,18 @@ struct timespec {
 	long    tv_nsec;        /* and nanoseconds */
 };
 .Ed
+.Sh IMPLEMENTATION NOTES
+The
+.Fn poll
+and
+.Fn ppoll
+system calls are not restarted after a signal handler returns,
+regardless of the
+.Dv SA_RESTART
+flag on the interrupting signal;
+they fail with
+.Er EINTR
+instead.
 .Sh RETURN VALUES
 The
 .Fn poll

From nobody Mon Nov 23 02:02:25 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXq2T744Xz71gSW
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 02:02: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXq2T4Tytz4vhk
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:02:25 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795399345;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Cwz0sNa5q2xwZg3wqVVjjMG5WqLmguDk+HPgKz178Y8=;
	b=rIWoftmR9zHRbG85JRGo1LbCpEc9Oed0dUENwUdK1b2RGXmRaCaLF4GB1PGnCHZQzJgXen
	LgFXPTsBhSi3eNYVvfPEQkeDQNiFLSZQDsdKgJR9DZMSR8et1apBMStraF7x5B1bE1y07L
	cruANg2ZW+6ykabTVVe1pMycy/VKz7hNfyLJY3pUmWv0ZP7rx0kkXps8HsbOCKmXxfuwKy
	4x0ug3WvK6HHk0deE0o/bZJMSk1Vf9YfhLiZQUBNh/9lZEEHH25n+dmNXVSuVRKmbRt824
	Qo9TihfFbxNJProsUI0q58la0lDwLtluwTJPMbAuhYh+OrLhkoyeuunly7Yv5A==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399345;
	b=O7uhu21Nl6P+EKfI2Wmx1RgvCI5lqv7EoaT1cSO+TcF8ts24oE9xvjKLUz1qg+TP0lb6lC
	xFVGArjpzMxSl5nZzKJSvw17hO+RrCXB567VQhphvxUqMVSOxeSuobPYB8GpuYmn6747QS
	JNAyYWditbZISwv9nzs8TBzLTz54kKySlh2rmb0qae8nG+zsYnmxAonofRuR62vdaqqbvR
	ZlgVP184p3/Or7JqsXJgt1bEIA7G8Axc3EbbNipFV/JM25DRFrUyuCIsfSVN1ZoWEO4vED
	6F7M+o/0slPYwrzS9bxzAi3XXUXm0ZRvMA/19KA7dqw+viKJmIzNmpMRrgIRrA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795399345;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Cwz0sNa5q2xwZg3wqVVjjMG5WqLmguDk+HPgKz178Y8=;
	b=Igp4qnAOE7tmHHqfwYVy0ajzabSm5erfpcdYZ9QzM5Ch6VPQyPbf6wocvtds0ekEQRVcuD
	A7ilZydE3RVBqTq53Hdnu6jqGzV+3beT9Q+ZOL2/ZbOF1lJIMAOJUFdp4h0ox1fX0+z083
	a/WzAfjawv8QA4aAdDZZBzpRSIB1YK/e0GNKwCf69mkczhn11MnkOqZ0lvVCfqJAY2q3lw
	agl05bSNZeFt9PStDWWNI8uplR8i+0BU4IYTibIvjrFwa9vuSyOtUYH5h9IgYxuz3ieERk
	oSWgoIX0m+CoQpUAgSZSLWfgauYwcXOc5VnJopNbGCuMe5t8/4KF2DgRtKZs0Q==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXq2T3TkMzVM1
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:02:25 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 8c21
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 02:02:25 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 64a648b8ecd8 - stable/15 - libsys/poll.2: bump .Dd for the prior change
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 64a648b8ecd87302b1ab62171e3778d6c21d6164
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 02:02:25 +0000
Message-Id: <6b039eb1.8c21.103760f1@gitrepo.freebsd.org>

The branch stable/15 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=64a648b8ecd87302b1ab62171e3778d6c21d6164

commit 64a648b8ecd87302b1ab62171e3778d6c21d6164
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-11-09 05:37:49 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 02:01:15 +0000

    libsys/poll.2: bump .Dd for the prior change
    
    MFC after:      1 week
    MFC with:       72a80a4733b2
    
    (cherry picked from commit 89d6ddee20281270934c73b41d07f04e9bfc86bc)
---
 lib/libsys/poll.2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libsys/poll.2 b/lib/libsys/poll.2
index 12ceb35d22ec..0d1643ca31fb 100644
--- a/lib/libsys/poll.2
+++ b/lib/libsys/poll.2
@@ -27,7 +27,7 @@
 .\" (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 December 11, 2024
+.Dd November 08, 2026
 .Dt POLL 2
 .Os
 .Sh NAME

From nobody Mon Nov 23 02:02:26 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXq2W1wt7z71gYd
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 02:02: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXq2V4ZN9z4vfv
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:02:26 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795399346;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Z1mNSRzHQunatKL+/OOezTPZBb1RDLagqUnTou6KuvQ=;
	b=MZu7hSxZMlw4duLuz3hWMlsFpFCegw58aY/0/6zKukC/9zXVq0PlpNIt5v71HH8hnHsvnR
	RMH8OEjyto0196hWpjKkSR0dktDzhh1ODgSJd9zmNGUxxhLpd+DKyFmNQS5pr2Uae1aXYc
	jtNSeRwtMwMsKzkl44QJH/2AgT+HC96Snj9bfs9DGbon40OuR2qFjnbTd/uludOUO4ob/k
	FECBOFsjo9zH03lwVj++qHC9mXkFzHWXWfnSoc3uEjZobq0W+fr0mWiFIDgwDfuIbuTXsu
	Aj55slV/iMa86N0npAl5kKQjMRdgRbCoSiGi2v5lrrbsSMgx3ls3G3AiTEjJaA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399346;
	b=khyGNkdRWH/3E+7/FFnnGit4ATpSzRq0ix1/cmgd8RU4dGzzMiXBDTklnehDvzC2mGoKTK
	9RjpaQPEaj1boa2jO4tHLINDdz3sBMAqetUysmEqN8HcPgC8X+W+fCQzWhILKFV1i4sqaG
	5isYFxqX8fLida40XS51VvhEr188jzOMxCTHVVHMrLsBnkEiQpLe9zRIQqyMckIQybz7xW
	TVgpQqxETALSgBX9BmdsjJ87L+sOtY1Pzpr2RcAFEFP3bdcWq7ETciUC5caV4eegPcbtcw
	HAJfpGwl3YdWJXDCKuNExdUOtl+MYYxWkYK5Ld2qMKHCwL6ZiSYwHbnLDEJueA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795399346;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Z1mNSRzHQunatKL+/OOezTPZBb1RDLagqUnTou6KuvQ=;
	b=DHzJOYtD5LsuJgnHoi3dXvtRD2W9wcn1Nr/vHMUYJqQ8ctdoOZ04LbidIAqaa7kJU4Jcyj
	9HsCM5w2TizqW2ezy54cySHzyOYeO9qCmttatUqBrRQJDUgRf6y1NiCvqhiVlQFm3E90rg
	cpofiH5aFe6ptRGF/3rQTasPFtUs9jRkukdxVHQOBSKxKM6nsG9aVE/54RXppy8uIgY2as
	2tj6TNKK8tTNdItN7HFZdGWUctAhqSyCXNGIY/gKy0Qubbg5xcsD6/ucDMhqdbzUWiVp87
	3JPoO72QwpBL8dYkL/WYPqnMiQjcoCX4qVR7bxYfSPD0uRLBoQEAGnLJLSKm8w==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXq2V3r3HzVM2
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:02:26 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 907d
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 02:02:26 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 246b08ec16f7 - stable/15 - libsys/ppoll.2: fix .Dd modification to manpage
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 246b08ec16f701ec56cd6359e6df500f05fc7cee
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 02:02:26 +0000
Message-Id: <6b039eb2.907d.2af6d1b@gitrepo.freebsd.org>

The branch stable/15 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=246b08ec16f701ec56cd6359e6df500f05fc7cee

commit 246b08ec16f701ec56cd6359e6df500f05fc7cee
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-11-10 05:22:22 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 02:01:15 +0000

    libsys/ppoll.2: fix .Dd modification to manpage
    
    Reported by:    gcc 14
    Fixes:  89d6ddee2028 ("libsys/poll.2: bump .Dd for the prior change")
    
    (cherry picked from commit b4a0f17b35fd862feef3e1284926da48a6aad694)
---
 lib/libsys/poll.2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libsys/poll.2 b/lib/libsys/poll.2
index 0d1643ca31fb..648417d0b1a2 100644
--- a/lib/libsys/poll.2
+++ b/lib/libsys/poll.2
@@ -27,7 +27,7 @@
 .\" (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 November 08, 2026
+.Dd November 8, 2026
 .Dt POLL 2
 .Os
 .Sh NAME

From nobody Mon Nov 23 02:04:41 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXq562qZWz71hC5
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 02:04: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXq560WjQz3Cqg
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:04:42 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795399482;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=4g1KgS2+wnN1SLqInn+WzM8eIQpJy3hcVyF1zxBV3xI=;
	b=xkaULOhGoekEI+F+IJJGYbwYljZg2Gjy5+mLd9mwLKid9K76Z0xi1yC8YLhbfo1Skt26SI
	ByX8pQvr4yC4rZp+ZdS1O29HOd6Q9MW7PkEq5EIvsJsW5qn3EdQM4tQWPGufq/DXLIMLvq
	+CfTH/o63tYeM+9ip8CwY5yNcHhygrCGIJPkStcZ0pT8y62EONeV13URWuTODFZ7nkSwUc
	Dq3TgnAzjATYqs9WIgwXbUJzOyaN7/2IaUJLXWjnaK85Gi9LpbF/3TMS83JJMuIegfIoQ/
	6XxmL0Q0AvyQ5IY0rgBM2PreEMU0xU7MU0ojba++m5h+DYmXv0IgMgCuXSRlMw==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399482;
	b=QOjhqHfHikWX+abz1ALDPFxcQ/swVaIwWJN/PL7CPHHD+kkAyElSlcpkbR/qokKDXfew5Y
	b/U9mia4I58pwHgtlBJPACUhuwb9bp+eDLeninB/PSAchrGX/3ipjm9dm69+Q9QsgKTRo5
	QCHT2V0MB52d0GLcx9lRmcmJZ0YBr+mjPbcSZvsAFgFLoarhITWAn5HM4kHn2i/aJlMe7U
	B/ClMMLYOyWPk5xjaYZe6QL+9AolW25FBqRfjnnV1ZLfJ5+hOWa6C93hy2lbZwb0Vn7L1L
	5/CavwyWboyEKwcuiRBt8c9wZHI8D55rMhOvsispnkMomYJ+Y1UpQJ4n752Xcw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795399482;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=4g1KgS2+wnN1SLqInn+WzM8eIQpJy3hcVyF1zxBV3xI=;
	b=pgeFv4qA8BD4vYWxrGcQtwzRj5LNu0ObSnZKWh78+us38VEpl3qsdiw6oNnv+aauvuRORz
	2caDF2Y6gLENS9kFGQOfaEAO/GnrzrnCADiA2QzGzCqZXG9VyJ9V8aPRRiOsBiH9IBGA//
	QMtGvYA9eylBycxMAQJ3TiV4QbwQ25SZLWHRPpG9JaCZIL/LSu9m287k/6KBcQ1Fmn+KTi
	CyKsibuBavCwrjlpErBS7yZJ4XVRdho1P2O7MwI6sYRBcUJl/VI1y6P5QWQk5n7wirRgfL
	cb4U5Qud3qhCzjWi1gGaDcTg4TGwYxJBhgT5eX97wnBV5/5x72iV0iXIp5m1AQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXq556RrLzVqv
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:04:41 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 8c95
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 02:04:41 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 755406d1679d - stable/14 - usr.bin/diff/tests/diff_test: add SPDX ID
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 755406d1679d3dadf96aafc2591ce32b28449891
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 02:04:41 +0000
Message-Id: <6b039f39.8c95.1755f3d1@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=755406d1679d3dadf96aafc2591ce32b28449891

commit 755406d1679d3dadf96aafc2591ce32b28449891
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-11-03 03:45:44 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 02:04:36 +0000

    usr.bin/diff/tests/diff_test: add SPDX ID
    
    The SPDX ID makes the script's licensing more explicit.
    
    MFC after:      1 week
    Reviewed by:    bapt
    Differential Revision:  https://reviews.freebsd.org/D60908
    
    (cherry picked from commit a7ec00b71715c36eb60822bf52af5637f3a8d2f3)
---
 usr.bin/diff/tests/diff_test.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/usr.bin/diff/tests/diff_test.sh b/usr.bin/diff/tests/diff_test.sh
index 19e9bfb25728..4c2ae101ca26 100755
--- a/usr.bin/diff/tests/diff_test.sh
+++ b/usr.bin/diff/tests/diff_test.sh
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
 atf_test_case simple
 atf_test_case unified
 atf_test_case header

From nobody Mon Nov 23 02:04:53 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXq5K5fbsz71gy6
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 02:04:53 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXq5K4T3Zz3D75
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:04:53 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795399493;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=+6+BCWCKBr4U56Wiug54eIkrSl21uDnTXgBE9e99E9w=;
	b=FhPzucv3f+PAfBhhv2Ox69m4mXDVMQYzAamOWok1c4XVtJ+n9PKi12PfA9xfwCePzgjhfR
	mwQGpOimIZ9GJVzqDwu835oTMHog/C8nRrttXtDqJ+iUJ0lOPV0vaxCLEX41tPH1/fLuPh
	WQ+DBmlcVoyzbgpqQ7CM1IAnHDF+5S2vMGv/Iq37V1Nn0T/spMoyLBmElT+gnsKsTjyTtL
	sx9suEbwxrJZzIu499Tgul1CfLuf1UF5g3LpKvqWunubS4hRMLATa0l80GNCaNwYqlIHkD
	VheFUiVJxvi9nffqTx7hdnizKeBR6DWce9YwPEqapD6ptHHzDwEQSFhVfT82yg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399493;
	b=wxQ0NUvQultN6i2qEcAHpxpq7fFvuNvqCjJCNKETWHVreX+Spf/+8CzCLczN+ZUdG4kv+i
	fTElW0ybWenCx4iBKZbEddIDmp/QqqbVW3swsoTWVEfpCoRIJEA7wz+ks8hvT2n9Hemq8Q
	39N/pvZJ/yxFmkE7NvtHlVQLdPkqfXGrfB8zaMzNhqREjjfNY92roD+xfcgrTBd6bCxuBO
	RX5JZ7yxmLGZh83E7zuihhVmWCddEyjHxS6zf4DHNTsSGKeMhzl47MHL0tFP6w5oIoxl8x
	08/UCnb0GolxMrKFGhwqt659ZocTfe8+W2flAtk6te9NuWBb6R5tewn+RgH3CQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795399493;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=+6+BCWCKBr4U56Wiug54eIkrSl21uDnTXgBE9e99E9w=;
	b=FIstvb6oEiavr/UXrWL10Vr9EaKXgZ+Ucor3YhC+7bED3JN/11Yr5UfXsiLfrEJYtSb0JB
	UcX+GjMsYetkY08hqlOoyHrMjz6G6THR+3BSQbjIVykG7SuMFghXxC/+VVQUFc6GoYGPs4
	WPziMrc34YSU37IzKXZfkvjH5bgtswukFGeCtK7y6YeajP1y+caRhDFtFlR+Q2W+fMBGFw
	ZyaBkoGxQyhUQfVbAZXun8aSU+HPsHyWR+VHEo+s/1d7ZWuob6pyAnDmfg1DcJid//tkJ7
	+u0/ibMczEaS8l/i57h8Wbth6lbDsXJ8FdxWOw2gtt537Khqk+R0jrIijmpPnw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXq5K34CtzVXD
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:04:53 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 9332
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 02:04:53 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 55da3d8b5254 - stable/15 - usr.bin/diff/tests/diff_test: add SPDX ID
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 55da3d8b525431de28fbf18891248acc78588361
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 02:04:53 +0000
Message-Id: <6b039f45.9332.3b33803@gitrepo.freebsd.org>

The branch stable/15 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=55da3d8b525431de28fbf18891248acc78588361

commit 55da3d8b525431de28fbf18891248acc78588361
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-11-03 03:45:44 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 02:04:48 +0000

    usr.bin/diff/tests/diff_test: add SPDX ID
    
    The SPDX ID makes the script's licensing more explicit.
    
    MFC after:      1 week
    Reviewed by:    bapt
    Differential Revision:  https://reviews.freebsd.org/D60908
    
    (cherry picked from commit a7ec00b71715c36eb60822bf52af5637f3a8d2f3)
---
 usr.bin/diff/tests/diff_test.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/usr.bin/diff/tests/diff_test.sh b/usr.bin/diff/tests/diff_test.sh
index 872103b24cef..fa2e1a79a6a8 100755
--- a/usr.bin/diff/tests/diff_test.sh
+++ b/usr.bin/diff/tests/diff_test.sh
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
 atf_test_case simple
 atf_test_case unified
 atf_test_case header

From nobody Mon Nov 23 02:05:13 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXq5k20QXz71hFj
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 02:05: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXq5j6hvJz3Dct
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:05:13 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795399514;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=K3Eq5GdoEINQ1hniB8hQSQ9etJVuPllbwjErTHs1TmU=;
	b=GzckQr7LN8uzw0wcCYf7ucDRGvhPvE/tE9ulXCP+NsOR15ZqUvwUsjZhja2HKNxXJN7jyU
	MAZax/jdIUFqO1JpJhvQopKj4swggIfqrjQLrDGZLlB4T5ZNgGH3a2Z/6/s0GhJ71+WtTU
	lJyHJLEJpClgVtUSt3wb/7tkLaMkRgCe3DCKtkZBK1B+to13f82/KWtwf3BYYsu8Ia47nH
	6tb7I8clNieizKYvDg7K4/c5X9OmEiWm6iyclQwwCXf7PS7sFfsEKkqXud3tVzlQ/ix10P
	l/0/wg1BNl9scHr0nb0v0PQpkJL9V2Y7ToQ6ecdcq2beqKszFLvrEPiPuyA/Ng==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399514;
	b=qDccMqcpYJANOlGwtx2wDf1mjMd1Kbr46RRdLQm+ij0SXEr6E8I91eIzYbbv06CRuavLjM
	be9wZNMrPWTN0IfLSaNIzc9aECrECI5LEaaK4P/IIvHNHR2hyYrXZ8tgdIkg4aYjMPkfvM
	Uu2ikAR1MyoKGLVtKJ3nV/v+ruH9gTpogp3gsYGC+nBidt29Xoe71BA6SW5EGF8lxvptin
	S4o2aeQxkjEmkBA3R8YSydPwcvRHVjM/m4urmJrxReccy+64lfr2VlVG0SIn//WblBTbh+
	1rvt3/ZF1qrbA3l0tCuZXrSlI63xmJPcHpDzk1jDg/TGD9bCf4gYrlbQA9lGRQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795399514;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=K3Eq5GdoEINQ1hniB8hQSQ9etJVuPllbwjErTHs1TmU=;
	b=L5YRWI9poJPoDP3DqIOd8xPxdF3TE4EI5FgNWAO5y9hNJahGRf+aSDIOMPnE3hYw+1cSPX
	y7uURscdxUxV8sJ34tYOJwaOIFoUo03U5b+0u7WZnZu5GYSaOAUDLELmqKtYHt4MC+8KrJ
	c+XG3NdbDw1y+E/BKpnutp4awxP6RDYt689iFz5wDta4jx+hIBv2vGCmEsFzRIwnJ/+7eF
	W4wK96A38pNa8Sul3W9EgFEWmWaLPpXB5U76SV6CQLN6w4Sx1aMXHS+m1XyCebidNtT+ms
	GzrmhJzVgtLUSjXX5cOdpNeX1asJZFNJwj9FHezs9z7JV0EL5MgFfkel6v4s+w==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXq5j64B8zVqx
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:05:13 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 923c
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 02:05:13 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 25b8f5350bcc - stable/15 - net/ieee_oui.h: clarify how `OUI_FREEBSD_BASE` is managed
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 25b8f5350bccd7dffa3eca089b3d2e3c85cdf3ac
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 02:05:13 +0000
Message-Id: <6b039f59.923c.1dee079d@gitrepo.freebsd.org>

The branch stable/15 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=25b8f5350bccd7dffa3eca089b3d2e3c85cdf3ac

commit 25b8f5350bccd7dffa3eca089b3d2e3c85cdf3ac
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-08-09 05:25:03 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 02:05:06 +0000

    net/ieee_oui.h: clarify how `OUI_FREEBSD_BASE` is managed
    
    Note that the FreeBSD Foundation manages the current value
    associated with `OUI_FREEBSD_BASE`.
    
    Trim trailing whitespace in comments in the change while here.
    
    MFC after:      1 week
    Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/82
    
    (cherry picked from commit 529e9a00ddd3a207f3841c6581c9f1a23532972e)
---
 sys/net/ieee_oui.h | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/sys/net/ieee_oui.h b/sys/net/ieee_oui.h
index b5dd9fccefe1..553d9fcd3ba1 100644
--- a/sys/net/ieee_oui.h
+++ b/sys/net/ieee_oui.h
@@ -30,18 +30,21 @@
  *
  */
 
-/* Organizationally Unique Identifier assigned by IEEE 14 Nov 2013 */
+/*
+ * The Organizationally Unique Identifier (OUI) was assigned by IEEE on
+ * 14 Nov 2013. The OUI registration is managed by the FreeBSD Foundation.
+ */
 #define OUI_FREEBSD_BASE 0x589cfc000000
 #define OUI_FREEBSD(nic) (OUI_FREEBSD_BASE | (nic))
 
-/* 
+/*
  * OUIs are most often used to uniquely identify network interfaces
  * and occupy the first 3 bytes of both destination and source MAC
  * addresses.  The following allocations exist so that various
  * software systems associated with FreeBSD can have unique IDs in the
  * absence of hardware.  The use of OUIs for this purpose is not fully
  * fleshed out but is now in common use in virtualization technology.
- * 
+ *
  * Allocations from this range are expected to be made using COMMON
  * SENSE by developers.  Do NOT take a large range just because
  * they're currently wide open.  Take the smallest useful range for
@@ -50,7 +53,7 @@
  *
  * In the event of a conflict arbitration of allocation in this file
  * is subject to core@ approval.
- * 
+ *
  * Applications are differentiated based on the high order bit(s) of
  * the remaining three bytes.  Our first allocation has all 0s, the
  * next allocation has the highest bit set.  Allocating in this way

From nobody Mon Nov 23 02:05:28 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXq606n9Sz71h9K
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 02:05: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXq605kSKz3Dy5
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:05:28 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795399528;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=aC19dkg0Kivoql848IEca24ONSX713DQXtwc8/W6h1Q=;
	b=VfAB3xX2GrgKcrKcQVhaPdg6iCrvGeCXqHjMoPx3QQH2vWGUVCw6df4cT2bAYeLG/Toua+
	6Ejk+wALukaA+plSL38Q0MghDL8NVIW6pd4YZ812MSCF2UkrUOV14w86oK6gv4G/71q+9K
	RHo87E0qlqZ6B5q+ZT196u12dsf6QyAmVbVD2n0hgkSp9NKG5B7Kbw/sdxQdoNpn5xVCf/
	xiOEq8kYOObRy7N7Xq0/zo93Q9DpDNHG4uvwVjJVqQhCZE52DSghCDL+PN2ugLSmhW95ku
	9RZqkOvmdg3NbDoTJ/H7JGiACT3/VW0dZ186OvGtvF17xo9A67fSfgL/O90Mvw==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399528;
	b=vzNIjG/tn4MmKsgl3MRTqfDnmxGYJcAhbJOFSe+Z2mRu7tMmvpsyRGMXfIdlLOnqTK1BNC
	TlPcgxS5E7KCfit2jy9l00gCipq7hJC0jK100IjUj5sj+CwvJ7L9R8nJmgkxzKuCl7/3Lc
	kYlLRma/TfGgh10MiWhp3uUXTxxlFvRvGalNkFU6d4o3vrbe54SRkA56HF8HiW39aEq8xU
	JYX5yxl8+KpvW5ev7zC9wboKRVFbrLqvxvOUges/1qt0IGTjIzskrS7LQbZvOckA6RUINN
	ATDk1xVOL9aFM+7A77DE+60V9J/cvH0jb7s++VumHKmLrmUb4qhwX6hTk/Je4g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795399528;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=aC19dkg0Kivoql848IEca24ONSX713DQXtwc8/W6h1Q=;
	b=FPwQj1Tlr6QybVNBfNU4KVtLUwuxePyAU4s4gDzIa1SEu6wXtQjb88MN1o8HCXp4eln3Ma
	9RLe7rSta4tMmkTFCx0zVTXPoH54DB4MA3uAMKPSn2tkULcrZQnFsP27aVfi+xBghwDY2/
	vcdUm3cReuRh4t40bc3R+3auoMIDxeRXbqFiUWTtIz/fFixdlYF5CfdUckl0nfLqgsz/iI
	uikrEe2KNTu+in0hj+1CHUuijig6393QHdFO6p3rJijRElUp51jjrLZIa96DTiyjl8EkvC
	Mbgnzr8qR3GI/6Hlkv44w7ZPdCwXfkuQo0BrM/yu4HbVlHCdRLhoPG6PcAO0hg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXq6054kLzVdN
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:05:28 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 940e
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 02:05:28 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 3c87cbb74994 - stable/14 - net/ieee_oui.h: clarify how `OUI_FREEBSD_BASE` is managed
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 3c87cbb74994b4cd79d336adc83bfdb566c47e71
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 02:05:28 +0000
Message-Id: <6b039f68.940e.6979588f@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=3c87cbb74994b4cd79d336adc83bfdb566c47e71

commit 3c87cbb74994b4cd79d336adc83bfdb566c47e71
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-08-09 05:25:03 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 02:05:23 +0000

    net/ieee_oui.h: clarify how `OUI_FREEBSD_BASE` is managed
    
    Note that the FreeBSD Foundation manages the current value
    associated with `OUI_FREEBSD_BASE`.
    
    Trim trailing whitespace in comments in the change while here.
    
    MFC after:      1 week
    Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/82
    
    (cherry picked from commit 529e9a00ddd3a207f3841c6581c9f1a23532972e)
---
 sys/net/ieee_oui.h | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/sys/net/ieee_oui.h b/sys/net/ieee_oui.h
index b5dd9fccefe1..553d9fcd3ba1 100644
--- a/sys/net/ieee_oui.h
+++ b/sys/net/ieee_oui.h
@@ -30,18 +30,21 @@
  *
  */
 
-/* Organizationally Unique Identifier assigned by IEEE 14 Nov 2013 */
+/*
+ * The Organizationally Unique Identifier (OUI) was assigned by IEEE on
+ * 14 Nov 2013. The OUI registration is managed by the FreeBSD Foundation.
+ */
 #define OUI_FREEBSD_BASE 0x589cfc000000
 #define OUI_FREEBSD(nic) (OUI_FREEBSD_BASE | (nic))
 
-/* 
+/*
  * OUIs are most often used to uniquely identify network interfaces
  * and occupy the first 3 bytes of both destination and source MAC
  * addresses.  The following allocations exist so that various
  * software systems associated with FreeBSD can have unique IDs in the
  * absence of hardware.  The use of OUIs for this purpose is not fully
  * fleshed out but is now in common use in virtualization technology.
- * 
+ *
  * Allocations from this range are expected to be made using COMMON
  * SENSE by developers.  Do NOT take a large range just because
  * they're currently wide open.  Take the smallest useful range for
@@ -50,7 +53,7 @@
  *
  * In the event of a conflict arbitration of allocation in this file
  * is subject to core@ approval.
- * 
+ *
  * Applications are differentiated based on the high order bit(s) of
  * the remaining three bytes.  Our first allocation has all 0s, the
  * next allocation has the highest bit set.  Allocating in this way

From nobody Mon Nov 23 02:07:50 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXq8k5NVyz71gyb
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 02:07:50 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXq8k4rbyz3FP5
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:07:50 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795399670;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=HepmDnI9uYBShya9DBV/yFvFA7OjpOxCwZAVG5lhb9E=;
	b=QbZuFv7246ce7LMowpNJCi8y+etBCW+CnxKJcpazeyMDYV/Tj08KBdgTS7AsvN1hmBUSpi
	WtWHC8bnaqASQY42bjkNWf5j3IWH0K8S6USVmBK9hjFSpUcw2Jf/08VrlOD2WBB+f0ExTd
	nVY2xgEdjc83Ln6Gcmaeb3jefRXLtkxNlEWgMTiCoF6pV/r3CEJgqQLRE8V2NCkix0l6ZL
	Fkl6tA6sS0qBnCCtlJH+CRawbij5lof5yyH6HIW4Cz8liZ8PAJxkwywBmGcKT2CH38udex
	/gGfdRoZb0d/L64UBr45cJuwvObHN/wDf/e1bWmVJp0MKqszHnJq+NOjOmzXBQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399670;
	b=NXh8Kxd3ctVY75XIwW+HFeETFxU6k4miCUX1GpQ8fcxTYn22m86HGVQSTvpo6UzWS3MtKL
	7PCWn0bNXPEYy0xygpXATlfOnGwMmw7B6zSTIaARbpWIBpyFyL05cM3lS/w8VplkgUEiJd
	lPLwWBtQVItwDXbLiDtghmKO3SNsFtmp8OmonuV153BxREUCMxrHMM1xN6D2FoR7m/lCvW
	T5UKZRD3S3ShFUWbvxW6ToM6nFIuNo6UKZa495r1zK/NmWfkTYIu9aW9246XN4LvnwbNCS
	X3/DPPF/3C0vUZv0kmCXL/APIApTjMsI3aXOQhnagyOB1ECK34rlaRZEDVM/rQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795399670;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=HepmDnI9uYBShya9DBV/yFvFA7OjpOxCwZAVG5lhb9E=;
	b=PjQX6A7XBSEEfqf5/ScdyQyCO3NQFwhs64dIdJm/uWmhONgAyCOB+drTkBhA0nAvoTLtSr
	lRNXhHLTPSpkkrXPZf6uy7XXp4zhEr+qyk2SHRJno89T/8LrfBt35CmM6aNH973Qx8iUI9
	PcRlvOq+qQiWYQ1VdPvIOkhF3QuTghXeoKJdqdM2NmLQ6l9pQx0fa+sWBteF3EQVAZFglk
	itQH3UTrlnu0P4r0BsokgTNaR6Z5BEoHH5IuscawGWeCW8t2a/jQzCo9NjF4T2ukQAnZg6
	pRhRQlKZaoAEZPqj6kOAYjMzUyca9Sa0WCt9lzIZhyMuRj3mYZJM1efRz1rhGg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXq8k4G24zVM5
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:07:50 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 9336
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 02:07:50 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 3926aba7c6cd - stable/15 - Remove Dtrace/ZFS tests if their knobs are disabled
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 3926aba7c6cd98aafc8e053b27c59c706a0362c1
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 02:07:50 +0000
Message-Id: <6b039ff6.9336.6c33252a@gitrepo.freebsd.org>

The branch stable/15 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=3926aba7c6cd98aafc8e053b27c59c706a0362c1

commit 3926aba7c6cd98aafc8e053b27c59c706a0362c1
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-09-22 02:27:04 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 02:07:25 +0000

    Remove Dtrace/ZFS tests if their knobs are disabled
    
    Prior to this change, Dtrace and ZFS tests and their respective
    directories would remain installed even if `${MK_DTRACE_TESTS}` == no or
    `${MK_ZFS_TESTS}` == no.
    
    This change enhances the logic to remove the tests when the respective
    knobs are disabled so the tests will be removed when `make delete-old`
    is run.
    
    MFC after:      2 weeks
    
    (cherry picked from commit 30c20ca26e105cffc5f37a95964cd9b2cad1b6cd)
---
 tools/build/mk/OptionalObsoleteFiles.inc | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc
index c42c4c9272df..9f0348a2581b 100644
--- a/tools/build/mk/OptionalObsoleteFiles.inc
+++ b/tools/build/mk/OptionalObsoleteFiles.inc
@@ -1715,6 +1715,18 @@ OLD_DIRS+=usr/share/dtrace/toolkit
 OLD_DIRS+=usr/share/dtrace
 .endif
 
+.if ${MK_DTRACE_TESTS} == no
+DTRACE_TEST_DIRS=	cddl/usr.sbin/dtrace
+. for d in ${DTRACE_TEST_DIRS}
+.  if exists(${DESTDIR}${TESTSBASE}/${d}/)
+TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
+OLD_DIRS+=${TESTS_DIRS}
+TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo
+OLD_FILES+=${TESTS_FILES}
+.  endif
+. endfor
+.endif
+
 .if ${MK_EE} == no
 OLD_FILES+=usr/bin/edit
 OLD_FILES+=usr/bin/ee
@@ -9463,6 +9475,19 @@ OLD_DIRS+=usr/share/zfs/compatibility.d
 OLD_DIRS+=usr/share/zfs
 .endif
 
+.if ${MK_ZFS_TESTS} == no
+ZFS_TEST_DIRS=	cddl/usr.bin/ztest
+ZFS_TEST_DIRS+=	cddl/usr.sbin/zfsd
+. for d in ${ZFS_TEST_DIRS}
+.  if exists(${DESTDIR}${TESTSBASE}/${d}/)
+TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
+OLD_DIRS+=${TESTS_DIRS}
+TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo
+OLD_FILES+=${TESTS_FILES}
+.  endif
+. endfor
+.endif
+
 .if ${MK_ZONEINFO} == no
 OLD_FILES+=usr/share/zoneinfo/Africa/Abidjan
 OLD_FILES+=usr/share/zoneinfo/Africa/Accra

From nobody Mon Nov 23 02:07:51 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXq8l5xppz71h2D
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 02:07:51 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXq8l561Dz3FLd
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:07:51 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795399671;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=13RabSLWQzooRuN6i0FroAyhH0BR//Aw2eSwOlkBgJ0=;
	b=sMwe5N8FvmZB+6eCPainlfEn33DdyGrOP/y5LZXpH8dUbbVnJSvWISxYFMsdww+Al/dHgX
	X9cZ+1K6NiRWCYneF5m3PgTy4v4Zh2qbPR5fqnqgOn+o4X14zlS2Ts9+0nMputd3gS1cb5
	Dv3jw3MckYEgOpM81OJ4A7bWFrV8rPZrA/ia3nKe+r7GO1iJySmTH26SVGULCbAwxlCKDZ
	msCAzX0sUB9NJwhzB7poCtvoBKDJJwiZ5/+UGqmSeRTTQaVjvPTMqvT1r1LbsNFvnxP6LI
	oFZjBeiFi3Ppvwtk/2ioPH2+8titdrqm0l59KUBBxj4gqFsvC6muh3h8o87pzQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399671;
	b=lSkqLcjQj6OyXwHUfcjOEDNZ9gwL3jsGM2/6Fc9+EyVbWU3eyx687hIm1Cq7vnsWFvKXGr
	qQOOZKVNROYDY8ddQwZ4DNZzi9S17OrGbj5JOVk4u0jaN7OEA0So1fwPzWbuOzlRbnMrkc
	Hxg37Km/5/Is2KzLx3yjfegcEjHl5rnl1GBE1JE+xkW6gkAg+xauhPGfQMz990/LFDPUl6
	J6sgvCrkQ2DP2eN5I77e9n80llkXZvXo6nOHeoLcne/oy++3klCR75m9HUQyLmZwAVutUo
	exBk3FsEalLvPCcBlhpI1t7eBr4/NWSJHX4+1CvEAI7oLmLSdKDAaKhmo0t9/w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795399671;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=13RabSLWQzooRuN6i0FroAyhH0BR//Aw2eSwOlkBgJ0=;
	b=V2vcxL9Rz2DHWzttKQhEHy541cXs/jbUTJJku7KjupeFhJGtESzJjJifUNn+lzVcCq31wv
	0NMtux+jttDRsOS5rBh8yGEUU6yb/x6ItWHJiJDgiidfkN0JYyXG+qjBYDk/O346VTTc16
	2CkcWUIturtCb2j/8hzldgoFGo03RK+F1jhLn+hJmKuaZzGVyP0MR/OATTtLHJYZpQOcWt
	3Fs9uBvUnN69pAHnXelzocHWscyE7vEP5ZHPUnEw5zJkem8cRIEy0qXk3+JogVbcxMOTN9
	lgu/sSvhvMd4m9HwP53FjO3GVayrHwTyI5a7VKcPwspqzJPBUXQlb6okwDKWLA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXq8l4k5NzVr0
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:07:51 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 7eb1
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 02:07:51 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: a0e5c02ffebe - stable/15 - Remove CDDL and ctfconvert tests when their controlling knobs are disabled
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: a0e5c02ffebef6ee22f5a6e1102f66bb0b60102a
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 02:07:51 +0000
Message-Id: <6b039ff7.7eb1.4022921b@gitrepo.freebsd.org>

The branch stable/15 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=a0e5c02ffebef6ee22f5a6e1102f66bb0b60102a

commit a0e5c02ffebef6ee22f5a6e1102f66bb0b60102a
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-09-22 02:46:52 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 02:07:25 +0000

    Remove CDDL and ctfconvert tests when their controlling knobs are disabled
    
    In the event someone specified MK_CDDL == no prior to this change, all
    tests under `/usr/tests/cddl` would stick around after the change,
    resulting in errors. Similarly, MK_DTRACE == no removed ctfconvert,
    which the ctfconvert tests relied on (but remained around after the knob
    was disabled).
    
    Remove the tests under the respective blocks now so they don't linger
    around on systems where these knobs are disabled, resulting in false
    positives when running the complete test suite.
    
    The ctfconvert tests weren't specifically put under
    `${MK_DTRACE_TESTS}` == no because ctfconvert was bundled separately
    from the upstream provided Dtrace test suite.
    
    MFC after:      2 weeks
    MFC with:       30c20ca26 ("Remove Dtrace/ZFS tests if their knobs are disabled")
    
    (cherry picked from commit df6131e2b74d9f334c16387e9a46cafd6e27eb78)
---
 tools/build/mk/OptionalObsoleteFiles.inc | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc
index 9f0348a2581b..3b1e09f94b1d 100644
--- a/tools/build/mk/OptionalObsoleteFiles.inc
+++ b/tools/build/mk/OptionalObsoleteFiles.inc
@@ -1441,6 +1441,18 @@ OLD_FILES+=usr/share/man/man1/llvm-pdbutil.1.gz
 OLD_FILES+=usr/share/man/man1/opt.1.gz
 .endif
 
+.if ${MK_CDDL} == no
+CDDL_TEST_DIRS=	cddl
+. for d in ${CDDL_TEST_DIRS}
+.  if exists(${DESTDIR}${TESTSBASE}/${d}/)
+TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
+OLD_DIRS+=${TESTS_DIRS}
+TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo
+OLD_FILES+=${TESTS_FILES}
+.  endif
+. endfor
+.endif
+
 .if ${MK_CLANG_EXTRAS} == no && ${MK_CLANG_FORMAT} == no
 OLD_FILES+=usr/bin/clang-format
 .endif
@@ -1713,6 +1725,16 @@ OLD_DIRS+=usr/lib${libcompat}/dtrace
 OLD_DIRS+=usr/libexec/dwatch
 OLD_DIRS+=usr/share/dtrace/toolkit
 OLD_DIRS+=usr/share/dtrace
+
+CTFCONVERT_TEST_DIRS=	cddl/usr.bin/ctfconvert
+. for d in ${CTFCONVERT_TEST_DIRS}
+.  if exists(${DESTDIR}${TESTSBASE}/${d}/)
+TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
+OLD_DIRS+=${TESTS_DIRS}
+TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo
+OLD_FILES+=${TESTS_FILES}
+.  endif
+. endfor
 .endif
 
 .if ${MK_DTRACE_TESTS} == no

From nobody Mon Nov 23 02:07:52 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXq8n28ydz71hGB
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 02:07: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXq8m5nfQz3FTr
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:07:52 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795399672;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=rJNynHVtjcrJW8/SLcy5uJpTNKjmvy9uNKaCHukbZbg=;
	b=xfNqK2h2Hut8QGcx5JBmPKciJD3E1ZdJFAF0pWSvX+N8QZgyMqc1d/8CFOfWLlA/3lTA3S
	mjsX64eoCMV9gkAjhzDDG/YOk0egi/tN3BsC2W2nHM90iEazEeAPL0SfuYpcc5IM5IvoJ9
	TQ8bSLfOeY6SBKnnPV/2aMlxPR3XQvkT7+c69ROaiW5ajgtaWiHZBXygWPG5deg/s0jcNz
	ivDnvbUo/lsd4IrPeTHbHpMl2V68yDQ44RKEeCJGg6YzoZe22zd9lbesLvlhaGKheYBwiK
	UutDllsJ3WtuUnh2ymlMY9zP4mcQzuwRkMkHMgnEfv1z0V4I2XaT3sUo1vVE1g==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399672;
	b=A/3j3Hv5JMwFJHoYlJFkbt7qT8pHUdYaYq9bg/2al1qswP0WrtqpAN1xrJ1cFyzew7Rs1o
	1KI5TTh1JyCAp/qn/9YElBUzeIfGSGx3V5Bsb60ONY5A+cDh8feFJCylz2wMq62LlHI0TL
	qm5yNVOjsj29CjdG5PG+VN73kXMI64Ffy9UBltlVlzKpFhCu1vCPxSWCKtMYNF635JEJNF
	egiLzrgwzDC2BFSajzGSZ1aLdQRC9C8FHsj8IPyiujamNYvkM+5XNCpcEgBpVkc01Q03sa
	KEQE8QxXL90AVaPmDGa/lHz6gn9vy0hfRnnjR32pT525IZBwNN6bGScoOh8MWA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795399672;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=rJNynHVtjcrJW8/SLcy5uJpTNKjmvy9uNKaCHukbZbg=;
	b=s4l000smJY4wAVSotzB/uKF/Gt/BFtdqprDevyKQwzQRRi0IU/jwuB00QzoCj+fSWzWKmc
	LeaAcsqC0TODePKLlorqcYvB+inP/uxkFkyMgY+uRC1z59Z2ANHj8dlBJMLRN8fEt5FcEM
	PJZSCg88kV/k1DJdOPpQblhlKKuWouGqndu4qJq/lnW4N/5ZwP1a7IoTWy688V5j7gKqyF
	BsBf2qW0vC0yaXWeutM6Aq22KNDuJ4kryXgPvXzIaV9Dsj/7YRAvqAxtvdxmZfXNzn63/l
	rT6WCnNCchCDi6HRHH5l0ED5s+3Mdq+W/Wx3q2UbGjQvYUl14IA+zp1ClKkPUw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXq8m563ZzVr1
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:07:52 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 9d81
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 02:07:52 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 6109c35c328c - stable/15 - Don't some prune empty dirs created by BSD.tests.dist
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 6109c35c328c07082fa4d63cba5503535c3bd579
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 02:07:52 +0000
Message-Id: <6b039ff8.9d81.78f55cb9@gitrepo.freebsd.org>

The branch stable/15 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=6109c35c328c07082fa4d63cba5503535c3bd579

commit 6109c35c328c07082fa4d63cba5503535c3bd579
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-11-04 18:53:01 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 02:07:25 +0000

    Don't some prune empty dirs created by BSD.tests.dist
    
    Before this change, directories needed when MK_DTRACE_TESTS != no and
    MK_ZFS_TESTS != no but not MK_TESTS != no, were being created via
    `BSD.tests.dist` as part of the standard build/install process with the
    top-level `hierarchy` target. This behavior resulted in `make check-old`
    flagging a lot of issues after 30c20ca26e105c, even after `make
    delete-old` was run and the directories were removed.
    
    Remove the logic which pruned these empty directories; this "fixes" the
    issue with `make check-old`, et al and allows a proper technical solution to
    `OptionalObsoleteFiles.inc` to be implemented by pkgbase in an unimpeded
    manner without introducing additional complexity.
    
    See the review for more details.
    
    PR:             299650
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D60928
    
    (cherry picked from commit 0df8ed538c620cf021f8dfa2c54892b5ef9620a5)
---
 tools/build/mk/OptionalObsoleteFiles.inc | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc
index 3b1e09f94b1d..931affb4a67f 100644
--- a/tools/build/mk/OptionalObsoleteFiles.inc
+++ b/tools/build/mk/OptionalObsoleteFiles.inc
@@ -1445,8 +1445,12 @@ OLD_FILES+=usr/share/man/man1/opt.1.gz
 CDDL_TEST_DIRS=	cddl
 . for d in ${CDDL_TEST_DIRS}
 .  if exists(${DESTDIR}${TESTSBASE}/${d}/)
-TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
-OLD_DIRS+=${TESTS_DIRS}
+# Bug 299650: do not prune empty directories created by
+# `etc/mtree/BSD.tests.dist`.
+#
+# Read https://reviews.freebsd.org/D60928 for more details.
+#TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
+#OLD_DIRS+=${TESTS_DIRS}
 TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo
 OLD_FILES+=${TESTS_FILES}
 .  endif
@@ -1741,8 +1745,12 @@ OLD_FILES+=${TESTS_FILES}
 DTRACE_TEST_DIRS=	cddl/usr.sbin/dtrace
 . for d in ${DTRACE_TEST_DIRS}
 .  if exists(${DESTDIR}${TESTSBASE}/${d}/)
-TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
-OLD_DIRS+=${TESTS_DIRS}
+# Bug 299650: do not prune empty directories created by
+# `etc/mtree/BSD.tests.dist`.
+#
+# Read https://reviews.freebsd.org/D60928 for more details.
+#TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
+#OLD_DIRS+=${TESTS_DIRS}
 TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo
 OLD_FILES+=${TESTS_FILES}
 .  endif
@@ -9502,8 +9510,12 @@ ZFS_TEST_DIRS=	cddl/usr.bin/ztest
 ZFS_TEST_DIRS+=	cddl/usr.sbin/zfsd
 . for d in ${ZFS_TEST_DIRS}
 .  if exists(${DESTDIR}${TESTSBASE}/${d}/)
-TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
-OLD_DIRS+=${TESTS_DIRS}
+# Bug 299650: do not prune empty directories created by
+# `etc/mtree/BSD.tests.dist`.
+#
+# Read https://reviews.freebsd.org/D60928 for more details.
+#TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
+#OLD_DIRS+=${TESTS_DIRS}
 TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo
 OLD_FILES+=${TESTS_FILES}
 .  endif

From nobody Mon Nov 23 02:08:00 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXq8x2qcBz71h2J
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 02:08: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXq8x0VRcz3Fs0
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:08:01 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795399681;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=nU5DVEsBzxpjLwkxQeDKv5SXV6H/UzTEkq2P8Bc38Ro=;
	b=m3pBxrQZZsEKfRXUaTLqhpVPVbTvLlGCQE634tz8NAucTcOmCcilKVnkdPOgkwRigqiAIu
	YGR00iDChlGdOjhLB9Af+Xb8OnlXyc3C/213HanD1T98YEOqTStq++Aso31nn69rzsSQnz
	lkchqrneSEEml3rsNGbL2O3KaTYtNJeYHIj8bXbNhchPlan6TUPQe77VMwvDrPwr56YsDH
	Ox+qNHO/rOivmD08jLxDz+mNkyBch5+J/8R+Q/KUzqyZk/EiPP1uuKdu2v09I/Erm3VaOl
	OuXx3Q6PLc/M83aDqbPaB/YkFKalJFsF10NCB09uaBLzMYZ7qE7mz3D8/DFEVQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399681;
	b=jCAKZtwSj90xamUD2m4H4opD8Fe+q8huSBFutZNVu7x5DnE1eBVYJ3IzxVlzyKkSz62g6z
	bmYXHt9EA/Ay/20BF7EbdN7gXMfAgBPpIb6LQU+wQ7F6N9GL319PDNvfxSzpZh9q/0PHsz
	UsoM8jQeIN5kP8+UKBDA4eYNaR1y9XiLqRS/WtP1vKZgUxHETl9d23Pba7no7o7iNAVNBa
	Y2um/w21AeyBCyG7ceqkUcswYGumm1rem7qcelAdZ4/H97dxWk9CjFOyqtU/6AU0lnYijK
	KORjrzWy/Bc7+X1AVm/46YURFv6Bzjr2btsWygWJLMeD6CiISwDkInFlzge7ZQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795399681;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=nU5DVEsBzxpjLwkxQeDKv5SXV6H/UzTEkq2P8Bc38Ro=;
	b=NbLpywfz9WHWZbxjpLfiqpAnb/TJK3uv2m6Ar9kfg+uOsigkn3EBAET+UG/vtrvsbgh53k
	TaWcU3UoYAjJiNil4PwsFOXvZEGpSxIY0Vc9XOGuiSTUUSEBZUwIpyvSdRSvTvKWAhuZT0
	yGEF/FLZo4hPvC/RAde6ooFQzEEhSah5hihAj7XbMfnV2TLYTuF+QECC8b7huljg+JNRku
	qrItZlOTwAM85vVFeAyMToOAR3S/fnQM1ZaGTqao1VRiESscatYom1X78i81Ook5gdfScy
	un3Dtyf1IQdcUg+rAWGEVM8MgF+lFmHZl8GmdFa/9zrM8h3ap+wOdhAAE00Irw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXq8x04TQzVr2
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:08:01 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 8c25
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 02:08:00 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: a1c9248d20bb - stable/14 - Remove Dtrace/ZFS tests if their knobs are disabled
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: a1c9248d20bbe0316c4f34cdf98c1d7e0d27c1a2
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 02:08:00 +0000
Message-Id: <6b03a000.8c25.2d9f6c5f@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=a1c9248d20bbe0316c4f34cdf98c1d7e0d27c1a2

commit a1c9248d20bbe0316c4f34cdf98c1d7e0d27c1a2
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-09-22 02:27:04 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 02:06:47 +0000

    Remove Dtrace/ZFS tests if their knobs are disabled
    
    Prior to this change, Dtrace and ZFS tests and their respective
    directories would remain installed even if `${MK_DTRACE_TESTS}` == no or
    `${MK_ZFS_TESTS}` == no.
    
    This change enhances the logic to remove the tests when the respective
    knobs are disabled so the tests will be removed when `make delete-old`
    is run.
    
    MFC after:      2 weeks
    
    (cherry picked from commit 30c20ca26e105cffc5f37a95964cd9b2cad1b6cd)
---
 tools/build/mk/OptionalObsoleteFiles.inc | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc
index 15e9d619fdb3..a4ccaadf7037 100644
--- a/tools/build/mk/OptionalObsoleteFiles.inc
+++ b/tools/build/mk/OptionalObsoleteFiles.inc
@@ -1715,6 +1715,18 @@ OLD_DIRS+=usr/share/dtrace/toolkit
 OLD_DIRS+=usr/share/dtrace
 .endif
 
+.if ${MK_DTRACE_TESTS} == no
+DTRACE_TEST_DIRS=	cddl/usr.sbin/dtrace
+. for d in ${DTRACE_TEST_DIRS}
+.  if exists(${DESTDIR}${TESTSBASE}/${d}/)
+TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
+OLD_DIRS+=${TESTS_DIRS}
+TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo
+OLD_FILES+=${TESTS_FILES}
+.  endif
+. endfor
+.endif
+
 .if ${MK_EE} == no
 OLD_FILES+=usr/bin/edit
 OLD_FILES+=usr/bin/ee
@@ -9487,6 +9499,19 @@ OLD_DIRS+=usr/share/zfs/compatibility.d
 OLD_DIRS+=usr/share/zfs
 .endif
 
+.if ${MK_ZFS_TESTS} == no
+ZFS_TEST_DIRS=	cddl/usr.bin/ztest
+ZFS_TEST_DIRS+=	cddl/usr.sbin/zfsd
+. for d in ${ZFS_TEST_DIRS}
+.  if exists(${DESTDIR}${TESTSBASE}/${d}/)
+TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
+OLD_DIRS+=${TESTS_DIRS}
+TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo
+OLD_FILES+=${TESTS_FILES}
+.  endif
+. endfor
+.endif
+
 .if ${MK_ZONEINFO} == no
 OLD_FILES+=usr/share/zoneinfo/Africa/Abidjan
 OLD_FILES+=usr/share/zoneinfo/Africa/Accra

From nobody Mon Nov 23 02:08:02 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXq8y42R3z71hCj
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 02:08:02 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXq8y0xXyz3Fqc
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:08:02 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795399682;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=xQyZ3Y4kkHMXEBjiyRbpjqHO9Q8qI08wJV50E2MgxBA=;
	b=EvV1hFpZ2aVeVNnQu+CY0NZpNKaTVATcptIvTHxcXEIV5gAvzzSzKo2vtBk3KpSIx5j6BK
	8+/nSkuiYK1OCpUqMIXvXtS1AKXZ1SJKGmEnuFDOintt8+ZU+ayj0m6XJtZnoo8aYOwLYA
	JRg2/R4dZuv/R9psHEv9vdZC/BjTSNbGUnD5f/GBhxoXCxIukdhhtsfF2/n1ZOVujJ510I
	gnKaTI+jZoIGW/ekwQ6rBgxWSGfLf/E+J0Ju3gZ8WGmF6n69y1G9ap5dbcug5n0OCdjM29
	8EMfGcVxV8zlCzSQIzGJvWWSj+I0ChbBB8jyctyBpRsvQHAE1/e1rzMDP25cFA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399682;
	b=hYEUoqBEmWjABJ35FhqL+Qz3krfpFsbhL1I4R2yKSzsFucZbDcVvujRttmwPRooy8SXuZM
	8s6o0dG0r8PUrIibjB0m2ThVk9VfVoVrsQR6DIklVSgOsjBe9oyB+Q09PkVhS+utCWCmky
	vZKFUGHUNeQCnDstmgM8IazaT7UGxMmEtNmOBFtrOoyPolvkLB9/RxKTW6j8nrdqiSwreY
	UqFMb3UFMBvdDZKtZnzCn5CjT9f27NPFrupdUbaWcz8238rH50eY3omLXYz9GlBUcOTzXq
	njW4K+ID/VWrC7pcHDyKVzpNZ5X+tMEaUu6Q9j1NxzMBneaEGUaS4UsPu9kokA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795399682;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=xQyZ3Y4kkHMXEBjiyRbpjqHO9Q8qI08wJV50E2MgxBA=;
	b=lZh6/H0A9IaQMk8EIr8L5W3LCYeA8hPASKtVmpU/3BCBsAhb2YWpIHCm9TXSkOWBohuZnL
	a4r8lmKKPny8leSP13fde+TBsrk8dmZco5jzWQp3FV7TU3hl28s4vTUce5yBICB20zFBdK
	ocbQ+74Hqcy9dC0gYhX2h2Bhjt2kBFqHX5CjffW5qDZyn8FbDagtacak0tz+gvw1xQuDLr
	+8A7J8kkRPETBREdXmvc0s4inrvXAP3rS1/JC0uT/Llm8qEpheclMgw7H5Mh0nwAsDxi4p
	OqBqQ64zuXdeePPt+AfkT6TNRYw05BU03P8j1XrZ/1mtCy2Gw4Aw8+P9tLmW8g==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXq8y0Xq0zVr3
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:08:02 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 94d4
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 02:08:02 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: bd794b9b77ec - stable/14 - Remove CDDL and ctfconvert tests when their controlling knobs are disabled
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: bd794b9b77ece3314b3f1ad7a879fca5c09ccf17
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 02:08:02 +0000
Message-Id: <6b03a002.94d4.118faf54@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=bd794b9b77ece3314b3f1ad7a879fca5c09ccf17

commit bd794b9b77ece3314b3f1ad7a879fca5c09ccf17
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-09-22 02:46:52 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 02:06:47 +0000

    Remove CDDL and ctfconvert tests when their controlling knobs are disabled
    
    In the event someone specified MK_CDDL == no prior to this change, all
    tests under `/usr/tests/cddl` would stick around after the change,
    resulting in errors. Similarly, MK_DTRACE == no removed ctfconvert,
    which the ctfconvert tests relied on (but remained around after the knob
    was disabled).
    
    Remove the tests under the respective blocks now so they don't linger
    around on systems where these knobs are disabled, resulting in false
    positives when running the complete test suite.
    
    The ctfconvert tests weren't specifically put under
    `${MK_DTRACE_TESTS}` == no because ctfconvert was bundled separately
    from the upstream provided Dtrace test suite.
    
    MFC after:      2 weeks
    MFC with:       30c20ca26 ("Remove Dtrace/ZFS tests if their knobs are disabled")
    
    (cherry picked from commit df6131e2b74d9f334c16387e9a46cafd6e27eb78)
---
 tools/build/mk/OptionalObsoleteFiles.inc | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc
index a4ccaadf7037..6aaa5dbe1bcb 100644
--- a/tools/build/mk/OptionalObsoleteFiles.inc
+++ b/tools/build/mk/OptionalObsoleteFiles.inc
@@ -1425,6 +1425,18 @@ OLD_FILES+=usr/share/man/man1/llvm-pdbutil.1.gz
 OLD_FILES+=usr/share/man/man1/opt.1.gz
 .endif
 
+.if ${MK_CDDL} == no
+CDDL_TEST_DIRS=	cddl
+. for d in ${CDDL_TEST_DIRS}
+.  if exists(${DESTDIR}${TESTSBASE}/${d}/)
+TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
+OLD_DIRS+=${TESTS_DIRS}
+TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo
+OLD_FILES+=${TESTS_FILES}
+.  endif
+. endfor
+.endif
+
 .if ${MK_CLANG_EXTRAS} == no && ${MK_CLANG_FORMAT} == no
 OLD_FILES+=usr/bin/clang-format
 .endif
@@ -1713,6 +1725,16 @@ OLD_DIRS+=usr/lib${libcompat}/dtrace
 OLD_DIRS+=usr/libexec/dwatch
 OLD_DIRS+=usr/share/dtrace/toolkit
 OLD_DIRS+=usr/share/dtrace
+
+CTFCONVERT_TEST_DIRS=	cddl/usr.bin/ctfconvert
+. for d in ${CTFCONVERT_TEST_DIRS}
+.  if exists(${DESTDIR}${TESTSBASE}/${d}/)
+TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
+OLD_DIRS+=${TESTS_DIRS}
+TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo
+OLD_FILES+=${TESTS_FILES}
+.  endif
+. endfor
 .endif
 
 .if ${MK_DTRACE_TESTS} == no

From nobody Mon Nov 23 02:08:03 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXq8z422Lz71hCl
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 02:08:03 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXq8z1J5Cz3Fs8
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:08:03 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795399683;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=1tbOUCe7KPZ1OLzOnkc1PkrljCoBsU/zx3n7LM+ik7A=;
	b=i5V+Tj3Lx9+YgKCSD5VaM2ZDSExGuDnHmEdNpLDnqcbK5/Xq3WsfrELG/fSyt91mKWpzwX
	LDrJv5gHk1P/aTFNmiGG94W001NB5EVlHBqB3il05b59eo2iBZ7t1i7bN/RtioFs/pbzK9
	9DSYqbp0ZaLBC1pxvFUFb0RcCL7CXgpqXEG0y9lyaGnqRrETm3Sf74qKIvsZxaCYapdee4
	QR2Y7ujXAEQXIFId7P74UW21jgum9RS22WC5WG72GAVUk0noWgWaA+oYbClNn/Uhs2S5Kg
	Mn5kPgtcqiS5AiZhvle7d1EGTs1cSljRlG2m0ca9c6ElvxGmaQOEpxQF6aH+RA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399683;
	b=uEXDiTmt8OImhxO5Gj4LFZGuFgxc/PR9KI8bjDyfVOzoadc0iKyuQ/b2kP1RLar8VEUCBO
	cgNRfjbRmTuBo/P1CRQDL/I2bU9ejvLWxdNXJlCxoPKC7XwUTEjl4OoFsAHn/+RsVAk67p
	NlaqKSampdk/h/NV9Aj6qvF+jHWHswcGj+7PYVAbtQi9JewHccgtzqpqQCIm5RQ8IXseJX
	9+7uk0PC1SSR/RDG2spld0VY+kHc5XQT+I4dQ91FzPi5b4jvbEMz96DWNt13GE4CpsRrxH
	iqyjhJy1YVQfdbyBp/6ZDL6tHrMMBl2YRdB81iEzWRWxf9RBgCDcGJhNTayUdA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795399683;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=1tbOUCe7KPZ1OLzOnkc1PkrljCoBsU/zx3n7LM+ik7A=;
	b=X8woiuVsVa+dhe6Wd0I0hNcHYFATEBkI+lDgRvDyjwgJ2ce1Ano2LEhCxFcCc+2JGFebKp
	Y2xWS+BveDetBj1bX1wOfJBidTtdmGeFa0Dxi/Ivx0t258yMHx/mNYXKKKTj49dwBzcHta
	Usf/+GRN/Nrgd2Ct++31Au1e19vV+s3W3UY6wjUCcRk38Ra0q69kIjfYNU5b5QntdDKvyq
	ZuDt1jR2aUguTuQQ9t6CysUL2XtoYVeJdzs5jrWo1I9C4vZrpHIqqH9knfgMaWNaY25p7p
	0jttNmeSAQ1WAyvgxnZZsDjprNcL9WroIZ60ffFZOgPzYLwwUi09Bv1vmGUn2w==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXq8z0yxkzVM7
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:08:03 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 8656
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 02:08:03 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: a8d121f489b8 - stable/14 - Don't some prune empty dirs created by BSD.tests.dist
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: a8d121f489b8dfc1a7e64c8794cbd77307d304f6
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 02:08:03 +0000
Message-Id: <6b03a003.8656.3a36a92e@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=a8d121f489b8dfc1a7e64c8794cbd77307d304f6

commit a8d121f489b8dfc1a7e64c8794cbd77307d304f6
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-11-04 18:53:01 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 02:06:47 +0000

    Don't some prune empty dirs created by BSD.tests.dist
    
    Before this change, directories needed when MK_DTRACE_TESTS != no and
    MK_ZFS_TESTS != no but not MK_TESTS != no, were being created via
    `BSD.tests.dist` as part of the standard build/install process with the
    top-level `hierarchy` target. This behavior resulted in `make check-old`
    flagging a lot of issues after 30c20ca26e105c, even after `make
    delete-old` was run and the directories were removed.
    
    Remove the logic which pruned these empty directories; this "fixes" the
    issue with `make check-old`, et al and allows a proper technical solution to
    `OptionalObsoleteFiles.inc` to be implemented by pkgbase in an unimpeded
    manner without introducing additional complexity.
    
    See the review for more details.
    
    PR:             299650
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D60928
    
    (cherry picked from commit 0df8ed538c620cf021f8dfa2c54892b5ef9620a5)
---
 tools/build/mk/OptionalObsoleteFiles.inc | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc
index 6aaa5dbe1bcb..cd0684b8f43a 100644
--- a/tools/build/mk/OptionalObsoleteFiles.inc
+++ b/tools/build/mk/OptionalObsoleteFiles.inc
@@ -1429,8 +1429,12 @@ OLD_FILES+=usr/share/man/man1/opt.1.gz
 CDDL_TEST_DIRS=	cddl
 . for d in ${CDDL_TEST_DIRS}
 .  if exists(${DESTDIR}${TESTSBASE}/${d}/)
-TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
-OLD_DIRS+=${TESTS_DIRS}
+# Bug 299650: do not prune empty directories created by
+# `etc/mtree/BSD.tests.dist`.
+#
+# Read https://reviews.freebsd.org/D60928 for more details.
+#TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
+#OLD_DIRS+=${TESTS_DIRS}
 TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo
 OLD_FILES+=${TESTS_FILES}
 .  endif
@@ -1741,8 +1745,12 @@ OLD_FILES+=${TESTS_FILES}
 DTRACE_TEST_DIRS=	cddl/usr.sbin/dtrace
 . for d in ${DTRACE_TEST_DIRS}
 .  if exists(${DESTDIR}${TESTSBASE}/${d}/)
-TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
-OLD_DIRS+=${TESTS_DIRS}
+# Bug 299650: do not prune empty directories created by
+# `etc/mtree/BSD.tests.dist`.
+#
+# Read https://reviews.freebsd.org/D60928 for more details.
+#TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
+#OLD_DIRS+=${TESTS_DIRS}
 TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo
 OLD_FILES+=${TESTS_FILES}
 .  endif
@@ -9526,8 +9534,12 @@ ZFS_TEST_DIRS=	cddl/usr.bin/ztest
 ZFS_TEST_DIRS+=	cddl/usr.sbin/zfsd
 . for d in ${ZFS_TEST_DIRS}
 .  if exists(${DESTDIR}${TESTSBASE}/${d}/)
-TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
-OLD_DIRS+=${TESTS_DIRS}
+# Bug 299650: do not prune empty directories created by
+# `etc/mtree/BSD.tests.dist`.
+#
+# Read https://reviews.freebsd.org/D60928 for more details.
+#TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
+#OLD_DIRS+=${TESTS_DIRS}
 TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo
 OLD_FILES+=${TESTS_FILES}
 .  endif

From nobody Mon Nov 23 02:09:17 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXqBQ058xz71hRd
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 02:09: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXqBP3YV0z3HFD
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:09:17 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795399757;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=na7bc3Kg646k6jGrNO6slhkE6Dl7noC+Q1iCsp69Dno=;
	b=tx5/QK+ZykyVuixNiNlj/6NUQIpqwvmH0aN/iUfIZsAsrC1X9xGsskOw9ubPFF+wlcsHY4
	ba5at3sG5cmVQ6dD9/Tnz90zGkxrAIbZwGMWHz4WoOlvQhJh7k5515i64WgpDRzslJBzV/
	fUHPNNGqTXPa9MzB6p2BL1DVVwwfoWdWQIjWMVt42ZSwwInXeGJPrdi8JNlxdTqvWITxjB
	XojITStRBiWPLdoyzeVr78mDKZ8HALfhKV3NOtCMqj1N5R7dWeD1dVtgZNqMhxU5e4PKsQ
	5r+gM4eazHfHDVAvhRDP4TfSmKv9SYNqslX13Zsav9rxmcSVRI0096wBCv6aOg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399757;
	b=yh9lfhvAo/l9A7BssW+KxWN7AsUsn8FwJ4Frc+JqSIQfKAGMLYlwLKIwH4AyUyq03WORwa
	Q+xaeGO/7AK5UUPQvc3MIX4RAAvCk/Bju9rDi8wwPcgIqFTwIZTFHZdfoLHHVvv3KLeC3h
	oBv4JhywCoNKpM1lHVyuFJAgNWFd0Zq6zF6DxhoTpoMZ1CDTpPtC0kBPX3+lIMbblc5tA9
	d0XtqRXamOs2lJ78qmh1d2Ok31w+OYlmiYr2h6lEtT/QqkLHt3ff+JP35xZUF5CsNv5MmE
	JFeJxeIphZ9tSFwQZvErp87492Ga/AZO0s6ALWLBdjdCbAVwHkzGv8qhPF37wg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795399757;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=na7bc3Kg646k6jGrNO6slhkE6Dl7noC+Q1iCsp69Dno=;
	b=tO4ACfxlOu0U4xmEagGl8dNKSjOAtvu9CQBYivXPututTgoC+DFPao0L84u7jgYNZXjjWR
	vxzSizzYq9oxfI6K+YcrlinVAk6fVg79wYHgm8UxP/k2VQSDAAuoW4Av4lUvqa91IcVgO+
	c0XaRjmHbsmkYu8MPy242nsE5tblApgIYY8vMwgtyoUU92Axyx2xix9FpVcylVfsHhGIFT
	5vbVwQ3872S1EWAOZMwVGRTisKYCTooZWkrJhveY7jNmUs/LSlu5oP+7IfxOhcXmPFA+xF
	7hOV3qxajr6Nn/oGXUrOu2w4COxM+FFNIlYH1ZCMEeuMeZODD/iMFZoS2pMaXw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXqBP395yzVqT
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:09:17 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 9707
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 02:09:17 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Konstantin Belousov <kib@FreeBSD.org>
Subject: git: 951dcca4b40f - main - contrib/openbsm/etc/audit_event: add entries for pdopenpid and pdptrace
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: 951dcca4b40fb283f10eb93d9c5d3d721e6c0ed5
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 02:09:17 +0000
Message-Id: <6b03a04d.9707.3680e9cf@gitrepo.freebsd.org>

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=951dcca4b40fb283f10eb93d9c5d3d721e6c0ed5

commit 951dcca4b40fb283f10eb93d9c5d3d721e6c0ed5
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-11-23 02:03:38 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-23 02:08:51 +0000

    contrib/openbsm/etc/audit_event: add entries for pdopenpid and pdptrace
    
    Fixes:  606061ea463d ("sys: add AUE_PDOPENPID")
    Fixes:  b2f300ee8fc0 ("sys/bsm/audit_kevents.h: add AUE_PDPTRACE")
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
---
 contrib/openbsm/etc/audit_event | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/contrib/openbsm/etc/audit_event b/contrib/openbsm/etc/audit_event
index 65090a787a56..f7ba6ae93e94 100644
--- a/contrib/openbsm/etc/audit_event
+++ b/contrib/openbsm/etc/audit_event
@@ -614,6 +614,8 @@
 43264:AUE_REALPATHAT:realpathat(2):fa
 43265:AUE_CLOSERANGE:close_range(2):cl
 43273:AUE_PDRFORK:pdrfork(2):pc
+43274:AUE_PDOPENPID:pdopenpid(2):pc
+43275:AUE_PDPTRACE:pdptrace(2):pc
 #
 # Solaris userspace events.
 #

From nobody Mon Nov 23 02:09:18 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXqBR25ngz71hf3
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 02:09: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXqBQ3yyXz3H4h
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:09:18 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795399758;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=r9ZNucyU5/OpDufxsvUXR9GjWZ1EZat9Takn3g9yREk=;
	b=meBF8L+iWs49o0/LJYTrVfT3dOZdQz6KB0tUc+k9O4HEGsAIVxsavy+I7JNe9o1al7/zL6
	7KV9BHt5geg3CoxI9gQ1cyY3HOyYHMMbXdYSV6nDI4AbxFL76YB4UjuIKQRsrXEFoVP60b
	mW+n+pJD2QjEV8Edxi66UHnlJ12dPWtvFA6xHoJxUVoTs2En059FLbQeqEcR+4SZsyP7qV
	G7P88H1kYhXmxwiG+0OCpa4xJyuonDwlTIxowLDqgnZScSAXxGCFQLmgfkBA/4MvIoVWQK
	zdJAZpAeS65fujE0tVi14yAhnDBC7+soLA4HGCS7FCs1vdTp6C+2xfsvMLWTgQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399758;
	b=r4pHPzW2QTyMMT6Z0hWpuGVqr4bvryF0t7hSlrWSi4nIk4YXs8kMlNAQjI3wLkLD67oNll
	IRh0GkA+Uo8z3aCLP9QE2Nb96DuLRKcVriAGT1sEEGWp7XJHic7jKFn0e7kS44RGawxYyD
	LWvnvoHmWYrdocbCfp6Yb7YLW5ijgHSITjerbsUagJRTsmVNZImZrmzHGng2FaKvblDD6B
	Om8Iz9YPKHXBbMXXaHvbwQTsoGQh5t0eh3o2QW1LM1PsFqwzIfF0Wi8pVF3eoAPypxVGNJ
	ddgF8VEVY1e2YaTWcZcTe9lE9NRJA8aLppocX0MUhcLqVaDwQcOw/gyunwMIbg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795399758;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=r9ZNucyU5/OpDufxsvUXR9GjWZ1EZat9Takn3g9yREk=;
	b=kB1OFo3Ac962Q+fNKM2NzHSnv97rCmf1nAhdL2SJ+I4Wcmf5aBrU/E+kpK6N6MGdVP3pWW
	0ZGRZYyokUht5tO4lwVMf0JwunYPBwKMLFDzuYg+spFPSKxNbPPfyZcuI+aLL01TcIrY8r
	1v/v11zaEoGjZ0ToN1/7a8Il0sNeXAkspTMNKusoP0fi8PaSL1QWo6xrL7tfRZ3HzffrIF
	ySEZBFkv8Mxe5vUFjZTCytlfYb5e2wrC6oBBsw2ZLhhst+HQTYk0nGhm8LReHzxpj9uq/I
	Rz3M2S4SdbhMF29cd2s9C6ysFlP04mhNxQRkbI252M4jf5cRnyeDcLMVoV5RzA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXqBQ3WGLzVqj
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:09:18 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 933a
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 02:09:18 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Konstantin Belousov <kib@FreeBSD.org>
Subject: git: a6da18f83817 - main - contrib/openbsm/etc/audit_event: add entries for {f,}chaltroot
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: a6da18f838179bc5e691d583d56633aa3c357375
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 02:09:18 +0000
Message-Id: <6b03a04e.933a.22203169@gitrepo.freebsd.org>

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=a6da18f838179bc5e691d583d56633aa3c357375

commit a6da18f838179bc5e691d583d56633aa3c357375
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-11-23 01:26:26 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-23 02:08:54 +0000

    contrib/openbsm/etc/audit_event: add entries for {f,}chaltroot
    
    Reported by:    llm-postcr
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
---
 contrib/openbsm/etc/audit_event | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/contrib/openbsm/etc/audit_event b/contrib/openbsm/etc/audit_event
index f7ba6ae93e94..530d01006c6b 100644
--- a/contrib/openbsm/etc/audit_event
+++ b/contrib/openbsm/etc/audit_event
@@ -616,6 +616,8 @@
 43273:AUE_PDRFORK:pdrfork(2):pc
 43274:AUE_PDOPENPID:pdopenpid(2):pc
 43275:AUE_PDPTRACE:pdptrace(2):pc
+43276:AUE_CHALTROOT:chaltroot(2):pc
+43277:AUE_FCHALTROOT:fchaltroot(2):pc
 #
 # Solaris userspace events.
 #

From nobody Mon Nov 23 02:09:20 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXqBT0gn0z71hKX
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 02:09:21 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXqBS5vp3z3HLB
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:09:20 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795399760;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=/BYeMmDdbR3EF8YcK+4P0oja+jx+v3uk/1DNtWqZINw=;
	b=T0ZpCQv2vEHwbdCk3ne5nkewpNXBfese9+x1VXJQ9wB4G/JT8mnNfDO+qiZg2Whl11FCf4
	BglMXjSbUZAx2CB0HrcqBjtqomQEEjkfkE9V+ztcD6NGLcXJMdOB3B/lF7RSqUPbA4Nfo3
	5a34yfc2YT44u6qUOO4p3vSgc27nDXjj0JvqYvnTD/JMK/QYJ4gf+J9s0dF7/IA6678Np2
	Uv5rg25c8ielcFWkbtwCSZB0q2YJffr+mi5hOaWb5gL+XrWjhqc6ib/k0MDsfPEQlW9Bxr
	RW9jb8hX+apRuKOVCoRdMfbBbtFCbLq3kwSMUnP1nVYRCwW7/9cuJeN7AIi5IQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399760;
	b=fB1BvVnX/Cyuh0SQceNlVpu6I9WU3XM4Jm6ksV0mg3lNeQ2tXEQf14HfqqOTBe7gHgbGbI
	Tp4AmJNvSxwJMfTG3PMEkdsuCz/ZgwMn1mAXHxhUYinW8vlPF8m3aC8jFj9dOQEVE5hkl0
	8yA4L5t/PUMsrtk9eLpPHr7DjOvQIQlEQkk8WZ7vjnevfPbCdWvXZZRhX4HwvSN9napFqI
	sx7Yb/JkH7oy5fdXpNXC6MAdiUo/nVe/JYQMYqEElmUFW9z9lzuUKEA9pZbHwks995bncL
	wiUk4vSxdHzo7cXGA5o0Tq62U69JEuDK9H3kPvNpsjmnxusb0RFqAgd4zNUPFg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795399760;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=/BYeMmDdbR3EF8YcK+4P0oja+jx+v3uk/1DNtWqZINw=;
	b=KtBNEUuRHm0p/GaUVWDgxpe38zCG3izN+bjNgM19v0DZg453pIFdWPoYLyOJwyAZjfRKpz
	/psIQLEqSmrfy5aJ8o7gQnUCw/ga+eJVRXTPn+7CpH3pWzsdE2MVpop+oDD7UvFhCkeVVg
	ktmuZ59aAtLtGQD5aMjp/J287kCRjv87I0mlR7DONQrUZx1KfJI7JZPZCh6Xd045+XzzZY
	367P3aPpYzKNN/8rDGb+Y6Flm0EFQ7wcqfiImZ6rgLz9TKTQg8H1nntOr/91vxbSOjEPQi
	aoUBQtTSPX+hpTR67TahJbA5kf+Hrxe56v/eSuVZHkWyp73t5mny5/esOVsx5w==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXqBS47y4zV8s
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:09:20 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 9d08
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 02:09:20 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Konstantin Belousov <kib@FreeBSD.org>
Subject: git: d50b9281d8c6 - main - Regen
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: d50b9281d8c6c840c8227820d0a30c6d05384877
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 02:09:20 +0000
Message-Id: <6b03a050.9d08.610d11e1@gitrepo.freebsd.org>

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=d50b9281d8c6c840c8227820d0a30c6d05384877

commit d50b9281d8c6c840c8227820d0a30c6d05384877
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-11-23 01:43:10 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-23 02:09:03 +0000

    Regen
---
 sys/compat/freebsd32/freebsd32_sysent.c | 2 +-
 sys/kern/init_sysent.c                  | 2 +-
 sys/sys/sysproto.h                      | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c
index 5be4ee8911cf..004f8437cf98 100644
--- a/sys/compat/freebsd32/freebsd32_sysent.c
+++ b/sys/compat/freebsd32/freebsd32_sysent.c
@@ -663,7 +663,7 @@ struct sysent freebsd32_sysent[] = {
 	{ .sy_narg = AS(freebsd32_timerfd_settime_args), .sy_call = (sy_call_t *)freebsd32_timerfd_settime, .sy_auevent = AUE_TIMERFD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 587 = freebsd32_timerfd_settime */
 	{ .sy_narg = AS(kcmp_args), .sy_call = (sy_call_t *)sys_kcmp, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 588 = kcmp */
 	{ .sy_narg = AS(getrlimitusage_args), .sy_call = (sy_call_t *)sys_getrlimitusage, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 589 = getrlimitusage */
-	{ .sy_narg = AS(fchroot_args), .sy_call = (sy_call_t *)sys_fchroot, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 590 = fchroot */
+	{ .sy_narg = AS(fchroot_args), .sy_call = (sy_call_t *)sys_fchroot, .sy_auevent = AUE_FCHROOT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 590 = fchroot */
 	{ .sy_narg = AS(freebsd32_setcred_args), .sy_call = (sy_call_t *)freebsd32_setcred, .sy_auevent = AUE_SETCRED, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 591 = freebsd32_setcred */
 	{ .sy_narg = AS(exterrctl_args), .sy_call = (sy_call_t *)sys_exterrctl, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 592 = exterrctl */
 	{ .sy_narg = AS(inotify_add_watch_at_args), .sy_call = (sy_call_t *)sys_inotify_add_watch_at, .sy_auevent = AUE_INOTIFY, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 593 = inotify_add_watch_at */
diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c
index 9814ec8e2253..604ecf2527a9 100644
--- a/sys/kern/init_sysent.c
+++ b/sys/kern/init_sysent.c
@@ -662,7 +662,7 @@ struct sysent sysent[] = {
 	{ .sy_narg = AS(timerfd_settime_args), .sy_call = (sy_call_t *)sys_timerfd_settime, .sy_auevent = AUE_TIMERFD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 587 = timerfd_settime */
 	{ .sy_narg = AS(kcmp_args), .sy_call = (sy_call_t *)sys_kcmp, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 588 = kcmp */
 	{ .sy_narg = AS(getrlimitusage_args), .sy_call = (sy_call_t *)sys_getrlimitusage, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 589 = getrlimitusage */
-	{ .sy_narg = AS(fchroot_args), .sy_call = (sy_call_t *)sys_fchroot, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 590 = fchroot */
+	{ .sy_narg = AS(fchroot_args), .sy_call = (sy_call_t *)sys_fchroot, .sy_auevent = AUE_FCHROOT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },	/* 590 = fchroot */
 	{ .sy_narg = AS(setcred_args), .sy_call = (sy_call_t *)sys_setcred, .sy_auevent = AUE_SETCRED, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 591 = setcred */
 	{ .sy_narg = AS(exterrctl_args), .sy_call = (sy_call_t *)sys_exterrctl, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 592 = exterrctl */
 	{ .sy_narg = AS(inotify_add_watch_at_args), .sy_call = (sy_call_t *)sys_inotify_add_watch_at, .sy_auevent = AUE_INOTIFY, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC },	/* 593 = inotify_add_watch_at */
diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h
index d4e339e446ae..beae12a6463b 100644
--- a/sys/sys/sysproto.h
+++ b/sys/sys/sysproto.h
@@ -3364,7 +3364,7 @@ int	freebsd14_setgroups(struct thread *, struct freebsd14_setgroups_args *);
 #define	SYS_AUE_timerfd_settime	AUE_TIMERFD
 #define	SYS_AUE_kcmp	AUE_NULL
 #define	SYS_AUE_getrlimitusage	AUE_NULL
-#define	SYS_AUE_fchroot	AUE_NULL
+#define	SYS_AUE_fchroot	AUE_FCHROOT
 #define	SYS_AUE_setcred	AUE_SETCRED
 #define	SYS_AUE_exterrctl	AUE_NULL
 #define	SYS_AUE_inotify_add_watch_at	AUE_INOTIFY

From nobody Mon Nov 23 02:09:19 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXqBS3CBHz71hfP
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 02:09:20 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXqBR4VDjz3HBt
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:09:19 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795399759;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=zeo/UexlmjzykW5F30eXE9M++8ijDhmu7gku97q77d0=;
	b=WHSR7C/7HEfRj0l8aTd4erJC3dqYIV4+SoHpJZaNLdg6IlvDYjH79Mbw5GLC8b4Zf4Djvm
	SjRxlqLNEH6PlvoO5IqzMWcuB8JrAhgE3HvqZTebag6u4duLeSCe60wuLDodRpeNPjoC1n
	8/+GRUaBCCAe7ZYClyv9e4jKfqEtsVx0IHxcTpyEk/ay0nt/Xvm44UVKVvomZ9ACdxscDm
	BihsefAe/p/iCu3Pwr50d1lOAh6DG35kc1k3LY+k6/P3u9cWoUefmyJOiCEd6N1YpJ++W0
	m/x6kjU+BLO9VfyNZDe7HOUy8SImgmaWEL/LZrDDNPlkIN4A4rVRFi+m1B/D4Q==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795399759;
	b=mwZAJT/GLj5hWScCRSpCkdpcBwkhV+KJaNBzJMB4/e2nQFkUCNABgFegt2cm4UNZ3gtFC9
	PspmDL/cRdkxSngMxng4Uo+ImLWIqIoyQCQfMxDTFcuQ880YGFthxYam9kdMX2BODChC3r
	LXwxrj30ATtdY6ZPSe5tY8tdpv5DKtTMgtV/8zzswGNmzXHVeGfkYYCEJ7LMLJ0m/iUGLZ
	tQ4L0Nzd9Mr3KH9DFznxB4mg5ZdNOJNkPaablWobYS7Rl+Ed8Ug7BvHknvj8qtkL8VRac5
	2cuV03gCSk3rwoqCZ1TxhAi3aBOmpFOGsAPgzNItXSTYtQOxCPv7bXnasT03Hw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795399759;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=zeo/UexlmjzykW5F30eXE9M++8ijDhmu7gku97q77d0=;
	b=bH2y/vp8riva2NqESLje6Z4MdYunbnJlmsawifGwQdB6L5NY3deaJmq5fXB3Nu5kK2znya
	8r5mGVzCb/+onN/Z9QSFuZGseWjEMFppy+Pc+jll9ybmJjMy553dIJpCDIKbXeitK9dBsF
	LjQooZznn7JgAhkMwZCKiZXF3KqZj31R/GAFOLN3E6fN5G9nCleTQQvI54mBIhk0g6Ed9B
	PlqQVDF1HwWPvQKHJNcxrWqnyaSSZ3/HDJ8stLc700jYkqxWTIu/jfVyduBfwxvSb2kZxs
	JEsSWvXs+MlEycyvO+g8dyO3XQaEmwByyo0xF2W2n4SEyVMxLIB9BQt2xtVG2w==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXqBR3sCGzVH2
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 02:09:19 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 970b
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 02:09:19 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Konstantin Belousov <kib@FreeBSD.org>
Subject: git: c7b2fd667952 - main - fchroot(2): audit
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: c7b2fd667952a2c7347b290922f1dededbbc620c
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 02:09:19 +0000
Message-Id: <6b03a04f.970b.46664a11@gitrepo.freebsd.org>

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=c7b2fd667952a2c7347b290922f1dededbbc620c

commit c7b2fd667952a2c7347b290922f1dededbbc620c
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-11-23 01:29:54 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-23 02:08:58 +0000

    fchroot(2): audit
    
    The AUE_FCHROOT identifier was already added, but not used to audit the
    fchroot(2) syscall.
    
    Reported by:    llm-postcr
    Fixes:  b165e9e3ea4e ("Add fchroot(2)")
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
---
 sys/kern/syscalls.master       | 2 +-
 sys/kern/vfs_syscalls.c        | 2 ++
 sys/security/audit/audit_bsm.c | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
index aca0d13f7bd8..d6d2b8ed3efd 100644
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -3341,7 +3341,7 @@
 		    _Out_ rlim_t *res
 		);
 	}
-590	AUE_NULL	STD {
+590	AUE_FCHROOT	STD {
 		int fchroot(
 		    int fd
 		);
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 23de410cc74d..4f2684e1a996 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -1095,6 +1095,7 @@ sys_fchroot(struct thread *td, struct fchroot_args *uap)
 	int error;
 	uint8_t fdflags;
 
+	AUDIT_ARG_FD(uap->fd);
 	error = getvnode_path(td, uap->fd, &cap_fchroot_rights, &fdflags, &fp);
 	if (error != 0)
 		return (error);
@@ -1106,6 +1107,7 @@ sys_fchroot(struct thread *td, struct fchroot_args *uap)
 	vrefact(vp);
 	fdrop(fp, td);
 	vn_lock(vp, LK_SHARED | LK_RETRY);
+	AUDIT_ARG_VNODE1(vp);
 	error = kern_chroot(td, vp);
 	return (error);
 }
diff --git a/sys/security/audit/audit_bsm.c b/sys/security/audit/audit_bsm.c
index ba4f960b988c..adc627b1f4c7 100644
--- a/sys/security/audit/audit_bsm.c
+++ b/sys/security/audit/audit_bsm.c
@@ -1046,6 +1046,7 @@ kaudit_to_bsm(struct kaudit_record *kar, struct au_record **pau)
 	 */
 	case AUE_FCHALTROOT:
 	case AUE_FCHDIR:
+	case AUE_FCHROOT:
 	case AUE_FPATHCONF:
 	case AUE_FSTAT:
 	case AUE_FSTATFS:

From nobody Mon Nov 23 03:35:52 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXs6K0b3nz71h3D
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 03:35:53 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXs6J6pL3z4Gcr
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 03:35:52 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795404953;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=/ftgEUCiARgXyPVKNmR8KuAPB534Ob56hvguJoK8rTw=;
	b=jam+/JYJrX+08CMC2Paj4cowUx08fmKrWpkUvm6qGkxxttqcnWRN0M9w/QoG9MTI3dAZp6
	fuCLj0KSqXHRS5ECurbnDYaciCud0i7q3IV12g1OXBWIgJEODtySPFAO1YwGRgdLF2iSvn
	bqWePQxaxZhN/HmR8wrN5m/tzAWKR+VeTETSpdvFOACCUoWQix8P7fHq+Et0/w6VI6lT50
	o/kOO4u2e0PemdU+TGdOabZQ29RFBTCBcCT60zv6YDCllML/0PTdsJzefyXvdzQfjIiiTQ
	S2pGfTvnHhh31H7OWOtLqxdPWzRhbLExu/J6Q1aVkLj1DRYJ5FhhedgBYxKIvQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795404953;
	b=T+dVbAGSPyEvr0ZKfn7pawWUybSwUhBqYU7q5BD6FPJeMW2qwXI56e616vszM4S36Uj31T
	WhSGjQZZPhwhPKz4SsRZ2uqjU93DpIEazI9u/agHrvvlSwr+4Vi0F2ayMu23WHIqlIy7rz
	jQuE0tI+CjEy1I6qwPCHIWB7sXg0sMKcch2eRtezhFrZ+Z8vXM6lMzqyGFXMWihvVUAoRA
	Da4AC7LCyCbEJq2MtCtXI0SZDUUBSrxxlFIFUWCTpfvhsZWPeH3SmXkm5p8UtSL6j2dH2n
	8Ljp/yim9pxXuvyC/xapd4T/BfXD+Ed6hHFLE08RDtTDKNwHggz2dfHOoioXCQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795404953;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=/ftgEUCiARgXyPVKNmR8KuAPB534Ob56hvguJoK8rTw=;
	b=fvu1J1jwf7hxSQk2cA1HNgSsbHee/f4EOEXW2NWHI+d3nt7n1yma0rzl3DcGOU0cQhdGxQ
	mKF13dqG0sS/50osyS6HgqaP3Ru3SRMQxzoqXuZzK0p4mAMeFY1OqkcYBmDx3vqo2JGPjj
	R4h4D1vK6CU9D7JaS3qA7qkb8pQA+yvWjXtgaoGwqot4Ss4+c0KOn00kNUGK1JoCpJU//1
	sSIP+gGY03AUvF45GB6TaL6S+1krUgKWlmszTx3xI22/2B4liRbJ+kCuwlc2OCWIv64s0g
	IEb7aQLXVC06MYepKyOomvyfCSm6S+/vJWf/Mo10+iJza7PFDJnfL/mMOqvY6Q==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXs6J6S8QzZJK
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 03:35:52 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 11cca
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 03:35:52 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org
From: Adrian Chadd <adrian@FreeBSD.org>
Subject: git: 8b586022e305 - internal/admin - Release nprice from mentorship.
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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/internal/admin
X-Git-Reftype: branch
X-Git-Commit: 8b586022e3051d4677af6dea646a4d82a2257f24
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 03:35:52 +0000
Message-Id: <6b03b498.11cca.317753c4@gitrepo.freebsd.org>

The branch internal/admin has been updated by adrian:

URL: https://cgit.FreeBSD.org/src/commit/?id=8b586022e3051d4677af6dea646a4d82a2257f24

commit 8b586022e3051d4677af6dea646a4d82a2257f24
Author:     Adrian Chadd <adrian@FreeBSD.org>
AuthorDate: 2026-11-23 03:33:50 +0000
Commit:     Adrian Chadd <adrian@FreeBSD.org>
CommitDate: 2026-11-23 03:35:41 +0000

    Release nprice from mentorship.
    
    Great work, please keep it up!
    
    Approved by:    srcmgr (implicit)
---
 mentors | 1 -
 1 file changed, 1 deletion(-)

diff --git a/mentors b/mentors
index 9b764b16a7b6..18cf765cdda7 100644
--- a/mentors
+++ b/mentors
@@ -24,7 +24,6 @@ lytboris	ae
 oh		manu
 mchoo		jhb		Co-mentor: olce
 msvoelker	tuexen		Co-mentor: kp
-nprice		adrian
 ram		ken		Co-mentor: mav
 ray		imp		Co-mentor: glebius
 rmoeller	kevans

From nobody Mon Nov 23 04:10:11 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXssv45ltz71m8W
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 04:10: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXssv3dxRz4Knl
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 04:10:11 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795407011;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=ymrRSZkyCKpFVCESJ6MxvI0PtmJcCNjOVg9O6fAzXJE=;
	b=kaWabcmkD7bLoQZ1bEOulb8hYFbPbJDvucd127+fhoxtXKtUBccnRNFxNKu/Ez/h8eVlSK
	qzk+QlzCJou5EGDqBjQwEM1yt8iy86ok8JKtyT3aiJfkPTqDixgLaZJejnSzX1LkmQyObY
	JUtgbu2V3yd2Od46ESP4yDNRd4FreRt7NG98rUTghTJ8KwHbWx+xRXEOpNlWdtRie5uEYO
	WMEDzQStTzFMOl7k3EmSblDaSgQ6VEhS08mZ3odF1Vv3BWH/31n1T1eZx6b1kCjf0j13dQ
	IaqIeeNC+LF+gGVG/k+uCt5BCbFEuAyDcWQm4osqInMZSUXlh7tYcCug7AX/Ag==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795407011;
	b=n5pQ7uyAh2HdMSVCw9Qt7ZX1A9iVw+h01c/4S9M5VrfAI98uty+Sq2sSreKYXXa2SMRCg7
	XyRaeN3Rj55sG0vaSwnz+sTv1YiXmW5yxyX5RqixJgIZb4792kRbr5WtB13fcPSLA7ER5+
	l1L/xB7fFLZhQ8dJ3TMK11dFd1bsXobSsBblss3iGJyQ52GHbA0rEVga4r3ERqB8+9TrsD
	TWuXaItk7kaELzBX7Uu024j0ppObEsnbw+TMlVtFOgIsTBahxfu4kcC17rYDOrqFGTy8tg
	h4znDYMFqbTRFqqUKTWFzfLiLiFvDtDKl4RMAvEHXA7mQRoOFqzvxNa8W1XiLA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795407011;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=ymrRSZkyCKpFVCESJ6MxvI0PtmJcCNjOVg9O6fAzXJE=;
	b=aOTUwG+Bn39mS1xV6ehy1xQKnmd9EFkfkuuthbkBt7rxAaWwgSYOuE48wC/xzTgARKCcdF
	7nMG7TL2V8CmWmO1S1tQjXLstbvcdTTIcfaonQafXjfkZuAif0KDTyZs+39J7qaUGqtg4p
	cmhtvNe4e7njCXpznYv+mlQ1x302Fychm3xptmhPv4CnRdMq3/68lBavUYS58fb16ku1vD
	7r/ZUclBLo9fAVXaANyLD9rJLydGnabUIadhanGxIgUZdM9L/rjZfH5gKMDopLEw7imP66
	JKYLMe8BmM12YVwiSaMggmJKMQUtLZKaor2/bzxcr52E+y4SsOXbIIWpt9MB7w==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXssv2wJkzbcV
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 04:10:11 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 150c0
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 04:10:11 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Konstantin Belousov <kib@FreeBSD.org>
Subject: git: 318895df272f - main - pdptrace(2): handle audit
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: 318895df272fa6d63ba2e5b5cc71e3b8a2bf9f5a
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 04:10:11 +0000
Message-Id: <6b03bca3.150c0.7822d7a7@gitrepo.freebsd.org>

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=318895df272fa6d63ba2e5b5cc71e3b8a2bf9f5a

commit 318895df272fa6d63ba2e5b5cc71e3b8a2bf9f5a
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-11-23 03:33:44 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-23 04:09:43 +0000

    pdptrace(2): handle audit
    
    Reported by:    llm-postcr
    Fixes:  b2f300ee8fc0 ("sys/bsm/audit_kevents.h: add AUE_PDPTRACE")
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
---
 sys/security/audit/audit_bsm.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/sys/security/audit/audit_bsm.c b/sys/security/audit/audit_bsm.c
index adc627b1f4c7..6b7eacbf6ecf 100644
--- a/sys/security/audit/audit_bsm.c
+++ b/sys/security/audit/audit_bsm.c
@@ -1450,6 +1450,22 @@ kaudit_to_bsm(struct kaudit_record *kar, struct au_record **pau)
 		PROCESS_PID_TOKENS(2);
 		break;
 
+	case AUE_PDPTRACE:
+		if (ARG_IS_VALID(kar, ARG_CMD)) {
+			tok = au_to_arg32(1, "request", ar->ar_arg_cmd);
+			kau_write(rec, tok);
+		}
+		if (ARG_IS_VALID(kar, ARG_FD)) {
+			tok = au_to_arg32(2, "fd", ar->ar_arg_fd);
+			kau_write(rec, tok);
+		}
+		if (ARG_IS_VALID(kar, ARG_VALUE)) {
+			tok = au_to_arg32(5, "data", ar->ar_arg_value);
+			kau_write(rec, tok);
+		}
+		PROCESS_PID_TOKENS(2);
+		break;
+
 	case AUE_QUOTACTL:
 		if (ARG_IS_VALID(kar, ARG_CMD)) {
 			tok = au_to_arg32(2, "command", ar->ar_arg_cmd);

From nobody Mon Nov 23 05:49:19 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXw4H1dcBz71ypN
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 05:49:19 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXw4H0sYHz4SmF
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:49:19 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795412959;
	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=FL4fnUoOjveS7yfNwt32YGpDjIWzRPk1oREVNe8z+OM=;
	b=Of55hZx8fo6my78sLHTOmuy21yqMlPJt3s0FtT6yTPJxb/Srb/JzhOeNGDnq9KK2+yqtKp
	9Xy5oioaIGFo4dk3OUELVcOBwv8MyY4KzzvIQghHElWq3SraCU8sBBog2kfSMpShY1I+FX
	LXWskhiSsMmaHjm2EBy076N8EKnFOE6IGFA78t/14YsW5IEO1l4Dn9z3SwJIPbzWJ/2yvw
	F8V7lt4rEezOvanTzQduTWs6PXMsmfR9TaaHNCbs7Eaz2/pT70mUZSAzmG6BIw/2n3PIP2
	uVaHCYf2+u1fT6sHxRQoE5+yg79K+6qL1fTYm2VU7o3NvxVnNuriVuz6TMR3TA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795412959;
	b=VLeUnbw+LGoVijTre3ikn1tPLJrxVffQEZ6LWZkw8i2gfzAy7c+4Euz/qArA5vDQClsPkk
	ECrXS7GHUOF5O0u4+ad6TqMJxayG45VZQNGHwgTiGNujyROxzEwf6ltI4c6jzyV7TxIxac
	/6TGoeR3OzmOKxBtWlBf6gyG+oLnl4dwTYaYsY/1LTwSFjT0YgaKnMIG4ZJ4ALbWkreccZ
	q8Mt5Uq2ld1KJxRt7ZZupbIO449nNtyzT2q8oXcJWZOveeytYadffSs1/W6v7yUNozJyCL
	95ef4XT8dD0yGpmTJEJI1kV1OTcR90ZnJj0hqJ9jXSQkNg91UEGgfStL1OaGPA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795412959;
	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=FL4fnUoOjveS7yfNwt32YGpDjIWzRPk1oREVNe8z+OM=;
	b=gh6I05VhricXcZni6Yj5BsGWXol6YY8X9egG9+hNFQwV+5A+Pe9F/ck175EHDZkvTlO8Dw
	17xSgO3AoBuEoF18emU4VGAkgXU4oNLeu5Mnl5/LnnvtTy6Nyu1sd68pPKCnU/ruFYKT7o
	yFQt3//FfZrUA/8ez6UXHDjjwre5B1jb6HZADac9DVAV0SX8rsLJKRY9FA7STUngyIJ+jG
	yQo48WSCdtsBYIfDEkGPZh2VK48Hy4OkTETmGybeHAUsrywoAr7aZe54rd71HDtxI7C+Ii
	FGu24Y2aYklaiaFXDicv1S016Ewu36+UFsMXGl7MW0dTItA/xF7cijDQcNJ2jQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXw4H0XZ2zfL5
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:49:19 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1e03d
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 05:49:19 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Ed Maste <emaste@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 5f1cc74b81c7 - stable/14 - CODEOWNERS: Add myself to capsicum-test
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 5f1cc74b81c7ed610e55187f6a1539eadbc77e0a
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 05:49:19 +0000
Message-Id: <6b03d3df.1e03d.404a2cb8@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=5f1cc74b81c7ed610e55187f6a1539eadbc77e0a

commit 5f1cc74b81c7ed610e55187f6a1539eadbc77e0a
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2026-01-27 15:28:39 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 05:28:11 +0000

    CODEOWNERS: Add myself to capsicum-test
    
    (cherry picked from commit 5b036b25853349cd3cf26495e628276f79f29c42)
---
 .github/CODEOWNERS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 534d93b63925..592db52a318a 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -33,7 +33,7 @@
 
 /bin/sh		@jillest
 /contrib/atf		@ngie-eign
-/contrib/capsicum-test	@ngie-eign
+/contrib/capsicum-test	@ngie-eign @emaste
 /contrib/googletest	@ngie-eign
 /sbin/ipf		@cschuber
 /contrib/libcxxrt	@DimitryAndric @emaste

From nobody Mon Nov 23 05:49:20 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXw4J44LKz71ygq
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 05:49:20 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXw4J1JJZz4SK3
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:49:20 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795412960;
	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=MCFEtO1CZ4EjL/M3v+u8F1kxNpGHQ2X4D3mM89q7SJc=;
	b=ifnsMCtoummJrsqLYeffcgdclwx4zM5DMvmYqmJRYjMH+HoDDMhb9bZADC262frwYURnyE
	5KRKWnQiRJiyWSqOQLJNmdk/glEgTrBlXbtx0keE4mKnBpUzixJsAITx6PL4HXUkOtM/po
	SrwFcliKNmZz9DKJ7+OrNAUu+gtIJPmGb/DRgWdVZWkLg0KHCkLDsd4cshezAJsVdgPy8D
	0jO6YI1yHmdthrL5ZFa3vnvba2p97c24J/qyFtywacmpSDzpLA9nVmLVNRYdcgiI5rF1nc
	AQfYizY2h3+pmC82hrETkJCYGMoKzGIfu58PlYimsB0fBYtq7cdUpnoGsAPyCQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795412960;
	b=pt5A3B1DkkDRLxkenQTF98gOVtL4T3GpAAKeHpBXDuUr22oGXZPZJV36FMDLqhjlCj2YLg
	u/gBm1p1P7hCFECR6etIPMIad/UfIcME6xOy5qHyjC4ApNsNeJv8OulurqFttCadJX+oG3
	/WjFBcNo9JetRr/CzM6/dzZcERiiAD7Z17Orw4YbeGN9ZUoM5vtbe2YZhDJvIKo5Y4lloQ
	u8sfyyCirD+hLb9Y59O0eZcc0LEWK8Cx7dG3nnP+PjzJvzC2ma7Ozwev7zI2mPkTziyXtr
	/uMlPxJTqCtzKYc+RdD938VkXOjizdbX3na8Q7ct7BjGTgYlhMJIjIpZWz+yZQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795412960;
	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=MCFEtO1CZ4EjL/M3v+u8F1kxNpGHQ2X4D3mM89q7SJc=;
	b=KETfzFxCC2ePIG9Ud6GWLUTX5TcoOECCmQPlUchO1/0RaU5y7MUIih08PjvAbdAsTrtnDY
	Ku/I+z5dbDAQkPSAmDnzehkTbt+w1et+UkS9KKI7gvd0zHMAKXskjaQ/+MUGafvQmA4Zt/
	ioIusnKZf0b79TvxSg6FzsN0hfiGbr89vjAOaJ2jAGeGK3UdqYPtlKR9kRC7ag0ijvJDGQ
	n01baVaPs47SvB0LRTqndKomB19sVEbteKqMg+H/4GD2wnGUeicweWgoezYmZgOQ9OcySO
	3GzOkqvaqkTk6ZvkIRNqrCdF6u14shN5B0UAe53SUtVO0kruQ3ykCeGYulrBJw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXw4J0w88zfWx
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:49:20 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1feec
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 05:49:20 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Ed Maste <emaste@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 01d8317dda8c - stable/14 - capsicum-test: Move out of contrib
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 01d8317dda8c299fdaedf6a2fe610e8d41c8a2d0
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 05:49:20 +0000
Message-Id: <6b03d3e0.1feec.7b0d0f28@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=01d8317dda8c299fdaedf6a2fe610e8d41c8a2d0

commit 01d8317dda8c299fdaedf6a2fe610e8d41c8a2d0
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2026-01-27 13:28:23 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 05:29:33 +0000

    capsicum-test: Move out of contrib
    
    Google developed the Capsicum unit test suite[1] as part of the
    Capsicum-Linux[2] project, based on unit tests that existed in FreeBSD
    and unit tests developed as part of the initial Capsicum-Linux port.
    
    Capsicum-Linux was archived as of October 31, 2022 and is no longer
    being maintained.  FreeBSD is currently the only consumer of and
    contributor to the test suite.  Move the src into tests/sys/capsicum to
    simplify ongoing maintenance.
    
    The makefiles were deleted as we (continue to) use the existing bespoke
    FreeBSD Makefile, and CONTRIBUTING.md was removed as the Google CLA is
    no longer applicable.
    
    [1] https://github.com/google/capsicum-test
    [2] https://github.com/google/capsicum-linux
    
    Reviewed by:    asomers, oshogbo
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D54917
    
    (cherry picked from commit 670b568ec1c36464c6d55e400382c290b0391ccf)
---
 .github/CODEOWNERS                                 |  2 +-
 contrib/capsicum-test/.gitignore                   | 19 -----
 contrib/capsicum-test/CONTRIBUTING.md              | 20 ------
 contrib/capsicum-test/GNUmakefile                  | 82 ----------------------
 contrib/capsicum-test/makefile                     | 36 ----------
 .../capsicum-test => tests/sys/capsicum}/LICENSE   |  0
 tests/sys/capsicum/Makefile                        |  2 -
 .../capsicum-test => tests/sys/capsicum}/README.md |  0
 .../sys/capsicum}/capability-fd-pair.cc            |  0
 .../sys/capsicum}/capability-fd.cc                 |  0
 .../sys/capsicum}/capmode.cc                       |  0
 .../sys/capsicum}/capsicum-freebsd.h               |  0
 .../sys/capsicum}/capsicum-linux.h                 |  0
 .../sys/capsicum}/capsicum-rights.h                |  0
 .../sys/capsicum}/capsicum-test-main.cc            |  0
 .../sys/capsicum}/capsicum-test.cc                 |  0
 .../sys/capsicum}/capsicum-test.h                  |  0
 .../sys/capsicum}/capsicum.h                       |  0
 .../sys/capsicum}/copy_file_range.cc               |  0
 .../capsicum-test => tests/sys/capsicum}/fcntl.cc  |  0
 .../sys/capsicum}/fexecve.cc                       |  0
 .../capsicum-test => tests/sys/capsicum}/ioctl.cc  |  0
 .../capsicum-test => tests/sys/capsicum}/linux.cc  |  0
 .../capsicum-test => tests/sys/capsicum}/mini-me.c |  0
 .../capsicum-test => tests/sys/capsicum}/mqueue.cc |  0
 .../capsicum-test => tests/sys/capsicum}/openat.cc |  0
 .../sys/capsicum}/overhead.cc                      |  0
 .../sys/capsicum}/procdesc.cc                      |  0
 .../capsicum-test => tests/sys/capsicum}/rename.cc |  0
 .../capsicum-test => tests/sys/capsicum}/sctp.cc   |  0
 .../capsicum-test => tests/sys/capsicum}/select.cc |  0
 .../sys/capsicum}/showrights                       |  0
 .../sys/capsicum}/smoketest.c                      |  0
 .../capsicum-test => tests/sys/capsicum}/socket.cc |  0
 .../sys/capsicum}/syscalls.h                       |  0
 .../capsicum-test => tests/sys/capsicum}/sysctl.cc |  0
 .../sys/capsicum}/waittest.c                       |  0
 37 files changed, 1 insertion(+), 160 deletions(-)

diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 592db52a318a..c34af9276b3e 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -33,7 +33,6 @@
 
 /bin/sh		@jillest
 /contrib/atf		@ngie-eign
-/contrib/capsicum-test	@ngie-eign @emaste
 /contrib/googletest	@ngie-eign
 /sbin/ipf		@cschuber
 /contrib/libcxxrt	@DimitryAndric @emaste
@@ -91,6 +90,7 @@
 /sys/x86/pci	@bsdimp @bsdjhb
 /tests	@ngie-eign
 /tests/sys/aio/	@asomers
+/tests/sys/capsicum-test @ngie-eign @emaste
 /tests/sys/fs/fusefs/ @asomers
 /tests/sys/kqueue/	@jmgurney
 /tests/sys/opencrypto/	@jmgurney
diff --git a/contrib/capsicum-test/.gitignore b/contrib/capsicum-test/.gitignore
deleted file mode 100644
index bc8f8f5ce265..000000000000
--- a/contrib/capsicum-test/.gitignore
+++ /dev/null
@@ -1,19 +0,0 @@
-capsicum-test
-mini-me
-mini-me.noexec
-mini-me.setuid
-mini-me.32
-mini-me.x32
-mini-me.64
-libgtest.a
-smoketest
-*.o
-libcap*.deb
-libcap*.dsc
-libcap*.tar.gz
-libcap*.changes
-casper*.deb
-casper*.dsc
-casper*.tar.gz
-casper*.changes
-libcaprights.a
\ No newline at end of file
diff --git a/contrib/capsicum-test/CONTRIBUTING.md b/contrib/capsicum-test/CONTRIBUTING.md
deleted file mode 100644
index 1a054b840c0b..000000000000
--- a/contrib/capsicum-test/CONTRIBUTING.md
+++ /dev/null
@@ -1,20 +0,0 @@
-## Contributor License Agreement ##
-
-Contributions to any Google project must be accompanied by a Contributor
-License Agreement.  This is not a copyright **assignment**, it simply gives
-Google permission to use and redistribute your contributions as part of the
-project.
-
-  * If you are an individual writing original source code and you're sure you
-    own the intellectual property, then you'll need to sign an [individual
-    CLA][].
-
-  * If you work for a company that wants to allow you to contribute your work,
-    then you'll need to sign a [corporate CLA][].
-
-You generally only need to submit a CLA once, so if you've already submitted
-one (even if it was for a different project), you probably don't need to do it
-again.
-
-[individual CLA]: https://developers.google.com/open-source/cla/individual
-[corporate CLA]: https://developers.google.com/open-source/cla/corporate
diff --git a/contrib/capsicum-test/GNUmakefile b/contrib/capsicum-test/GNUmakefile
deleted file mode 100644
index 426eb49cdfa1..000000000000
--- a/contrib/capsicum-test/GNUmakefile
+++ /dev/null
@@ -1,82 +0,0 @@
-OS:=$(shell uname)
-
-# Set ARCH to 32 or x32 for i386/x32 ABIs
-ARCH?=64
-ARCHFLAG=-m$(ARCH)
-
-ifeq ($(OS),FreeBSD)
-EXTRA_LIBS=-lprocstat
-endif
-
-ifeq ($(OS),Linux)
-PROCESSOR:=$(shell uname -p)
-
-ifneq ($(wildcard /usr/lib/$(PROCESSOR)-linux-gnu),)
-# Can use standard Debian location for static libraries.
-PLATFORM_LIBDIR=/usr/lib/$(PROCESSOR)-linux-gnu
-else
-# Attempt to determine library location from gcc configuration.
-PLATFORM_LIBDIR=$(shell gcc -v 2>&1 | grep "Configured with:" | sed 's/.*--libdir=\(\/usr\/[^ ]*\).*/\1/g')
-endif
-
-# Override for explicitly specified ARCHFLAG.
-# Use locally compiled libcaprights in this case, on the
-# assumption that any installed version is 64-bit.
-ifeq ($(ARCHFLAG),-m32)
-PROCESSOR=i386
-PLATFORM_LIBDIR=/usr/lib32
-LIBCAPRIGHTS=./libcaprights.a
-endif
-ifeq ($(ARCHFLAG),-mx32)
-PROCESSOR=x32
-PLATFORM_LIBDIR=/usr/libx32
-LIBCAPRIGHTS=./libcaprights.a
-endif
-
-# Detect presence of libsctp in normal Debian location
-ifneq ($(wildcard $(PLATFORM_LIBDIR)/libsctp.a),)
-LIBSCTP=-lsctp
-CXXFLAGS=-DHAVE_SCTP
-endif
-
-ifneq ($(LIBCAPRIGHTS),)
-# Build local libcaprights.a (assuming ./configure
-# has already been done in libcaprights/)
-LOCAL_LIBS=$(LIBCAPRIGHTS)
-LIBCAPRIGHTS_OBJS=libcaprights/capsicum.o libcaprights/linux-bpf-capmode.o libcaprights/procdesc.o libcaprights/signal.o
-LOCAL_CLEAN=$(LOCAL_LIBS) $(LIBCAPRIGHTS_OBJS)
-else
-# Detect installed libcaprights static library.
-ifneq ($(wildcard $(PLATFORM_LIBDIR)/libcaprights.a),)
-LIBCAPRIGHTS=$(PLATFORM_LIBDIR)/libcaprights.a
-else
-ifneq ($(wildcard /usr/lib/libcaprights.a),)
-LIBCAPRIGHTS=/usr/lib/libcaprights.a
-endif
-endif
-endif
-
-endif
-
-# Extra test programs for arch-transition tests
-EXTRA_PROGS = mini-me.32 mini-me.64
-ifneq ($(wildcard /usr/include/gnu/stubs-x32.h),)
-EXTRA_PROGS += mini-me.x32
-endif
-
-# Chain on to the master makefile
-include makefile
-
-./libcaprights.a: $(LIBCAPRIGHTS_OBJS)
-	ar cr $@ $^
-
-# Small static programs of known architectures
-# These may require additional packages to be installed; for example, for Debian:
-#  - libc6-dev-i386 provides 32-bit headers for a 64-bit system
-#  - libc6-dev-x32 provides headers for the x32 ABI.
-mini-me.32: mini-me.c
-	$(CC) $(CFLAGS) -m32 -static -o $@ $<
-mini-me.x32: mini-me.c
-	$(CC) $(CFLAGS) -mx32 -static -o $@ $<
-mini-me.64: mini-me.c
-	$(CC) $(CFLAGS) -m64 -static -o $@ $<
diff --git a/contrib/capsicum-test/makefile b/contrib/capsicum-test/makefile
deleted file mode 100644
index e55393bbf131..000000000000
--- a/contrib/capsicum-test/makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-all: capsicum-test smoketest mini-me mini-me.noexec mini-me.setuid $(EXTRA_PROGS)
-OBJECTS=capsicum-test-main.o capsicum-test.o capability-fd.o copy_file_range.o fexecve.o procdesc.o capmode.o fcntl.o ioctl.o openat.o sysctl.o select.o mqueue.o socket.o sctp.o capability-fd-pair.o linux.o overhead.o rename.o
-
-GTEST_DIR=gtest-1.10.0
-GTEST_INCS=-I$(GTEST_DIR)/include -I$(GTEST_DIR)
-GTEST_FLAGS=-DGTEST_USE_OWN_TR1_TUPLE=1 -DGTEST_HAS_TR1_TUPLE=1
-CXXFLAGS+=$(ARCHFLAG) -Wall -g $(GTEST_INCS) $(GTEST_FLAGS) --std=c++11
-CFLAGS+=$(ARCHFLAG) -Wall -g
-
-capsicum-test: $(OBJECTS) libgtest.a $(LOCAL_LIBS)
-	$(CXX) $(CXXFLAGS) -g -o $@ $(OBJECTS) libgtest.a -lpthread -lrt $(LIBSCTP) $(LIBCAPRIGHTS) $(EXTRA_LIBS)
-
-# Small statically-linked program for fexecve tests
-# (needs to be statically linked so that execve()ing it
-# doesn't involve ld.so traversing the filesystem).
-mini-me: mini-me.c
-	$(CC) $(CFLAGS) -static -o $@ $<
-mini-me.noexec: mini-me
-	cp mini-me $@ && chmod -x $@
-mini-me.setuid: mini-me
-	rm -f $@ && cp mini-me $@&& sudo chown root $@ && sudo chmod u+s $@
-
-# Simple C test of Capsicum syscalls
-SMOKETEST_OBJECTS=smoketest.o
-smoketest: $(SMOKETEST_OBJECTS) $(LOCAL_LIBS)
-	$(CC) $(CFLAGS) -o $@ $(SMOKETEST_OBJECTS) $(LIBCAPRIGHTS)
-
-test: capsicum-test mini-me mini-me.noexec mini-me.setuid $(EXTRA_PROGS)
-	./capsicum-test
-gtest-all.o:
-	$(CXX) $(CXXFLAGS) $(ARCHFLAG) -I$(GTEST_DIR)/include -I$(GTEST_DIR) $(GTEST_FLAGS) -c ${GTEST_DIR}/src/gtest-all.cc
-libgtest.a: gtest-all.o
-	$(AR) -rv libgtest.a gtest-all.o
-
-clean:
-	rm -rf gtest-all.o libgtest.a capsicum-test mini-me mini-me.noexec smoketest $(SMOKETEST_OBJECTS) $(OBJECTS) $(LOCAL_CLEAN) $(EXTRA_PROGS)
diff --git a/contrib/capsicum-test/LICENSE b/tests/sys/capsicum/LICENSE
similarity index 100%
rename from contrib/capsicum-test/LICENSE
rename to tests/sys/capsicum/LICENSE
diff --git a/tests/sys/capsicum/Makefile b/tests/sys/capsicum/Makefile
index 24f488b2d14f..82ea99448186 100644
--- a/tests/sys/capsicum/Makefile
+++ b/tests/sys/capsicum/Makefile
@@ -10,8 +10,6 @@ CFLAGS+=	-I${SRCTOP}/tests
 
 .if ${MK_GOOGLETEST} != no
 
-.PATH: ${SRCTOP}/contrib/capsicum-test
-
 GTESTS+=	capsicum-test
 GTESTS_WRAPPER_SH.capsicum-test=	functional
 # This test script runs the same test suite twice, once as root and once as an
diff --git a/contrib/capsicum-test/README.md b/tests/sys/capsicum/README.md
similarity index 100%
rename from contrib/capsicum-test/README.md
rename to tests/sys/capsicum/README.md
diff --git a/contrib/capsicum-test/capability-fd-pair.cc b/tests/sys/capsicum/capability-fd-pair.cc
similarity index 100%
rename from contrib/capsicum-test/capability-fd-pair.cc
rename to tests/sys/capsicum/capability-fd-pair.cc
diff --git a/contrib/capsicum-test/capability-fd.cc b/tests/sys/capsicum/capability-fd.cc
similarity index 100%
rename from contrib/capsicum-test/capability-fd.cc
rename to tests/sys/capsicum/capability-fd.cc
diff --git a/contrib/capsicum-test/capmode.cc b/tests/sys/capsicum/capmode.cc
similarity index 100%
rename from contrib/capsicum-test/capmode.cc
rename to tests/sys/capsicum/capmode.cc
diff --git a/contrib/capsicum-test/capsicum-freebsd.h b/tests/sys/capsicum/capsicum-freebsd.h
similarity index 100%
rename from contrib/capsicum-test/capsicum-freebsd.h
rename to tests/sys/capsicum/capsicum-freebsd.h
diff --git a/contrib/capsicum-test/capsicum-linux.h b/tests/sys/capsicum/capsicum-linux.h
similarity index 100%
rename from contrib/capsicum-test/capsicum-linux.h
rename to tests/sys/capsicum/capsicum-linux.h
diff --git a/contrib/capsicum-test/capsicum-rights.h b/tests/sys/capsicum/capsicum-rights.h
similarity index 100%
rename from contrib/capsicum-test/capsicum-rights.h
rename to tests/sys/capsicum/capsicum-rights.h
diff --git a/contrib/capsicum-test/capsicum-test-main.cc b/tests/sys/capsicum/capsicum-test-main.cc
similarity index 100%
rename from contrib/capsicum-test/capsicum-test-main.cc
rename to tests/sys/capsicum/capsicum-test-main.cc
diff --git a/contrib/capsicum-test/capsicum-test.cc b/tests/sys/capsicum/capsicum-test.cc
similarity index 100%
rename from contrib/capsicum-test/capsicum-test.cc
rename to tests/sys/capsicum/capsicum-test.cc
diff --git a/contrib/capsicum-test/capsicum-test.h b/tests/sys/capsicum/capsicum-test.h
similarity index 100%
rename from contrib/capsicum-test/capsicum-test.h
rename to tests/sys/capsicum/capsicum-test.h
diff --git a/contrib/capsicum-test/capsicum.h b/tests/sys/capsicum/capsicum.h
similarity index 100%
rename from contrib/capsicum-test/capsicum.h
rename to tests/sys/capsicum/capsicum.h
diff --git a/contrib/capsicum-test/copy_file_range.cc b/tests/sys/capsicum/copy_file_range.cc
similarity index 100%
rename from contrib/capsicum-test/copy_file_range.cc
rename to tests/sys/capsicum/copy_file_range.cc
diff --git a/contrib/capsicum-test/fcntl.cc b/tests/sys/capsicum/fcntl.cc
similarity index 100%
rename from contrib/capsicum-test/fcntl.cc
rename to tests/sys/capsicum/fcntl.cc
diff --git a/contrib/capsicum-test/fexecve.cc b/tests/sys/capsicum/fexecve.cc
similarity index 100%
rename from contrib/capsicum-test/fexecve.cc
rename to tests/sys/capsicum/fexecve.cc
diff --git a/contrib/capsicum-test/ioctl.cc b/tests/sys/capsicum/ioctl.cc
similarity index 100%
rename from contrib/capsicum-test/ioctl.cc
rename to tests/sys/capsicum/ioctl.cc
diff --git a/contrib/capsicum-test/linux.cc b/tests/sys/capsicum/linux.cc
similarity index 100%
rename from contrib/capsicum-test/linux.cc
rename to tests/sys/capsicum/linux.cc
diff --git a/contrib/capsicum-test/mini-me.c b/tests/sys/capsicum/mini-me.c
similarity index 100%
rename from contrib/capsicum-test/mini-me.c
rename to tests/sys/capsicum/mini-me.c
diff --git a/contrib/capsicum-test/mqueue.cc b/tests/sys/capsicum/mqueue.cc
similarity index 100%
rename from contrib/capsicum-test/mqueue.cc
rename to tests/sys/capsicum/mqueue.cc
diff --git a/contrib/capsicum-test/openat.cc b/tests/sys/capsicum/openat.cc
similarity index 100%
rename from contrib/capsicum-test/openat.cc
rename to tests/sys/capsicum/openat.cc
diff --git a/contrib/capsicum-test/overhead.cc b/tests/sys/capsicum/overhead.cc
similarity index 100%
rename from contrib/capsicum-test/overhead.cc
rename to tests/sys/capsicum/overhead.cc
diff --git a/contrib/capsicum-test/procdesc.cc b/tests/sys/capsicum/procdesc.cc
similarity index 100%
rename from contrib/capsicum-test/procdesc.cc
rename to tests/sys/capsicum/procdesc.cc
diff --git a/contrib/capsicum-test/rename.cc b/tests/sys/capsicum/rename.cc
similarity index 100%
rename from contrib/capsicum-test/rename.cc
rename to tests/sys/capsicum/rename.cc
diff --git a/contrib/capsicum-test/sctp.cc b/tests/sys/capsicum/sctp.cc
similarity index 100%
rename from contrib/capsicum-test/sctp.cc
rename to tests/sys/capsicum/sctp.cc
diff --git a/contrib/capsicum-test/select.cc b/tests/sys/capsicum/select.cc
similarity index 100%
rename from contrib/capsicum-test/select.cc
rename to tests/sys/capsicum/select.cc
diff --git a/contrib/capsicum-test/showrights b/tests/sys/capsicum/showrights
similarity index 100%
rename from contrib/capsicum-test/showrights
rename to tests/sys/capsicum/showrights
diff --git a/contrib/capsicum-test/smoketest.c b/tests/sys/capsicum/smoketest.c
similarity index 100%
rename from contrib/capsicum-test/smoketest.c
rename to tests/sys/capsicum/smoketest.c
diff --git a/contrib/capsicum-test/socket.cc b/tests/sys/capsicum/socket.cc
similarity index 100%
rename from contrib/capsicum-test/socket.cc
rename to tests/sys/capsicum/socket.cc
diff --git a/contrib/capsicum-test/syscalls.h b/tests/sys/capsicum/syscalls.h
similarity index 100%
rename from contrib/capsicum-test/syscalls.h
rename to tests/sys/capsicum/syscalls.h
diff --git a/contrib/capsicum-test/sysctl.cc b/tests/sys/capsicum/sysctl.cc
similarity index 100%
rename from contrib/capsicum-test/sysctl.cc
rename to tests/sys/capsicum/sysctl.cc
diff --git a/contrib/capsicum-test/waittest.c b/tests/sys/capsicum/waittest.c
similarity index 100%
rename from contrib/capsicum-test/waittest.c
rename to tests/sys/capsicum/waittest.c

From nobody Mon Nov 23 05:49:21 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXw4K4nNnz71ygs
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 05:49: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXw4K2ZrWz4SbK
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:49:21 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795412961;
	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=GK7vr0wDTWDb7jJug2CxdZ8KaFNoBSd19XrNLl8kSys=;
	b=E4YPmKQUcgDo+ub+nt8y2VPlsmU6xSMVz66hQYSoIi0Y8lgTD1p0562LvEXqDdfVjTwjRe
	HBk8JYKdNsqFgdB/qi2SRTgVYfzpkgLBsXotJ7YSXb2Z3gyUnfp00nc4G0BASjz5t2U7em
	y2DX+6/f/0Rk8H5JZZ69KtZr5TIKagwOHjHnVnpq9Mysq8MkmiVIhHahihbFC3L3XftFw1
	YnSej+08PmkKf/JqAov/yR3n/HL1gep5wwWI3qFBvpgU7nuN95WCMLRyoUXA0wj6cswm5/
	btpUqFzmSCTUjQquhvpoEPAaHHcD85Al752cihU70hrnMZZgt5RYd/Umz0DvMA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795412961;
	b=lxHDOtgRyvhEkqOlIx77Cz6Ba4aRKW384Jw4vkQfFnoKYk46rK3ZBqeobBNGK1m8a4814t
	dA0MCGC6r0JI17AC0C9/mkb1fV2C+YYz7W2sA2q8jJkQZpUx0+z+ndOPwhTmGtEFrysu8c
	VjQCFfslZUu1LVjcfEt5jIPCQRvE/nlHV5iUsaMuk7JRTt1prU/7qujRAM7P3+PEpu310y
	74wdA+8Ik3jJjAGUohwVRqnNTj2XJH6O79eO+kVgaRq7aEAt9oUrRAzfFlMkWTopNbYX/f
	SB6F4STRAA5G2TZhWD25AEZkDThFm0UbSJ6KCcGOUU60YtUkpKPc+x1bN3n59Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795412961;
	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=GK7vr0wDTWDb7jJug2CxdZ8KaFNoBSd19XrNLl8kSys=;
	b=A7amnNrMfoOhFaQ0tNlHwPbYfgcDTSP/lgJudMH4b7uLTW3cU4qfifVVDFGCsBdD8ZnD1J
	xoJP0h1mlOuadzFiNc2fncnU8YRqqmBtJTi24gJUq1JGCbKla0doL6VUMgODZ11M4ai0vj
	7vIFhT2y3rzm1j259UIQ41l1ZbfAuNJxn1w7wnHMpe0ihWktqyJB9XRDu8jSYw2BbyGW9z
	BeTaVSZNyldcq6kefDjTuP+PgMBd6UcFhytVHRboeASVDkcH3g1sH0i30nzHUCV3KH8xaK
	lozXVQLivB2oUgwcjPRPKIPUgMf9eOWuEjHkIYqCuSr0rChdw3KF+2Ghaa0PLA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXw4K1D3Fzdxc
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:49:21 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1eea9
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 05:49:21 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Ed Maste <emaste@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 952a75f511d5 - stable/14 - MAINTAINERS, CODEOWNERS: Update capsicum-test
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 952a75f511d5ba33073987af5f5d72dbd3dbce82
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 05:49:21 +0000
Message-Id: <6b03d3e1.1eea9.39b2305c@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=952a75f511d5ba33073987af5f5d72dbd3dbce82

commit 952a75f511d5ba33073987af5f5d72dbd3dbce82
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2026-02-05 18:21:27 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 05:31:08 +0000

    MAINTAINERS, CODEOWNERS: Update capsicum-test
    
    Fixes: 670b568ec1c3 ("capsicum-test: Move out of contrib")
    Sponsored by: The FreeBSD Foundation
    
    (cherry picked from commit b773da180e02c0c27de48dbba72f3fb7a64656da)
---
 .github/CODEOWNERS | 2 +-
 MAINTAINERS        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index c34af9276b3e..2af2ef56ef1b 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -90,7 +90,7 @@
 /sys/x86/pci	@bsdimp @bsdjhb
 /tests	@ngie-eign
 /tests/sys/aio/	@asomers
-/tests/sys/capsicum-test @ngie-eign @emaste
+/tests/sys/capsicum/	@ngie-eign @emaste
 /tests/sys/fs/fusefs/ @asomers
 /tests/sys/kqueue/	@jmgurney
 /tests/sys/opencrypto/	@jmgurney
diff --git a/MAINTAINERS b/MAINTAINERS
index a17d94d7c90d..627fdc400e90 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -37,7 +37,6 @@ subsystem	login	notes
 aio(4)		asomers	Pre-commit review requested.
 ath(4)		adrian	Pre-commit review requested, send to freebsd-wireless@freebsd.org
 contrib/atf		ngie,#test		Pre-commit review requested.
-contrib/capsicum-test	ngie,#capsicum,#test	Pre-commit review requested.
 contrib/googletest	ngie,#test		Pre-commit review requested.
 sbin/ipf	cy			Pre-commit review requested.
 contrib/libcxxrt	dim,emaste		Pre-commit review preferred.
@@ -117,6 +116,7 @@ sys/x86/xen	royger		Pre-commit review recommended.
 sys/xen		royger		Pre-commit review recommended.
 tests			ngie,#test		Pre-commit review requested.
 tools/build	imp	Pre-commit review requested, especially to fix bootstrap issues.
+tests/sys/capsicum	ngie,#capsicum,#test	Pre-commit review requested.
 top(1)		eadler	Pre-commit review requested.
 usr.sbin/bsdconfig	dteske	Pre-commit phabricator review requested.
 usr.sbin/dpv	dteske	Pre-commit review requested. Keep in sync with libdpv.

From nobody Mon Nov 23 05:49:22 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXw4L68Rnz71ydv
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 05:49: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXw4L2d2yz4SKC
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:49:22 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795412962;
	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=vvEQW5ZrQJhQOnvauV5nQBHz07Sdj9Roi48RxNcQHtI=;
	b=CDh2CPWshIRUs0vMvutK2SUk3LQeaQZxKFfmoHLwvwPouCOAsZeakanbbinqXYQuyQdyaz
	IjrVdsG4KChhO+Ve99wW/CgAldYA9elEqLFIRnx3vKf3OIFyCTdjD6dMvzrXVBX3FSxEOV
	zC/kxfHV80JzrGBlpRZrNAbvEikiDdqjeIoNu6abWeq51yMBn4CcLTWvkQzODEDVcwC2Jq
	OjXxin2Oxdhl1JbYhHyUywUEWNVNLapfhQ3WtuZ0tpIzYgSF7fC317wjJ98Uyb0AT955EB
	5vABNuUeSpiT3JzuEsuOMMTUQCp7vrwW/y0Q6Qq4rHnpLoO36OBBtMOqHJF3hA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795412962;
	b=fCZYfIkAxcw0syzhuCPJMfVSVKh3YSHam08gjt2r50a8Kk1UVWJw0F/MOHKFFi3dG8N6M+
	F9GjygwNCdpLO0gH89BJP3k9g2F/+7b0gI2og8JohA0n0E3Z6goy/uJB2BVv/Ak0HWoCnx
	fTVer18KwD146aNmO6u3+XcX2SD/V1LUcXatZ0fLFewAztF7JflTgSrLTVkuuY7dhyOaxx
	emzXhTIhXpvFQc3U5WIiumH5cpC9XsvlVaKOA+iUkNf2+6f7e5FQlSEWPm/H9qIVnn1+8y
	Thew1vFJmYJr1uiYPM1RekC7KCOw8N8dhGyIpEZtSkAHfY2EfrmH1mv7WhIOxQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795412962;
	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=vvEQW5ZrQJhQOnvauV5nQBHz07Sdj9Roi48RxNcQHtI=;
	b=d2NZd1dazuihDGGZnzzkk33HO5GzUyiHQwOyLtU5RmZcXr66u+8XqW0ZM8z6At2K5dPvI4
	ed7Ordfz7vo7gqK6Mjr+8Qaynv7hpz+TYkKAXtsx9LXbSgDRvq+lCzTFZeNrnJfOdcAEaY
	OqgEAraRfHfN9We7yIL0IZmQ2cRwoQQkQ38XZAOLvsqFHW3EUmQjfih2XCzavdY5BGdTan
	rZNHEvkhnWdFdFTqN2+xhCHCabJoVFdWyN//BmAsDSmdPuVBkzm8ii9Y/mhIn6TLLD3WHp
	YZOjchskgMWYS3dvT2fE/KI3ApcdOWNfGH3kFLyB0mXq2/GkJRamu2TOr0j0EQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXw4L1VtCzf1K
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:49:22 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1f54e
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 05:49:22 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Alan Somers <asomers@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 78dba31e477c - stable/14 - tests: sys/capsicum/functional requires mqueuefs
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 78dba31e477c33adc9bc0899d11acab52dd00ce7
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 05:49:22 +0000
Message-Id: <6b03d3e2.1f54e.2947d52c@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=78dba31e477c33adc9bc0899d11acab52dd00ce7

commit 78dba31e477c33adc9bc0899d11acab52dd00ce7
Author:     Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2026-01-27 00:04:58 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 05:32:03 +0000

    tests: sys/capsicum/functional requires mqueuefs
    
    Skip this test if mqueuefs isn't loaded.  Unfortunately, that will skip
    the entire googletest test program, including test cases that don't
    require mqueuefs.  But the test's own skipping logic doesn't work, and
    we don't yet have a googletest-compatible require_kmods() function.
    
    MFC after:      2 weeks
    Sponsored by:   ConnectWise
    Reviewed by:    emaste, ngie
    Differential Revision: https://reviews.freebsd.org/D54902
    
    (cherry picked from commit df68a09ea2ec18ee975fb937d46a18250d4663c8)
---
 tests/sys/capsicum/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/sys/capsicum/Makefile b/tests/sys/capsicum/Makefile
index 82ea99448186..72da640437ac 100644
--- a/tests/sys/capsicum/Makefile
+++ b/tests/sys/capsicum/Makefile
@@ -16,6 +16,7 @@ GTESTS_WRAPPER_SH.capsicum-test=	functional
 # unprivileged user.  Serialize them since some tests access global namespaces,
 # e.g., mqueuefs, and can trample on each other.
 TEST_METADATA.functional+=	is_exclusive="true"
+TEST_METADATA.functional+=	required_kmods="mqueuefs"
 
 SRCS.capsicum-test+=	\
 	capsicum-test-main.cc \

From nobody Mon Nov 23 05:49:23 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXw4M4wh4z71ydw
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 05:49:23 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXw4M2Zskz4Skx
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:49:23 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795412963;
	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=YyqqWuohFfKB4qWXxtRfbK+B49Zog9OphXx13NItiy4=;
	b=sJtxpYF6XDTw7GcFic3HFUppyXQ2hhzIAtThmd3CUyOt6A0jFQD1IbhsbFr/PzgY03krdM
	KEkas4Wx+LcI2LezWqzXeNnCjihOKhIB8TEcEpbP238wCGxwSS63hrv5BA1R1D4/Trf4wn
	OojEfDiih9+vAcXJLBaTMVD3JmV6kiJV0Nx2rmuzsIzAQ8Nx0LhSNljDHBnpZK9ua8zfnh
	iXvlRIt2GSoX1M/BinLPOkFndYqlQJpT2sYlNxDpbadp8aWR1Bvcj86bMDxbNbDdBjCVyx
	pjJD+nham5zBIB0rQRjXt0nDtNqSDfAyY1fl80ib8fNdoeBjvix5M3f5uHnShw==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795412963;
	b=LQbdX9erT8wwCXxx6g3rgxmddbXV9VsRxms2Xxll+fabx/ViZVv75P13V5rg+ejdB6X4Ad
	G/xdozzo2p4USsWCkPhtuDPsRcr25PEZWcQqdfZCIVhd9BS3WWcXL6OiBFhXuKdn8Il8aP
	bJJ02kOoP3fEpE7ckDHVDvh/ZgTUyeirfPEMigmXja+lpaUvknMllcfuQ5u2ZLEW8oTv8e
	0BzOe2cQjmCZCec1ifnurod1atg51u0cE5Sj3gk8/fiW8r90X9tiSwfKR6U6Mc3+w3Uyus
	MOTR8GdK6MRdMIB9nM5P52+CRYey+l5kLOLsuIBAm66h7DejjfktarBr0zfGEg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795412963;
	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=YyqqWuohFfKB4qWXxtRfbK+B49Zog9OphXx13NItiy4=;
	b=R/ulKcUoaMpI4KvNKatNFX79nOXPPd8nt6chucrSYuLBo9yTby8hRzk5xINBV07HrzdjeJ
	0hK9wcNjV7QTkLbnvJN7P0Ssz+yxxnVbiyyDLhncNmpkc+ZvqiV8mJi4MdxJ2zEKmkOZ1f
	uUbLOLdtB3S82/SwEeYL7M9Wl95wdA+Wb4YHY/TvZnekpfcfds9esS8Y0ZUd/4tGcZNdUQ
	kJNwSUDzcIiqBLHsvzyWgI+Nky+5jDM122egZTCydG53iP7h0Omc07/fh0D4bUrRuFJcX0
	T7emtkR2ZECUtKycKyYFACt/GOW0K1pE3x0bV0ENqfJdkt3ZPpHig6JEszYo6A==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXw4M1yTWzfSQ
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:49:23 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1f193
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 05:49:23 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Alan Somers <asomers@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: a84a3e2bc368 - stable/14 - capsicum-tests: remove Linux support
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: a84a3e2bc368d568e43edfccc43e3dac157ff38a
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 05:49:23 +0000
Message-Id: <6b03d3e3.1f193.376ce136@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=a84a3e2bc368d568e43edfccc43e3dac157ff38a

commit a84a3e2bc368d568e43edfccc43e3dac157ff38a
Author:     Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2026-01-29 20:39:20 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 05:32:23 +0000

    capsicum-tests: remove Linux support
    
    Now that this project is part of freebsd-src, it no longer needs to be
    portable.  Remove Linux-only tests, cross-os compatibility code, and
    compatibility with older FreeBSD versions.  Leave in place some
    originally Linux-only tests that could now be ported to FreeBSD, like the
    pipe2 tests.
    
    Sponsored by:   ConnectWise
    Reviewed by:    oshogbo
    Differential Revision: https://reviews.freebsd.org/D54985
    
    (cherry picked from commit fba81b33aabff74ad03d5f9f9663c176cf060fa6)
---
 tests/sys/capsicum/README.md             |  48 ++--------
 tests/sys/capsicum/capability-fd-pair.cc | 140 -----------------------------
 tests/sys/capsicum/capability-fd.cc      |  70 ++-------------
 tests/sys/capsicum/capmode.cc            |  51 +----------
 tests/sys/capsicum/capsicum-freebsd.h    |  18 ----
 tests/sys/capsicum/capsicum-linux.h      |  40 ---------
 tests/sys/capsicum/capsicum-rights.h     | 103 ---------------------
 tests/sys/capsicum/capsicum-test-main.cc |  19 ----
 tests/sys/capsicum/capsicum-test.cc      |  23 -----
 tests/sys/capsicum/capsicum.h            | 148 +------------------------------
 tests/sys/capsicum/fcntl.cc              |  11 +--
 tests/sys/capsicum/ioctl.cc              |  29 +-----
 tests/sys/capsicum/linux.cc              |   2 +-
 tests/sys/capsicum/openat.cc             |  16 ----
 tests/sys/capsicum/procdesc.cc           |  66 ++++----------
 tests/sys/capsicum/sctp.cc               |   4 -
 tests/sys/capsicum/select.cc             |   4 -
 tests/sys/capsicum/smoketest.c           |  41 ++++-----
 tests/sys/capsicum/socket.cc             |   4 -
 tests/sys/capsicum/syscalls.h            | 144 ------------------------------
 tests/sys/capsicum/sysctl.cc             |   2 -
 tests/sys/capsicum/waittest.c            |   9 --
 22 files changed, 55 insertions(+), 937 deletions(-)

diff --git a/tests/sys/capsicum/README.md b/tests/sys/capsicum/README.md
index a8c8c6686759..8dea65d8d198 100644
--- a/tests/sys/capsicum/README.md
+++ b/tests/sys/capsicum/README.md
@@ -1,9 +1,8 @@
 # Capsicum User Space Tests
 
-This directory holds unit tests for [Capsicum](http://www.cl.cam.ac.uk/research/security/capsicum/)
+This directory holds unit tests for [Capsicum](https://man.freebsd.org/cgi/man.cgi?query=capsicum)
 object-capabilities. The tests exercise the syscall interface to a Capsicum-enabled operating system,
-currently either [FreeBSD >=10.x](http://www.freebsd.org) or a modified Linux kernel (the
-[capsicum-linux](http://github.com/google/capsicum-linux) project).
+Currently, [FreeBSD >=10.x](http://www.freebsd.org) is the only such operating system.
 
 The tests are written in C++11 and use the [Google Test](https://code.google.com/p/googletest/)
 framework, with some additions to fork off particular tests (because a process that enters capability
@@ -17,46 +16,15 @@ The original basis for these tests was:
    written by Robert Watson and Jonathan Anderson for the original FreeBSD 9.x Capsicum implementation
  - [unit tests](http://git.chromium.org/gitweb/?p=chromiumos/third_party/kernel-capsicum.git;a=tree;f=tools/testing/capsicum_tests;hb=refs/heads/capsicum) written by Meredydd Luff for the original Capsicum-Linux port.
 
-These tests were coalesced and moved into an independent repository to enable
-comparative testing across multiple OSes, and then substantially extended.
+These tests were coalesced and moved into an [independent repository](https://github.com/google/capsicum-test)
+to enable comparative testing across multiple OSes, and then substantially extended.
 
-## OS Configuration
+Subsequently, the [capsicum-linux port](https://github.com/google/capsicum-linux) was abandoned by
+its maintainers, rendering the independent repository obsolete.  So the tests were copied back into
+the FreeBSD source tree in time for 16.0-RELEASE.
 
-### Linux
-
-The following kernel configuration options are needed to run the tests:
-
- - `CONFIG_SECURITY_CAPSICUM`: enable the Capsicum framework
- - `CONFIG_PROCDESC`: enable Capsicum process-descriptor functionality
- - `CONFIG_DEBUG_FS`: enable debug filesystem
- - `CONFIG_IP_SCTP`: enable SCTP support
-
-### FreeBSD (>= 10.x)
+## Configuration
 
 The following kernel configuration options are needed so that all tests can run:
 
   - `options P1003_1B_MQUEUE`: Enable POSIX message queues (or `kldload mqueuefs`)
-
-## Other Dependencies
-
-### Linux
-
-The following additional development packages are needed to build the full test suite on Linux.
-
- - `libcaprights`: See below
- - `libcap-dev`: Provides headers for POSIX.1e capabilities.
- - `libsctp1`: Provides SCTP library functions.
- - `libsctp-dev`: Provides headers for SCTP library functions.
-
-
-## Linux libcaprights
-
-The Capsicum userspace library is held in the `libcaprights/` subdirectory.  Ideally, this
-library should be built (with `./configure; make` or `dpkg-buildpackage -uc -us`) and
-installed (with `make install` or `dpkg -i libcaprights*.deb`) so that the tests will
-use behave like a normal Capsicum-aware application.
-
-However, if no installed copy of the library is found, the `GNUmakefile` will attempt
-to use the local `libcaprights/*.c` source; this requires `./configure` to have been
-performed in the `libcaprights` subdirectory. The local code is also used for
-cross-compiled builds of the test suite (e.g. `make ARCH=32` or `make ARCH=x32`).
diff --git a/tests/sys/capsicum/capability-fd-pair.cc b/tests/sys/capsicum/capability-fd-pair.cc
index d56dac049805..63522b960d1e 100644
--- a/tests/sys/capsicum/capability-fd-pair.cc
+++ b/tests/sys/capsicum/capability-fd-pair.cc
@@ -46,143 +46,3 @@ TEST(CapabilityPair, sendfile) {
   close(sock_fds[1]);
   unlink(TmpFile("cap_sendfile_in"));
 }
-
-#ifdef HAVE_TEE
-TEST(CapabilityPair, tee) {
-  int pipe1_fds[2];
-  EXPECT_OK(pipe2(pipe1_fds, O_NONBLOCK));
-  int pipe2_fds[2];
-  EXPECT_OK(pipe2(pipe2_fds, O_NONBLOCK));
-
-  // Put some data into pipe1.
-  unsigned char buffer[4] = {1, 2, 3, 4};
-  EXPECT_OK(write(pipe1_fds[1], buffer, 4));
-
-  cap_rights_t r_ro;
-  cap_rights_init(&r_ro, CAP_READ);
-  cap_rights_t r_wo;
-  cap_rights_init(&r_wo, CAP_WRITE);
-  cap_rights_t r_rw;
-  cap_rights_init(&r_rw, CAP_READ, CAP_WRITE);
-
-  // Various attempts to tee into pipe2.
-  int cap_in_wo = dup(pipe1_fds[0]);
-  EXPECT_OK(cap_in_wo);
-  EXPECT_OK(cap_rights_limit(cap_in_wo, &r_wo));
-  int cap_in_rw = dup(pipe1_fds[0]);
-  EXPECT_OK(cap_in_rw);
-  EXPECT_OK(cap_rights_limit(cap_in_rw, &r_rw));
-  int cap_out_ro = dup(pipe2_fds[1]);
-  EXPECT_OK(cap_out_ro);
-  EXPECT_OK(cap_rights_limit(cap_out_ro, &r_ro));
-  int cap_out_rw = dup(pipe2_fds[1]);
-  EXPECT_OK(cap_out_rw);
-  EXPECT_OK(cap_rights_limit(cap_out_rw, &r_rw));
-
-  EXPECT_NOTCAPABLE(tee(cap_in_wo, cap_out_rw, 4, SPLICE_F_NONBLOCK));
-  EXPECT_NOTCAPABLE(tee(cap_in_rw, cap_out_ro, 4, SPLICE_F_NONBLOCK));
-  EXPECT_OK(tee(cap_in_rw, cap_out_rw, 4, SPLICE_F_NONBLOCK));
-
-  close(cap_in_wo);
-  close(cap_in_rw);
-  close(cap_out_ro);
-  close(cap_out_rw);
-  close(pipe1_fds[0]);
-  close(pipe1_fds[1]);
-  close(pipe2_fds[0]);
-  close(pipe2_fds[1]);
-}
-#endif
-
-#ifdef HAVE_SPLICE
-TEST(CapabilityPair, splice) {
-  int pipe1_fds[2];
-  EXPECT_OK(pipe2(pipe1_fds, O_NONBLOCK));
-  int pipe2_fds[2];
-  EXPECT_OK(pipe2(pipe2_fds, O_NONBLOCK));
-
-  // Put some data into pipe1.
-  unsigned char buffer[4] = {1, 2, 3, 4};
-  EXPECT_OK(write(pipe1_fds[1], buffer, 4));
-
-  cap_rights_t r_ro;
-  cap_rights_init(&r_ro, CAP_READ);
-  cap_rights_t r_wo;
-  cap_rights_init(&r_wo, CAP_WRITE);
-  cap_rights_t r_rs;
-  cap_rights_init(&r_rs, CAP_READ, CAP_SEEK);
-  cap_rights_t r_ws;
-  cap_rights_init(&r_ws, CAP_WRITE, CAP_SEEK);
-
-  // Various attempts to splice.
-  int cap_in_wo = dup(pipe1_fds[0]);
-  EXPECT_OK(cap_in_wo);
-  EXPECT_OK(cap_rights_limit(cap_in_wo, &r_wo));
-  int cap_in_ro = dup(pipe1_fds[0]);
-  EXPECT_OK(cap_in_ro);
-  EXPECT_OK(cap_rights_limit(cap_in_ro, &r_ro));
-  int cap_in_ro_seek = dup(pipe1_fds[0]);
-  EXPECT_OK(cap_in_ro_seek);
-  EXPECT_OK(cap_rights_limit(cap_in_ro_seek, &r_rs));
-  int cap_out_wo = dup(pipe2_fds[1]);
-  EXPECT_OK(cap_out_wo);
-  EXPECT_OK(cap_rights_limit(cap_out_wo, &r_wo));
-  int cap_out_ro = dup(pipe2_fds[1]);
-  EXPECT_OK(cap_out_ro);
-  EXPECT_OK(cap_rights_limit(cap_out_ro, &r_ro));
-  int cap_out_wo_seek = dup(pipe2_fds[1]);
-  EXPECT_OK(cap_out_wo_seek);
-  EXPECT_OK(cap_rights_limit(cap_out_wo_seek, &r_ws));
-
-  EXPECT_NOTCAPABLE(splice(cap_in_ro, NULL, cap_out_wo_seek, NULL, 4, SPLICE_F_NONBLOCK));
-  EXPECT_NOTCAPABLE(splice(cap_in_wo, NULL, cap_out_wo_seek, NULL, 4, SPLICE_F_NONBLOCK));
-  EXPECT_NOTCAPABLE(splice(cap_in_ro_seek, NULL, cap_out_ro, NULL, 4, SPLICE_F_NONBLOCK));
-  EXPECT_NOTCAPABLE(splice(cap_in_ro_seek, NULL, cap_out_wo, NULL, 4, SPLICE_F_NONBLOCK));
-  EXPECT_OK(splice(cap_in_ro_seek, NULL, cap_out_wo_seek, NULL, 4, SPLICE_F_NONBLOCK));
-
-  close(cap_in_wo);
-  close(cap_in_ro);
-  close(cap_in_ro_seek);
-  close(cap_out_wo);
-  close(cap_out_ro);
-  close(cap_out_wo_seek);
-  close(pipe1_fds[0]);
-  close(pipe1_fds[1]);
-  close(pipe2_fds[0]);
-  close(pipe2_fds[1]);
-}
-#endif
-
-#ifdef HAVE_VMSPLICE
-// Although it only involves a single file descriptor, test vmsplice(2) here too.
-TEST(CapabilityPair, vmsplice) {
-  int pipe_fds[2];
-  EXPECT_OK(pipe2(pipe_fds, O_NONBLOCK));
-
-  cap_rights_t r_ro;
-  cap_rights_init(&r_ro, CAP_READ);
-  cap_rights_t r_rw;
-  cap_rights_init(&r_rw, CAP_READ, CAP_WRITE);
-
-  int cap_ro = dup(pipe_fds[1]);
-  EXPECT_OK(cap_ro);
-  EXPECT_OK(cap_rights_limit(cap_ro, &r_ro));
-  int cap_rw = dup(pipe_fds[1]);
-  EXPECT_OK(cap_rw);
-  EXPECT_OK(cap_rights_limit(cap_rw, &r_rw));
-
-  unsigned char buffer[4] = {1, 2, 3, 4};
-  struct iovec iov;
-  memset(&iov, 0, sizeof(iov));
-  iov.iov_base = buffer;
-  iov.iov_len = sizeof(buffer);
-
-  EXPECT_NOTCAPABLE(vmsplice(cap_ro, &iov, 1, SPLICE_F_NONBLOCK));
-  EXPECT_OK(vmsplice(cap_rw, &iov, 1, SPLICE_F_NONBLOCK));
-
-  close(cap_ro);
-  close(cap_rw);
-  close(pipe_fds[0]);
-  close(pipe_fds[1]);
-}
-#endif
diff --git a/tests/sys/capsicum/capability-fd.cc b/tests/sys/capsicum/capability-fd.cc
index 0551d9bd81ef..a9e4d30ac4b9 100644
--- a/tests/sys/capsicum/capability-fd.cc
+++ b/tests/sys/capsicum/capability-fd.cc
@@ -110,40 +110,11 @@ static right_info known_rights[] = {
   RIGHTS_INFO(CAP_KQUEUE),
   /* Rights that are only present in some version or some OS, and so are #ifdef'ed */
   /* LINKAT got split */
-#ifdef CAP_LINKAT
-  RIGHTS_INFO(CAP_LINKAT),
-#endif
-#ifdef CAP_LINKAT_SOURCE
   RIGHTS_INFO(CAP_LINKAT_SOURCE),
-#endif
-#ifdef CAP_LINKAT_TARGET
   RIGHTS_INFO(CAP_LINKAT_TARGET),
-#endif
-  /* Linux aliased some FD operations for pdgetpid/pdkill */
-#ifdef CAP_PDGETPID_FREEBSD
-  RIGHTS_INFO(CAP_PDGETPID_FREEBSD),
-#endif
-#ifdef CAP_PDKILL_FREEBSD
-  RIGHTS_INFO(CAP_PDKILL_FREEBSD),
-#endif
   /* Linux-specific rights */
-#ifdef CAP_FSIGNAL
-  RIGHTS_INFO(CAP_FSIGNAL),
-#endif
-#ifdef CAP_EPOLL_CTL
-  RIGHTS_INFO(CAP_EPOLL_CTL),
-#endif
 #ifdef CAP_NOTIFY
   RIGHTS_INFO(CAP_NOTIFY),
-#endif
-#ifdef CAP_SETNS
-  RIGHTS_INFO(CAP_SETNS),
-#endif
-#ifdef CAP_PERFMON
-  RIGHTS_INFO(CAP_PERFMON),
-#endif
-#ifdef CAP_BPF
-  RIGHTS_INFO(CAP_BPF),
 #endif
   /* Rights in later versions of FreeBSD (>10.0) */
 };
@@ -152,7 +123,7 @@ void ShowCapRights(FILE *out, int fd) {
   size_t ii;
   bool first = true;
   cap_rights_t rights;
-  CAP_SET_NONE(&rights);
+  CAP_NONE(&rights);
   if (cap_rights_get(fd, &rights) < 0) {
     fprintf(out, "Failed to get rights for fd %d: errno %d\n", fd, errno);
     return;
@@ -210,11 +181,11 @@ FORK_TEST(Capability, CapNew) {
   cap_rights_t r_rws;
   cap_rights_init(&r_rws, CAP_READ, CAP_WRITE, CAP_SEEK);
   cap_rights_t r_all;
-  CAP_SET_ALL(&r_all);
+  CAP_ALL(&r_all);
 
   int cap_fd = dup(STDOUT_FILENO);
   cap_rights_t rights;
-  CAP_SET_NONE(&rights);
+  CAP_NONE(&rights);
   EXPECT_OK(cap_rights_get(cap_fd, &rights));
   EXPECT_RIGHTS_EQ(&r_all, &rights);
 
@@ -511,7 +482,7 @@ static void TryFileOps(int fd, cap_rights_t rights) {
   close(cap_cap_fd);
 
   char ch;
-  CHECK_RIGHT_RESULT(read(cap_fd, &ch, sizeof(ch)), rights, CAP_READ, CAP_SEEK_ASWAS);
+  CHECK_RIGHT_RESULT(read(cap_fd, &ch, sizeof(ch)), rights, CAP_READ, 0);
 
   ssize_t len1 = pread(cap_fd, &ch, sizeof(ch), 0);
   CHECK_RIGHT_RESULT(len1, rights, CAP_PREAD);
@@ -519,11 +490,10 @@ static void TryFileOps(int fd, cap_rights_t rights) {
   CHECK_RIGHT_RESULT(len2, rights, CAP_PREAD);
   EXPECT_EQ(len1, len2);
 
-  CHECK_RIGHT_RESULT(write(cap_fd, &ch, sizeof(ch)), rights, CAP_WRITE, CAP_SEEK_ASWAS);
+  CHECK_RIGHT_RESULT(write(cap_fd, &ch, sizeof(ch)), rights, CAP_WRITE, 0);
   CHECK_RIGHT_RESULT(pwrite(cap_fd, &ch, sizeof(ch), 0), rights, CAP_PWRITE);
   CHECK_RIGHT_RESULT(lseek(cap_fd, 0, SEEK_SET), rights, CAP_SEEK);
 
-#ifdef HAVE_CHFLAGS
   // Note: this is not expected to work over NFS.
   struct statfs sf;
   EXPECT_OK(fstatfs(fd, &sf));
@@ -531,7 +501,6 @@ static void TryFileOps(int fd, cap_rights_t rights) {
   if (!is_nfs) {
     CHECK_RIGHT_RESULT(fchflags(cap_fd, UF_NODUMP), rights, CAP_FCHFLAGS);
   }
-#endif
 
   CHECK_RIGHT_MMAP_RESULT(mmap(NULL, getpagesize(), PROT_NONE, MAP_SHARED, cap_fd, 0),
                           rights, CAP_MMAP);
@@ -551,9 +520,6 @@ static void TryFileOps(int fd, cap_rights_t rights) {
                           rights, CAP_MMAP_RWX);
 
   CHECK_RIGHT_RESULT(fsync(cap_fd), rights, CAP_FSYNC);
-#ifdef HAVE_SYNC_FILE_RANGE
-  CHECK_RIGHT_RESULT(sync_file_range(cap_fd, 0, 1, 0), rights, CAP_FSYNC, CAP_SEEK);
-#endif
 
   int rc = fcntl(cap_fd, F_GETFL);
   CHECK_RIGHT_RESULT(rc, rights, CAP_FCNTL);
@@ -575,10 +541,6 @@ static void TryFileOps(int fd, cap_rights_t rights) {
   struct statfs cap_sf;
   CHECK_RIGHT_RESULT(fstatfs(cap_fd, &cap_sf), rights, CAP_FSTATFS);
 
-#ifdef HAVE_FPATHCONF
-  CHECK_RIGHT_RESULT(fpathconf(cap_fd, _PC_NAME_MAX), rights, CAP_FPATHCONF);
-#endif
-
   CHECK_RIGHT_RESULT(futimes(cap_fd, NULL), rights, CAP_FUTIMES);
 
   struct pollfd pollfd;
@@ -806,14 +768,12 @@ static void TryDirOps(int dirfd, cap_rights_t rights) {
   }
   EXPECT_OK(unlinkat(dirfd, "cap_fsync", 0));
 
-#ifdef HAVE_CHFLAGSAT
   rc = openat(dirfd, "cap_chflagsat", O_CREAT, 0600);
   EXPECT_OK(rc);
   EXPECT_OK(close(rc));
   rc = chflagsat(dfd_cap, "cap_chflagsat", UF_NODUMP, 0);
   CHECK_RIGHT_RESULT(rc, rights, CAP_CHFLAGSAT, CAP_LOOKUP);
   EXPECT_OK(unlinkat(dirfd, "cap_chflagsat", 0));
-#endif
 
   rc = openat(dirfd, "cap_fchownat", O_CREAT, 0600);
   EXPECT_OK(rc);
@@ -871,13 +831,11 @@ static void TryDirOps(int dirfd, cap_rights_t rights) {
     EXPECT_OK(unlinkat(dirfd, "cap_mkdirat", AT_REMOVEDIR));
   }
 
-#ifdef HAVE_MKFIFOAT
   rc = mkfifoat(dfd_cap, "cap_mkfifoat", 0600);
   CHECK_RIGHT_RESULT(rc, rights, CAP_MKFIFOAT, CAP_LOOKUP);
   if (rc >= 0) {
     EXPECT_OK(unlinkat(dirfd, "cap_mkfifoat", 0));
   }
-#endif
 
   if (getuid() == 0) {
     rc = mknodat(dfd_cap, "cap_mknodat", S_IFCHR | 0600, 0);
@@ -980,12 +938,10 @@ FORK_TEST(Capability, DirOperations) {
   DirOperationsTest(0);
 }
 
-#ifdef O_PATH
 FORK_TEST(Capability, PathDirOperations) {
   // Make the dfd in the test a path-only file descriptor.
   DirOperationsTest(O_PATH);
 }
-#endif
 
 static void TryReadWrite(int cap_fd) {
   char buffer[64];
@@ -1136,22 +1092,6 @@ TEST(Capability, SyscallAt) {
   EXPECT_OK(mkfifoat(cap_dfd_all, "cap_fifo", 0755));
   unlink(TmpFile("cap_at_topdir/cap_fifo"));
 
-#ifdef HAVE_MKNOD_REG
-  // Need CAP_CREATE to create a regular file with mknodat(2).
-  EXPECT_NOTCAPABLE(mknodat(cap_dfd_all, "cap_regular", S_IFREG|0755, 0));
-  unlink(TmpFile("cap_at_topdir/cap_regular"));
-  EXPECT_OK(mknodat(cap_dfd_create, "cap_regular", S_IFREG|0755, 0));
-  unlink(TmpFile("cap_at_topdir/cap_regular"));
-#endif
-
-#ifdef HAVE_MKNOD_SOCKET
-  // Need CAP_BIND to create a UNIX domain socket with mknodat(2).
-  EXPECT_NOTCAPABLE(mknodat(cap_dfd_all, "cap_socket", S_IFSOCK|0755, 0));
-  unlink(TmpFile("cap_at_topdir/cap_socket"));
-  EXPECT_OK(mknodat(cap_dfd_bind, "cap_socket", S_IFSOCK|0755, 0));
-  unlink(TmpFile("cap_at_topdir/cap_socket"));
-#endif
-
   close(cap_dfd_all);
   close(cap_dfd_no_mkfifo);
   close(cap_dfd_no_mkdir);
diff --git a/tests/sys/capsicum/capmode.cc b/tests/sys/capsicum/capmode.cc
index 12921bb53c72..89aa8f653dfc 100644
--- a/tests/sys/capsicum/capmode.cc
+++ b/tests/sys/capsicum/capmode.cc
@@ -3,9 +3,7 @@
 // whether or not they return the expected ECAPMODE.
 #include <sys/types.h>
 #include <sys/socket.h>
-#ifdef __FreeBSD__
 #include <sys/sockio.h>
-#endif
 #include <sys/stat.h>
 #include <sys/mount.h>
 #include <sys/mman.h>
@@ -69,18 +67,14 @@ FORK_TEST_F(WithFiles, DisallowedFileSyscalls) {
   EXPECT_CAPMODE(access(TmpFile("cap_capmode_access"), F_OK));
   EXPECT_CAPMODE(acct(TmpFile("cap_capmode_acct")));
   EXPECT_CAPMODE(chdir(TmpFile("cap_capmode_chdir")));
-#ifdef HAVE_CHFLAGS
   EXPECT_CAPMODE(chflags(TmpFile("cap_capmode_chflags"), UF_NODUMP));
-#endif
   EXPECT_CAPMODE(chmod(TmpFile("cap_capmode_chmod"), 0644));
   EXPECT_CAPMODE(chown(TmpFile("cap_capmode_chown"), -1, -1));
   EXPECT_CAPMODE(chroot(TmpFile("cap_capmode_chroot")));
   EXPECT_CAPMODE(creat(TmpFile("cap_capmode_creat"), 0644));
   EXPECT_CAPMODE(fchdir(fd_dir_));
-#ifdef HAVE_GETFSSTAT
   struct statfs statfs;
   EXPECT_CAPMODE(getfsstat(&statfs, sizeof(statfs), MNT_NOWAIT));
-#endif
   EXPECT_CAPMODE(link(TmpFile("foo"), TmpFile("bar")));
   struct stat sb;
   EXPECT_CAPMODE(lstat(TmpFile("cap_capmode_lstat"), &sb));
@@ -89,9 +83,7 @@ FORK_TEST_F(WithFiles, DisallowedFileSyscalls) {
   EXPECT_CAPMODE(open("/dev/null", O_RDWR));
   char buf[64];
   EXPECT_CAPMODE(readlink(TmpFile("cap_capmode_readlink"), buf, sizeof(buf)));
-#ifdef HAVE_REVOKE
   EXPECT_CAPMODE(revoke(TmpFile("cap_capmode_revoke")));
-#endif
   EXPECT_CAPMODE(stat(TmpFile("cap_capmode_stat"), &sb));
   EXPECT_CAPMODE(symlink(TmpFile("cap_capmode_symlink_from"), TmpFile("cap_capmode_symlink_to")));
   EXPECT_CAPMODE(unlink(TmpFile("cap_capmode_unlink")));
@@ -122,9 +114,7 @@ FORK_TEST_F(WithFiles, AllowedFileSyscalls) {
   int fd_dup = dup(fd_file_);
   EXPECT_OK(fd_dup);
   EXPECT_OK(dup2(fd_file_, fd_dup));
-#ifdef HAVE_DUP3
   EXPECT_OK(dup3(fd_file_, fd_dup, 0));
-#endif
   if (fd_dup >= 0) close(fd_dup);
 
   struct stat sb;
@@ -134,12 +124,10 @@ FORK_TEST_F(WithFiles, AllowedFileSyscalls) {
   EXPECT_OK(read(fd_file_, &ch, sizeof(ch)));
   EXPECT_OK(write(fd_file_, &ch, sizeof(ch)));
 
-#ifdef HAVE_CHFLAGS
   rc = fchflags(fd_file_, UF_NODUMP);
   if (rc < 0) {
     EXPECT_NE(ECAPMODE, errno);
   }
-#endif
 
   char buf[1024];
   rc = getdents_(fd_dir_, (void*)buf, sizeof(buf));
@@ -152,7 +140,7 @@ FORK_TEST_F(WithFiles, AllowedFileSyscalls) {
   struct iovec io;
   io.iov_base = data;
   io.iov_len = 2;
-#if !defined(__i386__) && !defined(__linux__)
+#if !defined(__i386__)
   // TODO(drysdale): reinstate these tests for 32-bit runs when possible
   // libc bug is fixed.
   EXPECT_OK(pwritev(fd_file_, &io, 1, 0));
@@ -160,18 +148,6 @@ FORK_TEST_F(WithFiles, AllowedFileSyscalls) {
 #endif
   EXPECT_OK(writev(fd_file_, &io, 1));
   EXPECT_OK(readv(fd_file_, &io, 1));
-
-#ifdef HAVE_SYNCFS
-  EXPECT_OK(syncfs(fd_file_));
-#endif
-#ifdef HAVE_SYNC_FILE_RANGE
-  EXPECT_OK(sync_file_range(fd_file_, 0, 1, 0));
-#endif
-#ifdef HAVE_READAHEAD
-  if (!tmpdir_on_tmpfs) {  // tmpfs doesn't support readahead(2)
-    EXPECT_OK(readahead(fd_file_, 0, 1));
-  }
-#endif
 }
 
 FORK_TEST_F(WithFiles, AllowedSocketSyscalls) {
@@ -301,19 +277,10 @@ FORK_TEST(Capmode, AllowedIdentifierSyscalls) {
   gid_t egid;
   gid_t sgid;
   EXPECT_OK(getresgid(&rgid, &egid, &sgid));
-#ifdef HAVE_GETLOGIN
   EXPECT_TRUE(getlogin() != NULL);
-#endif
 
   // Set various identifiers (to their existing values).
   EXPECT_OK(setgid(my_gid));
-#ifdef HAVE_SETFSGID
-  EXPECT_OK(setfsgid(my_gid));
-#endif
-  EXPECT_OK(setuid(my_uid));
-#ifdef HAVE_SETFSUID
-  EXPECT_OK(setfsuid(my_uid));
-#endif
   EXPECT_OK(setregid(my_gid, my_gid));
   EXPECT_OK(setresgid(my_gid, my_gid, my_gid));
   EXPECT_OK(setreuid(my_uid, my_uid));
@@ -410,14 +377,6 @@ FORK_TEST(Capmode, AllowedPipeSyscalls) {
   int rc = pipe(fd2);
   EXPECT_EQ(0, rc);
 
-#ifdef HAVE_VMSPLICE
-  char buf[11] = "0123456789";
-  struct iovec iov;
-  iov.iov_base = buf;
-  iov.iov_len = sizeof(buf);
-  EXPECT_FAIL_NOT_CAPMODE(vmsplice(fd2[0], &iov, 1, SPLICE_F_NONBLOCK));
-#endif
-
   if (rc == 0) {
     close(fd2[0]);
     close(fd2[1]);
@@ -606,7 +565,6 @@ FORK_TEST_F(WithFiles, AllowedMiscSyscalls) {
 
   // TODO(FreeBSD): ktrace
 
-#ifdef HAVE_SYSARCH
   // sysarch() is, by definition, architecture-dependent
 #if defined (__amd64__) || defined (__i386__)
   long sysarch_arg = 0;
@@ -614,14 +572,13 @@ FORK_TEST_F(WithFiles, AllowedMiscSyscalls) {
 #else
   // TOOD(jra): write a test for other architectures, like arm
 #endif
-#endif
 }
 
 void *thread_fn(void *p) {
   int fd = (int)(intptr_t)p;
   if (verbose) fprintf(stderr, "  thread waiting to run\n");
   AWAIT_INT_MESSAGE(fd, MSG_PARENT_CHILD_SHOULD_RUN);
-  EXPECT_OK(getpid_());
+  EXPECT_OK(getpid());
   EXPECT_CAPMODE(open("/dev/null", O_RDWR));
   // Return whether there have been any failures to the main thread.
   void *rval = (void *)(intptr_t)testing::Test::HasFailure();
@@ -671,7 +628,7 @@ FORK_TEST(Capmode, NewThread) {
   SEND_INT_MESSAGE(proc_pipe[0], MSG_PARENT_CHILD_SHOULD_RUN);
 
   // Do an allowed syscall.
-  EXPECT_OK(getpid_());
+  EXPECT_OK(getpid());
   // Wait for the first child to exit (should get a zero exit code message).
   AWAIT_INT_MESSAGE(proc_pipe[0], 0);
 
@@ -687,7 +644,7 @@ FORK_TEST(Capmode, NewThread) {
     if (verbose) fprintf(stderr, "  second child started\n");
     EXPECT_OK(close(proc_pipe[0]));
     // Child: do an allowed and a disallowed syscall.
-    EXPECT_OK(getpid_());
+    EXPECT_OK(getpid());
     EXPECT_CAPMODE(open("/dev/null", O_RDWR));
     // Notify the parent of success/failure.
     int rval = (int)testing::Test::HasFailure();
diff --git a/tests/sys/capsicum/capsicum-freebsd.h b/tests/sys/capsicum/capsicum-freebsd.h
index 13fa24a0f722..9cb3149a05a4 100644
--- a/tests/sys/capsicum/capsicum-freebsd.h
+++ b/tests/sys/capsicum/capsicum-freebsd.h
@@ -1,6 +1,5 @@
 #ifndef __CAPSICUM_FREEBSD_H__
 #define __CAPSICUM_FREEBSD_H__
-#ifdef __FreeBSD__
 /************************************************************
  * FreeBSD Capsicum Functionality.
  ************************************************************/
@@ -12,15 +11,9 @@ extern "C" {
 /* FreeBSD definitions. */
 #include <errno.h>
 #include <sys/param.h>
-#if __FreeBSD_version >= 1100014 || \
-    (__FreeBSD_version >= 1001511 && __FreeBSD_version < 1100000)
 #include <sys/capsicum.h>
-#else
-#include <sys/capability.h>
-#endif
 #include <sys/procdesc.h>
 
-#if __FreeBSD_version >= 1000000
 #define AT_SYSCALLS_IN_CAPMODE
 #define HAVE_CAP_RIGHTS_GET
 #define HAVE_CAP_RIGHTS_LIMIT
@@ -32,11 +25,7 @@ typedef uint32_t cap_fcntl_t;
 // ioctl(2) and cap_ioctls_limit(2) take unsigned long.
 typedef unsigned long cap_ioctl_t;
 
-#if __FreeBSD_version >= 1101000
 #define HAVE_OPENAT_INTERMEDIATE_DOTDOT
-#endif
-
-#endif
 
 #ifdef __cplusplus
 }
@@ -45,13 +34,8 @@ typedef unsigned long cap_ioctl_t;
 // Use fexecve_() in tests to allow Linux variant to bypass glibc version.
 #define fexecve_(F, A, E) fexecve(F, A, E)
 
-#ifdef ENOTBENEATH
-#define E_NO_TRAVERSE_CAPABILITY ENOTBENEATH
-#define E_NO_TRAVERSE_O_BENEATH ENOTBENEATH
-#else
 #define E_NO_TRAVERSE_CAPABILITY ENOTCAPABLE
 #define E_NO_TRAVERSE_O_BENEATH ENOTCAPABLE
-#endif
 
 // FreeBSD limits the number of ioctls in cap_ioctls_limit to 256
 #define CAP_IOCTLS_LIMIT_MAX 256
@@ -66,6 +50,4 @@ typedef unsigned long cap_ioctl_t;
 // FreeBSD generates a capability from sctp_peeloff(cap_fd,...).
 #define CAP_FROM_PEELOFF
 
-#endif  /* __FreeBSD__ */
-
 #endif /*__CAPSICUM_FREEBSD_H__*/
diff --git a/tests/sys/capsicum/capsicum-linux.h b/tests/sys/capsicum/capsicum-linux.h
deleted file mode 100644
index 5bea418a2bc7..000000000000
--- a/tests/sys/capsicum/capsicum-linux.h
+++ /dev/null
@@ -1,40 +0,0 @@
-#ifndef __CAPSICUM_LINUX_H__
-#define __CAPSICUM_LINUX_H__
-
-#ifdef __linux__
-/************************************************************
- * Linux Capsicum Functionality.
- ************************************************************/
-#include <errno.h>
-#include <sys/procdesc.h>
-#include <sys/capsicum.h>
-
-#define HAVE_CAP_RIGHTS_LIMIT
-#define HAVE_CAP_RIGHTS_GET
-#define HAVE_CAP_FCNTLS_LIMIT
-#define HAVE_CAP_IOCTLS_LIMIT
-#define HAVE_PROC_FDINFO
-#define HAVE_PDWAIT4
-#define CAP_FROM_ACCEPT
-// TODO(drysdale): uncomment if/when Linux propagates rights on sctp_peeloff.
-// Linux does not generate a capability from sctp_peeloff(cap_fd,...).
-// #define CAP_FROM_PEELOFF
-// TODO(drysdale): uncomment if/when Linux allows intermediate .. path segments
-// for openat()-like operations.
-// #define HAVE_OPENAT_INTERMEDIATE_DOTDOT
-
-// Failure to open file due to path traversal generates EPERM
-#ifdef ENOTBENEATH
-#define E_NO_TRAVERSE_CAPABILITY ENOTBENEATH
-#define E_NO_TRAVERSE_O_BENEATH ENOTBENEATH
-#else
-#define E_NO_TRAVERSE_CAPABILITY EPERM
-#define E_NO_TRAVERSE_O_BENEATH EPERM
-#endif
-
-// Too many links
-#define E_TOO_MANY_LINKS ELOOP
-
-#endif /* __linux__ */
-
-#endif /*__CAPSICUM_LINUX_H__*/
diff --git a/tests/sys/capsicum/capsicum-rights.h b/tests/sys/capsicum/capsicum-rights.h
index 73c445434404..751781fd2628 100644
--- a/tests/sys/capsicum/capsicum-rights.h
+++ b/tests/sys/capsicum/capsicum-rights.h
@@ -5,114 +5,11 @@
 extern "C" {
 #endif
 
-#ifdef __FreeBSD__
 #include <sys/param.h>
-#if __FreeBSD_version >= 1100014 || \
-    (__FreeBSD_version >= 1001511 && __FreeBSD_version < 1100000)
 #include <sys/capsicum.h>
-#else
-#include <sys/capability.h>
-#endif
-#endif
-
-#ifdef __linux__
-#include <linux/capsicum.h>
-#endif
 
 #ifdef __cplusplus
 }
 #endif
 
-#ifndef CAP_RIGHTS_VERSION
-/************************************************************
- * Capsicum compatibility layer: implement new (FreeBSD10.x)
- * rights manipulation API in terms of original (FreeBSD9.x)
- * functionality.
- ************************************************************/
-#include <stdarg.h>
-#include <stdbool.h>
-
-/* Rights manipulation macros/functions.
- * Note that these use variadic macros, available in C99 / C++11 (and
- * also in earlier gcc versions).
- */
-#define cap_rights_init(rights, ...)   _cap_rights_init((rights), __VA_ARGS__, 0ULL)
-#define cap_rights_set(rights, ...)    _cap_rights_set((rights), __VA_ARGS__, 0ULL)
-#define cap_rights_clear(rights, ...)  _cap_rights_clear((rights), __VA_ARGS__, 0ULL)
-#define cap_rights_is_set(rights, ...) _cap_rights_is_set((rights), __VA_ARGS__, 0ULL)
-
-inline cap_rights_t* _cap_rights_init(cap_rights_t *rights, ...) {
-  va_list ap;
-  cap_rights_t right;
-  *rights = 0;
-  va_start(ap, rights);
-  while (true) {
-    right = va_arg(ap, cap_rights_t);
-    *rights |= right;
-    if (right == 0) break;
-  }
-  va_end(ap);
-  return rights;
-}
-
-inline cap_rights_t* _cap_rights_set(cap_rights_t *rights, ...) {
-  va_list ap;
-  cap_rights_t right;
-  va_start(ap, rights);
-  while (true) {
-    right = va_arg(ap, cap_rights_t);
-    *rights |= right;
-    if (right == 0) break;
-  }
-  va_end(ap);
-  return rights;
-}
-
-inline cap_rights_t* _cap_rights_clear(cap_rights_t *rights, ...) {
-  va_list ap;
-  cap_rights_t right;
-  va_start(ap, rights);
-  while (true) {
-    right = va_arg(ap, cap_rights_t);
-    *rights &= ~right;
-    if (right == 0) break;
-  }
-  va_end(ap);
-  return rights;
-}
-
-inline bool _cap_rights_is_set(const cap_rights_t *rights, ...) {
-  va_list ap;
-  cap_rights_t right;
-  cap_rights_t accumulated = 0;
-  va_start(ap, rights);
-  while (true) {
-    right = va_arg(ap, cap_rights_t);
-    accumulated |= right;
-    if (right == 0) break;
-  }
-  va_end(ap);
-  return (accumulated & *rights) == accumulated;
-}
-
-inline bool _cap_rights_is_valid(const cap_rights_t *rights) {
-  return true;
-}
-
-inline cap_rights_t* cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src) {
-  *dst |= *src;
-  return dst;
-}
-
-inline cap_rights_t* cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src) {
-  *dst &= ~(*src);
-  return dst;
-}
-
-inline bool cap_rights_contains(const cap_rights_t *big, const cap_rights_t *little) {
-  return ((*big) & (*little)) == (*little);
-}
-
-#endif  /* old/new style rights manipulation */
-
 #endif /*__CAPSICUM_RIGHTS_H__*/
diff --git a/tests/sys/capsicum/capsicum-test-main.cc b/tests/sys/capsicum/capsicum-test-main.cc
index d0f955270fd4..2a2c75000039 100644
--- a/tests/sys/capsicum/capsicum-test-main.cc
+++ b/tests/sys/capsicum/capsicum-test-main.cc
@@ -1,10 +1,5 @@
 #include <sys/types.h>
-#ifdef __linux__
-#include <sys/vfs.h>
-#include <linux/magic.h>
-#elif defined(__FreeBSD__)
 #include <sys/sysctl.h>
-#endif
 #include <ctype.h>
 #include <errno.h>
 #include <libgen.h>
@@ -16,11 +11,6 @@
 #include "gtest/gtest.h"
 #include "capsicum-test.h"
 
-// For versions of googletest that lack GTEST_SKIP.
-#ifndef GTEST_SKIP
-#define GTEST_SKIP GTEST_FAIL
-#endif
-
 std::string tmpdir;
 
 class SetupEnvironment : public ::testing::Environment
@@ -38,7 +28,6 @@ public:
     std::cerr << tmpdir << std::endl;
   }
   void CheckCapsicumSupport() {
-#ifdef __FreeBSD__
     int rc;
     bool trap_enotcap_enabled;
     size_t trap_enotcap_enabled_len = sizeof(trap_enotcap_enabled);
@@ -60,7 +49,6 @@ public:
                    << "Skipping tests because its enablement invalidates the "
                    << "test results.";
     }
-#endif /* FreeBSD */
   }
   void CreateTemporaryRoot() {
     char *tmpdir_name = tempnam(nullptr, "cptst");
@@ -148,13 +136,6 @@ int main(int argc, char* argv[]) {
     }
   }
 
-#ifdef __linux__
-  // Check whether our temporary directory is on a tmpfs volume.
-  struct statfs fsinfo;
-  statfs(tmpdir.c_str(), &fsinfo);
-  tmpdir_on_tmpfs = (fsinfo.f_type == TMPFS_MAGIC);
-#endif
-
   testing::AddGlobalTestEnvironment(new SetupEnvironment());
   return RUN_ALL_TESTS();
 }
diff --git a/tests/sys/capsicum/capsicum-test.cc b/tests/sys/capsicum/capsicum-test.cc
index 1e722089761f..d221aca9e4a8 100644
--- a/tests/sys/capsicum/capsicum-test.cc
+++ b/tests/sys/capsicum/capsicum-test.cc
@@ -1,6 +1,5 @@
 #include "capsicum-test.h"
 
-#ifdef __FreeBSD__
 #include <sys/param.h>
 #include <sys/proc.h>
 #include <sys/queue.h>
@@ -8,7 +7,6 @@
 #include <sys/sysctl.h>
 #include <sys/user.h>
 #include <libprocstat.h>
-#endif
 
 #include <stdio.h>
 #include <string.h>
@@ -38,26 +36,6 @@ const char *TmpFile(const char *p) {
 }
 
 char ProcessState(int pid) {
-#ifdef __linux__
-  // Open the process status file.
-  char s[1024];
-  snprintf(s, sizeof(s), "/proc/%d/status", pid);
-  FILE *f = fopen(s, "r");
-  if (f == NULL) return '\0';
-
-  // Read the file line by line looking for the state line.
-  const char *prompt = "State:\t";
-  while (!feof(f)) {
-    fgets(s, sizeof(s), f);
-    if (!strncmp(s, prompt, strlen(prompt))) {
-      fclose(f);
-      return s[strlen(prompt)];
-    }
-  }
-  fclose(f);
-  return '?';
-#endif
-#ifdef __FreeBSD__
   // First check if the process exists/we have permission to see it. This
   // Avoids warning messages being printed to stderr by libprocstat.
   size_t len = 0;
@@ -115,5 +93,4 @@ char ProcessState(int pid) {
   procstat_close(prstat);
   if (verbose) fprintf(stderr, "Process %d in state '%c'\n", pid, result);
   return result;
-#endif
 }
diff --git a/tests/sys/capsicum/capsicum.h b/tests/sys/capsicum/capsicum.h
index 0005e7884673..5880bbc8b882 100644
--- a/tests/sys/capsicum/capsicum.h
+++ b/tests/sys/capsicum/capsicum.h
@@ -4,141 +4,11 @@
 #ifndef __CAPSICUM_H__
 #define __CAPSICUM_H__
 
-#ifdef __FreeBSD__
-#include "capsicum-freebsd.h"
-#endif
-
-#ifdef __linux__
-#include "capsicum-linux.h"
-#endif
-
-/*
- * CAP_ALL/CAP_NONE is a value in FreeBSD9.x Capsicum, but a functional macro
- * in FreeBSD10.x Capsicum.  Always use CAP_SET_ALL/CAP_SET_NONE instead.
- */
-#ifndef CAP_SET_ALL
-#ifdef CAP_RIGHTS_VERSION
-#define CAP_SET_ALL(rights) CAP_ALL(rights)
-#else
-#define CAP_SET_ALL(rights) *(rights) = CAP_MASK_VALID
-#endif
-#endif
-
-#ifndef CAP_SET_NONE
-#ifdef CAP_RIGHTS_VERSION
-#define CAP_SET_NONE(rights) CAP_NONE(rights)
-#else
*** 1004 LINES SKIPPED ***

From nobody Mon Nov 23 05:49:24 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXw4N5z31z71ymT
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 05:49: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXw4N32mYz4Sq9
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:49:24 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795412964;
	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=i8O0b1ggj9UoNriVfYd1DW2+RuNiob+p6uqZjzbIEeU=;
	b=HSqf6p5iZXN/NaaGM2Pzjxve4B+SxpLT8d4zUDTNblyHxD5weEVJEo6LkNi6rD9EsLmNhB
	pjf1jhoubxzrHL0vgH1Qyv5zShFZSV8xu5upNpRqOAiCydKxkwSP2bl8TptqO6xcHbLmDE
	acreDwCxvnk1+apn9y09KVZfSvhsKBrscBQPMS08V4gKWBtlk9xI1c36utRdA2m4UBCUEO
	66ChDfLU8lQcZYd7WEf3AxFipEMgHH45avjC/7VjQd8kqXxpF3EwaZ823NvhHofX6AvAR/
	Tvq5IJVulJoH0RKxRhQxTAxdDgU/hB18Viva1Aa7JVTl9OHwTuFxRqPUBQb/+g==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795412964;
	b=mUOsRTf05QMzXYxwj06mkOCt1qRHf6By2XiSAZNIWHGt3WJ9I6JDWgYkVvl+wxk1MgwYEM
	Bw4FdmZmkugY6AZn7PGpSzPMW80RAjGIizglppK6CJ0PFdyF7c8EKIVngG+arqkxr0K184
	1SmzpdOX7DN9w3LNCNv/xks4NEK/nV7ZhdWktvGydz61ZRbi93nr7l9/GYC75mbH1x2A9V
	UKIfmo6dbSl9gaANeGWYm0nkX6H+gZwBG9xmgXE2uZhNM8K5ZKkWvXtOA0LfNJjAcmWhGs
	GedZJ5rEE3nhgcRJ2tC14b98EMRWcNRmJx3fGNzgSgTToroPFjaLq/QWDV8sFg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795412964;
	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=i8O0b1ggj9UoNriVfYd1DW2+RuNiob+p6uqZjzbIEeU=;
	b=x9VjIQ7SAbosG4HZ7Vg3oV7eGDfmGdehrOtk0B1n2pmXJQyjZGdjPNCPgn3Tksr8d0VVBt
	S+swv/TfPCCzV7PWfjwR57Unwb7JGyT2IOlqueXO23pgFK6j9AJ/eXjE7gTcksZUojYWXK
	1j+fE5vK5iOAqC+yQd4T43jhK/mFRd5anfRpb5VskbuuFxJ4ltaTZZ3nZrvDPg4WI3d5Av
	sy6ERYz0+Uc0RzYhYnUgK2ZPwZr8gX1bVcK7yD0fiY2FvGdmtoqgw5VxCXHqQ/XUvxtq/e
	K/HnLDw2RsL0QnyqQsz9OkSAwHXuck/f4VihVkoYmFT+rWdrAQzLd9H30RmplA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXw4N2YxXzdwB
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:49:24 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1fcda
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 05:49:24 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: John Baldwin <jhb@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 5e5687aac4e0 - stable/14 - src: Use gnu++17 as the default C++ standard
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 5e5687aac4e069dc20fa8dc735c581c188534144
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 05:49:24 +0000
Message-Id: <6b03d3e4.1fcda.5b9b38f9@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=5e5687aac4e069dc20fa8dc735c581c188534144

commit 5e5687aac4e069dc20fa8dc735c581c188534144
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2025-04-11 13:53:50 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 05:44:04 +0000

    src: Use gnu++17 as the default C++ standard
    
    Previously the compiler's default C++ standard was used unlike C where
    bsd.sys.mk explicitly sets a default language version.  Setting an
    explicit default version will give a more uniform experience across
    different compilers and compiler versions.
    
    gnu++17 was chosen to match the default C standard.  It is well
    supported by a wide range of clang (5+) and GCC (9+) versions.
    
    gnu++17 is also the default C++ standard in recent versions of clang
    (16+) and GCC (11+).  As a result, many of the explicit CXXSTD
    settings in Makefiles had the effect of lowering the C++ standard
    instead of raising it as was originally intended and are removed.
    
    Note that the remaining explicit CXXSTD settings for atf and liblutok
    explicitly lower the standard to C++11 due to use of the deprecated
    auto_ptr<> template which is removed in later versions.
    
    Reviewed by:    imp, asomers, dim, emaste
    Differential Revision:  https://reviews.freebsd.org/D49223
    
    (cherry picked from commit 6527682ab7058e5023a2a6dea01d51c15dca701f)
---
 lib/clang/llvm.build.mk                 | 1 -
 lib/libc/tests/stdlib/Makefile          | 2 --
 lib/libclang_rt/Makefile.inc            | 1 -
 lib/libcxxrt/Makefile                   | 1 -
 lib/libgcc_eh/Makefile.inc              | 1 -
 lib/libomp/Makefile                     | 1 -
 lib/ofed/libibnetdisc/Makefile          | 1 -
 libexec/atf/atf-pytest-wrapper/Makefile | 1 -
 share/mk/bsd.sys.mk                     | 2 ++
 share/mk/googletest.test.inc.mk         | 2 --
 tests/sys/fs/fusefs/Makefile            | 1 -
 usr.bin/dtc/Makefile                    | 2 --
 usr.sbin/pmc/Makefile                   | 1 -
 13 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/lib/clang/llvm.build.mk b/lib/clang/llvm.build.mk
index e06f9a2c29f6..4716ce12f48d 100644
--- a/lib/clang/llvm.build.mk
+++ b/lib/clang/llvm.build.mk
@@ -122,7 +122,6 @@ LDFLAGS+=	-Wl,-m,elf64lriscv_fbsd
 .endif
 .endif
 
-CXXSTD?=	c++17
 CXXFLAGS+=	-fno-exceptions
 CXXFLAGS+=	-fno-rtti
 CXXFLAGS+=	-fvisibility-inlines-hidden
diff --git a/lib/libc/tests/stdlib/Makefile b/lib/libc/tests/stdlib/Makefile
index 14f1ab022c37..6c7c61bf291b 100644
--- a/lib/libc/tests/stdlib/Makefile
+++ b/lib/libc/tests/stdlib/Makefile
@@ -61,8 +61,6 @@ PROGS+=		h_getopt h_getopt_long
 
 CFLAGS+=	-I${.CURDIR}
 
-CXXSTD.cxa_thread_atexit_test=	c++11
-CXXSTD.cxa_thread_atexit_nothr_test=	c++11
 LIBADD.cxa_thread_atexit_test+=		pthread
 
 # Tests that requires Blocks feature
diff --git a/lib/libclang_rt/Makefile.inc b/lib/libclang_rt/Makefile.inc
index 4be3c667462f..b0386bb0ae5d 100644
--- a/lib/libclang_rt/Makefile.inc
+++ b/lib/libclang_rt/Makefile.inc
@@ -35,4 +35,3 @@ CXXFLAGS+=	-fvisibility-inlines-hidden
 CXXFLAGS+=	-fvisibility=hidden
 CFLAGS+=	-I${CRTSRC}/include
 CFLAGS+=	-I${CRTSRC}/lib
-CXXSTD=		c++17
diff --git a/lib/libcxxrt/Makefile b/lib/libcxxrt/Makefile
index 48a724dd42f2..66465694e975 100644
--- a/lib/libcxxrt/Makefile
+++ b/lib/libcxxrt/Makefile
@@ -21,7 +21,6 @@ SRCS+=		typeinfo.cc
 
 WARNS?=		0
 CFLAGS+=	-isystem ${SRCDIR} -nostdinc++
-CXXSTD?=	c++14
 VERSION_MAP=	${.CURDIR}/Version.map
 
 .include <bsd.lib.mk>
diff --git a/lib/libgcc_eh/Makefile.inc b/lib/libgcc_eh/Makefile.inc
index 75e7d743a720..82012746b2c2 100644
--- a/lib/libgcc_eh/Makefile.inc
+++ b/lib/libgcc_eh/Makefile.inc
@@ -39,7 +39,6 @@ CFLAGS+=	-I${UNWINDINCDIR}
 CFLAGS+=	-D_LIBUNWIND_IS_NATIVE_ONLY
 CFLAGS+=	-D_LIBUNWIND_USE_FRAME_HEADER_CACHE
 CXXFLAGS+=	-fno-rtti
-CXXSTD?=	c++11
 STATIC_CXXFLAGS+= -fvisibility=hidden -fPIC
 # Probably need to just move this earlier or use CXXFLAGS
 .if ${MK_DIRDEPS_BUILD} == "yes"
diff --git a/lib/libomp/Makefile b/lib/libomp/Makefile
index aa9e6799ab59..81010084a2bf 100644
--- a/lib/libomp/Makefile
+++ b/lib/libomp/Makefile
@@ -55,7 +55,6 @@ CFLAGS+=	-fdata-sections
 CXXFLAGS+=	-fvisibility-inlines-hidden
 CXXFLAGS+=	-fno-exceptions
 CXXFLAGS+=	-fno-rtti
-CXXSTD=		c++17
 
 .if ${COMPILER_TYPE} == "clang"
 .if ${MACHINE_CPUARCH} == "i386"
diff --git a/lib/ofed/libibnetdisc/Makefile b/lib/ofed/libibnetdisc/Makefile
index 47470132a2b6..2eb82fb8c938 100644
--- a/lib/ofed/libibnetdisc/Makefile
+++ b/lib/ofed/libibnetdisc/Makefile
@@ -31,7 +31,6 @@ LIBADD=		osmcomp ibmad ibumad
 CFLAGS+=	-DHAVE_CONFIG_H=1
 CFLAGS+=	-I${_spath}
 CFLAGS+=	-I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/infiniband
-CXXSTD=		c++11
 VERSION_MAP=	${_spath}/libibnetdisc.map
 
 .include <bsd.lib.mk>
diff --git a/libexec/atf/atf-pytest-wrapper/Makefile b/libexec/atf/atf-pytest-wrapper/Makefile
index e4dc0f8a5fd1..80b5e411ec4e 100644
--- a/libexec/atf/atf-pytest-wrapper/Makefile
+++ b/libexec/atf/atf-pytest-wrapper/Makefile
@@ -4,7 +4,6 @@
 PACKAGE=	tests
 PROG_CXX=	atf_pytest_wrapper
 SRCS=		atf_pytest_wrapper.cpp
-CXXSTD=		c++17
 MAN=
 
 .include <bsd.prog.mk>
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
index e2491a49b29d..28ba3cdf70ee 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -23,6 +23,8 @@ CFLAGS+=	-std=iso9899:1999
 CFLAGS+=	-std=${CSTD}
 .endif # CSTD
 
+CXXSTD?=	gnu++17
+
 .if !empty(CXXSTD)
 CXXFLAGS+=	-std=${CXXSTD}
 .endif
diff --git a/share/mk/googletest.test.inc.mk b/share/mk/googletest.test.inc.mk
index 05415775448b..9ef5a3ceac00 100644
--- a/share/mk/googletest.test.inc.mk
+++ b/share/mk/googletest.test.inc.mk
@@ -9,6 +9,4 @@ GTESTS_CXXFLAGS+= -frtti
 # libgmock's, etc, headers.
 CXXFLAGS+=	-I${DESTDIR}${INCLUDEDIR}/private
 
-CXXSTD?=	c++14
-
 NO_WTHREAD_SAFETY=
diff --git a/tests/sys/fs/fusefs/Makefile b/tests/sys/fs/fusefs/Makefile
index 1293373e2451..a8035a3bd7a4 100644
--- a/tests/sys/fs/fusefs/Makefile
+++ b/tests/sys/fs/fusefs/Makefile
@@ -100,7 +100,6 @@ CXXWARNFLAGS+=	-Wno-vla-cxx-extension
 CXXFLAGS+=	-I${SRCTOP}/tests
 CXXFLAGS+=	-I${FUSEFS}
 CXXFLAGS+=	-I${MOUNT}
-CXXSTD=		c++14
 
 .for f in getmntopts.c mntopts.h
 CLEANFILES+=	${f}
diff --git a/usr.bin/dtc/Makefile b/usr.bin/dtc/Makefile
index 9b1aff13511f..d7661ae164c3 100644
--- a/usr.bin/dtc/Makefile
+++ b/usr.bin/dtc/Makefile
@@ -6,8 +6,6 @@ WARNS?=	3
 
 CXXFLAGS+=	-fno-rtti -fno-exceptions
 
-CXXSTD=	c++17
-
 NO_SHARED?=NO
 
 .include <bsd.prog.mk>
diff --git a/usr.sbin/pmc/Makefile b/usr.sbin/pmc/Makefile
index dda72c85a106..a4e12470ae5e 100644
--- a/usr.sbin/pmc/Makefile
+++ b/usr.sbin/pmc/Makefile
@@ -6,7 +6,6 @@ PROG_CXX=	pmc
 MAN=	
 WARNS?=	3
 CXXFLAGS+= -O0
-CXXSTD= c++14
 CWARNFLAGS.gcc+= -Wno-redundant-decls
 CFLAGS+= -I${SRCTOP}/lib/libpmcstat
 

From nobody Mon Nov 23 05:57:30 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXwFl6KTBz720jq
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 05:57: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXwFl3Bqmz4W36
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:57:31 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795413451;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=8bjn8iUD2DT+609i2TPs8/IoWrepSE2Go02HsOYNB6M=;
	b=lE2Q+2lo+uSFzoZdyxapOMR9jdofEBIbwjV74IMGn2y8yhZJVrO8e5kg6uaaZiAGsJcc7i
	Tj3gwFpwJnSugpXHOJbHl+xPEUomMPTX1Gc4mhkX+YpHLgWu3OO4VaUtTf09WKOU5QBrI1
	7Chi0/DHSlCbrjf2xTlIFh2Mnlh2tzZKwbqoNQoD/Lbo2ZjYbUEE2p+Y99yFklgBWx0ina
	i3yu6u5i+z78SoGy0TnPVwqJJhw7q74DHF/1QWVVj8YmrSQGAN9XSSBlDfu+SQNUFsEQB5
	CPDQ8bGllsWh08+JhHnENuqQlCYbdDw6JROA/5JtFD78dU2zWGvNx6gjSxJa2A==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795413451;
	b=ngF7lzAiGg9KU1evfhGMKTzg+KPsxvXxGLGLkgjxCgDFXlbugIQoUbhxDT1fPKokM8BfST
	4b87huCDxKQvpk3rYmPWbZ8He+eaW0rUjlmhLPWBxNqkushcLfo+ja+JWaQVLsa6k8hP7y
	8HQCDFEz6xSgRytQT/0aFJ8c0K/0EGCHJ0JkDFhH0bMu42D8KU+RyQou8JETxATggclqVi
	niAXyLveIrffIzxXE1INaKzlaZPOlVcYs/PIJQ5vcZ4/AYRgZuSgPiefpc0XjSIzNWSsX6
	87AdEnfgQyR93vLk68pWF83b98EZdUdbn+0uaoPnfvuqjhkBr9Mgf0C4XYXQuQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795413451;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=8bjn8iUD2DT+609i2TPs8/IoWrepSE2Go02HsOYNB6M=;
	b=JrFP0Nk0gy5LnMhwslf1TrReR16XVh17tuBuTuwBuHkZbl2u3argLKSsGZBhlgBs1wGeDS
	92YN4aAdQAWQR/SsPhUqauTB0mQd9IwDZLJu8iqu/ET9Cwx8NsEBCm5HVSK/OoWsp7Kk/C
	Pcue9vx472XL5ZVMgWddTP+Avv6xrnNnDWUVX/R+Krn9swZeqtrDYwtvanlpC528tBwlXs
	TUWOFf/A/SacDI8gse+b8UlKqG2dfdednE/9N6VJQg3lNFiJ3i0Eptu99+3gDqAgbs7TZ1
	sl3nnU8xcE66Y8PY1yLmmFRpk6aWV+ukOuKa243EoNq/Vyjg34oDzsCaoVjVSQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXwFk4d0dzdwd
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:57:30 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1eee3
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 05:57:30 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: da8acc240c75 - stable/14 - contrib/kyua: update to 0.15.1
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: da8acc240c75aa6a582edd900352d8d184755ccc
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 05:57:30 +0000
Message-Id: <6b03d5ca.1eee3.7b75fbfe@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=da8acc240c75aa6a582edd900352d8d184755ccc

commit da8acc240c75aa6a582edd900352d8d184755ccc
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-10-28 22:02:27 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 05:50:28 +0000

    contrib/kyua: update to 0.15.1
    
    This new release contains multiple bugfixes. Please see the release
    notes mentioned in the merge commit for more details.
    
    MFC after:      2 weeks
    Merge commit '3e05143b80d1537cdd51a5dcf742da31f400507e'
    
    (cherry picked from commit b68969979d6b590247290b4fe26212d201c3ad96)
---
 contrib/kyua/NEWS                              |  19 +++
 contrib/kyua/README.md                         |   4 +-
 contrib/kyua/config.h                          |   6 +-
 contrib/kyua/doc/kyua-about.1                  |   2 +-
 contrib/kyua/drivers/debug_test.cpp            |   3 +
 contrib/kyua/drivers/run_tests.cpp             |   3 +
 contrib/kyua/engine/atf_test.cpp               |   1 +
 contrib/kyua/engine/googletest.cpp             |  27 +---
 contrib/kyua/engine/googletest_helpers.cpp     |  27 +---
 contrib/kyua/engine/googletest_list.cpp        |  27 +---
 contrib/kyua/engine/googletest_list_test.cpp   |  27 +---
 contrib/kyua/engine/googletest_result.cpp      | 195 +++++++++++++++++--------
 contrib/kyua/engine/googletest_result.hpp      |  31 +---
 contrib/kyua/engine/googletest_result_test.cpp | 141 ++++++++++++++----
 contrib/kyua/engine/googletest_test.cpp        |  28 +---
 contrib/kyua/engine/plain_test.cpp             |   1 +
 contrib/kyua/engine/scanner_test.cpp           |   1 +
 contrib/kyua/engine/scheduler_test.cpp         |  11 ++
 contrib/kyua/engine/tap_test.cpp               |   1 +
 contrib/kyua/utils/config/nodes.cpp            |   6 +-
 contrib/kyua/utils/config/tree.cpp             |  11 +-
 contrib/kyua/utils/sqlite/test_utils.hpp       |   4 +-
 22 files changed, 316 insertions(+), 260 deletions(-)

diff --git a/contrib/kyua/NEWS b/contrib/kyua/NEWS
index c794e6e60092..50a2c8257370 100644
--- a/contrib/kyua/NEWS
+++ b/contrib/kyua/NEWS
@@ -1,5 +1,24 @@
 # Major changes between releases
 
+## Changes in version 0.15.1
+
+**Released on 2026/10/25.**
+
+### Bugfixes
+
+* #324: googletest: fix "failed without a reason" scenario
+* #328: utils::sqlite: restore static on test helpers
+* #330: Address a number of issues with the GoogleTest parser
+* #331: GoogleTest: licensing and style cleanup
+* #332: model/metadata: source code cleanup post-748e27bb
+* #339: Guard dynamic_cast results before dereferencing
+
+### Developer Workflow Changes
+
+* #338: add 30 minutes timeout for Distcheck step of CI
+
+**Full Changelog**: https://github.com/freebsd/lutok/compare/kyua-0.15.0...kyua-0.15.1
+
 ## Changes in version 0.15.0
 
 **Released on 2026/10/07.**
diff --git a/contrib/kyua/README.md b/contrib/kyua/README.md
index e42d6da35377..b8b54d0413de 100644
--- a/contrib/kyua/README.md
+++ b/contrib/kyua/README.md
@@ -27,9 +27,9 @@ This is not an official Google product.
 
 ## Download
 
-The latest version of Kyua is 0.14.1 and was released on March 29th, 2025.
+The latest version of Kyua is 0.15.0 and was released on October 7th, 2026.
 
-Download: [kyua-0.14.1](../../releases/tag/kyua-0.14.1).
+Download: [kyua-0.15.0](../../releases/tag/kyua-0.15.0).
 
 See the [release notes](NEWS) for information about the changes in this
 and all previous releases.
diff --git a/contrib/kyua/config.h b/contrib/kyua/config.h
index d2e8728dde38..eba9c9cb1448 100644
--- a/contrib/kyua/config.h
+++ b/contrib/kyua/config.h
@@ -119,7 +119,7 @@
 #define PACKAGE_NAME "Kyua"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "Kyua 0.15.0"
+#define PACKAGE_STRING "Kyua 0.15.1"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "kyua"
@@ -128,7 +128,7 @@
 #define PACKAGE_URL "https://github.com/freebsd/kyua/"
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "0.15.0"
+#define PACKAGE_VERSION "0.15.1"
 
 /* Define to 1 if all of the C89 standard headers exist (not just the ones
    required in a freestanding environment). This macro is provided for
@@ -136,4 +136,4 @@
 #define STDC_HEADERS 1
 
 /* Version number of package */
-#define VERSION "0.15.0"
+#define VERSION "0.15.1"
diff --git a/contrib/kyua/doc/kyua-about.1 b/contrib/kyua/doc/kyua-about.1
index ba3041f14447..c914fa33374e 100644
--- a/contrib/kyua/doc/kyua-about.1
+++ b/contrib/kyua/doc/kyua-about.1
@@ -48,7 +48,7 @@ The name of the package, which is
 .Sq kyua .
 .It
 The version number, which is
-.Sq 0.15.0 .
+.Sq 0.15.1 .
 .It
 License information.
 .It
diff --git a/contrib/kyua/drivers/debug_test.cpp b/contrib/kyua/drivers/debug_test.cpp
index 6bd3d4dc0731..2e0e56d22f46 100644
--- a/contrib/kyua/drivers/debug_test.cpp
+++ b/contrib/kyua/drivers/debug_test.cpp
@@ -42,6 +42,7 @@
 #include "utils/format/macros.hpp"
 #include "utils/fs/auto_cleaners.hpp"
 #include "utils/optional.ipp"
+#include "utils/sanity.hpp"
 
 namespace config = utils::config;
 namespace fs = utils::fs;
@@ -103,6 +104,8 @@ drivers::debug_test::drive(engine::debugger_ptr debugger,
     const scheduler::test_result_handle* test_result_handle =
         dynamic_cast< const scheduler::test_result_handle* >(
             result_handle.get());
+    if (test_result_handle == nullptr)
+        UNREACHABLE_MSG("Expected a test result handle from the scheduler");
     const model::test_result test_result = test_result_handle->test_result();
     result_handle->cleanup();
 
diff --git a/contrib/kyua/drivers/run_tests.cpp b/contrib/kyua/drivers/run_tests.cpp
index 3af9a1268815..b5231ac07f92 100644
--- a/contrib/kyua/drivers/run_tests.cpp
+++ b/contrib/kyua/drivers/run_tests.cpp
@@ -50,6 +50,7 @@
 #include "utils/noncopyable.hpp"
 #include "utils/optional.ipp"
 #include "utils/passwd.hpp"
+#include "utils/sanity.hpp"
 #include "utils/text/operations.ipp"
 
 namespace config = utils::config;
@@ -202,6 +203,8 @@ finish_test(scheduler::result_handle_ptr result_handle,
     const scheduler::test_result_handle* test_result_handle =
         dynamic_cast< const scheduler::test_result_handle* >(
             result_handle.get());
+    if (test_result_handle == nullptr)
+        UNREACHABLE_MSG("Expected a test result handle from the scheduler");
 
     put_test_result(test_case_id, *test_result_handle, tx);
 
diff --git a/contrib/kyua/engine/atf_test.cpp b/contrib/kyua/engine/atf_test.cpp
index 5f9b8c59663e..6c3f1cf03b06 100644
--- a/contrib/kyua/engine/atf_test.cpp
+++ b/contrib/kyua/engine/atf_test.cpp
@@ -150,6 +150,7 @@ run_one(const atf::tests::tc* tc, const char* test_case_name,
     const scheduler::test_result_handle* test_result_handle =
         dynamic_cast< const scheduler::test_result_handle* >(
             result_handle.get());
+    ATF_REQUIRE(test_result_handle != nullptr);
     atf::utils::cat_file(result_handle->stdout_file().str(), "stdout: ");
     atf::utils::cat_file(result_handle->stderr_file().str(), "stderr: ");
     ATF_REQUIRE_EQ(exp_result, test_result_handle->test_result());
diff --git a/contrib/kyua/engine/googletest.cpp b/contrib/kyua/engine/googletest.cpp
index e050410ba1f5..37d979585718 100644
--- a/contrib/kyua/engine/googletest.cpp
+++ b/contrib/kyua/engine/googletest.cpp
@@ -1,30 +1,7 @@
-// Copyright 2024 The Kyua Authors.
+// Copyright 2026 The Kyua Authors.
 // All rights reserved.
 //
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-//   notice, this list of conditions and the following disclaimer.
-// * 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.
-// * Neither the name of Google Inc. nor the names of its contributors
-//   may be used to endorse or promote products derived from this software
-//   without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER 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.
+// SPDX-License-Identifier: BSD-2-Clause
 
 #include "engine/googletest.hpp"
 
diff --git a/contrib/kyua/engine/googletest_helpers.cpp b/contrib/kyua/engine/googletest_helpers.cpp
index 129a08a89b7c..1a57fa0e977e 100644
--- a/contrib/kyua/engine/googletest_helpers.cpp
+++ b/contrib/kyua/engine/googletest_helpers.cpp
@@ -1,30 +1,7 @@
-// Copyright 2024 The Kyua Authors.
+// Copyright 2026 The Kyua Authors.
 // All rights reserved.
 //
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-//   notice, this list of conditions and the following disclaimer.
-// * 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.
-// * Neither the name of Google Inc. nor the names of its contributors
-//   may be used to endorse or promote products derived from this software
-//   without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER 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.
+// SPDX-License-Identifier: BSD-2-Clause
 
 extern "C" {
 #include <sys/stat.h>
diff --git a/contrib/kyua/engine/googletest_list.cpp b/contrib/kyua/engine/googletest_list.cpp
index f231cb9e7021..6c006687fe49 100644
--- a/contrib/kyua/engine/googletest_list.cpp
+++ b/contrib/kyua/engine/googletest_list.cpp
@@ -1,30 +1,7 @@
-// Copyright 2024 The Kyua Authors.
+// Copyright 2026 The Kyua Authors.
 // All rights reserved.
 //
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-//   notice, this list of conditions and the following disclaimer.
-// * 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.
-// * Neither the name of Google Inc. nor the names of its contributors
-//   may be used to endorse or promote products derived from this software
-//   without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER 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.
+// SPDX-License-Identifier: BSD-2-Clause
 
 #include "engine/googletest_list.hpp"
 
diff --git a/contrib/kyua/engine/googletest_list_test.cpp b/contrib/kyua/engine/googletest_list_test.cpp
index 5052c2f133ad..d5e9545b15ba 100644
--- a/contrib/kyua/engine/googletest_list_test.cpp
+++ b/contrib/kyua/engine/googletest_list_test.cpp
@@ -1,30 +1,7 @@
-// Copyright 2024 The Kyua Authors.
+// Copyright 2026 The Kyua Authors.
 // All rights reserved.
 //
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-//   notice, this list of conditions and the following disclaimer.
-// * 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.
-// * Neither the name of Google Inc. nor the names of its contributors
-//   may be used to endorse or promote products derived from this software
-//   without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER 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.
+// SPDX-License-Identifier: BSD-2-Clause
 
 #include "engine/googletest_list.hpp"
 
diff --git a/contrib/kyua/engine/googletest_result.cpp b/contrib/kyua/engine/googletest_result.cpp
index a1fc1f72da4d..9616fc292b86 100644
--- a/contrib/kyua/engine/googletest_result.cpp
+++ b/contrib/kyua/engine/googletest_result.cpp
@@ -1,30 +1,7 @@
-// Copyright 2024 The Kyua Authors.
+// Copyright 2026 The Kyua Authors.
 // All rights reserved.
 //
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-//   notice, this list of conditions and the following disclaimer.
-// * 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.
-// * Neither the name of Google Inc. nor the names of its contributors
-//   may be used to endorse or promote products derived from this software
-//   without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER 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.
+// SPDX-License-Identifier: BSD-2-Clause
 
 #include "engine/googletest_result.hpp"
 
@@ -53,21 +30,46 @@ using utils::optional;
 
 namespace {
 
-/// Internal string for specifying invalid output.
-const std::string invalid_output_message = "invalid output";
-
 /// Regular expression for disabled tests line.
 const std::regex disabled_re(
     R"RE((YOU HAVE [[:digit:]]+ DISABLED TESTS?))RE"
 );
 
+/// Regular expression for buggy skipped message output. Should be resolved via
+/// google/googletest#5098 .
+const std::regex global_env_buggy_skip_prefix_re(
+    R"RE(.+: Skipped\n)RE"
+);
+
+/// Regular expression for starting sentinel for Global test environment.
+const std::regex global_env_context_start_re(
+    R"(\[\-+\][[:space:]]+Global test environment set-up)"
+);
+
+/// Regular expression for ending sentinel for Global test environment.
+const std::regex global_env_context_end_re(
+    R"(\[\-+\][[:space:]]+Global test environment tear-down)"
+);
+
+// CHECK_STYLE_DISABLE
+
+/// Regular expression for setup or teardown fixtures that fail for test
+/// suites.
+///
+/// This only applies to the failure result type, not the other ones.
+const std::regex suite_setup_or_teardown_failure_re(
+    R"RE(\[[[:space:]]+FAILED[[:space:]]+\][[:space:]]+[^:]+:[[:space:]]SetUpTestSuite or TearDownTestSuite)RE"
+);
+
+// CHECK_STYLE_ENABLE
+
 /// Regular expression for starting sentinel of results block.
-const std::regex starting_sentinel_re(
-    R"(\[[[:space:]]+RUN[[:space:]]+\][[:space:]]+[A-Za-z0-9]+\.[A-Za-z0-9]+)"
+const std::regex test_context_start_re(
+    R"(\[[[:space:]]+RUN[[:space:]]+\][[:space:]]+[^[:space:]]+)"
 );
 
 /// Regular expression for ending sentinel of results block.
-const std::regex ending_sentinel_re(
+const std::regex test_context_end_re(
     R"RE(\[[[:space:]]+(FAILED|OK|SKIPPED)[[:space:]]+\])RE"
 );
 
@@ -89,10 +91,13 @@ parse_without_reason(const std::string& status, const std::string& rest)
 
     if (status == "skipped")
         return engine::googletest_result(engine::googletest_result::skipped);
-    else {
-        INV(status == "successful");
+    else if (status == "successful")
         return engine::googletest_result(engine::googletest_result::successful);
-    }
+    else if (status == "failed")
+        return engine::googletest_result(engine::googletest_result::failed);
+    else
+        return engine::googletest_result(engine::googletest_result::broken,
+            F("bad status: '%s'; output was:\n%s") % status % rest);
 }
 
 
@@ -121,8 +126,10 @@ parse_with_reason(const std::string& status, const std::string& rest)
         return googletest_result(googletest_result::failed, rest);
     else if (status == "skipped")
         return googletest_result(googletest_result::skipped, rest);
+    else if (status == "successful")
+        return googletest_result(googletest_result::successful, rest);
     else
-        PRE_MSG(false, "Unexpected status");
+        PRE_MSG(false, F("Unexpected status: %s") % status);
 }
 
 
@@ -178,6 +185,9 @@ engine::googletest_result::googletest_result(
 /// have a bug), and thus why they are reported as broken instead of just failed
 /// (which is a legitimate result for a test case).
 ///
+/// TODO(ngie): replace ad hoc output format parsing with a structured file
+///             format, e.g., JSON or XML.
+///
 /// \param input The stream to read from.
 ///
 /// \return A generic representation of the result of the test case.
@@ -187,6 +197,7 @@ engine::googletest_result
 engine::googletest_result::parse(std::istream& input)
 {
     std::vector<std::string> lines;
+    std::string all_context;
 
     do {
         std::string line;
@@ -194,50 +205,107 @@ engine::googletest_result::parse(std::istream& input)
         if (!input.eof())
             line.push_back('\n');
         lines.push_back(line);
+        all_context += line;
     } while (input.good());
 
-    bool capture_context = false;
-    bool valid_output = false;
     std::string context, status;
+    bool capture_immediate_context = false;
+    bool global_env_message_start_seen = false;
+    bool valid_output = false;
 
     for (auto& line: lines) {
+        // FIXME: drop the line-by-line parsing and just use multiline regular
+        // expressions with associated matching or just bite the bullet and
+        // switch to a structured format like JSON or XML.
         std::smatch matches;
 
-        if (regex_search(line, matches, disabled_re)) {
+        if (std::regex_search(line, global_env_context_start_re)) {
+            global_env_message_start_seen = true;
+            // Issue 326: it's a common pattern for folks to use GoogleTest
+            // Environments to run checks and skip entire test suites if
+            // preconditions aren't met. We need to start capturing the context
+            // in this block, just in case no testcases are run.
+            //
+            // In the event test output is found later on, the context will be
+            // reset by design.
+            capture_immediate_context = true;
+            context = "";
+            continue;
+        }
+
+        if (std::regex_search(line, matches, disabled_re)) {
             context = matches[1];
             status = "disabled";
             valid_output = true;
             break;
         }
-        if (regex_search(line, matches, starting_sentinel_re)) {
-            capture_context = true;
+
+        if (!global_env_message_start_seen) {
+            continue;
+        }
+
+        if (std::regex_search(line, test_context_start_re)) {
+            capture_immediate_context = true;
+            // (Re)set the context to ensure that the test result information
+            // doesn't show up in the context parsed by kyua.
             context = "";
             continue;
         }
-        if (regex_search(line, matches, ending_sentinel_re)) {
+        if (std::regex_search(line, matches, test_context_end_re)) {
             std::string googletest_res = matches[1];
+
             if (googletest_res == "OK") {
-                context = "";
                 status = "successful";
             } else if (googletest_res == "FAILED") {
                 status = "failed";
             } else {
-                INV(googletest_res == "SKIPPED");
+                INV_MSG(googletest_res == "SKIPPED",
+                    F("expected SKIPPED; got %s") % googletest_res);
                 status = "skipped";
             }
-            capture_context = false;
+            capture_immediate_context = false;
+        }
+        if (std::regex_search(line, global_env_context_end_re)) {
+            capture_immediate_context = false;
             valid_output = true;
+            // Keep scanning in case, in case we run into
+            // `suite_setup_or_teardown_failure_re`.
         }
-        if (capture_context) {
+
+        if (std::regex_search(line, suite_setup_or_teardown_failure_re)) {
+            // Any failure context should get printed out earlier on, but in
+            // the event it isn't, just dump the whole test output for sanity's
+            // sake/debuggability.
+            if (context.empty()) {
+                context = \
+                    F("kyua: could not 'summarize' failure context; "
+                      "see full process output for more details:\n\n%s") %
+                    all_context;
+            }
+            status = "failed";
+        }
+
+        if (capture_immediate_context) {
             context += line;
         }
     }
+
     if (!valid_output) {
-        context = invalid_output_message;
+        context = googletest_invalid_output_message;
         status = "broken";
+    } else {
+        // See Issue 326 comments.
+        if (std::regex_search(context, global_env_buggy_skip_prefix_re)) {
+            // It is easier to replace the existing string instead of
+            // extracting the multiline match.
+            context = std::regex_replace(context,
+                global_env_buggy_skip_prefix_re, "");
+            status = "skipped";
+        }
     }
     if (status == "skipped" && context.empty())
-        context = bogus_googletest_skipped_nul_message;
+        context = googletest_bogus_skipped_nul_message;
+
     if (context.empty())
         return parse_without_reason(status, context);
     else
@@ -388,18 +456,21 @@ engine::googletest_result::apply(const optional< process::status >& status)
 model::test_result
 engine::googletest_result::externalize(void) const
 {
+
+    // FIXME(ngie,#323): some of these test result types may require a reason, and thus the
+    // `.get()` -> `.get_default("")` change might be a bug.
     switch (_type) {
     case googletest_result::broken:
-        return model::test_result(model::test_result_broken, _reason.get());
+        return model::test_result(model::test_result_broken, _reason.get_default(""));
 
     case googletest_result::disabled:
-        return model::test_result(model::test_result_skipped, _reason.get());
+        return model::test_result(model::test_result_skipped, _reason.get_default(""));
 
     case googletest_result::failed:
-        return model::test_result(model::test_result_failed, _reason.get());
+        return model::test_result(model::test_result_failed, _reason.get_default(""));
 
     case googletest_result::skipped:
-        return model::test_result(model::test_result_skipped, _reason.get());
+        return model::test_result(model::test_result_skipped, _reason.get_default(""));
 
     case googletest_result::successful:
         return model::test_result(model::test_result_passed);
@@ -486,16 +557,16 @@ engine::calculate_googletest_result(
     googletest_result result(googletest_result::broken, "Unknown result");
     try {
         result = googletest_result::load(results_file);
-        /// atf_result.cpp handles this by side-effect by setting a broken
-        /// result with "", which results in a std::runtime_error throw from
-        /// atf_result::parse(..). googletest_result::parse doesn't do that and
-        /// instead returns a broken result with a reason of
-        /// `invalid_output_message`, so that case needs to be tested for after
-        /// the fact to make sure the reason why `invalid_output_message` was
-        /// because of a program that crashed or failed.
+        // atf_result.cpp handles this by side-effect by setting a broken
+        // result with "", which results in a std::runtime_error throw from
+        // atf_result::parse(..). googletest_result::parse doesn't do that and
+        // instead returns a broken result with a reason of
+        // `googletest_invalid_output_message`, so that case needs to be
+        // tested for after the fact to confirm whether or not program crashed
+        // or failed.
         if (result.type() == googletest_result::broken && body_status) {
             const optional< std::string >& reason = result.reason();
-            if (reason && reason.get() == invalid_output_message) {
+            if (reason && reason.get() == googletest_invalid_output_message) {
                 result = googletest_result(
                     googletest_result::broken,
                     F("Error: Premature exit. Test case %s") %
@@ -506,11 +577,11 @@ engine::calculate_googletest_result(
         if (body_status)
             result = googletest_result(googletest_result::broken,
                 F("Error: %s. Test case %s") %
-		error.what() %
+                error.what() %
                 format_status(body_status.get()));
-	else {
+        else {
             // The test case timed out.  apply() handles this case later.
-	}
+        }
     } catch (const std::runtime_error& error) {
         if (body_status)
             result = googletest_result(
diff --git a/contrib/kyua/engine/googletest_result.hpp b/contrib/kyua/engine/googletest_result.hpp
index 325995be3221..f296ea701203 100644
--- a/contrib/kyua/engine/googletest_result.hpp
+++ b/contrib/kyua/engine/googletest_result.hpp
@@ -1,30 +1,7 @@
-// Copyright 2024 The Kyua Authors.
+// Copyright 2026 The Kyua Authors.
 // All rights reserved.
 //
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-//   notice, this list of conditions and the following disclaimer.
-// * 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.
-// * Neither the name of Google Inc. nor the names of its contributors
-//   may be used to endorse or promote products derived from this software
-//   without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER 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.
+// SPDX-License-Identifier: BSD-2-Clause
 
 /// \file engine/googletest_result.hpp
 /// Functions and types to process the results of googletest-based test cases.
@@ -99,11 +76,13 @@ model::test_result calculate_googletest_result(
     const utils::optional< utils::process::status >&,
     const utils::fs::path&);
 
+/// Internal string for specifying invalid output.
+const std::string googletest_invalid_output_message = "invalid output";
 
 /// A bogus identifier for nul reasons provided by the test writer.
 ///
 /// TODO: Support nul messages with skipped results in the schema, etc.
-const std::string bogus_googletest_skipped_nul_message = "\n";
+const std::string googletest_bogus_skipped_nul_message = "\n";
 
 
 }  // namespace engine
diff --git a/contrib/kyua/engine/googletest_result_test.cpp b/contrib/kyua/engine/googletest_result_test.cpp
index 90bc2cc62b7d..0398a11359ee 100644
--- a/contrib/kyua/engine/googletest_result_test.cpp
+++ b/contrib/kyua/engine/googletest_result_test.cpp
@@ -1,30 +1,7 @@
-// Copyright 2024 The Kyua Authors.
+// Copyright 2026 The Kyua Authors.
 // All rights reserved.
 //
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-//   notice, this list of conditions and the following disclaimer.
-// * 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.
-// * Neither the name of Google Inc. nor the names of its contributors
-//   may be used to endorse or promote products derived from this software
-//   without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER 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.
+// SPDX-License-Identifier: BSD-2-Clause
 
 #include "engine/googletest_result.hpp"
 
@@ -96,7 +73,8 @@ parse_ok_test(const engine::googletest_result::types& exp_type,
 
 
 PARSE(broken,
-      engine::googletest_result::broken, "invalid output",
+      engine::googletest_result::broken,
+      engine::googletest_invalid_output_message.c_str(),
       "invalid input");
 
 const char disabled_context[] = (
@@ -150,6 +128,71 @@ PARSE(failed,
       engine::googletest_result::failed, failed_context,
       failed_message);
 
+// CHECK_STYLE_DISABLE
+#if 0
+const char failed_parameterized_context[] = (
+"/usr/src/contrib/googletest/googletest/test/googletest-param-test-test.cc:882: Failure\n"
+"Expected: (global_count_) >= (2), actual: 1 vs 2\n"
+"If some (but not all) SeparateInstanceTest tests have been filtered out this test will fail. Make sure that all GeneratorEvaluationTest are selected or de-selected together by the test filter.\n"
+"\n"
+);
+#else
+const char failed_parameterized_context[] = (
+"kyua: could not 'summarize' failure context; see full process output for more details:\n"
+"\n"
+"Note: Google Test filter = FourElemSequence/SeparateInstanceTest.TestsRunInSeparateInstances/0\n"
+"[==========] Running 1 test from 1 test suite.\n"
+"[----------] Global test environment set-up.\n"
+"[----------] 1 test from FourElemSequence/SeparateInstanceTest\n"
+"[ RUN      ] FourElemSequence/SeparateInstanceTest.TestsRunInSeparateInstances/0\n"
+"[       OK ] FourElemSequence/SeparateInstanceTest.TestsRunInSeparateInstances/0 (0 ms)\n"
+"/usr/src/contrib/googletest/googletest/test/googletest-param-test-test.cc:882: Failure\n"
+"Expected: (global_count_) >= (2), actual: 1 vs 2\n"
+"If some (but not all) SeparateInstanceTest tests have been filtered out this test will fail. Make sure that all GeneratorEvaluationTest are selected or de-selected together by the test filter.\n"
+"\n"
+"[----------] 1 test from FourElemSequence/SeparateInstanceTest (0 ms total)\n"
+"\n"
+"[----------] Global test environment tear-down\n"
+"[==========] 1 test from 1 test suite ran. (0 ms total)\n"
+"[  PASSED  ] 1 test.\n"
+"[  FAILED  ] 0 tests, listed below:\n"
+"\n"
+" 0 FAILED TESTS\n"
+"[  FAILED  ] FourElemSequence/SeparateInstanceTest: SetUpTestSuite or TearDownTestSuite\n"
+"\n"
+" 1 FAILED TEST SUITE\n"
+);
+#endif
+
+const char failed_parameterized_message[] = (
+"Note: Google Test filter = FourElemSequence/SeparateInstanceTest.TestsRunInSeparateInstances/0\n"
+"[==========] Running 1 test from 1 test suite.\n"
+"[----------] Global test environment set-up.\n"
+"[----------] 1 test from FourElemSequence/SeparateInstanceTest\n"
+"[ RUN      ] FourElemSequence/SeparateInstanceTest.TestsRunInSeparateInstances/0\n"
+"[       OK ] FourElemSequence/SeparateInstanceTest.TestsRunInSeparateInstances/0 (0 ms)\n"
+"/usr/src/contrib/googletest/googletest/test/googletest-param-test-test.cc:882: Failure\n"
+"Expected: (global_count_) >= (2), actual: 1 vs 2\n"
+"If some (but not all) SeparateInstanceTest tests have been filtered out this test will fail. Make sure that all GeneratorEvaluationTest are selected or de-selected together by the test filter.\n"
+"\n"
+"[----------] 1 test from FourElemSequence/SeparateInstanceTest (0 ms total)\n"
+"\n"
+"[----------] Global test environment tear-down\n"
+"[==========] 1 test from 1 test suite ran. (0 ms total)\n"
+"[  PASSED  ] 1 test.\n"
+"[  FAILED  ] 0 tests, listed below:\n"
+"\n"
+" 0 FAILED TESTS\n"
+"[  FAILED  ] FourElemSequence/SeparateInstanceTest: SetUpTestSuite or TearDownTestSuite\n"
+"\n"
+" 1 FAILED TEST SUITE\n"
+);
+// CHECK_STYLE_ENABLE
+
+PARSE(failed_parameterized,
+      engine::googletest_result::failed, failed_parameterized_context,
+      failed_parameterized_message);
+
 const char skipped_message[] = (
 "Note: Google Test filter = SkipTest.DoesSkip\n"
 "[==========] Running 1 test from 1 test suite.\n"
@@ -168,7 +211,7 @@ const char skipped_message[] = (
 
 PARSE(skipped,
       engine::googletest_result::skipped,
-      engine::bogus_googletest_skipped_nul_message.c_str(),
+      engine::googletest_bogus_skipped_nul_message.c_str(),
       skipped_message
 );
 
@@ -197,6 +240,36 @@ PARSE(skipped_with_reason,
       engine::googletest_result::skipped, skipped_with_reason_context,
       skipped_with_reason_message);
 
+// Issue 326: test suites built against 0.18.0 which skip in
+// `Environment::SetUp` misreport tests passing instead of being skipped.
+//
+// https://github.com/google/googletest/issues/4653
+const char skipped_from_environment_with_buggy_output_context[] = (
+"current user is not allowed to mount\n"
+"\n"
+"current user is not allowed to mount\n"
+"\n"
+);
+
+const char skipped_from_environment_with_buggy_output_message[] = (
+"Note: Google Test filter = Setattr.eacces\n"
+"[==========] Running 1 test from 1 test suite.\n"
+"[----------] Global test environment set-up.\n"
+"/usr/src/tests/sys/fs/fusefs/utils.cc:95: Skipped\n"
+"current user is not allowed to mount\n"
+"\n"
+"current user is not allowed to mount\n"
+"\n"
+"[----------] Global test environment tear-down\n"
+"[==========] 1 test from 1 test suite ran. (0 ms total)\n"
+"[  PASSED  ] 1 test.\n"
+);
+
+PARSE(skipped_from_environment_with_buggy_output,
+      engine::googletest_result::skipped,
+      skipped_from_environment_with_buggy_output_context,
+      skipped_from_environment_with_buggy_output_message);
+
 const char successful_message[] = (
 "Note: Google Test filter = PassFailTest.Passes\n"
 "[==========] Running 1 test from 1 test case.\n"
@@ -251,7 +324,11 @@ PARSE(successful_parameterized,
       engine::googletest_result::successful, NULL,
       successful_parameterized_message);
 
-const char successful_message_with_reason[] = (
+const char successful_with_reason_context[] = (
+"This is a reason\n"
+);
+
+const char successful_with_reason_message[] = (
 "Note: Google Test filter = PassFailTest.PassesWithReason\n"
 "[==========] Running 1 test from 1 test suite.\n"
 "[----------] Global test environment set-up.\n"
@@ -267,8 +344,9 @@ const char successful_message_with_reason[] = (
 );
 
 PARSE(successful_with_reason,
-      engine::googletest_result::successful, NULL,
-      successful_message_with_reason);
+      engine::googletest_result::successful,
+      successful_with_reason_context,
+      successful_with_reason_message);
 
 ATF_TEST_CASE_WITHOUT_HEAD(googletest_result__load__ok);
 ATF_TEST_CASE_BODY(googletest_result__load__ok)
@@ -403,7 +481,10 @@ ATF_INIT_TEST_CASES(tcs)
     ATF_ADD_TEST_CASE(tcs, googletest_result__parse__broken);
     ATF_ADD_TEST_CASE(tcs, googletest_result__parse__disabled);
     ATF_ADD_TEST_CASE(tcs, googletest_result__parse__failed);
+    ATF_ADD_TEST_CASE(tcs, googletest_result__parse__failed_parameterized);
     ATF_ADD_TEST_CASE(tcs, googletest_result__parse__skipped);
+    ATF_ADD_TEST_CASE(tcs,
+        googletest_result__parse__skipped_from_environment_with_buggy_output);
     ATF_ADD_TEST_CASE(tcs, googletest_result__parse__skipped_with_reason);
     ATF_ADD_TEST_CASE(tcs, googletest_result__parse__successful);
     ATF_ADD_TEST_CASE(tcs, googletest_result__parse__successful2);
diff --git a/contrib/kyua/engine/googletest_test.cpp b/contrib/kyua/engine/googletest_test.cpp
index 3af4d6801e70..0e74dc80ce6a 100644
--- a/contrib/kyua/engine/googletest_test.cpp
+++ b/contrib/kyua/engine/googletest_test.cpp
@@ -1,30 +1,7 @@
-// Copyright 2024 The Kyua Authors.
+// Copyright 2026 The Kyua Authors.
 // All rights reserved.
 //
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-//   notice, this list of conditions and the following disclaimer.
-// * 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.
-// * Neither the name of Google Inc. nor the names of its contributors
-//   may be used to endorse or promote products derived from this software
-//   without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER 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.
+// SPDX-License-Identifier: BSD-2-Clause
 
 #include "engine/googletest.hpp"
 
@@ -146,6 +123,7 @@ run_one(const atf::tests::tc* tc, const char* test_case_name,
     const scheduler::test_result_handle* test_result_handle =
         dynamic_cast< const scheduler::test_result_handle* >(
             result_handle.get());
+    ATF_REQUIRE(test_result_handle != nullptr);
     atf::utils::cat_file(result_handle->stdout_file().str(), "stdout: ");
     atf::utils::cat_file(result_handle->stderr_file().str(), "stderr: ");
     ATF_REQUIRE_EQ(exp_result, test_result_handle->test_result());
diff --git a/contrib/kyua/engine/plain_test.cpp b/contrib/kyua/engine/plain_test.cpp
index cc3326e4c581..b9c81747bd2c 100644
--- a/contrib/kyua/engine/plain_test.cpp
+++ b/contrib/kyua/engine/plain_test.cpp
@@ -99,6 +99,7 @@ run_one(const atf::tests::tc* tc, const char* test_case_name,
     const scheduler::test_result_handle* test_result_handle =
         dynamic_cast< const scheduler::test_result_handle* >(
             result_handle.get());
+    ATF_REQUIRE(test_result_handle != nullptr);
     atf::utils::cat_file(result_handle->stdout_file().str(), "stdout: ");
     atf::utils::cat_file(result_handle->stderr_file().str(), "stderr: ");
     ATF_REQUIRE_EQ(exp_result, test_result_handle->test_result());
diff --git a/contrib/kyua/engine/scanner_test.cpp b/contrib/kyua/engine/scanner_test.cpp
index f79717eca49e..6d8aba1ac2e0 100644
--- a/contrib/kyua/engine/scanner_test.cpp
+++ b/contrib/kyua/engine/scanner_test.cpp
@@ -327,6 +327,7 @@ ATF_TEST_CASE_BODY(scanner__no_filters__verify_lazy_loads)
          iter != results.end(); ++iter) {
         const mock_test_program* mock_program =
             dynamic_cast< const mock_test_program* >((*iter).first.get());
+        ATF_REQUIRE(mock_program != nullptr);
         ATF_REQUIRE_EQ(1, mock_program->num_calls());
     }
 }
diff --git a/contrib/kyua/engine/scheduler_test.cpp b/contrib/kyua/engine/scheduler_test.cpp
index 93e7627f291a..ed7d23ccc0fa 100644
--- a/contrib/kyua/engine/scheduler_test.cpp
+++ b/contrib/kyua/engine/scheduler_test.cpp
@@ -577,6 +577,7 @@ ATF_TEST_CASE_BODY(integration__run_one)
     const scheduler::test_result_handle* test_result_handle =
         dynamic_cast< const scheduler::test_result_handle* >(
             result_handle.get());
+    ATF_REQUIRE(test_result_handle != nullptr);
     ATF_REQUIRE_EQ(exec_handle, result_handle->original_pid());
*** 171 LINES SKIPPED ***

From nobody Mon Nov 23 05:57:31 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXwFm17wlz720rh
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 05:57: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXwFl5nwlz4W1Q
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:57:31 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795413451;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=lhpEAlXYR5XEYUY7I+jFX8Anv9XLajvAyDt6Rd93csI=;
	b=hy2IO9Ul4bPOGC2wlyBvxAHMMbaXPC/G/PncrZKuD5CgYXdi9AWpEMg7fOlJ0IoaPrYmpJ
	VxTdbSqaVc5VDeBkoNkXf3X1kUWrVzP0gqU5hYumKGUn3urA7MxVlu5cc+F9anrBE2MWJ1
	bxYzxlX2spaAg1LcNXD0T/1skH5lVTRyAc3/qimfEDLGiAHD0FoB/QlqYvEnxwahwelUpV
	DVRFjTdf8e2v4igSA3f98pvO9r0N+38PLyRZeWP1UV2x/+/8JSvdYrVHkkrRwpdeWaqsma
	Gg9I1N90y847yh4Eu6BpzfCU0VGj2sLv8bbdhPUwU2ST9xTnTg5rKdMUhOg6eg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795413451;
	b=spwx1vULQijH0hfv/UQ7cKHC2MFwAC9tWtXF13dzjgpqPjmWSbS2bqdYQtgNbF7AECi/Xf
	a3YZMyKsp/MY1lF8u4cNBHisQisKrEE9+NghPLuMXRRhcLU9HfBSNI9IeS36d9cIdEdPv8
	7WWwA8/WcsO/vZA6dMRr2zLdL6AVZrLh3F3jj7TdnTzcHf2ln87Wi9hB9gBQkKFN7hbS3r
	4vdEmRS+JS0Xuy1slMNVGOV5plWDiodcGVWK1dUFaBnv6i4jcW9ubg8Sn5Tp1bMy6OYGZ9
	qNQinWBh1fjI/4ebo+6t2y4L/it5/MJX/Fvuaqr/o1+jUTVGQ1HrQN9CcGLlXw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795413451;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=lhpEAlXYR5XEYUY7I+jFX8Anv9XLajvAyDt6Rd93csI=;
	b=NjM5f1nGtObAGTXvzzJRF17y/q7QYc1UhkBXJi6MQq94exb2KP1hR3MPYz9Th7Inlw7XhV
	u52G2vcXKUuf4sAqB+seBsFmWT0w7efc4H6sF26zjp8aaxKhHhlJDM0931FewNburIIvwF
	PsJ7ptlx3q48hYV5QEW+EsYVyTM+4qFFaKXWp2XXVitv00HaWksPRvHTySq4syS/HZpgv0
	mxbtFyY1emzBRL4JfgW8fTytm8krqcJq5xIofQuDWZaEB/1YvW8H2svBR7cICKGuSXpOw4
	MmvZHRTowrrP6I9S4+LpR0Ia3CN+z9IcKN9fNCO1+EwGO4DPV8I9U1H0Yir4UA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXwFl4wpczfLy
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:57:31 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1f226
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 05:57:31 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 0fb56a7b2991 - stable/14 - [tests] switch GoogleTest tests to `googletest` interface
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 0fb56a7b2991b297c30158ac6a020a96dad7b333
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 05:57:31 +0000
Message-Id: <6b03d5cb.1f226.4768dcc2@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=0fb56a7b2991b297c30158ac6a020a96dad7b333

commit 0fb56a7b2991b297c30158ac6a020a96dad7b333
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-10-07 18:53:15 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 05:50:28 +0000

    [tests] switch GoogleTest tests to `googletest` interface
    
    The new `googletest` kyua test interface--added in 0.15.0 and fixed in
    0.15.1--allows tests to be executed and handled in a more fine-grained
    manner than the way it was prior to this commit.
    
    This change deletes the `capsicum-test` ATF wrapper script,
    `functional.sh`, and all supporting logic in `googletest.test.mk` as
    well as this change makes that logic unnecessary.
    
    MFC after:      1 month
    MFC with:       b68969979d6b ("contrib/kyua: update to 0.15.1")
    
    (cherry picked from commit 3fb03fb35b20d259e0a3a07fc48f2ecc3c5da6e8)
---
 share/mk/googletest.test.mk      | 11 +-------
 tests/sys/capsicum/Makefile      |  1 -
 tests/sys/capsicum/functional.sh | 60 ----------------------------------------
 3 files changed, 1 insertion(+), 71 deletions(-)

diff --git a/share/mk/googletest.test.mk b/share/mk/googletest.test.mk
index 026f6dcacce3..b21576112a78 100644
--- a/share/mk/googletest.test.mk
+++ b/share/mk/googletest.test.mk
@@ -6,10 +6,6 @@
 # GoogleTest is a C++ test framework, thus, it does not describe/articulate how
 # to write tests in other languages, e.g., C or shell, unlike the ATF, plain,
 # and TAP raw test interfaces.
-#
-# For now this is a thin wrapper around the `plain` test interface, but in the
-# future this will rely on a newer version of kyua which will integrate in
-# GoogleTest support.
 
 .if !target(__<bsd.test.mk>__)
 .error googletest.test.mk cannot be included directly.
@@ -34,13 +30,8 @@ BINDIR.${_T}= ${TESTSDIR}
 CXXFLAGS.${_T}+= ${GTESTS_CXXFLAGS}
 MAN.${_T}?= # empty
 SRCS.${_T}?= ${_T}.cc
-.if !empty(GTESTS_WRAPPER_SH.${_T})
-# A stopgap/workaround to let kyua execute test case one by one
-ATF_TESTS_SH+= ${GTESTS_WRAPPER_SH.${_T}}
-.else
 _TESTS+= ${_T}
-TEST_INTERFACE.${_T}= plain
-.endif
+TEST_INTERFACE.${_T}= googletest
 
 .endfor
 .endif
diff --git a/tests/sys/capsicum/Makefile b/tests/sys/capsicum/Makefile
index 72da640437ac..8309d9a190e9 100644
--- a/tests/sys/capsicum/Makefile
+++ b/tests/sys/capsicum/Makefile
@@ -11,7 +11,6 @@ CFLAGS+=	-I${SRCTOP}/tests
 .if ${MK_GOOGLETEST} != no
 
 GTESTS+=	capsicum-test
-GTESTS_WRAPPER_SH.capsicum-test=	functional
 # This test script runs the same test suite twice, once as root and once as an
 # unprivileged user.  Serialize them since some tests access global namespaces,
 # e.g., mqueuefs, and can trample on each other.
diff --git a/tests/sys/capsicum/functional.sh b/tests/sys/capsicum/functional.sh
deleted file mode 100755
index 8d4a7eef2dec..000000000000
--- a/tests/sys/capsicum/functional.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#-
-# SPDX-License-Identifier: BSD-2-Clause
-#
-# Copyright (c) 2020 The FreeBSD Foundation
-#
-# This software was developed by Li-Wen Hsu <lwhsu@FreeBSD.org>
-# under sponsorship from the FreeBSD Foundation.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-#
-
-CAPSICUM_TEST_BIN=capsicum-test
-
-atf_test_case "test_root"
-test_root_head() {
-
-	atf_set descr 'Run capsicum-test as root'
-	atf_set require.user root
-}
-
-test_root_body() {
-	atf_check -s exit:0 -o match:PASSED -e ignore \
-		"$(atf_get_srcdir)/${CAPSICUM_TEST_BIN}" -u "$(id -u tests)"
-}
-
-atf_test_case "test_unprivileged"
-test_unprivileged_head() {
-
-	atf_set descr 'Run capsicum-test as an unprivileged user'
-	atf_set require.user unprivileged
-}
-
-test_unprivileged_body() {
-	atf_check -s exit:0 -o match:PASSED -e ignore \
-		"$(atf_get_srcdir)/${CAPSICUM_TEST_BIN}" -u "$(id -u)"
-}
-
-atf_init_test_cases() {
-	atf_add_test_case test_root
-	atf_add_test_case test_unprivileged
-}

From nobody Mon Nov 23 05:57:32 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXwFn0DwTz7210K
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 05:57: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXwFm5dsXz4W1Z
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:57:32 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795413452;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=ek0Q/NBGxMhbXrg+1BeUbqYaWkRMwSg9/kB1KV7ZRJ4=;
	b=Szi4ny8nOdlZWjrLM1hhcSVLKN2+ILNDNyN4N/S76AkK7IFGe/+atdI6HL/Sf1SFXswjA4
	rVB3tOTgAdSWJlzrtxaFZD4F8x6sg7/4LQgJ9eRFNwyhU8BPzdLf/W2zam0vwbgDNnYAaS
	hHd/X6jiMpIl1UFrF0RflUKN6MqlPvK2lFe9g4fm8cmLJW0Ulgkeb0PG0fUo+E6kJaBNxz
	liCbOPHCFRSAWZedAFmFAHVOKuQJqqiOYlwMVHvwJfDHcR7fiYXzRnbFmpvwrrINMBF8Jr
	FokDSxn2puGz4hvehPhm3imEVzy//RzY3SLSu/+0JkSRRKF5FDAizLxvmjSGAA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795413452;
	b=wIdIBI0dFQ8/9JDXoPd7eqGIiFZ4MTpcbMztvJK40megGEKESb2iLHldUrLm8tNifshgzf
	WXv4UlBGMtdu1y3dQQvq9eQDpiIZlZKdBsgQthrmiwwtAwE0EythehNpQdI5s+8smdqEkI
	9NUg561tLDT1xNvcQGiEwJs0nQCmlcbftnPsQRkett8WHDi6OQz+qJiRhizsHOO0axAr+M
	xVa0mwVAMZChYf8b9oQUC37bonbF02nF1Z+35TyOovphSysaftZyOBpd7x/L+vD9/o57/8
	A5r+Prt2rWceUKKWySzN1WhHHcRRwVM4h4mAMbz9mMZBzjwDnaoW5RnZZ7+Ktg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795413452;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=ek0Q/NBGxMhbXrg+1BeUbqYaWkRMwSg9/kB1KV7ZRJ4=;
	b=xsPoQU2jBgXHF/xuyf1ms8rFUTmYAx7/cmrOUtSbtODtE6pRa6MMDMlnJjpdOtBSU+JRYk
	lD3Wm3KhY3ABasMg1mUiuHuHih1owgpXjtuSTwTVU8f3jOz9ABxRNXxhSZz7Q1rX2iYTl2
	Kmj99rsZTibNrbhj6Mp9PZJ5LZcn6r9/mbXCSy2Wc4c65/WqxhyQgz7bguykuZxDeBgjTD
	meEq9r0ZGGg2fbq+59bMEmWdbdY8LeJNrCmbk7PYFG/OJUHi4ZqlCYKSBO/B5w3lnDLWMk
	NjMAhy+oot9kcrtmjMMaeU8vMvbV1idx6Tg3w58Htg1VMhOZwKCswZzvNmdn8g==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXwFm5GBqzfM0
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:57:32 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1f9b6
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 05:57:32 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 906dced78237 - stable/14 - GoogleTest: run several tests as plain C++ tests
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 906dced7823773de1747699aa9e68b664bbe6d3f
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 05:57:32 +0000
Message-Id: <6b03d5cc.1f9b6.2de592e8@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=906dced7823773de1747699aa9e68b664bbe6d3f

commit 906dced7823773de1747699aa9e68b664bbe6d3f
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-10-09 21:33:50 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 05:50:28 +0000

    GoogleTest: run several tests as plain C++ tests
    
    Some of the tests provided by GoogleTest don't play well with the kyua
    GoogleTest engine available in 0.15.0, in part because they test
    edgecases that the kyua GoogleTest engine does not expect or handle
    gracefully.
    
    Treat the tests as plain C++ tests to keep parity (result-wise) before
    switching the testcase type from `plain` (what it is today under the
    covers) to `googletest`.
    
    MFC after:      1 month
    MFC with:       3fb03fb35b20 ("[tests] switch GoogleTest tests to ...")
    
    (cherry picked from commit eecc84de3572d1ee6caac1fa14dd3140c9601c9c)
---
 lib/googletest/tests/gmock/Makefile      |  3 ++-
 lib/googletest/tests/gtest/Makefile      | 21 ++++++++++++++-------
 lib/googletest/tests/gtest_main/Makefile | 17 ++++++++++++-----
 3 files changed, 28 insertions(+), 13 deletions(-)

diff --git a/lib/googletest/tests/gmock/Makefile b/lib/googletest/tests/gmock/Makefile
index 5df1f48c0e4a..672cd66ec44f 100644
--- a/lib/googletest/tests/gmock/Makefile
+++ b/lib/googletest/tests/gmock/Makefile
@@ -3,7 +3,8 @@
 
 .PATH:	${GOOGLEMOCK_SRCROOT}/src ${GOOGLEMOCK_SRCROOT}/test
 
-GTESTS+=	gmock_stress_test
+# This doesn't work with the googletest engine in kyua 0.15.0.
+PLAIN_TESTS_CXX+= gmock_stress_test
 
 LIBADD+=	pthread gtest gmock
 
diff --git a/lib/googletest/tests/gtest/Makefile b/lib/googletest/tests/gtest/Makefile
index 0000167dfe70..9fd25304a6bd 100644
--- a/lib/googletest/tests/gtest/Makefile
+++ b/lib/googletest/tests/gtest/Makefile
@@ -3,14 +3,21 @@
 
 .PATH:	${GOOGLETEST_SRCROOT}/src ${GOOGLETEST_SRCROOT}/test
 
-GTESTS+=	gtest_environment_test
-GTESTS+=	gtest_no_test_unittest
-GTESTS+=	googletest-param-test-test
 GTESTS+=	gtest_premature_exit_test
-GTESTS+=	gtest_repeat_test
-GTESTS+=	gtest_stress_test
-GTESTS+=	gtest_throw_on_failure_ex_test
-GTESTS+=	gtest-unittest-api_test
+# These test scenarios are't handled properly with the googletest engine in
+# kyua 0.15.0.
+PLAIN_TESTS_CXX+= gtest_environment_test
+PLAIN_TESTS_CXX+= gtest_no_test_unittest
+PLAIN_TESTS_CXX+= gtest_throw_on_failure_ex_test
+
+# NOTE: these tests rely on testing by side-effect with global variables/state
+# used in multiple testcases.
+#
+# Running this plain C++ tests gets around that problem.
+PLAIN_TESTS_CXX+= googletest-param-test-test
+PLAIN_TESTS_CXX+= gtest_repeat_test
+PLAIN_TESTS_CXX+= gtest_stress_test
+PLAIN_TESTS_CXX+= gtest-unittest-api_test
 
 CXXFLAGS+=	-I${GOOGLETEST_SRCROOT}/include
 CXXFLAGS+=	-I${GOOGLETEST_SRCROOT}
diff --git a/lib/googletest/tests/gtest_main/Makefile b/lib/googletest/tests/gtest_main/Makefile
index 3124042f8b95..58e84458a86d 100644
--- a/lib/googletest/tests/gtest_main/Makefile
+++ b/lib/googletest/tests/gtest_main/Makefile
@@ -4,8 +4,6 @@
 .PATH:	${GOOGLETEST_SRCROOT}/src ${GOOGLETEST_SRCROOT}/test
 
 GTESTS+=	googletest-death-test-test
-GTESTS+=	googletest-filepath-test
-GTESTS+=	googletest-listener-test
 GTESTS+=	googletest-message-test
 GTESTS+=	googletest-options-test
 GTESTS+=	googletest-port-test
@@ -15,10 +13,19 @@ GTESTS+=	gtest-typed-test_test
 GTESTS+=	gtest_main_unittest
 GTESTS+=	gtest_pred_impl_unittest
 GTESTS+=	gtest_prod_test
-GTESTS+=	gtest_skip_test
-GTESTS+=	gtest_skip_in_environment_setup_test
 GTESTS+=	gtest_sole_header_test
-GTESTS+=	gtest_unittest
+
+# Crashes when listing testcases using googletest engine in kyua 0.15.0
+# (probably test bugs).
+PLAIN_TESTS_CXX+= googletest-filepath-test
+PLAIN_TESTS_CXX+= googletest-listener-test
+# These test scearios don't work with the googletest engine in kyua 0.15.0.
+PLAIN_TESTS_CXX+= gtest_skip_in_environment_setup_test
+PLAIN_TESTS_CXX+= gtest_skip_test
+# Some of the test scenarios show up as "skipped", when in reality they're just
+# testing skipped functionality. Don't inflate the testcase numbers
+# unnecessarily as it can serve to confuse downstream users.
+PLAIN_TESTS_CXX+= gtest_unittest
 
 CXXFLAGS+=	-I${GOOGLETEST_SRCROOT}/include
 CXXFLAGS+=	-I${GOOGLETEST_SRCROOT}

From nobody Mon Nov 23 05:57:34 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXwFq105wz720xG
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 05:57:35 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXwFp6gbGz4WDZ
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:57:34 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795413454;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=N9kTrKlk3TFyYlAFC9Bco3Z9aqSGn4yR1Dv2Ms57hj8=;
	b=YbMuOjdRiub36xWPX9aVyXwSh40eeZzbXTejlIUcBylTSLTEqaoXfzPy9H1gHQYnkMFs+Q
	okvvjLmKtBC3G2ZM4LegLPIYHqGFsY3vAk49ZupwSLwYyFWndZM1llXxHzXJl4URq6DrFn
	MLBIpE4L1hLJ0wg1C69j6P4ybhtbAhrxSeeWwX+Mh1DvCWlCHstUNKB9+rU+zQwHyErzJr
	2wIeAWiYNsvaJn0cyJwfL7lhtHfPPiFVEAlCl3Y3q/Yk5eMjJceg5zNieqFGeVn6kZuFIB
	eSP2r1NM8lPR2qCsdrWaRFwgyBJovY5NhzgDLU3rUTRPBHNVwpprExd5YoqJLw==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795413454;
	b=hgC4SnBOHscuzRqIn7ByR2X8r5ZAooqsReisXpfk7y4B1VM8OLu+0O5zFe4PttN/aCSEkK
	6+V0FcnImYWA4H7E3vD2djs6ACW/+SA+pBecSCLAASEZPkmxfaeoMYPCk6VSbfy27L+wNh
	RhNopms0HepDKR/6g9khlkUaJ4qut27H8i/7DQek3h3W7j1WzeQtkxcHK6KppPq3PA89za
	VVQPETZVYZ1oh3nfiWN5xAWagZ5a+tRz8YtkU4zbVyZp73X6Eox6MTsxKwBmF1AceCuSEN
	BtLDB/WHph9q4BtFtax7OpZ9fKE520A9guklqJAn8Uf6IJAut59q/517xogZ/g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795413454;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=N9kTrKlk3TFyYlAFC9Bco3Z9aqSGn4yR1Dv2Ms57hj8=;
	b=WZkc0HQPUVsrO9/Wk9Lv3+fJIn7Rp+TMknt4q5iDGTM1GpvpNg6evCIt+KLoOWjqesZLDG
	dksTJzLmUMhvyW37Lo5qihTFz0+cLBqJZ6eoJR8OIb8zy6fNfVqK45mdOakgHMCK1GJTGs
	n92JaU9evzQ3BgDcInF2nJ//8BPp9nGFxu99Hsbl63cYGLJGj9u994nNJ8LBer5TlE6lJC
	Wu6zgns+JuDcjh9JqSt47v5ig2t5jBr20qITVMwg54bmSyyJc6WL/dfa9LM/rolADbJP3E
	/VY5kDcYwUiR2hFsruHQ1Lzge37ssMeLouGvJoZgsvCM5vtgFKWGDOiOEEZvUA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXwFp6120zfM4
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:57:34 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1e67e
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 05:57:34 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 90bdd1e79a98 - stable/14 - capsicum-test: make the code WARNS=6 clean
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 90bdd1e79a98eabb8a215750e7c9a46c96138c01
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 05:57:34 +0000
Message-Id: <6b03d5ce.1e67e.5ebdf36c@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=90bdd1e79a98eabb8a215750e7c9a46c96138c01

commit 90bdd1e79a98eabb8a215750e7c9a46c96138c01
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-11-10 01:52:55 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 05:50:28 +0000

    capsicum-test: make the code WARNS=6 clean
    
    Make the code WARNS=6 clean by doing the following:
    - Renaming variables (-Wshadow).
    - Use memcpy instead of assigning the result of CMSG_DATA to a variable
      (-Wcast-align).
    - Wrap some macros with do-while(0) to avoid variable collisions
      (-Wshadow).
    - Push one of the TRACE statements up by 1 layer to avoid a collision
      between 2 calls of TRACE via the same overarching macro.
    
    This was needed in order for the code to build properly with D61066,
    since the code was not compiling with WARNS set to 3 at the testcase
    level.
    
    MFC after: 1 week
    Reviewed by:    markj
    Differential Revision:  https://reviews.freebsd.org/D61080
    
    (cherry picked from commit 04c4b2084eb93fc2374dbb89f343f3941585a640)
---
 tests/sys/capsicum/capability-fd.cc      | 10 +++--
 tests/sys/capsicum/capmode.cc            |  2 +-
 tests/sys/capsicum/capsicum-freebsd.h    | 15 +++----
 tests/sys/capsicum/capsicum-test-main.cc |  8 +++-
 tests/sys/capsicum/capsicum-test.h       | 36 +++++++++++-----
 tests/sys/capsicum/fexecve.cc            | 12 +++---
 tests/sys/capsicum/procdesc.cc           |  6 ++-
 tests/sys/capsicum/sctp.cc               | 30 +++++++-------
 tests/sys/capsicum/socket.cc             | 70 ++++++++++++++++----------------
 9 files changed, 107 insertions(+), 82 deletions(-)

diff --git a/tests/sys/capsicum/capability-fd.cc b/tests/sys/capsicum/capability-fd.cc
index a9e4d30ac4b9..d79f3e4be917 100644
--- a/tests/sys/capsicum/capability-fd.cc
+++ b/tests/sys/capsicum/capability-fd.cc
@@ -974,6 +974,8 @@ FORK_TEST_ON(Capability, SocketTransfer, TmpFile("cap_fd_transfer")) {
 
   pid_t child = fork();
   if (child == 0) {
+    int child_cap_fd;
+
     // Child: enter cap mode
     EXPECT_OK(cap_enter());
     // Child: send startup notification
@@ -984,16 +986,16 @@ FORK_TEST_ON(Capability, SocketTransfer, TmpFile("cap_fd_transfer")) {
     EXPECT_OK(rc);
     EXPECT_LE(CMSG_LEN(sizeof(int)), mh.msg_controllen);
     cmptr = CMSG_FIRSTHDR(&mh);
-    int cap_fd = *(int*)CMSG_DATA(cmptr);
+    memcpy(&child_cap_fd, CMSG_DATA(cmptr), sizeof(child_cap_fd));
     EXPECT_EQ(CMSG_LEN(sizeof(int)), cmptr->cmsg_len);
     cmptr = CMSG_NXTHDR(&mh, cmptr);
     EXPECT_TRUE(cmptr == NULL);
 
     // Child: confirm we can do the right operations on the capability
     cap_rights_t rights;
-    EXPECT_OK(cap_rights_get(cap_fd, &rights));
+    EXPECT_OK(cap_rights_get(child_cap_fd, &rights));
     EXPECT_RIGHTS_EQ(&r_rs, &rights);
-    TryReadWrite(cap_fd);
+    TryReadWrite(child_cap_fd);
 
     // Child: acknowledge that we have received and tested the file descriptor
     SEND_INT_MESSAGE(sock_fds[0], MSG_CHILD_FD_RECEIVED);
@@ -1024,7 +1026,7 @@ FORK_TEST_ON(Capability, SocketTransfer, TmpFile("cap_fd_transfer")) {
   cmptr->cmsg_level = SOL_SOCKET;
   cmptr->cmsg_type = SCM_RIGHTS;
   cmptr->cmsg_len = CMSG_LEN(sizeof(int));
-  *(int *)CMSG_DATA(cmptr) = cap_fd;
+  memcpy(CMSG_DATA(cmptr), &cap_fd, sizeof(cap_fd));
   buffer1[0] = 0;
   iov[0].iov_len = 1;
   int rc = sendmsg(sock_fds[1], &mh, 0);
diff --git a/tests/sys/capsicum/capmode.cc b/tests/sys/capsicum/capmode.cc
index 89aa8f653dfc..60dabeb165a1 100644
--- a/tests/sys/capsicum/capmode.cc
+++ b/tests/sys/capsicum/capmode.cc
@@ -158,7 +158,7 @@ FORK_TEST_F(WithFiles, AllowedSocketSyscalls) {
   if (rc < 0) {
     EXPECT_EQ(EAGAIN, errno);
   }
-  char ch;
+  char ch = 'a';
   EXPECT_OK(write(fd_file_, &ch, sizeof(ch)));
 
   // These calls will fail for lack of e.g. a proper name to send to,
diff --git a/tests/sys/capsicum/capsicum-freebsd.h b/tests/sys/capsicum/capsicum-freebsd.h
index 9cb3149a05a4..82ee9cf9d91c 100644
--- a/tests/sys/capsicum/capsicum-freebsd.h
+++ b/tests/sys/capsicum/capsicum-freebsd.h
@@ -4,15 +4,15 @@
  * FreeBSD Capsicum Functionality.
  ************************************************************/
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
 
 /* FreeBSD definitions. */
-#include <errno.h>
 #include <sys/param.h>
 #include <sys/capsicum.h>
 #include <sys/procdesc.h>
+#include <errno.h>
 
 #define AT_SYSCALLS_IN_CAPMODE
 #define HAVE_CAP_RIGHTS_GET
@@ -27,9 +27,7 @@ typedef unsigned long cap_ioctl_t;
 
 #define HAVE_OPENAT_INTERMEDIATE_DOTDOT
 
-#ifdef __cplusplus
-}
-#endif
+__END_DECLS
 
 // Use fexecve_() in tests to allow Linux variant to bypass glibc version.
 #define fexecve_(F, A, E) fexecve(F, A, E)
@@ -50,4 +48,7 @@ typedef unsigned long cap_ioctl_t;
 // FreeBSD generates a capability from sctp_peeloff(cap_fd,...).
 #define CAP_FROM_PEELOFF
 
+#define	HAVE_PIPE2
+#define	HAVE_SEND_RECV_MMSG
+
 #endif /*__CAPSICUM_FREEBSD_H__*/
diff --git a/tests/sys/capsicum/capsicum-test-main.cc b/tests/sys/capsicum/capsicum-test-main.cc
index 308c121a0281..a39e192aa385 100644
--- a/tests/sys/capsicum/capsicum-test-main.cc
+++ b/tests/sys/capsicum/capsicum-test-main.cc
@@ -75,12 +75,16 @@ std::string capsicum_test_bindir;
 // Adds a directory to $PATH.
 static void AddDirectoryToPath(const char *dir) {
   char *new_path, *old_path;
+  int rc [[maybe_unused]];
 
   old_path = getenv("PATH");
   assert(old_path);
 
-  assert(asprintf(&new_path, "%s:%s", dir, old_path) > 0);
-  assert(setenv("PATH", new_path, 1) == 0);
+  rc = asprintf(&new_path, "%s:%s", dir, old_path);
+  assert(rc != -1);
+  rc = setenv("PATH", new_path, 1);
+  assert(rc == 0);
+  free(new_path);
 }
 
 int main(int argc, char* argv[]) {
diff --git a/tests/sys/capsicum/capsicum-test.h b/tests/sys/capsicum/capsicum-test.h
index 7433814b31c8..5503a7ef260f 100644
--- a/tests/sys/capsicum/capsicum-test.h
+++ b/tests/sys/capsicum/capsicum-test.h
@@ -67,7 +67,7 @@ const char *TmpFile(const char *pathname);
 // Implemented as a macro to allow access to the test case instance's
 // HasFailure() method, which is reported as the forked process's
 // exit status.
-#define _RUN_FORKED(INNERCODE, TESTCASENAME, TESTNAME)         \
+#define _RUN_FORKED(INNERCODE, TESTCASENAME, TESTNAME) do {    \
     pid_t pid = force_nofork ? 0 : fork();                     \
     if (pid == 0) {                                            \
       INNERCODE;                                               \
@@ -95,10 +95,13 @@ const char *TmpFile(const char *pathname);
                         strerror(errno), errno);               \
         ADD_FAILURE() << "Failed to wait for child";           \
       } else {                                                 \
-        int rc = WIFEXITED(status) ? WEXITSTATUS(status) : -1; \
-        EXPECT_EQ(0, rc);                                      \
+        int exit_status =                                      \
+          WIFEXITED(status) ? WEXITSTATUS(status) : -1;        \
+        EXPECT_EQ(0, exit_status);                             \
       }                                                        \
-    }
+    }                                                          \
+} while (0)
+
 #define _RUN_FORKED_MEM(THIS, TESTFN, TESTCASENAME, TESTNAME)  \
   _RUN_FORKED(MaybeRunWithThread(THIS, &TESTFN), TESTCASENAME, TESTNAME);
 #define _RUN_FORKED_FN(TESTFN, TESTCASENAME, TESTNAME)   \
@@ -137,15 +140,28 @@ const char *TmpFile(const char *pathname);
 // Emit errno information on failure
 #define EXPECT_OK(v) EXPECT_LE(0, v) << "   errno " << errno << " " << strerror(errno)
 
-// Expect a syscall to fail with the given error.
-#define EXPECT_SYSCALL_FAIL(E, C) \
+// Expect a syscall to fail with the given error (inner).
+//
+// This is required because unfortunately googletest "computes" trace variables
+// using line numbers instead of another unique ID and 2 calls to
+// `SCOPED_TRACE(..)` via the same macro results in `-Wshadow`-related compiler
+// errors: https://github.com/google/googletest/issues/5143
+#define EXPECT_SYSCALL_FAIL_NO_TRACE(E, C) \
     do { \
-      SCOPED_TRACE(#C); \
       EXPECT_GT(0, C); \
       EXPECT_EQ(E, errno) << "expected '" << strerror(E) \
                           << "' but got '" << strerror(errno) << "'"; \
     } while (0)
 
+// Expect a syscall to fail with the given error (with tracing).
+//
+// See the comment above (for `EXPECT_SYSCALL_FAIL_NO_TRACE`).
+#define EXPECT_SYSCALL_FAIL(E, C) \
+    do { \
+      SCOPED_TRACE(#C); \
+      EXPECT_SYSCALL_FAIL_NO_TRACE((E), (C)); \
+    } while (0)
+
 // Expect a syscall to fail with anything other than the given error.
 #define EXPECT_SYSCALL_FAIL_NOT(E, C) \
     do { \
@@ -169,9 +185,9 @@ const char *TmpFile(const char *pathname);
       SCOPED_TRACE(GTEST_STRINGIFY_(openat((fd), (path), (flags)))); \
       const int result = openat((fd), (path), (flags)); \
       if (((flags) & O_BENEATH) == O_BENEATH) { \
-        EXPECT_SYSCALL_FAIL(E_NO_TRAVERSE_O_BENEATH, result); \
+        EXPECT_SYSCALL_FAIL_NO_TRACE(E_NO_TRAVERSE_O_BENEATH, result); \
       } else { \
-        EXPECT_SYSCALL_FAIL(E_NO_TRAVERSE_CAPABILITY, result); \
+        EXPECT_SYSCALL_FAIL_NO_TRACE(E_NO_TRAVERSE_CAPABILITY, result); \
       } \
       if (result >= 0) { close(result); } \
     } while (0)
@@ -180,7 +196,7 @@ const char *TmpFile(const char *pathname);
     do { \
       SCOPED_TRACE(GTEST_STRINGIFY_(openat((fd), (path), (flags)))); \
       const int result = openat((fd), (path), (flags)); \
-      EXPECT_SYSCALL_FAIL(E_NO_TRAVERSE_CAPABILITY, result); \
+      EXPECT_SYSCALL_FAIL_NO_TRACE(E_NO_TRAVERSE_CAPABILITY, result); \
       if (result >= 0) { close(result); } \
     } while (0)
 #endif
diff --git a/tests/sys/capsicum/fexecve.cc b/tests/sys/capsicum/fexecve.cc
index 86df2af06388..6ff5a657c35a 100644
--- a/tests/sys/capsicum/fexecve.cc
+++ b/tests/sys/capsicum/fexecve.cc
@@ -32,9 +32,9 @@ class Execve : public ::testing::Test {
     if (exec_fd_ < 0) {
       fprintf(stderr, "Error! Failed to open %s\n", exec_prog_.c_str());
     }
-    argv_checkroot_[0] = (char*)exec_prog_.c_str();
-    argv_fail_[0] = (char*)exec_prog_.c_str();
-    argv_pass_[0] = (char*)exec_prog_.c_str();
+    argv_checkroot_[0] = __DECONST(char*, exec_prog_.c_str());
+    argv_fail_[0] = __DECONST(char*, exec_prog_.c_str());
+    argv_pass_[0] = __DECONST(char*, exec_prog_.c_str());
   }
   ~Execve() {
     if (exec_fd_ >= 0) {
@@ -43,9 +43,9 @@ class Execve : public ::testing::Test {
     }
   }
 protected:
-  char* argv_checkroot_[3] = {nullptr, (char*)"--checkroot", nullptr};
-  char* argv_fail_[3] = {nullptr, (char*)"--fail", nullptr};
-  char* argv_pass_[3] = {nullptr, (char*)"--pass", nullptr};
+  char* argv_checkroot_[3] = {nullptr, __DECONST(char*, "--checkroot"), nullptr};
+  char* argv_fail_[3] = {nullptr, __DECONST(char*, "--fail"), nullptr};
+  char* argv_pass_[3] = {nullptr, __DECONST(char*, "--pass"), nullptr};
   std::string exec_prog_, exec_prog_noexec_, exec_prog_setuid_;
   int exec_fd_;
 };
diff --git a/tests/sys/capsicum/procdesc.cc b/tests/sys/capsicum/procdesc.cc
index aabc0446553b..72027d5037bc 100644
--- a/tests/sys/capsicum/procdesc.cc
+++ b/tests/sys/capsicum/procdesc.cc
@@ -995,6 +995,8 @@ TEST_F(PipePdfork, PassProcessDescriptor) {
   if (verbose) fprintf(stderr, "[%d] about to fork()\n", getpid_());
   pid_t child2 = fork();
   if (child2 == 0) {
+    int pd;
+
     // Child: close our copy of the original process descriptor.
     close(pd_);
     SEND_INT_MESSAGE(sock_fds[0], MSG_CHILD_STARTED);
@@ -1004,7 +1006,7 @@ TEST_F(PipePdfork, PassProcessDescriptor) {
     EXPECT_OK(rc);
     EXPECT_LE(CMSG_LEN(sizeof(int)), mh.msg_controllen);
     cmptr = CMSG_FIRSTHDR(&mh);
-    int pd = *(int*)CMSG_DATA(cmptr);
+    memcpy(&pd, CMSG_DATA(cmptr), sizeof(pd));
     EXPECT_EQ(CMSG_LEN(sizeof(int)), cmptr->cmsg_len);
     cmptr = CMSG_NXTHDR(&mh, cmptr);
     EXPECT_TRUE(cmptr == NULL);
@@ -1036,7 +1038,7 @@ TEST_F(PipePdfork, PassProcessDescriptor) {
   cmptr->cmsg_level = SOL_SOCKET;
   cmptr->cmsg_type = SCM_RIGHTS;
   cmptr->cmsg_len = CMSG_LEN(sizeof(int));
-  *(int *)CMSG_DATA(cmptr) = pd_;
+  memcpy(CMSG_DATA(cmptr), &pd_, sizeof(pd_));
   buffer1[0] = 0;
   iov[0].iov_len = 1;
   if (verbose) fprintf(stderr, "[%d] send process descriptor %d on socket\n", getpid_(), pd_);
diff --git a/tests/sys/capsicum/sctp.cc b/tests/sys/capsicum/sctp.cc
index aa84653c5b2a..a36a242f8c9b 100644
--- a/tests/sys/capsicum/sctp.cc
+++ b/tests/sys/capsicum/sctp.cc
@@ -92,13 +92,13 @@ TEST(Sctp, Socket) {
   addr.sin_family = AF_INET;
   addr.sin_port = htons(0);
   addr.sin_addr.s_addr = htonl(INADDR_ANY);
-  socklen_t len = sizeof(addr);
+  socklen_t addr_len = sizeof(addr);
 
   // Can only bind the fully-capable socket.
-  EXPECT_NOTCAPABLE(bind(cap_sock_rw, (struct sockaddr *)&addr, len));
-  EXPECT_OK(bind(cap_sock_all, (struct sockaddr *)&addr, len));
+  EXPECT_NOTCAPABLE(bind(cap_sock_rw, (struct sockaddr *)&addr, addr_len));
+  EXPECT_OK(bind(cap_sock_all, (struct sockaddr *)&addr, addr_len));
 
-  EXPECT_OK(getsockname(cap_sock_all, (struct sockaddr *)&addr, &len));
+  EXPECT_OK(getsockname(cap_sock_all, (struct sockaddr *)&addr, &addr_len));
   int port = ntohs(addr.sin_port);
 
   // Now we know the port involved, fork off children to run clients.
@@ -128,43 +128,43 @@ TEST(Sctp, Socket) {
   EXPECT_OK(listen(cap_sock_all, 3));
 
   // Can only do socket operations on the fully-capable socket.
-  len = sizeof(addr);
-  EXPECT_NOTCAPABLE(getsockname(cap_sock_rw, (struct sockaddr*)&addr, &len));
+  addr_len = sizeof(addr);
+  EXPECT_NOTCAPABLE(getsockname(cap_sock_rw, (struct sockaddr*)&addr, &addr_len));
 
   struct sctp_event_subscribe events;
   memset(&events, 0, sizeof(events));
   events.sctp_association_event = 1;
   events.sctp_data_io_event = 1;
   EXPECT_NOTCAPABLE(setsockopt(cap_sock_rw, IPPROTO_SCTP, SCTP_EVENTS, &events, sizeof(events)));
-  len = sizeof(events);
-  EXPECT_NOTCAPABLE(getsockopt(cap_sock_rw, IPPROTO_SCTP, SCTP_EVENTS, &events, &len));
+  socklen_t eventslen = sizeof(events);
+  EXPECT_NOTCAPABLE(getsockopt(cap_sock_rw, IPPROTO_SCTP, SCTP_EVENTS, &events, &eventslen));
   memset(&events, 0, sizeof(events));
   events.sctp_association_event = 1;
   events.sctp_data_io_event = 1;
   EXPECT_OK(setsockopt(cap_sock_all, IPPROTO_SCTP, SCTP_EVENTS, &events, sizeof(events)));
-  len = sizeof(events);
-  EXPECT_OK(getsockopt(cap_sock_all, IPPROTO_SCTP, SCTP_EVENTS, &events, &len));
+  eventslen = sizeof(events);
+  EXPECT_OK(getsockopt(cap_sock_all, IPPROTO_SCTP, SCTP_EVENTS, &events, &eventslen));
 
-  len = sizeof(addr);
+  addr_len = sizeof(addr);
   memset(&addr, 0, sizeof(addr));
-  EXPECT_OK(getsockname(cap_sock_all, (struct sockaddr*)&addr, &len));
+  EXPECT_OK(getsockname(cap_sock_all, (struct sockaddr*)&addr, &addr_len));
   EXPECT_EQ(AF_INET, addr.sin_family);
   EXPECT_EQ(htons(port), addr.sin_port);
 
   struct sockaddr_in client_addr;
-  socklen_t addr_len = sizeof(client_addr);
+  socklen_t client_addr_len = sizeof(client_addr);
   unsigned char buffer[1024];
   struct sctp_sndrcvinfo sri;
   memset(&sri, 0, sizeof(sri));
   int flags = 0;
   EXPECT_NOTCAPABLE(sctp_recvmsg(cap_sock_wo, buffer, sizeof(buffer),
-                                 (struct sockaddr*)&client_addr, &addr_len,
+                                 (struct sockaddr*)&client_addr, &client_addr_len,
                                  &sri, &flags));
   while (true) {
   retry:
     memset(&sri, 0, sizeof(sri));
     int len = sctp_recvmsg(cap_sock_rw, buffer, sizeof(buffer),
-                           (struct sockaddr*)&client_addr, &addr_len,
+                           (struct sockaddr*)&client_addr, &client_addr_len,
                            &sri, &flags);
     if (len < 0 && errno == EAGAIN) goto retry;
     EXPECT_OK(len);
diff --git a/tests/sys/capsicum/socket.cc b/tests/sys/capsicum/socket.cc
index 5bb7e9d3e180..ff21d3020a83 100644
--- a/tests/sys/capsicum/socket.cc
+++ b/tests/sys/capsicum/socket.cc
@@ -166,26 +166,26 @@ TEST(Socket, TCP) {
     AWAIT_INT_MESSAGE(pipefds[1], MSG_PARENT_CHILD_SHOULD_RUN);
 
     // Create sockets
-    int sock = socket(AF_INET, SOCK_STREAM, 0);
-    EXPECT_OK(sock);
-    if (sock < 0) return;
-    int cap_sock_rw = dup(sock);
-    EXPECT_OK(cap_sock_rw);
-    EXPECT_OK(cap_rights_limit(cap_sock_rw, &r_rw));
-    int cap_sock_all = dup(sock);
-    EXPECT_OK(cap_sock_all);
-    EXPECT_OK(cap_rights_limit(cap_sock_all, &r_all));
-    close(sock);
+    int child_sock = socket(AF_INET, SOCK_STREAM, 0);
+    EXPECT_OK(child_sock);
+    if (child_sock < 0) return;
+    int child_cap_sock_rw = dup(child_sock);
+    EXPECT_OK(child_cap_sock_rw);
+    EXPECT_OK(cap_rights_limit(child_cap_sock_rw, &r_rw));
+    int child_cap_sock_all = dup(child_sock);
+    EXPECT_OK(child_cap_sock_all);
+    EXPECT_OK(cap_rights_limit(child_cap_sock_all, &r_all));
+    close(child_sock);
 
     // Connect socket
-    struct sockaddr_in addr;
-    memset(&addr, 0, sizeof(addr));
-    addr.sin_family = AF_INET;
-    addr.sin_port = htons(port);  // Pick unused port
-    addr.sin_addr.s_addr = inet_addr("127.0.0.1");
-    socklen_t len = sizeof(addr);
-    EXPECT_NOTCAPABLE(connect_(cap_sock_rw, (struct sockaddr *)&addr, len));
-    EXPECT_OK(connect_(cap_sock_all, (struct sockaddr *)&addr, len));
+    struct sockaddr_in child_addr;
+    memset(&child_addr, 0, sizeof(child_addr));
+    child_addr.sin_family = AF_INET;
+    child_addr.sin_port = htons(port);  // Pick unused port
+    child_addr.sin_addr.s_addr = inet_addr("127.0.0.1");
+    socklen_t child_addr_len = sizeof(child_addr);
+    EXPECT_NOTCAPABLE(connect_(child_cap_sock_rw, (struct sockaddr *)&child_addr, child_addr_len));
+    EXPECT_OK(connect_(child_cap_sock_all, (struct sockaddr *)&child_addr, child_addr_len));
 
     exit(HasFailure());
   }
@@ -291,15 +291,15 @@ TEST(Socket, UDP) {
 
   pid_t child = fork();
   if (child == 0) {
-    int sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
-    EXPECT_OK(sock);
-    int cap_sock_rw = dup(sock);
-    EXPECT_OK(cap_sock_rw);
-    EXPECT_OK(cap_rights_limit(cap_sock_rw, &r_rw));
-    int cap_sock_connect = dup(sock);
+    int child_sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
+    EXPECT_OK(child_sock);
+    int child_cap_sock_rw = dup(child_sock);
+    EXPECT_OK(child_cap_sock_rw);
+    EXPECT_OK(cap_rights_limit(child_cap_sock_rw, &r_rw));
+    int cap_sock_connect = dup(child_sock);
     EXPECT_OK(cap_sock_connect);
     EXPECT_OK(cap_rights_limit(cap_sock_connect, &r_connect));
-    close(sock);
+    close(child_sock);
 
     // Can only sendmsg(2) to an address over a socket with CAP_CONNECT.
     unsigned char buffer[256];
@@ -313,25 +313,25 @@ TEST(Socket, UDP) {
     mh.msg_iov = &iov;
     mh.msg_iovlen = 1;
 
-    struct sockaddr_in addr;
-    memset(&addr, 0, sizeof(addr));
-    addr.sin_family = AF_INET;
-    addr.sin_port = htons(port);
-    addr.sin_addr.s_addr = inet_addr("127.0.0.1");
-    mh.msg_name = &addr;
-    mh.msg_namelen = sizeof(addr);
+    struct sockaddr_in child_addr;
+    memset(&child_addr, 0, sizeof(child_addr));
+    child_addr.sin_family = AF_INET;
+    child_addr.sin_port = htons(port);
+    child_addr.sin_addr.s_addr = inet_addr("127.0.0.1");
+    mh.msg_name = &child_addr;
+    mh.msg_namelen = sizeof(child_addr);
 
-    EXPECT_NOTCAPABLE(sendmsg(cap_sock_rw, &mh, 0));
+    EXPECT_NOTCAPABLE(sendmsg(child_cap_sock_rw, &mh, 0));
     EXPECT_OK(sendmsg(cap_sock_connect, &mh, 0));
 
 #ifdef HAVE_SEND_RECV_MMSG
     struct mmsghdr mv;
     memset(&mv, 0, sizeof(mv));
     memcpy(&mv.msg_hdr, &mh, sizeof(struct msghdr));
-    EXPECT_NOTCAPABLE(sendmmsg(cap_sock_rw, &mv, 1, 0));
+    EXPECT_NOTCAPABLE(sendmmsg(child_cap_sock_rw, &mv, 1, 0));
     EXPECT_OK(sendmmsg(cap_sock_connect, &mv, 1, 0));
 #endif
-    close(cap_sock_rw);
+    close(child_cap_sock_rw);
     close(cap_sock_connect);
     exit(HasFailure());
   }

From nobody Mon Nov 23 05:57:33 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXwFp1Ggjz720k0
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 05:57: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXwFn6fN3z4WBR
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:57:33 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795413453;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=V1OCeBZr2r7ZZPcphVoGlDQXyvIuyn3oE+9GfkbJQOE=;
	b=iCdX0ewohU7JdlbNztHSAfwEKcwbhMGNX4erCKK651Ivz6hHhwpVnVzkAFnlLfxfLvu7Qr
	06TjyJl5mffhily9iQdaq96apkeBF+Vh2fWRbexahQSCymwuvnch0IqBprXxpvB1YxfEDt
	Egr4dZhrb5FnUD7jOrTm70OpwtgSoLkrm9RT1twlMRPiIFjf5X9E7hDROXYy9vpdpIFZjK
	3dgU5rvS0bnsTvEaBQzTjTi3fjv3NmyBtMkl4B9i3RuEdZ0T9irLixcbjbYuYTekMYwqqm
	g/sb077t4BvRt5xP7ilA7uFSllmG3E+/8epnYRnqS6qNa3yi6KdEABkpv0v2dQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795413453;
	b=NZTE/gvAFtzZ9TCsKz3Qn5O2BCDW6Eg7XVHPwH7BYNMODloDwJVW/V2ihSwOcNQQDhsuPR
	YVYU5iB3ujNJw6nejQR5bIFX8b7yeNHGXqvw4CJtJdLe42lKYsZhZiErvc9RSCjlpTcg7J
	HGlGlhp3RNGNeBVV1Z8Azz+Y8pqJTI6R0Y+/rk/2EmUwNhVNO0Hw7NRN2q6DbO9ruxNgmj
	VICrxOt7XkUHqfe1GMkZTi5w03ctobGAVRjrgG06PTg0jL+EkxcsqDe2PvwIQBUEv7EHiI
	whMBeFaZtMKdgJSReXnNCciQlsKG+4TYzt2y25/Bx7GnU6P+VDUOIT5nqSf6/A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795413453;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=V1OCeBZr2r7ZZPcphVoGlDQXyvIuyn3oE+9GfkbJQOE=;
	b=tXEEOmCkb8EFFxb720+rxruNejGTi6kVGY8u8YTzr5A9QoXU1O+2wgVQRnLnRtfeidsYKy
	+Ia62Sq32j3aimxUng0781GWT+byVxvXPkEe7EMILjpis5d5RrXdep0XBTOcXFu4V2LwH4
	UxM4Be5A6RRhhHRXxicO6PcbFEg/P6O1zveoZ3LHi/pJjaEJyjZW6h5EMeXncbXZ7IPZDV
	AFIa7TNSONsOlJG5AIWVMjfsj5/RRbbtwXIfKXLSLrpLkHC+U7fVNALr6p++PzMUhREUsf
	ftSipQIchYLLYSuXBqnEW+JToy6LMXG+h5b2cvvRJpvn5y36CegDfQDX6kDEkg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXwFn5cVFzfM2
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:57:33 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 31
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 05:57:33 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 2ca11a16475a - stable/14 - tests/sys/capsicum: restore test coverage with root user
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 2ca11a16475a766256bd5c0354121bba9b95d890
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 05:57:33 +0000
Message-Id: <6b03d5cd.31.6a41f254@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=2ca11a16475a766256bd5c0354121bba9b95d890

commit 2ca11a16475a766256bd5c0354121bba9b95d890
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-11-10 01:55:45 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 05:50:28 +0000

    tests/sys/capsicum: restore test coverage with root user
    
    This change builds capsicum_test and installs/runs it as an unprivileged
    user ("tests" in vanilla FreeBSD) and root.
    
    This required adjusting logic in the Makefile in order to build two
    binaries with the same sources and running them as separate binaries.
    
    Moreover, in order to restore coverage and ensure that some tests which
    require `other_uid` (typically specified via `-u` on the CLI with the
    test program) don't fail, become the "tests" user when run as root. This
    technically doesn't honor unprivileged_user property in kyua.conf: the
    property needs to be passed via a command-line parameter to the test
    program.
    
    MFC after:      1 week
    Reported by:    markj
    Fixes:          3fb03fb35b20 ("[tests] switch GoogleTest tests ...")
    
    Reviewed by:    markj
    Differential Revision:  https://reviews.freebsd.org/D61066
    
    (cherry picked from commit 58e5c5cac1e7c8c99a6e7f8846b655afed05b74f)
---
 tests/sys/capsicum/Makefile              | 27 ++++++++++++++++++---------
 tests/sys/capsicum/capsicum-test-main.cc | 24 ++++++++++++++++++++++++
 2 files changed, 42 insertions(+), 9 deletions(-)

diff --git a/tests/sys/capsicum/Makefile b/tests/sys/capsicum/Makefile
index 8309d9a190e9..d559a66d9c83 100644
--- a/tests/sys/capsicum/Makefile
+++ b/tests/sys/capsicum/Makefile
@@ -10,14 +10,11 @@ CFLAGS+=	-I${SRCTOP}/tests
 
 .if ${MK_GOOGLETEST} != no
 
-GTESTS+=	capsicum-test
-# This test script runs the same test suite twice, once as root and once as an
-# unprivileged user.  Serialize them since some tests access global namespaces,
-# e.g., mqueuefs, and can trample on each other.
-TEST_METADATA.functional+=	is_exclusive="true"
-TEST_METADATA.functional+=	required_kmods="mqueuefs"
+GTESTS+=	capsicum-test_privileged
+GTESTS+=	capsicum-test_unprivileged
 
-SRCS.capsicum-test+=	\
+# SRCS required for `capsicum-test*`.
+SRCS.capsicum-test=	\
 	capsicum-test-main.cc \
 	capsicum-test.cc \
 	capability-fd.cc \
@@ -37,8 +34,20 @@ SRCS.capsicum-test+=	\
 	overhead.cc \
 	rename.cc
 
-LIBADD.capsicum-test+=	gtest pthread procstat
-TEST_METADATA.capsicum-test=	required_user="unprivileged"
+.for gtest in ${GTESTS}
+SRCS.${gtest}=			${SRCS.capsicum-test}
+
+LIBADD.${gtest}+=		gtest pthread procstat
+
+# This test script runs the same test suite twice, once as root and once as an
+# unprivileged user.  Serialize them since some tests access global namespaces,
+# e.g., mqueuefs, and can trample on each other.
+TEST_METADATA.${gtest}+=	is_exclusive="true"
+TEST_METADATA.${gtest}+=	required_kmods="mqueuefs"
+.endfor
+
+TEST_METADATA.capsicum-test_privileged+=	required_user="root"
+TEST_METADATA.capsicum-test_unprivileged+=	required_user="unprivileged"
 
 .for p in mini-me mini-me.noexec mini-me.setuid
 PROGS+=		$p
diff --git a/tests/sys/capsicum/capsicum-test-main.cc b/tests/sys/capsicum/capsicum-test-main.cc
index 2a2c75000039..308c121a0281 100644
--- a/tests/sys/capsicum/capsicum-test-main.cc
+++ b/tests/sys/capsicum/capsicum-test-main.cc
@@ -136,6 +136,30 @@ int main(int argc, char* argv[]) {
     }
   }
 
+  // Last ditch effort to get an unprivileged user on the fly from /etc/passwd
+  // for testcases that need it.
+  //
+  // This must be done this way because the typical way of handling this (via
+  // the `-u` argument) isn't supported yet with kyua:
+  // https://github.com/freebsd/kyua/issues/354 .
+  //
+  // IMPORTANT:
+  // - this doesn't honor `unprivileged_user` in `kyua.conf`.
+  // - this doesn't fail because doing that could break all testing on systems
+  //   where the `tests` user isn't available.
+  if (other_uid == 0) {
+    const char *test_user = "tests";
+
+    struct passwd *test_user_entry = getpwnam(test_user);
+
+    if (test_user_entry) {
+       other_uid = test_user_entry->pw_uid;
+    } else {
+       std::cerr << "Failed to get entry for " << test_user << ", errno=" << errno << "; some tests may fail" << std::endl;
+    }
+
+  }
+
   testing::AddGlobalTestEnvironment(new SetupEnvironment());
   return RUN_ALL_TESTS();
 }

From nobody Mon Nov 23 05:57:35 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXwFr481zz720mD
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 05:57:36 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXwFq6jkLz4VpV
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:57:35 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795413455;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=UHdZPaQzifaB8QeIpSnd93s+yGr5zkiFyh8l6Tb53+I=;
	b=RjJMGJl/T7kRtX8DRV2yup48buEjYIQYQyUvvuqouZZJFHUWFUAp5c7f2Bi5Z6VoClCz0Q
	9BtsiZ/FIUzlrmUSNwhYSqP5ZLZYBpbJWKCG6oJfBPezk7fBPnS1ZWoHXQmEf4Cg6HbZ5e
	InQZzNx+tgedgzLcypuorQEhGtd8T0KCcpcmNHg5F65EnWSccXzdlRsMIbfM8Gmo3q/1uP
	Kms/a9ib6GWX6QseE/dFVk1b17PnGcm8IOJM8ZKGS/pwglVcChaWRzS8guCvuApP+thRBk
	MLfbhL+bReOrkk0JGFyi2t0ojRCdtFRr0TQKAgB0BEzppja9RTZVWQqu4fVIxg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795413455;
	b=nhnDRkCYG/CKH7HXmn0/oMLlvp20FDEGO+kxVVow3j5qfhNYVRqbYM9uzLLZ1nHbQ+6FrF
	zF1baiwCNJ42iw20YcyRq3Eilyfd6GSxPSdROxc4VSbF4qPS80sFOHw8tDaPKmcou8T53y
	bMAlG2S0okZnmjukOGJOxJMeIdGYTODSsi9dUAAh9FoStfgOEbm9iYMfeFMB0Tolk31gxF
	5Nf588EFxZoLRRHSEpRpRW5Q2xhNA7EVCyuWzBK84TweflOOQOMys+GmcCUqc0nkN5WHBu
	XnZ8ROtRw3s9at2iyUck85rSJkxpWEih0h4FreIoKVnx8HD5kt9ofOWErmF7/w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795413455;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=UHdZPaQzifaB8QeIpSnd93s+yGr5zkiFyh8l6Tb53+I=;
	b=JXjIC2yzvdJ2Cmb9LdXmAM/TBd3E0N0dQI75nppuBQXv058K/nUKXM8KAvuQ4P6bbCsKRT
	kP44dwyxDupbWmkDxSzMjZ6tqRUNPmmYcRM48wFnCxpUM14AvoK/OgaDy77Smyy7+r5h9R
	d4MURIzRSDjdv1QFXhQnNmzkUv2TY3dO/7b43cZtAqz9ov+ZDo3hzx+7t2F9M19tOOyPYK
	3u9BeI6HgkPM2K20u7L7nA/eooP50P87c9kN+3xeuLtaVKO4eLF1WOUdsUZ6qOA/ooZBgZ
	4PEujoiBzG89prK/CNuqjiMfgDek56L/PCVQaCsQ9PVPNqkdur9kFlQ3ZRzbjg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXwFq6L9HzfTL
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:57:35 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1e1e5
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 05:57:35 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: f8dc8330cf0c - stable/14 - capsicum-test: Disable `HAVE_SEND_RECV_MMSG` again
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: f8dc8330cf0c065f3f8b0f5f7eeeb616ba742a3a
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 05:57:35 +0000
Message-Id: <6b03d5cf.1e1e5.1254a2d8@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=f8dc8330cf0c065f3f8b0f5f7eeeb616ba742a3a

commit f8dc8330cf0c065f3f8b0f5f7eeeb616ba742a3a
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-11-10 02:05:33 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 05:50:29 +0000

    capsicum-test: Disable `HAVE_SEND_RECV_MMSG` again
    
    04c4b2084eb9 accidentally added some changes from another WIP commit into that
    diff. Instead of wholesale reverting the change, just revert the part that's
    currently broken (`HAVE_SEND_RECV_MMSG`). While some of the related tests pass,
    one of the testcases (`capmode.cc:AllowedMmsgSendRecv`) doesn't currently pass.
    
    Revert the change to make the CI run more green again.
    
    MFC after:      1 week
    Fixes:  04c4b2084eb9 ("capsicum-test: make the code WARNS=6 clean")
    
    (cherry picked from commit 71eddb44d7dfa60e43f77c90b51bd091f0693f85)
---
 tests/sys/capsicum/capsicum-freebsd.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/sys/capsicum/capsicum-freebsd.h b/tests/sys/capsicum/capsicum-freebsd.h
index 82ee9cf9d91c..ea14dd76a505 100644
--- a/tests/sys/capsicum/capsicum-freebsd.h
+++ b/tests/sys/capsicum/capsicum-freebsd.h
@@ -49,6 +49,10 @@ __END_DECLS
 #define CAP_FROM_PEELOFF
 
 #define	HAVE_PIPE2
+
+/* capmode.cc:AllowedMmsgSendRecv: the tests don't pass on FreeBSD (yet?). */
+#if 0
 #define	HAVE_SEND_RECV_MMSG
+#endif
 
 #endif /*__CAPSICUM_FREEBSD_H__*/

From nobody Mon Nov 23 05:57:37 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXwFt4ZxTz720rt
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 05:57:38 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXwFt1FF9z4Vpb
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:57:38 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795413458;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=8Qn8Ar/IW/CbJFxE7mysk8vfJWk7dqJOGq0BmKGEFrE=;
	b=QD+Y2qprNG5XlzKSArSFXletgu1E5keFmO20ve+yoCC/1/0vIkl84JH61JanpkjJYNEqBq
	jI47hsOasuxVqCqEYNj8GaTZawNL9OeBKA8t3nGuMtak212iJmQd06X4exc+fHraPwtX1x
	ovq5AwW6tDW8GRU8jfj1sh9MqvzklT4lxwqlIQvpcSydOOa6iZlixwuZXy2FgMSjpRQGEz
	jLB7T6la5nza/RHULJt1wDJJ/ARFPId5paKqUf40w7BN7RxyLHoAv7xgV3dhwNUtEFFNXa
	O66y87tIT22GdqEsUOXNomcVcSmeRLvpy4VbekGOkOFPs8O8re9EefbBcK1FhA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795413458;
	b=Mq1kYZwwP7/YgM6KCXQ+La18VOdg5YMOZGed7MNrvlzZyypvjqO5tbbPFyzi0UDFpcmU5P
	lTIyZZmqmbEJG/lS97K5owiUMFfEE8mm4EzXL1RAPGMx+7gwUf2X9bhhWm3vW2QBxhpyst
	eRZx/Hg7vQwIP2QoY4bmgrx3gviXKbR4qYSE+LmeE7efe5qlky6lcd+Z84xirYrPyq/7LV
	rTjRX8j/KfOYjOBf83SCpP23YCS38g5Xez0m0EdOJOgR/Z2g32/d1yW0sAoXu9w2ncW8+0
	ScJm0x5hzjKGdDTGetXPS2w0nx3k1umR+Mdj60pKdbKZZPZkkxSL13WYWlZoRQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795413458;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=8Qn8Ar/IW/CbJFxE7mysk8vfJWk7dqJOGq0BmKGEFrE=;
	b=qjxATEESMzJbxUl9HOk8Kkik4UR/XMAsCIGpUknmricElqJUmAFmbw5FhWwBlK74hEXuS7
	WFYVUmRAHyn2DhCz/1diOcEO5p0z60mYCU9+F14tJZebkBwJH5Q3CPOdUIju6T7XIde5kR
	Lc62HhOxyJIjd/S6W4C34huTYyy5EQnKwDA+PUGgvJU/JnNzpqUFdnWC4LhHwyipPhurk3
	reBWh5cLXjhQezBfzSvrrJ8B5I5p6XcVd3OLJrpkOIp+6CbfxbMDaJCbEKJSjM202crg4G
	P9bAClpSbXYYrdfSoS09NT0nfNfBO5HzPucEtQQ8fFBpohm4YyZes99t7nL/qw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXwFt01ZHzfJr
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:57:38 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id fc5
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 05:57:37 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 62664f2f0940 - stable/14 - contrib/kyua: update to 0.15.2
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 62664f2f0940e548e97845d45baf7f0f4aeb4006
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 05:57:37 +0000
Message-Id: <6b03d5d1.fc5.77e0360e@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=62664f2f0940e548e97845d45baf7f0f4aeb4006

commit 62664f2f0940e548e97845d45baf7f0f4aeb4006
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-11-19 07:02:06 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 05:50:29 +0000

    contrib/kyua: update to 0.15.2
    
    This change contains a few bugfixes to the test executor.
    
    MFC after:      1 week
    Merge commit 'dab80d5deaf7d998d587b99f7941890237960638'
    
    (cherry picked from commit c16da33701d07751bbe6871ad39582006d5281fc)
---
 contrib/kyua/NEWS                         |  18 ++
 contrib/kyua/README.md                    |   4 +-
 contrib/kyua/config.h                     |   3 +
 contrib/kyua/utils/Kyuafile               |   1 -
 contrib/kyua/utils/auto_array.hpp         | 102 ----------
 contrib/kyua/utils/auto_array.ipp         | 227 ----------------------
 contrib/kyua/utils/auto_array_fwd.hpp     |  43 ----
 contrib/kyua/utils/auto_array_test.cpp    | 312 ------------------------------
 contrib/kyua/utils/cmdline/parser.cpp     |  16 +-
 contrib/kyua/utils/datetime.cpp           |  88 +++++++++
 contrib/kyua/utils/datetime.hpp           |  28 +++
 contrib/kyua/utils/datetime_fwd.hpp       |   1 +
 contrib/kyua/utils/datetime_test.cpp      | 117 +++++++++++
 contrib/kyua/utils/fs/operations.cpp      |  16 +-
 contrib/kyua/utils/process/systembuf.cpp  |   7 +-
 contrib/kyua/utils/signals/timer.cpp      |  75 +++++--
 contrib/kyua/utils/signals/timer.hpp      |   8 +-
 contrib/kyua/utils/signals/timer_test.cpp | 111 +++++++++--
 contrib/kyua/utils/text/regex.cpp         |  33 ++--
 contrib/kyua/utils/text/templates.cpp     |   2 +-
 20 files changed, 442 insertions(+), 770 deletions(-)

diff --git a/contrib/kyua/NEWS b/contrib/kyua/NEWS
index 50a2c8257370..3b7099fc6dbd 100644
--- a/contrib/kyua/NEWS
+++ b/contrib/kyua/NEWS
@@ -1,5 +1,23 @@
 # Major changes between releases
 
+## Changes in version 0.15.2
+
+**Released on 2026/11/19.**
+
+### Bugfixes
+
+* #345: Use monotonic time for timer deadlines
+* #352: Get rid of utils::auto_array
+* #355: Use absolute deadlines in some timer activation tests
+* #357: Fix UB related to iterator lifetime in text templates
+* #360: fix(ci): update LLVM toolchains on macOS and Ubuntu
+
+### Developer Workflow Changes
+
+* #361: Port over dev workflow items from ATF project (commit-check, pre-commit)
+
+**Full Changelog**: https://github.com/freebsd/lutok/compare/kyua-0.15.1...kyua-0.15.2
+
 ## Changes in version 0.15.1
 
 **Released on 2026/10/25.**
diff --git a/contrib/kyua/README.md b/contrib/kyua/README.md
index b8b54d0413de..a5bc8db0509b 100644
--- a/contrib/kyua/README.md
+++ b/contrib/kyua/README.md
@@ -27,9 +27,9 @@ This is not an official Google product.
 
 ## Download
 
-The latest version of Kyua is 0.15.0 and was released on October 7th, 2026.
+The latest version of Kyua is 0.15.1 and was released on October 25th, 2026.
 
-Download: [kyua-0.15.0](../../releases/tag/kyua-0.15.0).
+Download: [kyua-0.15.1](../../releases/tag/kyua-0.15.1).
 
 See the [release notes](NEWS) for information about the changes in this
 and all previous releases.
diff --git a/contrib/kyua/config.h b/contrib/kyua/config.h
index eba9c9cb1448..cccfe36ae3a2 100644
--- a/contrib/kyua/config.h
+++ b/contrib/kyua/config.h
@@ -4,6 +4,9 @@
 /* Define to the optind value to reset getopt processing */
 #define GETOPT_OPTIND_RESET_VALUE 1
 
+/* Define to 1 if you have the 'clock_gettime' function. */
+#undef HAVE_CLOCK_GETTIME
+
 /* define if the compiler supports basic C++20 syntax */
 #define HAVE_CXX20 1
 
diff --git a/contrib/kyua/utils/Kyuafile b/contrib/kyua/utils/Kyuafile
index 042ad77a3fe4..4955349f2ac9 100644
--- a/contrib/kyua/utils/Kyuafile
+++ b/contrib/kyua/utils/Kyuafile
@@ -2,7 +2,6 @@ syntax(2)
 
 test_suite("kyua")
 
-atf_test_program{name="auto_array_test"}
 atf_test_program{name="datetime_test"}
 atf_test_program{name="env_test"}
 atf_test_program{name="memory_test"}
diff --git a/contrib/kyua/utils/auto_array.hpp b/contrib/kyua/utils/auto_array.hpp
deleted file mode 100644
index 93b3e20223cf..000000000000
--- a/contrib/kyua/utils/auto_array.hpp
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright 2010 The Kyua Authors.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-//   notice, this list of conditions and the following disclaimer.
-// * 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.
-// * Neither the name of Google Inc. nor the names of its contributors
-//   may be used to endorse or promote products derived from this software
-//   without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER 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.
-
-/// \file utils/auto_array.hpp
-/// Provides the utils::auto_array class.
-///
-/// The class is provided as a separate module on its own to minimize
-/// header-inclusion side-effects.
-
-#if !defined(UTILS_AUTO_ARRAY_HPP)
-#define UTILS_AUTO_ARRAY_HPP
-
-#include "utils/auto_array_fwd.hpp"
-
-#include <cstddef>
-
-namespace utils {
-
-
-namespace detail {
-
-
-/// Wrapper class to provide reference semantics for utils::auto_array.
-///
-/// This class is internally used, for example, to allow returning a
-/// utils::auto_array from a function.
-template< class T >
-class auto_array_ref {
-    /// Internal pointer to the dynamically-allocated array.
-    T* _ptr;
-
-    template< class > friend class utils::auto_array;
-
-public:
-    explicit auto_array_ref(T*);
-};
-
-
-}  // namespace detail
-
-
-/// A simple smart pointer for arrays providing strict ownership semantics.
-///
-/// This class is the counterpart of std::unique_ptr for arrays.  The semantics of
-/// the API of this class are the same as those of std::unique_ptr.
-///
-/// The wrapped pointer must be NULL or must have been allocated using operator
-/// new[].
-template< class T >
-class auto_array {
-    /// Internal pointer to the dynamically-allocated array.
-    T* _ptr;
-
-public:
-    auto_array(T* = NULL) throw();
-    auto_array(auto_array< T >&) throw();
-    auto_array(detail::auto_array_ref< T >) throw();
-    ~auto_array(void) throw();
-
-    T* get(void) throw();
-    const T* get(void) const throw();
-
-    T* release(void) throw();
-    void reset(T* = NULL) throw();
-
-    auto_array< T >& operator=(auto_array< T >&) throw();
-    auto_array< T >& operator=(detail::auto_array_ref< T >) throw();
-    T& operator[](int) throw();
-    const T& operator[](int) const throw();
-    operator detail::auto_array_ref< T >(void) throw();
-};
-
-
-}  // namespace utils
-
-
-#endif  // !defined(UTILS_AUTO_ARRAY_HPP)
diff --git a/contrib/kyua/utils/auto_array.ipp b/contrib/kyua/utils/auto_array.ipp
deleted file mode 100644
index fd29311def8c..000000000000
--- a/contrib/kyua/utils/auto_array.ipp
+++ /dev/null
@@ -1,227 +0,0 @@
-// Copyright 2010 The Kyua Authors.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-//   notice, this list of conditions and the following disclaimer.
-// * 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.
-// * Neither the name of Google Inc. nor the names of its contributors
-//   may be used to endorse or promote products derived from this software
-//   without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER 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.
-
-#if !defined(UTILS_AUTO_ARRAY_IPP)
-#define UTILS_AUTO_ARRAY_IPP
-
-#include "utils/auto_array.hpp"
-
-namespace utils {
-
-
-namespace detail {
-
-
-/// Constructs a new auto_array_ref from a pointer.
-///
-/// \param ptr The pointer to wrap.
-template< class T > inline
-auto_array_ref< T >::auto_array_ref(T* ptr) :
-    _ptr(ptr)
-{
-}
-
-
-}  // namespace detail
-
-
-/// Constructs a new auto_array from a given pointer.
-///
-/// This grabs ownership of the pointer unless it is NULL.
-///
-/// \param ptr The pointer to wrap.  If not NULL, the memory pointed to must
-/// have been allocated with operator new[].
-template< class T > inline
-auto_array< T >::auto_array(T* ptr) throw() :
-    _ptr(ptr)
-{
-}
-
-
-/// Constructs a copy of an auto_array.
-///
-/// \param ptr The pointer to copy from.  This pointer is invalidated and the
-/// new copy grabs ownership of the object pointed to.
-template< class T > inline
-auto_array< T >::auto_array(auto_array< T >& ptr) throw() :
-    _ptr(ptr.release())
-{
-}
-
-
-/// Constructs a new auto_array form a reference.
-///
-/// Internal function used to construct a new auto_array from an object
-/// returned, for example, from a function.
-///
-/// \param ref The reference.
-template< class T > inline
-auto_array< T >::auto_array(detail::auto_array_ref< T > ref) throw() :
-    _ptr(ref._ptr)
-{
-}
-
-
-/// Destructor for auto_array objects.
-template< class T > inline
-auto_array< T >::~auto_array(void) throw()
-{
-    if (_ptr != NULL)
-        delete [] _ptr;
-}
-
-
-/// Gets the value of the wrapped pointer without releasing ownership.
-///
-/// \return The raw mutable pointer.
-template< class T > inline
-T*
-auto_array< T >::get(void) throw()
-{
-    return _ptr;
-}
-
-
-/// Gets the value of the wrapped pointer without releasing ownership.
-///
-/// \return The raw immutable pointer.
-template< class T > inline
-const T*
-auto_array< T >::get(void) const throw()
-{
-    return _ptr;
-}
-
-
-/// Gets the value of the wrapped pointer and releases ownership.
-///
-/// \return The raw mutable pointer.
-template< class T > inline
-T*
-auto_array< T >::release(void) throw()
-{
-    T* ptr = _ptr;
-    _ptr = NULL;
-    return ptr;
-}
-
-
-/// Changes the value of the wrapped pointer.
-///
-/// If the auto_array was pointing to an array, such array is released and the
-/// wrapped pointer is replaced with the new pointer provided.
-///
-/// \param ptr The pointer to use as a replacement; may be NULL.
-template< class T > inline
-void
-auto_array< T >::reset(T* ptr) throw()
-{
-    if (_ptr != NULL)
-        delete [] _ptr;
-    _ptr = ptr;
-}
-
-
-/// Assignment operator.
-///
-/// \param ptr The object to copy from.  This is invalidated after the copy.
-/// \return A reference to the auto_array object itself.
-template< class T > inline
-auto_array< T >&
-auto_array< T >::operator=(auto_array< T >& ptr) throw()
-{
-    reset(ptr.release());
-    return *this;
-}
-
-
-/// Internal assignment operator for function returns.
-///
-/// \param ref The reference object to copy from.
-/// \return A reference to the auto_array object itself.
-template< class T > inline
-auto_array< T >&
-auto_array< T >::operator=(detail::auto_array_ref< T > ref) throw()
-{
-    if (_ptr != ref._ptr) {
-        delete [] _ptr;
-        _ptr = ref._ptr;
-    }
-    return *this;
-}
-
-
-/// Subscript operator to access the array by position.
-///
-/// This does not perform any bounds checking, in particular because auto_array
-/// does not know the size of the arrays pointed to by it.
-///
-/// \param pos The position to access, indexed from zero.
-///
-/// \return A mutable reference to the element at the specified position.
-template< class T > inline
-T&
-auto_array< T >::operator[](int pos) throw()
-{
-    return _ptr[pos];
-}
-
-
-/// Subscript operator to access the array by position.
-///
-/// This does not perform any bounds checking, in particular because auto_array
-/// does not know the size of the arrays pointed to by it.
-///
-/// \param pos The position to access, indexed from zero.
-///
-/// \return An immutable reference to the element at the specified position.
-template< class T > inline
-const T&
-auto_array< T >::operator[](int pos) const throw()
-{
-    return _ptr[pos];
-}
-
-
-/// Internal conversion to a reference wrapper.
-///
-/// This is used internally to support returning auto_array objects from
-/// functions.  The auto_array is invalidated when used.
-///
-/// \return A new detail::auto_array_ref object holding the pointer.
-template< class T > inline
-auto_array< T >::operator detail::auto_array_ref< T >(void) throw()
-{
-    return detail::auto_array_ref< T >(release());
-}
-
-
-}  // namespace utils
-
-
-#endif  // !defined(UTILS_AUTO_ARRAY_IPP)
diff --git a/contrib/kyua/utils/auto_array_fwd.hpp b/contrib/kyua/utils/auto_array_fwd.hpp
deleted file mode 100644
index e1522a25bf7d..000000000000
--- a/contrib/kyua/utils/auto_array_fwd.hpp
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2015 The Kyua Authors.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-//   notice, this list of conditions and the following disclaimer.
-// * 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.
-// * Neither the name of Google Inc. nor the names of its contributors
-//   may be used to endorse or promote products derived from this software
-//   without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER 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.
-
-/// \file utils/auto_array_fwd.hpp
-/// Forward declarations for utils/auto_array.hpp
-
-#if !defined(UTILS_AUTO_ARRAY_FWD_HPP)
-#define UTILS_AUTO_ARRAY_FWD_HPP
-
-namespace utils {
-
-
-template< class > class auto_array;
-
-
-}  // namespace utils
-
-#endif  // !defined(UTILS_AUTO_ARRAY_FWD_HPP)
diff --git a/contrib/kyua/utils/auto_array_test.cpp b/contrib/kyua/utils/auto_array_test.cpp
deleted file mode 100644
index 041eb65863ba..000000000000
--- a/contrib/kyua/utils/auto_array_test.cpp
+++ /dev/null
@@ -1,312 +0,0 @@
-// Copyright 2010 The Kyua Authors.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-//   notice, this list of conditions and the following disclaimer.
-// * 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.
-// * Neither the name of Google Inc. nor the names of its contributors
-//   may be used to endorse or promote products derived from this software
-//   without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER 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 "utils/auto_array.ipp"
-
-extern "C" {
-#include <sys/types.h>
-}
-
-#include <iostream>
-
-#include <atf-c++.hpp>
-
-#include "utils/defs.hpp"
-
-using utils::auto_array;
-
-
-namespace {
-
-
-/// Mock class to capture calls to the new and delete operators.
-class test_array {
-public:
-    /// User-settable cookie to disambiguate instances of this class.
-    int m_value;
-
-    /// The current balance of existing test_array instances.
-    static ssize_t m_nblocks;
-
-    /// Captures invalid calls to new on an array.
-    ///
-    /// \return Nothing; this always fails the test case.
-    void*
-    operator new(const size_t /* size */)
-    {
-        ATF_FAIL("New called but should have been new[]");
-        return new int(5);
-    }
-
-    /// Obtains memory for a new instance and increments m_nblocks.
-    ///
-    /// \param size The amount of memory to allocate, in bytes.
-    ///
-    /// \return A pointer to the allocated memory.
-    ///
-    /// \throw std::bad_alloc If the memory cannot be allocated.
-    void*
-    operator new[](const size_t size)
-    {
-        void* mem = ::operator new(size);
-        m_nblocks++;
-        std::cout << "Allocated 'test_array' object " << mem << "\n";
-        return mem;
-    }
-
-    /// Captures invalid calls to delete on an array.
-    ///
-    /// \return Nothing; this always fails the test case.
-    void
-    operator delete(void* /* mem */)
-    {
-        ATF_FAIL("Delete called but should have been delete[]");
-    }
-
-    /// Deletes a previously allocated array and decrements m_nblocks.
-    ///
-    /// \param mem The pointer to the memory to be deleted.
-    void
-    operator delete[](void* mem)
-    {
-        std::cout << "Releasing 'test_array' object " << mem << "\n";
-        if (m_nblocks == 0)
-            ATF_FAIL("Unbalanced delete[]");
-        m_nblocks--;
-        ::operator delete(mem);
-    }
-};
-
-
-ssize_t test_array::m_nblocks = 0;
-
-
-}  // anonymous namespace
-
-
-ATF_TEST_CASE(scope);
-ATF_TEST_CASE_HEAD(scope)
-{
-    set_md_var("descr", "Tests the automatic scope handling in the "
-               "auto_array smart pointer class");
-}
-ATF_TEST_CASE_BODY(scope)
-{
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-    {
-        auto_array< test_array > t(new test_array[10]);
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-    }
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-}
-
-
-ATF_TEST_CASE(copy);
-ATF_TEST_CASE_HEAD(copy)
-{
-    set_md_var("descr", "Tests the auto_array smart pointer class' copy "
-               "constructor");
-}
-ATF_TEST_CASE_BODY(copy)
-{
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-    {
-        auto_array< test_array > t1(new test_array[10]);
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-
-        {
-            auto_array< test_array > t2(t1);
-            ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-        }
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-    }
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-}
-
-
-ATF_TEST_CASE(copy_ref);
-ATF_TEST_CASE_HEAD(copy_ref)
-{
-    set_md_var("descr", "Tests the auto_array smart pointer class' copy "
-               "constructor through the auxiliary ref object");
-}
-ATF_TEST_CASE_BODY(copy_ref)
-{
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-    {
-        auto_array< test_array > t1(new test_array[10]);
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-
-        {
-            auto_array< test_array > t2 = t1;
-            ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-        }
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-    }
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-}
-
-
-ATF_TEST_CASE(get);
-ATF_TEST_CASE_HEAD(get)
-{
-    set_md_var("descr", "Tests the auto_array smart pointer class' get "
-               "method");
-}
-ATF_TEST_CASE_BODY(get)
-{
-    test_array* ta = new test_array[10];
-    auto_array< test_array > t(ta);
-    ATF_REQUIRE_EQ(t.get(), ta);
-}
-
-
-ATF_TEST_CASE(release);
-ATF_TEST_CASE_HEAD(release)
-{
-    set_md_var("descr", "Tests the auto_array smart pointer class' release "
-               "method");
-}
-ATF_TEST_CASE_BODY(release)
-{
-    test_array* ta1 = new test_array[10];
-    {
-        auto_array< test_array > t(ta1);
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-        test_array* ta2 = t.release();
-        ATF_REQUIRE_EQ(ta2, ta1);
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-    }
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-    delete [] ta1;
-}
-
-
-ATF_TEST_CASE(reset);
-ATF_TEST_CASE_HEAD(reset)
-{
-    set_md_var("descr", "Tests the auto_array smart pointer class' reset "
-               "method");
-}
-ATF_TEST_CASE_BODY(reset)
-{
-    test_array* ta1 = new test_array[10];
-    test_array* ta2 = new test_array[10];
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 2);
-
-    {
-        auto_array< test_array > t(ta1);
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 2);
-        t.reset(ta2);
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-        t.reset();
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-    }
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-}
-
-
-ATF_TEST_CASE(assign);
-ATF_TEST_CASE_HEAD(assign)
-{
-    set_md_var("descr", "Tests the auto_array smart pointer class' "
-               "assignment operator");
-}
-ATF_TEST_CASE_BODY(assign)
-{
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-    {
-        auto_array< test_array > t1(new test_array[10]);
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-
-        {
-            auto_array< test_array > t2;
-            t2 = t1;
-            ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-        }
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-    }
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-}
-
-
-ATF_TEST_CASE(assign_ref);
-ATF_TEST_CASE_HEAD(assign_ref)
-{
-    set_md_var("descr", "Tests the auto_array smart pointer class' "
-               "assignment operator through the auxiliary ref "
-               "object");
-}
-ATF_TEST_CASE_BODY(assign_ref)
-{
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-    {
-        auto_array< test_array > t1(new test_array[10]);
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-
-        {
-            auto_array< test_array > t2;
-            t2 = t1;
-            ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-        }
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-    }
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-}
-
-
-ATF_TEST_CASE(access);
-ATF_TEST_CASE_HEAD(access)
-{
-    set_md_var("descr", "Tests the auto_array smart pointer class' access "
-               "operator");
-}
-ATF_TEST_CASE_BODY(access)
-{
-    auto_array< test_array > t(new test_array[10]);
-
-    for (int i = 0; i < 10; i++)
-        t[i].m_value = i * 2;
-
-    for (int i = 0; i < 10; i++)
-        ATF_REQUIRE_EQ(t[i].m_value, i * 2);
-}
-
-
-ATF_INIT_TEST_CASES(tcs)
-{
-    ATF_ADD_TEST_CASE(tcs, scope);
-    ATF_ADD_TEST_CASE(tcs, copy);
-    ATF_ADD_TEST_CASE(tcs, copy_ref);
-    ATF_ADD_TEST_CASE(tcs, get);
-    ATF_ADD_TEST_CASE(tcs, release);
-    ATF_ADD_TEST_CASE(tcs, reset);
-    ATF_ADD_TEST_CASE(tcs, assign);
-    ATF_ADD_TEST_CASE(tcs, assign_ref);
-    ATF_ADD_TEST_CASE(tcs, access);
-}
diff --git a/contrib/kyua/utils/cmdline/parser.cpp b/contrib/kyua/utils/cmdline/parser.cpp
index 29dd4612f6ad..32fb14c25e97 100644
--- a/contrib/kyua/utils/cmdline/parser.cpp
+++ b/contrib/kyua/utils/cmdline/parser.cpp
@@ -39,8 +39,8 @@ extern "C" {
 #include <cstdlib>
 #include <cstring>
 #include <limits>
+#include <vector>
 
-#include "utils/auto_array.ipp"
 #include "utils/cmdline/exceptions.hpp"
 #include "utils/cmdline/options.hpp"
 #include "utils/format/macros.hpp"
@@ -61,7 +61,7 @@ struct getopt_data : utils::noncopyable {
     std::string short_options;
 
     /// Representation of the long options as expected by getopt_long(3).
-    utils::auto_array< ::option > long_options;
+    std::vector< ::option > long_options;
 
     /// Auto-generated identifiers to be able to parse long options.
     std::map< int, const cmdline::base_option* > ids;
@@ -78,7 +78,7 @@ options_to_getopt_data(const cmdline::options_vector& options,
                        getopt_data& data)
 {
     data.short_options.clear();
-    data.long_options.reset(new ::option[options.size() + 1]);
+    data.long_options.resize(options.size() + 1);
 
     int cur_id = 512;
 
@@ -189,7 +189,7 @@ find_option_name(const getopt_data& data, const int getopt_optopt,
         const char ch = static_cast< char >(getopt_optopt);
         return F("-%s") % ch;
     } else {
-        for (const ::option* opt = &data.long_options[0]; opt->name != NULL;
+        for (const ::option* opt = data.long_options.data(); opt->name != NULL;
              opt++) {
             if (opt->val == getopt_optopt)
                 return F("--%s") % opt->name;
@@ -284,11 +284,11 @@ cmdline::parse(const cmdline::args_vector& args,
 {
     PRE_MSG(args.size() >= 1, "No progname or command name found");
 
-    utils::auto_array< const char* > argv(new const char*[args.size() + 1]);
+    std::vector< const char* > argv(args.size() + 1);
     for (args_vector::size_type i = 0; i < args.size(); i++)
         argv[i] = args[i].c_str();
-    argv[args.size()] = NULL;
-    return parse(static_cast< int >(args.size()), argv.get(), options);
+    argv.back() = nullptr;
+    return parse(static_cast< int >(args.size()), argv.data(), options);
 }
 
 
@@ -342,7 +342,7 @@ cmdline::parse(const int argc, const char* const* argv,
 
         while ((ch = ::getopt_long(mutable_argc, mutable_argv,
                                    ("+:" + data.short_options).c_str(),
-                                   data.long_options.get(), NULL)) != -1) {
+                                   data.long_options.data(), NULL)) != -1) {
             if (ch == ':' ) {
                 const std::string name = find_option_name(
                     data, ::optopt, mutable_argv, ::optind);
diff --git a/contrib/kyua/utils/datetime.cpp b/contrib/kyua/utils/datetime.cpp
index 174d830031d2..62101637b3b9 100644
--- a/contrib/kyua/utils/datetime.cpp
+++ b/contrib/kyua/utils/datetime.cpp
@@ -612,3 +612,91 @@ datetime::operator<<(std::ostream& output, const timestamp& object)
 {
     return (output << object.to_microseconds() << "us");
 }
+
+
+/// Constructs a monotonic time point measured in microseconds.
+///
+/// \param useconds Microseconds since the monotonic clock's origin.
+datetime::monotonic_timestamp::monotonic_timestamp(const int64_t useconds) :
+    _useconds(useconds)
+{
+}
+
+
+/// Constructs a monotonic time point from a count of microseconds.
+///
+/// \param useconds Microseconds since the monotonic clock's origin.
+///
+/// \return A new monotonic time point.
+datetime::monotonic_timestamp
+datetime::monotonic_timestamp::from_microseconds(const int64_t useconds)
+{
+    return monotonic_timestamp(useconds);
+}
+
+
+/// Constructs a time point representing the current monotonic time.
+///
+/// The monotonic clock is independent of calendar clock adjustments.
+///
+/// \return A new monotonic time point.
+datetime::monotonic_timestamp
+datetime::monotonic_timestamp::now(void)
+{
+    ::timespec data;
+    if (::clock_gettime(CLOCK_MONOTONIC, &data) == -1)
+        UNREACHABLE_MSG("clock_gettime(CLOCK_MONOTONIC) failed");
+    return monotonic_timestamp(static_cast< int64_t >(data.tv_sec) * 1000000 +
+                               data.tv_nsec / 1000);
+}
+
+
+/// Returns the number of microseconds since the monotonic clock's origin.
+///
+/// \return A number of microseconds, unrelated to the calendar epoch.
+int64_t
+datetime::monotonic_timestamp::to_microseconds(void) const
+{
+    return _useconds;
+}
+
+
+/// Calculates the addition of a delta to a monotonic time point.
+///
+/// \param other The delta to add.
+///
+/// \return A new monotonic time point at the resulting deadline.
+datetime::monotonic_timestamp
+datetime::monotonic_timestamp::operator+(const datetime::delta& other) const
+{
+    return monotonic_timestamp(_useconds + other.to_microseconds());
+}
+
+
+/// Calculates the delta between two monotonic time points.
+///
+/// \param other The subtrahend.
+///
+/// \return The difference between this object and the other object.
+///
+/// \throw std::runtime_error If the subtraction would result in a negative time
+///     delta, which is not supported.
+datetime::delta
+datetime::monotonic_timestamp::operator-(
+    const monotonic_timestamp& other) const
+{
+    return delta::from_microseconds(_useconds - other._useconds);
+}
+
+
+/// Injects the object into a stream.
+///
+/// \param output The stream into which to inject the object.
+/// \param object The object to format.
+///
+/// \return The output stream.
+std::ostream&
+datetime::operator<<(std::ostream& output, const monotonic_timestamp& object)
+{
+    return output << object.to_microseconds() << "us";
+}
diff --git a/contrib/kyua/utils/datetime.hpp b/contrib/kyua/utils/datetime.hpp
index 0c24f332f6d3..83ff866dc9c8 100644
--- a/contrib/kyua/utils/datetime.hpp
+++ b/contrib/kyua/utils/datetime.hpp
@@ -38,6 +38,7 @@ extern "C" {
 #include <stdint.h>
 }
*** 740 LINES SKIPPED ***

From nobody Mon Nov 23 05:57:36 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXwFt1Gpnz7210l
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 05:57:38 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXwFs12hYz4WHm
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:57:37 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795413457;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=GG+HdH2B/oq9/yfhpvqUxlGETNdx1937EG7DQIOhW0w=;
	b=b0LQXK/8LOrsVOxZcQZJA4rUwK2CGFZC7DCq3hyqh0/Jv5ukBR73hTC3jMbvRFaBT+KRJ6
	72L0aIOvktRdpNTQEdnCMoYTegYh/nsxPpjKSwTPzh2Duvk+pEZI5IV6yRvJhmKyUh4iXh
	n/rA2QcBHFrTKvOWB/+ddAefy+EbzokmdyDhWGL8JjSXLWGm3tKZVJylAY7MBLGTYm+xWo
	Jfuw8whKINfdLCzxAWSmXHYpKBabkyGI0GM/R6OP4E3G/H4yYPzGOhzXKLRn9lCxtuG+Fx
	wPNqdtKmcvxFMzC6FkyfgmVMAWzlUpJ20sVbtLW6Mw5X92EKYnXhbS0dBPTSgQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795413457;
	b=gCOe1lF0RArqrNia1q6rcxMA6kl94tttivb8QHk08stJqOjPV41lNDVXPQOK/ibnb0kKdi
	yMLLnRyyQkKHMdqMKwi9/CkEXs43tQYzqcEM48/YNpQoIz2nkZZ4PcJAhK9JaQXzqAeuC9
	LdgGWl0LARAe8ByOAjGndyie0V9K5u/bwHQUKPixeFBlaJ6AWVml5cPQCq9c927FeWJUAw
	v8KB/sTMcrY0U9v6R2qs4hp6uqgEpkYTQ6n82E9JSbvyO2crFswLLxZDe2bvxHdhiyIic1
	MGexacAT/q3mjge5/h8fCpLoUcfqHUfqPGlQqIzyHFM+5It49F4xRUeBVF8Hhg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795413457;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=GG+HdH2B/oq9/yfhpvqUxlGETNdx1937EG7DQIOhW0w=;
	b=iGVe5ZWq5lrQVjrHCu4LL+FfaweUmJJfupCvbEGAvxDxBlXfntT/mMaKqbjKLw4hSIY7dK
	IwL/H0GlzT+rqS/uUoD8suRMunOWRcvb78QiINBk0ZunhUALIlLovVkb28i4XiZNS5DfQt
	krNDf2UaDEgNx+gdhmf/3BkDtRFh+xN8Vtw6KQ+4vadB4UDw9+foRjDYCxaI+KX8RoM6gX
	aZcd0Pag3FMDpL3+6Xn3e/bUbiaIeaPJzHAKgmpwBNgpApcZdXj1SA19f4zqwqB81kBjxV
	kMXAKZtqWSDFVfwpoYNywcmQsnx8O5Lt0PpQwrnLtgzsBYEXWyEqC10lz1e0ww==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXwFr6hN2zdwg
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:57:36 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1e1e9
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 05:57:36 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: e39fcd57b839 - stable/14 - tests/sys/capsicum: Fix -Wshadow issue with `fd_set`
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: e39fcd57b83900a8fc7bd17709516f5fd7738f40
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 05:57:36 +0000
Message-Id: <6b03d5d0.1e1e9.3b396c77@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=e39fcd57b83900a8fc7bd17709516f5fd7738f40

commit e39fcd57b83900a8fc7bd17709516f5fd7738f40
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-11-10 05:17:26 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 05:50:29 +0000

    tests/sys/capsicum: Fix -Wshadow issue with `fd_set`
    
    `fd_set` is defined in `sys/select.h`, and prior to this change, was in fcntl.cc as well.
    
    This change renames `fd_set` to `fd_set_` to avoid the name collision.
    
    MFC after:      1 week
    Reported by:    gcc 14
    Fixes:          04c4b2084eb9 ("capsicum-test: make the code WARNS=6 clean")
    
    (cherry picked from commit a479301abb2c7b384f574fcc641e502f70654835)
---
 tests/sys/capsicum/fcntl.cc | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/sys/capsicum/fcntl.cc b/tests/sys/capsicum/fcntl.cc
index 1ae33c2e051e..a9349b153cdc 100644
--- a/tests/sys/capsicum/fcntl.cc
+++ b/tests/sys/capsicum/fcntl.cc
@@ -332,17 +332,17 @@ TEST(Fcntl, FLSubRights) {
 
   // Check operations that need CAP_FCNTL with specific subrights.
   int fd_get = dup(fd);
-  int fd_set = dup(fd);
+  int fd_set_ = dup(fd);
   EXPECT_OK(cap_fcntls_limit(fd_get, CAP_FCNTL_GETFL));
-  EXPECT_OK(cap_fcntls_limit(fd_set, CAP_FCNTL_SETFL));
+  EXPECT_OK(cap_fcntls_limit(fd_set_, CAP_FCNTL_SETFL));
 
   fd_flag = fcntl(fd_get, F_GETFL, 0);
   EXPECT_OK(fd_flag);
-  EXPECT_NOTCAPABLE(fcntl(fd_set, F_GETFL, 0));
-  EXPECT_OK(fcntl(fd_set, F_SETFL, fd_flag));
+  EXPECT_NOTCAPABLE(fcntl(fd_set_, F_GETFL, 0));
+  EXPECT_OK(fcntl(fd_set_, F_SETFL, fd_flag));
   EXPECT_NOTCAPABLE(fcntl(fd_get, F_SETFL, fd_flag));
   close(fd_get);
-  close(fd_set);
+  close(fd_set_);
 
   // Check operations that need CAP_FCNTL with no subrights => ENOTCAPABLE.
   EXPECT_OK(cap_fcntls_limit(fd, 0));

From nobody Mon Nov 23 05:57:39 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXwFw0kD3z720xJ
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 05:57:40 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXwFv0q6wz4WQb
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:57:39 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795413459;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=SVv5SZDC8awk2TOyT0m8XkWwnF+9pPpTc0OCn7N+qBY=;
	b=KHUhK0LtTLnWhwQdnz6ZHDaR6TVMrsYbqA4h/COQVIpDBEHsc5TZVDTndETF7kpQz8qOj5
	vuJVC/gE5sw+BZEGtT2nKMdYh8pz/6u6j39tFaIsF07ug2XNVrP2Trwo0Ymwy4XiiVWxwc
	WojiW7j4gNo8rh+Ggrx2hUyxy2M+JPlXEW6qb+MBafpPIwr9BrsoXoRZqoXupx7rQfgj8/
	nbH+JX0rEsBkbjSipOz0vG9GzukExpSEEiPMTeyvd8wyQZvIGW1CaojxzeiIIVvA3vc4il
	vFlKGpqdD7yCgQ6EzLycM5zNK1LmlJJwB1yD6AQ5JVatw10LQXDqVRo16NSF5g==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795413459;
	b=pPp6jK5MaOhJL060L+I9zKdjxdHIq+OLbIHTNsbVqzPd0rViLawMQ2cnWyZb+LID63qfbo
	p2Woad2+o+PBCqDeQxeC36KoUes45tpMyhqUkqMnVaugX86TvkzW9OPz+jb8xYVFQ4DcXD
	hMmQ6VoIqiW+68o/U8AaqDzhWRGslFskh+t0mfRaBf6ppNZjRN0zLj6vp2a5zdFejzK8ZW
	Dc++o4a1KzYv5nxuYzFyDU/hweS3NOTD/ymMMQoTD9bumNOkcL4ftkZMXRemBvbe+W5M6G
	Gqm8TtCXKOOi+R1kiDMVwp/CsrS1J0imdOwPhuPziTgAJ1kS2/N6U9+MLsscjA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795413459;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=SVv5SZDC8awk2TOyT0m8XkWwnF+9pPpTc0OCn7N+qBY=;
	b=CBbZfZjo9FPbXPrUgjBK072kZOhSWGL/hpfXp97AACz7NOTH8Z4n6lVa1rw1CqfGLqXPvX
	IVtiuEOiSdA00Z/HFRvTRWkH34034W50f8S35zRsHc5nDan9BJ5hBdrA0yzx/469xEnz/n
	otTrLiUcfwN1Odv/6uTszGIIH1cPIs4uHFCxGhJN39wlpaU6KAX+e0wzhCLuSIt4XzqVjk
	20earfNbDBoKz9gTm24GKSUrXypXsg7ARO1vxrMrFoQHykfHpcs9E5hkeNubg5xfc73kwC
	VK7+Blj4bGUrcC1aU/+7fQ6eABTYorvBs4iDTZcLrkUmLkH+UE9JYmMh1ixpeQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXwFv0LGYzfM5
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 05:57:39 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id a2b
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 05:57:39 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 70a30af2e0f2 - stable/14 - contrib/kyua: update config.h for 0.15.1 -> 0.15.2
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 70a30af2e0f2e9ad5896077d221f8190dd2fe1b7
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 05:57:39 +0000
Message-Id: <6b03d5d3.a2b.66d3ac0f@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=70a30af2e0f2e9ad5896077d221f8190dd2fe1b7

commit 70a30af2e0f2e9ad5896077d221f8190dd2fe1b7
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-11-20 00:03:26 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 05:50:29 +0000

    contrib/kyua: update config.h for 0.15.1 -> 0.15.2
    
    This was accidentally missed in the prior commit.
    
    This commit addresses a largely cosmetic issue.
    
    MFC after:      6 days
    MFC with:       c16da33701d0
    Fixes:          c16da33701d0 contrib/kyua: update to 0.15.2
    
    (cherry picked from commit d9daf5ae796518af1793f919156fb6feba05959d)
---
 contrib/kyua/config.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/contrib/kyua/config.h b/contrib/kyua/config.h
index cccfe36ae3a2..d456545697b3 100644
--- a/contrib/kyua/config.h
+++ b/contrib/kyua/config.h
@@ -122,7 +122,7 @@
 #define PACKAGE_NAME "Kyua"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "Kyua 0.15.1"
+#define PACKAGE_STRING "Kyua 0.15.2"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "kyua"
@@ -131,7 +131,7 @@
 #define PACKAGE_URL "https://github.com/freebsd/kyua/"
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "0.15.1"
+#define PACKAGE_VERSION "0.15.2"
 
 /* Define to 1 if all of the C89 standard headers exist (not just the ones
    required in a freestanding environment). This macro is provided for
@@ -139,4 +139,4 @@
 #define STDC_HEADERS 1
 
 /* Version number of package */
-#define VERSION "0.15.1"
+#define VERSION "0.15.2"

From nobody Mon Nov 23 06:20:02 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXwlk6tQ2z722rP
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 06:20:02 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXwlk3Qhwz4c6P
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 06:20:02 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795414802;
	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=FnO+Ot5L4NReNmhRL41i+2V2E77NbJAOQF76bn0rY2U=;
	b=IzB1l400Fzp2HjQRudVL9qgJf7Z1H0lvvLHZ4RjMCNlavA/uQ5R8gLW9++rD0MWDRsqkE/
	hvaUNskZtGDi1vGlXq2SUxvlAYDPqL+TaXEx8pbAlBcQTDAeWPeMFm1utzMPG2ogXebtmO
	EHvrxQBRXSBWdXeaPpSizGV/7V58OG8FiVdPSXx/gUUUkDqTaG5dR7w/AzpsEeZ6uf+oBM
	gWUsIwhnorArhnvqsovgh+bfPo1p9giZQNOiR08+VgXYV977BIeZncPLJcrC0bqeifOP6h
	72u+vIc2sHQ5e/TVBpA98UqDy2Ypg+hhDmimMMwDMYw31Jg1KgG21EaW4EJTMw==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795414802;
	b=SKZRldMqd6qCplMLVLgneqZ297+xuuxx5KtuLXn99ad7wIxwm6kBh/+22iorwVGrHNFVze
	UlojqMmwlVGlb3rBi9/II0Z+I7pxAyZ9AlZK2rlzzEmP6R7rTVtZuDc5qL8Lr43AOdrexz
	arg6naFj++nfNAl7n2sv1lNsAHj0l/kzXKwHijObtucNpIsGeIH1W4jGQJc+YoWJxAFPro
	+nF1fyVyrG+jGovn68WHgRqJuK2KPMFS0CFd+LqVv1Sf2quFVkE69PzzNEb4R81aJLl/lB
	e3zmtIzjxMzbodw84HTsvXQgEUOdCyua8/etW4OKnuhdyCd8UiDuB9s/g+Q6EA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795414802;
	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=FnO+Ot5L4NReNmhRL41i+2V2E77NbJAOQF76bn0rY2U=;
	b=JUw575glJ6xCb5bdzR168FAgp/ItEbkf3kL/+Yenjw+O7kCincPY2W7b0upWA0eAhUHsYC
	MDYZFGHn9KBwzUO7PKQ3JNe9QxOKFU3TBVC4A6SjR3ik7iztUQq/Yeq2o8pPb2sbrDsekc
	vZqdBBTSPUURDc0UDnttCyiR/MzjEmCb8d66WA/Kfup54cRqOX0NCz/uxfAMuLfEPI5jbt
	b0uxi39NOTBxEH/IetdKkYDuXOhgXkZ6erRkUfrXmND1UmIli8cTTylO5aqLt2yTDJFmSD
	5k7nxX1CxEK2S15X/Dil0IgSfmDhOkOI3yhZ9xDNT1bygVo70oqVahZXd9jkMw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXwlk2Cy8zfvb
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 06:20:02 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 13e4
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 06:20:02 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Igor Ostapenko <pm@igoro.pro>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 806d881109aa - stable/14 - atf-sh: fix comment typo
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 806d881109aa0228752900fe33f997792a49a984
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 06:20:02 +0000
Message-Id: <6b03db12.13e4.1a8517b3@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=806d881109aa0228752900fe33f997792a49a984

commit 806d881109aa0228752900fe33f997792a49a984
Author:     Igor Ostapenko <pm@igoro.pro>
AuthorDate: 2023-12-26 23:21:54 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 06:19:00 +0000

    atf-sh: fix comment typo
    
    Signed-off-by: Igor Ostapenko <pm@igoro.pro>
    Reviewed by: imp
    Pull Request: https://github.com/freebsd/freebsd-src/pull/895
    (cherry picked from commit d4d14d965fb92d2bceb744be41310dc47f27ab80)
---
 contrib/atf/atf-sh/libatf-sh.subr | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/atf/atf-sh/libatf-sh.subr b/contrib/atf/atf-sh/libatf-sh.subr
index ae73be2f5907..35810a63bae3 100644
--- a/contrib/atf/atf-sh/libatf-sh.subr
+++ b/contrib/atf/atf-sh/libatf-sh.subr
@@ -383,7 +383,7 @@ atf_require_kmod()
 #
 #   Sets the test case's variable 'varname' to the specified values
 #   which are concatenated using a single blank space.  This function
-#   is supposed to be called form the test case's head only.
+#   is supposed to be called from the test case's head only.
 #
 atf_set()
 {

From nobody Mon Nov 23 07:39:02 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXyVt2kw4z72ByM
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 07:39:02 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXyVt288kz4k8X
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 07:39:02 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795419542;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=RQ23kWUm+uGIeYl3yHDHEantYDFOnURoDL0GgZ29ZuM=;
	b=yFfEpMFell5yCDIxtmlCWMNWJnS2aPhuOy7Vdbrn6itSPcfKnBqZipzKz0DLTV9j9cpaU0
	JRfiq7oT+QPiBVDBN5gLBIx1+aiHYQsm/Mh3hnkFr43k14VPEzQ8YxkzA0oQeutG969YUo
	6Grr5sLl6bJv8nDiyKi3LFGuf+OElL/+mDQOFFPfEfRAUVr1E2DE8FA1dIyQ+qV6jLL7ar
	4rElt4R3NwPHz2Qyn4YOJ0W3gmOwGMS4PkImScG78HSvPjciZrkJ3TTSPK8kEXB9U+TA3X
	0n9GVNgJm8OawswccXV7tnGTgRBX3wxbBrjv+Jcn76ENXLXC6N+ISImnp5qNIQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795419542;
	b=gKByIjGxkFYcFKI3BeUJ7UVT+OJgyggJSb3pQihzY0X/P/Qy7T5DyAbgIWwiArLds9AbbZ
	iFrKzjMBY+TLmfeT+Wh2UYh3RB6X0kcnfvnGnYrkWbaTA4gwpqhX5j+I2+EpigMMTfAOUh
	kVWJR87wj0r84PI20N8jE0yoCI392RsX9fftypAcuGEgnCaT51lvqgIngCLh0NbgPmFmC1
	BYM/dBuUNISiyqns8Kska8YhyFDfodXFtxQxddtSeKi/ySG3VLnnEb020rB694p17hmguM
	QqWfIGvuEGBbrKn+Cgj2wW8+ycwcS4pOTeb8d0Lsx+SxYD8QexXODH+2sTvbiQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795419542;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=RQ23kWUm+uGIeYl3yHDHEantYDFOnURoDL0GgZ29ZuM=;
	b=ZdVsumNjNhmZwzhunr2Ck5qBUAw+b1EcrnYj8elu2idlFtek72Dr3rAuh3GcXg3ZvGI7dK
	vXcFMF8sDqHMRSfj5abwXkfnn4utmapwcZFXIsIES1ZJlAN2US7hYy9+0uadAVnIXr4o9L
	nc4ZvR9kyqMq/RilS+qg1/Rw5GcgsrZOCyMEucmoRAZelzjQOuTCGnb1MJQxurye22Etaj
	bI4llQ06DiPYc84gr+DrH6pyYphs7j/C+ht10z2aytYKLS35meahlAwSJ4Cp0lS6eV12KJ
	i3S1YX8oxTShC5NDvN+bpxDZWW4wPNnnu/m89RUgutBzqQsonIgO4wDNg8BMzg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXyVt1ptTzhqJ
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 07:39:02 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id ba00
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 07:39:02 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Olivier Cochard <olivier@FreeBSD.org>
Subject: git: a343fc0ad029 - main - tpm: crb: Do not attach when no CRB interface answers
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: olivier
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: a343fc0ad029ad569919c8d500f72566acf9b66e
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 07:39:02 +0000
Message-Id: <6b03ed96.ba00.446f06ae@gitrepo.freebsd.org>

The branch main has been updated by olivier:

URL: https://cgit.FreeBSD.org/src/commit/?id=a343fc0ad029ad569919c8d500f72566acf9b66e

commit a343fc0ad029ad569919c8d500f72566acf9b66e
Author:     Olivier Cochard <olivier@FreeBSD.org>
AuthorDate: 2026-11-22 20:41:26 +0000
Commit:     Olivier Cochard <olivier@FreeBSD.org>
CommitDate: 2026-11-23 07:33:46 +0000

    tpm: crb: Do not attach when no CRB interface answers
    
    Some firmware describes a CRB TPM that is not there: a Protectli FW6
    with coreboot 4.12 publishes a TPM2 table at 0xfed40000, but no PTT
    answers and the Intel ME interface is absent too.  Every register
    reads all-ones, so attach failed only after 0.6 s of state timeouts,
    with ready, idle and locality messages that hid the cause.
    
    Check INTF_ID once, as tpm_tis12_probe() does for TPM 1.2.
    
    Reviewed by:    kbowling
    Approved by:    kbowling
    MFC after:      1 week
    Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/128
---
 sys/dev/tpm/tpm_crb.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/sys/dev/tpm/tpm_crb.c b/sys/dev/tpm/tpm_crb.c
index bf0ff1bae9d4..e846eee8196c 100644
--- a/sys/dev/tpm/tpm_crb.c
+++ b/sys/dev/tpm/tpm_crb.c
@@ -433,6 +433,15 @@ tpmcrb_attach(device_t dev)
 		return (ENXIO);
 	}
 
+	/* Firmware can describe a TPM that is absent, e.g. with the ME off. */
+	if (crb_sc->has_locality &&
+	    rman_get_size(sc->mem_res) >= TPM_CRB_LOCALITY_SIZE &&
+	    bus_read_4(sc->mem_res, TPM_CRB_INTF_ID) == UINT32_MAX) {
+		device_printf(dev, "No CRB interface at the ACPI address\n");
+		tpmcrb_detach(dev);
+		return (ENXIO);
+	}
+
 	if (!tpmcrb_request_locality(crb_sc, 0)) {
 		device_printf(dev, "Failed to obtain locality\n");
 		tpmcrb_detach(dev);

From nobody Mon Nov 23 08:39:59 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXzsD1HqQz72K8j
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 08:40: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jXzsC6crcz3Brh
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 08:39:59 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795423199;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=EsEDrIGISC7SzmEv6yY5lu5FHwmRGHRHoDa86opaig0=;
	b=vVrDzyXnF5SV50XlRlx3kuUSNY9THQJ9/gTc94dXjzOqTUCXcuaFP07H1pncY2yq5Qvwem
	cR8Q7BitMjdX7lvZLDyP3pZSrODVhnLgno7NJzThDmFPWPhbbPcdvYl+erxs/UCtgq3ldh
	1ObvrYeMz6H8JzEe5PKepDbR1stit5CPjGbytY6valMJ3FXYpe5J97OQf+irXG12oDnBiy
	9/VYUQpvnqr/rZ8ckK6dzL9gfPQdiYuuSP6ACTOscyQTfFcsdsjE4A351NLcjIhP2pqDcA
	Kv8sN6P3dBQrZHohdhtBP6zKQQDEwhq0VICB2ayfQJnf1YZrvZxXcPK0J7D/sQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795423199;
	b=ueuAb8ngwgUTspancGzPQ3gSVxSDAO+OI6K4BB0uVo5VPgtZdcAoqNOzPrpCkZL2lYWfQB
	p7GYF90fMyW3REBM61aIDxHvhMvf/dk4+BU0/jQilyRseegMIHMWfSmKe1ummEt4IGY3nr
	sY3ZkL8iOYL0ejGesEBaMJBDBuOisEk1xkIOJbb1bgKueqo8SCZsuAnF4rcAh5sW9Nt5h1
	kC1alwhnYfmd4EwKONfwiH8t6oQ6spRPeFDTAHF0yC4a9Uv3Jj4ArF3/jdvc7RkvIZDFtu
	MDJdp1S4BUjMkx9ZInpcuAdS7kZfhp12kBVi1qjArF/AZOGMDsHNew5i//DMSQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795423199;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=EsEDrIGISC7SzmEv6yY5lu5FHwmRGHRHoDa86opaig0=;
	b=dYKLXIrzIIyDzs2n6b3wUeDU68OJ6wMWcZFK+WkWIDiQmkW4P+iJi4M8RKeoCFi4gTTdP+
	M+9W5pa4I8t9Qpkmh0UrXfU6i7Rnh9YVtyjCSGV6U/vLb5wQmlTsAZlnVdeXjjkT1zD0St
	GSGzbjBWDydxGJRPjJAyBvfkPhrL44rSFH1zup6tLd8E/6kLTY6NAAtSCqcTyrYORuwKjA
	ApOQvkT69kNhlFYTQaKgM4FkesmRLVksKyZJhe/dKUAa2BlUUiKiYpoz94/ttHM828ek+Q
	U0yPQB8qlOFfvAxZ19CXOWVU7UGzUPGOC8rNYsE2Jwjxp1CtduaMP9UOVKtnWw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXzsC4YqjzkLq
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 08:39:59 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 10ca9
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 08:39:59 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Piotr Kubaj <pkubaj@FreeBSD.org>
Subject: git: 53a850a0d75f - main - tools/build: also stage machine/cpu_flags.h on powerpc
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: pkubaj
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 53a850a0d75fa6621be525a79ad821fa4b47e069
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 08:39:59 +0000
Message-Id: <6b03fbdf.10ca9.5b4aa6bd@gitrepo.freebsd.org>

The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/src/commit/?id=53a850a0d75fa6621be525a79ad821fa4b47e069

commit 53a850a0d75fa6621be525a79ad821fa4b47e069
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2026-11-22 11:03:13 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2026-11-23 08:39:49 +0000

    tools/build: also stage machine/cpu_flags.h on powerpc
    
    powerpc's machine/elf.h now includes machine/cpu_flags.h, but only elf.h
    gets copied into the legacy include directory. Building world natively
    on a powerpc host that doesn't have cpu_flags.h installed yet then fails
    in libllvmminimal.
    
    Reviewed by:    jhibbits
    Fixes:          90bc40e26c61 ("powerpc: Split CPU flags into separate file...")
    MFC with:       90bc40e26c61
    Differential Revision:  https://reviews.freebsd.org/D61920
---
 tools/build/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/build/Makefile b/tools/build/Makefile
index 90fb93a5196a..467bd576c758 100644
--- a/tools/build/Makefile
+++ b/tools/build/Makefile
@@ -174,6 +174,10 @@ _host_arch=powerpc
 _host_arch=amd64
 .endif
 MACHINESYSINCS+=	${SRCTOP}/sys/${_host_arch}/include/elf.h
+.if ${_host_arch} == "powerpc"
+# The powerpc elf.h includes cpu_flags.h
+MACHINESYSINCS+=	${SRCTOP}/sys/powerpc/include/cpu_flags.h
+.endif
 .if ${_host_arch} == "amd64" || ${_host_arch} == "i386"
 INCSGROUPS+=	X86INCS
 X86INCSDIR=	${INCLUDEDIR}/x86

From nobody Mon Nov 23 08:59:38 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jY0Ht410yz72M5J
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 08:59: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jY0Ht1Gvmz3FDD
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 08:59:38 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795424378;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=larTWCp5N65++0i8dtZra/nTxaewNcRwxYCgLczDWKA=;
	b=CEw6ugPfTqfHqEwT5f0DVEg9RrUgpvPnWVPu0dnpA/fyuJT80UM98uEXKsPXonzlP9nHPM
	25SYE8LDGrfacvAjGm3Hbxe0MC969dVXK8IKmEaBMSDfdBK6Qz0zNlRZI3UQfVyos1XghT
	JF0gZLUOLBZr+HzG74I9hJ+VB0mhno4HzYhrupABUxC9JxFwJQRcdCBXExj5wKCXhT5mh/
	hTitmwR90WOcM4Ptw9W6yqPtrLaQ/MYp8XBxChqS3jEOD+uUXA+fEjUoRZJ3v/aecT0kbg
	RxQY3EjEj+lAFhkfITJJ/q+Syb6Lrr/xksy2Ma4MCRFFWUqVk84u2kp25iUGwA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795424378;
	b=ErfZnkxmSfWcprWY4FIMETS9F914jDemP08Df05u8An5VsMOYOXnMzVyhkgbXSTQ9qONW4
	Ee1nHU2Cu/eovMeN18Yk0R1+sTwCvs22aabyH5jwCgwvQ9kle1DPles3S7NfVrEi0TXcHJ
	gwWOfWigpLPH16+mz8a9Aq2sa43/OTlprnlRTBkU9senMVh97grdP2nkuaI2kx+T94fZmk
	qX1LPYUFSx6FQgKSpy376sXkwfG4a5ervRzZG6DXActL6k1geo2Qs7NwxXBEdZOSX62y16
	d6XyLMj6bCAku8epHaIj/XEVUNQEfPCmAnaHVJGGCU3/m2w1s557GRKjZL22PQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795424378;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=larTWCp5N65++0i8dtZra/nTxaewNcRwxYCgLczDWKA=;
	b=QyaoHgGBQMJy2kaf6RGHVWjSpJvmYDofJKMANFYu6j4lWmWDHaZSDn0c/95BJ38gL3IPOg
	lX/ibuXAi1Ky+8YG0LC+0lI/tGx4Qpu6IMjgMrmvvNRg1rbxPx1b0g0GLpqDaEYp05vg+s
	zLwzntesKuCeCKUEbyyvdmnd78R0lcu/egzAyW9KYAa4mVaKYuVQ1QUVSwfMqV1fhnfIsE
	wu6MpD+pR4YVPpXuwMS3w+XwqwwfyoZXoU1lEVswqMzqFHU3WME82jpZpAww/rpI2IzCA9
	H5UmGDZ3jdJLZfV24ELTgNDrrvI51ffqP4PB9YllKEjZEX7ludhCiJJn3QkUFg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jY0Ht0xJDzlCt
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 08:59:38 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1340d
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 08:59:38 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Olivier Cochard <olivier@FreeBSD.org>
Subject: git: ced5806515aa - main - pci: Accept D3hot in pci_set_powerstate_method()
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: olivier
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: ced5806515aacf17ec29a353edb0b86f8b8b4e40
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 08:59:38 +0000
Message-Id: <6b04007a.1340d.39b3baf3@gitrepo.freebsd.org>

The branch main has been updated by olivier:

URL: https://cgit.FreeBSD.org/src/commit/?id=ced5806515aacf17ec29a353edb0b86f8b8b4e40

commit ced5806515aacf17ec29a353edb0b86f8b8b4e40
Author:     Olivier Cochard <olivier@FreeBSD.org>
AuthorDate: 2026-11-15 13:35:15 +0000
Commit:     Olivier Cochard <olivier@FreeBSD.org>
CommitDate: 2026-11-23 08:53:57 +0000

    pci: Accept D3hot in pci_set_powerstate_method()
    
    Since D3 was split into D3hot and D3cold, PCI_POWERSTATE_D3 is D3cold
    and the switch rejects D3hot with EINVAL.  Devices whose _SxD is 3
    (D3hot) then stay in D0 on suspend, and acpi_pci skips their ACPI
    transition.  LinuxKPI pci_set_power_state(PCI_D3hot) fails the same way.
    
    The PM register has a single D3 state, so write it for both.
    
    Reviewed by:    kbowling
    Approved by:    kbowling
    Fixes:          84bbfc32a3f4 ("acpi_powerres: D3cold support")
    MFC after:      1 week
    Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/111
---
 sys/dev/pci/pci.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 35f8e1154d6c..a95ace27d122 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -2891,10 +2891,12 @@ pci_set_powerstate_method(device_t dev, device_t child, int state)
 	/*
 	 * Optimize a no state change request away.  While it would be OK to
 	 * write to the hardware in theory, some devices have shown odd
-	 * behavior when going from D3 -> D3.
+	 * behavior when going from D3 -> D3.  D3hot and D3cold are the same
+	 * state in the PM register.
 	 */
 	oldstate = pci_get_powerstate(child);
-	if (oldstate == state)
+	if (oldstate == state || (oldstate >= PCI_POWERSTATE_D3_HOT &&
+	    state >= PCI_POWERSTATE_D3_HOT && state <= PCI_POWERSTATE_MAX))
 		return (0);
 
 	/*
@@ -2910,7 +2912,7 @@ pci_set_powerstate_method(device_t dev, device_t child, int state)
 	 * this function can be called from contexts where we cannot sleep.
 	 */
 	highest = (oldstate > state) ? oldstate : state;
-	if (highest == PCI_POWERSTATE_D3)
+	if (highest >= PCI_POWERSTATE_D3_HOT)
 	    delay = 10000;
 	else if (highest == PCI_POWERSTATE_D2)
 	    delay = 200;
@@ -2932,7 +2934,8 @@ pci_set_powerstate_method(device_t dev, device_t child, int state)
 			return (EOPNOTSUPP);
 		status |= PCIM_PSTAT_D2;
 		break;
-	case PCI_POWERSTATE_D3:
+	case PCI_POWERSTATE_D3_HOT:
+	case PCI_POWERSTATE_D3_COLD:
 		status |= PCIM_PSTAT_D3;
 		break;
 	default:

From nobody Mon Nov 23 09:04:40 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jY0Ph5dXfz72N5p
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 09:04: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jY0Ph4cnDz3Gwn
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 09:04:40 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795424680;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=PUnArvdeaO05xpKIEvluBqRbHPPSf4Wmeftv20/9NmY=;
	b=JIB168K/nzoCglmAMYQICLadnaejIu1lMFdW28qoxmUj1l3dSpmajPMiBBYivOXlCa4yBj
	j3xn8j4vURmj64Jatfs+rf46eO8V/fl6gFcM1kcdgKYiWmr8r0LpwQjDR/yJ8HhPMSbqJG
	aYXF2y/BVJGH1Rv5YiamSOuD2VHkRZ749DFUqA3RuRU8tHCmCdMxShqY+A9laifWP2SitZ
	9iAA6CqnMwlyLKmhIeH8GmdGnM22g6MzXiOxRqHpUZPo5P5i+siCiBblzbgSyvZdG7oCVL
	cDC0G5cJDYeWATphghEpOA0seIu1WP78v9a+sGA4LxrFEg9w/53kG6w1/t5J9w==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795424680;
	b=V4MenH/Y5xv8g+/B102uM0qs67l1QbC04vfcobC/F/6va3pFhSVoVFY0+5SgnEEuA4W6HG
	NuhfuYHHuzGCwqjO6eeFy6fEaqhZAIVb166QttZui1Ll+f6metxZTYl4buwn76Vx0D6GtM
	EziK5D42qaj3tP1nmX67pK73U6awMrWC+Yn1WsBGSKsDXLE1GazV8paAyyY+8UtWaV+plP
	yrzk4Gq8z//xVLRq8PekG83sQJbyL7Qc+FG5SS5EPbyM8LI5qdhkRegeGgwxE3b/6bT5km
	/Wjo9alWhhXx/rnxDIUuGuuiWnjDPOxkaN3Znch2VLIxSDafQqENeHeVIUiUtA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795424680;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=PUnArvdeaO05xpKIEvluBqRbHPPSf4Wmeftv20/9NmY=;
	b=q16h0fFo44sYzCFEd4zOHydQYqOhs/5aGuhB19kIkWfO3HTl1RNyRlrOhhHchdKafd5/pc
	WYtYsCH1N8WllCsC7ZgsuXLVTECWXAvnmF+dd3qV0bqKPDjGxlFpwWdVgswlq4o4ic+LzZ
	ed+FyaSH/5+2KzvtETMHyGLV7cqv/cMG3NTEhUPbjFA1IxxgqCInookSp1ee8vDmNbuE2+
	RiO1/sdp2QliskJA+BgTwrdBz5zOr/GTJeOHkFlrHcA+OgKJlfbVmclxl7RUg5CDOhSD7M
	ZWCI978X5qikVBGKYiRl9BUo78nZfIHgBi+TsgrI4ysna+soAS9U4qAtSVJ/Qg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jY0Ph40CHzlhj
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 09:04:40 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 14d04
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 09:04:40 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Olivier Cochard <olivier@FreeBSD.org>
Subject: git: d34baf1b5ca0 - main - evdev: Map the HP mic mute and programmable keys
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: olivier
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: d34baf1b5ca05611515db76370b96abbea3988a9
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 09:04:40 +0000
Message-Id: <6b0401a8.14d04.51826786@gitrepo.freebsd.org>

The branch main has been updated by olivier:

URL: https://cgit.FreeBSD.org/src/commit/?id=d34baf1b5ca05611515db76370b96abbea3988a9

commit d34baf1b5ca05611515db76370b96abbea3988a9
Author:     Olivier Cochard <olivier@FreeBSD.org>
AuthorDate: 2026-11-17 13:35:24 +0000
Commit:     Olivier Cochard <olivier@FreeBSD.org>
CommitDate: 2026-11-23 08:58:06 +0000

    evdev: Map the HP mic mute and programmable keys
    
    HP laptops send these keys as AT scancodes 0xE0 0x01 and 0x68, which
    evdev dropped.  Map 0xE0 0x01 to KEY_MICMUTE, as systemd's hwdb does
    for the HP business laptops (EliteBook, ProBook, ZBook, Elite
    Dragonfly), and 0x68 to KEY_PROG1, as it does for the Elite
    Dragonfly G2.
    
    hwdb maps 0xE0 0x01 to Fn+Esc on the other HP models.  The AT table is
    not per machine, so Fn+Esc there now sends KEY_MICMUTE instead of
    nothing.
    
    Reviewed by:    wulf
    Approved by:    wulf
    Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/122
---
 sys/dev/evdev/evdev_utils.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sys/dev/evdev/evdev_utils.c b/sys/dev/evdev/evdev_utils.c
index bd3039c3b825..07ea01f31432 100644
--- a/sys/dev/evdev/evdev_utils.c
+++ b/sys/dev/evdev/evdev_utils.c
@@ -148,14 +148,16 @@ static uint16_t evdev_at_set1_scancodes[] = {
 	/* 0x60 - 0x7f */
 	NONE,		NONE,		NONE,		NONE,
 	NONE,		NONE,		NONE,		NONE,
-	NONE,		NONE,		NONE,		NONE,
+	/* 0x68: HP programmable key */
+	KEY_PROG1,	NONE,		NONE,		NONE,
 	NONE,		NONE,		NONE,		NONE,
 	KEY_KATAKANAHIRAGANA,	KEY_HANJA,	KEY_HANGEUL,	KEY_RO,
 	NONE,		NONE,	KEY_ZENKAKUHANKAKU,	KEY_HIRAGANA,
 	KEY_KATAKANA,	KEY_HENKAN,	NONE,		KEY_MUHENKAN,
 	NONE,		KEY_YEN,	KEY_KPCOMMA,	NONE,
 	/* 0x00 - 0x1f. 0xE0 prefixed */
-	NONE,		NONE,		NONE,		NONE,
+	/* 0xE0 0x01: HP mic mute (Fn+Esc on other HP models) */
+	NONE,		KEY_MICMUTE,	NONE,		NONE,
 	NONE,		NONE,		NONE,		NONE,
 	NONE,		NONE,		NONE,		NONE,
 	NONE,		NONE,		NONE,		NONE,

From nobody Mon Nov 23 11:35:26 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jY3lg2Mbhz72hLW
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 11:35: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jY3lg03NLz4PcZ
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 11:35:27 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795433727;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Pkfs0VzdBQVU5Wn1ah/JjcYnE4xos/RKBY9O1e/sR/U=;
	b=yKJ4eNH7nV2ff96f2eJSoxOZMXscourpx6MaRydTFTeIrnA+tR4b1Xjf0d0n7/rHB0u/8f
	BVfCyKeCnnxgBAHOxxsZL+namTgtrebL8ZWe/J4eC6dy7m3w4VhVGtlr8Ux12pJMpzqVBR
	EvN9RLukpAxaz5guWsIItINoFzG97yJD/4paIFNLUg6NNRodYYiGpC0t4K8L4c31vMjNCr
	JXGfOFDlLg4oWEOsyC4hsNa+41Cr+AW12WRzFA1Ft5bJEGnZehMgDolGBgW3ipwzUPI3gx
	G7vJYUCQ7+vp3J4yZsYn3bDga96s7dUKTM3BCB2/w/yCMMdyTw8PgBVgUM+cFQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795433727;
	b=QsUNRLmGMWSe/Ae07umuKv5E0XQ7unuMC+aBp2b6hKmwYTt8JgAsNZhswIQNT4aTQUjV8F
	sKSBOTlfuZ9CutZknxd/3pYfZFgaP7h3b633g1e+A2m8yzle2D3VFFufIikWejZZFJMYPn
	wlr0CQLcZK4bOX/rfoAP3GSO4EBYEKTzV7T001o01lzq5SosTa/5msuYZse7CDlD9Do16Z
	DYoeCz/HjJlmqT7FOMpQOEDWkimjKDf/bkBxpo0F9ZFSecXBns3CdQB/RbF4onTRt9rdx4
	aqWE/BaoqOqyH+W1Xi/figCeKCNXiDya7kPVg+3jrgQO/NbucXVnwRqSRj3pcg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795433727;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Pkfs0VzdBQVU5Wn1ah/JjcYnE4xos/RKBY9O1e/sR/U=;
	b=NaJQMjQonW+Xdu7JopZZXqLqVgG94giWRHDXA235UxTUWYhL9iS/BqwTgfTE0FHaQYZGwk
	XSxbmNboyN9/zjHy9aVgQfoYg2Ca2iIcsJZm7yWaV3V0w/348cEuOeZTbZ4xC7aC7qUrZ9
	8BQi+Hw/fM6XWxM9pCB6fclz/ZjKWuIxKKJcCX6M1FH/p3OpGIYX96jXTGkW6FJy6qo1n6
	ILJCvWEjVH2rptzJ0dnhMoULaF5Z0PBoiTI1of68G+0Q9PJCZcyMyCy2FmsTJUqe/sECnl
	LgFdGbjk/MPca9Le0b41pu7omtUXvINLFJerlw6bcgSmzAHz3cW37uJfD+WWMA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jY3lf6ZqpzqFx
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 11:35:26 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 23f06
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 11:35:26 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org
From: Martin Matuska <mm@FreeBSD.org>
Subject: git: 013c77e66e37..a1daebfec3f5 - vendor/openzfs/master - vendor branch updated
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: mm
X-Git-Repository: src
X-Git-Refname: refs/heads/vendor/openzfs/master
X-Git-Reftype: branch
X-Git-Commit: a1daebfec3f5ca46ac261ef339efdf0dbeae997c
X-Git-Oldrev: 013c77e66e37bc2ac54d8e0725e548d90e53d4b6
X-Git-Newrev: a1daebfec3f5ca46ac261ef339efdf0dbeae997c
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 11:35:26 +0000
Message-Id: <6b0424fe.23f06.7bbe048f@gitrepo.freebsd.org>

The branch vendor/openzfs/master has been updated by mm:

URL: https://cgit.FreeBSD.org/src/log/?id=013c77e66e37..a1daebfec3f5

40eac2370a8c ZTS: test dedup of an fsync'd block that needs more copies
f765c2d2b6f7 zio: don't write dedup copies from an override BP's data
4df26dbb0dfb ZTS: test a writable import -T of a pool with a live ZIL
9ac6648a22fa spa: keep ZIL claims relative to the loaded txg
b306edf42fcf Linux: log size changes and punches before dropping the range lock
0b790a1a8ed7 ZTS: refreserv_004_pos fails: its space limits are off
3d487ef460e2 CI: Let the labels jobs ride out GitHub server errors
f53b6403eadb Keep the local key where a raw receive brings a foreign one
7dcb3fec99d7 CI: install userspace build dependencies for unit tests
10a913f556d8 zfs-mount-generator: fix unit names of non-ASCII mountpoints
388efd09859a icp: call x86_64 AES asm through C wrappers
9bf4edda1a7d zstdcheck: allow __cfi_ prefixed symbols
f361ce7ca9bb icp: call armv7 SHA2 asm through C wrappers
b46584edc9ef FreeBSD: Drop some Solaris compat vnode macros
d0231ed54d95 FreeBSD: Drop some no-op Solaris compat macros
f14af7b0fc99 freebsd: prefer sys/stdarg.h where available
cdad5a50c6ee ZTS: test change-key key mismatch with a pool image
7101721781e6 ZTS: fix send_raw_inherited_key's license boilerplate
11650ab763af libspl: remove the unused sys/asm_linkage.h
b054fbbe51b9 Set fletcher4 fastest uses_fpu from both byte orders
1beab1666b6d zfs.4: fix the order of the fixed,N,M taskq values
603611e408d9 pyzfs: correct the snapshot destruction exception description
91bb4127d167 ZTS: verify full mapped AIO transfers
495cc5f52a6e dsl_userhold: free on-close state when the pool is unavailable
13793f3637d9 zpool remove: erase log labels once the hole is on disk
f211f2991090 zfs-mount-generator.8: fix errors
0c6a747de53b ZTS: use consistent host identities in concurrent imports
c554be5f9efe zfs allow: list receive:append in the help output
cb22f3260a62 ZTS: inject zinject_args read errors on every mirror child
396749c16bcb Kick the autotrim threads when autotrim is off
474b5926e2bc ztest: Discard the checkpoint before freeing space after ENOSPC
0b556d557394 ZTS: find a straddling block in raidz_expand_boundary_repair
6806a45aa912 ZTS: zvol_stress: no fio verify_async on FreeBSD
c979ead1561c ZTS: avoid rate limiting consecutive deadman checks
943e56a14683 ZTS: txg_sync must not spin on a suspended pool
8044ee28e911 Don't busy-loop in txg_sync_thread() while the pool is suspended
f5bf8be67aa5 zdb: do not close the spa twice when an objset ID lookup fails
d8fb64a4da92 ZTS: resume a send of split large blocks
dd4ea69bf5fe Resume a split large-block send at the saved offset
2a0d48453ba1 ZTS: toggle -L when resuming a send
d9c921299293 Keep received data when a send is resumed with -L
a59feb50d039 ZTS: test invalid clone names in channel programs
470e0e81f966 zcp: check clone names with clone_namecheck()
091796c3ba08 commitcheck: exempt all email trailers from the line limit
45cdb0d82aab CI: Reuse fork results of commits with the same tree
1ecb47c8abd9 CI: Wait for fork QEMU jobs still running on a PR push
e40f7dd98cac libzutil: wait for device nodes when udev is absent
290f71d7e352 ZTS: create crtime_001_pos's file without touch(1)
8025224a1eff ZTS: wait for synchronous zedlet completion
6072f908338a ZTS: create gang_blocks_special_fallback's files from one process
07fbed8233a6 zio: report ZILWRITE in formatted flags
7e5f2cd3b037 zio: retain device injection provenance
30f527e93ec3 ztest: add ztest_scrub_prefetch
7865f6b5f7bf dsl_scan: fix scan-prefetch shutdown race leaking stale queue entries
5511f46c92f9 ZTS: test -L embedded block receive onto smaller blocks
ece75c16ef6d dmu_recv: split WRITE_EMBEDDED records that don't match block size
e25bc5b83b0f Read the objset in the fadvise handlers after entering
fd7c3b733fd4 ZTS: make dio_read_verify's direct reads fail their verify
80690eabcaa1 Linux: don't use per-taskq kstats in the taskq summary
d3ce9e07de16 Linux: initialize tq_ksp in taskq_create()
781878c5a893 mancheck: locate the script in the source tree
1674b2126e65 ZTS: strings in fixed-size ioctl fields that fill them
f9fe597ff30e Terminate the string fields of zfs_cmd_t and drr_toname
dbd36c4f91ff CI: fetch source matching the FreeBSD image kernel
c913da86156e zpool-offline.8: fix missing punctuation
cde5d598eb44 CI: give the Linux test VMs 6 GiB, as FreeBSD's
85137823cff2 CI: update the FreeBSD 15 STABLE CI runner to 15.2-STABLE
d1a5b5992977 CI: Temporarily ignore Lustre build result (#19946)
2159144ab679 ZTS: slog_replay_volume_split_*: write with stride_dd (#19917)
1b1aa0e91b69 FreeBSD: Fix append-only semantics
a1daebfec3f5 ZTS: chattr_003_neg: accept uutils ln's wording for EPERM

From nobody Mon Nov 23 12:10:16 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jY4Wr6RL3z72lLT
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 12:10: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jY4Wr5X0dz4ShR
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 12:10:16 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795435816;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=ACTy5iYp9eCcFwvBc8A1UqouN2Ci8n6Ur6lCWpcSerE=;
	b=OxhpvFDumbWiO2VIbT3OtvJgkUexKWPuS/3g+3bWvq2DAKNBi5IMwG0doCan26HHE985wD
	YpABYffWrkhigQi9jE5dm8Ho6Hsoc9GcXf/H+e1N0T+4354wNc5MUXN4rXFlzrHsQTBrrU
	80hmpgVQ24oq+ka9/MiWZNvwe1Wsf6CdZNUAyG+wAd6zGmei0Brk6iQjGRufaaaH6S70Wn
	VPJnXk/CTHedmr1/oGD2/pEG0E1EeEyeLn9wIXJ8+mWCGAVilSFmqw18d+5sYZbZlLCSV8
	G90Y08/LQ3NW6Eq9py7+6rLzlZo2+droSA5ByaDT/Io4lLI3CIkRr4Yz6IkXNA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795435816;
	b=nUo3mgMiNpSUr9VNxJMyAjFZqmJUfsgNzR7cNrrexJg+E9VFkNjxqVXURdbwSd9cbto/kz
	+y6qOh2y0Gd944CfpthoQ1GzDEJuschSVb2c0YvGEy9+ZFvGesY3tbyMLeEizT5CETPRWb
	SQduGYHJeOp+1FaXrNJOeguACWzUhLgQRxocEhu3yxNnMhOl2qhvm3aK+nx4N2Lr9TZux2
	1Lpqb4boQnNNZILUT8YHKP/TaYb7wjgE8Nq7TrdUK23NmUwArb6Rkg+2ju5MAy3Uc79we5
	tuJQMKUXyjw1y4fOcdaG9eAmVPjDURc6F4hjZfwUKf0RzmmAwYw10yp835kAvg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795435816;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=ACTy5iYp9eCcFwvBc8A1UqouN2Ci8n6Ur6lCWpcSerE=;
	b=BeCgXpm4auj7/LzVTEvjSHw8AwadaKEqf4Czi9IX1mjAh0iz/8KIEt5PgN6ncdyQBcl0fV
	edRfqaQla5jlntLFD5tW7GstsBzN+az75CjVxurxpcqbEA0Hxe8Woe2kVbHfxuRXhjKX7Y
	n3t2RMwtWKZf4SMtE4mG4nkjyWrdPfibXEqArj88WrT9XE/q3De65RWYikgAaiBWTE6HmL
	PuVexHdu93MwNljJYkje4Pzer7Vt8xWNUofKnJPQaEhSo8PhJFGtYjBEqAYzRMj12smJCp
	c17y5UaA4gNgLuUcOMYx6ESAAmsF+Ap1R3cFopdbvseZUnEevHX5fNb04ouBKQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jY4Wr4tV6zqns
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 12:10:16 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 999
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 12:10:16 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Andrey V. Elsukov <ae@FreeBSD.org>
Subject: git: e6e4e05afb96 - main - ipfw: fix value index allocation on shared value storage resize
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: e6e4e05afb96ab8ccd0473a13ce5b23dc573390b
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 12:10:16 +0000
Message-Id: <6b042d28.999.293cb701@gitrepo.freebsd.org>

The branch main has been updated by ae:

URL: https://cgit.FreeBSD.org/src/commit/?id=e6e4e05afb96ab8ccd0473a13ce5b23dc573390b

commit e6e4e05afb96ab8ccd0473a13ce5b23dc573390b
Author:     Andrey V. Elsukov <ae@FreeBSD.org>
AuthorDate: 2026-11-23 12:06:03 +0000
Commit:     Andrey V. Elsukov <ae@FreeBSD.org>
CommitDate: 2026-11-23 12:06:03 +0000

    ipfw: fix value index allocation on shared value storage resize
    
    alloc_table_vidx() treated a successful resize_shared_value_storage()
    as complete success and returned an uninitialized vidx instead of
    allocating a new index in the grown bitmap. The removed restart
    machinery in b0c13e7e2446 used to handle this case by restarting the
    whole operation.
    
    Also refresh pval pointer in ipfw_link_table_values() after the resize,
    otherwise the new value object is registered against the freed old storage.
    
    PR:             300802, 300803
    Reported by:    pouria
    Tested by:      pouria
---
 sys/netpfil/ipfw/ip_fw_table_value.c | 24 +++++++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)

diff --git a/sys/netpfil/ipfw/ip_fw_table_value.c b/sys/netpfil/ipfw/ip_fw_table_value.c
index 09e2ead6ec2c..554fd97b91dd 100644
--- a/sys/netpfil/ipfw/ip_fw_table_value.c
+++ b/sys/netpfil/ipfw/ip_fw_table_value.c
@@ -330,9 +330,19 @@ alloc_table_vidx(struct ip_fw_chain *ch, struct table_config *tc,
 
 	IPFW_UH_WLOCK_ASSERT(ch);
 
-	if ((error = ipfw_objhash_alloc_idx(vi, &vidx)) != 0 &&
-	    (error = resize_shared_value_storage(ch)) != 0)
-		return (error);
+	error = ipfw_objhash_alloc_idx(vi, &vidx);
+	if (error != 0) {
+		/*
+		 * Shared value storage is full. Grow it and retry
+		 * index allocation. Note that resize replaces
+		 * ch->valuestate pointer, so callers should re-fetch
+		 * value pointers after this call.
+		 */
+		if ((error = resize_shared_value_storage(ch)) != 0)
+			return (error);
+		if ((error = ipfw_objhash_alloc_idx(vi, &vidx)) != 0)
+			return (error);
+	}
 
 	vlimit = tc->ta->vlimit;
 	if (vlimit != 0 && vidx >= vlimit && !(flags & IPFW_CTF_ATOMIC)) {
@@ -499,6 +509,14 @@ ipfw_link_table_values(struct ip_fw_chain *ch, struct table_config *tc,
 		if ((error = alloc_table_vidx(ch, tc, vi, &vidx, flags)) != 0)
 			return (error);
 
+		/*
+		 * Shared value storage might have been resized inside
+		 * alloc_table_vidx(), refetch pointers to point to
+		 * the actual data.
+		 */
+		if (pval != (struct table_value *)ch->valuestate)
+			get_value_ptrs(ch, tc, &pval, &vi);
+
 		/* Finally, we have allocated valid index, let's add entry */
 		ptei->value = vidx;
 		ptv = (struct table_val_link *)ptei->ptv;

From nobody Mon Nov 23 14:14:25 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jY7H540kNz6w3f2
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 14:14: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jY7H51fw3z4fRG
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 14:14:25 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795443265;
	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=SCndbCcDHHnPFipc46FoyQtjBrw53phSo29IzhfmcHY=;
	b=CJ8efEyw+/Ktx1W/dkzlJxUNtkNBHXN7TIEwxefux3IZUwrVBZeZ+7kdLIDGKBFo7ncYWY
	VPzEebKIY0XtdpNlLZbl+A7KmP3Amy0NzAPC3ZNlwbB3qgZZ7LdPQO12Rr6OuwcIbhUe3Y
	jsWzmUdJRCZzZio3I6qLsONEsOG04cdkc61nM7Z61zs7burPBtJoVm1VuR6ApSqoPmUxPi
	TFLik5oXSN9TYrNC9QY22+TkSNGuw4NbB829QHFq8RXFf+clcNcxtUO7HgnAQrsfVPZGXU
	+CX4MiWMxxjUxKxxJT2rlCu3hSPm83ySzVz0yktUlhQwivKQhuYVW3qN4mD86w==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795443265;
	b=TQ5yuWRM/vGrjRqiIdzJevAMTymnrRQmE1ZEE3qzLQ4vxV+ocLQum3w0alvuqWKAyvJB4F
	H7IscAOnapTSYD9Lo8rvypiEjWcE6acjqphx+XKcnOKInICM837d6ol8Ktz3T4UQWzIijY
	M1hsdK4U38a4MLVV7DytPeydv8gHsELiR3kup7qNaYmuU64wUfsQHJkuffowEbAae8zGbR
	ip6OjhLjOFA8MYBgPaS5dkNf4xw0lMxK7o0cheEeaHuCLv8MBwme77SBSUZl/5M9sbEqRV
	kyk7TJyWZq3JA3/vEEe/adjvwq6LwGAHFbpWTP7/gu+8T/JlK8uCEK8gTL4Zzw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795443265;
	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=SCndbCcDHHnPFipc46FoyQtjBrw53phSo29IzhfmcHY=;
	b=W0yn9oJSqCekLlnqgzzSBylBozfcIxUKUDWSuc6VnLrYnkbVGxyB21sLgXw5YqlYEtt7v2
	HWfjxTwc0yFekDvVnByGuyIMxxC9AIR0vsOz5lVRFIujhOk8yeI9cBg7Up/rd6IIppC5ac
	REPn4dWG26+6FSjiyb/6lEoGE+sg/kMZi6l1DO9EdOlZcOxCZ0jtlOMTeKtVRZ0S+SWCYi
	WGOf9GzRxf/PsiFO1nsVwvGZ6Ni6nz85N6jifev+b+xzkjOw2e7pfTYVfVIiUj1rB3DlGJ
	aw6j634wd+TLKX5HTx1/g6C8WhudEME3A65/Tg79BpcaMazPJ2EdMRUo4YIZgQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jY7H50YYJzv1H
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 14:14:25 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id b8fb
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 14:14:25 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Cc: Andre Silva <andasilv@amd.com>
From: Mitchell Horne <mhorne@FreeBSD.org>
Subject: git: 86ba29785db2 - main - pmc(8): handle AMD Zen3-B0 IBS errata in the frontend view
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: mhorne
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 86ba29785db25af729067aae3bcaab09aa386552
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 14:14:25 +0000
Message-Id: <6b044a41.b8fb.1499d168@gitrepo.freebsd.org>

The branch main has been updated by mhorne:

URL: https://cgit.FreeBSD.org/src/commit/?id=86ba29785db25af729067aae3bcaab09aa386552

commit 86ba29785db25af729067aae3bcaab09aa386552
Author:     Andre Silva <andasilv@amd.com>
AuthorDate: 2026-11-23 14:08:06 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2026-11-23 14:14:21 +0000

    pmc(8): handle AMD Zen3-B0 IBS errata in the frontend view
    
    AMD Family 19h Model 00h-0Fh (Zen3-B0) has IBS errata that make some
    fetch and op sample fields wrong. Detect this silicon from the CPUID
    block in the pmc(8) log header, set one flag per erratum, and correct
    the affected samples before the callchain callbacks:
    
    - #1197: drop fetch samples with a zero linear address.
    - #1238: omit the IC Miss column; the IcMiss bit is unreliable.
    - #1293: zero DATA2 and the DATA3 L2Miss/OpenMemReqs fields on the
             trigger conditions, keeping the sample.
    
    Reviewed by:    Ali Mashtizadeh <ali@mashtizadeh.com>
    MFC after:      1 week
    Signed-off-by:  Andre Silva <andasilv@amd.com>
    Differential Revision:  https://reviews.freebsd.org/D58715
---
 sys/dev/hwpmc/hwpmc_ibs.h        |  2 ++
 usr.sbin/pmc/cmd_pmc_frontend.cc | 40 ++++++++++++++++++++++++++++++++++
 usr.sbin/pmc/cpuid.hh            | 47 ++++++++++++++++++++++++++++++++++++++++
 usr.sbin/pmc/view.cc             | 35 ++++++++++++++++++++++++++++++
 usr.sbin/pmc/view.hh             |  5 +++++
 5 files changed, 129 insertions(+)

diff --git a/sys/dev/hwpmc/hwpmc_ibs.h b/sys/dev/hwpmc/hwpmc_ibs.h
index 98abf9f17345..18d8d6cd7921 100644
--- a/sys/dev/hwpmc/hwpmc_ibs.h
+++ b/sys/dev/hwpmc/hwpmc_ibs.h
@@ -204,6 +204,7 @@
 #define IBS_OP_DATA3_L2MISS		(1ULL << 20)
 #define IBS_OP_DATA3_DCPHYADDRVALID	(1ULL << 18) /* DC Physical Address */
 #define IBS_OP_DATA3_DCLINADDRVALID	(1ULL << 17) /* DC Linear Address */
+#define IBS_OP_DATA3_DCMISSNOMABALLOC	(1ULL << 16) /* DC Miss No MAB Alloc */
 #define IBS_OP_DATA3_LOCKEDOP		(1ULL << 15) /* DC Locked Op */
 #define IBS_OP_DATA3_UCMEMACCESS	(1ULL << 14) /* DC UC Memory Access */
 #define IBS_OP_DATA3_WCMEMACCESS	(1ULL << 13) /* DC WC Memory Access */
@@ -219,6 +220,7 @@
 #define IBS_OP_DATA3_PGSZ(_d)		(((_d) >> 4) & 0x3)
 #define IBS_OP_DATA3_TO_TLBREFILLLAT(_c) (((_c) >> 48) & 0x0000ffff)
 #define IBS_OP_DATA3_TO_OPENMEMREQS(_c)	(((_c) >> 26) & 0x003f)
+#define IBS_OP_DATA3_OPENMEMREQS_MASK	(0x003fULL << 26) /* Open Mem Reqs field */
 
 #define IBSOPDATA2_VALIDMASK		(IBS_OP_DATA3_LOAD | IBS_OP_DATA3_DCMISS | IBS_OP_DATA3_L2MISS)
 
diff --git a/usr.sbin/pmc/cmd_pmc_frontend.cc b/usr.sbin/pmc/cmd_pmc_frontend.cc
index 18ffd607bf21..78119a3beb2d 100644
--- a/usr.sbin/pmc/cmd_pmc_frontend.cc
+++ b/usr.sbin/pmc/cmd_pmc_frontend.cc
@@ -80,15 +80,30 @@
 #include "display.hh"
 #include "view.hh"
 
+/*
+ * L1TLB page-size labels. Erratum #1347 (Zen3-B0) shifts the encoding:
+ * architectural {4K,2M,1G,rsvd} becomes {4K,16K,2M,1G}.
+ */
+static const char *
+frontend_pgsz_label(uint8_t code, bool err1347)
+{
+	static const char *arch[4] = { "4K", "2M", "1G", "rsvd" };
+	static const char *remap[4] = { "4K", "16K", "2M", "1G" };
+	return (err1347 ? remap : arch)[code & 0x3];
+}
+
 struct frontend {
 	syminfo		func;
 	int64_t		ocmiss;
+	int64_t		icmiss;
 	int64_t		l2miss;
 	int64_t		l3miss;
 	int64_t		l1tlbmiss;
 	int64_t		l2tlbmiss;
 	int64_t		latency;
 	int64_t		samples;
+	int64_t		pgsz_counts[4];   /* indexed by 2-bit code */
+	int64_t		pgsz_samples;     /* samples with valid pgsz */
 };
 
 static int sortcol = 2;
@@ -125,6 +140,8 @@ public:
 		 */
 		if (f.ctl & IBS_FETCH_CTL_OPCACHEMISS)
 			inst->second.ocmiss += 1;
+		if (f.ctl & IBS_FETCH_CTL_ICMISS)
+			inst->second.icmiss += 1;
 		if (f.ctl & IBS_FETCH_CTL_L2MISS)
 			inst->second.l2miss += 1;
 		if (f.ctl & IBS_FETCH_CTL_L3MISS)
@@ -137,6 +154,11 @@ public:
 
 		inst->second.latency += IBS_FETCH_CTL_TO_LAT(f.ctl);
 		inst->second.samples += 1;
+
+		if (f.ctl & IBS_FETCH_CTL_PHYSADDRVALID) {
+			inst->second.pgsz_counts[IBS_FETCH_CTL_TO_PGSZ(f.ctl)] += 1;
+			inst->second.pgsz_samples += 1;
+		}
 	}
 
 	virtual void
@@ -151,10 +173,14 @@ public:
 		t.addcolumn("Latency");
 		t.addcolumn("Samples");
 		t.addcolumn("OC Miss");
+		/* Erratum #1238: IcMiss is unreliable, omit the column. */
+		if (!ibs_errata_1238)
+			t.addcolumn("IC Miss");
 		t.addcolumn("L2 Miss");
 		t.addcolumn("L3 Miss");
 		t.addcolumn("L1 TLB Miss");
 		t.addcolumn("L2 TLB Miss");
+		t.addcolumn("Top PgSz");
 
 		for (auto &kv : samples) {
 			std::vector<field> r;
@@ -164,10 +190,24 @@ public:
 			r.emplace_back(kv.second.latency);
 			r.emplace_back(kv.second.samples);
 			r.emplace_back(kv.second.ocmiss, kv.second.samples, true);
+			if (!ibs_errata_1238)
+				r.emplace_back(kv.second.icmiss,
+				    kv.second.samples, true);
 			r.emplace_back(kv.second.l2miss, kv.second.samples, true);
 			r.emplace_back(kv.second.l3miss, kv.second.samples, true);
 			r.emplace_back(kv.second.l1tlbmiss, kv.second.samples, true);
 			r.emplace_back(kv.second.l2tlbmiss, kv.second.samples, true);
+			{
+				int top = 0;
+				for (int i = 1; i < 4; i++)
+					if (kv.second.pgsz_counts[i] >
+					    kv.second.pgsz_counts[top])
+						top = i;
+				const char *lbl = kv.second.pgsz_samples ?
+				    frontend_pgsz_label(top, ibs_errata_1347) :
+				    "-";
+				r.emplace_back(std::string(lbl));
+			}
 
 			t.addrow(r);
 		}
diff --git a/usr.sbin/pmc/cpuid.hh b/usr.sbin/pmc/cpuid.hh
new file mode 100644
index 000000000000..7457679f5cda
--- /dev/null
+++ b/usr.sbin/pmc/cpuid.hh
@@ -0,0 +1,47 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2026 Advanced Micro Devices, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+#ifndef __CPUID_HH__
+#define __CPUID_HH__
+
+/*
+ * CPUID leaf 1 eax decode, copied from machine/specialreg.h.  The values are
+ * decoded from the log rather than the host CPU, so detection has to work on
+ * any architecture pmc(8) is built for, not just x86.
+ */
+#define	IBS_CPUID_VENDOR_AMD	"AuthenticAMD"
+#define	IBS_CPUID_MODEL		0x000000f0
+#define	IBS_CPUID_FAMILY	0x00000f00
+#define	IBS_CPUID_EXT_MODEL	0x000f0000
+#define	IBS_CPUID_EXT_FAMILY	0x0ff00000
+#define	IBS_CPUID_TO_MODEL(id) \
+    ((((id) & IBS_CPUID_MODEL) >> 4) | (((id) & IBS_CPUID_EXT_MODEL) >> 12))
+#define	IBS_CPUID_TO_FAMILY(id) \
+    ((((id) & IBS_CPUID_FAMILY) >> 8) + (((id) & IBS_CPUID_EXT_FAMILY) >> 20))
+
+#endif /* __CPUID_HH__ */
diff --git a/usr.sbin/pmc/view.cc b/usr.sbin/pmc/view.cc
index 3053833cdacb..9ee849886976 100644
--- a/usr.sbin/pmc/view.cc
+++ b/usr.sbin/pmc/view.cc
@@ -39,6 +39,7 @@
 #include <inttypes.h>
 #include <libelf.h>
 #include <pmclog.h>
+#include <string.h>
 #include <sysexits.h>
 #include <unistd.h>
 
@@ -53,6 +54,7 @@
 #include <unordered_set>
 
 #include <dev/hwpmc/hwpmc_ibs.h>
+#include "cpuid.hh"
 #include "util.hh"
 #include "view.hh"
 
@@ -211,6 +213,29 @@ pmcview::process_cpuidinfo(int logfd, const pmchdr_infohdr &infohdr)
 
 	delete[] cpuidinfo;
 
+	/*
+	 * Detect AMD Family 19h (Zen3) Model 00h-0Fh, affected by IBS errata
+	 * #1197/#1238/#1293/#1347.
+	 */
+	auto vend = cpuid.find(0x0);
+	auto leaf1 = cpuid.find(0x1);
+	if (vend != cpuid.end() && leaf1 != cpuid.end()) {
+		char vstr[13];
+		memcpy(vstr + 0, &vend->second.ebx, 4);
+		memcpy(vstr + 4, &vend->second.edx, 4);
+		memcpy(vstr + 8, &vend->second.ecx, 4);
+		vstr[12] = '\0';
+		uint32_t sig = leaf1->second.eax;
+		if (strncmp(vstr, IBS_CPUID_VENDOR_AMD, 12) == 0 &&
+		    IBS_CPUID_TO_FAMILY(sig) == 0x19 &&
+		    IBS_CPUID_TO_MODEL(sig) <= 0x0F) {
+			ibs_errata_1197 = true;
+			ibs_errata_1238 = true;
+			ibs_errata_1293 = true;
+			ibs_errata_1347 = true;
+		}
+	}
+
 	return 0;
 }
 
@@ -849,10 +874,20 @@ pmcview::process(struct pmclog_ev_callchain &p)
 
 	// Advanced filters for AMD IBS
 	if (ibsf.len) {
+		/* Erratum #1197: ignore fetch samples with zero linear addr. */
+		if (ibs_errata_1197 && ibsf.linaddr == 0)
+			return;
 		if (filter.ibs_ldlat > IBS_FETCH_CTL_TO_LAT(ibsf.ctl))
 			return;
 		callchain(p, ibsf, cc, len);
 	} else if (ibso.len) {
+		/* Erratum #1293: zero fields that are unreliable on Zen3-B0. */
+		if (ibs_errata_1293 && (ibso.data3 & (IBS_OP_DATA3_PREFETCH |
+		    IBS_OP_DATA3_DCMISSNOMABALLOC)) != 0) {
+			ibso.data2 = 0;
+			ibso.data3 &= ~(IBS_OP_DATA3_L2MISS |
+			    IBS_OP_DATA3_OPENMEMREQS_MASK);
+		}
 		if (filter.ibs_oplat > IBS_OP_DATA_TO_COMPTORET(ibso.data))
 			return;
 		if (filter.ibs_ldlat > IBS_OP_DATA3_TO_DCLAT(ibso.data3))
diff --git a/usr.sbin/pmc/view.hh b/usr.sbin/pmc/view.hh
index 05904b3da53e..f31e9ec14f9a 100644
--- a/usr.sbin/pmc/view.hh
+++ b/usr.sbin/pmc/view.hh
@@ -404,6 +404,11 @@ protected:
 	std::string				buildid;
 	std::vector<struct pmcinfox>		extpmcinfo;
 	std::map<uint32_t, struct cpuidleaf>	cpuid; // x86 Only
+	// AMD IBS errata, one flag per erratum
+	bool					ibs_errata_1197 = false;
+	bool					ibs_errata_1238 = false;
+	bool					ibs_errata_1293 = false;
+	bool					ibs_errata_1347 = false;
 private:
 	image loadimage(const std::string &path, bool iskernel = false);
 	void mapimage(pid_t pid, const image &im, uint64_t linkaddr);

From nobody Mon Nov 23 14:26:22 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jY7Xv0mkZz6w4jw
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 14:26:23 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jY7Xv0Fgjz4gNp
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 14:26:23 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795443983;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=hLkW7FELohkzzmwYW47R8eyOJt8E9p0Z/bBR87A2z9c=;
	b=dP9lCIJYvhLwnCWvA1njCPae5IvMXz7su1BMX296Bw82WAa0ut5HbuwqiPr7iIdHKvgdMm
	ktRP+L/hbEizCA2ur304m9Xiz+4eODWuqIlKszEi4ewoBCBiUz7N4CF9fZplzGT3iRwtHZ
	VFHqlaqRVWmL7m85wBw0wXzn4v5hcbhTtU7gPZgrmppcbzGq1iYeB+6AxzcjJmdC67q2Rk
	h+P1uyapYlptHYal6f/oBS48o48PyaO87l0olfme7QtWz8FSDY5eUyS3nfr4ehbegpAjah
	o/Cy8V483gFXgwfhwioe0RfpAMdy22X+6euMPSQipZ/b7J7tsum1Zya/Imf57w==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795443983;
	b=Dj1y6eUG6+9lyhnClIRPJM6sMejlgbZpCW8yhST43GPMDsA19KQUqhvXCLEl4YGzzE53PE
	n8gmHjD1foTHYxFeXy4mv/xrmSkT78RUmCqXMLj2mPgP+JaMlYMv0+W8WevlOOjAwovqKQ
	vFLlZ3At80oQutrQBE7LKArZgzsAHcdlwPWmyvJjw6ZjcoS4/CN5ffkjxwYztFL55kYwgm
	ztZ6nhVsXorm9cbusOzIhs385VzVPUMsNFn7E5YnfRnvfS2pJGjGe61GMrTU9PqhsWMvP1
	SwLVmbiYQuZ1er7YhYLQA/D5AcZxum4uhrCJ7d8kRvOHGvUWjj11C4VgZf/oBA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795443983;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=hLkW7FELohkzzmwYW47R8eyOJt8E9p0Z/bBR87A2z9c=;
	b=GFjFBFuMOKMJvfeMib2SdYMVQAh8gDtHABWQg9C7mXcQ0HD9V7dzEOYXfpiSaBSI0d1Zx8
	YYboXa/rb6GAmo82KhBY0RV272NwWEB506FUVnmi82vSErP2HN82F7kS46SgggcmOl0GEh
	puQPtDq+BRH9lLUj4XlyBDuGB4Iltsk7Yf/xjtEC+j2vc19k2pGfwAPDWn+RrPcCzjs1j4
	lCWjv2rjv9ShXnWShBcVH/6KPI4oB7y374s8/ghG1fkKqKr88UEgfLgIojUiHdmTQdKGHT
	XNzR7nykjVdHFAdY20xWmFH6stlThZ9Pot3Cx+M4Ji2L7xDu5nSE81nbWUwBkA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jY7Xt71x2zvPw
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 14:26:22 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id e431
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 14:26:22 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: R. Christian McDonald <rcm@FreeBSD.org>
Subject: git: 36f7e87007da - main - amd64: Mark the BSP as a small core
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: rcm
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 36f7e87007da16b8f45b65b923b854eef50d9894
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 14:26:22 +0000
Message-Id: <6b044d0e.e431.5fde208d@gitrepo.freebsd.org>

The branch main has been updated by rcm:

URL: https://cgit.FreeBSD.org/src/commit/?id=36f7e87007da16b8f45b65b923b854eef50d9894

commit 36f7e87007da16b8f45b65b923b854eef50d9894
Author:     R. Christian McDonald <rcm@FreeBSD.org>
AuthorDate: 2026-11-23 14:22:59 +0000
Commit:     R. Christian McDonald <rcm@FreeBSD.org>
CommitDate: 2026-11-23 14:22:59 +0000

    amd64: Mark the BSP as a small core
    
    cpu_init_small_core() records in the pcpu area that a CPU is an Intel
    small (Atom) core, and that it needs the workaround for INVLPG not
    flushing global TLB entries when PCID is enabled.  hammer_time() calls
    it for the BSP before the BSP has a pcpu area: the temporary one is
    zeroed and installed only later, and pmap_bootstrap() then replaces it
    with the final one, zeroed again.  The BSP therefore never has
    pc_small_core or pc_pcid_invlpg_workaround set, while the APs, which
    call it from initializecpu(), do.
    
    On a hybrid machine the BSP is normally a large core and nothing is
    missing.  On a machine with small cores only, such as an Atom C1110 or
    x7809C, the BSP is one of them, and its invalidations of kernel
    mappings in pmap_invlpg(), pmap_invalidate_range() and the shootdown
    handler go without the workaround.
    
    Do it in amd64_bsp_pcpu_init1() instead, which runs for both of the
    BSP's pcpu areas once %gs points at them.  The PCID features and
    tunables it depends on are still evaluated first.
    
    Reviewed by:            kib, markj
    Fixes:                  a2c08eba43a2 ("amd64: be more precise when...")
    MFC after:              1 week
    Sponsored by:           Rubicon Communications, LLC ("Netgate")
    Differential Revision:  https://reviews.freebsd.org/D61804
---
 sys/amd64/amd64/machdep.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index 04204fa74c11..a9d4144ace48 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -1247,6 +1247,7 @@ amd64_bsp_pcpu_init1(struct pcpu *pc)
 	PCPU_SET(gs32p, &gdt[GUGS32_SEL]);
 	PCPU_SET(ucr3_load_mask, PMAP_UCR3_NOMASK);
 	PCPU_SET(smp_tlb_gen, 1);
+	cpu_init_small_core();
 }
 
 void
@@ -1399,13 +1400,8 @@ hammer_time(u_int64_t modulep, u_int64_t physfree)
 		pmap_pcid_enabled = 0;
 	invpcid_works = (cpu_stdext_feature & CPUID_STDEXT_INVPCID) != 0;
 
-	/*
-	 * Now we can do small core initialization, after the PCID
-	 * CPU features and user knobs are evaluated.
-	 */
 	TUNABLE_INT_FETCH("vm.pmap.pcid_invlpg_workaround",
 	    &pmap_pcid_invlpg_workaround_uena);
-	cpu_init_small_core();
 
 	if ((cpu_feature2 & CPUID2_XSAVE) != 0) {
 		use_xsave = 1;

From nobody Mon Nov 23 14:29:23 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jY7cN0gSfz6w4wd
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 14:29: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jY7cM5Vw4z4hCK
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 14:29:23 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795444163;
	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=N4NXH7RcSda0rRn6IxCBklEWZvQol1/uY0gI7IaZED4=;
	b=dRGzWK3ISTTIqOKRSN+R9DtCU5Jcry6MUSCkxzEQmg7b/mZEphBPuzBdLCdhFxDao4yJD6
	ckim3bISkmLizUGmsS4YGkRyZmPQ+AbiBksCoikfRhC2xTCmNlKQZePg+WazUVzNuE9JSk
	D8g7tGxlj69s4Tw534DMtF3D0fqSeyHDSsm4ZVZt4lxy1DMqBJh6yLf/wxqq8xyX6k+slI
	ly8KM2lJtRyXXx+VQEmcrTSjptmJzS1/XwsKp0eLdPbPh0fjqahj/A1VqQlX9hOUYFdU97
	2omub7Foc4dPjGC/lrEPr7QW9zLJ5dmVC/kiVArAQ0MmsEbW9j2wzqkyFVj7GQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795444163;
	b=w/fokjABj/sw95TZxKGsDxcVg35jjAsRyjVQVPGBsH7aXTqCv1clv4trmaq0oEFBMYaQeF
	HrVMdVtc6Ds+YSwihfGkGqAIQ5Gamkg/4mnKaEZ3qDb7bDtTlxRcy9DfMvgCgnWgu/kx6M
	pThzPYhso73Rd+Eb9ItkEYeOcK8jpYrRgneTaKzb1elGYT/XJelWm6dnUhFD0zbE0gmfDl
	qXtQaFc2L2yGQavOPUf5F+pCdBPbZy7jaDPDwmpPegQ8qLN8byU/hhOJm692MhV+ajlFPZ
	o9/ECrL9s8hBN3E3FeS+cstt1UuYJWo+jgCqg1mPjurH847xb7EPbhdnD53K8w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795444163;
	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=N4NXH7RcSda0rRn6IxCBklEWZvQol1/uY0gI7IaZED4=;
	b=C4nXaVS9Dr/DXXX1aQj2hqt74f0mvAW6Gue/2qevSDj2lP2hqGWegMq3VDQrOnfPMyPL0P
	q+7l+fqFHH3xGZLOdg5w5rrqJbJB9Kk25vmQ0advlu3GFU2EZZjgdhULTO/7XMIfsNEmmU
	PRuSedFv6SSjA6pSWWIxpFaQWQ5UlTWigmwoYatZ8YoYk1utw0ovb5ojg3MehaGfDTYA7K
	FPkJxmZAvGXfaIJZCvfsJM8mRLnCxfNuvl3jeIYKbQebLPw4d1HWmms6CAmF1YBNrR3mEx
	o7ymYwXMSc49ijhqs1kFdA2r11w7LcAdM7IsxnCPfBf7OAiN+KG6vsg54X48OQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jY7cM4SshzvkG
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 14:29:23 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id d45a
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 14:29:23 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Cc: Osvaldo Janeri Filho <ojanerif@amd.com>
From: Mitchell Horne <mhorne@FreeBSD.org>
Subject: git: c0c2c80b647f - main - hwpmc_amd: Service the core counters when IBS claims the NMI
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: mhorne
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: c0c2c80b647f712798c507cc76cbdf882c132a9c
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 14:29:23 +0000
Message-Id: <6b044dc3.d45a.426cea35@gitrepo.freebsd.org>

The branch main has been updated by mhorne:

URL: https://cgit.FreeBSD.org/src/commit/?id=c0c2c80b647f712798c507cc76cbdf882c132a9c

commit c0c2c80b647f712798c507cc76cbdf882c132a9c
Author:     Osvaldo Janeri Filho <ojanerif@amd.com>
AuthorDate: 2026-11-23 14:28:28 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2026-11-23 14:29:21 +0000

    hwpmc_amd: Service the core counters when IBS claims the NMI
    
    IBS and the core counters share the PMC NMI.  amd_intr() and
    amd_intr_v2() return as soon as pmc_ibs_intr() claims an NMI, so a core
    counter overflow that arrives with the same NMI is not serviced: the
    counter is not reloaded and sampling with it stops.
    
    Service the core counters after pmc_ibs_intr() and claim the NMI if
    either side found work.  An NMI that IBS claimed no longer uses up a
    core stray-NMI credit.  With no core counter sampling, amd_intr_v2()
    still returns right after IBS, without freezing the core counters.
    
    Add a test that samples unhalted cycles on cpu0 alone and then next to
    IBS op, and requires the second phase to keep at least half of the
    core samples.
    
    Reviewed by:    mhorne
    Sponsored by:   Advanced Micro Devices, Inc.
    Differential Revision:  https://reviews.freebsd.org/D61451
---
 sys/dev/hwpmc/hwpmc_amd.c         |  48 ++++++----
 tests/sys/pmc/amd/Makefile        |   2 +
 tests/sys/pmc/amd/ibs_core_test.c | 183 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 216 insertions(+), 17 deletions(-)

diff --git a/sys/dev/hwpmc/hwpmc_amd.c b/sys/dev/hwpmc/hwpmc_amd.c
index 101c583352fd..3274a2bbec16 100644
--- a/sys/dev/hwpmc/hwpmc_amd.c
+++ b/sys/dev/hwpmc/hwpmc_amd.c
@@ -948,7 +948,7 @@ amd_intr(struct trapframe *tf)
 	pmc_value_t v;
 	uint64_t config, evsel, perfctr;
 	uint32_t active = 0, count = 0;
-	int i, error, retval, cpu;
+	int i, error, ibs, retval, cpu;
 
 	cpu = curcpu;
 	KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
@@ -960,9 +960,13 @@ amd_intr(struct trapframe *tf)
 
 	pac = amd_pcpu[cpu];
 
-	retval = pmc_ibs_intr(tf);
-	if (retval)
-		goto done;
+	/*
+	 * IBS and the core counters share the NMI, and one NMI can stand for
+	 * both.  Service the core counters even when IBS claims the NMI: an
+	 * overflow that is not serviced is never reloaded, and its counter
+	 * stops sampling.
+	 */
+	ibs = pmc_ibs_intr(tf);
 
 	/*
 	 * look for all PMCs that have interrupted:
@@ -1037,14 +1041,16 @@ amd_intr(struct trapframe *tf)
 	 */
 	if (retval) {
 		DPCPU_SET(nmi_counter, min(2, active));
-	} else {
+	} else if (ibs == 0) {
+		/* An NMI claimed by IBS does not use up a core credit. */
 		if ((count = DPCPU_GET(nmi_counter))) {
 			retval = 1;
 			DPCPU_SET(nmi_counter, --count);
 		}
 	}
+	if (ibs != 0)
+		retval = 1;
 
-done:
 	if (retval)
 		counter_u64_add(pmc_stats.pm_intr_processed, 1);
 	else
@@ -1066,7 +1072,7 @@ amd_intr_v2(struct trapframe *tf)
 	pmc_value_t v;
 	uint64_t status, pending;
 	uint32_t active = 0, count = 0;
-	int i, error, retval, cpu;
+	int i, error, ibs, retval, cpu;
 
 	cpu = curcpu;
 	KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
@@ -1077,15 +1083,8 @@ amd_intr_v2(struct trapframe *tf)
 	retval = 0;
 	pac = amd_pcpu[cpu];
 
-	retval = pmc_ibs_intr(tf);
-	if (retval)
-		goto done;
-
-	amd_v2_freeze_core(cpu);
-
-	/* Read the overflow bitmap once. */
-	status = rdmsr(AMD_PMC_GLOBAL_STATUS);
-	status &= amd_global_cntr_mask;
+	/* Service the core counters even when IBS claims the NMI. */
+	ibs = pmc_ibs_intr(tf);
 
 	/*
 	 * Count all active sampling PMCs, not just the ones that
@@ -1098,6 +1097,18 @@ amd_intr_v2(struct trapframe *tf)
 			active++;
 	}
 
+	/* An IBS NMI with no core counter sampling has nothing more to do. */
+	if (ibs != 0 && active == 0) {
+		retval = 1;
+		goto done;
+	}
+
+	amd_v2_freeze_core(cpu);
+
+	/* Read the overflow bitmap once. */
+	status = rdmsr(AMD_PMC_GLOBAL_STATUS);
+	status &= amd_global_cntr_mask;
+
 	/* ffsll() returns a 1-based bit index, or 0 when no bits are set. */
 	pending = status;
 	while ((i = ffsll(pending) - 1) != -1) {
@@ -1140,12 +1151,15 @@ amd_intr_v2(struct trapframe *tf)
 	 */
 	if (retval) {
 		DPCPU_SET(nmi_counter, min(2, active));
-	} else {
+	} else if (ibs == 0) {
+		/* An NMI claimed by IBS does not use up a core credit. */
 		if ((count = DPCPU_GET(nmi_counter))) {
 			retval = 1;
 			DPCPU_SET(nmi_counter, --count);
 		}
 	}
+	if (ibs != 0)
+		retval = 1;
 
 done:
 	if (retval)
diff --git a/tests/sys/pmc/amd/Makefile b/tests/sys/pmc/amd/Makefile
index 577517b1aa9e..e007568c22de 100644
--- a/tests/sys/pmc/amd/Makefile
+++ b/tests/sys/pmc/amd/Makefile
@@ -1,5 +1,6 @@
 TESTSDIR=	${TESTSBASE}/sys/pmc/amd
 
+ATF_TESTS_C+=	ibs_core_test
 ATF_TESTS_C+=	pmc_ibs_fetch_op_test
 ATF_TESTS_C+=	pmc_ibs_test
 ATF_TESTS_C+=	pmc_rowalloc_test
@@ -14,6 +15,7 @@ ATF_TESTS_SH+=	pmc_frontend_test
 ATF_TESTS_SH+=	pmcstat_ibs_test
 
 # These need the counters of cpu0 to themselves.
+TEST_METADATA.ibs_core_test+=		is_exclusive="true"
 TEST_METADATA.pmc_ibs_fetch_op_test+=	is_exclusive="true"
 TEST_METADATA.pmc_ibs_test+=		is_exclusive="true"
 TEST_METADATA.pmc_rowalloc_test+=	is_exclusive="true"
diff --git a/tests/sys/pmc/amd/ibs_core_test.c b/tests/sys/pmc/amd/ibs_core_test.c
new file mode 100644
index 000000000000..dfaab8b93bc6
--- /dev/null
+++ b/tests/sys/pmc/amd/ibs_core_test.c
@@ -0,0 +1,183 @@
+/*
+ * Copyright (c) 2026 Advanced Micro Devices, Inc.
+ *
+ * Author: Osvaldo Janeri Filho <ojanerif@amd.com>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+/*
+ * Core counter sampling next to IBS op sampling.  IBS and the core counters
+ * share the PMC NMI.  amd_intr() and amd_intr_v2() used to return as soon as
+ * the IBS handler claimed an NMI, so a core counter overflow delivered with
+ * the same NMI was not serviced: the counter was not reloaded and stopped
+ * sampling.  Sample unhalted cycles on a busy cpu0, first alone and then
+ * together with IBS op, and require the second phase to collect at least
+ * half as many core samples as the first.
+ */
+
+#include <sys/param.h>
+#include <sys/stat.h>
+
+#include <atf-c.h>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <pmc.h>
+#include <pmclog.h>
+#include <stdint.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+
+#include "amd_pmc_test_common.h"
+
+#define	PHASE_SECONDS	2
+#define	CORE_RATE	1000000
+#define	IBS_RATE	65536
+
+#define	LOG_FILE	"pmc.log"
+
+static const char *const core_events[] = {
+	"unhalted-cycles", "unhalted-core-cycles", "ls_not_halted_cyc", NULL
+};
+
+static pmc_id_t
+alloc_core(void)
+{
+	pmc_id_t id;
+	int k;
+
+	for (k = 0; core_events[k] != NULL; k++) {
+		if (pmc_allocate(core_events[k], PMC_MODE_SS, 0, 0, &id,
+		    CORE_RATE) == 0)
+			return (id);
+	}
+	atf_tc_skip("no core cycle counter can sample on cpu0: %s",
+	    strerror(errno));
+}
+
+/* Keep cpu0 busy, so that the cycle counter keeps counting. */
+static void
+spin(void)
+{
+	struct timespec end, now;
+
+	ATF_REQUIRE(clock_gettime(CLOCK_MONOTONIC, &end) == 0);
+	end.tv_sec += PHASE_SECONDS;
+	do {
+		ATF_REQUIRE(clock_gettime(CLOCK_MONOTONIC, &now) == 0);
+	} while (now.tv_sec < end.tv_sec ||
+	    (now.tv_sec == end.tv_sec && now.tv_nsec < end.tv_nsec));
+}
+
+/*
+ * pmc_close_logfile() only starts the close, and the log thread writes the
+ * rest of the log afterwards: wait until the file stops growing.
+ */
+static void
+wait_log_written(int fd)
+{
+	struct stat st;
+	off_t last;
+	int i, stable;
+
+	last = -1;
+	stable = 0;
+	for (i = 0; i < 100 && stable < 5; i++) {
+		usleep(100000);
+		ATF_REQUIRE(fstat(fd, &st) == 0);
+		if (st.st_size == last)
+			stable++;
+		else
+			stable = 0;
+		last = st.st_size;
+	}
+	ATF_REQUIRE_MSG(stable == 5, "the log was still growing after 10 s");
+}
+
+/* Count the samples logged for PMCs a and b. */
+static void
+count_samples(int fd, pmc_id_t a, pmc_id_t b, uintmax_t *na, uintmax_t *nb)
+{
+	struct pmclog_ev ev;
+	void *log;
+
+	*na = *nb = 0;
+	ATF_REQUIRE(lseek(fd, 0, SEEK_SET) == 0);
+	log = pmclog_open(fd);
+	ATF_REQUIRE_MSG(log != NULL, "pmclog_open: %s", strerror(errno));
+	while (pmclog_read(log, &ev) == 0) {
+		if (ev.pl_type != PMCLOG_TYPE_CALLCHAIN)
+			continue;
+		if (ev.pl_u.pl_cc.pl_pmcid == a)
+			(*na)++;
+		else if (ev.pl_u.pl_cc.pl_pmcid == b)
+			(*nb)++;
+	}
+	ATF_CHECK_MSG(ev.pl_state == PMCLOG_EOF,
+	    "the log did not parse to its end (state %d)", ev.pl_state);
+	pmclog_close(log);
+}
+
+ATF_TC(core_sampling_with_ibs);
+ATF_TC_HEAD(core_sampling_with_ibs, tc)
+{
+	atf_tc_set_md_var(tc, "descr",
+	    "A core counter keeps sampling while IBS op samples the same CPU");
+	atf_tc_set_md_var(tc, "require.user", "root");
+}
+
+ATF_TC_BODY(core_sampling_with_ibs, tc)
+{
+	pmc_id_t alone, ibs, with_ibs;
+	uintmax_t na, nb;
+	int fd;
+
+	amd_test_skip_unless_amd();
+	amd_test_skip_unless_hwpmc();
+	amd_test_bind_cpu0();
+
+	fd = open(LOG_FILE, O_RDWR | O_CREAT | O_TRUNC, 0600);
+	ATF_REQUIRE_MSG(fd >= 0, "open %s: %s", LOG_FILE, strerror(errno));
+	ATF_REQUIRE_MSG(pmc_configure_logfile(fd) == 0,
+	    "pmc_configure_logfile: %s", strerror(errno));
+
+	if (pmc_allocate("ibs-op", PMC_MODE_SS, 0, 0, &ibs, IBS_RATE) != 0)
+		atf_tc_skip("no IBS op PMC on cpu0: %s", strerror(errno));
+	/* Both core PMCs exist at once, so their ids differ. */
+	alone = alloc_core();
+	with_ibs = alloc_core();
+
+	ATF_REQUIRE(pmc_start(alone) == 0);
+	spin();
+	ATF_REQUIRE(pmc_stop(alone) == 0);
+
+	ATF_REQUIRE(pmc_start(with_ibs) == 0);
+	ATF_REQUIRE(pmc_start(ibs) == 0);
+	spin();
+	ATF_REQUIRE(pmc_stop(ibs) == 0);
+	ATF_REQUIRE(pmc_stop(with_ibs) == 0);
+
+	ATF_REQUIRE(pmc_flush_logfile() == 0);
+	amd_test_release_pmc(ibs);
+	amd_test_release_pmc(with_ibs);
+	amd_test_release_pmc(alone);
+	ATF_REQUIRE(pmc_close_logfile() == 0);
+
+	wait_log_written(fd);
+	count_samples(fd, alone, with_ibs, &na, &nb);
+	(void)close(fd);
+
+	ATF_REQUIRE_MSG(na > 0, "the core counter took no samples on its own");
+	ATF_CHECK_MSG(nb * 2 >= na,
+	    "the core counter took %ju samples on its own but only %ju with "
+	    "IBS op sampling the same CPU", na, nb);
+}
+
+ATF_TP_ADD_TCS(tp)
+{
+	ATF_TP_ADD_TC(tp, core_sampling_with_ibs);
+
+	return (atf_no_error());
+}

From nobody Mon Nov 23 14:30:53 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jY7f56hsGz6w5CT
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 14:30: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jY7f5481fz4hbW
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 14:30:53 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795444253;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=j7cMBE+XAkYlnN7yK0u/Y6tQmJSBp0mlR3GApLLgoWo=;
	b=CUZbYqxp9+PO9CyTQCE+yXDzKW01H5SJGZpZ7WtUljaL5SPA2ntovBricoI7h4CrMrk4ls
	+VDWC0cBnxCfrYZT+N96JAnyWqIFhdHO5YePAWqMNDVOHVcltDQN4B5mGrC4gW9c+ud7v2
	kfnE2m90DglQ66E67Yzdv8V3vF5zsdb86RQzQL4LrA6I2heyS/Vn47UcOSFLN6yw45lmUs
	aD1LfmnSTBakLj2mJj4jauZ6kXTq5hidvmwNBaeSc0VdLkL//PBw4FxqQBCXeSVnZ8ytnv
	4zqN82wBn4UBr7qjCwaYJAW6OhtDZRR3W/hVszxthrl3t0u+jzwWzrud9+HEUg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795444253;
	b=qzQmne8e6Vd2I+QEcyyr7UxpDZ8N4VPtW1iNsirCH3K4mVmg1JyHYRhdG40uVNHcPuGg4B
	te9vKkJbdJa8+rMaJpkrX5PztFU7Ywl7G2nof8C6oIoLxWYxETNR8vOQVXup2Q7GYBvw/G
	RQZAyrAsrYq1ip43P55KVS0XD16X3Oh3hSaBZZGb5FWEm4MM+NyIkKsdFXAGZdiw3myf9P
	K4sE29w6j7Ng8X3mb/pPbJO7HDdGBv/90FAd87/juLJpOUbuZr+wc+OEOiPkuSZcPxFYyf
	gvL6yu2ap55NX7ni5zjOsOZkR1QoQk7LJBAJ6ql3yr2PVgMDy/P3GqFG2sztGg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795444253;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=j7cMBE+XAkYlnN7yK0u/Y6tQmJSBp0mlR3GApLLgoWo=;
	b=kPLZP4FMt7kDX+/W5kt9X/emcsbEL3BwYMPzN9EI4bKz9O0U1yUlVm+cYp0gI2OqBmY7ts
	w2l2VTjabpkOz0556c2bJ7iRSX0H+e/CJYMy6xxP0zTCc0coKZDg4B16WYxGh/GO7AADkK
	e4v6ykHVqUZP3nH3KvHOchH3qtcgD/kkNeyRwdrzEGni70pI+tU086Jagb+QAuZtLIR4HO
	8fBVOl6/Aaek/GLhiSuTdP6jDDXZmlQTO9E7U0iIPhI9SXFtFJ7wJwk7lFa1JHwXd9oURU
	mm2NKxje/Ji/C7KOLk9p+uF3llEn0BzLdLHmNMfe2l581iWnzGz1Pmxivf4n/g==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jY7f53kNmzv21
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 14:30:53 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id e621
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 14:30:53 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: R. Christian McDonald <rcm@FreeBSD.org>
Subject: git: 927151737725 - main - ixl/iavf: Start the head write-back completion index at the head
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: rcm
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 927151737725e88b050bfcae17f8a38448869aa8
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 14:30:53 +0000
Message-Id: <6b044e1d.e621.458a0406@gitrepo.freebsd.org>

The branch main has been updated by rcm:

URL: https://cgit.FreeBSD.org/src/commit/?id=927151737725e88b050bfcae17f8a38448869aa8

commit 927151737725e88b050bfcae17f8a38448869aa8
Author:     R. Christian McDonald <rcm@FreeBSD.org>
AuthorDate: 2026-11-23 14:29:06 +0000
Commit:     R. Christian McDonald <rcm@FreeBSD.org>
CommitDate: 2026-11-23 14:30:48 +0000

    ixl/iavf: Start the head write-back completion index at the head
    
    With head write-back, tx_cidx_processed holds the head value that the
    credits update consumed last: the index of the next descriptor to
    complete.  With the Report Status queue it is the index of the last
    completed descriptor.  088a0b27adb4 made both start at the last
    descriptor of the ring, which is right for the Report Status queue
    only.  With head write-back, the default in ixl(4), the first credits
    update after every initialization reports a completed descriptor that
    was never sent.
    
    iflib's own reclaim holds back isc_tx_nsegments descriptors and does
    not notice.  netmap uses the count as it is: iflib_netmap_txsync()
    puts the tail of its ring one slot too far.  Once the card has sent
    everything, the tail meets the head, which netmap reads as a ring
    without a free slot, and no completion is left that would move it.
    The ring never transmits again: pkt-gen at full rate stops after a few
    thousand packets, and a ring that one pkt-gen has used cannot be used
    by the next.
    
    The workaround has been hw.ixl.enable_head_writeback=0.
    
    Start at the head of the cleared ring, as before that change.  iavf(4)
    has a copy of the code and gets the same change.
    
    PR:                     255671
    Reviewed by:            kgalazka
    Fixes:                  088a0b27adb4 ("intel iflib drivers: correct...")
    MFC after:              1 week
    Sponsored by:           Rubicon Communications, LLC ("Netgate")
    Differential Revision:  https://reviews.freebsd.org/D61715
---
 sys/dev/iavf/if_iavf_iflib.c | 4 ++--
 sys/dev/ixl/ixl_txrx.c       | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/sys/dev/iavf/if_iavf_iflib.c b/sys/dev/iavf/if_iavf_iflib.c
index 4f908a8d9a7b..e9be44046175 100644
--- a/sys/dev/iavf/if_iavf_iflib.c
+++ b/sys/dev/iavf/if_iavf_iflib.c
@@ -2539,14 +2539,14 @@ iavf_init_tx_rsqs(struct iavf_vsi *vsi)
 void
 iavf_init_tx_cidx(struct iavf_vsi *vsi)
 {
-	if_softc_ctx_t scctx = vsi->shared;
 	struct iavf_tx_queue *tx_que;
 	int i;
 
 	for (i = 0, tx_que = vsi->tx_queues; i < vsi->num_tx_queues; i++, tx_que++) {
 		struct tx_ring *txr = &tx_que->txr;
 
-		txr->tx_cidx_processed = scctx->isc_ntxd[0] - 1;
+		/* Next descriptor to complete (the head), not the last one. */
+		txr->tx_cidx_processed = 0;
 	}
 }
 
diff --git a/sys/dev/ixl/ixl_txrx.c b/sys/dev/ixl/ixl_txrx.c
index 7ce1c24c814a..bd4f46b1e62a 100644
--- a/sys/dev/ixl/ixl_txrx.c
+++ b/sys/dev/ixl/ixl_txrx.c
@@ -795,14 +795,14 @@ ixl_init_tx_rsqs(struct ixl_vsi *vsi)
 void
 ixl_init_tx_cidx(struct ixl_vsi *vsi)
 {
-	if_softc_ctx_t scctx = vsi->shared;
 	struct ixl_tx_queue *tx_que;
 	int i;
-	
+
 	for (i = 0, tx_que = vsi->tx_queues; i < vsi->num_tx_queues; i++, tx_que++) {
 		struct tx_ring *txr = &tx_que->txr;
 
-		txr->tx_cidx_processed = scctx->isc_ntxd[0] - 1;
+		/* Next descriptor to complete (the head), not the last one. */
+		txr->tx_cidx_processed = 0;
 	}
 }
 

From nobody Mon Nov 23 14:36:51 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jY7n00JVhz6w5pW
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 14:36: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jY7mz6lmBz4lFP
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 14:36:51 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795444611;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=FRZzxTReYDu9UfK/wvdI+9BLfswzxX15C5dDG8zNcQM=;
	b=R5Z+e6mzEa5dEKYpU1KNCvrSTDVcIumdjVHjiZ2TvzCJLTYj+2NI4MHxZWSNXN3tgRUOqn
	91EOvQNauZTH2DpnQPeR2PWnoYzgBN25AEQrGTBXcEi2ndQmFOt8OVfI6U0V+UfXgw2TkS
	1TFSaj69MfhaMDqcTGA967V/HBdmbNARHKqeNnjVLuVnrHpuLp3Nk8kMTUPXKqeQuAMew/
	wZtjXSji3nnHxEDecrcQgSiUgiajoThG/1QrEdrEP2MiljTpsX6h1HNvQsLJ/1Y7mQXjJO
	2Z4D34qFSK95dAzXhRgv1cfHz4JcpJpivQpA4V+pARCbrCXv3GRIgjedkUxBaw==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795444611;
	b=Uqvbh8j0nr53TZs5CbkbWf3sw4xqNk8NjeiLy9j2wN2Sx2SJayDGZPBBIFrlUjm2Z5xV6v
	hxR0UC+xutZ5kHUbYIwzOUrK2JiLGXxmyf/XcXM3jNAu6GrNPlbN8Vj9DMxlfgaIBPU5FS
	6FecPgVB5U1w2t/fCYe+sRLk+kk60sINAVVfyVh1KDJHZdoyI/o1lv8c8uu6Kl/a/k0gbP
	pTs4763ydJlD1WPPQyPVkixmKGoGmRtA1xd317HRQm9mT5Qwmb0PU0Zin1+KuvKm688ZBo
	GSJocxsCju8k41Ycqf3P5OUuF0wmLSKd7ulxPgP7dIOyYWJfqeq70pg++wq2cw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795444611;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=FRZzxTReYDu9UfK/wvdI+9BLfswzxX15C5dDG8zNcQM=;
	b=PptCIWBzfayNs0r2qF0F4gbw3ks5S37Ucf2l0GRqAcNiIWo5mys5Em+U1OwOm2vrIvrB1U
	zRsrxACMwYGh6X8B4qQKYtYDl5vY8/sK1+mnC3ZqpLbRrQpVMT5uMwUkJHwuapRanzVDpJ
	LqmetTzE095YhQ9uKuOp8VmRfUh+kHI49N2ytFjPIFPrBuI9WnXK+RePocfeuQpmMMI9vh
	j9Dfcb6mO64ZSqhWYVOs9IWRnOT983Ca+Qbr17IcQSU5RJtqb9IFx2XAmc/fv+SGyoAG4t
	+gZkRuuICBO05D9HM7YT5XU5qa1uttZBfL+5pI9HDVT6+NcsR/R1bAPs+4S6yg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jY7mz6PjJzwG6
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 14:36:51 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id f9bb
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 14:36:51 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Martin Matuska <mm@FreeBSD.org>
Subject: git: 88d72ecb8554 - main - zfs: merge openzfs/zfs@a1daebfec
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: mm
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 88d72ecb8554acfa7de1d2839e85c53a9db50c41
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 14:36:51 +0000
Message-Id: <6b044f83.f9bb.4c49841e@gitrepo.freebsd.org>

The branch main has been updated by mm:

URL: https://cgit.FreeBSD.org/src/commit/?id=88d72ecb8554acfa7de1d2839e85c53a9db50c41

commit 88d72ecb8554acfa7de1d2839e85c53a9db50c41
Merge: 927151737725 a1daebfec3f5
Author:     Martin Matuska <mm@FreeBSD.org>
AuthorDate: 2026-11-23 14:35:43 +0000
Commit:     Martin Matuska <mm@FreeBSD.org>
CommitDate: 2026-11-23 14:35:43 +0000

    zfs: merge openzfs/zfs@a1daebfec
    
    Notable upstream pull request merges:
     #18910 f53b6403e Keep the local key where a raw receive brings a foreign
                      one
     #19226 f765c2d2b zio: don't write dedup copies from an override BP's data
     #19280 -multiple dmu_recv: split WRITE_EMBEDDED records that don't match
                      block size
     #19305 e25bc5b83 Read the objset in the fadvise handlers after entering
     #19311 470e0e81f zcp: check clone names with clone_namecheck()
     #19317 9ac6648a2 spa: keep ZIL claims relative to the loaded txg
     #19484 7865f6b5f dsl_scan: fix scan-prefetch shutdown race leaking stale
                      queue entries
     #19490 495cc5f52 dsl_userhold: free on-close state when the pool is
                      unavailable
     #19494 13793f363 zpool remove: erase log labels once the hole is on disk
     #19548 b054fbbe5 Set fletcher4 fastest uses_fpu from both byte orders
     #19677 -multiple zio: retain device injection provenance
     #19746 -multiple FreeBSD: Reduce unnecessary SPL wrappers - #19746
     #19749 -multiple Fix resuming a send of large blocks
     #19753 f14af7b0f freebsd: prefer sys/stdarg.h where available
     #19757 396749c16 Kick the autotrim threads when autotrim is off
     #19815 8044ee28e Don't busy-loop in txg_sync_thread() while the pool is
                      suspended
     #19868 1b1aa0e91 FreeBSD: Fix append-only semantics
     #19870 f9fe597ff Terminate the string fields of zfs_cmd_t and drr_toname
    
    Obtained from:  OpenZFS
    OpenZFS commit: a1daebfec3f5ca46ac261ef339efdf0dbeae997c

 sys/contrib/openzfs/.github/workflows/README.md    |  38 +++-
 sys/contrib/openzfs/.github/workflows/labels.yml   | 166 ++++++++++++---
 .../.github/workflows/scripts/debian-user-deps.sh  |   7 +
 .../.github/workflows/scripts/qemu-2-start.sh      |  22 +-
 .../.github/workflows/scripts/qemu-3-deps-vm.sh    |  26 +--
 .../.github/workflows/scripts/qemu-3-deps.sh       |   2 +-
 .../.github/workflows/scripts/qemu-5-setup.sh      |  14 +-
 .../.github/workflows/scripts/qemu-6-tests.sh      |   6 +
 .../openzfs/.github/workflows/scripts/reuse-ci.py  | 138 +++++++++----
 .../openzfs/.github/workflows/unit-tests.yml       |   3 +-
 sys/contrib/openzfs/.github/workflows/zfs-qemu.yml |   3 +-
 sys/contrib/openzfs/cmd/zdb/zdb.c                  |  13 +-
 sys/contrib/openzfs/cmd/zfs/zfs_main.c             |   5 +
 sys/contrib/openzfs/cmd/ztest.c                    |  99 +++++++++
 sys/contrib/openzfs/config/user-libudev.m4         |   3 +
 .../contrib/pyzfs/libzfs_core/_libzfs_core.py      |   2 +-
 .../system-generators/zfs-mount-generator.c        |   2 +-
 .../openzfs/include/os/freebsd/spl/sys/vnode.h     |  15 --
 .../include/os/freebsd/spl/sys/vnode_impl.h        |   4 -
 sys/contrib/openzfs/include/sys/spa_impl.h         |   1 +
 sys/contrib/openzfs/include/sys/zio.h              |   1 +
 sys/contrib/openzfs/include/zfs_deleg.h            |   1 +
 sys/contrib/openzfs/include/zfs_namecheck.h        |   1 +
 sys/contrib/openzfs/lib/libspl/include/Makefile.am |   1 -
 .../openzfs/lib/libspl/include/sys/asm_linkage.h   |  32 ---
 sys/contrib/openzfs/lib/libzfs/libzfs.abi          |   7 +
 .../lib/libzutil/os/linux/zutil_import_os.c        |  73 ++++---
 sys/contrib/openzfs/man/Makefile.am                |   2 +-
 sys/contrib/openzfs/man/man4/zfs.4                 |   6 +-
 sys/contrib/openzfs/man/man8/zfs-allow.8           |   3 +-
 .../openzfs/man/man8/zfs-mount-generator.8.in      |  17 +-
 sys/contrib/openzfs/man/man8/zpool-offline.8       |   4 +-
 sys/contrib/openzfs/module/Makefile.in             |   2 +-
 .../openzfs/module/icp/algs/aes/aes_impl_x86-64.c  |  19 +-
 .../openzfs/module/icp/algs/sha2/sha256_impl.c     |   9 +-
 .../openzfs/module/icp/algs/sha2/sha512_impl.c     |   9 +-
 .../openzfs/module/os/freebsd/spl/spl_string.c     |   5 +
 .../openzfs/module/os/freebsd/zfs/zfs_acl.c        |  13 +-
 .../openzfs/module/os/freebsd/zfs/zfs_vfsops.c     |   8 +-
 .../openzfs/module/os/freebsd/zfs/zfs_vnops_os.c   |  57 +++---
 .../openzfs/module/os/freebsd/zfs/zfs_znode_os.c   |   4 +-
 .../openzfs/module/os/linux/spl/spl-taskq.c        |  26 ++-
 .../openzfs/module/os/linux/zfs/zfs_vnops_os.c     |  22 +-
 .../openzfs/module/os/linux/zfs/zfs_znode_os.c     |  94 +++++----
 sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c |   4 +-
 sys/contrib/openzfs/module/zcommon/zfs_fletcher.c  |  11 +-
 sys/contrib/openzfs/module/zcommon/zfs_namecheck.c |  24 +++
 sys/contrib/openzfs/module/zcommon/zfs_valstr.c    |   2 +
 sys/contrib/openzfs/module/zfs/dmu_recv.c          | 166 ++++++++++++---
 sys/contrib/openzfs/module/zfs/dmu_send.c          |  14 +-
 sys/contrib/openzfs/module/zfs/dsl_crypt.c         |  44 ++++
 sys/contrib/openzfs/module/zfs/dsl_scan.c          |  18 +-
 sys/contrib/openzfs/module/zfs/dsl_userhold.c      |  11 +-
 sys/contrib/openzfs/module/zfs/spa.c               |  13 +-
 sys/contrib/openzfs/module/zfs/spa_misc.c          |   2 +-
 sys/contrib/openzfs/module/zfs/txg.c               |  11 +-
 sys/contrib/openzfs/module/zfs/vdev_removal.c      |  30 ++-
 sys/contrib/openzfs/module/zfs/zcp_synctask.c      |  22 +-
 sys/contrib/openzfs/module/zfs/zfs_ioctl.c         |  14 +-
 sys/contrib/openzfs/module/zfs/zfs_vnops.c         |   9 +-
 sys/contrib/openzfs/module/zfs/zil.c               |  17 +-
 sys/contrib/openzfs/module/zfs/zio.c               |  23 ++-
 sys/contrib/openzfs/module/zfs/zio_inject.c        |   3 +-
 sys/contrib/openzfs/scripts/commitcheck.sh         |   7 +-
 sys/contrib/openzfs/tests/runfiles/common.run      |  27 ++-
 sys/contrib/openzfs/tests/runfiles/freebsd.run     |   3 +-
 sys/contrib/openzfs/tests/runfiles/linux.run       |   4 +-
 .../openzfs/tests/test-runner/bin/zts-report.py.in |   1 -
 sys/contrib/openzfs/tests/unit/README.md           |   2 +-
 sys/contrib/openzfs/tests/unit/test_namecheck.c    |  51 +++++
 sys/contrib/openzfs/tests/zfs-tests/cmd/.gitignore |   2 +
 .../openzfs/tests/zfs-tests/cmd/Makefile.am        |   8 +-
 .../openzfs/tests/zfs-tests/cmd/append_only_ops.c  | 184 +++++++++++++++++
 .../tests/zfs-tests/cmd/ioctl_unterminated.c       | 227 +++++++++++++++++++++
 .../openzfs/tests/zfs-tests/cmd/mmap_libaio.c      |   5 +-
 .../openzfs/tests/zfs-tests/include/commands.cfg   |   4 +-
 .../openzfs/tests/zfs-tests/tests/Makefile.am      |  26 +++
 .../block_cloning_copyfilerange_appendonly.ksh     |  65 ++++++
 .../synctask_core/tst.clone_neg.ksh                |  38 ++++
 .../synctask_core/tst.clone_neg.zcp                |  21 ++
 .../tests/functional/chattr/chattr_003_neg.ksh     |  94 +++++++++
 .../tests/functional/chattr/chattr_004_neg.ksh     |  88 ++++++++
 .../functional/cli_root/zdb/zdb_objset_id.ksh      |  15 +-
 .../zfs_change-key/blockfiles/key_mismatch.dat.bz2 | Bin 0 -> 200043 bytes
 .../zfs_change-key/zfs_change-key_mismatch.ksh     |  84 ++++----
 .../functional/cli_root/zinject/zinject_args.ksh   |  10 +-
 .../zpool_import/import_rewind_zil_claim.ksh       |  83 ++++++++
 .../tests/functional/crtime/crtime_001_pos.ksh     |  10 +-
 .../tests/functional/deadman/deadman_sync.ksh      |   4 +
 .../functional/dedup/dedup_override_copies.ksh     |  86 ++++++++
 .../tests/functional/direct/dio_read_verify.ksh    |  40 +++-
 .../functional/events/zed_synchronous_zedlet.ksh   |   7 +-
 .../functional/fault/suspend_txg_sync_idle.ksh     | 149 ++++++++++++++
 .../gang_blocks/gang_blocks_special_fallback.ksh   |   6 +-
 .../libzfs/libzfs_unterminated_strings.ksh         | 116 +++++++++++
 .../tests/zfs-tests/tests/functional/mmp/mmp.cfg   |   8 +-
 .../zfs-tests/tests/functional/mmp/mmp.kshlib      |   2 +-
 .../tests/functional/mmp/mmp_concurrent_import.ksh |   7 +-
 .../tests/functional/mmp/mmp_zhack_reclaim.ksh     |   7 +-
 .../tests/functional/procfs/taskq_summary_race.ksh |  78 +++++++
 .../raidz/raidz_expand_boundary_repair.ksh         |  52 +++--
 .../functional/refreserv/refreserv_004_pos.ksh     |  20 +-
 .../rsend/embedded-blksz-mismatch.zsend.bz2        | Bin 0 -> 3471 bytes
 .../rsend/embedded-compress-empty.zsend.bz2        | Bin 0 -> 3464 bytes
 .../rsend/embedded-compress-inherit.zsend.bz2      | Bin 0 -> 3492 bytes
 .../rsend/embedded-compress-off.zsend.bz2          | Bin 0 -> 3511 bytes
 .../rsend/embedded-compress-on.zsend.bz2           | Bin 0 -> 3508 bytes
 .../embedded-uncompressed-112-len4096.zsend.bz2    | Bin 0 -> 3547 bytes
 .../rsend/embedded-uncompressed-112.zsend.bz2      | Bin 0 -> 3506 bytes
 .../rsend/embedded-uncompressed-64.zsend.bz2       | Bin 0 -> 3508 bytes
 .../functional/rsend/recv_embedded_blksz_neg.ksh   |  69 +++++++
 .../rsend/recv_embedded_compress_neg.ksh           | 111 ++++++++++
 .../rsend/recv_embedded_uncompressed_neg.ksh       | 117 +++++++++++
 .../functional/rsend/send-L_toggle_resume.ksh      | 128 ++++++++++++
 .../send_embedded_large_block_incremental.ksh      |  99 +++++++++
 .../functional/rsend/send_raw_inherited_key.ksh    | 126 ++++++++++++
 .../rsend/send_resume_split_large_block.ksh        | 107 ++++++++++
 .../slog/slog_replay_volume_split_boundary.ksh     |   4 +-
 .../slog/slog_replay_volume_split_write.ksh        |   9 +-
 .../functional/zvol/zvol_stress/zvol_stress.ksh    |  11 +-
 sys/modules/zfs/zfs_config.h                       |  13 +-
 sys/modules/zfs/zfs_gitrev.h                       |   2 +-
 122 files changed, 3365 insertions(+), 495 deletions(-)

diff --cc sys/contrib/openzfs/.github/workflows/scripts/debian-user-deps.sh
index 000000000000,8376981ed53a..8376981ed53a
mode 000000,100755..100755
--- a/sys/contrib/openzfs/.github/workflows/scripts/debian-user-deps.sh
+++ b/sys/contrib/openzfs/.github/workflows/scripts/debian-user-deps.sh
diff --cc sys/contrib/openzfs/tests/zfs-tests/cmd/append_only_ops.c
index 000000000000,4ece086ace4f..4ece086ace4f
mode 000000,100644..100644
--- a/sys/contrib/openzfs/tests/zfs-tests/cmd/append_only_ops.c
+++ b/sys/contrib/openzfs/tests/zfs-tests/cmd/append_only_ops.c
diff --cc sys/contrib/openzfs/tests/zfs-tests/cmd/ioctl_unterminated.c
index 000000000000,b62a31235288..b62a31235288
mode 000000,100644..100644
--- a/sys/contrib/openzfs/tests/zfs-tests/cmd/ioctl_unterminated.c
+++ b/sys/contrib/openzfs/tests/zfs-tests/cmd/ioctl_unterminated.c
diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_appendonly.ksh
index 000000000000,dfb5fc8d8584..dfb5fc8d8584
mode 000000,100755..100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_appendonly.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_appendonly.ksh
diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.clone_neg.ksh
index 000000000000,405122afb930..405122afb930
mode 000000,100755..100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.clone_neg.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.clone_neg.ksh
diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.clone_neg.zcp
index 000000000000,fd4f55a413a4..fd4f55a413a4
mode 000000,100644..100644
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.clone_neg.zcp
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.clone_neg.zcp
diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/chattr/chattr_003_neg.ksh
index 000000000000,987799c029d9..987799c029d9
mode 000000,100755..100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/chattr/chattr_003_neg.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/chattr/chattr_003_neg.ksh
diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/chattr/chattr_004_neg.ksh
index 000000000000,4436dcc5dc1c..4436dcc5dc1c
mode 000000,100755..100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/chattr/chattr_004_neg.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/chattr/chattr_004_neg.ksh
diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_change-key/blockfiles/key_mismatch.dat.bz2
index 000000000000,82df2b4a1538..82df2b4a1538
mode 000000,100644..100644
Binary files differ
diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/import_rewind_zil_claim.ksh
index 000000000000,b5c2ecb4c92c..b5c2ecb4c92c
mode 000000,100755..100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/import_rewind_zil_claim.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/import_rewind_zil_claim.ksh
diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/dedup/dedup_override_copies.ksh
index 000000000000,6cf99b01a4d9..6cf99b01a4d9
mode 000000,100755..100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/dedup/dedup_override_copies.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/dedup/dedup_override_copies.ksh
diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/fault/suspend_txg_sync_idle.ksh
index 000000000000,1289f15020c1..1289f15020c1
mode 000000,100755..100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/fault/suspend_txg_sync_idle.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/fault/suspend_txg_sync_idle.ksh
diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/libzfs/libzfs_unterminated_strings.ksh
index 000000000000,f9d4d6925668..f9d4d6925668
mode 000000,100755..100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/libzfs/libzfs_unterminated_strings.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/libzfs/libzfs_unterminated_strings.ksh
diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/procfs/taskq_summary_race.ksh
index 000000000000,953d4782547f..953d4782547f
mode 000000,100755..100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/procfs/taskq_summary_race.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/procfs/taskq_summary_race.ksh
diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/embedded-blksz-mismatch.zsend.bz2
index 000000000000,15649effaf0e..15649effaf0e
mode 000000,100644..100644
Binary files differ
diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/embedded-compress-empty.zsend.bz2
index 000000000000,3fc363b0fc09..3fc363b0fc09
mode 000000,100644..100644
Binary files differ
diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/embedded-compress-inherit.zsend.bz2
index 000000000000,a90c2710ea99..a90c2710ea99
mode 000000,100644..100644
Binary files differ
diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/embedded-compress-off.zsend.bz2
index 000000000000,ea717df871a7..ea717df871a7
mode 000000,100644..100644
Binary files differ
diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/embedded-compress-on.zsend.bz2
index 000000000000,cdb0a7c509e6..cdb0a7c509e6
mode 000000,100644..100644
Binary files differ
diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/embedded-uncompressed-112-len4096.zsend.bz2
index 000000000000,921e3c0c3174..921e3c0c3174
mode 000000,100644..100644
Binary files differ
diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/embedded-uncompressed-112.zsend.bz2
index 000000000000,fe8d413b9003..fe8d413b9003
mode 000000,100644..100644
Binary files differ
diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/embedded-uncompressed-64.zsend.bz2
index 000000000000,65f708ef9cd8..65f708ef9cd8
mode 000000,100644..100644
Binary files differ
diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/recv_embedded_blksz_neg.ksh
index 000000000000,af24ccbbed37..af24ccbbed37
mode 000000,100755..100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/recv_embedded_blksz_neg.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/recv_embedded_blksz_neg.ksh
diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/recv_embedded_compress_neg.ksh
index 000000000000,420cbb2f945e..420cbb2f945e
mode 000000,100755..100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/recv_embedded_compress_neg.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/recv_embedded_compress_neg.ksh
diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/recv_embedded_uncompressed_neg.ksh
index 000000000000,d2d0fe7f605b..d2d0fe7f605b
mode 000000,100755..100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/recv_embedded_uncompressed_neg.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/recv_embedded_uncompressed_neg.ksh
diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/send-L_toggle_resume.ksh
index 000000000000,e808b7fc5094..e808b7fc5094
mode 000000,100755..100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/send-L_toggle_resume.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/send-L_toggle_resume.ksh
diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/send_embedded_large_block_incremental.ksh
index 000000000000,b18a2eb974cf..b18a2eb974cf
mode 000000,100755..100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/send_embedded_large_block_incremental.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/send_embedded_large_block_incremental.ksh
diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/send_raw_inherited_key.ksh
index 000000000000,2e4875ed7fc4..2e4875ed7fc4
mode 000000,100755..100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/send_raw_inherited_key.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/send_raw_inherited_key.ksh
diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/send_resume_split_large_block.ksh
index 000000000000,81ce066c1e9d..81ce066c1e9d
mode 000000,100755..100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/send_resume_split_large_block.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/rsend/send_resume_split_large_block.ksh
diff --cc sys/modules/zfs/zfs_config.h
index f4ee527af3d0,000000000000..c086ac1acfda
mode 100644,000000..100644
--- a/sys/modules/zfs/zfs_config.h
+++ b/sys/modules/zfs/zfs_config.h
@@@ -1,908 -1,0 +1,917 @@@
 +/*
 + */
 +
 +/* zfs_config.h.  Generated from zfs_config.h.in by configure.  */
 +/* zfs_config.h.in.  Generated from configure.ac by autoheader.  */
 +
 +/* Define to 1 to disable ZFS channel program support */
 +/* #undef DISABLE_ZCP */
 +
 +/* __assign_str() has one arg */
 +/* #undef HAVE_1ARG_ASSIGN_STR */
 +
 +/* lookup_bdev() wants 1 arg */
 +/* #undef HAVE_1ARG_LOOKUP_BDEV */
 +
 +/* kernel has access_ok with 'type' parameter */
 +/* #undef HAVE_ACCESS_OK_TYPE */
 +
 +/* add_disk() returns int */
 +/* #undef HAVE_ADD_DISK_RET */
 +
 +/* Define if you have [rt] */
 +#define HAVE_AIO_H 1
 +
 +/* Define if your assembler supports .cfi_negate_ra_state. */
 +/* #undef HAVE_AS_CFI_PSEUDO_OP */
 +
 +/* backtrace() is available */
 +/* #undef HAVE_BACKTRACE */
 +
 +/* bdevname() is available */
 +/* #undef HAVE_BDEVNAME */
 +
 +/* bdev_check_media_change() exists */
 +/* #undef HAVE_BDEV_CHECK_MEDIA_CHANGE */
 +
 +/* bdev_file_open_by_path() exists */
 +/* #undef HAVE_BDEV_FILE_OPEN_BY_PATH */
 +
 +/* bdev_*_io_acct() available */
 +/* #undef HAVE_BDEV_IO_ACCT_63 */
 +
 +/* bdev_*_io_acct() available */
 +/* #undef HAVE_BDEV_IO_ACCT_OLD */
 +
 +/* bdev_kobj() exists */
 +/* #undef HAVE_BDEV_KOBJ */
 +
 +/* bdev_max_discard_sectors() is available */
 +/* #undef HAVE_BDEV_MAX_DISCARD_SECTORS */
 +
 +/* bdev_max_secure_erase_sectors() is available */
 +/* #undef HAVE_BDEV_MAX_SECURE_ERASE_SECTORS */
 +
 +/* bdev_nr_bytes() is available */
 +/* #undef HAVE_BDEV_NR_BYTES */
 +
 +/* bdev_open_by_path() exists */
 +/* #undef HAVE_BDEV_OPEN_BY_PATH */
 +
 +/* bdev_release() exists */
 +/* #undef HAVE_BDEV_RELEASE */
 +
 +/* block_device_operations->submit_bio() returns void */
 +/* #undef HAVE_BDEV_SUBMIT_BIO_RETURNS_VOID */
 +
 +/* bdev_whole() is available */
 +/* #undef HAVE_BDEV_WHOLE */
 +
 +/* bio_alloc() takes 4 arguments */
 +/* #undef HAVE_BIO_ALLOC_4ARG */
 +
 +/* bio->bi_bdev->bd_disk exists */
 +/* #undef HAVE_BIO_BDEV_DISK */
 +
 +/* bio_*_io_acct() available */
 +/* #undef HAVE_BIO_IO_ACCT */
 +
 +/* bio_max_segs() is implemented */
 +/* #undef HAVE_BIO_MAX_SEGS */
 +
 +/* bio_set_dev() GPL-only */
 +/* #undef HAVE_BIO_SET_DEV_GPL_ONLY */
 +
 +/* bio_set_dev() is a macro */
 +/* #undef HAVE_BIO_SET_DEV_MACRO */
 +
 +/* bio_set_op_attrs is available */
 +/* #undef HAVE_BIO_SET_OP_ATTRS */
 +
 +/* blkdev_get_by_path() exists and takes 4 args */
 +/* #undef HAVE_BLKDEV_GET_BY_PATH_4ARG */
 +
 +/* blkdev_get_by_path() handles ERESTARTSYS */
 +/* #undef HAVE_BLKDEV_GET_ERESTARTSYS */
 +
 +/* __blkdev_issue_discard(flags) is available */
 +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_ASYNC_FLAGS */
 +
 +/* __blkdev_issue_discard() is available */
 +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_ASYNC_NOFLAGS */
 +
 +/* blkdev_issue_discard(flags) is available */
 +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_FLAGS */
 +
 +/* blkdev_issue_discard() is available */
 +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_NOFLAGS */
 +
 +/* blkdev_issue_secure_erase() is available */
 +/* #undef HAVE_BLKDEV_ISSUE_SECURE_ERASE */
 +
 +/* blkdev_put() exists */
 +/* #undef HAVE_BLKDEV_PUT */
 +
 +/* blkdev_put() accepts void* as arg 2 */
 +/* #undef HAVE_BLKDEV_PUT_HOLDER */
 +
 +/* struct queue_limits has a features field */
 +/* #undef HAVE_BLKDEV_QUEUE_LIMITS_FEATURES */
 +
 +/* struct queue_limits has max_hw_wzeroes_unmap_sectors */
 +/* #undef HAVE_BLKDEV_QUEUE_LIMITS_WZEROES_UNMAP */
 +
 +/* blkdev_reread_part() exists */
 +/* #undef HAVE_BLKDEV_REREAD_PART */
 +
 +/* blkg_tryget() is available */
 +/* #undef HAVE_BLKG_TRYGET */
 +
 +/* blkg_tryget() GPL-only */
 +/* #undef HAVE_BLKG_TRYGET_GPL_ONLY */
 +
 +/* blk_alloc_disk() exists */
 +/* #undef HAVE_BLK_ALLOC_DISK */
 +
 +/* blk_alloc_disk() exists and takes 2 args */
 +/* #undef HAVE_BLK_ALLOC_DISK_2ARG */
 +
 +/* blk_alloc_queue() expects request function */
 +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN */
 +
 +/* blk_alloc_queue_rh() expects request function */
 +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH */
 +
 +/* blk_cleanup_disk() exists */
 +/* #undef HAVE_BLK_CLEANUP_DISK */
 +
 +/* blk_mode_t is defined */
 +/* #undef HAVE_BLK_MODE_T */
 +
 +/* block multiqueue hardware context is cached in struct request */
 +/* #undef HAVE_BLK_MQ_RQ_HCTX */
 +
 +/* blk queue backing_dev_info is dynamic */
 +/* #undef HAVE_BLK_QUEUE_BDI_DYNAMIC */
 +
 +/* blk_queue_discard() is available */
 +/* #undef HAVE_BLK_QUEUE_DISCARD */
 +
 +/* backing_dev_info is available through queue gendisk */
 +/* #undef HAVE_BLK_QUEUE_DISK_BDI */
 +
 +/* blk_queue_rot() is available */
 +/* #undef HAVE_BLK_QUEUE_ROT */
 +
 +/* blk_queue_secure_erase() is available */
 +/* #undef HAVE_BLK_QUEUE_SECURE_ERASE */
 +
 +/* blk_queue_update_readahead() exists */
 +/* #undef HAVE_BLK_QUEUE_UPDATE_READAHEAD */
 +
 +/* BLK_STS_RESV_CONFLICT is defined */
 +/* #undef HAVE_BLK_STS_RESV_CONFLICT */
 +
 +/* Define if getgeo() in block_device_operations takes struct gendisk * as its
 +   first arg */
 +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_GETGEO_GENDISK */
 +
 +/* Define if release() in block_device_operations takes 1 arg */
 +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG */
 +
 +/* Define if revalidate_disk() in block_device_operations */
 +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK */
 +
 +/* bvec_iter has bi_offset */
 +/* #undef HAVE_BVEC_ITER_OFFSET */
 +
 +/* check_disk_change() exists */
 +/* #undef HAVE_CHECK_DISK_CHANGE */
 +
 +/* copy_splice_read exists */
 +/* #undef HAVE_COPY_SPLICE_READ */
 +
 +/* cpu_has_feature() is GPL-only */
 +/* #undef HAVE_CPU_HAS_FEATURE_GPL_ONLY */
 +
 +/* DECLARE_EVENT_CLASS() is available */
 +/* #undef HAVE_DECLARE_EVENT_CLASS */
 +
 +/* dentry aliases are in d_u member */
 +/* #undef HAVE_DENTRY_D_U_ALIASES */
 +
 +/* 3-arg dequeue_signal() takes a type argument */
 +/* #undef HAVE_DEQUEUE_SIGNAL_3ARG_TYPE */
 +
 +/* dequeue_signal() takes 4 arguments */
 +/* #undef HAVE_DEQUEUE_SIGNAL_4ARG */
 +
 +/* lookup_bdev() wants dev_t arg */
 +/* #undef HAVE_DEVT_LOOKUP_BDEV */
 +
 +/* disk_check_media_change() exists */
 +/* #undef HAVE_DISK_CHECK_MEDIA_CHANGE */
 +
 +/* disk_*_io_acct() available */
 +/* #undef HAVE_DISK_IO_ACCT */
 +
 +/* disk_update_readahead() exists */
 +/* #undef HAVE_DISK_UPDATE_READAHEAD */
 +
 +/* Define to 1 if you have the <dlfcn.h> header file. */
 +#define HAVE_DLFCN_H 1
 +
 +/* dops->d_revalidate() takes 4 args */
 +/* #undef HAVE_D_REVALIDATE_4ARGS */
 +
 +/* Define if d_set_d_op() is available */
 +/* #undef HAVE_D_SET_D_OP */
 +
 +/* Define to 1 if you have the 'execvpe' function. */
 +#define HAVE_EXECVPE 1
 +
 +/* fault_in_iov_iter_readable() is available */
 +/* #undef HAVE_FAULT_IN_IOV_ITER_READABLE */
 +
 +/* linux/filelock.h exists */
 +/* #undef HAVE_FILELOCK_HEADER */
 +
 +/* file->f_version exists */
 +/* #undef HAVE_FILE_F_VERSION */
 +
 +/* flush_dcache_page() is GPL-only */
 +/* #undef HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY */
 +
 +/* use __flush_workqueue() to flush delay workqueue */
 +/* #undef HAVE_FLUSH_DELAY_WORKQUEUE_INTERNAL */
 +
 +/* use system_delay_wq for delay workqueue */
 +/* #undef HAVE_FLUSH_DELAY_WORKQUEUE_PERCPU */
 +
 +/* follow_down() takes a flags parameter */
 +/* #undef HAVE_FOLLOW_DOWN_FLAGS */
 +
 +/* Define if compiler supports -Wformat-overflow */
 +/* #undef HAVE_FORMAT_OVERFLOW */
 +
 +/* fsync_bdev() is declared in include/blkdev.h */
 +/* #undef HAVE_FSYNC_BDEV */
 +
 +/* fs_context exists */
 +/* #undef HAVE_FS_CONTEXT */
 +
 +/* fs_parse() takes fs_parameter_spec directly */
 +/* #undef HAVE_FS_PARSE_TAKES_SPEC */
 +
 +/* yes */
 +/* #undef HAVE_GENERIC_FADVISE */
 +
 +/* generic_fillattr requires request_mask */
 +/* #undef HAVE_GENERIC_FILLATTR_IDMAP_REQMASK */
 +
 +/* generic_*_io_acct() 4 arg available */
 +/* #undef HAVE_GENERIC_IO_ACCT_4ARG */
 +
 +/* GENHD_FL_EXT_DEVT flag is available */
 +/* #undef HAVE_GENHD_FL_EXT_DEVT */
 +
 +/* GENHD_FL_NO_PART flag is available */
 +/* #undef HAVE_GENHD_FL_NO_PART */
 +
 +/* Define to 1 if you have the 'gettid' function. */
 +/* #undef HAVE_GETTID */
 +
 +/* iops->get_acl() exists */
 +/* #undef HAVE_GET_ACL */
 +
 +/* iops->get_acl() takes rcu */
 +/* #undef HAVE_GET_ACL_RCU */
 +
 +/* has iops->get_inode_acl() */
 +/* #undef HAVE_GET_INODE_ACL */
 +
 +/* iattr->ia_vfsuid and iattr->ia_vfsgid exist */
 +/* #undef HAVE_IATTR_VFSID */
 +
 +/* id mapping mechanism is mnt_idmap */
 +/* #undef HAVE_IDMAP_MNTIDMAP */
 +
 +/* mnt_idmap does not have user_namespace */
 +/* #undef HAVE_IDMAP_NO_USERNS */
 +
 +/* id mapping mechanism is user_namespace */
 +/* #undef HAVE_IDMAP_USERNS */
 +
 +/* Define if compiler supports -Wimplicit-fallthrough */
 +/* #undef HAVE_IMPLICIT_FALLTHROUGH */
 +
 +/* Define if compiler supports -Winfinite-recursion */
 +/* #undef HAVE_INFINITE_RECURSION */
 +
 +/* inode_generic_drop() exists */
 +/* #undef HAVE_INODE_GENERIC_DROP */
 +
 +/* inode_get_atime() exists in linux/fs.h */
 +/* #undef HAVE_INODE_GET_ATIME */
 +
 +/* inode_get_ctime() exists in linux/fs.h */
 +/* #undef HAVE_INODE_GET_CTIME */
 +
 +/* inode_get_mtime() exists in linux/fs.h */
 +/* #undef HAVE_INODE_GET_MTIME */
 +
 +/* inode_set_atime_to_ts() exists in linux/fs.h */
 +/* #undef HAVE_INODE_SET_ATIME_TO_TS */
 +
 +/* inode_set_ctime_to_ts() exists in linux/fs.h */
 +/* #undef HAVE_INODE_SET_CTIME_TO_TS */
 +
 +/* inode_set_mtime_to_ts() exists in linux/fs.h */
 +/* #undef HAVE_INODE_SET_MTIME_TO_TS */
 +
 +/* inode_state_read_once() exists */
 +/* #undef HAVE_INODE_STATE_READ_ONCE */
 +
 +/* timestamp_truncate() exists */
 +/* #undef HAVE_INODE_TIMESTAMP_TRUNCATE */
 +
 +/* Define to 1 if you have the <inttypes.h> header file. */
 +#define HAVE_INTTYPES_H 1
 +
 +/* iops->create() does not take a flag arg */
 +/* #undef HAVE_IOPS_CREATE_NO_FLAG_ARG */
 +
 +/* iov_iter_get_pages2() is available */
 +/* #undef HAVE_IOV_ITER_GET_PAGES2 */
 +
 +/* iov_iter_type() is available */
 +/* #undef HAVE_IOV_ITER_TYPE */
 +
 +/* Define to 1 if you have the 'issetugid' function. */
 +#define HAVE_ISSETUGID 1
 +
 +/* iter_iov() is available */
 +/* #undef HAVE_ITER_IOV */
 +
 +/* iter_is_ubuf() is available */
 +/* #undef HAVE_ITER_IS_UBUF */
 +
 +/* kasan_enabled() is GPL-only */
 +/* #undef HAVE_KASAN_ENABLED_GPL_ONLY */
 +
 +/* Define if kernel toolchain supports AES */
 +/* #undef HAVE_KERNEL_AES */
 +
 +/* Define if kernel toolchain supports AVX */
 +/* #undef HAVE_KERNEL_AVX */
 +
 +/* Define if kernel toolchain supports AVX2 */
 +/* #undef HAVE_KERNEL_AVX2 */
 +
 +/* Define if kernel toolchain supports AVX512BW */
 +/* #undef HAVE_KERNEL_AVX512BW */
 +
 +/* Define if kernel toolchain supports AVX512F */
 +/* #undef HAVE_KERNEL_AVX512F */
 +
 +/* Define if kernel toolchain supports AVX512VL */
 +/* #undef HAVE_KERNEL_AVX512VL */
 +
 +/* kernel crypto API is available */
 +/* #undef HAVE_KERNEL_CRYPTO */
 +
 +/* kernel has kernel_fpu_* functions */
 +/* #undef HAVE_KERNEL_FPU */
 +
 +/* kernel has asm/fpu/api.h */
 +/* #undef HAVE_KERNEL_FPU_API_HEADER */
 +
 +/* kernel fpu internal */
 +/* #undef HAVE_KERNEL_FPU_INTERNAL */
 +
 +/* kernel has asm/fpu/internal.h */
 +/* #undef HAVE_KERNEL_FPU_INTERNAL_HEADER */
 +
 +/* Define if compiler supports -Winfinite-recursion */
 +/* #undef HAVE_KERNEL_INFINITE_RECURSION */
 +
 +/* kernel defines intptr_t */
 +/* #undef HAVE_KERNEL_INTPTR_T */
 +
 +/* Define if kernel toolchain supports MOVBE */
 +/* #undef HAVE_KERNEL_MOVBE */
 +
 +/* kernel has kernel_neon_* functions */
 +/* #undef HAVE_KERNEL_NEON */
 +
 +/* kernel_neon_* take a user_fpsimd_state */
 +/* #undef HAVE_KERNEL_NEON_STATE */
 +
 +/* kernel does stack verification */
 +/* #undef HAVE_KERNEL_OBJTOOL */
 +
 +/* kernel has linux/objtool.h */
 +/* #undef HAVE_KERNEL_OBJTOOL_HEADER */
 +
 +/* Define if kernel toolchain supports PCLMULQDQ */
 +/* #undef HAVE_KERNEL_PCLMULQDQ */
 +
 +/* Define if kernel toolchain supports SHA512EXT */
 +/* #undef HAVE_KERNEL_SHA512EXT */
 +
 +/* Define if kernel toolchain supports SSE2 */
 +/* #undef HAVE_KERNEL_SSE2 */
 +
 +/* Define if kernel toolchain supports SSE4_1 */
 +/* #undef HAVE_KERNEL_SSE4_1 */
 +
 +/* Define if kernel toolchain supports SSSE3 */
 +/* #undef HAVE_KERNEL_SSSE3 */
 +
 +/* strlcpy() exists */
 +/* #undef HAVE_KERNEL_STRLCPY */
 +
 +/* Define if kernel toolchain supports VAES */
 +/* #undef HAVE_KERNEL_VAES */
 +
 +/* Define if kernel toolchain supports VPCLMULQDQ */
 +/* #undef HAVE_KERNEL_VPCLMULQDQ */
 +
 +/* Define if kernel toolchain supports XSAVE */
 +/* #undef HAVE_KERNEL_XSAVE */
 +
 +/* Define if kernel toolchain supports XSAVEOPT */
 +/* #undef HAVE_KERNEL_XSAVEOPT */
 +
 +/* Define if kernel toolchain supports XSAVES */
 +/* #undef HAVE_KERNEL_XSAVES */
 +
 +/* kernel has kmap_local_page */
 +/* #undef HAVE_KMAP_LOCAL_PAGE */
 +
 +/* Define if you have [aio] */
 +/* #undef HAVE_LIBAIO */
 +
 +/* Define if you have [blkid] */
 +/* #undef HAVE_LIBBLKID */
 +
 +/* Define if you have [crypto] */
 +#define HAVE_LIBCRYPTO 1
 +
 +/* Define if you have [tirpc] */
 +/* #undef HAVE_LIBTIRPC */
 +
 +/* Define if you have [udev] */
 +/* #undef HAVE_LIBUDEV */
 +
 +/* Define if you have [unwind] */
 +/* #undef HAVE_LIBUNWIND */
 +
 +/* libunwind has unw_get_elf_filename */
 +/* #undef HAVE_LIBUNWIND_ELF */
 +
 +/* Define if you have [uuid] */
 +/* #undef HAVE_LIBUUID */
 +
 +/* building against unsupported kernel version */
 +/* #undef HAVE_LINUX_EXPERIMENTAL */
 +
 +/* Noting that make_request_fn() returns blk_qc_t */
 +/* #undef HAVE_MAKE_REQUEST_FN_RET_QC */
 +
 +/* iops->mkdir() returns struct dentry* */
 +/* #undef HAVE_MKDIR_DENTRY_RETURN */
 +
 +/* Define to 1 if you have the 'mlockall' function. */
 +#define HAVE_MLOCKALL 1
 +
 +/* 'flags' in 'struct page' is a struct */
 +/* #undef HAVE_MM_PAGE_FLAGS_STRUCT */
 +
 +/* PG_error flag is available */
 +/* #undef HAVE_MM_PAGE_FLAG_ERROR */
 +
 +/* page_mapping() is available */
 +/* #undef HAVE_MM_PAGE_MAPPING */
 +
 +/* page_size() is available */
 +/* #undef HAVE_MM_PAGE_SIZE */
 +
 +/* mount_setattr() and struct mount_attr are available */
 +/* #undef HAVE_MOUNT_SETATTR */
 +
 +/* Define if ns_type is accessible through ns_common */
 +/* #undef HAVE_NS_COMMON_TYPE */
 +
 +/* folio_wait_bit() exists */
 +/* #undef HAVE_PAGEMAP_FOLIO_WAIT_BIT */
 +
 +/* readahead_page() exists */
 +/* #undef HAVE_PAGEMAP_READAHEAD_PAGE */
 +
 +/* part_to_dev() exists */
 +/* #undef HAVE_PART_TO_DEV */
 +
 +/* pin_user_pages_unlocked() is available */
 +/* #undef HAVE_PIN_USER_PAGES_UNLOCKED */
 +
 +/* posix_acl_to_xattr() allocates its result */
 +/* #undef HAVE_POSIX_ACL_TO_XATTR_ALLOC */
 +
 +/* Define to 1 if you have the 'preadv2' function. */
 +/* #undef HAVE_PREADV2 */
 +
 +/* proc_handler ctl_table arg is const */
 +/* #undef HAVE_PROC_HANDLER_CTL_TABLE_CONST */
 +
 +/* proc_ops structure exists */
 +/* #undef HAVE_PROC_OPS_STRUCT */
 +
 +/* Define if you have POSIX threads libraries and header files. */
 +#define HAVE_PTHREAD 1
 +
 +/* Have PTHREAD_PRIO_INHERIT. */
 +#define HAVE_PTHREAD_PRIO_INHERIT 1
 +
 +/* Define to 1 if you have the 'pwritev2' function. */
 +/* #undef HAVE_PWRITEV2 */
 +
 +/* If available, contains the Python version number currently in use. */
 +/* #undef HAVE_PYTHON */
 +
 +/* qat is enabled and existed */
 +/* #undef HAVE_QAT */
 +
 +/* struct reclaim_state has reclaimed */
 +/* #undef HAVE_RECLAIM_STATE_RECLAIMED */
 +
 +/* register_shrinker is vararg */
 +/* #undef HAVE_REGISTER_SHRINKER_VARARG */
 +
 +/* register_sysctl_sz exists */
 +/* #undef HAVE_REGISTER_SYSCTL_SZ */
 +
 +/* register_sysctl_table exists */
 +/* #undef HAVE_REGISTER_SYSCTL_TABLE */
 +
 +/* revalidate_disk() is available */
 +/* #undef HAVE_REVALIDATE_DISK */
 +
 +/* revalidate_disk_size() is available */
 +/* #undef HAVE_REVALIDATE_DISK_SIZE */
 +
 +/* rq_for_each_bvec() is available */
 +/* #undef HAVE_RQ_FOR_EACH_BVEC */
 +
 +/* Define to 1 if you have the <security/pam_modules.h> header file. */
 +#define HAVE_SECURITY_PAM_MODULES_H 1
 +
 +/* iops->set_acl() takes struct dentry */
 +/* #undef HAVE_SET_ACL_DENTRY */
 +
 +/* Define if set_default_d_op() is available */
 +/* #undef HAVE_SET_DEFAULT_D_OP */
 +
 +/* shrinker_register exists */
 +/* #undef HAVE_SHRINKER_REGISTER */
 +
 +/* kernel_siginfo_t exists */
 +/* #undef HAVE_SIGINFO */
 +
 +/* sops->free_inode() exists */
 +/* #undef HAVE_SOPS_FREE_INODE */
 +
 +/* STACK_FRAME_NON_STANDARD is defined */
 +/* #undef HAVE_STACK_FRAME_NON_STANDARD */
 +
 +/* STACK_FRAME_NON_STANDARD asm macro is defined */
 +/* #undef HAVE_STACK_FRAME_NON_STANDARD_ASM */
 +
 +/* standalone <linux/stdarg.h> exists */
 +/* #undef HAVE_STANDALONE_LINUX_STDARG */
 +
 +/* statx() is available */
 +/* #undef HAVE_STATX */
 +
 +/* STATX_MNT_ID is available */
 +/* #undef HAVE_STATX_MNT_ID */
 +
 +/* Define to 1 if you have the <stdint.h> header file. */
 +#define HAVE_STDINT_H 1
 +
 +/* Define to 1 if you have the <stdio.h> header file. */
 +#define HAVE_STDIO_H 1
 +
 +/* Define to 1 if you have the <stdlib.h> header file. */
 +#define HAVE_STDLIB_H 1
 +
 +/* Define to 1 if you have the <strings.h> header file. */
 +#define HAVE_STRINGS_H 1
 +
 +/* Define to 1 if you have the <string.h> header file. */
 +#define HAVE_STRING_H 1
 +
 +/* Define to 1 if you have the 'strlcat' function. */
 +#define HAVE_STRLCAT 1
 +
 +/* Define to 1 if you have the 'strlcpy' function. */
 +#define HAVE_STRLCPY 1
 +
 +/* submit_bio is member of struct block_device_operations */
 +/* #undef HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS */
 +
 +/* have super_block s_shrink */
 +/* #undef HAVE_SUPER_BLOCK_S_SHRINK */
 +
 +/* have super_block s_shrink pointer */
 +/* #undef HAVE_SUPER_BLOCK_S_SHRINK_PTR */
 +
 +/* have super_block s_wb_err */
 +/* #undef HAVE_SUPER_BLOCK_S_WB_ERR */
 +
 +/* Define if super_set_uuid() is available */
 +/* #undef HAVE_SUPER_SET_UUID */
 +
 +/* sync_blockdev() is declared in include/blkdev.h */
 +/* #undef HAVE_SYNC_BLOCKDEV */
 +
 +/* struct kobj_type has default_groups */
 +/* #undef HAVE_SYSFS_DEFAULT_GROUPS */
 +
 +/* Define to 1 if you have the <sys/stat.h> header file. */
 +#define HAVE_SYS_STAT_H 1
 +
 +/* Define to 1 if you have the <sys/types.h> header file. */
 +#define HAVE_SYS_TYPES_H 1
 +
 +/* timer_delete_sync is available */
 +/* #undef HAVE_TIMER_DELETE_SYNC */
 +
 +/* i_op->tmpfile() uses takes struct file */
 +/* #undef HAVE_TMPFILE_FILE */
 +
 +/* Define if host toolchain supports AES */
 +#define HAVE_TOOLCHAIN_AES 1
 +
 +#ifdef __amd64__
 +#ifndef RESCUE
 +/* Define if host toolchain supports AVX */
 +#define HAVE_TOOLCHAIN_AVX 1
 +
 +/* Define if host toolchain supports AVX2 */
 +#define HAVE_TOOLCHAIN_AVX2 1
 +#endif
 +
 +/* Define if host toolchain supports AVX512BW */
 +#define HAVE_TOOLCHAIN_AVX512BW 1
 +
 +/* Define if host toolchain supports AVX512F */
 +#define HAVE_TOOLCHAIN_AVX512F 1
 +
 +/* Define if host toolchain supports AVX512VL */
 +#define HAVE_TOOLCHAIN_AVX512VL 1
 +#endif
 +
 +/* Define if host toolchain supports MOVBE */
 +#define HAVE_TOOLCHAIN_MOVBE 1
 +
 +/* Define if host toolchain supports PCLMULQDQ */
 +#define HAVE_TOOLCHAIN_PCLMULQDQ 1
 +
*** 247 LINES SKIPPED ***

From nobody Mon Nov 23 14:38:02 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jY7pM281Mz6w5ym
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 14:38:03 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jY7pL6gCFz4lqC
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 14:38:02 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795444682;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=edEuZYY83aVLhrHopESHRiKkIoDatqK3HFbZ9HpdyBU=;
	b=q4OK2oiL0I+p2nUo41uf63XLWUPITn1tJlhKaAhqdCZAmksvN6bn+Bw0UTO6s9AvaKRZuq
	t02sGboPUj9P4ueXBAfVUr2UDEgW6+cGWTLw0PGL+Z6a7pYjLxwp+tJ/SSop/dxmkyGTpy
	G0xTgRr4rGpHNHuaA6mlo/hZmqE8jttegm506CMaxgBAfFp6YXplDEBD7n+s+GFL1uozTX
	EQEEu55V/DrW+HqY334A0XoNojuLCBiq55rqvnn9XN22ViBy36mgviv+uWrxezhGugmW66
	c/e/wnE8/AyiZcRdEp83EoyoNUC93awYsuh7DxFs+BmoOv0RzL6XN3OEgdnxyQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795444682;
	b=i0bQpIvrDbgZb3yokf+R6DhboMY76e4UeMiuXsaTfGUc7yxf4LCY8g+xI+hpAtnzIzBYTD
	IZHMJiEWEtGWpkNoZ4eSG1RZ9vWNbCF9uEEwZzolZeCDdGKIHOZeVlq7EzDVk6rt6bNG5e
	7pyb1uZ30FZpYZhmiXtODqOMLPdHjiMXTDn0yO2rpBkPwBVqCltypPVbjCFOxFxU8HpAvl
	JLiOvlA9bYuP52k0t1kKhnYNWLiwP8/WzHHKrvQIF2q9HxowSaSXxgUECqCZb3cIjjbGk3
	Z1LgYgFqa16hIC6Ck2uMPwlHj6/EskzLLmG7sdiAc0oEbR2pujIXZuMda2MlXg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795444682;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=edEuZYY83aVLhrHopESHRiKkIoDatqK3HFbZ9HpdyBU=;
	b=vQKmhGaWG1EbrgsevSwssJo/Uwle8y19bMBwl1YANAUA3WdklLEapddZNvSXZoKpnW311C
	+BVMflnW9E4zBgEv1RanOEB1yv5W8rSjzVGQi2tC/IGPohqomYSNH68RdiqG1Ky4DpGl9m
	0kWtlpJQXSoCoy6b0XjsYFFi4WfTd722pwDWAXf5YdBsK8UeRVq3NWN98yZLQXvvJm8yo4
	OIhBdGJz6wO1EtOpnfVLmEDQOZn0MBQrZSCG6aF3VxI5O1FbT4f7eXA4XxVgI9UkdzgQ8n
	dMGD7DPW1u7IxF3Egoi31fYcE63v8dtD75ifMG7Uwpu0MWdCJ8V8snErF2wKpA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jY7pL61zXzvDD
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 14:38:02 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id fe1e
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 14:38:02 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: R. Christian McDonald <rcm@FreeBSD.org>
Subject: git: 3cd5f1b307ad - main - netipsec: Process a nested IPsec header on IPv6 input
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: rcm
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 3cd5f1b307ad497d409e1a98bddf28702b579a47
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 14:38:02 +0000
Message-Id: <6b044fca.fe1e.5df30d74@gitrepo.freebsd.org>

The branch main has been updated by rcm:

URL: https://cgit.FreeBSD.org/src/commit/?id=3cd5f1b307ad497d409e1a98bddf28702b579a47

commit 3cd5f1b307ad497d409e1a98bddf28702b579a47
Author:     R. Christian McDonald <rcm@FreeBSD.org>
AuthorDate: 2026-11-23 14:36:01 +0000
Commit:     R. Christian McDonald <rcm@FreeBSD.org>
CommitDate: 2026-11-23 14:37:57 +0000

    netipsec: Process a nested IPsec header on IPv6 input
    
    After a transport mode SA has processed an inbound IPv6 packet,
    ipsec6_common_input_cb() walks the remaining header chain itself and
    calls ip6_protox[] for each next header.  AH, ESP and IPComp have had no
    entry in ip6_protox[] since the projects/ipsec merge; ip6_input() reaches
    them through IPSEC_INPUT() instead.  The callback did not, so when the
    next header was another IPsec header the packet went to rip6_input() and
    was never decapsulated.  The receiving side of a bundle such as ESP
    beneath a transport mode AH, or ESP with IPComp, did not work over IPv6.
    
    Hand such a header back to ipsec_common_input() from the loop.  Look up
    the offset of the preceding next header field with ip6_get_prevhdr(),
    since extension headers may sit between the two IPsec headers.
    
    The bundle cases of the flowlabel test had to ignore the result of ping
    because of this.  Have them check it, and give the second target, which
    no host owned, an address on hostB.
    
    Reported by:            llm-postcr
    Reviewed by:            ae, kib
    Fixes:                  fcf596178b5f ("Merge projects/ipsec into head/.")
    MFC after:              2 weeks
    Sponsored by:           Rubicon Communications, LLC ("Netgate")
    Differential Revision:  https://reviews.freebsd.org/D61805
---
 sys/netipsec/ipsec_input.c             | 13 ++++++++++++-
 tests/sys/netipsec/tunnel/flowlabel.sh | 18 +++++++++---------
 2 files changed, 21 insertions(+), 10 deletions(-)

diff --git a/sys/netipsec/ipsec_input.c b/sys/netipsec/ipsec_input.c
index e54f65a50f83..43e01a3e9895 100644
--- a/sys/netipsec/ipsec_input.c
+++ b/sys/netipsec/ipsec_input.c
@@ -787,11 +787,22 @@ ipsec6_common_input_cb(struct mbuf *m, struct secasvar *sav, int skip,
 			error = EINVAL;
 			goto bad;
 		}
+		/*
+		 * AH, ESP and IPComp are not in ip6_protox[]; as in
+		 * ip6_input(), a further IPsec header of a bundle has to be
+		 * handed back to IPsec here.
+		 */
+		if (nxt == IPPROTO_AH || nxt == IPPROTO_ESP ||
+		    nxt == IPPROTO_IPCOMP) {
+			error = ipsec_common_input(m, skip,
+			    ip6_get_prevhdr(m, skip), AF_INET6, nxt);
+			break;
+		}
 		nxt = ip6_protox[nxt](&m, &skip, nxt);
 	}
 	NET_EPOCH_EXIT(et);
 	key_freesav(&sav);
-	return (0);
+	return (error);
 bad:
 	NET_EPOCH_EXIT(et);
 	ipsec_sahtree_runlock(sahtree_tracker);
diff --git a/tests/sys/netipsec/tunnel/flowlabel.sh b/tests/sys/netipsec/tunnel/flowlabel.sh
index 7afd1c8cc21e..349da885ae90 100755
--- a/tests/sys/netipsec/tunnel/flowlabel.sh
+++ b/tests/sys/netipsec/tunnel/flowlabel.sh
@@ -34,9 +34,7 @@ fl_setkey()
 
 # fl_run COUNT TARGET...: ping each target from hostA while capturing COUNT
 # packets that match fl_filter on ipsecA's public interface, by default ESP
-# or AH in both directions.  A test that expects no replies sets
-# fl_ping_status=ignore.
-fl_ping_status=exit:0
+# or AH in both directions.
 fl_filter="ip6 and (esp or ah)"
 fl_run()
 {
@@ -57,7 +55,7 @@ fl_run()
 		i=$((i + 1))
 	done
 	for target in "$@"; do
-		atf_check -s ${fl_ping_status} -o ignore \
+		atf_check -s exit:0 -o ignore \
 		    jexec hostA ping -c 5 -i 0.2 ${target}
 	done
 	timeout 5 sh -c "while kill -0 ${tdpid} 2>/dev/null; do sleep 0.2; done"
@@ -202,14 +200,17 @@ sa_flowid_off_cleanup()
 # mode "any").  The outer header must carry the label of the AH SA on every
 # packet, not that of the tunnel SA which built it.  AH leaves the ESP
 # header readable, so the capture shows which tunnel SA each packet took.
-# Only the outbound packets carry AH, so only they are captured: when this
-# was written, ipsec6_common_input_cb() handed the ESP header beneath a
-# transport mode AH to the raw IPv6 input, so ipsecB did not decapsulate
-# the packets and did not reply.
+# Only the outbound packets carry AH, so only they are captured.  The
+# replies show that ipsecB removed both headers of the bundle.
 fl_bundle()
 {
 	ahmode=${1:+-m $1}
 	fl_lab 4
+	# A second address on hostB, reached by the second policy.
+	atf_check -s exit:0 jexec hostB \
+	    ifconfig ${epair_LAN_B}a alias 203.0.113.129/32
+	atf_check -s exit:0 -o ignore jexec ipsecB \
+	    route add 203.0.113.129/32 203.0.113.1
 	(
 		printf "flush;\nspdflush;\n"
 		printf "spdadd 192.0.2.0/24 203.0.113.0/25 any -P out ipsec esp/tunnel/${GW_A}-${GW_B}/unique:1 ah/transport//require;\n"
@@ -231,7 +232,6 @@ fl_bundle()
 		printf "add ${GW_B} ${GW_A} esp 0x1003 -m tunnel -E aes-gcm-16 \"${KEY}\";\n"
 	) > ${TMPDIR}/ipsec.ipsecB.conf
 	atf_check -s exit:0 -o ignore jexec ipsecB setkey -f ${TMPDIR}/ipsec.ipsecB.conf
-	fl_ping_status=ignore
 	fl_filter="ip6 and ah"
 	fl_run 10 203.0.113.1 203.0.113.129
 	fl_check 0x1002 828ed

From nobody Mon Nov 23 14:47:09 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jY80s6hM3z6w6rV
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 14:47:09 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jY80s5tYhz4mlm
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 14:47:09 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795445229;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=XD6wmbuO+5yWPG0+SSJFvN9vveKY0VVGKLfHpAT4YqU=;
	b=mClUytNv0kXkzPhAPiB087HroAr2Br82mmJRMrT6cfnEzOkfxaNPlYe9eSh7Gp5IYNjWZX
	ChV7pD/yA/j13M5IEQzx55Kncj9THV+CvKQq2hjEjMKJyO2XN0jfi9O4h1YB3GcVlcBP42
	3AU3cjznFKGQAmnKx33i9TYp7Tlf64h3kMu9ItRPKnSgViadqR9hVC13qASDswf46lNBzR
	sadtooYqMBxf5pX81F4BqCNWIM2lmsdtYiZvEKGlvAhQ1DUA0PpwQ0GPOQPkvyGTGCz1Jl
	4WqBaiH511TlayaLzz78Nb4ZO2tgv1v0N7l3ChSMWPQj+VlFOjg+bII7uPHeUQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795445229;
	b=tfSUBaKVsrN+y8IIfrIvL/NTxuThfby6bZ6lemRL2G1R5sMIbNEuGWBKg2kGrfNd6hy840
	fQYuVOJBZqKMgUvHq7FGOCmQs9yI4p/kFaWjH2F3LmHX5ud84hPoMgtZmS8wUuQAMqxMQx
	l04bsk4JspmTtc4Pg/STNI5UIFI2FTdXLF0XUU2K8i/7Zz/UYS0TduwK4OM4AKskM09gaU
	81IIfjOoSVS1uFfJEQbzordr07CmgCHyw06a+KEe+fp+s3gAMV/Aqx6X+nRq3wNoWhVAT1
	M9ynkR7UFjtGOyZblYPOjZca3a0htJIsk3Vp5ZNF9W6zMqkBOPFBQf+Jtz4sJw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795445229;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=XD6wmbuO+5yWPG0+SSJFvN9vveKY0VVGKLfHpAT4YqU=;
	b=qApGp47t5HWOyuni/TaymmHdSp67EQZaCMZXYm9oNeViLhd2B8L+2TMjSX4GzwIfvgmC7r
	awgdmhr+1Wr8wHvfnET/GTLHl6lCV+9+XoDlkpR8QhDpr3P8zVCBvzkJVsJbsLWS75WiAY
	JHMYw6bvhXe6D4Wtjjk+I/uGIMrXbvQTQYkVlRGYXUWKkeS57vOA0a9zK/hhTG8dHDoaZ1
	xI/JvspqhgQGMDt0uty7bHo4Bzjk4F7Ets1+nSq6JwC1iLrRrND3Msyo5ndYoUjnrhjPug
	kdA575Eg0cMfWpYDkeyC0kv4CYf0OFbVDcLGMainH0tQSxBVt6qvyjBYT2on9Q==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jY80s5DCqzwK0
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 14:47:09 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 10783
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 14:47:09 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: R. Christian McDonald <rcm@FreeBSD.org>
Subject: git: 0df9a2d94988 - main - netipsec: Copy the offload interface name to a cloned SA
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: rcm
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 0df9a2d9498891977823d27b60071adbca29b796
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 14:47:09 +0000
Message-Id: <6b0451ed.10783.30ac66b7@gitrepo.freebsd.org>

The branch main has been updated by rcm:

URL: https://cgit.FreeBSD.org/src/commit/?id=0df9a2d9498891977823d27b60071adbca29b796

commit 0df9a2d9498891977823d27b60071adbca29b796
Author:     R. Christian McDonald <rcm@FreeBSD.org>
AuthorDate: 2026-11-23 14:45:27 +0000
Commit:     R. Christian McDonald <rcm@FreeBSD.org>
CommitDate: 2026-11-23 14:45:27 +0000

    netipsec: Copy the offload interface name to a cloned SA
    
    When SADB_UPDATE changes the addresses of an SA, key_updateaddresses()
    replaces the SA with a clone.  For an SA that names an offload interface
    it allocated a buffer for the clone's copy of the name, and then called
    strncpy() with the arguments swapped.  The clone was left with an
    uninitialized name, and the name of the old SA was overwritten with the
    contents of the new buffer.
    
    Copy the name from the old SA to the new one.
    
    Also, the clone starts as a bcopy() of the old SA, so its natt and
    accel_ifname pointers refer to memory owned by the old SA until they are
    replaced.  If one of the offload allocations failed, the error path freed
    that memory, and key_cleansav() freed it again with the last reference
    to the old SA.  Clear both pointers right after the copy.
    
    Reported by:            llm-postcr
    Reviewed by:            kib
    Fixes:                  ef2a572bf6bd ("ipsec_offload: kernel infrastructure")
    MFC after:              2 weeks
    Sponsored by:           Rubicon Communications, LLC ("Netgate")
    Differential Revision:  https://reviews.freebsd.org/D61899
---
 sys/netipsec/key.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c
index c440624536b7..923c4a3aca92 100644
--- a/sys/netipsec/key.c
+++ b/sys/netipsec/key.c
@@ -5428,9 +5428,18 @@ key_updateaddresses(struct socket *so, struct mbuf *m,
 	/* Clone SA's content into newsav */
 	SAV_INITREF(newsav);
 	bcopy(sav, newsav, offsetof(struct secasvar, chain));
+	/*
+	 * The copy still points at the old SA's NAT-T config and offload
+	 * interface name.  Those stay with the old SA, and key_cleansav()
+	 * frees them with its last reference.  Clear them before anything
+	 * can fail, so that the error path frees only what belongs to
+	 * newsav.
+	 */
+	newsav->natt = NULL;
 #ifdef IPSEC_OFFLOAD
 	CK_LIST_INIT(&newsav->accel_ifps);
 	newsav->accel_forget_tq = 0;
+	newsav->accel_ifname = NULL;
 	newsav->accel_lft_sw = uma_zalloc_pcpu(ipsec_key_lft_zone,
 	    M_NOWAIT | M_ZERO);
 	if (newsav->accel_lft_sw == NULL) {
@@ -5446,20 +5455,15 @@ key_updateaddresses(struct socket *so, struct mbuf *m,
 			error = ENOBUFS;
 			goto fail;
 		}
-		strncpy(__DECONST(char *, sav->accel_ifname),
-		    newsav->accel_ifname,
+		strncpy(__DECONST(char *, newsav->accel_ifname),
+		    sav->accel_ifname,
 		    sizeof(xof.sadb_x_if_hw_offl_if));
 	}
 #endif
 
-	/*
-	 * We create new NAT-T config if it is needed.
-	 * Old NAT-T config will be freed by key_cleansav() when
-	 * last reference to SA will be released.
-	 */
-	newsav->natt = NULL;
 	newsav->sah = sah;
 	newsav->state = SADB_SASTATE_MATURE;
+	/* Create a new NAT-T config if one is needed. */
 	error = key_setnatt(newsav, mhp);
 	if (error != 0)
 		goto fail;

From nobody Mon Nov 23 15:01:21 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jY8KF4bKxz6w8Xr
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 15:01: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jY8KF40W3z4pFJ
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 15:01:21 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795446081;
	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=CsvXQZdzPNu0Ex4PX3pO8eZxl4W5z5oMn5dyCbwHfIM=;
	b=Y7YGrTvgoCalYocMtrA7UA2cg9m98jiRcgHjm6NWV6Hc+uQvESC88nJc62FS+jgHHmy4jR
	mWz/5NpBAqQmImblMFCr1P9iixAiGd1BOsUbJwMOUMPhJem5m8mZnjyx3EHNax6Ine+OCn
	oJNBfIThT3Fv1J2qFHFbaSs6tGfSHw3pavMtdOg9dIEKe1CMiOfWbM21bcVodf42pQipVG
	AYjq1TCZB87QML6KRtffoZT/2anzIStDwJc1dyqKD3mFsvUsK+oG5HR7GVXv3Oa0lM/Hfb
	rphaFLkgHHO7O4gSSh8mpB0BYw8wtfUiK2KuJI47kmoHuvGlckXNR73hPKn6vA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795446081;
	b=HZqEORSVfOEp7AY6CK6bkWJjWxbLzmXTV9/f9gmOSTQgH8a3NJfE0BF0aSi+pR+gYNShBP
	ga8GuSCkP+8br9KILcnzvDUfLoy6kNzUr+unt2/eJfEAubDcBigoUuazsXQ0wJNExSBWS1
	MgS4exzbq9hV/PktUIvveK2gZSDtBldFEJYBpva1jICNmVK3LihMOCV+q9PBx2wI/PCNLX
	Rc0UPE9PM9/jHsx0QmuCXE/IX70OJAx+uetvhcMG5l3nGloqGo5uS/+93u/b8xBb+qof8d
	JPznFKgL6/h+3n4PaT3F5Mfeni+5APv1S7Q01rUXgRgeiKSF48hAa9MXJgg8GA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795446081;
	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=CsvXQZdzPNu0Ex4PX3pO8eZxl4W5z5oMn5dyCbwHfIM=;
	b=e6bjKRqZMyAOzncEcZBdLhTwHkNdVeeFOfU0Iq8p7ixUbcWcqVx6yO2tzH3JM5qoZ5RNrh
	aS0PME3SE7d208yu+uwIH4ammxa4Btgp33t2W1X1OCvBCst6IUSBFeY3dwNE48GsFKDw7z
	xoraxWBByOwvTb6yZbFgsD0GzK1e7/87KmbPNiwBHbunk48EPhOvnZSO2dIJGi0StFYebr
	JeLVk9SFw/LnZKEi7n8NLj1eMibfSvI2T1vqKJ8HnlOCx3U8wpb+lkGV0kAR4A7/K1vpmU
	rQ3IB9Q/K2Nen3QPagJfQ2EoDXHsP6dKhrXUVqvw7MxLl28joQefJsOqblffKg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jY8KF3TgXzw7x
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 15:01:21 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 11c6b
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 15:01:21 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Ryan Moeller <ryan.moeller@klarasystems.com>
From: Igor Ostapenko <igoro@FreeBSD.org>
Subject: git: 5d6bdb30a792 - stable/15 - dnode_sync: Relax constraint on indirect freeing
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: igoro
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 5d6bdb30a792358efeb5a14255d399236627d6ef
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 15:01:21 +0000
Message-Id: <6b045541.11c6b.682d63d5@gitrepo.freebsd.org>

The branch stable/15 has been updated by igoro:

URL: https://cgit.FreeBSD.org/src/commit/?id=5d6bdb30a792358efeb5a14255d399236627d6ef

commit 5d6bdb30a792358efeb5a14255d399236627d6ef
Author:     Ryan Moeller <ryan.moeller@klarasystems.com>
AuthorDate: 2026-06-12 18:43:58 +0000
Commit:     Igor Ostapenko <igoro@FreeBSD.org>
CommitDate: 2026-11-23 14:16:51 +0000

    dnode_sync: Relax constraint on indirect freeing
    
    One of the roles of the dnode sync thread is freeing.  There are two
    modes of this operation: freeing a portion of an object, and freeing
    the object itself.
    
    Freeing is handled by `free_children()`.  This function verifies that
    if the dnode has children there must be at least one marked as dirty
    before proceeding to recursively free the tree of block pointers.
    
    As described in a comment, this VERIFY is overly strict.  In practice,
    children may not be marked as dirty when the dnode itself is being
    freed.  Relax the VERIFY slightly by avoiding the VERIFY when indirect
    blocks are to be immediately freed, to more closely match the comment
    motivating the VERIFY.
    
    While here, clarify the logic of the test by using VERIFY_IMPLY instead
    of chaining multiple tests.
    
    Sponsored-by: Cybersecure Pty Ltd
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
    Signed-off-by: Ryan Moeller <ryan.moeller@klarasystems.com>
    Closes #18822
    
    (cherry picked from commit 242105f01012bf07cc896a4fb5cdb1385ef58220)
---
 sys/contrib/openzfs/module/zfs/dnode_sync.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/sys/contrib/openzfs/module/zfs/dnode_sync.c b/sys/contrib/openzfs/module/zfs/dnode_sync.c
index 0e070c69dcd6..199ac045679d 100644
--- a/sys/contrib/openzfs/module/zfs/dnode_sync.c
+++ b/sys/contrib/openzfs/module/zfs/dnode_sync.c
@@ -305,9 +305,12 @@ free_children(dmu_buf_impl_t *db, uint64_t blkid, uint64_t nblks,
 	 * ancestor of the first or last block to be freed.  The first and
 	 * last L1 indirect blocks are always dirtied by dnode_free_range().
 	 */
-	db_lock_type_t dblt = dmu_buf_lock_parent(db, RW_READER, FTAG);
-	VERIFY(BP_GET_FILL(db->db_blkptr) == 0 || db->db_dirtycnt > 0);
-	dmu_buf_unlock_parent(db, dblt, FTAG);
+	if (!free_indirects) {
+		db_lock_type_t dblt = dmu_buf_lock_parent(db, RW_READER, FTAG);
+		VERIFY_IMPLY(BP_GET_FILL(db->db_blkptr) > 0,
+		    db->db_dirtycnt > 0);
+		dmu_buf_unlock_parent(db, dblt, FTAG);
+	}
 
 	dbuf_release_bp(db);
 	bp = db->db.db_data;

From nobody Mon Nov 23 17:01:55 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYC0M21ntz714tL
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 17:01:55 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYC0M1KwCz53rK
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 17:01:55 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795453315;
	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=jIN1tnLdZxgf8hBJLAJ2/JgExxNPBhNApnbZeSZpbjk=;
	b=QTbaN1uwfmC23YlN1xMrEuJMsQ1f7NYVp8D4oQqy9nN2qCGC/LIM1kxdm+CnxR8ib2cVnx
	WjrLNRXPEi1oOCL0zSexKURJ2Q5MUBeeQo1a/L8u+d5/OCG2PpAosPvnv9Um5husY2GcSl
	CfwKMVIPf0NzaLW8XzWaSVCWPv8qEfuNVLY1JgBF31UMH91RymE5beeIEYMgKRJWdDyfKW
	f1Q8BkdI66QqAiavZ4yjjiL0w5dmLSCWrJnpOHRkMyKRq2V3ZTYwQZj/79rvOZ7cvEHrD1
	IlcMITe092NNeyjgtl/qFKGvnA8GX3lz5ESwyogAQ3HZn2dem6AOIitWnUJIuA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795453315;
	b=lnHejYPNICUC5Ce5MUQYG0aPSYlFSX2Low6Zr9BnaoqwlnJIIfCNTFBDpaKeqpCxfRug6o
	et8vxNRTXvZglidyzD/bBKgVhEnVh9qFBzoKTOa71Bt2T0LP7Sb7c9NBcmiHrLdkIKls2Y
	dPlMBaU+dUmuA5v25+is7xoY0VKG/OJ4w4+ThxcufZkzAQkxK581ypJz99p3e4dcqhdklb
	ApfUs/P3hVj+ApmJiWWI9xMx12O3F4Z/1GpZSjK99pSxvhW4WKNknZtw5bMzzx8oNTCn2S
	71AZuQ8NTfvsnF2S/MMtLSN7WPnA5Gm7I9yAnrl2oMiUuYF7RbTPIbFQIgvrvA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795453315;
	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=jIN1tnLdZxgf8hBJLAJ2/JgExxNPBhNApnbZeSZpbjk=;
	b=kpEYN3EFEivJNV/+iaekF2247WGoZZpEUBJ7rj11umz3h1C5R7oNkp3/6LEdRfWfXec033
	MnqVa69Jre23P/kFDzreKEYx+dwtf5QqbYTJeKfdcoa1wWrH34LO8O/VTrrkhEKGns9iTz
	ddJvZoqhnRxQOkcme0O+/IDAfYV2FUSpX6hv5IDWvHdxy+wXcJdJTsq7ZLd5LqJj1/i0cE
	/AkCC8CKoYl+iJDHSeBq85mHNc2RWHYemfkx8RGMNwA+COJmAqcnq0IS/suJ6iweZmPa2g
	fnvcsBkm4bzGrYVkM/3+xYcrZFMtNJwuuQHrrGiznbtUeThl4DMf42CS1unrew==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYC0M10rGz10cH
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 17:01:55 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1d5d2
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 17:01:55 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Cc: Sarah Walker <sarah.walker2@arm.com>
From: Andrew Turner <andrew@FreeBSD.org>
Subject: git: 1418aa4d84de - main - arm64/vmm: Add handling for all supported ID registers
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: andrew
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 1418aa4d84de9c509aa36f0c990ad96018111125
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 17:01:55 +0000
Message-Id: <6b047183.1d5d2.5720cf6@gitrepo.freebsd.org>

The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=1418aa4d84de9c509aa36f0c990ad96018111125

commit 1418aa4d84de9c509aa36f0c990ad96018111125
Author:     Sarah Walker <sarah.walker2@arm.com>
AuthorDate: 2026-11-04 11:39:12 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2026-11-23 16:22:37 +0000

    arm64/vmm: Add handling for all supported ID registers
    
    Reviewed by:    andrew
    Sponsored by:   Arm Ltd
    Differential Revision:  https://reviews.freebsd.org/D61192
---
 sys/arm64/vmm/vmm.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sys/arm64/vmm/vmm.c b/sys/arm64/vmm/vmm.c
index ad53dc16e91a..9c9735bdcee4 100644
--- a/sys/arm64/vmm/vmm.c
+++ b/sys/arm64/vmm/vmm.c
@@ -479,11 +479,18 @@ static const struct vmm_special_reg vmm_special_regs[] = {
 	}
 
 	/* ID registers */
+	ID_SPECIAL_REG(ID_AA64AFR0_EL1, id_aa64afr0),
+	ID_SPECIAL_REG(ID_AA64AFR1_EL1, id_aa64afr1),
 	ID_SPECIAL_REG(ID_AA64PFR0_EL1, id_aa64pfr0),
+	ID_SPECIAL_REG(ID_AA64PFR1_EL1, id_aa64pfr1),
 	ID_SPECIAL_REG(ID_AA64DFR0_EL1, id_aa64dfr0),
+	ID_SPECIAL_REG(ID_AA64DFR1_EL1, id_aa64dfr1),
 	ID_SPECIAL_REG(ID_AA64ISAR0_EL1, id_aa64isar0),
+	ID_SPECIAL_REG(ID_AA64ISAR1_EL1, id_aa64isar1),
+	ID_SPECIAL_REG(ID_AA64ISAR2_EL1, id_aa64isar2),
 	ID_SPECIAL_REG(ID_AA64MMFR0_EL1, id_aa64mmfr0),
 	ID_SPECIAL_REG(ID_AA64MMFR1_EL1, id_aa64mmfr1),
+	ID_SPECIAL_REG(ID_AA64MMFR2_EL1, id_aa64mmfr2),
 
 	/*
 	 * All other ID registers are read as zero.

From nobody Mon Nov 23 17:01:56 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYC0N37tnz714nq
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 17:01: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYC0N2108z53x3
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 17:01:56 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795453316;
	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=OR6QlQKU0X/kEO1pMx1eJrDgeYGNtUpYBj5gzSj/6o0=;
	b=KCuEOQ7nzok6b3zwK0gKxUHHOVkyehR9/dosztZepHFu61n6JRj5XvuVfU9nCI25ZPiSde
	D/jHOIcTdMpAs83MPv4GuS7iRJMhYrRFVxh2XWrkzcoyih0rvuwrYHRHvhpYUFZ/72yTwD
	MTdAW9oDfKo/j3ZfP2Jj8+CZETaBxqUuUU2ncIbVtugt+zF/5KyKMjvwtvDIKbm97/n8hk
	3o9RbJa+Y5iXzA8vogWvKpdVP0MgoJII4kcjElTrZ1xAEKFR6UCnurlnB6iTstjKK+Y2LB
	AK4hpemAKk5pyLwRDaQGTRU82JCKlVcIQLKfB1S0326H/zJSVu7nowP1XQ0ajw==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795453316;
	b=t7Xnn70ce/Ut+wJcN4rgqhiKk/v6ffdJ0s1C0nTNX1B6fcsAGsBA3zenMZ/UJTvSxWJnzL
	PN5eg6EkrJXktHCWriQjMSGdZ6wmdi81zRtHCDoNb/NCihX3mgSJt1qcuz4EcjSyGDq4OS
	ukUq0qSofLtcCz/C64xDZ6mLusyN/+pawjKcrkZ9FJ0m3qgOERmH29zoHXvSiPlFXYlqZc
	FMIt969onUAHnyrxrLwT9JWBpJ/vtMNayA8uN5qV8qXtmlAhuTu79IWGklT2jIlDx49uPf
	TONrYrdBd0TpUB2wvGrZjqlA8WTGtETBxsgbZEUWYN1m7gyXNetgtuZzKMANnQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795453316;
	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=OR6QlQKU0X/kEO1pMx1eJrDgeYGNtUpYBj5gzSj/6o0=;
	b=x/LuGgSlBskle7QdDYGMcVG3sIhzi/j9LPw+LJlZ+mOUwe6ERLmxu1/KlL7dX3re6X/Dei
	FWck6+DWbg0G5WuLTenMHP57rDDu98n9oFygBqNAuH61NYjBELRLV2r00dNY2JR0T178k/
	DHF904kdQoWBZn+35+QrRuHkiLvRK9DoUtoP0BKIvn45zqpovNHm/Kdq9T2tsUNGTqOzm2
	DGRxPYS5U65lPp5aqp9/7/bf3GwdQS7KgJW9co93EsE1HdAsXT4L627c0S3RUNNZ8dcA0n
	+3Jx9HHzmAXfEyr5Op2+zPXYYeO0Q55vrO1NX1z+C7vPVplxsncbcw20il8jNw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYC0N1MsSz10ny
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 17:01:56 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1eef7
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 17:01:56 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Cc: Sarah Walker <sarah.walker2@arm.com>
From: Andrew Turner <andrew@FreeBSD.org>
Subject: git: 44c8a20fce22 - main - arm64: gicv5: Add GICv5 virtual machine support
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: andrew
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 44c8a20fce22dc4e8393e18fd708ddfd1dd96fba
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 17:01:56 +0000
Message-Id: <6b047184.1eef7.59396f33@gitrepo.freebsd.org>

The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=44c8a20fce22dc4e8393e18fd708ddfd1dd96fba

commit 44c8a20fce22dc4e8393e18fd708ddfd1dd96fba
Author:     Sarah Walker <sarah.walker2@arm.com>
AuthorDate: 2026-07-30 11:38:09 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2026-11-23 16:22:58 +0000

    arm64: gicv5: Add GICv5 virtual machine support
    
    Create virtual machine tables on device attachment. Add functions to create
    and destroy VMs.
    
    Reviewed by:    andrew
    Sponsored by:   Arm Ltd
    Differential Revision:  https://reviews.freebsd.org/D60113
---
 sys/arm64/arm64/gicv5.c    | 304 ++++++++++++++++++++++++++++++++++++++++++++-
 sys/arm64/arm64/gicv5var.h |   8 ++
 2 files changed, 311 insertions(+), 1 deletion(-)

diff --git a/sys/arm64/arm64/gicv5.c b/sys/arm64/arm64/gicv5.c
index c2d2c31bdc00..8a4b16f80b75 100644
--- a/sys/arm64/arm64/gicv5.c
+++ b/sys/arm64/arm64/gicv5.c
@@ -29,6 +29,7 @@
 
 #include <sys/param.h>
 #include <sys/systm.h>
+#include <sys/bitset.h>
 #include <sys/bus.h>
 #include <sys/cpuset.h>
 #include <sys/intr.h>
@@ -39,6 +40,7 @@
 #include <sys/module.h>
 #include <sys/mutex.h>
 #include <sys/proc.h>
+#include <sys/queue.h>
 #include <sys/rman.h>
 #include <sys/smp.h>
 
@@ -91,11 +93,18 @@
 #define	IRS_CFG_WRITE_8(_irs, _reg, _val)			\
     bus_write_8((_irs)->irs_cfg, (_reg), (_val))
 
+#define NR_VM_IDS (MAXCPU * 2)
+BITSET_DEFINE(_vm_ids, NR_VM_IDS);
+
+SLIST_HEAD(vm_data_head, gicv5_vm_data);
+
 struct gicv5_irs {
 	cpuset_t		 irs_cpus;
 	struct resource		*irs_cfg;
 	uint64_t		*ist_base;
 
+	uint64_t		*vmt_base;
+
 	u_int			irs_next_irq_cpu;
 
 	u_int			irs_parange;
@@ -112,6 +121,30 @@ struct gicv5_irs {
 #ifdef INVARIANTS
 	bool			irs_ready;
 #endif
+
+	bool 			has_virt;
+
+	u_int			vm_id_count;
+	u_int			vpe_id_count;
+
+	struct mtx		vm_lock;
+	struct _vm_ids		vm_ids;
+	struct vm_data_head	vm_data_head;
+
+	size_t			vmd_size;
+	size_t			vped_size;
+};
+
+struct gicv5_vm_data {
+	SLIST_ENTRY(gicv5_vm_data) node;
+
+	int vm_id;
+
+	uint64_t *vpet;
+	void *vpete;
+	uint32_t *lpi_ist;
+	uint32_t *spi_ist;
+	void *vmd;
 };
 
 struct gicv5_irqsrc {
@@ -250,6 +283,8 @@ gicv5_irs_alloc_ist(struct gicv5_softc *sc, struct gicv5_irs *irs,
 {
 	irs->ist_base = contigmalloc(size, M_DEVBUF, M_WAITOK | M_ZERO, 0,
 	    (1ul << irs->irs_parange) - 1, size, 0);
+	KASSERT(irs->ist_base != NULL,
+	    ("%s: Failed to alloc %zu bytes", __func__, size));
 	if (sc->gic_coherent)
 		/* Ensure the IRS observed zeroed memory */
 		dsb(ishst);
@@ -379,6 +414,40 @@ gicv5_irs_extend_ist(device_t dev, device_t child, u_int lpi)
 	mtx_unlock_spin(&irs->irs_lock);
 }
 
+static void
+gicv5_irs_init_vmt(struct gicv5_softc *sc, struct gicv5_irs *irs,
+    int vm_id_count)
+{
+	uint64_t cfgr;
+
+	cfgr = (ilog2_int(vm_id_count) << IRS_VMT_VM_ID_BITS_SHIFT) &
+	    IRS_VMT_VM_ID_BITS_MASK;
+	IRS_CFG_WRITE_4(irs, IRS_VMT_CFGR, cfgr);
+
+	KASSERT((vtophys(irs->vmt_base) & ~IRS_IST_BASER_ADDR_MASK) == 0,
+	    ("%s: Invalid VMT base address %lx", __func__,
+	    vtophys(irs->vmt_base)));
+	IRS_CFG_WRITE_8(irs, IRS_VMT_BASER, vtophys(irs->vmt_base) |
+	    IRS_VMT_BASER_VALID);
+
+	gicv5_wait_for_op(irs, IRS_VMT_STATUSR, IRS_VMT_STATUSR_IDLE, NULL);
+}
+
+static void
+gicv5_irs_alloc_vmt(struct gicv5_softc *sc, struct gicv5_irs *irs,
+    size_t size)
+{
+	irs->vmt_base = contigmalloc(size, M_DEVBUF, M_WAITOK | M_ZERO, 0,
+	    IRS_VMT_BASER_ADDR_LIMIT, size, 0);
+	KASSERT(irs->vmt_base != NULL,
+	    ("%s: Failed to alloc %zu bytes", __func__, size));
+	if (sc->gic_coherent)
+		/* Ensure the IRS observed zeroed memory */
+		dsb(ishst);
+	else
+		cpu_dcache_wbinv_range(irs->vmt_base, size);
+}
+
 void
 gicv5_irs_init(device_t dev, u_int idx, cpuset_t *cpuset)
 {
@@ -394,6 +463,9 @@ gicv5_irs_init(device_t dev, u_int idx, cpuset_t *cpuset)
 	    M_ZERO | M_WAITOK);
 	CPU_COPY(cpuset, &sc->gic_irs[idx]->irs_cpus);
 	sc->gic_irs[idx]->irs_cfg_rid = idx;
+
+	BIT_FILL(NR_VM_IDS, &sc->gic_irs[idx]->vm_ids);
+	SLIST_INIT(&sc->gic_irs[idx]->vm_data_head);
 }
 
 static void
@@ -402,10 +474,11 @@ gicv5_irs_attach(device_t dev, struct gicv5_irs *irs, u_int idx)
 	struct gicv5_softc *sc;
 	const char *name;
 	uint64_t icc_idr0;
-	uint32_t cfgr, cr1, idr2;
+	uint32_t cfgr, cr1, idr0, idr2, idr3, idr4;
 	u_int istsz, lpi_id_bits, l2sz, spi_count, spi_end;
 	int error, iaffid;
 	bool two_levels;
+	int vm_id_bits;
 
 	sc = device_get_softc(dev);
 	name = device_get_nameunit(dev);
@@ -417,6 +490,7 @@ gicv5_irs_attach(device_t dev, struct gicv5_irs *irs, u_int idx)
 	irs->irs_ready = false;
 #endif
 	mtx_init(&irs->irs_lock, "GICv5 IRS lock", NULL, MTX_SPIN);
+	mtx_init(&irs->vm_lock, "GICv5 IRS VM lock", NULL, MTX_DEF);
 
 	irs->irs_cfg = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
 	    &irs->irs_cfg_rid, RF_ACTIVE);
@@ -452,6 +526,8 @@ gicv5_irs_attach(device_t dev, struct gicv5_irs *irs, u_int idx)
 		break;
 	}
 
+	sc->has_virt = IRS_CFG_READ_4(irs, IRS_IDR0) & IRS_IDR0_VIRT;
+
 	/* Set the control registers */
 	if (sc->gic_coherent) {
 		cr1 = IRS_CR1_VPED_WA |
@@ -502,6 +578,9 @@ gicv5_irs_attach(device_t dev, struct gicv5_irs *irs, u_int idx)
 	}
 
 	icc_idr0 = READ_SPECIALREG(ICC_IDR0_EL1);
+	if ((icc_idr0 & ICC_IDR0_GCIE_LEGACY_MASK) != 0)
+		device_printf(dev, "Have VGICv3\n");
+
 	switch(icc_idr0 & ICC_IDR0_ID_BITS_MASK) {
 	case ICC_IDR0_ID_BITS_16:
 		lpi_id_bits = MIN(lpi_id_bits, 16);
@@ -512,6 +591,8 @@ gicv5_irs_attach(device_t dev, struct gicv5_irs *irs, u_int idx)
 		break;
 	}
 
+	sc->gic_lpi_id_bits = lpi_id_bits;
+
 	/* The IST entries contain metadata so the size will be larger */
 	if ((idr2 & IRS_IDR2_ISTMD) != 0) {
 		uint64_t istmd_sz;
@@ -618,11 +699,232 @@ gicv5_irs_attach(device_t dev, struct gicv5_irs *irs, u_int idx)
 		isb();
 	}
 
+	idr0 = IRS_CFG_READ_4(irs, IRS_IDR0);
+	if (idr0 & IRS_IDR0_VIRT) {
+		idr3 = IRS_CFG_READ_4(irs, IRS_IDR3);
+		idr4 = IRS_CFG_READ_4(irs, IRS_IDR4);
+
+		if (idr3 & IRS_IDR3_VMD)
+			irs->vmd_size = 1 << ((idr4 & IRS_IDR3_VMD_SZ_MASK) >>
+			    IRS_IDR3_VMD_SZ_SHIFT);
+		else
+			irs->vmd_size = 0;
+
+		vm_id_bits = (idr3 & IRS_IDR3_VM_ID_BITS_MASK)
+		    >> IRS_IDR3_VM_ID_BITS_SHIFT;
+		irs->vm_id_count = MIN(1 << vm_id_bits, NR_VM_IDS);
+
+		irs->vped_size = 1 << (idr4 & IRS_IDR4_VPED_SZ_MASK);
+		irs->vpe_id_count = 2 << ((idr4 & IRS_IDR4_VPE_ID_BITS_MASK)
+		    >> IRS_IDR4_VPE_ID_BITS_SHIFT);
+
+		gicv5_irs_alloc_vmt(sc, irs, irs->vm_id_count * L2_VMTE_SIZE);
+		gicv5_irs_init_vmt(sc, irs, irs->vm_id_count);
+	}
+
 #ifdef INVARIANTS
 	irs->irs_ready = true;
 #endif
 }
 
+int
+gicv5_alloc_vm(device_t dev, int nr_vpes)
+{
+	struct gicv5_vm_data *vm_data;
+	struct gicv5_softc *sc;
+	struct gicv5_irs *irs;
+	size_t lpi_ist_align;
+	size_t spi_ist_align;
+	uintptr_t vpete_p;
+	uint64_t *vmte;
+	int i;
+
+	int spi_id_bits = 16;
+	int lpi_id_bits;
+
+	sc = device_get_softc(dev);
+	irs = sc->gic_irs[0];
+
+	if (nr_vpes > irs->vpe_id_count)
+		return (EINVAL);
+
+	lpi_id_bits = sc->gic_lpi_id_bits;
+
+	lpi_ist_align = MAX(L2_ISTE_SIZE * (1 << lpi_id_bits), 64);
+	spi_ist_align = MAX(L2_ISTE_SIZE * (1 << spi_id_bits), 64);
+
+	vm_data = malloc(sizeof(*vm_data), M_DEVBUF, M_ZERO | M_WAITOK);
+
+	vm_data->vpet = contigmalloc(VPETE_SIZE * nr_vpes,
+	    M_DEVBUF, M_ZERO | M_WAITOK, 0, IRS_VMT_BASER_ADDR_LIMIT,
+	    VPETE_SIZE * ilog2_int(nr_vpes), 0);
+	vm_data->vpete = contigmalloc(irs->vped_size * nr_vpes,
+	    M_DEVBUF, M_ZERO | M_WAITOK, 0, IRS_VMT_BASER_ADDR_LIMIT,
+	    irs->vped_size, 0);
+	vm_data->lpi_ist = contigmalloc(L2_ISTE_SIZE * (1 << lpi_id_bits),
+	    M_DEVBUF, M_ZERO | M_WAITOK, 0, IRS_VMT_BASER_ADDR_LIMIT,
+	    lpi_ist_align, 0);
+	vm_data->spi_ist = contigmalloc(L2_ISTE_SIZE * (1 << spi_id_bits),
+	    M_DEVBUF, M_ZERO | M_WAITOK, 0, IRS_VMT_BASER_ADDR_LIMIT,
+	    spi_ist_align, 0);
+	if (irs->vmd_size != 0)
+		vm_data->vmd = contigmalloc(irs->vmd_size, M_DEVBUF,
+		    M_ZERO | M_WAITOK, 0, IRS_VMT_BASER_ADDR_LIMIT,
+		    irs->vmd_size, 0);
+
+	if (!vm_data->vpet || !vm_data->vpete || !vm_data->lpi_ist ||
+	    !vm_data->spi_ist || (irs->vmd_size != 0 && !vm_data->vmd)) {
+		free(vm_data->vmd, M_DEVBUF);
+		free(vm_data->spi_ist, M_DEVBUF);
+		free(vm_data->lpi_ist, M_DEVBUF);
+		free(vm_data->vpete, M_DEVBUF);
+		free(vm_data->vpet, M_DEVBUF);
+		free(vm_data, M_DEVBUF);
+
+		return (ENOMEM);
+	}
+
+	vpete_p = (uintptr_t)vm_data->vpete;
+
+	for (i = 0; i < nr_vpes; i++) {
+		vm_data->vpet[i] = (vtophys(vpete_p) & VPETE_VPED_ADDR_MASK) |
+		    VPETE_VALID;
+		vpete_p += VPE_DESC_SIZE;
+	}
+
+	/* Allocate VM ID */
+	mtx_lock(&irs->vm_lock);
+
+	vm_data->vm_id = BIT_FFS(irs->vm_id_count, &irs->vm_ids) - 1;
+	if (vm_data->vm_id < 0) {
+		mtx_unlock(&irs->vm_lock);
+
+		free(vm_data->vmd, M_DEVBUF);
+		free(vm_data->spi_ist, M_DEVBUF);
+		free(vm_data->lpi_ist, M_DEVBUF);
+		free(vm_data->vpete, M_DEVBUF);
+		free(vm_data->vpet, M_DEVBUF);
+		free(vm_data, M_DEVBUF);
+
+		return (ENOMEM);
+	}
+
+	BIT_CLR(irs->vm_id_count, vm_data->vm_id, &irs->vm_ids);
+	SLIST_INSERT_HEAD(&irs->vm_data_head, vm_data, node);
+
+	mtx_unlock(&irs->vm_lock);
+
+	/* Fill in VMT entry now we have a VM ID */
+	vmte = &irs->vmt_base[vm_data->vm_id * 4];
+
+	vmte[L2_VMTE_VPE_ADDR_IDX] =
+	    (vtophys(vm_data->vpet) & L2_VMTE_VPET_ADDR_MASK) |
+	    ((uint64_t)ilog2_int(nr_vpes) << L2_VMTE_VPE_ID_BITS_SHIFT);
+	vmte[L2_VMTE_SPI_ADDR_IDX] =
+	    (vtophys(vm_data->spi_ist) & L2_VMTE_SPI_IST_ADDR_MASK) |
+	    ((uint64_t)spi_id_bits << L2_VMTE_SPI_ID_BITS_SHIFT) |
+	    L2_VMTE_SPI_IST_VALID;
+	vmte[L2_VMTE_LPI_ADDR_IDX] =
+	    (vtophys(vm_data->lpi_ist) & L2_VMTE_LPI_IST_ADDR_MASK) |
+	    ((uint64_t)lpi_id_bits << L2_VMTE_LPI_ID_BITS_SHIFT) |
+	    L2_VMTE_LPI_IST_VALID;
+	if (irs->vmd_size)
+		vmte[L2_VMTE_VMD_ADDR_IDX] =
+		    (vtophys(vm_data->vmd) & L2_VMTE_VMD_ADDR_MASK) |
+		    L2_VMTE_VALID;
+	else
+		vmte[L2_VMTE_VMD_ADDR_IDX] = L2_VMTE_VALID;
+
+	if (sc->gic_coherent) {
+		/* Ensure the IRS observed zeroed memory */
+		dsb(ishst);
+	} else {
+		cpu_dcache_wbinv_range(vmte, sizeof(L2_VMTE_SIZE));
+		cpu_dcache_wbinv_range(vm_data->vpet,
+		    sizeof(VPETE_SIZE) * nr_vpes);
+		cpu_dcache_wbinv_range(vm_data->vpete,
+		    sizeof(VPE_DESC_SIZE) * nr_vpes);
+		cpu_dcache_wbinv_range(vm_data->lpi_ist,
+		    sizeof(L2_ISTE_SIZE) * (1 << lpi_id_bits));
+		cpu_dcache_wbinv_range(vm_data->spi_ist,
+		    sizeof(L2_ISTE_SIZE) * (1 << spi_id_bits));
+		if (irs->vmd_size)
+			cpu_dcache_wbinv_range(vm_data->vmd, irs->vmd_size);
+	}
+
+	IRS_CFG_WRITE_8(irs, IRS_VMAP_VMR,
+	    IRS_VMAP_VMR_M | (vm_data->vm_id & IRS_VMAP_VMR_VM_ID_MASK));
+
+	mtx_lock_spin(&irs->irs_lock);
+	gicv5_wait_for_op(irs, IRS_VMT_STATUSR, IRS_VMT_STATUSR_IDLE, NULL);
+	mtx_unlock_spin(&irs->irs_lock);
+
+	return (0);
+}
+
+int
+gicv5_free_vm(device_t dev, int vm_id)
+{
+	struct gicv5_vm_data *vm_data;
+	struct gicv5_softc *sc;
+	struct gicv5_irs *irs;
+
+	sc = device_get_softc(dev);
+	irs = sc->gic_irs[0];
+
+	KASSERT(vm_id < irs->vm_id_count, ("%s: VM ID out of range", __func__));
+	KASSERT(!BIT_ISSET(irs->vm_id_count, vm_id, &sc->gic_irs[0]->vm_ids),
+	    ("%s: VM ID not allocated", __func__));
+
+	mtx_lock(&irs->vm_lock);
+
+	BIT_SET(irs->vm_id_count, vm_id, &sc->gic_irs[0]->vm_ids);
+
+	/* Make VM invalid */
+	IRS_CFG_WRITE_8(irs, IRS_VMAP_VMR,
+	    IRS_VMAP_VMR_M | IRS_VMAP_VMR_U |
+	    (vm_id & IRS_VMAP_VMR_VM_ID_MASK));
+
+	mtx_lock_spin(&irs->irs_lock);
+	gicv5_wait_for_op(irs, IRS_VMT_STATUSR, IRS_VMT_STATUSR_IDLE, NULL);
+	mtx_unlock_spin(&irs->irs_lock);
+
+	SLIST_FOREACH(vm_data, &irs->vm_data_head, node) {
+		if (vm_data->vm_id == vm_id) {
+			SLIST_REMOVE(&irs->vm_data_head, vm_data,
+			    gicv5_vm_data, node);
+
+			mtx_unlock(&irs->vm_lock);
+
+			free(vm_data->vpet, M_DEVBUF);
+			free(vm_data->vpete, M_DEVBUF);
+			free(vm_data->lpi_ist, M_DEVBUF);
+			free(vm_data->spi_ist, M_DEVBUF);
+			free(vm_data->vmd, M_DEVBUF);
+
+			free(vm_data, M_DEVBUF);
+
+			return (0);
+		}
+	}
+
+	mtx_unlock(&irs->vm_lock);
+
+	return (ENOENT);
+}
+
+int
+gicv5_get_max_vpe_count(device_t dev)
+{
+	struct gicv5_softc *sc;
+	struct gicv5_irs *irs;
+
+	sc = device_get_softc(dev);
+	irs = sc->gic_irs[0];
+
+	return (irs->vpe_id_count);
+}
+
 void
 gicv5_attach(device_t dev)
 {
diff --git a/sys/arm64/arm64/gicv5var.h b/sys/arm64/arm64/gicv5var.h
index faab72387668..24da63953ba7 100644
--- a/sys/arm64/arm64/gicv5var.h
+++ b/sys/arm64/arm64/gicv5var.h
@@ -50,6 +50,9 @@ struct gicv5_softc {
 	u_int			gic_nchildren;
 	/* Number of LPIs, including IPIs */
 	u_int			gic_nlpis;
+	u_int			gic_lpi_id_bits;
+
+	bool has_virt;
 };
 
 struct gicv5_devinfo {
@@ -70,4 +73,9 @@ void gicv5_irs_extend_ist(device_t, device_t, u_int);
 
 void gicv5_attach_iwb(device_t, device_t);
 
+int gicv5_alloc_vm(device_t, int);
+int gicv5_free_vm(device_t, int);
+
+int gicv5_get_max_vpe_count(device_t);
+
 #endif /* _ARM64_GICV5VAR_H_ */

From nobody Mon Nov 23 17:01:57 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYC0P4hsmz714rT
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 17:01: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYC0P2JMQz54BZ
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 17:01:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795453317;
	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=1C1UszbCZJ1SpsumOH1Ff5gdiHziL/eq3Jsy2Viueyc=;
	b=DOLVYOCm8uz3uGHE7ZAfKRrm8uY5slIGmUG3dZXf6UkVUJpk0Doj/W9iz3yT39uWX+r3nY
	0BoBLZc9aTxwMf3sOoA37SBYfLD1VPZjydzM5an8bDzsammZWvWcXZUPCVnql3DvwiPPUq
	V5kCegQ4vMYOCy9S/7xRJLHLypB3C88/OGj9NAiaX0DP1NKK29ICgdFi61/EBT4RBx95dA
	D+X0Cpqoc03tdduHL78kTo9bGkCk2XlyYUHBxg7HRRTlTvdaxd728/ytRL28+60bBNfn9C
	+kcq1Oqn1QLk52avrEuyQhmsS/b7L1/24U6DecGbwTaCz0LCMGzMpsLZ8W5BCA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795453317;
	b=MxriGltsCrAFQgrHqRR65zlJhToia8J1wKgrq3pkZrPDsLKhLC2t7sdSUtHFWEaCzqh8/e
	Bf155e4mwHmqy+VTpMAkqxQVIEjPLhNQ54Y3i7OtUsFZkeHLj+iJjNDPhKYP7fE1A6v2+K
	eh27g/zquV8Sm5YevQJ6nW2iPGFN/gOB5LoRBh7wPPMfMtFh3gcMnCaMR4nTmDR1WKNhGq
	8Y+G9jhtotFIcpDVLN4Ps+7N5s9FLe0pqRV/DElWPppPF9qwzceMAO6X4uKd9MQn5R7rcF
	zTCHvsTC6w3nQBk9gUlb3Q3dlaarGPJue9RO2235ksoONBcj+8AIsM3W62Q8Tw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795453317;
	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=1C1UszbCZJ1SpsumOH1Ff5gdiHziL/eq3Jsy2Viueyc=;
	b=eVd0WonykOuyaQwSqQo8/Jahhuywp8pukmDUokjzkeMuJDkN6LVAajatteve3Q+jG3Bt0s
	P0Nh600cXA4pRuYQQOtSn8FKh0uh4ZsSTkkGqpCabp9bj+AGfSYG2kVe+I8s6cPLHWvx1b
	71cEUiPge/pHTHynzHO43fXzipBiAWes4fr4NEMXEJ3a3qFbIF8FQebFIB0osKbKjOO9MT
	8x3tGawmk2mlF+lvoueYHlrkJmtEiB3DZgv3kvlaCxY5UIXfjaNX+3GU6nReF3BcU8o+l5
	spEHyLpQwW0QStKyhKkLdbJbsyqPYp2Q3We/XFZ/SVG551mKt0MIr5kIfRMLvA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYC0P1hFfz10rT
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 17:01:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1c661
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 17:01:57 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Cc: Sarah Walker <sarah.walker2@arm.com>
From: Andrew Turner <andrew@FreeBSD.org>
Subject: git: 0eb5786319aa - main - arm64: Add GICv5 ID fields to identcpu
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: andrew
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 0eb5786319aa211b48d89937a12fa1a739474fa2
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 17:01:57 +0000
Message-Id: <6b047185.1c661.575a2b99@gitrepo.freebsd.org>

The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=0eb5786319aa211b48d89937a12fa1a739474fa2

commit 0eb5786319aa211b48d89937a12fa1a739474fa2
Author:     Sarah Walker <sarah.walker2@arm.com>
AuthorDate: 2026-08-25 13:54:45 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2026-11-23 16:22:58 +0000

    arm64: Add GICv5 ID fields to identcpu
    
    Reviewed by:    andrew
    Sponsored by:   Arm Ltd
    Differential Revision:  https://reviews.freebsd.org/D60114
---
 sys/arm64/arm64/identcpu.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c
index 60591e2913d2..acf5692a18c0 100644
--- a/sys/arm64/arm64/identcpu.c
+++ b/sys/arm64/arm64/identcpu.c
@@ -48,6 +48,8 @@
 #include <machine/md_var.h>
 #include <machine/undefined.h>
 
+#include "gicv5reg.h"
+
 static MALLOC_DEFINE(M_IDENTCPU, "CPU ID", "arm64 CPU identification memory");
 
 struct cpu_desc;
@@ -159,6 +161,7 @@ struct cpu_desc {
 	uint64_t	mvfr1;
 #endif
 	uint64_t	clidr;
+	uint64_t	icc_idr0;
 	uint32_t	ccsidr[MAX_CACHES][2]; /* 2 possible types. */
 	bool		have_sve;
 };
@@ -1886,9 +1889,14 @@ static const struct mrs_field id_aa64pfr1_fields[] = {
 	MRS_FIELD_END,
 };
 
+static const struct mrs_field_value id_aa64pfr2_gcie[] = {
+	MRS_FIELD_VALUE_NONE_IMPL(ID_AA64PFR2, GCIE, NONE, IMPL),
+	MRS_FIELD_VALUE_END,
+};
 
 /* ID_AA64PFR2_EL1 */
 static const struct mrs_field id_aa64pfr2_fields[] = {
+	MRS_FIELD(ID_AA64PFR2, GCIE, false, MRS_LOWER, 0, id_aa64pfr2_gcie),
 	MRS_FIELD_END,
 };
 
@@ -2013,6 +2021,16 @@ static const struct mrs_field id_aa64zfr0_fields[] = {
 	MRS_FIELD_END,
 };
 
+static const struct mrs_field_value icc_idr0_gcie_legacy[] = {
+	MRS_FIELD_VALUE_NONE_IMPL(ICC_IDR0, GCIE_LEGACY, NONE, IMPL),
+	MRS_FIELD_VALUE_END,
+};
+
+static const struct mrs_field icc_idr0_fields[] = {
+	MRS_FIELD(ICC_IDR0, GCIE_LEGACY, false, MRS_LOWER, 0,
+	    icc_idr0_gcie_legacy),
+	MRS_FIELD_END,
+};
 
 #ifdef COMPAT_FREEBSD32
 /* ID_ISAR5_EL1 */
@@ -2285,6 +2303,8 @@ static const struct mrs_sanitized_reg sanitized_regs[] = {
 
 	USER_REG(CTR_EL0, ctr, true),
 
+	KERNEL_REG(ICC_IDR0_EL1, icc_idr0),
+
 #ifdef COMPAT_FREEBSD32
 	USER_REG(ID_ISAR5_EL1, id_isar5, false),
 
@@ -3420,6 +3440,9 @@ identify_cpu(u_int cpu)
 		desc->ccsidr[i][j] = READ_SPECIALREG(ccsidr_el1);
 	}
 
+	if (ID_AA64PFR2_GCIE_VAL(desc->id_aa64pfr2) != ID_AA64PFR2_GCIE_NONE)
+		desc->icc_idr0 = READ_SPECIALREG(ICC_IDR0_EL1);
+
 #ifdef COMPAT_FREEBSD32
 	/* Only read aarch32 SRs if EL0-32 is available */
 	if (ID_AA64PFR0_EL0_VAL(desc->id_aa64pfr0) == ID_AA64PFR0_EL0_64_32) {

From nobody Mon Nov 23 17:01:58 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYC0Q5jb5z714rZ
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 17:01: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYC0Q2WQzz53mk
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 17:01:58 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795453318;
	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=mUug/K/JJFd5fORKlqpniuxmWDWrkJ7QQvOuYnT0ZiU=;
	b=AdznPi12lTJ+ARty2kGyeyzO7EBuawlbffxSucT8GblPDV4jOdaSoBfddgwErW7jX7A93r
	zBo6h2Pwc4du8Nr9T7vW3UV0U71AzKAq3Rq24Tn/Nke0rYyZBTHsB2vDc15YhM7OmcEOmx
	i33GBtp5BjDxI0ApM7a0yG2JhqBkPelwLJ/usxnvciR7hVq0POsrW/9EjACKLyzjBl2z67
	4cuWI9xOwQmS5nveKVHkto/sg0WcVmGvr94S25GTiQFnCbn6s/+0pMQ6iGiegJEA9tThcB
	xWNSavJbTOupYIhrcFEkBhGOCos1PjAdtLnJQG52kP6RLjpMIXcw4NiXoc2nMA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795453318;
	b=dpD52DswRwIlTgWYNhx2tiri+dB+uSw0ERlxM53mq94BTrUQGc4kDFFrP271XPdxaIGkY1
	IuT14DcIK0/gtjb5U6bjOU0qRoKIMirvW+VdPFlcoItLQW5RxJgwRmeKT65joH803kCjrl
	LyxtWk2flXd5DupE9rnxm9zl2S6bNHt8EbYEFtfVRBaED4yMaiGf5CUmldwRTYveyfOI9q
	2YBElUCDkNmtlUsF5IxhLtg/q9Hs1Lplzr+8soU+XVY4Eh+rl7msHYXp8LdXkJQNgb3bQK
	9WTWBH0wXsjGvmztE79H5SvtcdtxUoxf38kJ90UYJZ0Zp1FuDTtNn3Kr8Y2sfw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795453318;
	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=mUug/K/JJFd5fORKlqpniuxmWDWrkJ7QQvOuYnT0ZiU=;
	b=Ej0CpJ/IZ9GScp6YQG741hJEXqf/9pRPYDlhxIn7Fy8o6UVpDRcUDmVIr1MsZJOfWezi3Q
	RMiajniSy+8Bp/MP04nv/3Kr8RM2lropThnrvIA2SgnXIy1t+xgarMsTAfqrOvaHIDXzCC
	owZk+L7iZjGfFKWp23UBXBEIX4ACdgreCWBK3dhZaQQD4lncr97B4fQgReCBt2d277CAMz
	rtJnVg3+rL6lXSxqHzXzOBslBITYf3919fCEpW5Pe98gFkOMMnU2CuxN4V/ZbK8i82//Z4
	Z9YhYsF1896G4eR7q+6aRLjzvMqOI1guqj9rEDEiC97ynP7lvFk8a+erbt03WA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYC0Q29whz103W
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 17:01:58 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1e692
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 17:01:58 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Cc: Sarah Walker <sarah.walker2@arm.com>
From: Andrew Turner <andrew@FreeBSD.org>
Subject: git: 22554457440b - main - arm64/vmm: Implement vgic_v5
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: andrew
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 22554457440bcf26076c7996a6c3d92592d72b92
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 17:01:58 +0000
Message-Id: <6b047186.1e692.2412fbdc@gitrepo.freebsd.org>

The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=22554457440bcf26076c7996a6c3d92592d72b92

commit 22554457440bcf26076c7996a6c3d92592d72b92
Author:     Sarah Walker <sarah.walker2@arm.com>
AuthorDate: 2026-07-30 11:44:26 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2026-11-23 16:47:19 +0000

    arm64/vmm: Implement vgic_v5
    
    Adds support for GICv5 as both a host and guest. Additionally, on platforms with
    FEAT_GICE_LEGACY, supports a GICv3 guest under a GICv5 host.
    
    The current implementation only implements the IRS component. The ITS is not
    currently emulated, which prevents the use of MSIs.
    
    Co-developed-by: Andrew Turner <andrew@FreeBSD.org>
    Reviewed by:    andrew
    Sponsored by:   Arm Ltd
    Differential Revision:  https://reviews.freebsd.org/D60115
---
 sys/arm64/arm64/gicv5.c           |   3 -
 sys/arm64/arm64/gicv5reg.h        |  47 ++
 sys/arm64/arm64/gicv5var.h        |   3 +
 sys/arm64/vmm/arm64.h             |  55 ++-
 sys/arm64/vmm/io/vgic.c           |  37 +-
 sys/arm64/vmm/io/vgic.h           |   1 +
 sys/arm64/vmm/io/vgic_if.m        |   4 +
 sys/arm64/vmm/io/vgic_internal.h  |  61 ++-
 sys/arm64/vmm/io/vgic_v3.c        | 131 +++---
 sys/arm64/vmm/io/vgic_v5.c        | 906 ++++++++++++++++++++++++++++++++++++++
 sys/arm64/vmm/io/vtimer.c         |  36 +-
 sys/arm64/vmm/vmm.c               |  41 +-
 sys/arm64/vmm/vmm_arm64.c         |  21 +
 sys/arm64/vmm/vmm_dev_machdep.c   |   3 +-
 sys/arm64/vmm/vmm_hyp.c           | 230 ++++++++--
 sys/arm64/vmm/vmm_hyp_exception.S |  17 +-
 sys/conf/files.arm64              |   1 +
 sys/modules/vmm/Makefile          |   1 +
 18 files changed, 1467 insertions(+), 131 deletions(-)

diff --git a/sys/arm64/arm64/gicv5.c b/sys/arm64/arm64/gicv5.c
index 8a4b16f80b75..cfca19e6ebf9 100644
--- a/sys/arm64/arm64/gicv5.c
+++ b/sys/arm64/arm64/gicv5.c
@@ -69,9 +69,6 @@
 #include "gicv5var.h"
 #include "gic_v3_var.h" /* For GICV3_IVAR_NIRQS */
 
-#define	GICV5_PPIS_PER_REG			64
-#define	GICV5_PPI_COUNT				128
-
 #define	LPI_IPI_BASE		0
 #define	LPI_IPI_LIMIT		(LPI_IPI_BASE + (mp_maxid + 1) * INTR_IPI_COUNT)
 #define	LPI_IS_IPI(lpi)		((lpi) < LPI_ITS_BASE)
diff --git a/sys/arm64/arm64/gicv5reg.h b/sys/arm64/arm64/gicv5reg.h
index 1522bcf68213..701737540c86 100644
--- a/sys/arm64/arm64/gicv5reg.h
+++ b/sys/arm64/arm64/gicv5reg.h
@@ -662,6 +662,19 @@
 #define	ICH_HFGRTR_EL2_CRn		12
 #define	ICH_HFGRTR_EL2_CRm		9
 #define	ICH_HFGRTR_EL2_op2		4
+#define ICH_HFGRTR_EL2_ICC_PPI_ACTIVERn_EL1     (0x1ul << 20)
+#define ICH_HFGRTR_EL2_ICC_PPI_PRIORITYn_EL1    (0x1ul << 19)
+#define ICH_HFGRTR_EL2_ICC_PPI_PENDRn_EL1       (0x1ul << 18)
+#define ICH_HFGRTR_EL2_ICC_PPI_ENABLERn_EL1     (0x1ul << 17)
+#define ICH_HFGRTR_EL2_ICC_PPI_HMRn_EL1         (0x1ul << 16)
+#define ICH_HFGRTR_EL2_ICC_IAFFIDR_EL1          (0x1ul << 7)
+#define ICH_HFGRTR_EL2_ICC_ICSR_EL1             (0x1ul << 6)
+#define ICH_HFGRTR_EL2_ICC_PCR_EL1              (0x1ul << 5)
+#define ICH_HFGRTR_EL2_ICC_HPPIR_EL1            (0x1ul << 4)
+#define ICH_HFGRTR_EL2_ICC_HAPR_EL1             (0x1ul << 3)
+#define ICH_HFGRTR_EL2_ICC_CR0_EL1              (0x1ul << 2)
+#define ICH_HFGRTR_EL2_ICC_IDRn_EL1             (0x1ul << 1)
+#define ICH_HFGRTR_EL2_ICC_APR_EL1              (0x1ul << 0)
 
 /*
  * ICH_HFGWTR_EL2
@@ -673,6 +686,14 @@
 #define	ICH_HFGWTR_EL2_CRn		12
 #define	ICH_HFGWTR_EL2_CRm		9
 #define	ICH_HFGWTR_EL2_op2		6
+#define ICH_HFGWTR_EL2_ICC_PPI_ACTIVERn_EL1     (0x1ul << 20)
+#define ICH_HFGWTR_EL2_ICC_PPI_PRIORITYn_EL1    (0x1ul << 19)
+#define ICH_HFGWTR_EL2_ICC_PPI_PENDRn_EL1       (0x1ul << 18)
+#define ICH_HFGWTR_EL2_ICC_PPI_ENABLERn_EL1     (0x1ul << 17)
+#define ICH_HFGWTR_EL2_ICC_ICSR_EL1             (0x1ul << 6)
+#define ICH_HFGWTR_EL2_ICC_PCR_EL1              (0x1ul << 5)
+#define ICH_HFGWTR_EL2_ICC_CR0_EL1              (0x1ul << 2)
+#define ICH_HFGWTR_EL2_ICC_APR_EL1              (0x1ul << 0)
 
 /*
  * ICH_HPPIR_EL2
@@ -858,7 +879,26 @@
 #define	IRS_IDR7			0x001c
 #define	 IRS_IDR7_SPI_BASE		0x00ffffff
 #define	IRS_IIDR			0x0040
+#define	 IRS_IIDR_PRODUCT_ID_SHIFT	20
+#define	 IRS_IIDR_PRODUCT_ID_MASK	(0xfffu << IRS_IIDR_PRODUCT_ID_SHIFT)
+#define	 IRS_IIDR_VARIANT_SHIFT		16
+#define	 IRS_IIDR_VARIANT_MASK		(0xfu << IRS_IIDR_VARIANT_SHIFT)
+#define	 IRS_IIDR_REVISION_SHIFT	12
+#define	 IRS_IIDR_REVISION_MASK		(0xfu << IRS_IIDR_REVISION_SHIFT)
+#define	 IRS_IIDR_IMPLEMENTER_SHIFT	0
+#define	 IRS_IIDR_IMPLEMENTER_MASK	(0xfffu << IRS_IIDR_IMPLEMENTED_SHIFT)
 #define	IRS_AIDR			0x0044
+#define	 IRS_AIDR_COMPONENT_SHIFT	0
+#define	 IRS_AIDR_COMPONENT_IRS		(0x0u << IRS_AIDR_COMPONENT_SHIFT)
+#define	 IRS_AIDR_COMPONENT_ITS		(0x1u << IRS_AIDR_COMPONENT_SHIFT)
+#define	 IRS_AIDR_COMPONENT_IWB		(0x2u << IRS_AIDR_COMPONENT_SHIFT)
+#define	 IRS_AIDR_COMPONENT_MASK	(0xfu << IRS_AIDR_COMPONENT_SHIFT)
+#define	 IRS_AIDR_ARCH_MAJOR_REV_SHIFT	4
+#define	 IRS_AIDR_ARCH_MAJOR_REV_V5	(0x0u << IRS_AIDR_ARCH_MAJOR_REV_SHIFT)
+#define	 IRS_AIDR_ARCH_MAJOR_REV_MASK	(0xfu << IRS_AIDR_ARCH_MAJOR_REV_SHIFT)
+#define	 IRS_AIDR_ARCH_MINOR_REV_SHIFT	0
+#define	 IRS_AIDR_ARCH_MINOR_REV_0	(0x0u << IRS_AIDR_ARCH_MINOR_REV_SHIFT)
+#define	 IRS_AIDR_ARCH_MINOR_REV_MASK	(0xfu << IRS_AIDR_ARCH_MINOR_REV_SHIFT)
 #define	IRS_CR0				0x0080
 #define	 IRS_CR0_IDLE			(0x1u << 1)
 #define	 IRS_CR0_IRSEN			(0x1u << 0)
@@ -904,6 +944,7 @@
 #define	IRS_SYNC_STATUSR		0x00c4
 #define	IRS_SPI_VMR			0x0100
 #define	IRS_SPI_SELR			0x0108
+#define	 IRS_SPI_SELR_ID_MASK		(0xffffffu << 0)
 #define	IRS_SPI_DOMAINR			0x010c
 #define	IRS_SPI_RESAMPLER		0x0110
 #define	IRS_SPI_CFGR			0x0114
@@ -913,8 +954,14 @@
 #define	 IRS_SPI_STATUSR_V		(0x1u << 1)
 #define	 IRS_SPI_STATUSR_IDLE		(0x1u << 0)
 #define	IRS_PE_SELR			0x0140
+#define	 IRS_PE_SELR_IAFFID_SHIFT	0
+#define	 IRS_PE_SELR_IAFFID_MASK	(0xffffu << IRS_PE_SELR_IAFFID_SHIFT)
 #define	IRS_PE_STATUSR			0x0144
+#define	 IRS_PE_CR0_ONLINE		(0x1 << 2)
+#define	 IRS_PE_CR0_V			(0x1 << 1)
+#define	 IRS_PE_CR0_IDLE		(0x1 << 0)
 #define	IRS_PE_CR0			0x0148
+#define	 IRS_PE_CR0_DPS			(0x1 << 0)
 #define	IRS_IST_BASER			0x0180
 #define	 IRS_IST_BASER_ADDR_LIMIT	0x0100000000000000ul
 #define	 IRS_IST_BASER_ADDR_MASK	0x00ffffffffffffc0ul
diff --git a/sys/arm64/arm64/gicv5var.h b/sys/arm64/arm64/gicv5var.h
index 24da63953ba7..a03bfbb59601 100644
--- a/sys/arm64/arm64/gicv5var.h
+++ b/sys/arm64/arm64/gicv5var.h
@@ -60,6 +60,9 @@ struct gicv5_devinfo {
 	struct gicv5_irs	*di_irs;
 };
 
+#define GICV5_PPIS_PER_REG	64
+#define GICV5_PPI_COUNT		128
+
 #define	GICV5_IVAR_LPI_START	5000
 
 __BUS_ACCESSOR(gicv5, lpi_start, GICV5, LPI_START, u_int);
diff --git a/sys/arm64/vmm/arm64.h b/sys/arm64/vmm/arm64.h
index 5279ca546984..9014546bd0b4 100644
--- a/sys/arm64/vmm/arm64.h
+++ b/sys/arm64/vmm/arm64.h
@@ -36,8 +36,8 @@
 #include "io/vgic_v3.h"
 #include "io/vtimer.h"
 
-struct vgic_v3;
-struct vgic_v3_cpu;
+struct vgic;
+struct vgic_cpu;
 
 /*
   Encode the index of a given register within VNCR into the enum value.
@@ -149,6 +149,40 @@ enum hypctx_sysreg {
 	HOST_CNTHCTL_EL2,
 	HOST_CNTVOFF_EL2,
 
+
+	/* GICv5 registers */
+	HOST_ICH_PPI_ACTIVER0_EL2,
+	HOST_ICH_PPI_ACTIVER1_EL2,
+	HOST_ICH_PPI_DVIR0_EL2,
+	HOST_ICH_PPI_DVIR1_EL2,
+	HOST_ICH_PPI_ENABLER0_EL2,
+	HOST_ICH_PPI_ENABLER1_EL2,
+	HOST_ICH_PPI_PENDR0_EL2,
+	HOST_ICH_PPI_PENDR1_EL2,
+	HOST_ICH_PPI_PRIORITYR0_EL2,
+	HOST_ICH_PPI_PRIORITYR1_EL2,
+	HOST_ICH_PPI_PRIORITYR2_EL2,
+	HOST_ICH_PPI_PRIORITYR3_EL2,
+	HOST_ICH_PPI_PRIORITYR4_EL2,
+	HOST_ICH_PPI_PRIORITYR5_EL2,
+	HOST_ICH_PPI_PRIORITYR6_EL2,
+	HOST_ICH_PPI_PRIORITYR7_EL2,
+	HOST_ICH_PPI_PRIORITYR8_EL2,
+	HOST_ICH_PPI_PRIORITYR9_EL2,
+	HOST_ICH_PPI_PRIORITYR10_EL2,
+	HOST_ICH_PPI_PRIORITYR11_EL2,
+	HOST_ICH_PPI_PRIORITYR12_EL2,
+	HOST_ICH_PPI_PRIORITYR13_EL2,
+	HOST_ICH_PPI_PRIORITYR14_EL2,
+	HOST_ICH_PPI_PRIORITYR15_EL2,
+	HOST_ICH_HFGITR_EL2,
+	HOST_ICH_HFGRTR_EL2,
+	HOST_ICH_HFGWTR_EL2,
+	HOST_ICH_VCTLR_EL2,
+	HOST_ICH_HPPIR_EL2,
+	HOST_ICH_APR_EL2,
+	HOST_ICH_APR_RING_EL2,
+
 	NR_NON_VNCR_REGS,
 
 	/* VNCR Registers */
@@ -285,7 +319,8 @@ struct hypctx {
 		uint16_t	ich_lr_num;
 		uint16_t	ich_apr_num;
 	} vgic_v3;
-	struct vgic_v3_cpu	*vgic_cpu;
+	struct vgic_cpu		*vgic_cpu;
+
 	bool			has_exception;
 	bool			dbg_oslock;
 
@@ -346,12 +381,15 @@ struct hyp {
 	uint64_t	cntvoff_el2;    /* VM-wide virtual timer offset */
 	uint64_t	el2_addr;	/* The address of this in el2 space */
 	uint64_t	feats;		/* Which features are enabled */
-#define	HYP_FEAT_HCX		(0x1ul << 0)
-#define	HYP_FEAT_ECV_POFF	(0x1ul << 1)
-#define	HYP_FEAT_FGT		(0x1ul << 2)
-#define	HYP_FEAT_FGT2		(0x1ul << 3)
+#define	HYP_FEAT_HCX			(0x1ul << 0)
+#define	HYP_FEAT_ECV_POFF		(0x1ul << 1)
+#define	HYP_FEAT_FGT			(0x1ul << 2)
+#define	HYP_FEAT_FGT2			(0x1ul << 3)
+#define	HYP_FEAT_GICV3_OR_LEGACY	(0x1ul << 4)
+#define	HYP_FEAT_GICV5			(0x1ul << 5)
 	bool		vgic_attached;
-	struct vgic_v3	*vgic;
+	struct vgic	*vgic;
+	int		vgic_ver;
 	struct hypctx	*ctx[];
 };
 
@@ -365,5 +403,6 @@ uint64_t	vmm_call_hyp(uint64_t, ...);
 
 struct hypctx *arm64_get_active_vcpu(void);
 void raise_data_insn_abort(struct hypctx *, uint64_t, bool, int);
+int vmm_get_max_ipa_bits(void);
 
 #endif /* !_VMM_ARM64_H_ */
diff --git a/sys/arm64/vmm/io/vgic.c b/sys/arm64/vmm/io/vgic.c
index 582280823f1e..a71b93a0d02f 100644
--- a/sys/arm64/vmm/io/vgic.c
+++ b/sys/arm64/vmm/io/vgic.c
@@ -29,6 +29,11 @@
 #include <sys/types.h>
 #include <sys/systm.h>
 #include <sys/bus.h>
+#include <sys/malloc.h>
+
+#include <dev/vmm/vmm_vm.h>
+
+#include <arm64/vmm/arm64.h>
 
 #include "vgic.h"
 #include "vgic_if.h"
@@ -124,10 +129,34 @@ vgic_init(void)
 	VGIC_INIT(vgic_dev);
 }
 
+int
+vgic_get_version(void)
+{
+	return (VGIC_GET_VERSION(vgic_dev));
+}
+
 int
 vgic_attach_to_vm(struct hyp *hyp, struct vm_vgic_descr *descr)
 {
-	return (VGIC_ATTACH_TO_VM(vgic_dev, hyp, descr));
+	int rv;
+
+	rv = VGIC_ATTACH_TO_VM(vgic_dev, hyp, descr);
+	if (rv != 0)
+		return (rv);
+
+	for (u_int cpu = 0; cpu < vm_get_maxcpus(hyp->vm); cpu++) {
+		struct hypctx *hypctx;
+
+		hypctx = hyp->ctx[cpu];
+		if (hypctx == NULL)
+			continue;
+		MPASS(hypctx->vgic_cpu != NULL);
+		VGIC_CPUINIT(vgic_dev, hypctx);
+	}
+
+	hyp->vgic_ver = hyp->vgic->vgic_ver;
+
+	return (0);
 }
 
 void
@@ -139,25 +168,29 @@ vgic_detach_from_vm(struct hyp *hyp)
 void
 vgic_vminit(struct hyp *hyp)
 {
+	hyp->vgic = malloc(sizeof(*hyp->vgic), M_DEVBUF, M_WAITOK | M_ZERO);
 	VGIC_VMINIT(vgic_dev, hyp);
 }
 
 void
 vgic_cpuinit(struct hypctx *hypctx)
 {
-	VGIC_CPUINIT(vgic_dev, hypctx);
+	hypctx->vgic_cpu = malloc(sizeof(*hypctx->vgic_cpu), M_DEVBUF,
+	    M_WAITOK | M_ZERO);
 }
 
 void
 vgic_cpucleanup(struct hypctx *hypctx)
 {
 	VGIC_CPUCLEANUP(vgic_dev, hypctx);
+	free(hypctx->vgic_cpu, M_DEVBUF);
 }
 
 void
 vgic_vmcleanup(struct hyp *hyp)
 {
 	VGIC_VMCLEANUP(vgic_dev, hyp);
+	free(hyp->vgic, M_DEVBUF);
 }
 
 int
diff --git a/sys/arm64/vmm/io/vgic.h b/sys/arm64/vmm/io/vgic.h
index b9b9f1e39f9c..fdd23dfd6d31 100644
--- a/sys/arm64/vmm/io/vgic.h
+++ b/sys/arm64/vmm/io/vgic.h
@@ -36,6 +36,7 @@ extern device_t vgic_dev;
 
 bool vgic_present(void);
 void vgic_init(void);
+int vgic_get_version(void);
 int vgic_attach_to_vm(struct hyp *hyp, struct vm_vgic_descr *descr);
 void vgic_detach_from_vm(struct hyp *hyp);
 void vgic_vminit(struct hyp *hyp);
diff --git a/sys/arm64/vmm/io/vgic_if.m b/sys/arm64/vmm/io/vgic_if.m
index 571e133cd74b..c2ad1dc0ec72 100644
--- a/sys/arm64/vmm/io/vgic_if.m
+++ b/sys/arm64/vmm/io/vgic_if.m
@@ -102,3 +102,7 @@ METHOD void sync_hwstate {
 	device_t dev;
 	struct hypctx *hypctx;
 }
+
+METHOD int get_version {
+	device_t dev;
+}
diff --git a/sys/arm64/vmm/io/vgic_internal.h b/sys/arm64/vmm/io/vgic_internal.h
index 2f47aef50724..bc56ae741b75 100644
--- a/sys/arm64/vmm/io/vgic_internal.h
+++ b/sys/arm64/vmm/io/vgic_internal.h
@@ -30,6 +30,9 @@
 #ifndef _VGIC_INTERNAL_H_
 #define	_VGIC_INTERNAL_H_
 
+struct hyp;
+struct hypctx;
+
 struct vgic_v3_irq {
 	/* List of IRQs that are active or pending */
 	TAILQ_ENTRY(vgic_v3_irq) act_pend_list;
@@ -80,6 +83,48 @@ struct vgic_v3_cpu {
 	u_int		ich_lr_used;
 };
 
+/* Global data not needed by EL2 */
+struct vgic_v5 {
+	struct mtx 	irs_mtx;
+	uint64_t 	irs_start;
+	size_t   	irs_end;
+
+	bool		irs_en;
+	uint32_t 	irs_cr1;
+
+	uint64_t	irs_ist_baser;
+	uint32_t	irs_ist_cfgr;
+
+	int		irs_pe_selr;
+
+	uint32_t	irs_spi_statusr;
+	uint32_t	irs_spi_selr;
+
+	int		max_cpu_count;
+	int		vm_id;
+};
+
+/* Per-CPU data not needed by EL2 */
+struct vgic_v5_cpu {
+	bool		dps;
+};
+
+struct vgic {
+	u_int	vgic_ver;
+
+	union {
+		struct vgic_v3 v3;
+		struct vgic_v5 v5;
+	};
+};
+
+struct vgic_cpu {
+	union {
+		struct vgic_v3_cpu v3;
+		struct vgic_v5_cpu v5;
+	};
+};
+
 typedef void (register_read)(struct hypctx *, u_int, uint64_t *, void *);
 typedef void (register_write)(struct hypctx *, u_int, u_int, u_int,
     uint64_t, void *);
@@ -88,7 +133,7 @@ register_read vgic_zero_read;
 register_write vgic_ignore_write;
 
 #define	VGIC_8_BIT	(1 << 0)
-/* (1 << 1) is reserved for 16 bit accesses */
+#define	VGIC_16_BIT	(1 << 1)
 #define	VGIC_32_BIT	(1 << 2)
 #define	VGIC_64_BIT	(1 << 3)
 
@@ -129,4 +174,18 @@ bool vgic_register_read(struct hypctx *, struct vgic_register *, u_int, u_int,
 bool vgic_register_write(struct hypctx *, struct vgic_register *, u_int, u_int,
     u_int, uint64_t, void *);
 
+void vgic_v3_vminit(device_t, struct hyp *);
+void vgic_v3_cpuinit(device_t, struct hypctx *);
+void vgic_v3_cpucleanup(device_t, struct hypctx *);
+void vgic_v3_vmcleanup(device_t, struct hyp *);
+int vgic_v3_max_cpu_count(device_t, struct hyp *);
+int vgic_v3_attach_to_vm(device_t, struct hyp *, struct vm_vgic_descr *);
+void vgic_v3_detach_from_vm(device_t, struct hyp *);
+bool vgic_v3_has_pending_irq(device_t, struct hypctx *);
+int vgic_v3_inject_irq(device_t, struct hyp *, int, uint32_t, bool);
+int vgic_v3_inject_msi(device_t dev, struct hyp *, uint64_t, uint64_t);
+void vgic_v3_flush_hwstate(device_t, struct hypctx *);
+void vgic_v3_sync_hwstate(device_t, struct hypctx *);
+void vgic_v3_init(device_t);
+
 #endif /* _VGIC_INTERNAL_H_ */
diff --git a/sys/arm64/vmm/io/vgic_v3.c b/sys/arm64/vmm/io/vgic_v3.c
index 22352beec87b..eede81186370 100644
--- a/sys/arm64/vmm/io/vgic_v3.c
+++ b/sys/arm64/vmm/io/vgic_v3.c
@@ -93,17 +93,11 @@ struct vgic_v3_virt_features {
 	size_t ich_apr_num;
 };
 
-
 /* How many IRQs we support (SGIs + PPIs + SPIs). Not including LPIs */
 #define	VGIC_NIRQS	1023
 /* Pretend to be an Arm design */
 #define	VGIC_IIDR	0x43b
 
-static vgic_inject_irq_t vgic_v3_inject_irq;
-static vgic_inject_msi_t vgic_v3_inject_msi;
-
-static int vgic_v3_max_cpu_count(device_t dev, struct hyp *hyp);
-
 #define	INJECT_IRQ(hyp, vcpuid, irqid, level)			\
     vgic_v3_inject_irq(NULL, (hyp), (vcpuid), (irqid), (level))
 
@@ -346,40 +340,19 @@ mpidr_to_vcpu(struct hyp *hyp, uint64_t mpidr)
 	return (-1);
 }
 
-static void
+void
 vgic_v3_vminit(device_t dev, struct hyp *hyp)
 {
-	struct vgic_v3 *vgic;
-
-	hyp->vgic = malloc(sizeof(*hyp->vgic), M_VGIC_V3,
-	    M_WAITOK | M_ZERO);
-	vgic = hyp->vgic;
-
-	/*
-	 * Configure the Distributor control register. The register resets to an
-	 * architecturally UNKNOWN value, so we reset to 0 to disable all
-	 * functionality controlled by the register.
-	 *
-	 * The exception is GICD_CTLR.DS, which is RA0/WI when the Distributor
-	 * supports one security state (ARM GIC Architecture Specification for
-	 * GICv3 and GICv4, p. 4-464)
-	 */
-	vgic->gicd_ctlr = 0;
-
-	mtx_init(&vgic->dist_mtx, "VGICv3 Distributor lock", NULL,
-	    MTX_SPIN);
 }
 
-static void
+void
 vgic_v3_cpuinit(device_t dev, struct hypctx *hypctx)
 {
 	struct vgic_v3_cpu *vgic_cpu;
 	struct vgic_v3_irq *irq;
 	int i, irqid;
 
-	hypctx->vgic_cpu = malloc(sizeof(*hypctx->vgic_cpu),
-	    M_VGIC_V3, M_WAITOK | M_ZERO);
-	vgic_cpu = hypctx->vgic_cpu;
+	vgic_cpu = &hypctx->vgic_cpu->v3;
 
 	mtx_init(&vgic_cpu->lr_mtx, "VGICv3 ICH_LR_EL2 lock", NULL, MTX_SPIN);
 
@@ -447,39 +420,36 @@ vgic_v3_cpuinit(device_t dev, struct hypctx *hypctx)
 	hypctx->vgic_v3.ich_apr_num = virt_features.ich_apr_num;
 }
 
-static void
+void
 vgic_v3_cpucleanup(device_t dev, struct hypctx *hypctx)
 {
 	struct vgic_v3_cpu *vgic_cpu;
 	struct vgic_v3_irq *irq;
 	int irqid;
 
-	vgic_cpu = hypctx->vgic_cpu;
+	vgic_cpu = &hypctx->vgic_cpu->v3;
 	for (irqid = 0; irqid < VGIC_PRV_I_NUM; irqid++) {
 		irq = &vgic_cpu->private_irqs[irqid];
 		mtx_destroy(&irq->irq_spinmtx);
 	}
 
 	mtx_destroy(&vgic_cpu->lr_mtx);
-	free(hypctx->vgic_cpu->private_irqs, M_VGIC_V3);
-	free(hypctx->vgic_cpu, M_VGIC_V3);
+	free(vgic_cpu->private_irqs, M_VGIC_V3);
 }
 
-static void
+void
 vgic_v3_vmcleanup(device_t dev, struct hyp *hyp)
 {
-	mtx_destroy(&hyp->vgic->dist_mtx);
-	free(hyp->vgic, M_VGIC_V3);
 }
 
-static int
+int
 vgic_v3_max_cpu_count(device_t dev, struct hyp *hyp)
 {
 	struct vgic_v3 *vgic;
 	size_t count;
 	int16_t max_count;
 
-	vgic = hyp->vgic;
+	vgic = &hyp->vgic->v3;
 	max_count = vm_get_maxcpus(hyp->vm);
 
 	/* No registers, assume the maximum CPUs */
@@ -659,7 +629,7 @@ write_pendr(struct hypctx *hypctx, int n, bool set, uint64_t val)
 		target_hypctx = hyp->ctx[target_vcpu];
 		if (target_hypctx == NULL)
 			goto next_irq;
-		vgic_cpu = target_hypctx->vgic_cpu;
+		vgic_cpu = &target_hypctx->vgic_cpu->v3;
 
 		if (!set) {
 			/* pending -> not pending */
@@ -735,7 +705,7 @@ write_activer(struct hypctx *hypctx, u_int n, bool set, uint64_t val)
 		target_hypctx = hyp->ctx[target_vcpu];
 		if (target_hypctx == NULL)
 			goto next_irq;
-		vgic_cpu = target_hypctx->vgic_cpu;
+		vgic_cpu = &target_hypctx->vgic_cpu->v3;
 
 		if (!set) {
 			/* active -> not active */
@@ -895,16 +865,20 @@ dist_ctlr_read(struct hypctx *hypctx, u_int reg, uint64_t *rval,
 {
 	struct hyp *hyp;
 	struct vgic_v3 *vgic;
+	uint64_t val;
 
 	hyp = hypctx->hyp;
-	vgic = hyp->vgic;
+	vgic = &hyp->vgic->v3;
 
-	mtx_lock_spin(&vgic->dist_mtx);
-	*rval = vgic->gicd_ctlr;
-	mtx_unlock_spin(&vgic->dist_mtx);
+	val = atomic_load_32(&vgic->gicd_ctlr);
+
+	/* No GICv2 emulation, so this is RAO */
+	val |= GICD_CTLR_ARE_NS;
 
 	/* Writes are never pending */
-	*rval &= ~GICD_CTLR_RWP;
+	val &= ~GICD_CTLR_RWP;
+
+	*rval = val;
 }
 
 static void
@@ -915,7 +889,7 @@ dist_ctlr_write(struct hypctx *hypctx, u_int reg, u_int offset, u_int size,
 
 	MPASS(offset == 0);
 	MPASS(size == 4);
-	vgic = hypctx->hyp->vgic;
+	vgic = &hypctx->hyp->vgic->v3;
 
 	/*
 	 * GICv2 backwards compatibility is not implemented so
@@ -929,10 +903,8 @@ dist_ctlr_write(struct hypctx *hypctx, u_int reg, u_int offset, u_int size,
 	 */
 	wval &= GICD_CTLR_G1A;
 	wval |= GICD_CTLR_ARE_NS;
-	mtx_lock_spin(&vgic->dist_mtx);
-	vgic->gicd_ctlr = wval;
+	atomic_store_32(&vgic->gicd_ctlr, wval);
 	/* TODO: Wake any vcpus that have interrupts pending */
-	mtx_unlock_spin(&vgic->dist_mtx);
 }
 
 /* GICD_TYPER */
@@ -1216,7 +1188,7 @@ dist_read(struct vcpu *vcpu, uint64_t fault_ipa, uint64_t *rval,
 
 	hypctx = vcpu_get_cookie(vcpu);
 	hyp = hypctx->hyp;
-	vgic = hyp->vgic;
+	vgic = &hyp->vgic->v3;
 
 	/* Check the register is one of ours and is the correct size */
 	if (fault_ipa < vgic->dist_start || fault_ipa + size > vgic->dist_end) {
@@ -1254,7 +1226,7 @@ dist_write(struct vcpu *vcpu, uint64_t fault_ipa, uint64_t wval,
 
 	hypctx = vcpu_get_cookie(vcpu);
 	hyp = hypctx->hyp;
-	vgic = hyp->vgic;
+	vgic = &hyp->vgic->v3;
 
 	/* Check the register is one of ours and is the correct size */
 	if (fault_ipa < vgic->dist_start || fault_ipa + size > vgic->dist_end) {
@@ -1461,7 +1433,7 @@ redist_read(struct vcpu *vcpu, uint64_t fault_ipa, uint64_t *rval,
 	/* Find the current vcpu ctx to get the vgic struct */
 	hypctx = vcpu_get_cookie(vcpu);
 	hyp = hypctx->hyp;
-	vgic = hyp->vgic;
+	vgic = &hyp->vgic->v3;
 
 	/* Check the register is one of ours and is the correct size */
 	if (fault_ipa < vgic->redist_start ||
@@ -1539,7 +1511,7 @@ redist_write(struct vcpu *vcpu, uint64_t fault_ipa, uint64_t wval,
 	/* Find the current vcpu ctx to get the vgic struct */
 	hypctx = vcpu_get_cookie(vcpu);
 	hyp = hypctx->hyp;
-	vgic = hyp->vgic;
+	vgic = &hyp->vgic->v3;
 
 	/* Check the register is one of ours and is the correct size */
 	if (fault_ipa < vgic->redist_start ||
@@ -1675,7 +1647,7 @@ vgic_v3_mmio_init(struct hyp *hyp)
 	int i;
 
 	/* Allocate memory for the SPIs */
-	vgic = hyp->vgic;
+	vgic = &hyp->vgic->v3;
 	vgic->irqs = malloc((VGIC_NIRQS - VGIC_PRV_I_NUM) *
 	    sizeof(*vgic->irqs), M_VGIC_V3, M_WAITOK | M_ZERO);
 
@@ -1696,7 +1668,7 @@ vgic_v3_mmio_destroy(struct hyp *hyp)
 	struct vgic_v3_irq *irq;
 	int i;
 
-	vgic = hyp->vgic;
+	vgic = &hyp->vgic->v3;
 	for (i = 0; i < VGIC_NIRQS - VGIC_PRV_I_NUM; i++) {
 		irq = &vgic->irqs[i];
 
@@ -1706,7 +1678,7 @@ vgic_v3_mmio_destroy(struct hyp *hyp)
 	free(vgic->irqs, M_VGIC_V3);
 }
 
-static int
+int
 vgic_v3_attach_to_vm(device_t dev, struct hyp *hyp, struct vm_vgic_descr *descr)
 {
 	struct vm *vm;
@@ -1741,7 +1713,8 @@ vgic_v3_attach_to_vm(device_t dev, struct hyp *hyp, struct vm_vgic_descr *descr)
 	if (cpu_count > vm_get_maxcpus(vm))
 		return (EINVAL);
 
-	vgic = hyp->vgic;
+	hyp->vgic->vgic_ver = 3;
+	vgic = &hyp->vgic->v3;
 
 	/* Set the distributor address and size for trapping guest access. */
 	vgic->dist_start = descr->v3_regs.dist_start;
@@ -1767,7 +1740,7 @@ vgic_v3_attach_to_vm(device_t dev, struct hyp *hyp, struct vm_vgic_descr *descr)
 	return (0);
 }
 
-static void
+void
 vgic_v3_detach_from_vm(device_t dev, struct hyp *hyp)
 {
 	if (hyp->vgic_attached) {
@@ -1789,13 +1762,13 @@ vgic_v3_get_irq(struct hyp *hyp, int vcpuid, uint32_t irqid)
 		hypctx = hyp->ctx[vcpuid];
 		if (hypctx == NULL)
 			return (NULL);
-		vgic_cpu = hypctx->vgic_cpu;
+		vgic_cpu = &hypctx->vgic_cpu->v3;
 		irq = &vgic_cpu->private_irqs[irqid];
 	} else if (irqid <= GIC_LAST_SPI) {
 		irqid -= VGIC_PRV_I_NUM;
 		if (irqid >= VGIC_NIRQS)
 			return (NULL);
-		irq = &hyp->vgic->irqs[irqid];
+		irq = &hyp->vgic->v3.irqs[irqid];
 	} else if (irqid < GIC_FIRST_LPI) {
 		return (NULL);
 	} else {
@@ -1814,13 +1787,13 @@ vgic_v3_release_irq(struct vgic_v3_irq *irq)
 	mtx_unlock_spin(&irq->irq_spinmtx);
 }
 
-static bool
+bool
 vgic_v3_has_pending_irq(device_t dev, struct hypctx *hypctx)
 {
 	struct vgic_v3_cpu *vgic_cpu;
 	bool empty;
 
-	vgic_cpu = hypctx->vgic_cpu;
+	vgic_cpu = &hypctx->vgic_cpu->v3;
 	mtx_lock_spin(&vgic_cpu->lr_mtx);
 	empty = TAILQ_EMPTY(&vgic_cpu->irq_act_pend);
 	mtx_unlock_spin(&vgic_cpu->lr_mtx);
@@ -1848,7 +1821,7 @@ vgic_v3_check_irq(struct vgic_v3_irq *irq, bool level)
 	return (false);
 }
 
-static int
+int
 vgic_v3_inject_irq(device_t dev, struct hyp *hyp, int vcpuid, uint32_t irqid,
     bool level)
 {
@@ -1894,7 +1867,7 @@ vgic_v3_inject_irq(device_t dev, struct hyp *hyp, int vcpuid, uint32_t irqid,
 	}
 
 	notify = false;
-	vgic_cpu = hypctx->vgic_cpu;
+	vgic_cpu = &hypctx->vgic_cpu->v3;
 
 	mtx_lock_spin(&vgic_cpu->lr_mtx);
 
@@ -1919,13 +1892,13 @@ out:
 	return (0);
 }
 
-static int
+int
 vgic_v3_inject_msi(device_t dev, struct hyp *hyp, uint64_t msg, uint64_t addr)
 {
 	struct vgic_v3 *vgic;
 	uint64_t reg;
 
-	vgic = hyp->vgic;
+	vgic = &hyp->vgic->v3;
 
 	/* This is a 4 byte register */
 	if (addr < vgic->dist_start || addr + 4 > vgic->dist_end) {
@@ -1939,14 +1912,14 @@ vgic_v3_inject_msi(device_t dev, struct hyp *hyp, uint64_t msg, uint64_t addr)
 	return (INJECT_IRQ(hyp, -1, msg, true));
 }
 
-static void
+void
 vgic_v3_flush_hwstate(device_t dev, struct hypctx *hypctx)
 {
 	struct vgic_v3_cpu *vgic_cpu;
 	struct vgic_v3_irq *irq;
 	int i;
 
-	vgic_cpu = hypctx->vgic_cpu;
+	vgic_cpu = &hypctx->vgic_cpu->v3;
 
 	/*
 	 * All Distributor writes have been executed at this point, do not
@@ -2021,7 +1994,7 @@ out:
 	mtx_unlock_spin(&vgic_cpu->lr_mtx);
 }
 
-static void
+void
 vgic_v3_sync_hwstate(device_t dev, struct hypctx *hypctx)
 {
 	struct vgic_v3_cpu *vgic_cpu;
@@ -2029,7 +2002,7 @@ vgic_v3_sync_hwstate(device_t dev, struct hypctx *hypctx)
 	uint64_t lr;
 	int i;
 
-	vgic_cpu = hypctx->vgic_cpu;
+	vgic_cpu = &hypctx->vgic_cpu->v3;
 
 	/* Exit early if there are no buffered interrupts */
 	if (vgic_cpu->ich_lr_used == 0)
@@ -2093,7 +2066,7 @@ vgic_v3_sync_hwstate(device_t dev, struct hypctx *hypctx)
 	vgic_cpu->ich_lr_used = 0;
 }
 
-static void
+void
 vgic_v3_init(device_t dev)
 {
 	uint64_t ich_vtr_el2;
@@ -2146,11 +2119,14 @@ struct vgic_v3_softc {
 static int
 vgic_v3_probe(device_t dev)
 {
+	u_int rev;
+
 	if (!gic_get_vgic(dev))
 		return (EINVAL);
 
-	/* We currently only support the GICv3 */
-	if (gic_get_hw_rev(dev) < 3)
+	/* We currently only support the GICv3/v4 */
+	rev = gic_get_hw_rev(dev);
+	if (rev < 3 || rev > 4)
 		return (EINVAL);
 
 	device_set_desc(dev, "Virtual GIC v3");
@@ -2255,6 +2231,12 @@ vgic_v3_detach(device_t dev)
 	return (0);
 }
 
+static int
+vgic_v3_get_version(device_t dev)
+{
+        return (3);
+}
+
 static device_method_t vgic_v3_methods[] = {
 	/* Device interface */
 	DEVMETHOD(device_probe,		vgic_v3_probe),
@@ -2275,6 +2257,7 @@ static device_method_t vgic_v3_methods[] = {
 	DEVMETHOD(vgic_inject_msi,	vgic_v3_inject_msi),
 	DEVMETHOD(vgic_flush_hwstate,	vgic_v3_flush_hwstate),
 	DEVMETHOD(vgic_sync_hwstate,	vgic_v3_sync_hwstate),
+	DEVMETHOD(vgic_get_version,	vgic_v3_get_version),
 
 	/* End */
 	DEVMETHOD_END
diff --git a/sys/arm64/vmm/io/vgic_v5.c b/sys/arm64/vmm/io/vgic_v5.c
new file mode 100644
index 000000000000..ec5e918c93ef
--- /dev/null
+++ b/sys/arm64/vmm/io/vgic_v5.c
@@ -0,0 +1,906 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2018 Alexandru Elisei <alexandru.elisei@gmail.com>
+ * Copyright (C) 2020-2022 Andrew Turner
+ * Copyright (C) 2023 Arm Ltd
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/types.h>
+#include <sys/errno.h>
+#include <sys/systm.h>
+#include <sys/bitstring.h>
+#include <sys/bus.h>
+#include <sys/kernel.h>
+#include <sys/lock.h>
+#include <sys/malloc.h>
+#include <sys/module.h>
+#include <sys/mutex.h>
+#include <sys/rman.h>
+#include <sys/smp.h>
+#include <sys/intr.h>
+
+#include <vm/vm.h>
+#include <vm/pmap.h>
+
+#include <dev/ofw/openfirm.h>
+
+#include <machine/atomic.h>
+#include <machine/bus.h>
+#include <machine/cpufunc.h>
+#include <machine/cpu.h>
+#include <machine/machdep.h>
+#include <machine/param.h>
+#include <machine/pmap.h>
+#include <machine/vmparam.h>
+#include <machine/intr.h>
+#include <machine/vmm.h>
+#include <machine/vmm_instruction_emul.h>
+
+#include <arm/arm/gic_common.h>
+
+#include <arm64/arm64/gicv5reg.h>
+#include <arm64/arm64/gicv5var.h>
+
+#include <arm64/vmm/hyp.h>
+#include <arm64/vmm/mmu.h>
+#include <arm64/vmm/arm64.h>
+#include <arm64/vmm/vmm_handlers.h>
+
+#include <dev/vmm/vmm_dev.h>
+#include <dev/vmm/vmm_vm.h>
+
+#include "vgic.h"
+#include "vgic_internal.h"
+
+#include "vgic_if.h"
+
+MALLOC_DEFINE(M_VGIC_V5, "ARM VMM VGIC V5", "ARM VMM VGIC V5");
+
+#define	SPI_COUNT	4096
+
+#define VGIC_IAFFID_BITS	16
+#define VGIC_INTID_BITS		12
+#define VGIC_PRI_BITS		5
+#define VGIC_MIN_LPI_BITS	8
+
+static int vgic_v5_max_cpu_count(device_t dev, struct hyp *hyp);
+
+static bool
+has_gcie_legacy(void)
+{
+	uint64_t idr0;
+
+	get_kernel_reg(ICC_IDR0_EL1, &idr0);
+
+	return ((idr0 & ICC_IDR0_GCIE_LEGACY_MASK) ? true : false);
+}
+
+static void
+vgic_v5_vminit(device_t dev, struct hyp *hyp)
+{
+	struct vgic_v5 *vgic;
+
+	vgic = &hyp->vgic->v5;
+	vgic->max_cpu_count = vgic_v5_max_cpu_count(dev, hyp);
+}
+
+static void
+vgic_v5_cpuinit(device_t dev, struct hypctx *hypctx)
+{
+	if (hypctx->hyp->vgic->vgic_ver == 3) {
+		vgic_v3_cpuinit(dev, hypctx);
+		return;
+	}
+
+	hypctx_write_sys_reg(hypctx, HOST_ICH_HFGITR_EL2,
+	    ICH_HFGITR_EL2_GICCDPEND |
+	    ICH_HFGITR_EL2_GICCDEN |
+	    ICH_HFGITR_EL2_GICCDAFF |
+	    ICH_HFGITR_EL2_GICCDPRI |
*** 1412 LINES SKIPPED ***

From nobody Mon Nov 23 17:01:59 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYC0R3wZnz714p7
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 17:01: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYC0R2sVfz53rw
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 17:01:59 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795453319;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=VEBDkGgJH6OZBPqhZuy7DSJZv6IsDrVCohep4GKCHnE=;
	b=HajfOemwJB12QihxfKChDfp/r61fr9YGRu6zzTQoatGYxF3KjyAKtL0zfXVdsKW3hsVFQx
	aRSNPs+2m4PqypZ94Fxd07JVyDa4YXT66FjSgVtjBmYUEO5HhGtPNaAp/hAek1CzM43XHm
	Q5ZH1VJw8yQ8em/1ZoEgG7K1YNT4O1NSrESlHag8xZ/Oyu1OXpA/5IDJLwHaLvLCVOKs1Z
	aWVb6N0sLQK2sJWN0Oa1U88qrtxiBzpQf0NXb5mw1POXOA5ZqauSWVijzqHWAOo6zzoaoO
	55X0KjpsfzapjbdEgPK+phPVlC7p27c9y+FjOmH9EdLUicgC44wkQM/Tb5o/Uw==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795453319;
	b=HDXN7mWJ2zNFUPj17w2eUGWtT/30o5LpXN/Fu/uRqy9FMeMJXi/eNAvU6NoZon3sakB4G0
	4sIIPainb8Z4yaAL94yLgSCcj28ENcAPEZfYvLdrbkMA+X+L/J1Rs1HrxeoVo4hjmqkaK2
	ZBhOO6n7KC8iO92neYBQgPIjOxJpXsE7KQFyj2TmYpkMwt9midPNOmyA55TMFnAf3z6KYr
	Sh0Xu5ZM7OUVtquqK6X651EUg4qSZS1v2e2kxEDGWJpXXjDijOAeJINFcsAt93XE/YYhNp
	zZhcZNJhZoEPMaqpS+DHPZ9LOAr0foa2yvSugaT1P5MotxBxRkDAexDVp6mVcw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795453319;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=VEBDkGgJH6OZBPqhZuy7DSJZv6IsDrVCohep4GKCHnE=;
	b=E6tLoVfESw44f848wpD8f6CeUbZw0OflXLsqZZtnA0djpG60cX+a8dR4373xGBjgGQ6E1I
	4G4BrvzCdCjSRSdsAv1Dti8+mrfIfkeu0tvVEt9z80jyfE/f9WlESyQAY3DGX3Q9wG7aC3
	mJiXV+c0nsFNvh25sz4GR7KhycCJP6yM0ST686dhLZCEe4MD9EGSkkYE5HxCTcI3vHCHn8
	cY7KtT2P5YNwd0FwjOwh2OYT3vj+LuhAW1khIAF3pWWBfGtgkJk4oZWHpisardb9qd4E/X
	ufZ1RaDb4KI6fgqJZOBDeQ5JQtHuUJSnzcyry2HUa3BD8hn4z+bNNe7NcigPPg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYC0R2XW3z10Ws
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 17:01:59 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1f49d
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 17:01:59 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Andrew Turner <andrew@FreeBSD.org>
Subject: git: 36a21d6da4b0 - main - arm64: gicv5: Support attaching the vgicv5 driver
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: andrew
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 36a21d6da4b010a4fde2101d4041a8cc0de1d52a
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 17:01:59 +0000
Message-Id: <6b047187.1f49d.2ca39d38@gitrepo.freebsd.org>

The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=36a21d6da4b010a4fde2101d4041a8cc0de1d52a

commit 36a21d6da4b010a4fde2101d4041a8cc0de1d52a
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2026-05-13 10:18:14 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2026-11-23 16:47:19 +0000

    arm64: gicv5: Support attaching the vgicv5 driver
    
    Reviewed by:    andrew
    Sponsored by:   Arm Ltd
    Differential Revision:  https://reviews.freebsd.org/D60116
---
 sys/arm64/arm64/gicv5.c      | 22 ++++++++++++++++++++--
 sys/arm64/arm64/gicv5_acpi.c | 18 ++++++++++++++++++
 sys/arm64/arm64/gicv5_fdt.c  | 18 ++++++++++++++++++
 sys/arm64/arm64/gicv5var.h   |  2 ++
 4 files changed, 58 insertions(+), 2 deletions(-)

diff --git a/sys/arm64/arm64/gicv5.c b/sys/arm64/arm64/gicv5.c
index cfca19e6ebf9..547074e7e8f1 100644
--- a/sys/arm64/arm64/gicv5.c
+++ b/sys/arm64/arm64/gicv5.c
@@ -1030,6 +1030,22 @@ gicv5_attach(device_t dev)
 	isb();
 }
 
+bool
+gicv5_has_virt_support(device_t dev)
+{
+	struct gicv5_softc *sc;
+	uint32_t idr0;
+
+	sc = device_get_softc(dev);
+	/*
+	 * VIRT field is guaranteed to be identical between all IRS units.
+	 * Arm GIC Architecture Specification (AES 0070) rule RJJPQJ.
+	 */
+	idr0 = IRS_CFG_READ_4(sc->gic_irs[0], IRS_IDR0);
+
+	return (idr0 & IRS_IDR0_VIRT);
+}
+
 bool
 gicv5_add_child(device_t dev, struct gicv5_devinfo *di)
 {
@@ -1106,8 +1122,10 @@ gicv5_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
 		*result = sc->gic_bus;
 		return (0);
 	case GIC_IVAR_VGIC:
-		/* TODO when we have vgic support */
-		*result = 0;
+		di = device_get_ivars(child);
+		if (di == NULL)
+			return (EINVAL);
+		*result = di->di_is_vgic;
 		return (0);
 	case GIC_IVAR_SUPPORT_LPIS:
 		di = device_get_ivars(child);
diff --git a/sys/arm64/arm64/gicv5_acpi.c b/sys/arm64/arm64/gicv5_acpi.c
index aebea1dcd466..5b96f514ab51 100644
--- a/sys/arm64/arm64/gicv5_acpi.c
+++ b/sys/arm64/arm64/gicv5_acpi.c
@@ -428,6 +428,7 @@ gic_v5_add_children(ACPI_SUBTABLE_HEADER *entry, void *arg)
 		    ITS_REGISTER_SIZE);
 
 		di->di_base.di_irs = sc->gic_irs[0];
+		di->di_base.di_is_vgic = false;
 
 		gicv5_add_child(dev, &di->di_base);
 
@@ -457,6 +458,23 @@ gic_v5_acpi_bus_attach(device_t dev)
 
 	acpi_unmap_table(madt);
 
+	if (gicv5_has_virt_support(dev)) {
+		device_t cdev;
+
+		cdev = device_add_child(dev, "vgic", DEVICE_UNIT_ANY);
+		if (cdev == NULL) {
+			device_printf(dev, "Could not add vgic child\n");
+		} else {
+			struct gic_v5_acpi_devinfo *di;
+
+			di = malloc(sizeof(*di), M_DEVBUF, M_WAITOK | M_ZERO);
+			resource_list_init(&di->di_base.di_rl);
+			di->di_base.di_irs = NULL;
+			di->di_base.di_is_vgic = true;
+			device_set_ivars(cdev, di);
+		}
+	}
+
 	bus_attach_children(dev);
 }
 
diff --git a/sys/arm64/arm64/gicv5_fdt.c b/sys/arm64/arm64/gicv5_fdt.c
index 265cbd833078..be880193c322 100644
--- a/sys/arm64/arm64/gicv5_fdt.c
+++ b/sys/arm64/arm64/gicv5_fdt.c
@@ -97,6 +97,7 @@ gicv5_fdt_add_child(device_t dev, phandle_t node, struct gicv5_irs *irs,
 
 	di = malloc(sizeof(*di), M_DEVBUF, M_WAITOK | M_ZERO);
 	di->di_base.di_irs = irs;
+	di->di_base.di_is_vgic = false;
 	if (ofw_bus_gen_setup_devinfo(&di->di_dinfo, node)) {
 		if (bootverbose) {
 			device_printf(dev,
@@ -174,6 +175,23 @@ gicv5_fdt_add_children(device_t dev)
 
 		gicv5_fdt_add_child(dev, child, NULL, addr_cells, size_cells);
 	}
+
+	if (gicv5_has_virt_support(dev)) {
+		device_t cdev;
+
+		cdev = device_add_child(dev, "vgic", DEVICE_UNIT_ANY);
+		if (cdev == NULL) {
+			device_printf(dev, "Could not add vgic child\n");
+		} else {
+			struct gicv5_fdt_devinfo *di;
+
+			di = malloc(sizeof(*di), M_DEVBUF, M_WAITOK | M_ZERO);
+			resource_list_init(&di->di_base.di_rl);
+			di->di_base.di_irs = NULL;
+			di->di_base.di_is_vgic = true;
+			device_set_ivars(cdev, di);
+		}
+	}
 }
 
 static int
diff --git a/sys/arm64/arm64/gicv5var.h b/sys/arm64/arm64/gicv5var.h
index a03bfbb59601..57de65df2970 100644
--- a/sys/arm64/arm64/gicv5var.h
+++ b/sys/arm64/arm64/gicv5var.h
@@ -58,6 +58,7 @@ struct gicv5_softc {
 struct gicv5_devinfo {
 	struct resource_list	di_rl;
 	struct gicv5_irs	*di_irs;
+	bool			di_is_vgic;
 };
 
 #define GICV5_PPIS_PER_REG	64
@@ -69,6 +70,7 @@ __BUS_ACCESSOR(gicv5, lpi_start, GICV5, LPI_START, u_int);
 
 void gicv5_attach(device_t);
 bool gicv5_add_child(device_t, struct gicv5_devinfo *);
+bool gicv5_has_virt_support(device_t);
 int gicv5_intr(void *);
 
 void gicv5_irs_init(device_t, u_int, cpuset_t *);

From nobody Mon Nov 23 17:17:53 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYCLn71n7z716Pm
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 17:17: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYCLn6WwWz56yx
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 17:17:53 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795454273;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=BoKDWBGBZqdcXpv+9beazQGo+KqE1e4f2qPQu176f/0=;
	b=UwmWVISiLRQwEpAd3G7SS2PWS0PSN6On/anKM38Q/WRbBz/hHnygXi/ydb1x7dLGZCobhh
	TaHRwuLw7+BHw1KI5hU6XnE03T7LHHP1ovraANYRffE9SYKH6zT0lu8SHnyFrz5M59aAJY
	jNfRoFLsw7wK2Bg7mRyiFTHEL62YnLLh6POzL/rWhKmNeAwCBG4qbQbzQiN02NpstYCxEZ
	yOFwntNqByAzs7JhfrJD+zjTydXq6ynHIwWoLB0Yc4ikHrO73XZalpx7McytsMFJXDflzc
	m4ApEk1qclHons3eb/1pJIPVLiSYz7G8PitEss5hk9LvBDcetQ/ZKkn69ua5Lw==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795454273;
	b=GSu7mi3H0ffie7KHTQ9J19A4ef0iazWcTZtxaKUL35Kg6scK/AzUftAq8xeivghXX5M+C6
	oEdwAqiE9jZbcFJUxmg7cyVLbbZ4zyy6J1Iaw6zzAe+EOYSCwXDKyBAVCuyMaIU0UrA3gW
	RCDUpaDQmFYM746+kq2lGH0oUETmEUDKXmuu8+BBBQu+PcVGs5iZwrb8b3W8KBA1B2+a0C
	HL9qHLuBe5zL+WKE3js3hmyferL9V+fGqmz1ghfZlRYWojMzEyM2P9j3RxQi6RJlniHbTd
	CNUoBYCx2y0LFlPvuxEh0+rpoU+AahzIPaI/MPFxDictuuYMXWSLr3K9veOCIQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795454273;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=BoKDWBGBZqdcXpv+9beazQGo+KqE1e4f2qPQu176f/0=;
	b=PnIdABKzoZQyw8vuFy0Wf5fKL1whZtLC0n+fxeWeMDEoCJx9uGPsrZMYackX0EaPwy5uaq
	qud6uK53s12obDOgkh6dr2zFtvU61VSjBfw57+c3DoS12a9Y0rr3eQfXNeikGwHI0RQgdE
	HIpu8RalGdWMotD5mrklqFKfo6IzEzqTQgJLxZAmYnllIzRFVdCk16Jk2SOf/wj2T3XyF/
	eSGp5XNkzaZ319fguQEG8xU+5tJu6eLFYJC4hXpBBWL4/MHwvZy2Gr/5Tls530DzN2fpoX
	nF6B/gPF7w4j6APWA77qggp3pT0Mwl7ApIKCKF1+b8qNQZw278QYwPQPoiXJ0g==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYCLn5xJmz10pc
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 17:17:53 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1f533
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 17:17:53 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Roman Bogorodskiy <novel@FreeBSD.org>
Subject: git: 0f821cea8070 - stable/15 - bhyve.8: mention config files for VM parameters
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: novel
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 0f821cea807064c1685771fc9806c3c6b2641cef
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 17:17:53 +0000
Message-Id: <6b047541.1f533.1ec5b1de@gitrepo.freebsd.org>

The branch stable/15 has been updated by novel:

URL: https://cgit.FreeBSD.org/src/commit/?id=0f821cea807064c1685771fc9806c3c6b2641cef

commit 0f821cea807064c1685771fc9806c3c6b2641cef
Author:     Roman Bogorodskiy <novel@FreeBSD.org>
AuthorDate: 2026-11-18 17:42:48 +0000
Commit:     Roman Bogorodskiy <novel@FreeBSD.org>
CommitDate: 2026-11-23 17:13:19 +0000

    bhyve.8: mention config files for VM parameters
    
    Mention that virtual CPUs, memory and other options can be configured
    with a configuration file, and refer to the -k option.
    
    Reviewed by:    ziaee
    MFC after:      3 days
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D61718
    
    (cherry picked from commit ed4bad79ec89248d3e3b0475cd44c25541198306)
---
 usr.sbin/bhyve/bhyve.8 | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8
index e5a9cf2a5d37..f0f5ab6b6831 100644
--- a/usr.sbin/bhyve/bhyve.8
+++ b/usr.sbin/bhyve/bhyve.8
@@ -25,7 +25,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd October 3, 2026
+.Dd November 19, 2026
 .Dt BHYVE 8
 .Os
 .Sh NAME
@@ -99,7 +99,9 @@ virtual machine.
 It can run guests on amd64 and arm64 platforms with suitable hardware support.
 .Pp
 Parameters such as the number of virtual CPUs, amount of guest memory, and
-I/O connectivity can be specified with command-line parameters.
+I/O connectivity can be specified with command-line parameters or
+with a configuration file
+.Pq see Fl k .
 .Pp
 .Nm
 is typically used with a boot ROM that can load the guest operating system.

From nobody Mon Nov 23 17:17:54 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYCLq0ZpZz716WZ
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 17:17:55 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYCLp65w8z56t3
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 17:17:54 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795454274;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=bHrr9Rxg50LNPu6pQExDHQnlk9BjOortA8F2SOkAMfc=;
	b=TjMLpKxBW+r1HGxNcRt+Abwr4fE5bOnuVVu8nliaCzfCmlGykerriSPwkbFeYuVrbWps64
	vYvC2ohicC7fWOgJFCWyBUXDRGflnB7xH8ZQ4Y+sM4nWtWC3EzV1xXx/Rag70a3/YHakxp
	4YNgxnYXKgNjEUklkgFZJvdd6NTmu1sUVAgo7U5sXP5ZnKP+Zrfs6s6nZKi8Z3JTzqpT+6
	/cRCB3U5xen7XvOB3kjA18+6Np5pMsQSiCMQn+2BLohaYQIqf+8ZfgTwFRgDPJ6peGQgkp
	HkFaoCuInrfdg0OS2Uw5WImDuLiz0VwfV9M5FUuV6mZ/ddmaIfO1O0O+J/3/IQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795454274;
	b=nL4RRZCKmlOkC5VmNLiwQ7/kKNtu1s8tLdH6q+FR0y1jeB8gqzRfTdCwKF4mp7cKr8pfb9
	7FEd5O+GEs81Mh3EYn8ZCM7BnDSwYngwXlAJVYSuSPDl5fHUe1OJcAZ0sCnYeSArN1nNzL
	6EjNNwM1LK7qonUeRwyoJmlmsZiXr0+adp9CHj+2SkYY1uESUZlEdh5siwRxACNreHlhYo
	1+yxDUa/+s9Yqf9b3iMHK0iHPp6CXtGIdqYiJ88ptaShYBNaN6Wu1LU8YUAcvXAIDOqDx9
	R9ZpUrSpaWw1Xk8udziSn8CKC8ayr8WaR+NMn74Ld4WzP1TmNSXgQUkfe8IK1g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795454274;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=bHrr9Rxg50LNPu6pQExDHQnlk9BjOortA8F2SOkAMfc=;
	b=tzmXyKp/jQVQ67TdNz6YgJbcrL0uHAHDX7u838cWr5LOEAslEbxhAG6Q3Uj1klcJ5bfReI
	XPMrLnnLiIyDfDSUUXUB0ta8jo/6Qfk774xgzZjdPtIDJAi83717h9oYD1IoTGe8q1yrbk
	IQ70V4HQ0n7xHxi1ytLWiVI89wngx6gfbYY92kSsg8iFvIpNuiEDMz6uAHBHQbF8ARN3zd
	+nkFC/e+Azpw1Tv6fs4GmQP2wHrBldYQP1G7DhCxU5qKLLbvtYWyzFdwsxlNz3x64RknxU
	1DgMBHx05ziTmGfMxorh9QwhDVv729LYi7eNvibHJW3EIj31oRAbmmdz1rkccg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYCLp5mWxz10XP
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 17:17:54 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1f69d
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 17:17:54 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Roman Bogorodskiy <novel@FreeBSD.org>
Subject: git: 19e3de6e1c80 - stable/15 - bhyve.8: mention VM nodes in /dev/vmm
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: novel
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 19e3de6e1c808680af7ef8db2876d2e3f4cd2d5e
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 17:17:54 +0000
Message-Id: <6b047542.1f69d.c28cac5@gitrepo.freebsd.org>

The branch stable/15 has been updated by novel:

URL: https://cgit.FreeBSD.org/src/commit/?id=19e3de6e1c808680af7ef8db2876d2e3f4cd2d5e

commit 19e3de6e1c808680af7ef8db2876d2e3f4cd2d5e
Author:     Roman Bogorodskiy <novel@FreeBSD.org>
AuthorDate: 2026-11-16 14:22:09 +0000
Commit:     Roman Bogorodskiy <novel@FreeBSD.org>
CommitDate: 2026-11-23 17:13:59 +0000

    bhyve.8: mention VM nodes in /dev/vmm
    
    Currently, VM nodes in /dev/vmm are only described in the
    EXAMPLES section of bhyvectl.8. Add a FILES section to bhyve.8
    to make this information easier to find.
    
    Update the bhyvectl.8 example to say "Existing VMs"
    instead of "Running VMs" as the VMs listed in /dev/vmm
    are not necessarily running.
    
    Update bhyvectl.8 to refer to vmm(4).
    
    Reviewed by:    ziaee
    MFC after:      3 days
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D61623
    
    (cherry picked from commit 8651589fd72d8b1de9f1b5512d6542c610fca1b3)
---
 usr.sbin/bhyve/bhyve.8       | 5 +++++
 usr.sbin/bhyvectl/bhyvectl.8 | 5 +++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8
index f0f5ab6b6831..b73d0dae32ab 100644
--- a/usr.sbin/bhyve/bhyve.8
+++ b/usr.sbin/bhyve/bhyve.8
@@ -1166,6 +1166,11 @@ deals with the following signals:
 .It SIGTERM
 Trigger ACPI poweroff for a VM
 .El
+.Sh FILES
+.Bl -tag -width "/dev/vmm/*"
+.It Pa /dev/vmm/*
+Device interface for individual virtual machines.
+.El
 .Sh EXIT STATUS
 Exit status indicates how the VM was terminated:
 .Pp
diff --git a/usr.sbin/bhyvectl/bhyvectl.8 b/usr.sbin/bhyvectl/bhyvectl.8
index 550c4f10d8e6..8dcd3f4e27fd 100644
--- a/usr.sbin/bhyvectl/bhyvectl.8
+++ b/usr.sbin/bhyvectl/bhyvectl.8
@@ -25,7 +25,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd May 8, 2025
+.Dd November 19, 2026
 .Dt BHYVECTL 8
 .Os
 .Sh NAME
@@ -96,13 +96,14 @@ Destroy the VM called fbsd10:
 .Pp
 .Dl bhyvectl --vm=fbsd10 --destroy
 .Pp
-Running VMs will be visible in
+Existing VMs will be visible in
 .Pa /dev/vmm/ .
 .Sh COMPATIBILITY
 The snapshot file format is not yet stable and is subject to future changes.
 Backwards compatibility support for the current snapshot file format is not
 guaranteed when future changes are made.
 .Sh SEE ALSO
+.Xr vmm 4 ,
 .Xr bhyve 8 ,
 .Xr bhyveload 8
 .Sh HISTORY

From nobody Mon Nov 23 17:30:05 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYCcs1Rkpz717TZ
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 17:30: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYCcs0x8Mz3FpC
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 17:30:05 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795455005;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=hey7Xds247oX2SWYkkHoFNpWOLu7Ft6EBWupx2cFS0E=;
	b=nr7MzEPpL8HjZNYU+EA7TXJ8JVOzRag3u2SdJpoFZVvcGOnBxnvkCcZjCngeLSQA8Talt6
	3b089PrL0VkS5kNbipyBGJ1n6cXtSgxTfIlNxR75P7gh7Ax3N30BomNoq55hVyv7TGsV+t
	YytnOqKDuEiqWW3g8WLScndYY5oD/BjQtCX1M/Kgv5QOYMlW7vG0EDTXeEZzv5JZ4oMfxL
	J42r6TuSO6O3RSNWAjwI+/X4NRGaIRTUrAZVa4P+Ao31UfSJGuGYseS8rdZSVg4h8cSvxI
	qxo08/6Rgb3LqjHU2VLSoKeEoLwFT/GQwH6jGcU9Jvs3RpXQHiZ4wSHyPhWc5g==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795455005;
	b=Uc2i3zLry5juKP1FvP/EjnyNlduu4Gk+D4Xnae6/SRAGeafU3Ewd+ModkykvGni6IVU+/q
	ex+6fIpZtnDI7Do0rjNz5qNXWP//LXKlifJz6UwC6v6iFXWngnOzV/6CzY3yKzFTWvVIQT
	KjIyIGpEzZrvRtldrDqZsr/KnbrjNi2vWVXF/aNIoNXL5MMfl9yGHvoyXjiUPXKrJiOJVY
	HNMK28J9G3xkM3vx1HrVFOaPxd7wPPqhvdq03iCnKBOp8ZBZ7ylcMRvVrtcLF3DZbz4EeR
	Z3erEhtIaczR6kjVhzX4zFG7OUet/SzUksy23zlxuA00t2nrVkc3VwXV1Yue2w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795455005;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=hey7Xds247oX2SWYkkHoFNpWOLu7Ft6EBWupx2cFS0E=;
	b=JL7FLip+301aCAIJDsVedwnKPN1QmMJpmf/rahXx1oxs3RJIES8vBI8Bz3Dmi5GpdjS3eX
	mbsRO+ITKqbA1qlVoPNfR3Z0nqGqPs232FMD6OD8lILy9PsQ3pqbp8tAU+O5An3oiJWS2G
	1JmowX015a4/ElqvLU4/DsAr/IqCxNd8S8vnTID5dipkpycN8oEts50tiAJ6eDDjjKvip8
	TMFMkpqhxcBpSEPlcBnNa3tiH7z859F6auzyWRDuU4xnhYu1iULVL3/0xIsstcIF6Gm2Ae
	MGbbkCeBfny/klg3IMpOyKU62C/ItZGyLggjBQ2ipUdnCf+qOT5jm4z4qSoX5Q==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYCcs0JrJz11YG
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 17:30:05 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 8c5
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 17:30:05 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Roman Bogorodskiy <novel@FreeBSD.org>
Subject: git: 846dd52a6539 - stable/14 - bhyve.8: mention config files for VM parameters
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: novel
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 846dd52a65396c1344b9be31db795a395d7cc413
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 17:30:05 +0000
Message-Id: <6b04781d.8c5.746396d9@gitrepo.freebsd.org>

The branch stable/14 has been updated by novel:

URL: https://cgit.FreeBSD.org/src/commit/?id=846dd52a65396c1344b9be31db795a395d7cc413

commit 846dd52a65396c1344b9be31db795a395d7cc413
Author:     Roman Bogorodskiy <novel@FreeBSD.org>
AuthorDate: 2026-11-18 17:42:48 +0000
Commit:     Roman Bogorodskiy <novel@FreeBSD.org>
CommitDate: 2026-11-23 17:25:12 +0000

    bhyve.8: mention config files for VM parameters
    
    Mention that virtual CPUs, memory and other options can be configured
    with a configuration file, and refer to the -k option.
    
    Reviewed by:    ziaee
    MFC after:      3 days
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D61718
    
    (cherry picked from commit ed4bad79ec89248d3e3b0475cd44c25541198306)
---
 usr.sbin/bhyve/bhyve.8 | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8
index c8adfb6a8947..7f90a2c984bd 100644
--- a/usr.sbin/bhyve/bhyve.8
+++ b/usr.sbin/bhyve/bhyve.8
@@ -25,7 +25,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd May 15, 2026
+.Dd November 19, 2026
 .Dt BHYVE 8
 .Os
 .Sh NAME
@@ -98,7 +98,9 @@ is a hypervisor that runs guest operating systems inside a
 virtual machine.
 .Pp
 Parameters such as the number of virtual CPUs, amount of guest memory, and
-I/O connectivity can be specified with command-line parameters.
+I/O connectivity can be specified with command-line parameters or
+with a configuration file
+.Pq see Fl k .
 .Pp
 If not using a boot ROM, the guest operating system must be loaded with
 .Xr bhyveload 8

From nobody Mon Nov 23 17:30:06 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYCct1fP2z717Tf
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 17:30: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYCct0ym7z3G1X
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 17:30:06 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795455006;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=d9scB9Hf/QR/tLiJvVsusJjDs63medPDd7ODBhUOelE=;
	b=NnGn0AWd0pfwHTQQqRVJYyxCHii2mOGjDYOX9mfplrxRpvCLsv58YF2xZZz2y0CegBla+h
	DDvToUQT61DIQbquW4merL22PA+FNd/CmI08mi/pnCFXSzJOCXzMCKjFghqoLkGmgtO7kp
	tQ4uZEYyKDpSIa1ZV+oGLYzCxG4keFuf0eze5Dzq26GpgbiJUCyw29t9hP7M7UpPfYB3Zx
	dktoOUM7JitXwDEWjQoR2WQCBTqwR9jc96UZ7EzCaMhKr9T8CBFrZS774yBdWYes1LCvMM
	wQGYem570J5u8i+aIneOTqsNsTFgoY/XYTesIbudSew2QqUHjn1I+1OWnrlwVA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795455006;
	b=tV901fvUW9z/EXe/npJPzskh9scikRG8HsmXziofBf7LMFp8ltKoKd7ab0jUDHBmbtvT58
	hnM131oGxUYxyKedqsKav4v4SINTtGfZ4uY91qW/EezeXI4erbq9SnMjNvKQtKkItvQESX
	ikFw5SiJXE/8n28yv8///wxRu3B4X8jVtq+8w3RceJXcngmAY0/YilnL71uFHwEH9EMbMP
	eQthUvD8NHhWY7uvWc+qOXZ1AKMn70XLAQbH+btJKQ1XLKpmn/dMWEWlSi5yUry6v2PEH/
	diGgB4rOo95A7CvU/K5nCNNhaFTpgNsxtmCLk5ELc2UwVrV6wVnflQp0i9kz9g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795455006;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=d9scB9Hf/QR/tLiJvVsusJjDs63medPDd7ODBhUOelE=;
	b=LD4D6lok3EOKGlbbplzueI4LLiV1E/i0eNBy7xSsGuYsrUdOE6cywRD3GEWckGmi7INSe/
	/hylpo4uQJuOLaos7th+NEvhA+GY34FVwzsdIVbAoUveNM29Y+90p6aMfAP4acJSq2pYnJ
	+auhFRL4pEDEupgqEfcTjb0X0zrFmlBtfGOybx7cLFAaDKJGhFmpeaUUJuQrKLMRCuX59B
	nmrEHPBOl5IifpoE5WgkKT9yO3lkncm+g0bKAXMrFoLbSZQm0r2NxG7kFP7IQWw94PL0j+
	iZE6gYs1mJH9ZwlShfTNYZygTTIp7fHvYQ830MYjxOB+YONSpXe0ZRxh6WqtsA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYCct0dTQz11YH
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 17:30:06 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 18ab
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 17:30:06 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Roman Bogorodskiy <novel@FreeBSD.org>
Subject: git: 4457feb4f650 - stable/14 - bhyve.8: mention VM nodes in /dev/vmm
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: novel
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 4457feb4f650043505345d964cdde7aeb310d888
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 17:30:06 +0000
Message-Id: <6b04781e.18ab.430226f1@gitrepo.freebsd.org>

The branch stable/14 has been updated by novel:

URL: https://cgit.FreeBSD.org/src/commit/?id=4457feb4f650043505345d964cdde7aeb310d888

commit 4457feb4f650043505345d964cdde7aeb310d888
Author:     Roman Bogorodskiy <novel@FreeBSD.org>
AuthorDate: 2026-11-16 14:22:09 +0000
Commit:     Roman Bogorodskiy <novel@FreeBSD.org>
CommitDate: 2026-11-23 17:25:27 +0000

    bhyve.8: mention VM nodes in /dev/vmm
    
    Currently, VM nodes in /dev/vmm are only described in the
    EXAMPLES section of bhyvectl.8. Add a FILES section to bhyve.8
    to make this information easier to find.
    
    Update the bhyvectl.8 example to say "Existing VMs"
    instead of "Running VMs" as the VMs listed in /dev/vmm
    are not necessarily running.
    
    Update bhyvectl.8 to refer to vmm(4).
    
    Reviewed by:    ziaee
    MFC after:      3 days
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D61623
    
    (cherry picked from commit 8651589fd72d8b1de9f1b5512d6542c610fca1b3)
---
 usr.sbin/bhyve/bhyve.8       | 5 +++++
 usr.sbin/bhyvectl/bhyvectl.8 | 5 +++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8
index 7f90a2c984bd..e4bcf3efea3e 100644
--- a/usr.sbin/bhyve/bhyve.8
+++ b/usr.sbin/bhyve/bhyve.8
@@ -1016,6 +1016,11 @@ deals with the following signals:
 .It SIGTERM
 Trigger ACPI poweroff for a VM
 .El
+.Sh FILES
+.Bl -tag -width "/dev/vmm/*"
+.It Pa /dev/vmm/*
+Device interface for individual virtual machines.
+.El
 .Sh EXIT STATUS
 Exit status indicates how the VM was terminated:
 .Pp
diff --git a/usr.sbin/bhyvectl/bhyvectl.8 b/usr.sbin/bhyvectl/bhyvectl.8
index 550c4f10d8e6..8dcd3f4e27fd 100644
--- a/usr.sbin/bhyvectl/bhyvectl.8
+++ b/usr.sbin/bhyvectl/bhyvectl.8
@@ -25,7 +25,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd May 8, 2025
+.Dd November 19, 2026
 .Dt BHYVECTL 8
 .Os
 .Sh NAME
@@ -96,13 +96,14 @@ Destroy the VM called fbsd10:
 .Pp
 .Dl bhyvectl --vm=fbsd10 --destroy
 .Pp
-Running VMs will be visible in
+Existing VMs will be visible in
 .Pa /dev/vmm/ .
 .Sh COMPATIBILITY
 The snapshot file format is not yet stable and is subject to future changes.
 Backwards compatibility support for the current snapshot file format is not
 guaranteed when future changes are made.
 .Sh SEE ALSO
+.Xr vmm 4 ,
 .Xr bhyve 8 ,
 .Xr bhyveload 8
 .Sh HISTORY

From nobody Mon Nov 23 18:11:49 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYDY12TNbz71CbZ
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 18:11:49 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYDY11WcSz3Q4Q
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 18:11:49 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795457509;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=DSHfTaRW+qOM0+0Nr2/LtadTLe3pqOiVxDRyhslwWEA=;
	b=bQ3I+ar4ETfY2E8W2GY1f8mSVMjUsCAe+vCA7tdYw4Sg7qU/vpyKLSd/kbnjMNs+iW57ge
	2f1sbcWT31H07hiXoCbxOhAOUAW+RHffd0djIOPGkatC189ODFEcwJFnsyL+aNiSkcchny
	SFrVReGWXZCm28c+vnd/Tcvoa5e5AqMu05rzkGtVIhMgFGKTp2HzZKfUhUCczZ3w05Xzej
	uQ8ukF+oobJn74lNY39QzZsEemgdmYHdIc3+jBZ99S+Mp9wuQkZV7f0xuYS5Dl/YnNgLeo
	nt9H2yAqpA1tWJF21CP2JPLRHaaI12T+5zA4//fiUiqofOG8E2xnrJz77K0Mcg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795457509;
	b=Ql4y+4EyXysm3dwwr2cByfHoMzf9UlYo9QFnWL6SqNivJr/F/lS4ZuAhADUzkQqGfrgof5
	iUnEkDU2BFvd8gGRF1HQsPSTs6vQLyndXlRBGhmhUdBlWt+ys98J9YQTOySBsBUBgCSauW
	QIcFd2TlxTN8wEgjugbCBgYwFs8AivxB2mD7m3IaTGhMIxgpKQOrUFRO4RqaHMgNa/VO83
	JaKgjdoRGI34NPgE1SVgTXo9kE/19jwSNgd8X1FD8/jjHnftgt8wtuQqiv3VAsR9bQeRMM
	60m5qtWgIojmAcoEWWKyVkTFgAiv3+B8KxgPSjnoIk7RRKsMOzs0NC1C9sSc6A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795457509;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=DSHfTaRW+qOM0+0Nr2/LtadTLe3pqOiVxDRyhslwWEA=;
	b=EvfHwXEsTYgp/k/4pYfkHStiWXh/5YJcJmyLoeJMxpd9la0mTYzhn5qqk8ZvAI7mQ+H1NB
	tSCrj1/hLpZ3z5wOj03xsXuECH9IE6xXwlxg3VDeaH54uOhxQCZIc6YqA3RtCyUc0BJa4t
	LVw+1g4W6o8msVefddZ15kNmqVAGHn9pQJ2SY9DQJi7AIn9NXIbHX8YOTxaT1QzLvLIgYi
	xoGJWsPaOzCB/hqGxWM81cJ78q8b0P8Ws5FyYJYCZkUHIAWPtN0z29jWvjp/FrI1GpXq5T
	BBQEl06zki4CpsrVV4NYZHWRXb+s+ru981yCFTvh9GIRem86XvGFJXQouJCxWA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYDY11BBjz12kF
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 18:11:49 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 57d6
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 18:11:49 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Kristof Provost <kp@FreeBSD.org>
Subject: git: 5395ce57223d - main - pf: remove DIOCCHANGEADDR
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: 5395ce57223d181dd257b524887f8a8bd9134e0b
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 18:11:49 +0000
Message-Id: <6b0481e5.57d6.2e4eaa52@gitrepo.freebsd.org>

The branch main has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=5395ce57223d181dd257b524887f8a8bd9134e0b

commit 5395ce57223d181dd257b524887f8a8bd9134e0b
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2026-11-20 08:53:38 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2026-11-23 17:17:11 +0000

    pf: remove DIOCCHANGEADDR
    
    It's not actually used by anything, and has a few validation bugs. Take
    the easiest and most robust fix for those by deleting the code.
    
    Reported by:    Kevin Day <kevin@your.org>
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 share/man/man4/pf.4       |  10 +---
 sys/net/pfvar.h           |   1 -
 sys/netpfil/pf/pf_ioctl.c | 135 ----------------------------------------------
 3 files changed, 1 insertion(+), 145 deletions(-)

diff --git a/share/man/man4/pf.4 b/share/man/man4/pf.4
index 03a4ba2bbe7f..0bc13e41cb84 100644
--- a/share/man/man4/pf.4
+++ b/share/man/man4/pf.4
@@ -26,7 +26,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd July 2, 2025
+.Dd November 20, 2026
 .Dt PF 4
 .Os
 .Sh NAME
@@ -567,14 +567,6 @@ or
 .Dv PF_CHANGE_REMOVE
 actions are applied.
 .\" It Dv DIOCCHANGEALTQ Fa "struct pfioc_altq *pcr"
-.It Dv DIOCCHANGEADDR Fa "struct pfioc_pooladdr *pca"
-Add or remove the pool address
-.Va addr
-from the rule specified by
-.Va r_action ,
-.Va r_num ,
-and
-.Va anchor .
 .It Dv DIOCSETTIMEOUT Fa "struct pfioc_tm *pt"
 .Bd -literal
 struct pfioc_tm {
diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h
index 9b524083ab65..1e5fceb812bc 100644
--- a/sys/net/pfvar.h
+++ b/sys/net/pfvar.h
@@ -2284,7 +2284,6 @@ struct pfioc_iface {
 #define DIOCADDADDR	_IOWR('D', 52, struct pfioc_pooladdr)
 #define DIOCGETADDRS	_IOWR('D', 53, struct pfioc_pooladdr)
 #define DIOCGETADDR	_IOWR('D', 54, struct pfioc_pooladdr)
-#define DIOCCHANGEADDR	_IOWR('D', 55, struct pfioc_pooladdr)
 #define	DIOCGETRULESETS	_IOWR('D', 58, struct pfioc_ruleset)
 #define	DIOCGETRULESET	_IOWR('D', 59, struct pfioc_ruleset)
 #define	DIOCRCLRTABLES	_IOWR('D', 60, struct pfioc_table)
diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c
index 36308c466843..764e48890e57 100644
--- a/sys/netpfil/pf/pf_ioctl.c
+++ b/sys/netpfil/pf/pf_ioctl.c
@@ -5667,141 +5667,6 @@ DIOCGETSTATESV2_full:
 		break;
 	}
 
-	case DIOCCHANGEADDR: {
-		struct pfioc_pooladdr	*pca = (struct pfioc_pooladdr *)addr;
-		struct pf_kpool		*pool;
-		struct pf_kpooladdr	*oldpa = NULL, *newpa = NULL;
-		struct pf_kruleset	*ruleset;
-		struct pfi_kkif		*kif = NULL;
-
-		pca->anchor[sizeof(pca->anchor) - 1] = '\0';
-
-		if (pca->action < PF_CHANGE_ADD_HEAD ||
-		    pca->action > PF_CHANGE_REMOVE) {
-			error = EINVAL;
-			goto fail;
-		}
-		if (pca->addr.addr.type != PF_ADDR_ADDRMASK &&
-		    pca->addr.addr.type != PF_ADDR_DYNIFTL &&
-		    pca->addr.addr.type != PF_ADDR_TABLE) {
-			error = EINVAL;
-			goto fail;
-		}
-		if (pca->addr.addr.p.dyn != NULL) {
-			error = EINVAL;
-			goto fail;
-		}
-
-		if (pca->action != PF_CHANGE_REMOVE) {
-#ifndef INET
-			if (pca->af == AF_INET) {
-				error = EAFNOSUPPORT;
-				goto fail;
-			}
-#endif /* INET */
-#ifndef INET6
-			if (pca->af == AF_INET6) {
-				error = EAFNOSUPPORT;
-				goto fail;
-			}
-#endif /* INET6 */
-			newpa = malloc(sizeof(*newpa), M_PFRULE, M_WAITOK);
-			bcopy(&pca->addr, newpa, sizeof(struct pf_pooladdr));
-			if (newpa->ifname[0])
-				kif = pf_kkif_create(M_WAITOK);
-			newpa->kif = NULL;
-		}
-#define	ERROUT(x)	ERROUT_IOCTL(DIOCCHANGEADDR_error, x)
-		PF_RULES_WLOCK();
-		ruleset = pf_find_kruleset(pca->anchor);
-		if (ruleset == NULL)
-			ERROUT(EBUSY);
-
-		pool = pf_get_kpool(pca->anchor, pca->ticket, pca->r_action,
-		    pca->r_num, pca->r_last, 1, 1, PF_RDR);
-		if (pool == NULL)
-			ERROUT(EBUSY);
-
-		if (pca->action != PF_CHANGE_REMOVE) {
-			if (newpa->ifname[0]) {
-				newpa->kif = pfi_kkif_attach(kif, newpa->ifname);
-				pfi_kkif_ref(newpa->kif);
-				kif = NULL;
-			}
-
-			switch (newpa->addr.type) {
-			case PF_ADDR_DYNIFTL:
-				error = pfi_dynaddr_setup(&newpa->addr,
-				    pca->af);
-				break;
-			case PF_ADDR_TABLE:
-				newpa->addr.p.tbl = pfr_attach_table(ruleset,
-				    newpa->addr.v.tblname);
-				if (newpa->addr.p.tbl == NULL)
-					error = ENOMEM;
-				break;
-			}
-			if (error)
-				goto DIOCCHANGEADDR_error;
-		}
-
-		switch (pca->action) {
-		case PF_CHANGE_ADD_HEAD:
-			oldpa = TAILQ_FIRST(&pool->list);
-			break;
-		case PF_CHANGE_ADD_TAIL:
-			oldpa = TAILQ_LAST(&pool->list, pf_kpalist);
-			break;
-		default:
-			oldpa = TAILQ_FIRST(&pool->list);
-			for (int i = 0; oldpa && i < pca->nr; i++)
-				oldpa = TAILQ_NEXT(oldpa, entries);
-
-			if (oldpa == NULL)
-				ERROUT(EINVAL);
-		}
-
-		if (pca->action == PF_CHANGE_REMOVE) {
-			TAILQ_REMOVE(&pool->list, oldpa, entries);
-			switch (oldpa->addr.type) {
-			case PF_ADDR_DYNIFTL:
-				pfi_dynaddr_remove(oldpa->addr.p.dyn);
-				break;
-			case PF_ADDR_TABLE:
-				pfr_detach_table(oldpa->addr.p.tbl);
-				break;
-			}
-			if (oldpa->kif)
-				pfi_kkif_unref(oldpa->kif);
-			free(oldpa, M_PFRULE);
-		} else {
-			if (oldpa == NULL)
-				TAILQ_INSERT_TAIL(&pool->list, newpa, entries);
-			else if (pca->action == PF_CHANGE_ADD_HEAD ||
-			    pca->action == PF_CHANGE_ADD_BEFORE)
-				TAILQ_INSERT_BEFORE(oldpa, newpa, entries);
-			else
-				TAILQ_INSERT_AFTER(&pool->list, oldpa,
-				    newpa, entries);
-		}
-
-		pool->cur = TAILQ_FIRST(&pool->list);
-		pf_addrcpy(&pool->counter, &pool->cur->addr.v.a.addr, pca->af);
-		PF_RULES_WUNLOCK();
-		break;
-
-#undef ERROUT
-DIOCCHANGEADDR_error:
-		if (newpa != NULL) {
-			if (newpa->kif)
-				pfi_kkif_unref(newpa->kif);
-			free(newpa, M_PFRULE);
-		}
-		PF_RULES_WUNLOCK();
-		pf_kkif_free(kif);
-		break;
-	}
-
 	case DIOCGETRULESETS: {
 		struct pfioc_ruleset	*pr = (struct pfioc_ruleset *)addr;
 

From nobody Mon Nov 23 18:11:50 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYDY23G48z71CtP
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 18:11: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYDY21mqsz3Q94
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 18:11:50 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795457510;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=vRp5NJ9Fut9WNdK47wfeBhYonum8AG4pNNehEeqIIdY=;
	b=UdtGODIz9mwwgussdMHrRHRYW6nJVBIOsu3PznEO245jmgFtUjVS3u+uiM3O+lXhvX/IU1
	AGEamJ5IosCzVC+RHnpcKciASyC+liRNKOOnPIiRq69qDj9b8ZFY2r5EkmBzxbay8plKpf
	uG+uetXTuI/v7yMxv3Q2S0tAKoGzkKTzSmEPxadeGEUvnzkPGEf0Y/KFGQuGy+OF9hpZbb
	TuxY/ezBxz58FqS6JxZl09PDG+3g7EEg1yyRZXMbiU77lbKgOMPAe3qG2gnptp2IMJK2DY
	EBwwVQXsBaO2vtDW1CiPsj6RpBttXKJdFC0KxpaL0FBBDTpAILE4lAcNHuWrhQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795457510;
	b=HJm5Ne2+u1QqgWPSduFfwKObQBdanzR7YY0inw4CO69ZyiOwBBbW+WRyNO+mkGPJPZCWOH
	uhH5q2om8try/BuLXHco5EqqWkT6u79G/dNgzLKKwkwJQglO3v6LX3M36MixPxd1CwwYU0
	3eVRyE+iJWn96SRFtuvluAo9sZ8vRYL9IJSZsdQOy98R+NA0ZhLXZmyUq7NRIRw5pv+Ovn
	aAOspFG+2BZYwmo7c3MUTy/0eKVYKot8t1/PFGJWh9Mnr9/G2p9HgU/0xA60U9+x2R9+MH
	6kf95znWFmXhtYtH/u+a2WIMyIzd5ihHJokwWvP93NQbr3GfDuKtrCEzaWev9A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795457510;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=vRp5NJ9Fut9WNdK47wfeBhYonum8AG4pNNehEeqIIdY=;
	b=JtlTjsnVRBIz2wMUe4Rdhj6oXW2fbiqoNdJcal/5JqwqMzDY0d26R1834OprJiuzqeBS1N
	XWV9PBkWDsC7faX2wKvHf8Q3jZlhRXYa00Q7aT4veCGwunnrusJ7VJZCVj8y/hdkOg+6jo
	kqFPSNtwkiJafGf+6RuSXFdu+0WB8dxTj9doGTw39mUmTewqWoO++TT9XDlu1SXYkUoCck
	dFtu/ViAZY7kpG8MszuLOrKaMraAsKPeCRIdfLd2rc14xEvi6LAsrfH7fSYi92HH1x7qXN
	t58eawm6LSN01/BlJpxxwBLz39/DCpRbKWotkA12SYYsqA2/NhF7vdKRCj+16A==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYDY21RS5z11qD
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 18:11:50 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 6ba0
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 18:11:50 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Kristof Provost <kp@FreeBSD.org>
Subject: git: 162c1ae57c84 - main - pf: fix double free on error
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: 162c1ae57c84e118997f3577700b7adf19b6d3fd
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 18:11:50 +0000
Message-Id: <6b0481e6.6ba0.4733a392@gitrepo.freebsd.org>

The branch main has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=162c1ae57c84e118997f3577700b7adf19b6d3fd

commit 162c1ae57c84e118997f3577700b7adf19b6d3fd
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2026-11-20 09:00:48 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2026-11-23 17:17:11 +0000

    pf: fix double free on error
    
    If we fail to allocate dst->scrub in pf_normalize_sctp_init() we freed
    src->scrub, but did not reset its pointer to NULL. As a result the
    subsequent pf_kstate cleanup would try to free src->scrub a second time.
    
    Reported by:    llm-postcr
    Fixes:          e53632189f09 ("pf: fix sctp normalisation cleanup")
    MFC after:      1 week
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sys/netpfil/pf/pf_norm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c
index baad40d44c8a..2a2355ab2756 100644
--- a/sys/netpfil/pf/pf_norm.c
+++ b/sys/netpfil/pf/pf_norm.c
@@ -1612,6 +1612,7 @@ pf_normalize_sctp_init(struct pf_pdesc *pd, struct pf_state_peer *src,
 	dst->scrub = uma_zalloc(V_pf_state_scrub_z, M_ZERO | M_NOWAIT);
 	if (dst->scrub == NULL) {
 		uma_zfree(V_pf_state_scrub_z, src->scrub);
+		src->scrub = NULL;
 		return (1);
 	}
 

From nobody Mon Nov 23 18:11:51 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYDY35xQ1z71CxP
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 18:11:51 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYDY32b9hz3Q9H
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 18:11:51 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795457511;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Kq0PR+IFa1TepunhlfofWwgq9/tAc1k4ex4y48m4J8k=;
	b=skc6SQjmiva6Tbwoa4UcmO90FJ94B32NsmYNm02Il/aWZd3X9AJFgBra++CAZUQ7X8R1I4
	j3yRjcozwng6YvUfUdm3LYkXu9xeVXS9EFL5UYWkOWDeZ42LFCEEhatBsvog0vocqTLv1h
	4WUWKzmzjsk4EhKhY3C8FcUUI/n0q7v/gztMRijysDfHXlHdYXuRLnElGkA21Jk3rITxpD
	2HQAntlFj3n4xSJtF58ZfQRLd1+M8S4mF5Jq7tQ5YmF8Eo2ZGdkNfifjcfNIXGgq5FNQLd
	KWmUnrZ7HzeryNIe52ENhM4BtXKSEIMw7xXEgc2Ri7q8eBnOEyksgLe6UjOz1Q==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795457511;
	b=uN3lCSg/eATuIHB93VUzGFJ1BVvVH6Aij6CQA3mr3YiIoqyKd+d48Xh2O3TlxeUDy0ikXX
	FhfkYQI+AWrqQFMN+gNCNZ/81xWhldfNNs+GcizYOW6f9+ZaxeCy/NjzzB9q2JsJQVstkM
	utrdGOsKD8+6/PdWCbh4r1jIXper573ynyqTgo5eMWJqhLohroI4i1ELq6dL8kMIz6PIDD
	d0jtojFFRIAcdF2FbYwCVjhBTPtjbSqn3DKEwjQyzrregGQMEHXAvZkdezH6ERmIH1YkPy
	WRgF6o6f1tDhoKONvIL07JHHMQvoyf+KTC4ICWQzYicjY/TzjKV56s5wvG+1Kw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795457511;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Kq0PR+IFa1TepunhlfofWwgq9/tAc1k4ex4y48m4J8k=;
	b=trYOuii80/RiHSuca6ZN/y1Zcvd5raMe2dvftM+rsdajaEmxE/I1U8VpcpmdO3OWBtL8D+
	4v9aGOb7Cii0O6OhJ2wWZW2pFPcQf1Q0DNwuCr51UaN2I+hhsgOB4VyGEyQhwHNiH34Jyo
	Q1pBqdw9/Jcg1t3zO4vEVYnxYMUha3g13oLjTyqjmnRPOOM2ZOCLwYyyeKTe67sgcG7fNF
	h5szPfxuFtv8yxdSq6j+jpsruHwP7TUJ21yTxPDjjz7YKsuc3QEbWklVq42DOWM/FOd9sB
	hIiYvJBylwx8Vaw7DyArOOdYTjC7dScLs9FjAqps8QW0v5PRrxjs4K9FHopf6Q==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYDY31trlz12GS
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 18:11:51 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 6197
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 18:11:51 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Kristof Provost <kp@FreeBSD.org>
Subject: git: 5162690ed3cf - main - pf: handle anchor or anchor_call not being passed in PFNL_CMD_ADDRULE
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: 5162690ed3cf91757614b89819d3bf3d7ec806a1
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 18:11:51 +0000
Message-Id: <6b0481e7.6197.40b53567@gitrepo.freebsd.org>

The branch main has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=5162690ed3cf91757614b89819d3bf3d7ec806a1

commit 5162690ed3cf91757614b89819d3bf3d7ec806a1
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2026-11-20 09:46:51 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2026-11-23 17:17:12 +0000

    pf: handle anchor or anchor_call not being passed in PFNL_CMD_ADDRULE
    
    Reported by:    Kevin Day <kevin@your.org>
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sys/netpfil/pf/pf_ioctl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c
index 764e48890e57..41c6641647ad 100644
--- a/sys/netpfil/pf/pf_ioctl.c
+++ b/sys/netpfil/pf/pf_ioctl.c
@@ -3014,6 +3014,9 @@ pf_ioctl_addrule(struct pf_krule *rule, uint32_t ticket,
 #define	ERROUT(x)		ERROUT_FUNCTION(errout, x)
 #define	ERROUT_UNLOCKED(x)	ERROUT_FUNCTION(errout_unlocked, x)
 
+	if (anchor == NULL || anchor_call == NULL)
+		ERROUT_UNLOCKED(EINVAL);
+
 	if ((rule->return_icmp >> 8) > ICMP_MAXTYPE)
 		ERROUT_UNLOCKED(EINVAL);
 

From nobody Mon Nov 23 18:11:52 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYDY46k1Bz71CxQ
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 18:11: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYDY431Yrz3Q9N
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 18:11:52 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795457512;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=co9c87Pf3ruWcs+1BOZB0b9Dbqn60WEgtcDsVWSlT7Q=;
	b=sVWEFr2V9bf6B6nLI8ijq/aT8BPY9qydMri1cA2RyH/WBh7w/4KeEBuu0uYN4KQRc0Ae6F
	XJiHwVyaeU7+9/y3dBFPZnBFbwDyJ8iLudFpiNXSj77EYpRYVgtJanibcixj83W89CItGD
	lLyHKEsA568xwA9104ggGibCOK5PU6zmf6AkTV/vT6c0ltxJ1OlAfNsbbQy3y0KfJ5BE/d
	YfbRdyYSGMx2pXXjVxmtGtWFUdzFfC/il1ObbVG/vfv1jF0umL5xwk1xHd/TaaFkTvT390
	Q48Dz7cMfI2n1R1SV6lZ6xcIaTlGj2xa8QtZA1k9ZHjQpVnLkggjfAZZxS0ung==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795457512;
	b=nMM/gOMhZJYLulkLy1+oncIRer34ndcCWeExkUXC3hIZMsuGnESn2wrxQ7AyIxdTawEbjO
	X7k0FGwS40aDwRLaHCb2BHUECtlfGiZ3TLUC1lT36+nMfnrl/AHM+mGc8hazwt8HKpwCZV
	8NDVpjOHLGiXuue/3p+jBAY7AAFvtLsHgRu/RRf8rmUf1RfrPSMJdwN34k4j63Wdn4kwJe
	wI7O3ZFgcz3BWHgGzq7vomr7oixhNCQzZ3ZJ1jeOmbmNni8CMcP+WSOG+zaXTGwFV+o1D7
	AI8PE348DRU8HK13nEkO0w6gl0hNJUZ/7slkysgAsIARAHIXO/q5/TBLitXKiw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795457512;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=co9c87Pf3ruWcs+1BOZB0b9Dbqn60WEgtcDsVWSlT7Q=;
	b=MyAFchso6EiU21ZCrQriDVLapwCsVM3QOyMs3rcsDflCE4BQqjxbVL3w+vbKbjds64iAm+
	KJ4iQ30SoHDv6iQeIVWcmSyAAKi1cAqcwnYfwtEYj+Db5vsfNerc45uEcxcTCeIiJC35ta
	gLwDJeKRh3Jznns7jO0fATZnzRzt0JV5M4TpTp7TkC2L72PwCcTzeVj8O5mvNN1jqQ6BFt
	dc5wQudn1J1PCjAu0rSv8yozCT3TA91pe4Fazaqn31Ca6Ml4D4NrksDuHWpgff2uaDsjMB
	mbyDnyOVx4G4eegp0TwZGUu5rBNp8EyfzuENgxr+/iaKwpmST7IZ9NWwUHEGhA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYDY429vBz12kK
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 18:11:52 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 66d0
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 18:11:52 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Kristof Provost <kp@FreeBSD.org>
Subject: git: fd59b508f07d - main - pf: fix removing kif when clearing flags
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: fd59b508f07d5a0794210643c8efe20075baa5e9
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 18:11:52 +0000
Message-Id: <6b0481e8.66d0.662e8b94@gitrepo.freebsd.org>

The branch main has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=fd59b508f07d5a0794210643c8efe20075baa5e9

commit fd59b508f07d5a0794210643c8efe20075baa5e9
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2026-11-20 12:17:49 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2026-11-23 17:17:12 +0000

    pf: fix removing kif when clearing flags
    
    When we clear flags on a struct pfi_kkif we checked if it was still
    used, and if not immediately removed it.
    This check did not take states into account. struct pf_kstate may also
    reference kifs, in `kif` or `orig_kif`. To safely remove a kif we have
    to sweep the state table and ensure nothing there uses the relevant kif.
    Fortunately pfi_kkif_remove_if_unref() already does this (along with the
    purge thread and pfi_kkif_purge()), so use that.
    
    Reported by:    Kevin Day <kevin@your.org>
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sys/netpfil/pf/pf_if.c           |  8 ++----
 tests/sys/netpfil/pf/set_skip.sh | 56 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 58 insertions(+), 6 deletions(-)

diff --git a/sys/netpfil/pf/pf_if.c b/sys/netpfil/pf/pf_if.c
index 57dfb0a8031d..1277fcc1374b 100644
--- a/sys/netpfil/pf/pf_if.c
+++ b/sys/netpfil/pf/pf_if.c
@@ -1005,12 +1005,8 @@ pfi_clear_flags(const char *name, int flags)
 			continue;
 		atomic_clear_int(&p->pfik_flags, flags);
 
-		if (p->pfik_ifp == NULL && p->pfik_group == NULL &&
-		    p->pfik_flags == 0 && p->pfik_rulerefs == 0) {
-			/* Delete this kif. */
-			RB_REMOVE(pfi_ifhead, &V_pfi_ifs, p);
-			pf_kkif_free(p);
-		}
+		/* Delete this kif. */
+		pfi_kkif_remove_if_unref(p);
 	}
 	NET_EPOCH_EXIT(et);
 	return (0);
diff --git a/tests/sys/netpfil/pf/set_skip.sh b/tests/sys/netpfil/pf/set_skip.sh
index e984377721b8..0f5c26ecf098 100644
--- a/tests/sys/netpfil/pf/set_skip.sh
+++ b/tests/sys/netpfil/pf/set_skip.sh
@@ -221,6 +221,61 @@ pr255852_cleanup()
 	pft_cleanup
 }
 
+atf_test_case "unref_kif" "cleanup"
+unref_kif_head()
+{
+	atf_set descr 'Create a situation where we unref a kif and states still reference it'
+	atf_set require.user root
+}
+
+unref_kif_body()
+{
+	pft_init
+
+	epair=$(vnet_mkepair)
+
+	ifconfig ${epair}a 192.0.2.1/24 up
+
+	vnet_mkjail alcatraz ${epair}b
+	jexec alcatraz ifconfig lo0 127.0.0.1/8 up
+	jexec alcatraz ifconfig ${epair}b 192.0.2.2/24 up
+
+	# Sanity check
+	atf_check -s exit:0 -o ignore ping -c 1 192.0.2.2
+
+	jexec alcatraz pfctl -e
+	pft_set_rules alcatraz \
+		"pass"
+
+	# Create a state
+	atf_check -s exit:0 -o ignore ping -c 1 192.0.2.2
+
+	# Note: flushing avoid the issue
+	pft_set_rules noflush alcatraz \
+		"set skip on ${epair}b" \
+		"pass"
+
+	# The state should still exist here
+	atf_check -e ignore -o match:"all icmp 192.0.2.2:8.*" \
+	    jexec alcatraz pfctl -ss -vv
+
+	# Delete the epair interface
+	ifconfig ${epair}a destroy
+
+	# Now clear the skip flag.
+	pft_set_rules noflush alcatraz \
+		"pass"
+
+	# The state still exists, and references the kif
+	atf_check -e ignore -o match:"all icmp 192.0.2.2:8.*" \
+	    jexec alcatraz pfctl -ss -vv
+}
+
+unref_kif_cleanup()
+{
+	pft_cleanup
+}
+
 atf_init_test_cases()
 {
 	atf_add_test_case "unset"
@@ -228,4 +283,5 @@ atf_init_test_cases()
 	atf_add_test_case "set_skip_group_lo"
 	atf_add_test_case "set_skip_dynamic"
 	atf_add_test_case "pr255852"
+	atf_add_test_case "unref_kif"
 }

From nobody Mon Nov 23 18:11:53 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYDY55mLGz71Cbh
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 18:11: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYDY52yssz3QGr
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 18:11:53 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795457513;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=woi/SY0nGBAyjJN5PFzCrvpyhIeJhUgTaA4lFsStD/Y=;
	b=APl/dwisqxTzfh/1ar7GCxZng+wURGDvG9aRFLoKMuIohyc0f5HEnU+tLOV32tccEy2/gD
	nf8EztnLsA5sH+/jPPMSS6XWGGx662U0tGQYJr37yDpshYDydAkpguhg5OFiVmXubvS9Jb
	W+Zh+ZjbLUD1tbTYN2SojfVrexqdUlKXRg5QAB/5mczTQPPKc8kyeMQDdaKQmDuxZPaEaK
	d+DgR8kjiMrS5raNzUyTMlFcxJ4rOMQgPhYgDMMsY3c8TMGEf8Ledft3Srux6h0P86TXfw
	dt0twMaaL7KdiqKbftgiFZSKYX6uxNkskOThJzfJbNG3ewOEPso/eRORn6xVXA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795457513;
	b=uHvOWyLNv/VfVWKB/D5TrYdBzrQxzH+BPC2nLps0+dflbwKvUifUo0VTOoF5tFSXNtY/p/
	3YgURMjO1owoHe1filbk4k1ZImLYrO2RMcsL+SYDs3aH6Ezju49nAEq2OodR3QvIM8uWNZ
	9kSIAUnH6yLJZ8yvKDa9lwM8C0igIv2J/uY1NocfIHWTh+CdnkKy2Nz4LxZLtIsOB5oynR
	J0nUuzjJK2yT7knC+l32LW9F43xZjUTjQ3LECtDiRdNtnY7qdV5U2gm7AOPETx0MrdwPp8
	pnYCg3ypRa9AolrBDanxNm+OmliKgzcvuNNa6SvOfnYVzFnx9g7TfxJ0xUCq1A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795457513;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=woi/SY0nGBAyjJN5PFzCrvpyhIeJhUgTaA4lFsStD/Y=;
	b=yanYiePY0y6+rrYFrSPcFxytlLkETCAjDK2bZwetE2d4hINWUvOLQmGOiAdaNq0+kcGRFS
	pRe706pw7dfRNgZ7viTgDVzvJh/cRMTZsQDTj4TADdf/sZczsfVDJlx5TLHh1qC3aFHFhn
	zrj1Q7o+IA89JeuLuftkYIv/vjd89Fn0VEfriLhaVrdlvx5ZVDkwIkgjICSPV756AJ11YI
	CY4N8wZNWud1zTJZay+7cK9OJoq4DmzZx89DUOWEknIGEuLPN7w7PfoTsruuIcOP5X0Ykt
	bxBo59kKNyg118XbPmXwR7cr+8bOLuagNYsM02pOaeI6a8eZWFs9a86VLLwC3Q==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYDY52ZNJz12xk
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 18:11:53 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 6931
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 18:11:53 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Kristof Provost <kp@FreeBSD.org>
Subject: git: 46c84f4e884c - main - pf: hold PF_RULES_RLOCK while copying out ethernet rules
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: 46c84f4e884c3916eaba7c015359aca5840904b7
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 18:11:53 +0000
Message-Id: <6b0481e9.6931.46564830@gitrepo.freebsd.org>

The branch main has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=46c84f4e884c3916eaba7c015359aca5840904b7

commit 46c84f4e884c3916eaba7c015359aca5840904b7
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2026-11-20 14:30:23 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2026-11-23 17:17:12 +0000

    pf: hold PF_RULES_RLOCK while copying out ethernet rules
    
    Code that removes ethernet rules (e.g. pf_rollback_eth()) did not do so
    via NET_EPOCH_CALL(), so simply entering NET_EPOCH is insufficient to
    ensure the rule does not go away. Hold the rules lock until we're dony
    copying the rule to the nvlist.
    
    Reported by:    Kevin Day <kevin@your.org>
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sys/netpfil/pf/pf_ioctl.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c
index 41c6641647ad..f6baa248722c 100644
--- a/sys/netpfil/pf/pf_ioctl.c
+++ b/sys/netpfil/pf/pf_ioctl.c
@@ -4262,7 +4262,6 @@ DIOCGETETHRULES_error:
 	}
 
 	case DIOCGETETHRULE: {
-		struct epoch_tracker	 et;
 		struct pfioc_nv		*nv = (struct pfioc_nv *)addr;
 		nvlist_t		*nvl = NULL;
 		void			*nvlpacked = NULL;
@@ -4325,15 +4324,12 @@ DIOCGETETHRULES_error:
 			PF_RULES_RUNLOCK();
 			ERROUT(ENOENT);
 		}
-		/* Make sure rule can't go away. */
-		NET_EPOCH_ENTER(et);
-		PF_RULES_RUNLOCK();
 		nvl = pf_keth_rule_to_nveth_rule(rule);
 		if (pf_keth_anchor_nvcopyout(rs, rule, nvl)) {
-			NET_EPOCH_EXIT(et);
+			PF_RULES_RUNLOCK();
 			ERROUT(EBUSY);
 		}
-		NET_EPOCH_EXIT(et);
+		PF_RULES_RUNLOCK();
 		if (nvl == NULL)
 			ERROUT(ENOMEM);
 

From nobody Mon Nov 23 18:11:54 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYDY66069z71DGx
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 18:11: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYDY63KrDz3QJP
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 18:11:54 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795457514;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=fHtlbxMa+0guUBY8Sw7nCz17ZjdtKNRMF11lQTbDlK4=;
	b=bpNdlkII1X5stq2eBOsJX/S1OXFSEIY/1Lq5UXtePRj5olV2Kc9ZpaC7MjYD7FuMxL1kFc
	gNZk4QqRdfZbWZCqLnpNkTZXdWugmphH1DRAg1GkEig5ePJEQfjx/dkvl+MpdTfdhp/W7j
	1hdCpMSjB5YDVAUIgfmOp4SAjt/SxXwHNWkrxFAlD01WH2cYc1/Rh3saepDoNY9x2Lcbth
	gVj4JAStSavv4NyEyy312rHu8IZKCHj18w1gi1+23WBxzyrWhRcF68ZJqIcsaZpj1NVZ3j
	mVVykomjRRBs0C6RQAHQ8NQccL2dZu+f5ct/bOcycG1xw23YbZ/p4c+3a6sMKA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795457514;
	b=u5npXpvekBO3Wi9hsv5F73TM1HS53e6I5M+vBb+480gyVPy1Of9J+7EXXrH36MuDQH5aAR
	7/nYVZKl3DWD48kksdCKcU47emNmONphiWwYbzvWifjBRzOjfLc0GJaFr8KCS4Hk/G46E9
	45v99hmntITVmxfFDWDcLTearcsktlvWcfhhLd+SxvGFpj/akLiXIb5knqTUf0MG320wJL
	vD2y3gAK+cNL9aWMFpL6EmmiTA4hb8mUIEhB8WELTf2t0nibChiCHi7jgvZILdR3L1KmdQ
	Ih9VbNBVV7f+E8typ/Rd8ttejqvxSr9VESSsKwLBJ1PczDIoOCM+1wiLV/Loow==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795457514;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=fHtlbxMa+0guUBY8Sw7nCz17ZjdtKNRMF11lQTbDlK4=;
	b=PgIy9fhKop/gBFsbM9+yjWcWmuFvWM/P15MuIwatWIbm5AenpB1bPBd/Ijdxq0aiVHuxgH
	4ctnATqR1zWPuO6YFQZx/GLJvo+w8O6PtfpdsRjPROgZhjLlyuHSK/8S579NCjZCWNuiCs
	yqg9iHW/40f8FRPJjjuIemVD+oFAI2LngikcM9/pudvqxZEsoLdf1Tkz41DJo7WwaFCVM2
	rPzOuR1UJLK44qP67ScnxgHR+Avjz2FnC+f7MMCd3U40MK4Shwk+y2f1wj+UOEXiKRQ4fU
	e0c03qmfN/uZc58gYEZqO+GKP5bmlKFgApiGjUQcRVZcpV89X/3BsmVK3CA9qA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYDY62wbWz12h0
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 18:11:54 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 6388
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 18:11:54 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Kristof Provost <kp@FreeBSD.org>
Subject: git: c556863aad24 - main - pf: fully free rule on error
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: c556863aad24b793726b71995826e9f86c3178cd
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 18:11:54 +0000
Message-Id: <6b0481ea.6388.54ca7604@gitrepo.freebsd.org>

The branch main has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=c556863aad24b793726b71995826e9f86c3178cd

commit c556863aad24b793726b71995826e9f86c3178cd
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2026-11-20 14:25:50 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2026-11-23 17:17:12 +0000

    pf: fully free rule on error
    
    In pf_ioctl_addrule() we freed the rule with pf_krule_free() rather than
    pf_free_rule() so not everything (e.g. kif, table, dynaddr) got freed.
    
    As pf_free_rule() expects to be called with the rules lock held we only
    use it after we've actually locked. We continue to free the rule with
    pf_krule_free() if we error out prior to acquiring the lock. This is safe
    because we don't set up any of the things we need pf_krule_free() to
    clean up for us until after we take the lock.
    
    Reported by:    Kevin Day <kevin@your.org>
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sys/netpfil/pf/pf_ioctl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c
index f6baa248722c..9d45145f6f63 100644
--- a/sys/netpfil/pf/pf_ioctl.c
+++ b/sys/netpfil/pf/pf_ioctl.c
@@ -3213,6 +3213,8 @@ pf_ioctl_addrule(struct pf_krule *rule, uint32_t ticket,
 #undef ERROUT
 #undef ERROUT_UNLOCKED
 errout:
+	pf_free_rule(rule);
+	rule = NULL;
 	PF_RULES_WUNLOCK();
 	PF_CONFIG_UNLOCK();
 errout_unlocked:

From nobody Mon Nov 23 18:30:09 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYDy914hVz71Fxw
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 18:30: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYDy90fFCz4Gyf
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 18:30:09 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795458609;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=nA39GvRr931Q+uz+KvUAZ+Ce6HKjgihdoY9Y9A1Jm/s=;
	b=U9lJRoRvdXxafkFdcASLVYjhsaKIQ6sTwwDfq+PA8X23k3SvkAE3kUpUkLOS7pVuJDFsNg
	K7YNqcssOSrbv/9eETyVfNQu9/QzXzTkt5NhO/d42DgfmPO6r8Hu8stSvVrmzIIsOby3eR
	eH9ZcxaMxyNByjVU/11S4647JaOmQMBmLPGVvOaJC0maHr4fHihbzeotcr5CkppPjCPQSB
	qCaNtqTTaKc+ebON2Ygt8+nPulBV72MkqAWFe5zOkap0H5xe2oHRG4IlR+OBGWiGACVGmn
	m3bUa6dCODQIXStlak0P7mf2s5YvrMCcRPATyujEQpApqrNBD6MWDSxWuE0L1Q==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795458609;
	b=wXOtqJ7UwaQroKUrh3dnsRnKTMf0KOHSlwRkGNSSm8Yr/9F2F5Eb5Q+2L7maw4WsmbuDfd
	URI1vrTQaVD8lLnEb2BB8PX7eJ1EaXRBTZmp3mt1GdEgfYSDDM393BUjCuyJyrMcJE8r+M
	Kk8YU/RiDAdmKGdYqO+GbMenzKqJDtZlelirzefDE1Y6/EWwpseWxKbYXnQoaAIOuxmUZl
	3TIUSgbGS2zbcfKtsDXMq19pp944yi/Lsr1Jeasb8bKP+3F0j383RcVAQX2kakk5/biO8I
	0exBxdFTXXjjKqiudm+M2cRnncNRdLLqw1q35gwQuanxlxAk+kZugvEc3qE3jA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795458609;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=nA39GvRr931Q+uz+KvUAZ+Ce6HKjgihdoY9Y9A1Jm/s=;
	b=G4fW80GCy5F9dE5Fu46ZX4o9lcUOtLjOsaRYaxD1WhYFrXkC73A1NtJGU+W37Cm9es2KGB
	CkeDgxrL2C3pbSdA9AAskxsEqiRuX1jGysm6f29fI32EUAk3RxHYZQk4hUVPp55a5xDl0W
	6YR0UygwWPwcuQ/w2MAO4slcZPFcm64tJ45QVJ7Q1Lgetfo5FV8O2Y3wbdka4KrSZHtZqc
	FBY6NGQC1ov3ojl1s8ISbFBdQ8MFejTdBrsqXY7FZoFNb+taz5hzEZfaRrI3Or405j4xnt
	XnxdAPJIho4C7GzqX9Tv+yvoDCtGOX0KzUFtc05ibmIAKvhJzpfeBbW0RkAlYA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYDy903gwz133n
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 18:30:09 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 75d3
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 18:30:09 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Konstantin Belousov <kib@FreeBSD.org>
Subject: git: 92adb5d4cd22 - main - ntsync(4): fix double free and leak of the per-open priv
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: 92adb5d4cd22e93e1f6539994e30eca9fdcdb250
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 18:30:09 +0000
Message-Id: <6b048631.75d3.469ac88c@gitrepo.freebsd.org>

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=92adb5d4cd22e93e1f6539994e30eca9fdcdb250

commit 92adb5d4cd22e93e1f6539994e30eca9fdcdb250
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-11-23 16:44:06 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-23 18:30:02 +0000

    ntsync(4): fix double free and leak of the per-open priv
    
    ntsync_free_priv() took the priv lock again to test closed and
    objs_cnt, after its caller had updated them and dropped the lock.
    Once the priv was closed with no objects left, every caller that got
    there saw that state.  Two threads closing the last two objects, or a
    thread closing the last object while another closed the device file,
    could both free the priv, or one could lock it after the other had
    freed it.  Make the decision in the same critical section that
    changes closed or objs_cnt, so that only the thread making the
    transition frees the priv.
    
    Also, closed was only set by d_close.  The cdevsw does not specify
    D_TRACKCLOSE, so devfs calls d_close only on the last close of the
    device.  When the device was opened more than once, every priv except
    the one closed last was never marked closed and leaked.  Set closed
    from the cdevpriv destructor instead, which runs once for each open
    file, when the file is closed or the device is destroyed.  Remove
    d_close, which is no longer needed.
    
    Reported by:    Ermenson Junior <ermenson.sec@gmail.com>
    Fixes:  03ca6dbdb80d ("ntsync(4)")
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
---
 sys/dev/ntsync/ntsync.c | 53 +++++++++++++++++++++----------------------------
 1 file changed, 23 insertions(+), 30 deletions(-)

diff --git a/sys/dev/ntsync/ntsync.c b/sys/dev/ntsync/ntsync.c
index c1c3ab6a3d6c..49e670de7e59 100644
--- a/sys/dev/ntsync/ntsync.c
+++ b/sys/dev/ntsync/ntsync.c
@@ -313,14 +313,17 @@ static void
 ntsync_close_obj(struct ntsync_obj *obj, struct thread *td)
 {
 	struct ntsync_priv *priv;
+	bool do_free;
 
 	priv = obj->owner;
 	NTSYNC_PRIV_LOCK(priv);
 	MPASS(priv->objs_cnt > 0);
 	MPASS(TAILQ_EMPTY(&obj->waiters));
 	priv->objs_cnt--;
+	do_free = priv->closed && priv->objs_cnt == 0;
 	NTSYNC_PRIV_UNLOCK(priv);
-	ntsync_free_priv(priv);
+	if (do_free)
+		ntsync_free_priv(priv);
 }
 
 static bool
@@ -1141,21 +1144,30 @@ ntsync_create_event(struct ntsync_event_args *args, struct ntsync_priv *priv,
 static void
 ntsync_free_priv(struct ntsync_priv *priv)
 {
-	bool do_free;
-
-	NTSYNC_PRIV_LOCK(priv);
-	do_free = priv->closed && priv->objs_cnt == 0;
-	NTSYNC_PRIV_UNLOCK(priv);
-	if (do_free) {
-		mtx_destroy(&priv->lock);
-		free(priv, M_NTSYNC);
-	}
+	mtx_destroy(&priv->lock);
+	free(priv, M_NTSYNC);
 }
 
+/*
+ * Called once for each open of the device, when the file is closed
+ * or the device is destroyed.  Objects created through the file keep
+ * the priv alive.  The free is decided in the same critical section
+ * that updates closed or objs_cnt, so exactly one thread does it.
+ */
 static void
 ntsync_priv_dtr(void *data)
 {
-	ntsync_free_priv(data);
+	struct ntsync_priv *priv;
+	bool do_free;
+
+	priv = data;
+	NTSYNC_PRIV_LOCK(priv);
+	MPASS(!priv->closed);
+	priv->closed = true;
+	do_free = priv->objs_cnt == 0;
+	NTSYNC_PRIV_UNLOCK(priv);
+	if (do_free)
+		ntsync_free_priv(priv);
 }
 
 static int
@@ -1171,24 +1183,6 @@ ntsync_open(struct cdev *dev, int oflags, int devtype, struct thread *td)
 	return (0);
 }
 
-static int
-ntsync_close(struct cdev *dev, int fflag, int devtype, struct thread *td)
-{
-	struct ntsync_priv *priv;
-	void *a;
-	int error;
-
-	error = devfs_get_cdevpriv(&a);
-	if (error == 0) {
-		priv = a;
-		NTSYNC_PRIV_LOCK(priv);
-		priv->closed = true;
-		NTSYNC_PRIV_UNLOCK(priv);
-	}
-	devfs_clear_cdevpriv();
-	return (0);
-}
-
 static int
 ntsync_wait_state_get(struct ntsync_wait_args *nwa, u_long cmd,
     struct ntsync_priv *owner, struct ntsync_wait_state **statep,
@@ -1384,7 +1378,6 @@ struct cdevsw ntsync_cdevsw = {
 	.d_version =	D_VERSION,
 	.d_flags =	0,
 	.d_open =	ntsync_open,
-	.d_close =	ntsync_close,
 	.d_ioctl =	ntsync_ioctl,
 	.d_name =	"ntsync",
 };

From nobody Mon Nov 23 18:30:10 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYDyB3WzHz71FkY
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 18:30: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYDyB0n2Rz4GtL
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 18:30:10 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795458610;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=W529N1wijH9tps4O+Q2Z+iYkZlfQoCkEZ5yuPV/e4yA=;
	b=ECdUNAz7fVCqEw/qoxN0nGi8Us/L9/BP8rlcXXhX/B6bBNUP5b5CQd7sDaIHymv6EZ7BG6
	XV9cawcNzWFIKrLjK7CjGRV3sRTCvo9cUSsXi93HR9VCUUxSu6kQCHrzijkRsy97dQQjpV
	v0q9G+YncoFMGOHkI776Z4hc9o75IJl3aiLik29NUK/NFXwyzgP5INc5sIMJnp1NBB+l8o
	7FLFynnCB/EfA83XzuGWLqlKOMD3vlXmUNjTjyE/nGKViZk9bD4/nVNyYyBsq0jNRTtAmP
	q+zU2b0jBbxykTebgyb7PqLBRWFPvwBvX77gXe5NRDLWA+UDchBXavZr2ytp+w==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795458610;
	b=lAb5kZoX6Jd2xHXVc+2xPnmr4hSXMOZJDCDsNFMT5cNWd8YVQ/ik+vE3M4eqiuG8MGj93d
	Vih1z+0J9oNdRLfXY/mnLyJmFAWCqBaMdYbIYzoCNqth9XV1dIWl3trSWxOmsCrWj0tKHm
	bEoo1AINeTpJNc3FbVpTfng22NrNytJ+Ngzw0R/Qn8ptU/O43grAKv1mtDqe5J5qOmoNCF
	JJCf6Bg98ApASHc7U6kBYgAsHjCgeqwDpJyhUEvlHMCR5HzEVgG2rYKM9EMwxwh2+ffxlM
	/P4DYYQx2WfR/kuhpOw9zkMBbtpbfpYjT1k0xKcanhc1EzQ74OXjGGCIRO6iBg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795458610;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=W529N1wijH9tps4O+Q2Z+iYkZlfQoCkEZ5yuPV/e4yA=;
	b=ZZAaJ3aR8FVYlbURKpO3mZ5bHfdcs3IwWUvj9jviS7GrPIurgInfD6GuMLLT3UWb4f+OfI
	NzWtsfopAGEI7er6K4EUWIHL2UgYBDtsJIthTOgDgCvChYn3yyEPnrgM2+MD5AuvLFaZZB
	63voyAsadYcHBnKWkceuNTiJ7iv1qwfTxDzw53zX/RWWdL8RZR0SI/NqqbcVJCBRuwYh47
	TzJBi7XO5Pr1uaqiQJ4QwFZirUJkXbFNAJmccJhPZ9x1zTlY4zv7czfFQjvS+qz8l4zed4
	2cOJlDkbFXgzgUH5WV6k0o9bgiNbL7wmgfGHjEG9En8ZkDMu3yKOOXZCMsVkuQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYDyB0Pg0z12dr
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 18:30:10 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 8987
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 18:30:10 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Konstantin Belousov <kib@FreeBSD.org>
Subject: git: d3bfdc5f0487 - main - ntsync(4): do not leak the priv when devfs_set_cdevpriv() fails
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: d3bfdc5f048773d530e1873f9d4fe7d0481c7324
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 18:30:10 +0000
Message-Id: <6b048632.8987.1ee54dc0@gitrepo.freebsd.org>

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=d3bfdc5f048773d530e1873f9d4fe7d0481c7324

commit d3bfdc5f048773d530e1873f9d4fe7d0481c7324
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-11-23 16:44:06 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-23 18:30:02 +0000

    ntsync(4): do not leak the priv when devfs_set_cdevpriv() fails
    
    ntsync_open() ignored the error from devfs_set_cdevpriv().  The call
    fails when the device is opened without a file, for instance by
    ktrace(2), which opens the trace file with vn_open() and a NULL fp,
    and only then checks the vnode type.  The priv was attached to
    nothing, so its destructor never ran and it leaked.  The device node
    is mode 0666, so any user could leak a priv with each ktrace(2) call.
    
    Free the priv and return the error.
    
    Fixes:          03ca6dbdb80d ("ntsync(4)")
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
---
 sys/dev/ntsync/ntsync.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/sys/dev/ntsync/ntsync.c b/sys/dev/ntsync/ntsync.c
index 49e670de7e59..984a2460a436 100644
--- a/sys/dev/ntsync/ntsync.c
+++ b/sys/dev/ntsync/ntsync.c
@@ -1174,13 +1174,16 @@ static int
 ntsync_open(struct cdev *dev, int oflags, int devtype, struct thread *td)
 {
 	struct ntsync_priv *priv;
+	int error;
 
 	priv = malloc(sizeof(*priv), M_NTSYNC, M_WAITOK);
 	priv->closed = false;
 	priv->objs_cnt = 0;
 	mtx_init(&priv->lock, "ntsync", "ntsync", MTX_DEF | MTX_NEW);
-	devfs_set_cdevpriv(priv, ntsync_priv_dtr);
-	return (0);
+	error = devfs_set_cdevpriv(priv, ntsync_priv_dtr);
+	if (error != 0)
+		ntsync_free_priv(priv);
+	return (error);
 }
 
 static int

From nobody Mon Nov 23 19:09:17 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYFqK4RS8z71Ksj
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 19:09: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYFqK3k7Sz4Pw4
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 19:09:17 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795460957;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=QK94oNNVouQdxeDo/HqohxA/4FS4uDouB958B1S4vCs=;
	b=BFDMaIbIT9tuHTWV2r3Yix6LepmFCc3rqggVQ2CQ4W1MC5YS3EIHDXFEmxUhCXXLA5ezIx
	qBqUlFjUkwDTGlSeNqQhMUpS6EPkjLgtfSHtQf2Jthm0WGbFB9XUF/isLspp7HwNCZbPCf
	/ob7vF5xDYCrTvlyiRYsrmEKcmD2rBhdOgw9wxJXOn9Q5l5/rpEjxQHfc/lqsw1qSF7ntC
	e/6gRqgd1cluqohnDyJE3OvbTKGK6pfhEA1vIFriUKBR12aDefypE1wjIGywOPGB/K4ucQ
	9EPc4AxIY31rdWsSeKGupHT4EpiXHPRT9tQd86MDXsSymI2Nmy811tTxGGI2uQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795460957;
	b=iw5h++DCsadGfHhSZTML9UzksqURbvJhqrwkmeGLEeoTQ05xrc+P8+kHxXv3+dj2A9+Rwv
	C1QrkB6jjPOI9L1NhwfByfpuHDWJOETwTLuyuWz9VQ3t4tXhOGya7+KnlTLki2ZbzKb8g1
	iyI8YqaIDAGcNzrA29nMYdAUwKDci00EOZjptPbf0lqUO9knE1FLhAeUDXGtFP+4H2bUx9
	u5fmnazuIDShHrnZqyoEqK/Cq3/1TaZJT4Q6BdlH8UmbuMoPE9lVS17t5KDzM25MsS1H2J
	aO/Glz+JtqhlcytbTwnds2ZDBWYhOc4pXw4xJrjwkkK3MVd95f5vAjEWvRXHrg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795460957;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=QK94oNNVouQdxeDo/HqohxA/4FS4uDouB958B1S4vCs=;
	b=PjAxOfJwVhxSPRjFPOKGF+d9EW/u1NggJNnMiMAkDkGK7xA/SWCfGuT+q/xV4R4zNU9bMK
	IP1wXRuKX2cbmpl2rjGOYagjHwj2SwmtjpU1oxKU6O5H+fPZV9ziE3Xuu+2VUTyVfhnN0B
	vr9YfsaEWQA5BQpl362lYL0TcYZ0VytK5HzO7c+r9ZRAZ6t3XeAjoHCCb7v1eAm0IiG/tU
	/GtBaH0yjismsdeDvxBkmqnNmPC4CNCQb4ayYiGQJln2CRygdZS8zOe5pv5RvR7/EqlgqK
	2j/2UgUcRuWPFATm4Q16FSAhLhr07rX6yx262GAYoBeB1Ivv47cnTIkQ7qzScQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYFqK3N3hz14Gs
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 19:09:17 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id a671
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 19:09:17 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Konstantin Belousov <kib@FreeBSD.org>
Subject: git: 2832d06f8b42 - main - kern/kern_descrip.c: add pdswap() helper
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: 2832d06f8b428c7bdedaa21724ca4d8a196529db
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 19:09:17 +0000
Message-Id: <6b048f5d.a671.19f2b0ff@gitrepo.freebsd.org>

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=2832d06f8b428c7bdedaa21724ca4d8a196529db

commit 2832d06f8b428c7bdedaa21724ca4d8a196529db
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-11-23 01:39:14 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-23 19:05:46 +0000

    kern/kern_descrip.c: add pdswap() helper
    
    It stores the new pwddesc into the target process's p_pd, then runs the
    tail of pdescfree() on the old one.
    
    Reviewed by:    markj
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D61934
---
 sys/kern/kern_descrip.c | 32 +++++++++++++++++++++++++++++++-
 sys/sys/filedesc.h      |  2 ++
 2 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index c36fc16ef19b..d1cc35894cd2 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -119,7 +119,7 @@ static void	filecaps_copy_finish(const struct filecaps *src,
 		    struct filecaps *dst, u_long *ioctls);
 static u_long 	*filecaps_free_prep(struct filecaps *fcaps);
 static void	filecaps_free_finish(u_long *ioctls);
-
+static void	pdescfree_tail(struct proc *p, struct pwddesc *pdp);
 static struct pwd *pwd_alloc(void);
 
 /*
@@ -2581,6 +2581,22 @@ fdunshare(struct thread *td)
 	p->p_fd = tmp;
 }
 
+/*
+ * Used by the caller to replace its own p_pd while no other writer
+ * exists.  old_pdp must be the current value, and its share and
+ * reference are consumed.
+ */
+void
+pdswap(struct proc *p, struct pwddesc *new_pdp, struct pwddesc *old_pdp)
+{
+	MPASS(p->p_pd == old_pdp);
+
+	/* Make the initialized copy visible before the pointer to it. */
+	atomic_store_rel_ptr((volatile uintptr_t *)&p->p_pd,
+	    (uintptr_t)new_pdp);
+	pdescfree_tail(p, old_pdp);
+}
+
 /*
  * Unshare a pwddesc structure.
  */
@@ -2861,6 +2877,20 @@ fdescfree(struct thread *td)
 	fdescfree_fds(td, fdp);
 }
 
+static void
+pdescfree_tail(struct proc *p, struct pwddesc *pdp)
+{
+	/*
+	 * The p_pd store must be visible before the process lock is
+	 * observed unlocked, see the comment above fdhold().
+	 */
+	atomic_thread_fence_seq_cst();
+	PROC_WAIT_UNLOCKED(p);
+
+	(void)refcount_release(&pdp->pd_sharecount);
+	pddrop(pdp);
+}
+
 void
 pdescfree(struct thread *td)
 {
diff --git a/sys/sys/filedesc.h b/sys/sys/filedesc.h
index 3dfac6f0ab14..178c3fee96cb 100644
--- a/sys/sys/filedesc.h
+++ b/sys/sys/filedesc.h
@@ -370,6 +370,8 @@ struct pwddesc *pdcopy(struct pwddesc *pdp);
 void	pdescfree(struct thread *td);
 struct pwddesc *pdinit(struct pwddesc *pdp, bool keeplock);
 struct pwddesc *pdshare(struct pwddesc *pdp);
+void	pdswap(struct proc *p, struct pwddesc *new_pdp,
+	    struct pwddesc *old_pdp);
 void	pdunshare(struct thread *td);
 
 int	pwd_altroot(struct thread *td, struct vnode *altroot_vp);

From nobody Mon Nov 23 19:09:18 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYFqL61V0z71L6J
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 19:09: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYFqL4Ddcz4Plj
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 19:09:18 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795460958;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=8xWRNUHXRg2Al+AJKCY693YHXm3toxlxzqC5ODcy/CY=;
	b=LjmXdHCGOGuorJ6QrKI9S5BhvbcBB7UlkYxqiZx3ARtLMVO8gsx0yoPEgzLvsEZD6hes2L
	Vt3xrGPQycGKo7+P+v6EowxlxGtbyW1goJyTa8UL4G/H0tfeivdyDdrhjgEu1tNzEU2gwF
	wzfddxDOqqSNvLHwaGrFdZoBHLIQAcl4YxV0m1bp7Cj9iFExYcG7hnQQX5JqJssSjEQYAX
	ggDjNkT6aZeBnmHa5bUt0z0DCLJKqKr0GcFrJWRREz2CkBqkh1cDsqOuoTdcqu6Cl3oylC
	oarba4O0XqJieDBSnW7ejfiaSvAGd2vMaY1iG/GLS6lhiZqKCRZYdxnrs0KA0Q==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795460958;
	b=USgKQE7TOUcEvXa8y8YNTm1Inq/VWtgr4S2crWHYFzhBEmJoA3KVXSJ7BN9hXSe1HahbdL
	ePGKoA7aoNqaRcs4hAklf2K1arH1b6Zuuv2ErZmc0R50R+qFYatXL6jH9f63xtoT/DIJ/p
	zHYiokAolACHfLPSM2znUZPWn3FnyIb3OwNWTOPm9deSdW0LHdDcoPT6NZ3bk8E+IzxhPv
	KuHEqXITBTrVBYN42bgndt9XnkenLz6Haq52FAlVwH4bG/aL5VN7XaOJsoGvulv6dxSu+c
	9A1GGV46usPBtHHP1kogsva/IY70gAZFPessiAhwnKO4Ho/t4Ucc/WA9m223fA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795460958;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=8xWRNUHXRg2Al+AJKCY693YHXm3toxlxzqC5ODcy/CY=;
	b=i7zs2i4ohObs/cTwuVdZ62U024OwipWC+uQqWGKTCf2VCyXTm8p+NlJ3CbFb790py2eZUi
	23p8Rj+0na3IzIkI7STIBzW2LtafAU9hIcdFF9xMbnoIVVQAKSvMNWWrwj5AeTiqB7D8h1
	RQnyFNHRnlVDZ9MmPdsB2HTpwvXwRB5yjLDYlr50mtYOQ7DKlyTuxWzLp5AiqVgZDiETCI
	RFcDM8idrv1LOr1KhaDSZtoo3P62kd9beQ3uPw5jy/c13ORnvPlRtJEFkaVXLf19n12uBz
	as1BxHfGqkhWsmyx0CL+5EKxF+wPO1Y2avXxs/rAOZKYobkIER2XL9Uy7z7UsQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYFqL3lQWz13yC
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 19:09:18 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id c43a
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 19:09:18 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Konstantin Belousov <kib@FreeBSD.org>
Subject: git: fa577dbc5fdc - main - kern: pwd_hold_proc() might dereference the NULL p_pd
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: fa577dbc5fdc9b282c0fb97b5da7d44ff2fddcb3
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 19:09:18 +0000
Message-Id: <6b048f5e.c43a.7fd2d789@gitrepo.freebsd.org>

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=fa577dbc5fdc9b282c0fb97b5da7d44ff2fddcb3

commit fa577dbc5fdc9b282c0fb97b5da7d44ff2fddcb3
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-11-23 01:39:14 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-23 19:05:55 +0000

    kern: pwd_hold_proc() might dereference the NULL p_pd
    
    pdunshare() calls pdescfree(), which stores NULL into p->p_pd, and only
    then stores the new pwddesc.  pwd_hold_proc() running in that window gets
    NULL from pdhold() and dereferences it.  pwd_hold_proc() assumed p_pd is
    never NULL for a held process.  Similarly, fork_norfproc() calls
    pdescfree() before installing a new pwddesc for the current process
    (rfork(RFCFDG) without RFPROC).
    
    Close the gap with pdswap(), which publishes the new pwddesc before
    releasing the old one.
    
    Reported by:    llm-postcr, markj
    Reviewed by:    markj
    Fixes:  85c855d31b18 ("fd: add pwd_hold_proc")
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D61934
---
 sys/kern/kern_descrip.c | 19 ++++++++-----------
 sys/kern/kern_fork.c    |  9 +++++----
 2 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index d1cc35894cd2..af87412c1440 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -2603,17 +2603,18 @@ pdswap(struct proc *p, struct pwddesc *new_pdp, struct pwddesc *old_pdp)
 void
 pdunshare(struct thread *td)
 {
-	struct pwddesc *pdp;
+	struct pwddesc *old_pdp, *new_pdp;
 	struct proc *p;
 
 	p = td->td_proc;
+	old_pdp = p->p_pd;
+
 	/* Not shared. */
-	if (refcount_load(&p->p_pd->pd_sharecount) == 1)
+	if (refcount_load(&old_pdp->pd_sharecount) == 1)
 		return;
 
-	pdp = pdcopy(p->p_pd);
-	pdescfree(td);
-	p->p_pd = pdp;
+	new_pdp = pdcopy(old_pdp);
+	pdswap(p, new_pdp, old_pdp);
 }
 
 /*
@@ -2902,14 +2903,10 @@ pdescfree(struct thread *td)
 	MPASS(pdp != NULL);
 
 	/*
-	 * Check pdhold for an explanation.
+	 * Check pdhold() for an explanation.
 	 */
 	atomic_store_ptr(&p->p_pd, NULL);
-	atomic_thread_fence_seq_cst();
-	PROC_WAIT_UNLOCKED(p);
-
-	(void)refcount_release(&pdp->pd_sharecount);
-	pddrop(pdp);
+	pdescfree_tail(p, pdp);
 }
 
 /*
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 25aebe3dad3c..21b5eb87e4e7 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -414,14 +414,15 @@ fork_norfproc(struct thread *td, int flags)
 	 */
 	if ((flags & RFCFDG) != 0) {
 		struct filedesc *fdtmp;
-		struct pwddesc *pdtmp;
+		struct pwddesc *new_pdp, *old_pdp;
+
+		old_pdp = p1->p_pd;
+		new_pdp = pdinit(old_pdp, false);
+		pdswap(p1, new_pdp, old_pdp);
 
-		pdtmp = pdinit(td->td_proc->p_pd, false);
 		fdtmp = fdinit();
-		pdescfree(td);
 		fdescfree(td);
 		p1->p_fd = fdtmp;
-		p1->p_pd = pdtmp;
 	}
 
 	/*

From nobody Mon Nov 23 19:46:15 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYGf02hPBz71Q2S
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 19:46: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYGf00Ndnz4Tth
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 19:46:16 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795463176;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=mpwyVgSVJGnPFDKu9v68Bz7BExcjklARiQIcU69YPA8=;
	b=NYPHj34lN2crHx1HUvKIBr56QbVU9mzQhiGxYZXynLHUw8JbxxN6S+cltlme1CaNNFyknj
	Gxfb1UZg/J7fLclQmXS/dfzBV0VNMoserE7MAcnNYlAoSGMqpH9/I/Nf70EplGL/9K5GyO
	GHiLhZ46evAkgqO1cCEx1qkGFUoWAFUhlT33crj1Z3M1ODZ4qUvBDcdpzAtBixbyS7G0Kk
	/cRruMsup4BDEBCnGoGXbp5oCQGNsrpxpH/fhXMY0b0mdOc7uFcDso7O8cgCx+yjoofxuO
	csW7xU0mgQYnnfodk+6x90mfRQcJC9kZleQdEcUJ8I04rJMa/aPcA9zzLlVKQA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795463176;
	b=QBKyXtRnC/BYplO4++MIvq0Pknd3lRmutfRcqz09GGB9AmAUQCn5V7+rNc5Tjy/qzJ6Eow
	1GXgM2BYZXXTt5zV3gv8Us8dIjgvRLx+7VBzA9Kb8VIz6C0+jot18LTNlwS7xOWSMFSPsj
	xlE/CYCuLKX9iXABeX5YI/Gmb/l7be2akqVFlP2LVHenZOrTIM0739z5ps0rni2Ykqx9Lf
	P6q2erL0QoTeTu0tvKdF3jFUS6RgE9JovNR9EOKoYcWxaVRj6c8jN3zTSJoGCbodZPpBJl
	WCMrBKxQa254m4/80ZTYiHZnYuZom3CLvmem5aqF9GIR06cs4BYBmWhps7IJGQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795463176;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=mpwyVgSVJGnPFDKu9v68Bz7BExcjklARiQIcU69YPA8=;
	b=W5y0B8MHDb9cjldh5AT+j7v5TphBewLD1sATlrBy1PlonOCTh/r+KLosj17Ylugb3RAUb8
	dEItmkbhUlM4Rc7RHWTGYDjbV3wgTgQd0HKdQgHJaASzBkZSwl35FT+L4Y6t1J1gVhY6Eq
	EFIOlC15d2n5ZtGxOmiYMSFk2zZlpr9Npxfh7L7sB+Kcep/bzeOBEUfuJ79vKYdcn2jIDd
	9Ju1fB4AgKdc2vU/zB3/utEbwWDqO4mZZbXvX1DBWDukTcbGbdUpPSXr6uOVLWd9JvJP3h
	CGWwHVzEQYPpoyV/NV4RURe0cb2WxynYjQ9j3b6ydWG60FdqbIJfupDtY/Wjww==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYGdz6SNjz14cH
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 19:46:15 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id e840
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 19:46:15 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Konstantin Belousov <kib@FreeBSD.org>
Subject: git: 684531038126 - main - kern: fix use after free in sysctl_kern_proc_umask()
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: 6845310381261099da1f39386657a9efd7122070
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 19:46:15 +0000
Message-Id: <6b049807.e840.557b8fd5@gitrepo.freebsd.org>

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=6845310381261099da1f39386657a9efd7122070

commit 6845310381261099da1f39386657a9efd7122070
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-11-23 19:25:53 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-23 19:43:37 +0000

    kern: fix use after free in sysctl_kern_proc_umask()
    
    sysctl_kern_proc_umask() held the target process and then read
    p->p_pd->pd_cmask without the process lock and without a reference on
    the pwddesc. The hold keeps exit1() from freeing p_pd, but it does not
    stop pdswap().  pdswap() releases the old pwddesc, which can then be
    freed while the sysctl still reads it.
    
    Read pd_cmask with the process lock held instead of holding the process.
    pdescfree_tail() waits for the process lock to be dropped before it
    releases the old pwddesc, so the pwddesc read from p_pd under the lock
    stays valid until the unlock.  pget() checks P_WEXIT under the same
    lock, and exit1() sets P_WEXIT before pdescfree() clears p_pd, so p_pd
    cannot be NULL either.
    
    Reported by:    llm-postcr
    Reviewed by:    markj
    Fixes:  6ce13747dc3c ("Add sysctl to retrieve or set umask of another process.")
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D61955
---
 sys/kern/kern_proc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
index 398de3a182f5..c0a6f9767db2 100644
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -3115,12 +3115,12 @@ sysctl_kern_proc_umask(SYSCTL_HANDLER_ARGS)
 		goto out;
 	}
 
-	error = pget(pid, PGET_WANTREAD, &p);
+	error = pget(pid, PGET_CANDEBUG | PGET_NOTWEXIT, &p);
 	if (error != 0)
 		return (error);
 
 	cmask = p->p_pd->pd_cmask;
-	PRELE(p);
+	PROC_UNLOCK(p);
 out:
 	error = SYSCTL_OUT(req, &cmask, sizeof(cmask));
 	return (error);

From nobody Mon Nov 23 19:53:13 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYGp21kM1z71QLJ
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 19:53: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYGp20VRcz4XDv
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 19:53:14 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795463594;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=RU5FDnIqbpdI4Ar76TSWx2x9Gw6YCu6nAMuGJSk4MMM=;
	b=U62RaGRxIcbucMr8vp7KjH70f8cPm8ErQ54fwCi7P6N/AsNeEIAJDj/8oBQ/m3Y2iU98yr
	sE0H9nPZzikDDzd0GudnTj6l0HoTbSx2SzmHiwRQeCTNTkvL1JuPHVojg1LCs4x6WU0xfN
	tA+FlTrLq+TsSBowQuG9+EF7vrJ7OJxnyrqVV1+dv8+J8KazAqDwsRREfc2CVCEy5uyrMm
	E+LD3Gb4Rxo+h0YFKbunuFz43PrIb+UX6UjfGOwKkzCW6gWRfZPl5wQO3vyVJhmZb4J5pZ
	kodCreLlQQkub0cb0sbsyL9KH/7VcJYsFlHg+PnGOaLXZ/IAKypFdeBVfbOPlw==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795463594;
	b=K6mStSBj5/6Zfv5diZ5ssKhjgIHyNv8AgvQRXTq3kKf/BgnmyfwOGKqRr8jRwj/qwd94UD
	DGB8pqpoyhXE9MF3BK8SbKiMJyPqYHwnpgO3IbCy9gbN97ZRDsKPFhdekf1ewt4xKcKalt
	hG0pmiFI4+2uYqSauMQIfBF2GtPAC+PMECOV37Z7w9jrVZAyrPNYe6p4EpF4ovfHa2d1JO
	4FfEEfCt/9ccZRxgn+SC5SQom1fD+NMpWPazmHh9yfiMJ3KHG+wU/7AinvK4/VPyZqpmDX
	r6RDa47uQhDk97I9g9Toop6lq59XcJ1onR5XPRhykHfa3tgajjJq1wqPEJGdyQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795463594;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=RU5FDnIqbpdI4Ar76TSWx2x9Gw6YCu6nAMuGJSk4MMM=;
	b=igj5DB4alJ6VDF/vmcKyVXbnJc2Reruf3gh4tmXIkYhhkDLK4NUqdYwST6CwCjRmqd9cQJ
	SO/PVS60d+dPUJ1cdZ5FfTdgWqf6qOPoyrJee1M/eVbJx3p8bXPmUpkQLiJT7h3Qbhda76
	41SyaY7sIq+U/0oxzDZPeuUB1FaWYJzP2UCUh+SUAxFiOMU0WC7Y+qnQVoTkl4deT/qlt2
	LMbSMSFqe1fv4ORJUqA0U3LRaEtN//+h9xlboS9jQpRoF3WNKOZ/D9ArTkYhIKY8D5yKyq
	Ka1zg4ZtBveK19B0JrsbZr/aY0tRezuIpZeWIXpLy7eHALkAQOPzz9yvAiRV/Q==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYGp170hDz14cn
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 19:53:13 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id f7c0
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 19:53:13 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Andrew Gallatin <gallatin@FreeBSD.org>
Subject: git: d14b841b567a - main - mlx5en: only pass TCP packets to sw LRO
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: d14b841b567a7a20d7b9d5f1f9c1837dab5c3324
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 19:53:13 +0000
Message-Id: <6b0499a9.f7c0.fc3e413@gitrepo.freebsd.org>

The branch main has been updated by gallatin:

URL: https://cgit.FreeBSD.org/src/commit/?id=d14b841b567a7a20d7b9d5f1f9c1837dab5c3324

commit d14b841b567a7a20d7b9d5f1f9c1837dab5c3324
Author:     Andrew Gallatin <gallatin@FreeBSD.org>
AuthorDate: 2026-11-23 19:48:09 +0000
Commit:     Andrew Gallatin <gallatin@FreeBSD.org>
CommitDate: 2026-11-23 19:49:33 +0000

    mlx5en: only pass TCP packets to sw LRO
    
    Only pass TCP packets to sw LRO, as other protocols get no
    benefit from LRO, and only experience delay due to being queued until
    the end of the interrupt.
    
    This patch adds a new tcp parameter to mlx5e_build_rx_mbuf() and marks
    packets whose cqe_l4_hdr_type() is TCP as TCP and restricts LRO to
    packets marked as such.
    
    Reviewed by: aehrenberg_nvidia.com, glebius, kib
    Sponsored by: Netflix
    Differential Revision: https://reviews.freebsd.org/D61518
---
 sys/dev/mlx5/mlx5_en/mlx5_en_rx.c | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c b/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c
index 262558d529dc..307a2672d578 100644
--- a/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c
+++ b/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c
@@ -323,7 +323,7 @@ mlx5e_mbuf_tstmp(struct mlx5e_priv *priv, uint64_t hw_tstmp)
 
 static inline void
 mlx5e_build_rx_mbuf(struct mlx5_cqe64 *cqe, struct mlx5e_rq *rq,
-    struct mbuf *mb, struct mlx5e_rq_mbuf *mr, u32 cqe_bcnt)
+    struct mbuf *mb, struct mlx5e_rq_mbuf *mr, u32 cqe_bcnt, bool *tcp)
 {
 	if_t ifp = rq->ifp;
 	struct mlx5e_channel *c;
@@ -463,6 +463,17 @@ mlx5e_build_rx_mbuf(struct mlx5_cqe64 *cqe, struct mlx5e_rq *rq,
 		break;
 	}
 
+	switch (get_cqe_l4_hdr_type(cqe)) {
+	case CQE_L4_HDR_TYPE_TCP_NO_ACK:
+	case CQE_L4_HDR_TYPE_TCP_ACK_NO_DATA:
+	case CQE_L4_HDR_TYPE_TCP_ACK_AND_DATA:
+		*tcp = true;
+		break;
+	default:
+		*tcp = false;
+		break;
+	}
+
 	mlx5e_accel_ipsec_handle_rx(ifp, mb, cqe, mr);
 }
 
@@ -544,6 +555,7 @@ mlx5e_poll_rx_cq(struct mlx5e_rq *rq, int budget)
 {
 	struct pfil_head *pfil;
 	int i, rv;
+	bool tcp;
 
 	CURVNET_SET_QUIET(if_getvnet(rq->ifp));
 	pfil = rq->channel->priv->pfil;
@@ -629,7 +641,7 @@ mlx5e_poll_rx_cq(struct mlx5e_rq *rq, int budget)
 		}
 rx_common:
 		mlx5e_build_rx_mbuf(cqe, rq, mb, &rq->mbuf[wqe_counter],
-		    byte_cnt);
+		    byte_cnt, &tcp);
 		rq->stats.bytes += byte_cnt;
 		rq->stats.packets++;
 #ifdef NUMA
@@ -637,9 +649,12 @@ rx_common:
 #endif
 
 #if !defined(HAVE_TCP_LRO_RX)
-		tcp_lro_queue_mbuf(&rq->lro, mb);
+		if (tcp)
+			tcp_lro_queue_mbuf(&rq->lro, mb);
+		else
+			if_input(rq->ifp, mb);
 #else
-		if (mb->m_pkthdr.csum_flags == 0 ||
+		if (mb->m_pkthdr.csum_flags == 0 || !tcp ||
 		    (if_getcapenable(rq->ifp) & IFCAP_LRO) == 0 ||
 		    rq->lro.lro_cnt == 0 ||
 		    tcp_lro_rx(&rq->lro, mb, 0) != 0) {

From nobody Mon Nov 23 20:28:22 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYHZZ0w0tz71VRp
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 20:28: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYHZZ0RBsz4bYn
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 20:28:22 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795465702;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=HBCE1eIYx9F/EV1OxplIe0zqGMsFuRnW/JKVu3CLEeA=;
	b=HYUz5z4p5fah6CZwrTdQFDOxAjk3tnaJfZtx+MSmqev18OBbfqBvyiCnIItKXwtBzAcH+1
	q2VoatZpYEK7DISBzeW589vdJe1fbSWcgaQzSQuz0+RH4NC9zpawU3qnrAAAgPltbOqJaQ
	mpGciRRUigjH+1k1BBJ7U3G3VFMSiEOBAboSVkk7EZZkhNOtBXZ+d2bnrcpuQTebD4TkAy
	Bu5kqAOejuVLx+OJ+insC2rgyKop7YD6NNLcHZm/VifLC0VfzOhqdHRUAvrmZBWzDQQVST
	6eR8zfs2+HdXCargi1DraCCh9QXD+pkUBO/Fu4lrQFNSrDmXgnGiCLZRUipd4w==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795465702;
	b=u0sZoQH7seeT7/CKCmYXpawPE85k9KBpTftbkghFnLPcIb1RnpDfys6DPmSYf2mUrscLjg
	oiAr9KoE9sauc6X8OIequCKSLUIidElyz7Z5JTCkWeJer9DmKwLbK1pOlgT6mZ3p4b/jyM
	iqJOUDeM71hOqEWx9EHPTBBsqahi7xwGpj3TX5ww5TTbf6oIZGK1gc4NftRbyqKlpdRTn9
	f76NZX4URFkFeEQFSRUcYkmR73SludF0dOEEs1kifS44htbdNTPv2K08vTxaJysYeLrVX5
	YCke9jW26gl26w4DOomBDEPoWiVYatW2LyPmv1XwxQvhx59v8o1y7aasOvbZJg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795465702;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=HBCE1eIYx9F/EV1OxplIe0zqGMsFuRnW/JKVu3CLEeA=;
	b=YDyb1g9W0S6QYUqTzspNvd42YT++Ae9pXFOTOgaLolg0dJKN7H6AGoay8DoK+egMwKFpWU
	M53BwezjjEgXq2Giu+GZoRh3vrrH7U5ODaLTHhmsjcbjtdLVcY6i8ByWzxHoTC3ht6AUsC
	1NDs7zFPXbd/CGsobxkffB5+/tdLXArj9EEl3SuPRK6vF5eVcT4nlxAZ1Cn//li8UDTGE6
	U9J8J1+1P88iI9RrUMNwO+pQ7tdwAiq3gb+7NqnfQBuqaasZ2Tnm/RFhmMWAv85J1AUGaH
	7FdFCyXner2lPJZlQdQ34iaVZqi2M8R9vkmfJyzCjpv5R/SMlOntOzqIagRZfQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYHZZ05gQz15tY
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 20:28:22 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 12658
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 20:28:22 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Michal Meloun <mmel@FreeBSD.org>
Subject: git: 79fd9bd7d3fd - main - clk_fixed: partially revert and improve e495998e7c6d
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: mmel
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 79fd9bd7d3fd90645d52a7ddda17c66025f136de
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 20:28:22 +0000
Message-Id: <6b04a1e6.12658.215a1a59@gitrepo.freebsd.org>

The branch main has been updated by mmel:

URL: https://cgit.FreeBSD.org/src/commit/?id=79fd9bd7d3fd90645d52a7ddda17c66025f136de

commit 79fd9bd7d3fd90645d52a7ddda17c66025f136de
Author:     Michal Meloun <mmel@FreeBSD.org>
AuthorDate: 2026-11-23 10:31:24 +0000
Commit:     Michal Meloun <mmel@FreeBSD.org>
CommitDate: 2026-11-23 20:28:12 +0000

    clk_fixed: partially revert and improve e495998e7c6d
    
    Deferred initialization of the input clock was badly implemented and
    did not work as expected.  Resolve the parent clock eagerly during
    attach (failing if it is not yet available) and keep deferred
    initialization only for the optional GPIO and/or regulator used by
    gated-fixed-clocks.  Also clean up the softc layout, move GPIO
    configuration into the getter, and make the file FDT-only.
    
    Reported by:    llm-postcr
    Fixes:          e495998e7c6d ("FDT, clk_fixed: add gated-fixed-clock support and deferred initialization")
    MFC with:       e495998e7c6d
---
 sys/conf/files          |   2 +-
 sys/conf/files.arm64    |   2 +-
 sys/dev/clk/clk_fixed.c | 288 +++++++++++++++++++++++-------------------------
 3 files changed, 141 insertions(+), 151 deletions(-)

diff --git a/sys/conf/files b/sys/conf/files
index cdd54d23a91d..b78d84eaff43 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -1375,7 +1375,7 @@ dev/clk/clkdev_if.m		optional clk
 dev/clk/clknode_if.m		optional clk
 dev/clk/clk_bus.c		optional clk fdt
 dev/clk/clk_div.c		optional clk
-dev/clk/clk_fixed.c		optional clk
+dev/clk/clk_fixed.c		optional clk fdt
 dev/clk/clk_gate.c		optional clk
 dev/clk/clk_link.c		optional clk
 dev/clk/clk_mux.c		optional clk
diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64
index 7993b715d9d2..39c494fe97c9 100644
--- a/sys/conf/files.arm64
+++ b/sys/conf/files.arm64
@@ -790,7 +790,7 @@ arm64/qoriq/clk/ls1028a_flexspi_clk.c		optional clk soc_nxp_ls fdt
 arm64/qoriq/clk/ls1046a_clkgen.c		optional clk soc_nxp_ls fdt
 arm64/qoriq/clk/ls1088a_clkgen.c		optional clk soc_nxp_ls fdt
 arm64/qoriq/clk/lx2160a_clkgen.c		optional clk soc_nxp_ls fdt
-arm64/qoriq/clk/qoriq_clk_pll.c			optional clk soc_nxp_ls
+arm64/qoriq/clk/qoriq_clk_pll.c			optional clk soc_nxp_ls fdt
 arm64/qoriq/clk/qoriq_clkgen.c			optional clk soc_nxp_ls fdt
 dev/ahci/ahci_fsl_fdt.c				optional soc_nxp_ls ahci fdt
 dev/flash/flexspi/flex_spi.c    		optional clk flex_spi soc_nxp_ls fdt
diff --git a/sys/dev/clk/clk_fixed.c b/sys/dev/clk/clk_fixed.c
index 479455e71a5d..30e39e94310a 100644
--- a/sys/dev/clk/clk_fixed.c
+++ b/sys/dev/clk/clk_fixed.c
@@ -22,12 +22,9 @@
 
 #include <dev/gpio/gpiobusvar.h>
 
-#ifdef FDT
 #include <dev/ofw/ofw_bus.h>
 #include <dev/ofw/ofw_bus_subr.h>
-#include <dev/ofw/ofw_bus_subr.h>
 #include <dev/regulator/regulator.h>
-#endif
 
 #include <dev/clk/clk_fixed.h>
 
@@ -46,13 +43,27 @@ static int clknode_fixed_set_freq(struct clknode *clk, uint64_t fin,
 static int clknode_fixed_set_gate(struct clknode *clk, bool enable);
 static int clknode_fixed_get_gate(struct clknode *clk, bool *enable);
 
+
+struct clk_fixed_softc {
+	device_t		dev;
+	phandle_t 		node;
+	struct clkdom		*clkdom;
+	bool			attach_done;
+
+	bool			have_gpio;
+	bool			gpio_done;
+	struct gpiobus_pin	*gpio_pin;
+
+	bool			have_reg;
+	bool			reg_done;
+	regulator_t		reg_vdd;
+};
+
 struct clknode_fixed_sc {
 	int			fixed_flags;
 	uint64_t		freq;
 	uint32_t		mult;
 	uint32_t		div;
-	struct gpiobus_pin	*gpio_pin;
-	bool			have_gpio;
 };
 
 static clknode_method_t clknode_fixed_methods[] = {
@@ -116,20 +127,40 @@ clknode_fixed_set_freq(struct clknode *clk, uint64_t fin, uint64_t *fout,
 static int
 clknode_fixed_set_gate(struct clknode *clk, bool enable)
 {
-	struct clknode_fixed_sc *sc;
+	struct clk_fixed_softc *sc_dev;
 	device_t dev;
 	int rv;
 
-	sc = clknode_get_softc(clk);
 	dev = clknode_get_device(clk);
+	sc_dev = device_get_softc(dev);
 
-	if (!sc->have_gpio)
-		return (0);
-
-	rv = GPIO_PIN_SET(sc->gpio_pin->dev, sc->gpio_pin->pin, enable ? 1: 0);
-	if (rv != 0) {
-		device_printf(dev, "Cannot set GPIO pin: %d\n", rv);
-		return (rv);
+	if (!sc_dev->have_gpio && !sc_dev->have_reg) {
+		return (enable ? 0 : ENXIO);
+	}
+	if (sc_dev->have_gpio) {
+		if (!sc_dev->gpio_done) {
+			panic("%s: attempt to use not yet resolved GPIO",
+			    __func__);
+		}
+		rv = gpio_pin_set_active(sc_dev->gpio_pin, enable);
+		if (rv != 0) {
+			device_printf(dev, "Cannot set GPIO pin: %d\n", rv);
+			return (rv);
+		}
+	}
+	if (sc_dev->have_reg) {
+		if (!sc_dev->reg_done) {
+			panic("%s: attempt to use not yet resolved regulator",
+			    __func__);
+		}
+		if (enable)
+			rv = regulator_enable(sc_dev->reg_vdd);
+		else
+			rv = regulator_disable(sc_dev->reg_vdd);
+		if (rv != 0) {
+			device_printf(dev, "Cannot enable regulator: %d\n", rv);
+			return (rv);
+		}
 	}
 	return(0);
 }
@@ -137,25 +168,41 @@ clknode_fixed_set_gate(struct clknode *clk, bool enable)
 static int
 clknode_fixed_get_gate(struct clknode *clk, bool *enabled)
 {
-	struct clknode_fixed_sc *sc;
+	struct clk_fixed_softc *sc_dev;
 	device_t dev;
-	uint32_t val;
+	uint32_t status;
 	int rv;
 
-	sc = clknode_get_softc(clk);
 	dev = clknode_get_device(clk);
+	sc_dev = device_get_softc(dev);
 
-	if (!sc->have_gpio) {
-		*enabled = true;
-		return (0);
+	*enabled = true;
+	if (sc_dev->have_gpio) {
+		if (!sc_dev->gpio_done) {
+			panic("%s: attempt to use not yet resolved GPIO",
+			    __func__);
+		}
+		rv = gpio_pin_is_active(sc_dev->gpio_pin, enabled);
+		if (rv != 0) {
+			device_printf(dev, "Cannot get GPIO pin: %d\n", rv);
+			return (rv);
+		}
 	}
 
-	rv = GPIO_PIN_GET(sc->gpio_pin->dev, sc->gpio_pin->pin, &val);
-	if (rv != 0) {
-		device_printf(dev, "Cannot get GPIO pin: %d\n", rv);
-		return (rv);
+	if (sc_dev->have_reg) {
+		if (!sc_dev->reg_done) {
+			panic("%s: attempt to use not yet resolved regulator",
+			    __func__);
+		}
+		rv = regulator_status(sc_dev->reg_vdd, &status);
+		if (rv != 0) {
+			device_printf(dev, "Cannot get regulator: %d\n", rv);
+			return (rv);
+		}
+		if ((status & REGULATOR_STATUS_ENABLED) == 0)
+			*enabled = false;
 	}
-	*enabled = val != 0;
+
 	return(0);
 }
 
@@ -174,15 +221,11 @@ clknode_fixed_register(struct clkdom *clkdom, struct clk_fixed_def *clkdef)
 	sc->freq = clkdef->freq;
 	sc->mult = clkdef->mult;
 	sc->div = clkdef->div;
-	sc->gpio_pin = clkdef->gpio_pin;
-	sc->have_gpio = clkdef->have_gpio;
 
 	clknode_register(clkdom, clk);
 	return (0);
 }
 
-#ifdef FDT
-
 static struct ofw_compat_data compat_data[] = {
 	{"fixed-clock",		CLK_TYPE_FIXED},
 	{"fixed-factor-clock",  CLK_TYPE_FIXED_FACTOR},
@@ -190,126 +233,75 @@ static struct ofw_compat_data compat_data[] = {
 	{NULL,		 	0},
 };
 
-struct clk_fixed_softc {
-	device_t		dev;
-	phandle_t 		node;
-	struct clkdom		*clkdom;
-	bool			attach_done;
-
-	struct clk_fixed_def	def;
-
-	bool			have_clk;
-	bool			clk_done;
-
-	bool			have_gpio;
-	bool			gpio_done;
-
-	bool			have_reg;
-	bool			reg_done;
-	regulator_t		reg_vdd;
-};
-
-
 static int
-clk_fixed_init_fixed(struct clk_fixed_softc *sc)
+clk_fixed_init_fixed(struct clk_fixed_softc *sc,
+    struct clk_fixed_def *def)
 {
-	uint32_t freq, flags;
+	uint32_t freq;
 	int rv;
 
-	sc->def.clkdef.id = 1;
+	def->clkdef.id = 1;
 	rv = OF_getencprop(sc->node, "clock-frequency", &freq,  sizeof(freq));
 	if (rv <= 0) {
 		device_printf(sc->dev, "Cannot get output frequency: %d\n", rv);
 		return (ENXIO);
 	}
-	sc->def.freq = freq;
-
-	if (!sc->have_gpio)
-		return (0);
-
-	rv = GPIO_PIN_GETFLAGS(sc->def.gpio_pin->dev, sc->def.gpio_pin->pin,
-	     &flags);
-	if (rv != 0) {
-		device_printf(sc->dev, "Cannot get GPIO flags: %d\n", rv);
-		return (ENXIO);
-	}
-	if ((flags & GPIO_PIN_OUTPUT) == 0) {
-		flags |= GPIO_PIN_OUTPUT;
-		flags &= ~GPIO_PIN_INPUT;
-		rv = GPIO_PIN_SETFLAGS(sc->def.gpio_pin->dev,
-		    sc->def.gpio_pin->pin,  GPIO_PIN_OUTPUT);
-		if (rv != 0) {
-			device_printf(sc->dev, "Cannot set GPIO flags: %d\n",
-			    rv);
-			return (ENXIO);
-		}
-	}
+	def->freq = freq;
 
 	return (0);
 }
 
 
 static int
-clk_fixed_init_fixed_factor(struct clk_fixed_softc *sc)
+clk_fixed_init_fixed_factor(struct clk_fixed_softc *sc,
+    struct clk_fixed_def *def)
 {
 	int rv;
+	clk_t parent;
 
-	sc->have_clk = true;
-	sc->def.clkdef.id = 1;
-	sc->def.clkdef.parent_cnt = 1;
+	def->clkdef.id = 1;
+	def->clkdef.parent_cnt = 1;
 
-	rv = OF_getencprop(sc->node, "clock-mult", &sc->def.mult,
-	    sizeof(sc->def.mult));
-	if (rv <= 0)
+	rv = OF_getencprop(sc->node, "clock-mult", &def->mult,
+	    sizeof(def->mult));
+	if (rv <= 0) {
+		device_printf(sc->dev,
+		    "Cannot get 'clock-mult' property: %d\n", rv);
 		return (ENXIO);
-	rv = OF_getencprop(sc->node, "clock-div", &sc->def.div,
-	    sizeof(sc->def.div));
-	if (rv <= 0)
+	}
+	rv = OF_getencprop(sc->node, "clock-div", &def->div,
+	    sizeof(def->div));
+	if (rv <= 0) {
+		device_printf(sc->dev,
+		    "Cannot get 'clock-div' property: %d\n", rv);
 		return (ENXIO);
-
-	return (0);
-}
-
-static int
-clk_fixed_get_clk(struct clk_fixed_softc *sc)
-{
-	int rv;
-	clk_t parent;
-
-	if (sc->clk_done)
-		return (CLK_FIXED_OK);
-
+	}
 	/* Get name of parent clock */
 	rv = clk_get_by_ofw_index(sc->dev, 0, 0, &parent);
-	if (rv == ENODEV) {
-		/* clk is not yet available */
-		return (CLK_FIXED_NEW_PASS);
-	}
-
 	if (rv != 0) {
-		/* No property exist */
-		device_printf(sc->dev, "Cannot get parent clock: %d\n", rv);
-		panic("no clock"); /* XXX or return (CLK_FIXED_FAIL);  */
+		device_printf(sc->dev,
+		    "Cannot get parent clock: %d\n", rv);
+		return (ENXIO);
 	}
-
-	sc->def.clkdef.parent_names = malloc(sizeof(char *), M_OFWPROP,
-	     M_WAITOK);
-	sc->def.clkdef.parent_names[0] = clk_get_name(parent);
+	def->clkdef.parent_names = malloc(sizeof(char *), M_OFWPROP, M_WAITOK);
+	def->clkdef.parent_names[0] = clk_get_name(parent);
+	def->clkdef.parent_cnt = 1;
 	clk_release(parent);
-	sc->clk_done = true;
-	return (CLK_FIXED_OK);
+	return (0);
 }
 
+
 static int
 clk_fixed_get_gpio(struct clk_fixed_softc * sc)
 {
+	uint32_t flags;
 	int rv;
 
 	if (sc->gpio_done)
 		return (CLK_FIXED_OK);
 
 	rv = gpio_pin_get_by_ofw_property(sc->dev, sc->node, "enable-gpios",
-	    &sc->def.gpio_pin);
+	    &sc->gpio_pin);
 	if (rv == ENOENT) {
 		/* No property exist */
 		sc->gpio_done = true;
@@ -327,6 +319,26 @@ clk_fixed_get_gpio(struct clk_fixed_softc * sc)
 		sc->gpio_done = true;
 		return (CLK_FIXED_FAIL);
 	}
+
+	/* Configure GPIO pin to output */
+	rv = GPIO_PIN_GETFLAGS(sc->gpio_pin->dev, sc->gpio_pin->pin,
+	     &flags);
+	if (rv != 0) {
+		device_printf(sc->dev, "Cannot get GPIO flags: %d\n", rv);
+		return (CLK_FIXED_FAIL);
+	}
+	if ((flags & GPIO_PIN_OUTPUT) == 0) {
+		flags |= GPIO_PIN_OUTPUT;
+		flags &= ~GPIO_PIN_INPUT;
+		rv = GPIO_PIN_SETFLAGS(sc->gpio_pin->dev, sc->gpio_pin->pin,
+		    GPIO_PIN_OUTPUT);
+		if (rv != 0) {
+			device_printf(sc->dev, "Cannot set GPIO flags: %d\n",
+			    rv);
+			return (CLK_FIXED_FAIL);
+		}
+	}
+
 	sc->have_gpio = true;
 	sc->gpio_done = true;
 
@@ -366,6 +378,7 @@ clk_fixed_get_regulator(struct clk_fixed_softc * sc)
 		sc->reg_done = true;
 		return (CLK_FIXED_FAIL);
 	}
+
 	sc->have_reg = true;
 	sc->reg_done = true;
 
@@ -415,16 +428,13 @@ clk_fixed_new_pass(device_t dev)
 
 	/* Try to get and configure GPIO. */
 	rv = 0;
-	if (sc->have_clk && !sc->clk_done)
-		rv = clk_fixed_get_clk(sc);
-	if (rv == CLK_FIXED_FAIL)
-		goto fail;
 
 	if (sc->have_gpio && !sc->gpio_done)
 		rv = clk_fixed_get_gpio(sc);
 	if (rv == CLK_FIXED_FAIL)
 		goto fail;
 
+	/* Try to get  regulator. */
 	if (sc->have_reg && !sc->reg_done)
 		rv = clk_fixed_get_regulator(sc);
 	if (rv == CLK_FIXED_FAIL)
@@ -436,24 +446,6 @@ clk_fixed_new_pass(device_t dev)
 		return;
 	}
 
-	sc->clkdom = clkdom_create(dev);
-	KASSERT(sc->clkdom != NULL, ("Clock domain is NULL"));
-
-	rv = clknode_fixed_register(sc->clkdom, &sc->def);
-	if (rv != 0) {
-		device_printf(sc->dev, "Cannot register fixed clock.\n");
-		goto fail;
-	}
-
-	rv = clkdom_finit(sc->clkdom);
-	if (rv != 0) {
-		device_printf(sc->dev, "Clk domain finit fails.\n");
-		goto fail;
-	}
-
-	if (bootverbose)
-		clkdom_dump(sc->clkdom);
-
 fail:
 	sc->attach_done = true;
 	return;
@@ -464,18 +456,19 @@ clk_fixed_attach(device_t dev)
 {
 	struct clk_fixed_softc *sc;
 	intptr_t clk_type;
+	struct clk_fixed_def def;
 	int rv;
 
 	sc = device_get_softc(dev);
 	sc->dev = dev;
 	sc->node  = ofw_bus_get_node(dev);
-
+	memset(&def, 0, sizeof(def));
 	clk_type = ofw_bus_search_compatible(dev, compat_data)->ocd_data;
 
 	if (clk_type == CLK_TYPE_FIXED || clk_type == CLK_TYPE_GATED_FIXED)
-		rv = clk_fixed_init_fixed(sc);
+		rv = clk_fixed_init_fixed(sc, &def);
 	else if (clk_type == CLK_TYPE_FIXED_FACTOR)
-		rv = clk_fixed_init_fixed_factor(sc);
+		rv = clk_fixed_init_fixed_factor(sc, &def);
 	else
 		rv = ENXIO;
 	if (rv != 0) {
@@ -483,30 +476,27 @@ clk_fixed_attach(device_t dev)
 		goto fail;
 	}
 
-	rv = clk_parse_ofw_clk_name(dev, sc->node, &sc->def.clkdef.name);
+	rv = clk_parse_ofw_clk_name(dev, sc->node, &def.clkdef.name);
 	if (rv != 0) {
 		device_printf(sc->dev, "Cannot parse clock name.\n");
 		goto fail;
 	}
-
 	if (clk_type == CLK_TYPE_GATED_FIXED) {
 		/* Try to get and configure GPIO. */
 		rv = clk_fixed_get_gpio(sc);
 		if (rv == CLK_FIXED_FAIL)
 			goto fail;
 
-		/* Try to get and configure GPIO. */
+		/* Try to get and configure regulator. */
 		rv = clk_fixed_get_regulator(sc);
 		if (rv == CLK_FIXED_FAIL)
 			goto fail;
-
-		if (!sc->gpio_done || !sc->reg_done)
-			return (0);
 	}
+
 	sc->clkdom = clkdom_create(dev);
 	KASSERT(sc->clkdom != NULL, ("Clock domain is NULL"));
 
-	rv = clknode_fixed_register(sc->clkdom, &sc->def);
+	rv = clknode_fixed_register(sc->clkdom, &def);
 	if (rv != 0) {
 		device_printf(sc->dev, "Cannot register fixed clock.\n");
 		rv = ENXIO;
@@ -522,12 +512,14 @@ clk_fixed_attach(device_t dev)
 
 	if (bootverbose)
 		clkdom_dump(sc->clkdom);
-	sc->attach_done = true;
+
+	if ((sc->have_gpio == sc->gpio_done) && (sc->have_reg == sc->reg_done))
+		sc->attach_done = true;
 	return (0);
 
 fail:
-	OF_prop_free(__DECONST(char *, sc->def.clkdef.name));
-	OF_prop_free(sc->def.clkdef.parent_names);
+	OF_prop_free(__DECONST(char *, def.clkdef.name));
+	OF_prop_free(def.clkdef.parent_names);
 	return (rv);
 }
 
@@ -547,5 +539,3 @@ DEFINE_CLASS_0(clk_fixed, clk_fixed_driver, clk_fixed_methods,
 EARLY_DRIVER_MODULE(clk_fixed, simplebus, clk_fixed_driver, 0, 0,
     BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE);
 MODULE_VERSION(clk_fixed, 1);
-
-#endif

From nobody Mon Nov 23 20:44:23 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYHx42JBgz71WnQ
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 20:44: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYHx4020Zz4jSq
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 20:44:24 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795466664;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=M3Q5rCyvhppfK1bE+CYBwyr1uAq9UDDgyFajiHx2nWU=;
	b=xfgHoGZ2YVc13Do8GCatRvs3j+pBg2II7LpbkOf8eNBqwiEUvCUekE6wlp7wHRyEmgBoDK
	5nYpuSD7XWcDXIeh9B8FsWJ83vO4e3BHJV/M/9P5h/qxxdsrU/hvdf1DVNA1pbtZ2FYOsm
	WH0AMKNX+3ij/BBUugBrngHExXiTBlb0/N+sqrBDl2uEJTOCXmVEHTrpjXQa5e8LvC46B1
	s6+aRNezCjImKkYeUxyyyqLeItlrIRu0oLEMck96VQTE2JFwKejbT/HkLfZB5z9X1w61qq
	H/Q0uUdnZ4+1j7+Cn8cloM0Esf22crMOtuK7l1Wh3YM8hzr053Sb26o5JisQyg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795466664;
	b=kHcQ6+2lcDQu48JJflDOVcKwUjHUsRxvGO6rusO8qWgjnMAAt5MpQawAg3oorRr7A0YPyg
	BYcaYZv51omBIPOefzQTNKl2t5m7+eDqT2kbID6WH3NKyegTzFlTDjW4VnSRw5ut+bDC9W
	Hrzmyss3cUfEUh8IHhZ/Pl1O7sF00pQVW5+GUCDEn4llWB7N7fl/GrPZ6OqprQ5+CRHYJ+
	ZuMWIhCq1S7He/73alHS/rh9FWBxPLkQkDk/QTvLKkE13e03tZVOQq9Twc/HCBcqMyTzZi
	2T9YhDCOOZahjSDtQ3PccPvhLPwAIxjk7i725R7UbWa+RgH3nT19M8chiGr1Sw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795466664;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=M3Q5rCyvhppfK1bE+CYBwyr1uAq9UDDgyFajiHx2nWU=;
	b=UbjcDpKBc0obQa9MHFUVOcUuknzKucxDiNPCGIu41YECZUV08cwb8hxaIqASq5JcEcmWiO
	ocrD662ssq36RVotd1DIMPe3YYlHmeNMnKw14oJnKNG20cLLXH9lxSLSh08C093Qf7KZqO
	hwvgIYWA3t4aPmf4vNn3gx9WzfnY9sjno0tZAyHc7eM3zwnOrq+9GC2tO8gExQhNOx2GFv
	O8ix4hXgfd/8x8gKL+PVD/a7vDXc2xMUMuBowephjE6xZNxgPzWoCFaaE4JYG/V36dsP4I
	xDgs7n/hwpZqXFsyi0ZIyau3hxJaWtE/DAXuxzXlLEhXRDOjxcoBrrV9/Av99w==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYHx36px3z15xp
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 20:44:23 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 16800
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 20:44:23 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Olivier Certner <olce@FreeBSD.org>
Subject: git: a6e81841486a - main - libkern: Bitfield extraction: Stick to standard, separate sign extension
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: a6e81841486aee1981d356040c597c79efaa4432
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 20:44:23 +0000
Message-Id: <6b04a5a7.16800.4e07623a@gitrepo.freebsd.org>

The branch main has been updated by olce:

URL: https://cgit.FreeBSD.org/src/commit/?id=a6e81841486aee1981d356040c597c79efaa4432

commit a6e81841486aee1981d356040c597c79efaa4432
Author:     Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2026-11-17 12:38:06 +0000
Commit:     Olivier Certner <olce@FreeBSD.org>
CommitDate: 2026-11-23 20:35:54 +0000

    libkern: Bitfield extraction: Stick to standard, separate sign extension
    
    Rename signed_extend32() and signed_extend64() to
    extract_signed_bitfield_32() and extract_signed_bitfield_64()
    respectively, as these names more clearly describe what these functions
    are doing and to make room for functions really doing sign extension.
    
    Change implementation of extract_signed_bitfield_32() and
    extract_signed_bitfield_64() to stop relying on GCC/clang-specific
    implementation-defined behavior on right shifts of negative integers.
    They now rely on two-complement arithmetic, which all machines we
    support do, and which is the future direction for C (it is a requirement
    since C23).
    
    While here, separate the sign bit extension into sign_extend_32() and
    sign_extend_64() respectively, as these could be useful on their own in
    addition to serving to implement extract_signed_bitfield_32() and
    extract_signed_bitfield_64().
    
    Reviewed by:    fuz
    MFC after:      1 week
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D61762
---
 sys/dev/iicbus/sensor/tmp461.c |  2 +-
 sys/sys/libkern.h              | 65 ++++++++++++++++++++++++++++++++++++++----
 2 files changed, 60 insertions(+), 7 deletions(-)

diff --git a/sys/dev/iicbus/sensor/tmp461.c b/sys/dev/iicbus/sensor/tmp461.c
index 90a0a7047cdb..d30230ee7da3 100644
--- a/sys/dev/iicbus/sensor/tmp461.c
+++ b/sys/dev/iicbus/sensor/tmp461.c
@@ -263,7 +263,7 @@ tmp461_read_temperature(device_t dev, int32_t *temperature, bool remote_measure)
 		goto fail;
 
 	data -= offset;
-	*temperature = signed_extend32(data, 0, 8) << 4;
+	*temperature = extract_signed_bitfield_32(data, 0, 8) << 4;
 
 	if (remote_measure) {
 		if (sc->conf & TMP461_REMOTE_TEMP_DOUBLE_REG) {
diff --git a/sys/sys/libkern.h b/sys/sys/libkern.h
index 64b1688fe768..0ce0e0c483f0 100644
--- a/sys/sys/libkern.h
+++ b/sys/sys/libkern.h
@@ -295,20 +295,73 @@ rindex(const char *p, int ch)
 	return (strrchr(p, ch));
 }
 
+/*
+ * Returns a sign extension of 'val' from its 'sign_idx_bit'.
+ *
+ * All bits above 'sign_idx_bit' are set to 0 or 1 accordingly.
+ */
 static __inline int64_t
-signed_extend64(uint64_t bitmap, int lsb, int width)
+sign_extend_64(uint64_t val, int sign_bit_idx)
 {
+	uint64_t sign_bit_mask;
 
-	return ((int64_t)(bitmap << (63 - lsb - (width - 1)))) >>
-	    (63 - (width - 1));
+	KASSERT(0 <= sign_bit_idx && sign_bit_idx < sizeof(val) * 8,
+	    ("%s: Sign bit index %d out of range.", __func__, sign_bit_idx));
+
+	sign_bit_mask = 1ull << sign_bit_idx;
+	return (-(sign_bit_mask & val) | ((sign_bit_mask - 1) & val));
 }
 
+/* See 64-bit version above. */
 static __inline int32_t
-signed_extend32(uint32_t bitmap, int lsb, int width)
+sign_extend_32(uint32_t val, int sign_bit_idx)
+{
+	uint32_t sign_bit_mask;
+
+	KASSERT(0 <= sign_bit_idx && sign_bit_idx < sizeof(val) * 8,
+	    ("%s: Sign bit index %d out of range.", __func__, sign_bit_idx));
+
+	sign_bit_mask = 1u << sign_bit_idx;
+	return (-(sign_bit_mask & val) | ((sign_bit_mask - 1) & val));
+}
+
+/*
+ * Extract signed bitfield.
+ *
+ * Extract value of bitfield in 'bitmap' that starts at least-significant bit
+ * 'lsb' and with number of bits 'width', sign extending the result.
+ */
+static __inline int64_t
+extract_signed_bitfield_64(uint64_t bitmap, int lsb, int width)
 {
+	KASSERT(0 <= lsb && lsb < sizeof(bitmap) * 8,
+	    ("%s: Bitfield start index %d out of range.", __func__, lsb));
+	KASSERT(width > 0, ("%s: Bitfield width %d not strictly positive.",
+	    __func__, width));
+	KASSERT(width <= sizeof(bitmap) * 8,
+	    ("%s: Bitfield too wide (width %d).", __func__, width));
+	KASSERT(lsb + width <= sizeof(bitmap) * 8,
+	    ("%s: Bitfield overflows bitmap (last bit index %d).", __func__,
+	    lsb + width - 1));
+
+	return (sign_extend_64(bitmap >> lsb, width - 1));
+}
 
-	return ((int32_t)(bitmap << (31 - lsb - (width - 1)))) >>
-	    (31 - (width - 1));
+/* See 64-bit variant above. */
+static __inline int32_t
+extract_signed_bitfield_32(uint32_t bitmap, int lsb, int width)
+{
+	KASSERT(0 <= lsb && lsb < sizeof(bitmap) * 8,
+	    ("%s: Bitfield start index %d out of range.", __func__, lsb));
+	KASSERT(width > 0, ("%s: Bitfield width %d not strictly positive.",
+	    __func__, width));
+	KASSERT(width <= sizeof(bitmap) * 8,
+	    ("%s: Bitfield too wide (width %d).", __func__, width));
+	KASSERT(lsb + width <= sizeof(bitmap) * 8,
+	    ("%s: Bitfield overflows bitmap (last bit index %d).", __func__,
+	    lsb + width - 1));
+
+	return (sign_extend_32(bitmap >> lsb, width - 1));
 }
 
 /* fnmatch() return values. */

From nobody Mon Nov 23 20:44:25 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYHx524hnz71WYr
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 20:44: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYHx50Mtbz4jcF
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 20:44:25 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795466665;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=6XHp5Opy3X1EmhFXys25EnDrRf/WRVvWH9rx3Lqir74=;
	b=OXBv3Rpl/pKZSr+ta/dMGrcPVWlov+mj2SOjFInbWATDwkWEJhe0xp49c7hXckn215i791
	MeoeRZ4yFb11YPQA+vR/KMzGSRJVHBCUK4psOM/UTyRT9SFrAC/4mp84Pp3ieqMYbjV03X
	QxxTGwOanJ49QTIHg7GLSLMBMIxHz9ogm6bU1AW9a3BEavXz3JgaoU1hiaK+MLpI8JQ/25
	PaNZ3bkLjj3kuxfuRi1t+L4JEWJtaoMnKOhZ3YDzgawoasG8hxap0mqzO89UBELM36BOow
	Dkd0dwwiasIqwpnZB4Y/P8rSAyEacuKQLrO0rhZmb9zE+RHT/q1z5WP6UzC96w==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795466665;
	b=ijD8lcVJB2XgavVweGG2ck2fIK9PE/55aLtMlsoPRPuws1r7/vyPMYb0yIwM43DnZbb8D8
	z3XE32xdTVDQ9ZdfJwNQ8A24Wwxgv/MyqM7hEUjys70kRSeCdv5wG/jMJ0tviBNLZ74ZtI
	HzKQ2oeIvZELZ1P/3y4iJeQEubucpthi2nXG5Y1iaKy0qeEocndfbw6ZuedXo5nB6HB1Gs
	tKCJguTS9iQyETKjYfBYKio1nbab4i8HX7FvUqgNvyuUD/g2IfXffBHXt8eLsB9EgODXlR
	O8ljNnB0BBfuv1UfKnNifuH784BVW15Yxw3b4kDto3Ghm3SstdNy+hOnkiu+lw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795466665;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=6XHp5Opy3X1EmhFXys25EnDrRf/WRVvWH9rx3Lqir74=;
	b=Gpx9X2lNNlPajGT6Xz2IYbT90nlWHyKw/bKHYKWGb2EVXlnY/DPFcNGMNpLQD+Yl03FfXG
	7zpaFq/uLtaz4069yBVCHWsC8PFAdNwetLFLlO3aBAwW/ApLQurnQnyuCm8ed2Pg0nzykh
	FuSTwhfKQVofaEN9uxGztlnGUOlwQKPt16A236vm/nWRhqxoif0MrOk+9Oweaq+RnzgfF/
	2acvIbjRNjLN+7vOUEpuO3QodhOxsVubSb4SF5hItdM8wr6hyGWqsY4ja835IJhFRW8nVu
	X0liex4WuzR/eI4Y8yFG11YzaWfNvIIEU1moHBJ+qv+AJnYnvB6HBFi3+5cVeQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYHx5027Lz16Rk
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 20:44:25 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 13675
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 20:44:25 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Olivier Certner <olce@FreeBSD.org>
Subject: git: cbd81362ef0a - main - libkern: Remove remnants of inlined memset()
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: cbd81362ef0add740aa91a76c19b1fa538ffced4
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 20:44:25 +0000
Message-Id: <6b04a5a9.13675.253b2e0@gitrepo.freebsd.org>

The branch main has been updated by olce:

URL: https://cgit.FreeBSD.org/src/commit/?id=cbd81362ef0add740aa91a76c19b1fa538ffced4

commit cbd81362ef0add740aa91a76c19b1fa538ffced4
Author:     Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2026-11-20 14:24:03 +0000
Commit:     Olivier Certner <olce@FreeBSD.org>
CommitDate: 2026-11-23 20:43:11 +0000

    libkern: Remove remnants of inlined memset()
    
    Fixes:          97e898489390 ("libkern: tidy up memset")
    MFC after:      1 week
    Sponsored by:   The FreeBSD Foundation
---
 sys/sys/libkern.h | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/sys/sys/libkern.h b/sys/sys/libkern.h
index 0ce0e0c483f0..b527a801411b 100644
--- a/sys/sys/libkern.h
+++ b/sys/sys/libkern.h
@@ -38,11 +38,6 @@
 #endif
 #include <sys/kassert.h>
 
-#ifndef	LIBKERN_INLINE
-#define	LIBKERN_INLINE  static __inline
-#define	LIBKERN_BODY
-#endif
-
 /* BCD conversions. */
 extern u_char const	bcd2bin_data[];
 extern u_char const	bin2bcd_data[];

From nobody Mon Nov 23 21:11:59 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYJXv30N1z71b1h
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 21:11: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYJXv2L1nz4pyB
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 21:11:59 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795468319;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=j9qBJrl0Wjj7mBvLeExcARkWvciYf4fYP6JCuuRxeDg=;
	b=Y2lBKMJJf2dJ8GTClsMTLrEneKC0JEyeWF0/tGvMfvO8OdFFXlx3cabNp9SnPqEB1Hff97
	d7p6HuscnKWgn+9FpGzmXCBClV/wShHT0cHRwdJtb+VtIm7+uOgPSOEfkexmOC2seyUsuR
	0J2hKc3PwPll3UnK1rwzs2I0U32JTyl69VWslf59aKCpx2RBPnaQQ6RekOlYroZJWcZZi7
	Cy15alUquQOPU5LOBPx9HUyCgKJTxCC8hfykii+dUK9tPJOa2b310lMiKbA2S2Mm3G1qFB
	4mv8SK3foXGc7DWz/oqaFijmkbzlZrm1sbiMa7AJxiAFkbR6B4GY1rES6MvQiA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795468319;
	b=PNaW5ge+EYf09IEpvpUDRHjyc42D2qgAeMgZCQ+sLBr1QIMyC8VRz5MOpNw/mgOdjWVrKf
	VIcLTAcxNf0aaZ4FVpsLTESW2/CxiowAjVubW4eVBZh9I+yDRUan+E9uC0qjzUOK8yGUSZ
	EX1qBtgyEdJt+3bzpEH7Ao4x5uceGOYEriQt7rAstjCk5DGt98YBE0ePXLJwmlvZtYOjnH
	kw60kUbUzNtMtE5Iv+/Bv/6KKdoghcBd/JkmlPrFhXeqag5BxlWwEHk4cTkORGJIFTOBPN
	DH3+EjgKg2DqKEtLxQcgRSlVrTKdUqN6bRJhD+rZA/rMUJr6K13NnNEt5TTXDQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795468319;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=j9qBJrl0Wjj7mBvLeExcARkWvciYf4fYP6JCuuRxeDg=;
	b=j5Y/LNV0ShMjyGvAA0BBYx8rNHlEbeRVk4X7z0tFo6zoMShxwMfquqVA6cVujvIFKuy+IH
	olVSJuprRrGbimkBxOHYQKMkLpt3PF/ff44oGqzPxWYRGVDPlT3YIQWKNcEByQMzazLRT4
	7A/rbzUWs3CIPd8ZRff3DpI9esWswyVeJNz9iXGwjShRNQHmMILjpYfh2yR69BeXRNJ8+s
	5LyyhznKelUcU2jiko7TvLu5PTqmhAsmQGE2d+L8MTXbrolnxGRyH6zTQWKy7U4K1mZJ8X
	Y8iuUBbHFfUKchT+7fKtwPF8Rp7wsXAtc+/1wqhhSo21A4ZAqmqcpjuLmhpWPw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYJXv2129z178W
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 21:11:59 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1908a
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 21:11:59 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Gleb Smirnoff <glebius@FreeBSD.org>
Subject: git: aa2d724164c7 - main - Revert "mii: call only PHY_STATUS() from mii_pollstat()"
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: aa2d724164c7b1dd83771ec7094880ae2525c9d7
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 21:11:59 +0000
Message-Id: <6b04ac1f.1908a.32df7ce1@gitrepo.freebsd.org>

The branch main has been updated by glebius:

URL: https://cgit.FreeBSD.org/src/commit/?id=aa2d724164c7b1dd83771ec7094880ae2525c9d7

commit aa2d724164c7b1dd83771ec7094880ae2525c9d7
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2026-11-23 21:11:04 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2026-11-23 21:11:28 +0000

    Revert "mii: call only PHY_STATUS() from mii_pollstat()"
    
    This regressed bge(4).  A different patch to be proposed.
    
    This reverts commit ef3c76fd2030a4c7d0f9c981b7129595398e3f21.
    
    PR:     290417
    PR:     301046
---
 sys/dev/mii/mii.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/mii/mii.c b/sys/dev/mii/mii.c
index 00bffe4dc546..b63bfb6285bb 100644
--- a/sys/dev/mii/mii.c
+++ b/sys/dev/mii/mii.c
@@ -613,7 +613,7 @@ mii_pollstat(struct mii_data *mii)
 		 */
 		if (IFM_INST(ife->ifm_media) != child->mii_inst)
 			continue;
-		PHY_STATUS(child);
+		(void)PHY_SERVICE(child, mii, MII_POLLSTAT);
 	}
 }
 

From nobody Mon Nov 23 21:13:05 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYJZ94l34z71bcP
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 21:13: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYJZ948sdz4r6f
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 21:13:05 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795468385;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=FCfj51ro2Q+8fuu63QJoFuGsILot1O7nZ4kK8tKuVBI=;
	b=eUpqelG/pT3cvi4qifmko7phspfB16g8ABQ+zOpJhT+P0IrmYH0x/wZH9GPkaZ9LyDkUTh
	a2EjOe2Tlt9nP7Fhmbv8Hxk53QschfpDqGDYxjLH4CKlUCofuCpPkYi0aLQQMPd50zPBA8
	H9Ya1Q8tGoUtgPLKn7Cq6JSu323VNAjmiZ5OpuvEJVmsKMRb8eVW6ALqwBAsEXRbc3Lvvq
	3X/455VARYt71r5l6E5pSI3glXB1wST7XGj9xr7S6CuFw1eLAh7qC8a8EWlLq3xnJ4LTVb
	l7ZlrZ01EKfz1SkB0PC0qDGnG2rIt9lOQyEIdIZcteb52393iCPDMzL/INbCLg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795468385;
	b=LgLur+swEkCaC2OTbnpKoCd2qPboX33c1a4Zl0z/sCsoWYzy0nMln7EIkh1Q8ogQt5RaEs
	T120spDPz0oAYskfeKmtwPSaMRB1Joskkw0/rCXnzYhgTddvhuoiovfc2ini+mhZbbOwBe
	y2WzYdhbNkjKo8KoDqGBMYdhivDlZm1QsEI/Q85rTslD+JyJohWSSsLK8717rdnfUIIofX
	couEdLqrUbpprqUSaBTKXQOGERAat5M8C9qVuMW8P95Q9T28C/Amt6tbSbt8nOH2wMo+Iv
	Is/TgEcGkWeE0DFsGpJQ696r2rjSiLkBRcWiCU9MuNLY1QBsLrc8HwRynqEGEw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795468385;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=FCfj51ro2Q+8fuu63QJoFuGsILot1O7nZ4kK8tKuVBI=;
	b=yzxlTgVRXH0gykcCrNq7PTapzMbKMcXuChngQW9sH7PVl8EJgmDlUle55PPYDpyycDN+oR
	Oh/aqN0o1C+FfVtmIggPTx75Rvk2/hFoflyZjftXq7isRlRyCBtOrKKJlB7hLdFrEpJKUY
	Zy8pQMJ4w03lObTPbKeaBwBsFltI3J7uIt9GGnDPQTIlg6VLnog6jbOqc72MFLnXU7mQvf
	2xobvg5L0cZbEJNSeqepTCemZQ8ucfOTpyj149lPQFX82Y8kV/kWuDM8jkTAmVBzDxxCOI
	tDCQ1OzAFySLm/bYwL8LT0mtTVCEiz6YfmS3Qj2YRiEqDEB3Ep3X2p4G6tnriA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYJZ93W1tz17dn
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 21:13:05 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 18b10
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 21:13:05 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org
From: Philip Paeps <philip@FreeBSD.org>
Subject: git: 27ac437388d2..118648c18487 - vendor/expat - vendor branch updated
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: philip
X-Git-Repository: src
X-Git-Refname: refs/heads/vendor/expat
X-Git-Reftype: branch
X-Git-Commit: 118648c18487368400b220ed8925ea73de337ffd
X-Git-Oldrev: 27ac437388d2f2c086aae13dfdf6fe61eb60528c
X-Git-Newrev: 118648c18487368400b220ed8925ea73de337ffd
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 21:13:05 +0000
Message-Id: <6b04ac61.18b10.78d533aa@gitrepo.freebsd.org>

The branch vendor/expat has been updated by philip:

URL: https://cgit.FreeBSD.org/src/log/?id=27ac437388d2..118648c18487

118648c18487 Vendor import of expat 2.11.0

From nobody Mon Nov 23 21:13:05 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYJZ96PJ3z71bZs
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 21:13: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYJZ94SMWz4rCh
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 21:13:05 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795468385;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=OGmrtbIIFCZ4IfXaBMSzg0Gi6zSYcrODEJ2X/EQRSME=;
	b=VA/PC/X/nyySTJ+OUcxBJUsR7IrpZHHUptCeF5uzDysc7r6ufarB8prZ+kNC+jky3d6FGt
	4VNsyUFBCr49kR0MUWq//4uvd/cYxZpWH3gAemZG6ULIq1irBxkGsMt/kif320Ua4XMSCZ
	JAG/F0XV5swsayXnEFFvuEW5hfRNcAkGnu0K30qpunLQMajHbmo6AeFoy1J5cvOqCvX7ZY
	jgLhL439wuyuyqsQky0W2qp6L+s0somq2l8XpAcjfblPm6ewKsW4VvZ4M1pVAobMzwxCeO
	qJMPc9F2wMYSxrbH/TgWalLUpXTVBKvE2t58rww1n/VYowjXrl81p40zjbzz3g==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795468385;
	b=X8FcN8s4/Xi5DlSLzMU+D46aS0pDvzrkJ3/3fyUK9Mf6PdTgKHzi9CMsS7v44Uf3rE6GZo
	7ttIV633C7lt6tFAwlCPERB/mJebmIkQzzic2jx1uZDbKxSfcq1l+bt37ig6dXg/7cYctu
	4yiGLEdkrn35WUM36Da8pdDBZxVqzl1Wx9ihpv6RPucUZeNXCXyfrswS71Nt3gaerTB/qR
	GsJv9Ls3ZriArIXSbFGKZCP8iD0j5q8xgMTe/16uNbKDoCulTp965YMo6qUd/tPZtZoo9A
	Msk0GiYNM6V7gJyoxvusq0EYLIQhtG3CHGWOG/LNzmveNb/tqENWEY6xPKPFrw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795468385;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=OGmrtbIIFCZ4IfXaBMSzg0Gi6zSYcrODEJ2X/EQRSME=;
	b=aD+yYEcxr4QfQO56S52Sgsc9FQ0N/V1edCZtwwjXkyM3til/kmMG+LTE8lxvp37ZXf2w2c
	jxcz4ceOaU/gbsVDAnkDcpuOz4TZsKpf/Iv3HgpY2jIHQXFTfLAHOQZ9IwIV8HEdUxryqZ
	aMbw0wf+AzfH/GW3s3ZqjMhDHmpVnIEsRw75upYs/Fh79hchlBjGpplsJZyKA8xI5BUGHj
	YSjbtAdy5S2+jeUfWNHEsF1NdVQf2rAwoONzG6tDWDkDklfdGYIQ1TdbWhhAMI5l7iVE1W
	lt4rz0eyyIS5QMrL2jWfH7dcHf7iAWMRQsB2OQZkHKG3o1IyDAIywEPFCFv1XQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYJZ93r0cz17S8
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 21:13:05 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 18ce3
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 21:13:05 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org
From: Philip Paeps <philip@FreeBSD.org>
Subject: git: d5ce4ae5cee6 - Create tag vendor/expat/2.11.0
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: philip
X-Git-Repository: src
X-Git-Refname: refs/tags/vendor/expat/2.11.0
X-Git-Reftype: annotated tag
X-Git-Commit: d5ce4ae5cee673cb8518a6557b446766aed232b9
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 21:13:05 +0000
Message-Id: <6b04ac61.18ce3.3421f5c2@gitrepo.freebsd.org>

The annotated tag vendor/expat/2.11.0 has been created by philip:

URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/expat/2.11.0

tag vendor/expat/2.11.0
Tagger:     Philip Paeps <philip@FreeBSD.org>
TaggerDate: 2026-11-23 21:12:14 +0000

Release 2.11.0 Mon November 23 2026

commit 118648c18487368400b220ed8925ea73de337ffd
Author:     Philip Paeps <philip@FreeBSD.org>
AuthorDate: 2026-11-23 21:12:14 +0000
Commit:     Philip Paeps <philip@FreeBSD.org>
CommitDate: 2026-11-23 21:12:14 +0000

    Vendor import of expat 2.11.0

From nobody Mon Nov 23 21:47:12 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYKKY0DHSz71fWl
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 21:47: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYKKX6m9fz4vnn
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 21:47:12 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795470432;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=J3UZTCsRwstOxufmKKjLMRJJT4mX2/oxi2fZ/wZXoyg=;
	b=XKwommtnYuNkGNSOw9+I/JF5+fMgbmqPs3mcysgXYFWZROAxqyAIzwIdcRYuouJG82BWPh
	YH6NVLp8HEKayQC00lBX81hlM4fsfCgUNwhnh8DZAc0uY2YZi/XdUQrGxesCf/G+ZJFpc/
	hLO0/E/Y9HJx+8xDPeWE2GEy0z7dfWHxrPrKI3XwK1LvidwVllvMuWVxUKrm2V+kxqikxe
	LwBlcsoJdO5SXpNNxd5LTFSGj0G2LtNkpieVu/ve23CzUNE37kwYMUD1/LHHtS/zymgsTV
	EqlonRGdUpRYloVTStIW7yZqDfn4bCIIsR/eLx3O43OSezMLGCfMTS42hviuXw==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795470432;
	b=yx9AWMArEygdXj6IMg/6Qj0Rz4kfSweRp36SXctPXtnY6IbKr60nbey4lVVQckus0ijgAB
	HS9T2RFBIuxCmtHci1BO94T0d0rgibqvjR+CkKdinhna5P4AC6dQ3FTSXl8eQ9WwMgr9xZ
	Iw0rBLzXgPqJxALnyhaK9hbs3Rpn4FTxOfBX3HkcPpW1ojau1Oz5OWJmyS5TBW9sjFFXZ5
	Biu0+62l+2grWrq/vYxAG1YG9D3h5Qr213LSwO1tWd4ul9sHMtPt8R2kDGAVmP4E28HUnJ
	lKKVeRtZe9wON8k3GYEKHZqSSjnHcbo+lcgiV32pvRWXkdBidnElJDVz+P1cqg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795470432;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=J3UZTCsRwstOxufmKKjLMRJJT4mX2/oxi2fZ/wZXoyg=;
	b=Xt8CRTe72M0ZoZ++iIaf7APD2ONuDcyFCz8yJkxchOHv7Rn4vrLPD3H2nIs4EOMzNtAEGl
	QPyX7qw9A6hs8OJtfoXrfHNprYmlM1bUec3VM3oXY8xQ3p3XFHlcBH0PMhHheqpi4SKAmz
	GxBXjy27/PvF22Vzg7ee100yN1Z09YWJZFCRR3NueKwGso88TFQZlnae+/d2ela4gDD3Ai
	KJ0kGUbuI9S/d3F33A41cKiTpCByPoyjFHmfHnA5CDEm71zDgLpfYvdS0G6oJerG1Ymwbo
	/jLHj9flarPH0OCtSkMLF3dWCIzPKuSgbRxED96GfSrv2OjvXglEfGzfSHTG+Q==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYKKX68jDz18Kx
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 21:47:12 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1b839
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 21:47:12 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Gleb Smirnoff <glebius@FreeBSD.org>
Subject: git: 8f8c37d4b95a - main - linux(4): remove not needed <netinet6/ip6_var.h>
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: 8f8c37d4b95af5c5bfcb59d9ff72bc7460823bb2
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 21:47:12 +0000
Message-Id: <6b04b460.1b839.3f34e7af@gitrepo.freebsd.org>

The branch main has been updated by glebius:

URL: https://cgit.FreeBSD.org/src/commit/?id=8f8c37d4b95af5c5bfcb59d9ff72bc7460823bb2

commit 8f8c37d4b95af5c5bfcb59d9ff72bc7460823bb2
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2026-11-23 21:30:02 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2026-11-23 21:41:28 +0000

    linux(4): remove not needed <netinet6/ip6_var.h>
---
 sys/compat/linux/linux_socket.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c
index f2ed584d1f4c..fceac41a6b8c 100644
--- a/sys/compat/linux/linux_socket.c
+++ b/sys/compat/linux/linux_socket.c
@@ -55,7 +55,6 @@
 #ifdef INET6
 #include <netinet/icmp6.h>
 #include <netinet/ip6.h>
-#include <netinet6/ip6_var.h>
 #endif
 
 #ifdef COMPAT_LINUX32

From nobody Mon Nov 23 21:47:13 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYKKY715Rz71fWp
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 21:47: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYKKY6D81z4vnq
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 21:47:13 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795470433;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=tS5rKCLDx1OvnUpo+ZQt/NbgNkwqLb4nl99wkvHWkcc=;
	b=Jj6BsRftb6ePEPUVHe0yLz1Y+4QBeyF+PcC+6kye2Yygd8OVqNMJEKXk/jQo/S04J0jc1q
	RjTHYk9m+8C6z5svWOheSwVCBuCkaGBpfORqmu7YyEd84kUvFzY8RUHVKF/wlx6wD0vSre
	erh4bTa0/xEKgHoNO1mjyhuEsfzxI/2S18QF6SIhDSGcQmwORcXhBc+LUHaG9ida+pb/XG
	84CxUTX6Btgidwb9TTq1IFB0pJun0eV+T3xcFyzR5FPYFloDnE2qHzszw+hUUFuDOYdM+/
	furAonS4iL6zLz6VooATgtysiqo6hoI+xHbyK34xFSwSA+lfvyw12ndly4Az7A==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795470433;
	b=LfI/zAWg3PhyD6ZrQKz7ZSBS7eLxbclpHgiCQFZ/oetlwQ+dU/69SPk6ahXPJw8tpZuYxp
	isZEppTTSpKg/BZHIZFjMibTaiBfSt8GwmCh9BYSL6G29HAZnBipad3rEDBatV2XPJM0KS
	4TNOgegm6kolH69aYMvq260pdlZDwXCTNOtGq/nPN1s+/gjrIsFWBQQANXujoN7aB7fOBh
	9H4xUsNnqPyzaJqa0T+ydHgOb1hw8IBmg+VDOWKsQnhbCxkwy0r98PeV0WMnrUoa9dxGP8
	imrdpfzZpIkx03dBgKozTeLt7zuEwzomQcJKg7Ps+7LT029V3uvQhV3UbwXO/A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795470433;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=tS5rKCLDx1OvnUpo+ZQt/NbgNkwqLb4nl99wkvHWkcc=;
	b=VAR/JKA76cna9B69dUxewFF7317/UV1bbBskkSLEYbr/GKwu7dkOoy3CcOdfC6hbxRXF0q
	18PMGt34SGqh35jXRmAQ4bwiYItEuNRd87EpE90dbTV1cC+CRysTph6+wUqltOP9lXTHYR
	1E2I9Q1vM+7/tEYuWQqVEFT7SSxvZ2BJMwhqgcMDgR29WEU1CWdoJYQfnDsGS9xHQtqL+f
	TWaLzAJ4HJHA+GVi881Bk0CAj40qP68SBd8Ro7rTtN6qRhLGcT7t7EqU0D676+8WeBlJSP
	MC+FBIg3rvSO90ywEugIzH/uwzivp4+AHAnfq5xVSkJWd0GvghiSqcG8qyBD8w==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYKKY5tgJz18FH
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 21:47:13 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1ab76
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 21:47:13 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Gleb Smirnoff <glebius@FreeBSD.org>
Subject: git: a5c4d3aa4837 - main - enic(4): remove not needed <netinet6/ip6_var.h>
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: a5c4d3aa4837d3e8bf90e25dcbe54332ed5a5273
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 21:47:13 +0000
Message-Id: <6b04b461.1ab76.412e8605@gitrepo.freebsd.org>

The branch main has been updated by glebius:

URL: https://cgit.FreeBSD.org/src/commit/?id=a5c4d3aa4837d3e8bf90e25dcbe54332ed5a5273

commit a5c4d3aa4837d3e8bf90e25dcbe54332ed5a5273
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2026-11-23 21:31:20 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2026-11-23 21:41:28 +0000

    enic(4): remove not needed <netinet6/ip6_var.h>
---
 sys/dev/enic/enic_txrx.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sys/dev/enic/enic_txrx.c b/sys/dev/enic/enic_txrx.c
index 169041587d06..3d15e6bc209d 100644
--- a/sys/dev/enic/enic_txrx.c
+++ b/sys/dev/enic/enic_txrx.c
@@ -36,7 +36,6 @@
 #include <netinet/in.h>
 #include <netinet/ip.h>
 #include <netinet/ip6.h>
-#include <netinet6/ip6_var.h>
 #include <netinet/udp.h>
 #include <netinet/tcp.h>
 

From nobody Mon Nov 23 21:47:14 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYKKb39f8z71fWv
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 21:47: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYKKZ6hcYz4vp0
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 21:47:14 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795470434;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=DhCfZioswHuyfc0KSiG7+2lsEpjkP/xjDgv2jGMsVO4=;
	b=CocSJAYhnUOJNk/lE7iFz7tw26hQeOAp5ui5citTuK5cCxKJbcRzeQuLfnF2bbjKMKneX3
	OpM7F9lEJjSVi6+LNF44fZW29qvNrkjT73Nu3tSbc5Z0TPvAvU2MFCUZ8s1EHox88BWtud
	UpHLJqKBhCbERmhgd7XVMcPKBvm+MdLy9uwNmWOt8EjA5xeSgkglSz8lk15VKmLy/im3Fa
	VMGfyJyQ1jUuoa/SQGDSGVFF2xH3vYJSM27VjwwrJWPqu5gTsrdwSRGkKZRt/ZtkZHOHsX
	PlTVBNT6QcOYKn499R29gmQg2SDBuSNytDYH5uEcMKsb8idgNhm+NJh7NYhIwQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795470434;
	b=fuK0lds1cVa7ZgYPYPL0teI6AGNaF+8PXswDBjfjoeHO93Wk2/n0kiMyzMAWp2RaWQjQ1L
	hTdF+Z/XgrcEgkCLjoU4iomgNKcdM0gSPaK97CUb4VUvYH/6lIyPJFDr+q2dIlrW1OkGYA
	ipWi8j7We23gW4XN3HLuGuN+NsHOj2B2FaaUDIS5zXXQfm6uwugsRn6XjkcvZC6KYKlpwS
	e7yTeTyoNanF+bK1IWFeDKH7ejc9Re/lVRaCVm9D+XFTvCJlxKkZoqM3ZYIVL8LPHCJJky
	jALRobw4nITdIzOjmDvw3RsblKi7XVQESAyruYI7PAjY0AKQe3QSFDEl5egcjg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795470434;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=DhCfZioswHuyfc0KSiG7+2lsEpjkP/xjDgv2jGMsVO4=;
	b=yBJ8L1jgFsmRqghvb6FSGTxtBt/Xih3RZU+xI/E2TO+JxwKIveopBI6hQZlzLnIej7Sk06
	reVx1OCh1+tEVRFk1zotdZoej709rKgnFa4V+oJrXY/xSjL/kyXxbte4wBhmrvwlDoEMji
	hRJ4DeRk5YRlDx9hnYXb2zQaL6C382As+K/XCXocOTKZuQ7PvxiEU5V7umOZ3gWLp1YY2I
	UNFUivFi9Ws/NiakyRSPUrINJ6DXsJOnvlFr354cBi0oxNpOYpasZDjcmezLtYuzGJoXGj
	bUtolplv2QLQ8rn+bDD/oU05FqDqTHpA+eb3TH2yLd+plXk89r1KCs9MRzlLUg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYKKZ6FC5z18DF
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 21:47:14 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 19cca
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 21:47:14 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Gleb Smirnoff <glebius@FreeBSD.org>
Subject: git: d1e76c3c7dc9 - main - vmx(4): remove not needed <netinet6/ip6_var.h>
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: d1e76c3c7dc94a4ff8361b84224734d99940d3bd
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 21:47:14 +0000
Message-Id: <6b04b462.19cca.d1c65f6@gitrepo.freebsd.org>

The branch main has been updated by glebius:

URL: https://cgit.FreeBSD.org/src/commit/?id=d1e76c3c7dc94a4ff8361b84224734d99940d3bd

commit d1e76c3c7dc94a4ff8361b84224734d99940d3bd
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2026-11-23 21:31:56 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2026-11-23 21:41:28 +0000

    vmx(4): remove not needed <netinet6/ip6_var.h>
---
 sys/dev/vmware/vmxnet3/if_vmx.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sys/dev/vmware/vmxnet3/if_vmx.c b/sys/dev/vmware/vmxnet3/if_vmx.c
index 3409f80a7919..7d726cffc5d4 100644
--- a/sys/dev/vmware/vmxnet3/if_vmx.c
+++ b/sys/dev/vmware/vmxnet3/if_vmx.c
@@ -52,7 +52,6 @@
 #include <netinet/in.h>
 #include <netinet/ip.h>
 #include <netinet/ip6.h>
-#include <netinet6/ip6_var.h>
 #include <netinet/udp.h>
 #include <netinet/tcp.h>
 

From nobody Mon Nov 23 21:47:15 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYKKc2fvBz71fjK
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 21:47:16 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYKKb6xGWz4vWq
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 21:47:15 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795470436;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=9v4kmAcgSnexmKRVIQOtDvRQPfWrXYZUVM5kj46Rr7E=;
	b=bffCi91bN3NgWXcMNkuu6/Z0CoLl0crZFenHGEpbiNtKUSpFV+TmAkwZcFERtfrk7ZglIz
	BLTtiGEVG+rO63Wohh+iWluDg16FKn3gUzg6Jl974+Py5gx0meW4z0GZh87nvgKFV16wBy
	jhCs+8jcgbzk9JiFKlsYov9MqGWyWf71sqkr0MJQER+gxFFyFffaD7DSf6d2BJli0sqSLZ
	i6tdPXRPDwdUO7K6zBbj8ANJTgrhqxO1+ReAn2+e+UaGC7GoiC93IjnrscyvdzcHGyGmXN
	PGztk75wGk0oj8lrq91ep/qLkVpPoJn60OHapCUsAqAVW5kB+fyW418qzuBKqg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795470436;
	b=ytTpJGVgeUyDbSIaTiTPpVwyWvvPFS2C2WUCM0gu2Cw7wrMl8uvrctQBtDO3JE4amUrOmx
	qtymSU0aR7qm/fHGkhuj7tK0BKSpSIGyfofKVbltOFfCrzpYb0ID7fZ0OvCaOf+QVEtbw0
	M64dGZ3XUFsuwGvKmmQlWP0JQPRfPToXuHrr+J2cDB0B7y48SeHMOdLfunmYuSV+A7dkFA
	AVqdz/tlnTaDXAQzVuuYCBRWnJLGY3GbLT20V5HRBVrahNpXoXHCyqgneE+kgfovpQRkzY
	qAulethvHDSdzWiio/7qD9LwvwbaMOLc/4hHVbqULluiXcVXxguONlOD/xDD/g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795470436;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=9v4kmAcgSnexmKRVIQOtDvRQPfWrXYZUVM5kj46Rr7E=;
	b=v2pFnQqobYfwx3jFY5IJmPOos/N2TGxmauSsDJwkPqvdtEuq6sy2gsr8zz0aDIUORGX17B
	UjjjepBny4aguNpw1X5A1AISgXUlz7QpKnAsR+dDdSwybqqXh03sU2y3IprowEUvHD6Veh
	ydyaODzvQdCIRKkZjsCwU1ApeLogcUrqrbTfkgnaGkYVRkDp0YX2bs3LueTTGgqxffkk/I
	S2obOPx/t6h7Lb5wU5p9yuUN6sdxiKaCoxNSHwAy93XwxXtFsjUdkcIFz6drsUZlYAyS/d
	zFeIr+kPN0UiY/aLVEcOH8bNYl0B26VIAlSoOO3Ei1C0w5ZJKTrgAsig4DZmPQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYKKb6bhPz18W9
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 21:47:15 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1bda3
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 21:47:15 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Gleb Smirnoff <glebius@FreeBSD.org>
Subject: git: d1b36c55744a - main - ipsec(4): remove not needed <netinet6/ip6_var.h>
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: d1b36c55744af5647da35c9c89340e267ee43a8a
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 21:47:15 +0000
Message-Id: <6b04b463.1bda3.2105c675@gitrepo.freebsd.org>

The branch main has been updated by glebius:

URL: https://cgit.FreeBSD.org/src/commit/?id=d1b36c55744af5647da35c9c89340e267ee43a8a

commit d1b36c55744af5647da35c9c89340e267ee43a8a
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2026-11-23 21:32:29 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2026-11-23 21:41:28 +0000

    ipsec(4): remove not needed <netinet6/ip6_var.h>
---
 sys/netipsec/ipsec_offload.c | 1 -
 sys/netipsec/xform_ah.c      | 1 -
 sys/netipsec/xform_esp.c     | 1 -
 sys/netipsec/xform_ipcomp.c  | 1 -
 4 files changed, 4 deletions(-)

diff --git a/sys/netipsec/ipsec_offload.c b/sys/netipsec/ipsec_offload.c
index e3a9d3247491..d3d295f999f2 100644
--- a/sys/netipsec/ipsec_offload.c
+++ b/sys/netipsec/ipsec_offload.c
@@ -49,7 +49,6 @@
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
 #include <netinet/ip6.h>
-#include <netinet6/ip6_var.h>
 #include <netinet/in_pcb.h>
 #include <netinet/tcp_var.h>
 
diff --git a/sys/netipsec/xform_ah.c b/sys/netipsec/xform_ah.c
index 832554b0f514..ec1e24023fde 100644
--- a/sys/netipsec/xform_ah.c
+++ b/sys/netipsec/xform_ah.c
@@ -65,7 +65,6 @@
 #include <netipsec/xform.h>
 
 #ifdef INET6
-#include <netinet6/ip6_var.h>
 #include <netipsec/ipsec6.h>
 #include <netinet6/ip6_ecn.h>
 #endif
diff --git a/sys/netipsec/xform_esp.c b/sys/netipsec/xform_esp.c
index 1212cfe27132..b61993920117 100644
--- a/sys/netipsec/xform_esp.c
+++ b/sys/netipsec/xform_esp.c
@@ -69,7 +69,6 @@
 #include <netipsec/xform.h>
 
 #ifdef INET6
-#include <netinet6/ip6_var.h>
 #include <netipsec/ipsec6.h>
 #include <netinet6/ip6_ecn.h>
 #endif
diff --git a/sys/netipsec/xform_ipcomp.c b/sys/netipsec/xform_ipcomp.c
index 87bdf9eeb8e8..dfa1c136623e 100644
--- a/sys/netipsec/xform_ipcomp.c
+++ b/sys/netipsec/xform_ipcomp.c
@@ -61,7 +61,6 @@
 
 #ifdef INET6
 #include <netinet/ip6.h>
-#include <netinet6/ip6_var.h>
 #include <netipsec/ipsec6.h>
 #endif
 

From nobody Mon Nov 23 21:47:16 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYKKd22nHz71fX2
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 21:47:17 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYKKd0D1zz4vjf
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 21:47:17 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795470437;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=DIJIAdPbpIpYabEm3+y0qCV/bcOjtkvXQ2UEeR0g6hA=;
	b=YBURXfHlmL7UY9kYujOtC/GZWuC5v7TrgW8XzvwgeX4uO5QnxYw+TWg5g7bbmujbdUZOPg
	z5SNfUZko/Vz20Pzt85I/fDNJluDBupfkjR4b2fBreIMCptUzdEq/tkvu81OaS65QVkzv/
	aq7qmOdGrc3PJDSKzDUTpWEwynT1ABg4fkJkIKww1NaiMGDuz/7bN4/nWKnTSfkQsu2q1G
	6HGZnGFEgUJ7XuqGtFhgSDh4kt2d9ORY5UdopOGp2JLPyt1NzZKWEXOlcJBe9vqpUzN0nt
	tk0deVHQHU18q6dxmqX9WKjtncQPoEtW+DLDKjhOfVH6X/t4lVf+++txUpKt0g==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795470437;
	b=KHmKJtD17joqtaQxL+eUSCXZt0xAJqOgGaDlFGG4nPsSPEzE5MAoa9LYJedwsQIOq6cx+4
	8u/KjgeGDF7cP14PN9MIj/wz9rYvbSwaKZuY1LVypm5ly88uxnTLihfs+K1AxcYiSmESef
	wgPa4yv7SyQrn0k40FkbNxOmWCkmMGcpTy87Npm5gZLGZNdV1+w1EbqgXhVJOULYZ9R36n
	WOb4lE+r6yC9njyHyQ9tpux84zbPsVtzXxsNRUIKWDUZGxCxU/cIstlQnXjXJxsexUiqqD
	rRjMsgjgA1K3SVuJqJK/0UyW38aru1V82YgfETZbhOmh6l+VyX1s6RUTXRfKrQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795470437;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=DIJIAdPbpIpYabEm3+y0qCV/bcOjtkvXQ2UEeR0g6hA=;
	b=AhcdMC1YTE1W3MaPK5XEwBsgVSc6myRYPlHeNhlqxE1l+1zOHdJNE3cGaqJ7hfi/bRl67e
	BJPcngzjyFZeWUvfCFTw+EyMxa1ghY/YI/t8H+US0f073bLdU4Xn5JllQlXYFU1qFXK3Ek
	ShF+DCP4dhJGUtFLJ6fO4h6xEuoxsJmYY5wbjlIqw0wq9BybhNSAXCoSbm0xPiU+rUvdkO
	p4UB1/n60yOQyG3If97ssOKjZFEJn9eNXz+5kzOFjcAEicUVWjXv+MdbUFGxAy9fjVS9Q3
	pXMCcBboJgnr8wMtkBW9gooysPaCNPfza8xywAljDOk/YZaxBn2MUdWpg4XqqQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYKKc6yS4z18FJ
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 21:47:16 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 19d73
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 21:47:16 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Gleb Smirnoff <glebius@FreeBSD.org>
Subject: git: d46e2297669a - main - dummynet(4): remove not needed <netinet6/ip6_var.h>
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: d46e2297669ab0ce6677409afb436431c3945d08
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 21:47:16 +0000
Message-Id: <6b04b464.19d73.6e99ef0@gitrepo.freebsd.org>

The branch main has been updated by glebius:

URL: https://cgit.FreeBSD.org/src/commit/?id=d46e2297669ab0ce6677409afb436431c3945d08

commit d46e2297669ab0ce6677409afb436431c3945d08
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2026-11-23 21:33:33 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2026-11-23 21:41:28 +0000

    dummynet(4): remove not needed <netinet6/ip6_var.h>
---
 sys/netpfil/ipfw/dn_aqm_codel.c | 1 -
 sys/netpfil/ipfw/dn_aqm_pie.c   | 1 -
 2 files changed, 2 deletions(-)

diff --git a/sys/netpfil/ipfw/dn_aqm_codel.c b/sys/netpfil/ipfw/dn_aqm_codel.c
index 80d75f51c96b..7c494ff5b362 100644
--- a/sys/netpfil/ipfw/dn_aqm_codel.c
+++ b/sys/netpfil/ipfw/dn_aqm_codel.c
@@ -57,7 +57,6 @@
 #include <netinet/ip_dummynet.h>
 #include <netinet/if_ether.h> /* various ether_* routines */
 #include <netinet/ip6.h>       /* for ip6_input, ip6_output prototypes */
-#include <netinet6/ip6_var.h>
 #include <netpfil/ipfw/dn_heap.h>
 
 #ifdef NEW_AQM
diff --git a/sys/netpfil/ipfw/dn_aqm_pie.c b/sys/netpfil/ipfw/dn_aqm_pie.c
index 803582a1dca4..123867e4a4c2 100644
--- a/sys/netpfil/ipfw/dn_aqm_pie.c
+++ b/sys/netpfil/ipfw/dn_aqm_pie.c
@@ -58,7 +58,6 @@
 #include <netinet/ip_dummynet.h>
 #include <netinet/if_ether.h> /* various ether_* routines */
 #include <netinet/ip6.h>       /* for ip6_input, ip6_output prototypes */
-#include <netinet6/ip6_var.h>
 #include <netpfil/ipfw/dn_heap.h>
 
 #ifdef NEW_AQM

From nobody Mon Nov 23 21:50:31 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYKPM5mdMz71fV6
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 21:50: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYKPM3s7bz3DXY
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 21:50:31 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795470631;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=TCmz+K2+DTojRkTFeOJvw7lJ7sPu8V/4bSdIn3/lFAI=;
	b=CGt0KiFO0fXkGkmF0PvNdpoenHoZizgolMbEdAzeJIlwfAoAug5NP2Biooyg0HD5QHH9J1
	XNp56utzbISGzGZEU51hSVG+2wlIqhsrrWVc73cxiEvBKOsDhuZUEtd7YwDSyPs99bMIAs
	ei+b0qP4CP14StH7Skb3ZfCc+fqpNuw27CzuPGP3wb5QePA9tel4PwdTeWm0PckMAumi7+
	BT8oz4KRl37YQuXUKXNYv64PRUMGc9nElq55I5EaT4QRM3JZj0KjJeKdqBnz104Pt1Vny5
	yYfWZNSCnayZI7A/oBOK+WoJ+SVwPkLwL/wVznKbex/Sjszv6cyd7NWiaLNlUg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795470631;
	b=Ky7qfxU8aJEFjgoP0B4PoKFoDMl9gpqVazu0JMf2WdT3jKiNODUVBls/a9OdXFpr4dV9Ge
	sL0GHphe4nkBRzXAV5l7K2+ryP8P9t7ZWJEIIFE40wEhoB0OB8LTE4cwWvr3e8X8nIgxpE
	3KT5Sz/NyXsM7cp/aBiSwLwv1l+yNEbCnVXjyZ5uoUFEG59Bn7aIQcD8zqU4wsXRPRgwG5
	5S15I/3qZuo1LMhElTR/0BUPX3ZKl5y4JMyM9UKJLCsTxRON9w77nho0H9NVrsYvZyFon7
	cXR5+qgJ8MBZYAU7wPnVblEceehU8D1TsS5ku+6OsebJBEf5OkBzxQZODMbqUw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795470631;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=TCmz+K2+DTojRkTFeOJvw7lJ7sPu8V/4bSdIn3/lFAI=;
	b=R37X7kEikohum/1m37FAR09q0KMn2FqQV9M5IVgTYCPN239moTQ93ivLqlYJTDnH3GjON5
	62oIA9Pd1w6WPlOp0OZR4tQwruwb/NbNp9jWldv7HMbKAFNG1c6DkTuzqzrfFf+XgB57In
	GcfPa59F/O3xJF2hrvpRUoL9IJwOjxLnULX9psimJJmqC6UpwXfZ5ZAjlfD3DYzi8aW7ct
	xaltA4Km+a6FjCwt5sqFjvFauZXwJf4pp0Jtmd8DOiQDosn4wpaavFup3nwrhFJBUHdugN
	Rk+xfS4vxJTNaqFrxL6XABbrvkkUTU0gIYjD9NqGsm5+e+jw7Aw/y8qdbbAH6g==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYKPM34TTz1896
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 21:50:31 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1b878
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 21:50:31 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Joerg Wunsch <joerg@FreeBSD.org>
Subject: git: 1660d69068a0 - main - Add USB quirk for WCH-Link adapter
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: joerg
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 1660d69068a0650fcda2ce7497dfa20e33f0b58d
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 21:50:31 +0000
Message-Id: <6b04b527.1b878.7bec95db@gitrepo.freebsd.org>

The branch main has been updated by joerg:

URL: https://cgit.FreeBSD.org/src/commit/?id=1660d69068a0650fcda2ce7497dfa20e33f0b58d

commit 1660d69068a0650fcda2ce7497dfa20e33f0b58d
Author:     Joerg Wunsch <joerg@FreeBSD.org>
AuthorDate: 2026-11-23 21:43:11 +0000
Commit:     Joerg Wunsch <joerg@FreeBSD.org>
CommitDate: 2026-11-23 21:50:24 +0000

    Add USB quirk for WCH-Link adapter
    
    WCH-Link is a debug adapter from QinHeng Electronics that features a
    (proprietary) debug bridge for their RISC-V MCUs, as well as a serial
    gateway, implemented as a CDC device.  The CDC's call management
    descriptor declares the data interface to be 1, but it is actually
    interface 2. UQ_IGNORE_CDC_CM has already been implemented before to
    handle this kind of firmware bug, so just add this quirk for WCH-Link.
    
    Reported by:    Holm Tiffe
    MFC after:      1 week
---
 sys/dev/usb/quirk/usb_quirk.c | 1 +
 sys/dev/usb/usbdevs           | 1 +
 2 files changed, 2 insertions(+)

diff --git a/sys/dev/usb/quirk/usb_quirk.c b/sys/dev/usb/quirk/usb_quirk.c
index 61aa0d845e77..266dd468ef47 100644
--- a/sys/dev/usb/quirk/usb_quirk.c
+++ b/sys/dev/usb/quirk/usb_quirk.c
@@ -199,6 +199,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = {
 	USB_QUIRK(CURITEL, UM175, UQ_ASSUME_CM_OVER_DATA),
 	USB_QUIRK(VERTEX, VW110L, UQ_ASSUME_CM_OVER_DATA),
 	USB_QUIRK(BALTECH, SMARTCARDREADER, UQ_IGNORE_CDC_CM),
+	USB_QUIRK(WCH2, WCHLINK, UQ_IGNORE_CDC_CM),
 
 	/* USB Mass Storage Class Quirks */
 	USB_QUIRK(ADDON, ATTACHE, UQ_MSC_FORCE_WIRE_BBB,
diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs
index 5aa0118ef542..bada11b4812e 100644
--- a/sys/dev/usb/usbdevs
+++ b/sys/dev/usb/usbdevs
@@ -5021,6 +5021,7 @@ product WCH2 CH9102SER		0x55d4	CH9102 USB Serial
 product WCH2 CH341SER_3		0x7522	CH341/CH340 USB-Serial Bridge
 product WCH2 CH341SER		0x7523	CH341/CH340 USB-Serial Bridge
 product WCH2 U2M		0x752d	CH345 USB2.0-MIDI
+product WCH2 WCHLINK		0x8010	WCH-Link Serial Bridge
 
 /* West Mountain Radio products */
 product WESTMOUNTAIN RIGBLASTER_ADVANTAGE	0x0003	RIGblaster Advantage

From nobody Mon Nov 23 22:07:24 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYKmr514pz71h0J
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 22:07: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYKmr2zYtz3K01
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 22:07:24 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795471644;
	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=KTVQVqGS23LxcnN23dMqiyEsYkAhQ0aWJ9IiQG4uv3Q=;
	b=pH/ieXoDBLpz7L+SDNmW722aP6OE5ITrhnXJLdyNQxyo+bScPIRjdL8bM6JMhY9BAGLd8J
	3leYnmpamqruVH4zYU2+/pwDPWs2b9HvjsY6ntQPveq9ILfpB91KQy3yq5hUUluADSOppc
	bKBVLV6oZSYl374vS+lqXeDW+IS1F4ybYwRKZ0+Xbsqn3HdMmQqlV/8fm76PcpfAGlfh3O
	0vFNSOqvFq0yG7MovN8VSKDzH/FhOnBbJokHGqsXOBEwxntcH3ywE81bGcyOuurw/oB05O
	BxqLLMZPB8v0BNRtV4oQBhfLpp093KLtVC2Mtqx8IwpzdKXhAL3hQhFSq9SnzA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795471644;
	b=DUrOqQXNORUZLB0x8EgTxRseVbHokvrPS9myU+3Snl6H1vpKIhcO3BqTvkjDABPHsCJzMQ
	a+mNdW27trGlEV4U0JOBgbqiGWiwdXoeh6azjGdv3Jl0NDQLQSE3zqYt8Zr+rAWwzbPuQy
	z8saaUwHdSOC/yj1gc8zWOn0ZxznD279U0dnYlYqn+4xBbs/CMhEE3Fk0Rbq1Ueg+gkayu
	xMzv8gjKeJpo/UWA0fmxaMp1s940ubgUeWepkEc0ICB0Io+qdOMNUOgITGegh7xoWnAo8E
	z9EG+gkWDGpGxZddQ84E/kM13vzvrJaRsdWfLuEkymWqqJjleOALfEW4KgOipQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795471644;
	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=KTVQVqGS23LxcnN23dMqiyEsYkAhQ0aWJ9IiQG4uv3Q=;
	b=vVUc7L5s4FEA+U6fmFUxrHPP8xl3chWa5zESjhXrlimmCBqjmjZyZWL0lB1tA72gQvtxlD
	R9pyQ1EGO1YWl6W9gnCiDSMArQQanIIhCMdjtkY90yrgkp/Gae4w9xDok0jTiXHtHPznsm
	zTjhrQ0Qhn/XydvmXbfF5PBbt7rSqQFTFPKz0+ME3zh6lvSwhBxI5lB2+r5jsMABaae/I5
	KNeAWMvrgQX4xJ6zwaP9eBUO/oPiUPh8Ku6YCe8xL+zUYVRp5UCxJCTjOuj5Yq05r0RSf3
	TO0VoK66MWdqbWFd+nEreyFxB6vfEwUzT56dXkmfoET1B+vRGQawkWa7RdqcYA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYKmr2NXsz18nn
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 22:07:24 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1c949
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 22:07:24 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: John Baldwin <jhb@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 905120141436 - stable/14 - fusefs tests: Use memcpy to work around a -Wstrlcpy-strlcast-size warning
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 9051201414360ecd0fafb1637a71b834c4151cdd
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 22:07:24 +0000
Message-Id: <6b04b91c.1c949.67579895@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=9051201414360ecd0fafb1637a71b834c4151cdd

commit 9051201414360ecd0fafb1637a71b834c4151cdd
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2025-04-11 19:12:58 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 22:07:16 +0000

    fusefs tests: Use memcpy to work around a -Wstrlcpy-strlcast-size warning
    
    tests/sys/fs/fusefs/xattr.cc:572:50: error: size argument in 'strlcpy' call appears to be size of the source; expected the size of the destination [-Werror,-Wstrlcpy-strlcat-size]
      572 |                         strlcpy((char*)out.body.bytes, attrs1, sizeof(attrs1));
          |                                                                ~~~~~~~^~~~~~~
    
    The warning is correct in that the size is the size of the source, but
    that is intended in this case.  Use memcpy() instead of strlcpy() to
    match the same code in the size_only_race_smaller test above.
    
    Differential Revision:  https://reviews.freebsd.org/D49786
    
    (cherry picked from commit faae895fec6571242ae05b11bc7eba0dff83fa49)
---
 tests/sys/fs/fusefs/xattr.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/sys/fs/fusefs/xattr.cc b/tests/sys/fs/fusefs/xattr.cc
index a348315265c2..b863bdbc06e6 100644
--- a/tests/sys/fs/fusefs/xattr.cc
+++ b/tests/sys/fs/fusefs/xattr.cc
@@ -642,7 +642,7 @@ TEST_F(Listxattr, size_only_race_smaller)
 	}));
 	expect_listxattr(ino, sizeof(attrs0),
 		ReturnImmediate([&](auto in __unused, auto& out) {
-			strlcpy((char*)out.body.bytes, attrs1, sizeof(attrs1));
+			memcpy((char*)out.body.bytes, attrs1, sizeof(attrs1));
 			out.header.len = sizeof(fuse_out_header) +
 			    sizeof(attrs1);
 		})

From nobody Mon Nov 23 22:08:19 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYKny424Xz71hTt;
	Mon, 23 Nov 2026 22:08:22 +0000 (UTC)
	(envelope-from glebius@freebsd.org)
Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYKny3YHGz3KHS;
	Mon, 23 Nov 2026 22:08:22 +0000 (UTC)
	(envelope-from glebius@freebsd.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795471702;
	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=hWB1cQJSt3cY/DaIIir9Zl4Zk4CPAr6zE3vEJgWCK/w=;
	b=eDkMSj8ZFddLYxrf1veV2tWhY6rFfnVy0UPAgNNK1MWCMhGAbfvDocQhuBOQdn6gPSDrSQ
	hLJ6OYJMkRB7PCxnBDMtwkN3WanY2r3PQxOHodsH/iugqjbCgBSoSJbpQbSJiAIYs18G0a
	L0Pbn6f0S0YCSmUamzrO164rsDyPwPBCxWmLYC7B7YgGa15NZH6ll44LA2iAPEGKNRsH+0
	MZxjh1bhmS7S14yrlIyMrKRkuYuJ+d73HGN+2CkeDNwFtILuCRUdKpPtEcfsRB6GrtVUuH
	bQxcr5YNCd+vVr5+jA9i2kPBrnQpm6PhcngKOE7pkea6IS9VACMWDQ8wPZLkVg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795471702;
	b=CwZsENqNNoAyPGV1bx0QZBx5IrRp4MAApbVOJh4h04HVUJSSWTPYlcb54pKamx6wCgDULR
	VlNGWntCn/VIYh++/LK9OxSCph4uTvbx4hdc1PVuwLIwB8mcIqNOYfeJa58H1RGYO4LDQB
	lGsVReH8hMJ08oItGa8/IPUhdhCO3livm1uwbswcIMWMc5hTZM6zWNJVabLmgB9p8Cy9oj
	/jYkoWdXjq6Yadd0W8cj1GX/X7nIPtUwCCqK+XREyawmAlInVX6n5P4CmKoRPhqkB5hRDx
	sE/WIy8ppkBVEZTOLpK+h9FKsRaIEQIrmewBJinDiEBSzLTFYLCBil5uj4qUHw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795471702;
	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=hWB1cQJSt3cY/DaIIir9Zl4Zk4CPAr6zE3vEJgWCK/w=;
	b=Kj2OvXTbVnsA+UQ5xyvUEgcNDnX+ebkxw39t0tkzDuNScZgB+GMVaeaeF3xcOPAR3QmNNH
	xS1SwTCAg4cGC35rZNsDY9kEjR28ot/xy6TYpNFhRIgBq6C6JpIYE44cqNPvEY2k4OkqRx
	4uXbZZgoVXdPtrawbK4Vswa5X30/SbZLTXUSWKijdlr7O6kF6wM9xcugiewAXX9NeodEz2
	B4J/XL/A7XmZFS87lQyjMro8CwC7uCQN5TOUxJNmmClPlZ6RvtbwFXVMuxERLersVC9gkU
	WWrPjJ+mttAzYZLej8pZ3lsjmn3q9PPING1+I5Pa/WWjMpxSvieXhiJuAGONhQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from cell.glebi.us (glebi.us [162.251.186.162])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	(Authenticated sender: glebius)
	by smtp.freebsd.org (Postfix) with ESMTPSA id 4jYKnx6zN0zpfS;
	Mon, 23 Nov 2026 22:08:21 +0000 (UTC)
	(envelope-from glebius@freebsd.org)
Date: Mon, 23 Nov 2026 14:08:19 -0800
From: Gleb Smirnoff <glebius@freebsd.org>
To: "R. Christian McDonald" <rcm@freebsd.org>
Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org,
	dev-commits-src-main@freebsd.org
Subject: Re: git: c9f9c4fe47bf - main - ip6_forward: Do not reference the
 nexthop
Message-ID: <awS5U8hpazn7NqU9@cell.glebi.us>
References: <6b035c39.9cba.75b8db0@gitrepo.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <6b035c39.9cba.75b8db0@gitrepo.freebsd.org>

On Sun, Nov 22, 2026 at 09:18:49PM +0000, R. Christian McDonald wrote:
R> Author:     R. Christian McDonald <rcm@FreeBSD.org>
R> AuthorDate: 2026-11-22 21:18:16 +0000
R> Commit:     R. Christian McDonald <rcm@FreeBSD.org>
R> CommitDate: 2026-11-22 21:18:16 +0000
R> 
R>     ip6_forward: Do not reference the nexthop
R>     
R>     ip6_forward() looked the route up with NHR_REF and released the nexthop
R>     before returning.  It runs in the network epoch and uses the nexthop
R>     only until it returns: nd6_output_ifp() gets the interface, and
R>     icmp6_redirect_output() runs before the return.  The epoch keeps the
R>     nexthop valid that long, which ip6_tryforward() already relies on.
R>     
R>     Every packet that takes this path wrote twice to the nexthop reference
R>     count, which all CPUs forwarding to that nexthop share.  Forwarded
R>     packets take it whenever IPsec has a security policy, and today also
R>     whenever net.inet6.ip6.redirect is set, which is the default.
R>     
R>     Look the nexthop up without a reference, and assert that the caller is
R>     in the network epoch.
R>     
R>     No functional change intended.

I think this commit actually carries quite a lot of functional change if
we are talking about how the code works.  It doesn't bring any user
visible change, though.

We should use this statement (NFC) more responsibly.

-- 
Gleb Smirnoff

From nobody Mon Nov 23 22:26:01 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYLBK27Byz71k4T
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 22:26: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYLBK1kP4z3NGR
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 22:26:01 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795472761;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=yzFxuf+CkdBc9zf+ZEO3pVMM2hLDKXkfqtCqnfv4AbQ=;
	b=BODqHaC34QyfjQ+PoUl5IE6QBK35KNE9kr82a7CndzSomhFwHvnKOzvx9vUaE1fxqEqLLb
	2sVUPliEyILcjonemmFASo8e4TjOW5luM4FKCDOW/hkPGWs0Hw7hIEnDfXYzhenP3ro44c
	do4cj8AIyefbGPHR8kugvo76PCcvDeKk2g/2nBcHUMYzi5dqboGex/Z/22Dzli4sTzdASO
	h68Obe70MNbcH2jxhgYdshetqGSKNsEqPX1nJUPaKGHe0n4KiACjL7FzyPkMRx2hNG98SI
	8upsdf4uPXfB/GE8eIbxIkFx9cbwwC84/npY4BNgmBPcAJSxC8Vi8IW9Q7DT9A==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795472761;
	b=My2OtQIXqui6zX6izEaCTd3mtTFZdje+hLAmUlDzwkAN6ERVR72Adjue5sCSntKMjzhZ8F
	AHHyXoiV8i1NHg4uudBYof+P0ZQ5Z2nWgxMmog4zNcjWzzRlzvFs4Xy4BmUacKr0oXw/SY
	aCUtuRRx+hHONmonVWAVaWgS81Vk8rrXMASQO/L12q7Fab1aReweEEjLPHflU1XVrBfBhR
	UUXTVEaG0GYVQBdYPhAm4A/4XcCj4IuUItxF0Xluf7DlUxuoxc6d4KALgfJsPV8PBnK0bl
	R9eWIJMFlFNjqUu6CKR2WRUEpdtVo4vzBTGS8qRamN8sYWMqZ6BPU4YPL8QDyQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795472761;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=yzFxuf+CkdBc9zf+ZEO3pVMM2hLDKXkfqtCqnfv4AbQ=;
	b=r/4y0ndW7ukQTsj1uPwkRCpQRF38odlODnr6GAaSkPINeNjg6M8yxzqqnojwkP2m07f3Wz
	XLF7/4qd71ZhMbql649hDpAhYltIMzx3yDlqH3LgU7fIFWAU/FdB2F10sXKrf5qzdL15pB
	vMbbTQbO04yAVsLr7JGdFBPi2y+HCf2LAM8FQxs6Yn6fuEcqdNahJoDb2f/7wqD3Os++v1
	9sO7tkfquIobie9TB0rN2+jc0XnEXHGvBCiAyDMJm/RuF2lGpDgf19nSrS3isTDuchnw6/
	yLObn38r4po8UD92t0v9tKYYWyT+vv2Njq7qau8Cn/JAwtGnyDKWPPBa7Veprg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYLBK0vyPz19Ml
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 22:26:01 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1fa1c
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 22:26:01 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Aymeric Wibo <obiwac@FreeBSD.org>
Subject: git: 9ef73e4878d0 - main - tdestroy(3): Take posix_tnode * like the other tsearch(3) functions
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: 9ef73e4878d01542e89273426fd036f54285653e
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 22:26:01 +0000
Message-Id: <6b04bd79.1fa1c.bab5055@gitrepo.freebsd.org>

The branch main has been updated by obiwac:

URL: https://cgit.FreeBSD.org/src/commit/?id=9ef73e4878d01542e89273426fd036f54285653e

commit 9ef73e4878d01542e89273426fd036f54285653e
Author:     Aymeric Wibo <obiwac@FreeBSD.org>
AuthorDate: 2026-11-23 14:40:54 +0000
Commit:     Aymeric Wibo <obiwac@FreeBSD.org>
CommitDate: 2026-11-23 22:25:44 +0000

    tdestroy(3): Take posix_tnode * like the other tsearch(3) functions
    
    tdestroy(3) was originally a glibc extension. glibc does not use
    posix_tnode (yet), and when tdestroy(3) was pulled in its signature was
    not updated to match the other tsearch(3) functions.
    
    Fixes:          b8c99e7d912f ("libc: add glibc-compatible tdestroy(3)")
    Sponsored by:   Klara, Inc.
---
 include/search.h           | 2 +-
 lib/libc/stdlib/tdestroy.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/search.h b/include/search.h
index 5ac25a0d491f..b18637b33e8c 100644
--- a/include/search.h
+++ b/include/search.h
@@ -77,7 +77,7 @@ void	 twalk(const posix_tnode *, void (*)(const posix_tnode *, VISIT, int));
 int	 hcreate_r(size_t, struct hsearch_data *);
 void	 hdestroy_r(struct hsearch_data *);
 int	 hsearch_r(ENTRY, ACTION, ENTRY **, struct hsearch_data *);
-void	 tdestroy(void *, void (*)(void *));
+void	 tdestroy(posix_tnode *, void (*)(void *));
 #endif
 
 __END_DECLS
diff --git a/lib/libc/stdlib/tdestroy.c b/lib/libc/stdlib/tdestroy.c
index 2aeb02228e46..cd4bf4fce001 100644
--- a/lib/libc/stdlib/tdestroy.c
+++ b/lib/libc/stdlib/tdestroy.c
@@ -17,7 +17,7 @@ nul_node_free(void *node __unused)
 }
 
 void
-tdestroy(void *rootp, void (*node_free)(void *))
+tdestroy(posix_tnode *rootp, void (*node_free)(void *))
 {
 	posix_tnode *back, *curr, **front;
 

From nobody Mon Nov 23 22:28:29 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYLFB25Fwz71kSQ
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 22:28:30 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYLF96x56z3NjD
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 22:28:29 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795472910;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=GZ1616MUaFnJztyW0oJ4up6R8Oo+cxeAV6wUqaY68ZI=;
	b=oSvVz1LjK+kf/UY62dBl/g3V6w+Gyi7rFWHeXwsGr3PgLP3YoWQwW1X5QbE0uGBhHV++rH
	u3p7bWzdbbm/Ej3lAkrzMyqhUPCrWhB0Tk3VUPl1abYKE9fQKFzsnTosvK8875N8xOdIaz
	nmlNYi2Bo7Qp6HuTqvZ0rvlJjwFieJRsSgXy+y88GSxqLgg5fa9IlSh08wCmygc7nvKtz5
	wBi94OXdTkxrWRw+uheRVofk0pqEIaiNCoHb8Cbou6XYMCUDW49Gh2dLYKAj7fVzDopBCz
	Cso/PhwvkTcfHTQVMsZYuHHYMxFKBYFBWDDtSYX/7aiUJxX8aApyT1Df/EbUcw==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795472910;
	b=yDh5UZSSx1tIJmoJZas6PiS3Kp3ZQ8P3xOF1U2DTaBONRRqw5nZEV+wsBMs1zHvsEVSQ+I
	a0nmO0OZC4cHsrfY7tgn/cfyczpYIpVXHFPoJDLzm+d7hfnl/ijvH3HkuOCLqQ7PsBQGqw
	SJjrUoj8bIK4m3xgFLBS1vkZYqRZYK9KHN1EQuVMijSh7SZHbJUtMimpuccouwpy1iYvAm
	Cy2MIaqExLu+LZrJFkQqQ9Yl6Uw7sc6zCjOxOLkR3ZKxmO2dKbcuyyTu3+rpdKMNQahwRy
	ombOjsfXfaZiZSeK7J1sgbzhWvFecNYOApQhGF+YjQwjkfqsG/iMAHQn4Vm/cA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795472910;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=GZ1616MUaFnJztyW0oJ4up6R8Oo+cxeAV6wUqaY68ZI=;
	b=uLJ5v+VJ1bgOaAz6vikGkqIeR/agjmbcWTzmh7XWZLyTQLxZ3lecOzWgCOrOBndD1YNolw
	dzc3dorWlF1ugiTMSzqUwRs9f0ztWeJDDKZGqwiAuTWwazg49iW1jxE8af+UoFMrJl3pbD
	flmshBVuGYl+r3pMjYIJKMeZDbZNgWVhIrZCsYHWgLDD74zZNSuxFm9Steq7yPY29ac4lC
	bnPv2JaC98b1wiKe5r06Ov0QM1NOSuTUpxvjlbhz4TvFSWdOHCRX8P8v1Ny97oXeKFXrww
	ua1XgcVmDxXF5V2SerZTJnJyU0k23bXMzi2ctBaH8IpvOsHNbqckEIA7jya09A==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYLF96JFFz19Db
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 22:28:29 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1faa3
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 22:28:29 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: cb354d6a5a75 - main - crypto/openssl: correct messages printed out when copying manpages
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: cb354d6a5a756df35f772acab3ce70caf90c4bda
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 22:28:29 +0000
Message-Id: <6b04be0d.1faa3.778d0f75@gitrepo.freebsd.org>

The branch main has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=cb354d6a5a756df35f772acab3ce70caf90c4bda

commit cb354d6a5a756df35f772acab3ce70caf90c4bda
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-11-23 22:20:31 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 22:27:52 +0000

    crypto/openssl: correct messages printed out when copying manpages
    
    Prior to this change section 1's message applied to 3/5/7 and vice
    versa. Now the right message is printed out by the Makefile with its
    respective operation.
    
    MFC after:      1 week
---
 crypto/openssl/BSDmakefile | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/crypto/openssl/BSDmakefile b/crypto/openssl/BSDmakefile
index 8da6b846cc86..dd017f094c0b 100644
--- a/crypto/openssl/BSDmakefile
+++ b/crypto/openssl/BSDmakefile
@@ -60,17 +60,17 @@ all: patch
 	     ${SETENVI} ${WRK_ENV} ${MAKE} buildasm)
 
 	@echo "==> Syncing manpages (section 1)"
-	@rsync -a --delete \
-	    --exclude 'Makefile*' --exclude '*.1' \
-	    ${LCRYPTO_DOC}/man/ \
-	    ${SRCTOP}/secure/lib/libcrypto/man
-
-	@echo "==> Syncing manpages (sections {3,5,7})"
 	@rsync -a --delete \
 	    --exclude 'Makefile*' --exclude '*.[357]' \
 	    ${LCRYPTO_DOC}/man/man1/ \
 	    ${SRCTOP}/secure/usr.bin/openssl/man
 
+	@echo "==> Syncing manpages (sections {3,5,7})"
+	@rsync -a --delete \
+	    --exclude 'Makefile*' --exclude '*.1' \
+	    ${LCRYPTO_DOC}/man/ \
+	    ${SRCTOP}/secure/lib/libcrypto/man
+
 
 # This doesn't use standard patching since the generated files can vary
 # depending on the host architecture.

From nobody Mon Nov 23 22:28:30 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYLFC5HCzz71kQ1
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 22:28:31 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYLFC3mX3z3Ncw
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 22:28:31 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795472911;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=m/ws6TwqQ6m3t/wiGm0x7WCCbZtYfbTgwwElBvb0dLw=;
	b=rOnnzEzROtEBKO+pLo7b4GhZ2kuaixSJc/fTAJ1+XMpXR4TvyugHrXDhDDsNLLKS7K4fNO
	1Oshx90uBNmGGWoSGgmxtu6OFlx21Zafmwzq1IcWxaRxY+9wySf21vbpIxEi9PJGEVvwqI
	NDU5JXIrqrsQt/+QuKa6iVCRhfHBKvkvSxqPmgg48ptGrWAQKEgZdBV/vT2wGU5jrbpUgL
	iDrRFbE/lC3+7/Kj42j68uPVh3p14ME4Nqza03FX4RQH+sKz1EHqVbC95qQCbiEzMrkXHY
	0kmC/cyXLWg2FMqPEG92FwY9szfJofL8fR5Zai1yU1jDDIlW1s3QJPDvOuOcZg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795472911;
	b=u00pISm1MJel9goCnOP4i4DuGfwvmvCzCDOO2pn2r9WyWZY7ICZvTEFaD3xlmX2WxE7ZjS
	C7iFUKaKEN8RzLutN4eDZIdp4lRzAhV6N3aza3ePBcsrJM81pk+BOK9jvAUQWn1Wiq/hmq
	23hFBC8RULXVkuHGfE9xhdqtub95k+1OAV0U3RMbw5ps9ePlbp8manV0FkgNUhv4GRccXA
	aWq78hFs7nJ7d4nfNDI4y3Ut7ymS4IoEIXyN8Qk0b3YAo5xcFj9fwfiPi6O7WF597r+dok
	cP1iYBRewjneTQ+44u6FMLvsuE8RIYUDzgNwCXV2KmZ3pyMhz+GRC36fBv9IhQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795472911;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=m/ws6TwqQ6m3t/wiGm0x7WCCbZtYfbTgwwElBvb0dLw=;
	b=x0YJMFUn7hLw8BQBGn07s/lUsUYdbNFpwYdjZHdBOqBbPtBPsBLn2hfqHDn5IXO1nfGYyN
	Z3Aui+hUH2WWwdBPEhOWnRrhvBZikKCh2UIChHwhbHYryNyA+QXGXPhE0dlwFmLffxWLcD
	I0EQZI4AFFqXGDPiiLXXxrPXE6w/nmECZKgkbLVXAgQl9KrbJ59xuEQwVuTCs2nrgXeWQf
	Qu+76sqNCjYtUiPJ2pmAbxOLoW5lgj9NMkN6ZYOHmVHOIthk/GRyqEN8Pln5Lo0iJe9x96
	b87zbt+2LU/wzXMFjoBCC0oymw1CQkXuTC+2bUM5i3QXlF4fVGwoaAi2+2PQEw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYLFC3FJhz19Mn
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 22:28:31 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 315
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 22:28:30 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: a1c255f69aaf - main - crypto/openssl: sync manpages with current release
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: a1c255f69aafb8c24eadb94583311a77145c6443
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 22:28:30 +0000
Message-Id: <6b04be0e.315.3078f17a@gitrepo.freebsd.org>

The branch main has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=a1c255f69aafb8c24eadb94583311a77145c6443

commit a1c255f69aafb8c24eadb94583311a77145c6443
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-11-23 22:26:02 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 22:27:52 +0000

    crypto/openssl: sync manpages with current release
    
    The content in the manpages matches 3.5.4 today and we're on 3.5.9.
    Update to 3.5.9's content so the manpages reflect the shipped release.
    
    MFC after:      1 week
---
 secure/lib/libcrypto/man/man3/ASN1_EXTERN_FUNCS.3  | 11 ++-
 secure/lib/libcrypto/man/man3/ASN1_INTEGER_new.3   |  7 +-
 secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3   |  7 +-
 secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3    |  7 +-
 .../lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 |  7 +-
 secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 |  9 +-
 secure/lib/libcrypto/man/man3/ASN1_STRING_new.3    |  7 +-
 .../lib/libcrypto/man/man3/ASN1_STRING_print_ex.3  | 15 ++--
 secure/lib/libcrypto/man/man3/ASN1_TIME_set.3      |  9 +-
 secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3      |  7 +-
 .../lib/libcrypto/man/man3/ASN1_generate_nconf.3   |  9 +-
 secure/lib/libcrypto/man/man3/ASN1_item_new.3      |  7 +-
 secure/lib/libcrypto/man/man3/ASN1_item_sign.3     | 11 ++-
 secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 | 13 +--
 secure/lib/libcrypto/man/man3/ASYNC_start_job.3    | 19 +++--
 secure/lib/libcrypto/man/man3/BF_encrypt.3         | 15 ++--
 secure/lib/libcrypto/man/man3/BIO_ADDR.3           | 17 ++--
 secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3       |  9 +-
 secure/lib/libcrypto/man/man3/BIO_connect.3        | 13 +--
 secure/lib/libcrypto/man/man3/BIO_ctrl.3           | 19 +++--
 secure/lib/libcrypto/man/man3/BIO_f_base64.3       | 13 +--
 secure/lib/libcrypto/man/man3/BIO_f_buffer.3       |  9 +-
 secure/lib/libcrypto/man/man3/BIO_f_cipher.3       |  7 +-
 secure/lib/libcrypto/man/man3/BIO_f_md.3           |  7 +-
 secure/lib/libcrypto/man/man3/BIO_f_null.3         |  7 +-
 secure/lib/libcrypto/man/man3/BIO_f_prefix.3       |  9 +-
 secure/lib/libcrypto/man/man3/BIO_f_readbuffer.3   | 11 ++-
 secure/lib/libcrypto/man/man3/BIO_f_ssl.3          |  9 +-
 secure/lib/libcrypto/man/man3/BIO_find_type.3      |  7 +-
 .../lib/libcrypto/man/man3/BIO_get_ex_new_index.3  |  9 +-
 .../libcrypto/man/man3/BIO_get_rpoll_descriptor.3  | 11 ++-
 secure/lib/libcrypto/man/man3/BIO_meth_new.3       |  9 +-
 secure/lib/libcrypto/man/man3/BIO_new.3            |  7 +-
 secure/lib/libcrypto/man/man3/BIO_new_CMS.3        |  7 +-
 secure/lib/libcrypto/man/man3/BIO_parse_hostserv.3 | 11 ++-
 secure/lib/libcrypto/man/man3/BIO_printf.3         |  7 +-
 secure/lib/libcrypto/man/man3/BIO_s_accept.3       |  9 +-
 secure/lib/libcrypto/man/man3/BIO_s_connect.3      | 13 +--
 secure/lib/libcrypto/man/man3/BIO_s_core.3         |  7 +-
 secure/lib/libcrypto/man/man3/BIO_s_dgram_pair.3   | 21 +++--
 secure/lib/libcrypto/man/man3/BIO_s_fd.3           |  7 +-
 secure/lib/libcrypto/man/man3/BIO_s_mem.3          |  7 +-
 secure/lib/libcrypto/man/man3/BIO_s_null.3         |  7 +-
 secure/lib/libcrypto/man/man3/BIO_s_socket.3       |  9 +-
 secure/lib/libcrypto/man/man3/BIO_sendmmsg.3       | 53 ++++++------
 secure/lib/libcrypto/man/man3/BIO_set_callback.3   | 15 ++--
 secure/lib/libcrypto/man/man3/BIO_should_retry.3   |  7 +-
 secure/lib/libcrypto/man/man3/BIO_socket_wait.3    | 11 ++-
 secure/lib/libcrypto/man/man3/BN_BLINDING_new.3    | 15 ++--
 secure/lib/libcrypto/man/man3/BN_CTX_new.3         |  7 +-
 secure/lib/libcrypto/man/man3/BN_CTX_start.3       |  7 +-
 secure/lib/libcrypto/man/man3/BN_add_word.3        |  7 +-
 secure/lib/libcrypto/man/man3/BN_bn2bin.3          | 37 +++++----
 secure/lib/libcrypto/man/man3/BN_cmp.3             |  9 +-
 secure/lib/libcrypto/man/man3/BN_copy.3            |  9 +-
 secure/lib/libcrypto/man/man3/BN_mod_exp_mont.3    |  9 +-
 secure/lib/libcrypto/man/man3/BN_mod_inverse.3     |  7 +-
 .../lib/libcrypto/man/man3/BN_mod_mul_montgomery.3 |  7 +-
 .../lib/libcrypto/man/man3/BN_mod_mul_reciprocal.3 |  7 +-
 secure/lib/libcrypto/man/man3/BN_new.3             |  7 +-
 secure/lib/libcrypto/man/man3/BN_num_bytes.3       | 13 +--
 secure/lib/libcrypto/man/man3/BN_rand.3            | 11 ++-
 secure/lib/libcrypto/man/man3/BN_security_bits.3   |  9 +-
 secure/lib/libcrypto/man/man3/BN_set_bit.3         |  9 +-
 secure/lib/libcrypto/man/man3/BN_swap.3            |  7 +-
 secure/lib/libcrypto/man/man3/BN_zero.3            | 11 ++-
 secure/lib/libcrypto/man/man3/BUF_MEM_new.3        | 13 +--
 secure/lib/libcrypto/man/man3/CMAC_CTX.3           | 13 +--
 .../libcrypto/man/man3/CMS_EnvelopedData_create.3  |  7 +-
 secure/lib/libcrypto/man/man3/CMS_add0_cert.3      |  9 +-
 .../libcrypto/man/man3/CMS_add1_recipient_cert.3   |  9 +-
 secure/lib/libcrypto/man/man3/CMS_add1_signer.3    | 13 +--
 secure/lib/libcrypto/man/man3/CMS_compress.3       |  7 +-
 secure/lib/libcrypto/man/man3/CMS_data_create.3    |  7 +-
 secure/lib/libcrypto/man/man3/CMS_digest_create.3  |  7 +-
 secure/lib/libcrypto/man/man3/CMS_encrypt.3        |  9 +-
 secure/lib/libcrypto/man/man3/CMS_final.3          | 13 +--
 .../libcrypto/man/man3/CMS_get0_RecipientInfos.3   |  7 +-
 .../lib/libcrypto/man/man3/CMS_get0_SignerInfos.3  |  9 +-
 secure/lib/libcrypto/man/man3/CMS_get0_type.3      |  7 +-
 .../libcrypto/man/man3/CMS_get1_ReceiptRequest.3   |  7 +-
 secure/lib/libcrypto/man/man3/CMS_sign.3           | 11 ++-
 secure/lib/libcrypto/man/man3/CMS_sign_receipt.3   |  7 +-
 .../lib/libcrypto/man/man3/CMS_signed_get_attr.3   | 13 +--
 secure/lib/libcrypto/man/man3/CMS_uncompress.3     |  7 +-
 secure/lib/libcrypto/man/man3/CMS_verify.3         |  7 +-
 secure/lib/libcrypto/man/man3/CMS_verify_receipt.3 |  7 +-
 secure/lib/libcrypto/man/man3/COMP_CTX_new.3       | 25 +++---
 secure/lib/libcrypto/man/man3/CONF_modules_free.3  |  9 +-
 .../libcrypto/man/man3/CONF_modules_load_file.3    |  9 +-
 .../libcrypto/man/man3/CRYPTO_THREAD_run_once.3    | 23 +++---
 .../libcrypto/man/man3/CRYPTO_get_ex_new_index.3   | 27 +++---
 secure/lib/libcrypto/man/man3/CRYPTO_memcmp.3      |  7 +-
 .../man/man3/CTLOG_STORE_get0_log_by_id.3          |  9 +-
 secure/lib/libcrypto/man/man3/CTLOG_STORE_new.3    |  9 +-
 secure/lib/libcrypto/man/man3/CTLOG_new.3          | 11 ++-
 .../libcrypto/man/man3/CT_POLICY_EVAL_CTX_new.3    | 13 +--
 secure/lib/libcrypto/man/man3/DEFINE_STACK_OF.3    | 13 +--
 secure/lib/libcrypto/man/man3/DES_random_key.3     | 43 +++++-----
 secure/lib/libcrypto/man/man3/DH_generate_key.3    | 13 +--
 .../libcrypto/man/man3/DH_generate_parameters.3    | 25 +++---
 secure/lib/libcrypto/man/man3/DH_get0_pqg.3        |  7 +-
 secure/lib/libcrypto/man/man3/DH_get_1024_160.3    |  7 +-
 secure/lib/libcrypto/man/man3/DH_meth_new.3        |  9 +-
 secure/lib/libcrypto/man/man3/DH_new.3             |  7 +-
 secure/lib/libcrypto/man/man3/DH_new_by_nid.3      |  7 +-
 secure/lib/libcrypto/man/man3/DH_set_method.3      | 13 +--
 secure/lib/libcrypto/man/man3/DH_size.3            | 17 ++--
 secure/lib/libcrypto/man/man3/DSA_SIG_new.3        |  7 +-
 secure/lib/libcrypto/man/man3/DSA_do_sign.3        | 11 ++-
 secure/lib/libcrypto/man/man3/DSA_dup_DH.3         |  9 +-
 secure/lib/libcrypto/man/man3/DSA_generate_key.3   |  7 +-
 .../libcrypto/man/man3/DSA_generate_parameters.3   | 15 ++--
 secure/lib/libcrypto/man/man3/DSA_get0_pqg.3       |  9 +-
 secure/lib/libcrypto/man/man3/DSA_meth_new.3       |  9 +-
 secure/lib/libcrypto/man/man3/DSA_new.3            |  7 +-
 secure/lib/libcrypto/man/man3/DSA_set_method.3     | 11 ++-
 secure/lib/libcrypto/man/man3/DSA_sign.3           |  9 +-
 secure/lib/libcrypto/man/man3/DSA_size.3           | 13 +--
 secure/lib/libcrypto/man/man3/DTLS_get_data_mtu.3  |  7 +-
 secure/lib/libcrypto/man/man3/DTLS_set_timer_cb.3  |  7 +-
 .../lib/libcrypto/man/man3/DTLSv1_handle_timeout.3 |  7 +-
 secure/lib/libcrypto/man/man3/DTLSv1_listen.3      | 25 +++---
 secure/lib/libcrypto/man/man3/ECDSA_SIG_new.3      |  9 +-
 secure/lib/libcrypto/man/man3/ECDSA_sign.3         |  9 +-
 .../lib/libcrypto/man/man3/ECPKParameters_print.3  |  9 +-
 .../lib/libcrypto/man/man3/EC_GFp_simple_method.3  |  7 +-
 secure/lib/libcrypto/man/man3/EC_GROUP_copy.3      | 19 +++--
 secure/lib/libcrypto/man/man3/EC_GROUP_new.3       | 13 +--
 .../lib/libcrypto/man/man3/EC_KEY_get_enc_flags.3  |  7 +-
 secure/lib/libcrypto/man/man3/EC_KEY_new.3         |  9 +-
 secure/lib/libcrypto/man/man3/EC_POINT_add.3       | 11 ++-
 secure/lib/libcrypto/man/man3/EC_POINT_new.3       |  9 +-
 secure/lib/libcrypto/man/man3/ENGINE_add.3         | 95 +++++++++++-----------
 secure/lib/libcrypto/man/man3/ERR_GET_LIB.3        | 13 +--
 secure/lib/libcrypto/man/man3/ERR_clear_error.3    |  9 +-
 secure/lib/libcrypto/man/man3/ERR_error_string.3   | 11 ++-
 secure/lib/libcrypto/man/man3/ERR_get_error.3      | 15 ++--
 .../libcrypto/man/man3/ERR_load_crypto_strings.3   |  7 +-
 secure/lib/libcrypto/man/man3/ERR_load_strings.3   |  7 +-
 secure/lib/libcrypto/man/man3/ERR_new.3            | 11 ++-
 secure/lib/libcrypto/man/man3/ERR_print_errors.3   |  7 +-
 secure/lib/libcrypto/man/man3/ERR_put_error.3      | 23 +++---
 secure/lib/libcrypto/man/man3/ERR_remove_state.3   |  7 +-
 secure/lib/libcrypto/man/man3/ERR_set_mark.3       |  7 +-
 .../lib/libcrypto/man/man3/EVP_ASYM_CIPHER_free.3  |  9 +-
 secure/lib/libcrypto/man/man3/EVP_BytesToKey.3     |  7 +-
 .../man/man3/EVP_CIPHER_CTX_get_cipher_data.3      |  7 +-
 .../man/man3/EVP_CIPHER_CTX_get_original_iv.3      |  9 +-
 .../lib/libcrypto/man/man3/EVP_CIPHER_meth_new.3   | 25 +++---
 secure/lib/libcrypto/man/man3/EVP_DigestInit.3     | 39 +++++----
 secure/lib/libcrypto/man/man3/EVP_DigestSignInit.3 | 15 ++--
 .../lib/libcrypto/man/man3/EVP_DigestVerifyInit.3  | 13 +--
 secure/lib/libcrypto/man/man3/EVP_EncodeInit.3     | 25 +++---
 secure/lib/libcrypto/man/man3/EVP_KDF.3            | 33 ++++----
 secure/lib/libcrypto/man/man3/EVP_KEM_free.3       |  9 +-
 secure/lib/libcrypto/man/man3/EVP_KEYEXCH_free.3   |  9 +-
 secure/lib/libcrypto/man/man3/EVP_KEYMGMT.3        | 13 +--
 secure/lib/libcrypto/man/man3/EVP_MAC.3            | 49 +++++------
 secure/lib/libcrypto/man/man3/EVP_MD_meth_new.3    | 17 ++--
 secure/lib/libcrypto/man/man3/EVP_OpenInit.3       |  9 +-
 secure/lib/libcrypto/man/man3/EVP_PBE_CipherInit.3 | 11 ++-
 secure/lib/libcrypto/man/man3/EVP_PKEY2PKCS8.3     |  7 +-
 .../lib/libcrypto/man/man3/EVP_PKEY_ASN1_METHOD.3  | 59 +++++++-------
 secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_ctrl.3  | 25 +++---
 .../libcrypto/man/man3/EVP_PKEY_CTX_get0_libctx.3  |  7 +-
 .../libcrypto/man/man3/EVP_PKEY_CTX_get0_pkey.3    |  7 +-
 .../libcrypto/man/man3/EVP_PKEY_CTX_get_algor.3    |  9 +-
 secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_new.3   | 11 ++-
 .../man/man3/EVP_PKEY_CTX_set1_pbe_pass.3          |  7 +-
 .../libcrypto/man/man3/EVP_PKEY_CTX_set_hkdf_md.3  | 17 ++--
 .../libcrypto/man/man3/EVP_PKEY_CTX_set_params.3   |  9 +-
 .../man/man3/EVP_PKEY_CTX_set_rsa_pss_keygen_md.3  | 11 ++-
 .../libcrypto/man/man3/EVP_PKEY_CTX_set_scrypt_N.3 |  7 +-
 .../man/man3/EVP_PKEY_CTX_set_tls1_prf_md.3        |  7 +-
 .../libcrypto/man/man3/EVP_PKEY_asn1_get_count.3   | 11 ++-
 secure/lib/libcrypto/man/man3/EVP_PKEY_check.3     |  7 +-
 .../libcrypto/man/man3/EVP_PKEY_copy_parameters.3  | 15 ++--
 .../lib/libcrypto/man/man3/EVP_PKEY_decapsulate.3  | 15 ++--
 secure/lib/libcrypto/man/man3/EVP_PKEY_decrypt.3   | 21 +++--
 secure/lib/libcrypto/man/man3/EVP_PKEY_derive.3    |  7 +-
 .../man/man3/EVP_PKEY_digestsign_supports_digest.3 |  7 +-
 .../lib/libcrypto/man/man3/EVP_PKEY_encapsulate.3  | 17 ++--
 secure/lib/libcrypto/man/man3/EVP_PKEY_encrypt.3   |  9 +-
 secure/lib/libcrypto/man/man3/EVP_PKEY_fromdata.3  | 13 +--
 secure/lib/libcrypto/man/man3/EVP_PKEY_get_attr.3  | 11 ++-
 .../man/man3/EVP_PKEY_get_default_digest_nid.3     |  7 +-
 .../libcrypto/man/man3/EVP_PKEY_get_field_type.3   | 13 +--
 .../libcrypto/man/man3/EVP_PKEY_get_group_name.3   | 11 ++-
 secure/lib/libcrypto/man/man3/EVP_PKEY_get_size.3  | 23 +++---
 .../libcrypto/man/man3/EVP_PKEY_gettable_params.3  | 11 ++-
 secure/lib/libcrypto/man/man3/EVP_PKEY_is_a.3      | 11 ++-
 .../libcrypto/man/man3/EVP_PKEY_meth_get_count.3   |  7 +-
 secure/lib/libcrypto/man/man3/EVP_PKEY_meth_new.3  | 27 +++---
 secure/lib/libcrypto/man/man3/EVP_PKEY_new.3       | 19 +++--
 .../libcrypto/man/man3/EVP_PKEY_print_private.3    |  7 +-
 secure/lib/libcrypto/man/man3/EVP_PKEY_set1_RSA.3  | 23 +++---
 .../man/man3/EVP_PKEY_set1_encoded_public_key.3    | 17 ++--
 secure/lib/libcrypto/man/man3/EVP_PKEY_set_type.3  |  9 +-
 .../libcrypto/man/man3/EVP_PKEY_settable_params.3  |  7 +-
 secure/lib/libcrypto/man/man3/EVP_PKEY_sign.3      | 47 ++++++-----
 secure/lib/libcrypto/man/man3/EVP_PKEY_todata.3    |  9 +-
 secure/lib/libcrypto/man/man3/EVP_PKEY_verify.3    | 43 +++++-----
 .../libcrypto/man/man3/EVP_PKEY_verify_recover.3   | 13 +--
 secure/lib/libcrypto/man/man3/EVP_RAND.3           | 35 ++++----
 secure/lib/libcrypto/man/man3/EVP_SIGNATURE.3      |  9 +-
 secure/lib/libcrypto/man/man3/EVP_SKEYMGMT.3       | 13 +--
 secure/lib/libcrypto/man/man3/EVP_SealInit.3       | 11 ++-
 secure/lib/libcrypto/man/man3/EVP_SignInit.3       | 11 ++-
 secure/lib/libcrypto/man/man3/EVP_VerifyInit.3     | 11 ++-
 secure/lib/libcrypto/man/man3/EVP_aes_128_gcm.3    | 17 ++--
 secure/lib/libcrypto/man/man3/EVP_aria_128_gcm.3   |  9 +-
 secure/lib/libcrypto/man/man3/EVP_bf_cbc.3         |  7 +-
 secure/lib/libcrypto/man/man3/EVP_blake2b512.3     |  9 +-
 .../lib/libcrypto/man/man3/EVP_camellia_128_ecb.3  |  7 +-
 secure/lib/libcrypto/man/man3/EVP_cast5_cbc.3      |  7 +-
 secure/lib/libcrypto/man/man3/EVP_chacha20.3       |  9 +-
 secure/lib/libcrypto/man/man3/EVP_des_cbc.3        | 11 ++-
 secure/lib/libcrypto/man/man3/EVP_desx_cbc.3       | 11 ++-
 secure/lib/libcrypto/man/man3/EVP_idea_cbc.3       |  7 +-
 secure/lib/libcrypto/man/man3/EVP_md2.3            |  7 +-
 secure/lib/libcrypto/man/man3/EVP_md4.3            |  7 +-
 secure/lib/libcrypto/man/man3/EVP_md5.3            |  9 +-
 secure/lib/libcrypto/man/man3/EVP_mdc2.3           | 11 ++-
 secure/lib/libcrypto/man/man3/EVP_rc2_cbc.3        |  7 +-
 secure/lib/libcrypto/man/man3/EVP_rc4.3            |  7 +-
 .../lib/libcrypto/man/man3/EVP_rc5_32_12_16_cbc.3  |  7 +-
 secure/lib/libcrypto/man/man3/EVP_ripemd160.3      |  9 +-
 secure/lib/libcrypto/man/man3/EVP_seed_cbc.3       |  7 +-
 .../man/man3/EVP_set_default_properties.3          | 17 ++--
 secure/lib/libcrypto/man/man3/EVP_sha1.3           |  7 +-
 secure/lib/libcrypto/man/man3/EVP_sha224.3         |  7 +-
 secure/lib/libcrypto/man/man3/EVP_sha3_224.3       |  7 +-
 secure/lib/libcrypto/man/man3/EVP_sm3.3            |  7 +-
 secure/lib/libcrypto/man/man3/EVP_sm4_cbc.3        |  7 +-
 secure/lib/libcrypto/man/man3/EVP_whirlpool.3      |  7 +-
 secure/lib/libcrypto/man/man3/GENERAL_NAME.3       |  7 +-
 secure/lib/libcrypto/man/man3/HMAC.3               |  9 +-
 secure/lib/libcrypto/man/man3/MD5.3                |  7 +-
 secure/lib/libcrypto/man/man3/MDC2_Init.3          |  9 +-
 secure/lib/libcrypto/man/man3/NCONF_new_ex.3       |  7 +-
 secure/lib/libcrypto/man/man3/OBJ_nid2obj.3        | 13 +--
 secure/lib/libcrypto/man/man3/OCSP_REQUEST_new.3   |  7 +-
 secure/lib/libcrypto/man/man3/OCSP_cert_to_id.3    |  7 +-
 .../libcrypto/man/man3/OCSP_request_add1_nonce.3   |  9 +-
 .../lib/libcrypto/man/man3/OCSP_resp_find_status.3 | 11 ++-
 .../lib/libcrypto/man/man3/OCSP_response_status.3  |  7 +-
 secure/lib/libcrypto/man/man3/OCSP_sendreq_new.3   |  7 +-
 secure/lib/libcrypto/man/man3/OPENSSL_Applink.3    | 13 +--
 secure/lib/libcrypto/man/man3/OPENSSL_FILE.3       |  7 +-
 .../lib/libcrypto/man/man3/OPENSSL_LH_COMPFUNC.3   | 33 ++++----
 secure/lib/libcrypto/man/man3/OPENSSL_LH_stats.3   | 19 +++--
 secure/lib/libcrypto/man/man3/OPENSSL_config.3     | 11 ++-
 .../lib/libcrypto/man/man3/OPENSSL_fork_prepare.3  |  7 +-
 secure/lib/libcrypto/man/man3/OPENSSL_gmtime.3     |  7 +-
 .../lib/libcrypto/man/man3/OPENSSL_hexchar2int.3   | 17 ++--
 secure/lib/libcrypto/man/man3/OPENSSL_ia32cap.3    | 27 +++---
 secure/lib/libcrypto/man/man3/OPENSSL_init_ssl.3   |  9 +-
 .../libcrypto/man/man3/OPENSSL_instrument_bus.3    | 19 +++--
 .../man/man3/OPENSSL_load_builtin_modules.3        |  7 +-
 .../lib/libcrypto/man/man3/OPENSSL_load_u16_le.3   | 15 ++--
 secure/lib/libcrypto/man/man3/OPENSSL_s390xcap.3   | 19 +++--
 .../lib/libcrypto/man/man3/OPENSSL_secure_malloc.3 | 15 ++--
 secure/lib/libcrypto/man/man3/OPENSSL_strcasecmp.3 | 15 ++--
 secure/lib/libcrypto/man/man3/OSSL_ALGORITHM.3     | 23 +++---
 secure/lib/libcrypto/man/man3/OSSL_CALLBACK.3      |  9 +-
 secure/lib/libcrypto/man/man3/OSSL_CMP_log_open.3  | 17 ++--
 .../lib/libcrypto/man/man3/OSSL_CORE_MAKE_FUNC.3   |  7 +-
 .../man/man3/OSSL_CRMF_MSG_set0_validity.3         | 19 +++--
 .../man/man3/OSSL_CRMF_MSG_set1_regCtrl_regToken.3 |  7 +-
 .../man/man3/OSSL_CRMF_MSG_set1_regInfo_certReq.3  |  7 +-
 secure/lib/libcrypto/man/man3/OSSL_DECODER.3       | 15 ++--
 .../lib/libcrypto/man/man3/OSSL_DECODER_from_bio.3 | 11 ++-
 secure/lib/libcrypto/man/man3/OSSL_DISPATCH.3      |  9 +-
 secure/lib/libcrypto/man/man3/OSSL_ENCODER.3       | 15 ++--
 .../lib/libcrypto/man/man3/OSSL_ENCODER_to_bio.3   |  9 +-
 .../lib/libcrypto/man/man3/OSSL_ERR_STATE_save.3   |  7 +-
 .../man/man3/OSSL_ESS_check_signing_certs.3        |  9 +-
 .../libcrypto/man/man3/OSSL_GENERAL_NAMES_print.3  |  7 +-
 .../lib/libcrypto/man/man3/OSSL_IETF_ATTR_SYNTAX.3 |  7 +-
 .../man/man3/OSSL_IETF_ATTR_SYNTAX_print.3         |  7 +-
 .../man/man3/OSSL_INDICATOR_set_callback.3         | 13 +--
 secure/lib/libcrypto/man/man3/OSSL_ITEM.3          | 13 +--
 secure/lib/libcrypto/man/man3/OSSL_LIB_CTX.3       | 19 +++--
 .../man/man3/OSSL_LIB_CTX_set_conf_diagnostics.3   |  7 +-
 secure/lib/libcrypto/man/man3/OSSL_PARAM.3         | 29 ++++---
 secure/lib/libcrypto/man/man3/OSSL_PARAM_BLD.3     |  7 +-
 .../man/man3/OSSL_PARAM_allocate_from_text.3       | 21 +++--
 secure/lib/libcrypto/man/man3/OSSL_PARAM_dup.3     |  9 +-
 secure/lib/libcrypto/man/man3/OSSL_PARAM_int.3     | 31 +++----
 .../libcrypto/man/man3/OSSL_PARAM_print_to_bio.3   |  9 +-
 .../libcrypto/man/man3/OSSL_QUIC_client_method.3   |  9 +-
 secure/lib/libcrypto/man/man3/OSSL_SELF_TEST_new.3 | 19 +++--
 .../man/man3/OSSL_SELF_TEST_set_callback.3         |  7 +-
 secure/lib/libcrypto/man/man3/OSSL_STORE_INFO.3    | 17 ++--
 secure/lib/libcrypto/man/man3/OSSL_STORE_LOADER.3  | 15 ++--
 secure/lib/libcrypto/man/man3/OSSL_STORE_SEARCH.3  |  9 +-
 secure/lib/libcrypto/man/man3/OSSL_STORE_attach.3  |  7 +-
 secure/lib/libcrypto/man/man3/OSSL_STORE_expect.3  |  9 +-
 secure/lib/libcrypto/man/man3/OSSL_STORE_open.3    | 17 ++--
 secure/lib/libcrypto/man/man3/OSSL_sleep.3         |  7 +-
 secure/lib/libcrypto/man/man3/OSSL_trace_enabled.3 | 23 +++---
 .../man/man3/OSSL_trace_get_category_num.3         |  7 +-
 .../libcrypto/man/man3/OSSL_trace_set_channel.3    | 25 +++---
 .../man/man3/OpenSSL_add_all_algorithms.3          |  7 +-
 secure/lib/libcrypto/man/man3/OpenSSL_version.3    | 15 ++--
 .../libcrypto/man/man3/PBMAC1_get1_pbkdf2_param.3  |  7 +-
 .../libcrypto/man/man3/PEM_X509_INFO_read_bio_ex.3 |  7 +-
 secure/lib/libcrypto/man/man3/PEM_bytes_read_bio.3 | 19 +++--
 secure/lib/libcrypto/man/man3/PEM_read.3           | 15 ++--
 secure/lib/libcrypto/man/man3/PEM_read_CMS.3       | 11 ++-
 .../libcrypto/man/man3/PEM_read_bio_PrivateKey.3   | 19 +++--
 secure/lib/libcrypto/man/man3/PEM_read_bio_ex.3    |  7 +-
 .../libcrypto/man/man3/PEM_write_bio_CMS_stream.3  |  7 +-
 .../man/man3/PEM_write_bio_PKCS7_stream.3          |  7 +-
 .../lib/libcrypto/man/man3/PKCS12_PBE_keyivgen.3   |  9 +-
 .../man/man3/PKCS12_SAFEBAG_create_cert.3          |  7 +-
 .../libcrypto/man/man3/PKCS12_SAFEBAG_get0_attrs.3 |  7 +-
 .../libcrypto/man/man3/PKCS12_SAFEBAG_get1_cert.3  |  7 +-
 .../libcrypto/man/man3/PKCS12_SAFEBAG_set0_attrs.3 |  7 +-
 .../libcrypto/man/man3/PKCS12_add1_attr_by_NID.3   |  7 +-
 .../libcrypto/man/man3/PKCS12_add_CSPName_asc.3    |  7 +-
 secure/lib/libcrypto/man/man3/PKCS12_add_cert.3    |  7 +-
 .../man/man3/PKCS12_add_friendlyname_asc.3         |  7 +-
 .../lib/libcrypto/man/man3/PKCS12_add_localkeyid.3 |  7 +-
 secure/lib/libcrypto/man/man3/PKCS12_add_safe.3    |  7 +-
 secure/lib/libcrypto/man/man3/PKCS12_create.3      |  7 +-
 .../lib/libcrypto/man/man3/PKCS12_decrypt_skey.3   |  7 +-
 secure/lib/libcrypto/man/man3/PKCS12_gen_mac.3     |  9 +-
 .../libcrypto/man/man3/PKCS12_get_friendlyname.3   |  7 +-
 secure/lib/libcrypto/man/man3/PKCS12_init.3        |  7 +-
 .../libcrypto/man/man3/PKCS12_item_decrypt_d2i.3   |  7 +-
 .../libcrypto/man/man3/PKCS12_key_gen_utf8_ex.3    | 11 ++-
 secure/lib/libcrypto/man/man3/PKCS12_newpass.3     |  7 +-
 .../lib/libcrypto/man/man3/PKCS12_pack_p7encdata.3 |  9 +-
 secure/lib/libcrypto/man/man3/PKCS12_parse.3       | 13 +--
 secure/lib/libcrypto/man/man3/PKCS5_PBKDF2_HMAC.3  |  7 +-
 secure/lib/libcrypto/man/man3/PKCS7_encrypt.3      |  7 +-
 .../libcrypto/man/man3/PKCS7_get_octet_string.3    |  7 +-
 secure/lib/libcrypto/man/man3/PKCS7_sign.3         | 13 +--
 .../lib/libcrypto/man/man3/PKCS7_sign_add_signer.3 | 15 ++--
 .../lib/libcrypto/man/man3/PKCS7_type_is_other.3   |  7 +-
 secure/lib/libcrypto/man/man3/PKCS7_verify.3       | 29 ++++---
 secure/lib/libcrypto/man/man3/PKCS8_encrypt.3      |  7 +-
 .../lib/libcrypto/man/man3/PKCS8_pkey_add1_attr.3  |  7 +-
 secure/lib/libcrypto/man/man3/RAND_add.3           |  9 +-
 secure/lib/libcrypto/man/man3/RAND_cleanup.3       |  9 +-
 secure/lib/libcrypto/man/man3/RAND_egd.3           |  7 +-
 secure/lib/libcrypto/man/man3/RAND_get0_primary.3  | 13 +--
 secure/lib/libcrypto/man/man3/RAND_load_file.3     | 13 +--
 secure/lib/libcrypto/man/man3/RAND_set_DRBG_type.3 | 11 ++-
 .../lib/libcrypto/man/man3/RAND_set_rand_method.3  |  7 +-
 secure/lib/libcrypto/man/man3/RC4_set_key.3        |  9 +-
 secure/lib/libcrypto/man/man3/RIPEMD160_Init.3     |  9 +-
 secure/lib/libcrypto/man/man3/RSA_blinding_on.3    |  7 +-
 secure/lib/libcrypto/man/man3/RSA_check_key.3      | 11 ++-
 secure/lib/libcrypto/man/man3/RSA_generate_key.3   | 13 +--
 secure/lib/libcrypto/man/man3/RSA_get0_key.3       | 29 ++++---
 secure/lib/libcrypto/man/man3/RSA_meth_new.3       | 11 ++-
 secure/lib/libcrypto/man/man3/RSA_new.3            |  7 +-
 .../man/man3/RSA_padding_add_PKCS1_type_1.3        | 11 ++-
 secure/lib/libcrypto/man/man3/RSA_print.3          |  9 +-
 .../lib/libcrypto/man/man3/RSA_private_encrypt.3   | 11 ++-
 secure/lib/libcrypto/man/man3/RSA_public_encrypt.3 | 21 +++--
 secure/lib/libcrypto/man/man3/RSA_sign.3           | 13 +--
 .../man/man3/RSA_sign_ASN1_OCTET_STRING.3          |  9 +-
 secure/lib/libcrypto/man/man3/RSA_size.3           |  7 +-
 secure/lib/libcrypto/man/man3/SCT_new.3            | 13 +--
 secure/lib/libcrypto/man/man3/SCT_print.3          | 13 +--
 secure/lib/libcrypto/man/man3/SCT_validate.3       | 11 ++-
 secure/lib/libcrypto/man/man3/SHA256_Init.3        |  9 +-
 secure/lib/libcrypto/man/man3/SMIME_read_ASN1.3    |  7 +-
 secure/lib/libcrypto/man/man3/SMIME_read_CMS.3     |  7 +-
 secure/lib/libcrypto/man/man3/SMIME_read_PKCS7.3   |  7 +-
 secure/lib/libcrypto/man/man3/SMIME_write_ASN1.3   |  7 +-
 secure/lib/libcrypto/man/man3/SMIME_write_CMS.3    |  7 +-
 secure/lib/libcrypto/man/man3/SMIME_write_PKCS7.3  |  7 +-
 secure/lib/libcrypto/man/man3/SRP_Calc_B.3         |  9 +-
 secure/lib/libcrypto/man/man3/SRP_VBASE_new.3      | 17 ++--
 .../lib/libcrypto/man/man3/SRP_create_verifier.3   | 11 ++-
 secure/lib/libcrypto/man/man3/SRP_user_pwd_new.3   |  7 +-
 .../lib/libcrypto/man/man3/SSL_CIPHER_get_name.3   | 23 +++---
 .../man/man3/SSL_COMP_add_compression_method.3     |  9 +-
 secure/lib/libcrypto/man/man3/SSL_CONF_CTX_new.3   |  7 +-
 .../libcrypto/man/man3/SSL_CONF_CTX_set1_prefix.3  |  7 +-
 .../libcrypto/man/man3/SSL_CONF_CTX_set_flags.3    |  9 +-
 .../libcrypto/man/man3/SSL_CONF_CTX_set_ssl_ctx.3  |  7 +-
 secure/lib/libcrypto/man/man3/SSL_CONF_cmd_argv.3  |  9 +-
 .../libcrypto/man/man3/SSL_CTX_add1_chain_cert.3   |  7 +-
 .../man/man3/SSL_CTX_add_extra_chain_cert.3        |  7 +-
 .../lib/libcrypto/man/man3/SSL_CTX_add_session.3   | 13 +--
 secure/lib/libcrypto/man/man3/SSL_CTX_config.3     |  7 +-
 secure/lib/libcrypto/man/man3/SSL_CTX_ctrl.3       |  7 +-
 .../lib/libcrypto/man/man3/SSL_CTX_dane_enable.3   | 45 +++++-----
 .../libcrypto/man/man3/SSL_CTX_flush_sessions.3    |  7 +-
 secure/lib/libcrypto/man/man3/SSL_CTX_free.3       | 11 ++-
 secure/lib/libcrypto/man/man3/SSL_CTX_get0_param.3 |  7 +-
 .../libcrypto/man/man3/SSL_CTX_get_verify_mode.3   |  7 +-
 .../man/man3/SSL_CTX_has_client_custom_ext.3       |  7 +-
 .../man/man3/SSL_CTX_load_verify_locations.3       | 11 ++-
 secure/lib/libcrypto/man/man3/SSL_CTX_new.3        | 25 +++---
 .../lib/libcrypto/man/man3/SSL_CTX_sess_number.3   |  7 +-
 .../man/man3/SSL_CTX_sess_set_cache_size.3         |  7 +-
 .../libcrypto/man/man3/SSL_CTX_sess_set_get_cb.3   | 11 ++-
 secure/lib/libcrypto/man/man3/SSL_CTX_sessions.3   |  7 +-
 .../lib/libcrypto/man/man3/SSL_CTX_set0_CA_list.3  | 13 +--
 .../man/man3/SSL_CTX_set1_cert_comp_preference.3   | 29 ++++---
 .../lib/libcrypto/man/man3/SSL_CTX_set1_sigalgs.3  | 11 ++-
 .../man/man3/SSL_CTX_set1_verify_cert_store.3      |  9 +-
 .../man/man3/SSL_CTX_set_alpn_select_cb.3          | 35 ++++----
 .../lib/libcrypto/man/man3/SSL_CTX_set_cert_cb.3   |  7 +-
 .../libcrypto/man/man3/SSL_CTX_set_cert_store.3    | 11 ++-
 .../libcrypto/man/man3/SSL_CTX_set_cipher_list.3   | 17 ++--
 .../man/man3/SSL_CTX_set_client_cert_cb.3          |  7 +-
 .../man/man3/SSL_CTX_set_ct_validation_callback.3  | 21 +++--
 .../man/man3/SSL_CTX_set_ctlog_list_file.3         |  7 +-
 .../man/man3/SSL_CTX_set_default_passwd_cb.3       |  9 +-
 .../man/man3/SSL_CTX_set_generate_session_id.3     |  7 +-
 .../libcrypto/man/man3/SSL_CTX_set_info_callback.3 |  9 +-
 .../man/man3/SSL_CTX_set_keylog_callback.3         |  9 +-
 .../libcrypto/man/man3/SSL_CTX_set_max_cert_list.3 | 15 ++--
 .../man/man3/SSL_CTX_set_min_proto_version.3       |  9 +-
 secure/lib/libcrypto/man/man3/SSL_CTX_set_mode.3   | 31 +++----
 .../man/man3/SSL_CTX_set_new_pending_conn_cb.3     |  9 +-
 .../libcrypto/man/man3/SSL_CTX_set_num_tickets.3   | 13 +--
 .../lib/libcrypto/man/man3/SSL_CTX_set_options.3   | 59 +++++++-------
 .../man/man3/SSL_CTX_set_quiet_shutdown.3          |  7 +-
 .../libcrypto/man/man3/SSL_CTX_set_read_ahead.3    | 17 ++--
 .../man/man3/SSL_CTX_set_record_padding_callback.3 | 13 +--
 .../man/man3/SSL_CTX_set_session_ticket_cb.3       |  9 +-
 .../man/man3/SSL_CTX_set_split_send_fragment.3     | 17 ++--
 .../libcrypto/man/man3/SSL_CTX_set_srp_password.3  |  7 +-
 .../libcrypto/man/man3/SSL_CTX_set_ssl_version.3   | 11 ++-
 .../SSL_CTX_set_stateless_cookie_generate_cb.3     | 13 +--
 .../lib/libcrypto/man/man3/SSL_CTX_set_timeout.3   |  7 +-
 .../man/man3/SSL_CTX_set_tlsext_status_cb.3        |  7 +-
 .../man/man3/SSL_CTX_set_tlsext_ticket_key_cb.3    | 11 ++-
 .../man/man3/SSL_CTX_set_tlsext_use_srtp.3         | 11 ++-
 .../lib/libcrypto/man/man3/SSL_CTX_set_tmp_ecdh.3  |  7 +-
 .../libcrypto/man/man3/SSL_CTX_use_certificate.3   |  9 +-
 .../man/man3/SSL_CTX_use_psk_identity_hint.3       | 13 +--
 .../libcrypto/man/man3/SSL_CTX_use_serverinfo.3    |  9 +-
 secure/lib/libcrypto/man/man3/SSL_SESSION_free.3   |  7 +-
 .../libcrypto/man/man3/SSL_SESSION_get0_cipher.3   |  7 +-
 .../libcrypto/man/man3/SSL_SESSION_get0_hostname.3 | 13 +--
 .../man/man3/SSL_SESSION_get0_id_context.3         |  7 +-
 .../lib/libcrypto/man/man3/SSL_SESSION_get0_peer.3 |  9 +-
 .../man/man3/SSL_SESSION_get_compress_id.3         |  9 +-
 .../man/man3/SSL_SESSION_get_protocol_version.3    |  7 +-
 .../lib/libcrypto/man/man3/SSL_SESSION_get_time.3  |  7 +-
 .../libcrypto/man/man3/SSL_SESSION_has_ticket.3    |  7 +-
 .../libcrypto/man/man3/SSL_SESSION_is_resumable.3  |  9 +-
 secure/lib/libcrypto/man/man3/SSL_SESSION_print.3  |  7 +-
 .../lib/libcrypto/man/man3/SSL_SESSION_set1_id.3   |  7 +-
 secure/lib/libcrypto/man/man3/SSL_accept.3         |  7 +-
 secure/lib/libcrypto/man/man3/SSL_accept_stream.3  |  7 +-
 .../lib/libcrypto/man/man3/SSL_alert_type_string.3 | 17 ++--
 secure/lib/libcrypto/man/man3/SSL_alloc_buffers.3  |  9 +-
 secure/lib/libcrypto/man/man3/SSL_check_chain.3    |  7 +-
 secure/lib/libcrypto/man/man3/SSL_clear.3          |  9 +-
 secure/lib/libcrypto/man/man3/SSL_connect.3        | 13 +--
 secure/lib/libcrypto/man/man3/SSL_do_handshake.3   |  7 +-
 .../man/man3/SSL_export_keying_material.3          |  7 +-
 .../libcrypto/man/man3/SSL_extension_supported.3   |  9 +-
 secure/lib/libcrypto/man/man3/SSL_free.3           | 11 ++-
 .../lib/libcrypto/man/man3/SSL_get0_connection.3   | 13 +--
 .../lib/libcrypto/man/man3/SSL_get0_group_name.3   |  9 +-
 secure/lib/libcrypto/man/man3/SSL_get0_peer_rpk.3  | 21 +++--
 secure/lib/libcrypto/man/man3/SSL_get0_peer_scts.3 |  9 +-
 .../libcrypto/man/man3/SSL_get1_builtin_sigalgs.3  | 11 ++-
 secure/lib/libcrypto/man/man3/SSL_get_SSL_CTX.3    |  7 +-
 .../lib/libcrypto/man/man3/SSL_get_all_async_fds.3 |  9 +-
 .../lib/libcrypto/man/man3/SSL_get_certificate.3   | 13 +--
 .../lib/libcrypto/man/man3/SSL_get_client_random.3 | 13 +--
 .../libcrypto/man/man3/SSL_get_conn_close_info.3   | 17 ++--
 .../libcrypto/man/man3/SSL_get_current_cipher.3    |  9 +-
 .../libcrypto/man/man3/SSL_get_default_timeout.3   |  7 +-
 .../lib/libcrypto/man/man3/SSL_get_event_timeout.3 |  9 +-
 .../lib/libcrypto/man/man3/SSL_get_extms_support.3 |  7 +-
 secure/lib/libcrypto/man/man3/SSL_get_fd.3         |  7 +-
 .../lib/libcrypto/man/man3/SSL_get_handshake_rtt.3 | 15 ++--
 .../libcrypto/man/man3/SSL_get_peer_cert_chain.3   | 13 +--
 .../libcrypto/man/man3/SSL_get_peer_certificate.3  |  7 +-
 .../man/man3/SSL_get_peer_signature_nid.3          | 11 ++-
 .../lib/libcrypto/man/man3/SSL_get_peer_tmp_key.3  | 13 +--
 .../lib/libcrypto/man/man3/SSL_get_psk_identity.3  |  7 +-
 secure/lib/libcrypto/man/man3/SSL_get_rbio.3       |  7 +-
 .../libcrypto/man/man3/SSL_get_rpoll_descriptor.3  | 11 ++-
 secure/lib/libcrypto/man/man3/SSL_get_session.3    | 13 +--
 .../libcrypto/man/man3/SSL_get_shared_sigalgs.3    |  9 +-
 secure/lib/libcrypto/man/man3/SSL_get_stream_id.3  |  9 +-
 .../libcrypto/man/man3/SSL_get_stream_read_state.3 | 23 +++---
 .../lib/libcrypto/man/man3/SSL_get_verify_result.3 |  7 +-
 secure/lib/libcrypto/man/man3/SSL_get_version.3    | 11 ++-
 secure/lib/libcrypto/man/man3/SSL_group_to_name.3  | 13 +--
 secure/lib/libcrypto/man/man3/SSL_handle_events.3  | 11 ++-
 .../lib/libcrypto/man/man3/SSL_inject_net_dgram.3  |  7 +-
 secure/lib/libcrypto/man/man3/SSL_key_update.3     |  7 +-
 secure/lib/libcrypto/man/man3/SSL_library_init.3   |  7 +-
 .../libcrypto/man/man3/SSL_load_client_CA_file.3   |  7 +-
 secure/lib/libcrypto/man/man3/SSL_new_domain.3     |  7 +-
 secure/lib/libcrypto/man/man3/SSL_new_listener.3   | 21 +++--
 secure/lib/libcrypto/man/man3/SSL_new_stream.3     | 15 ++--
 secure/lib/libcrypto/man/man3/SSL_pending.3        |  9 +-
 secure/lib/libcrypto/man/man3/SSL_read.3           | 21 +++--
 .../lib/libcrypto/man/man3/SSL_read_early_data.3   | 23 +++---
 secure/lib/libcrypto/man/man3/SSL_rstate_string.3  |  7 +-
 secure/lib/libcrypto/man/man3/SSL_session_reused.3 |  7 +-
 secure/lib/libcrypto/man/man3/SSL_set1_host.3      | 11 ++-
 .../man/man3/SSL_set1_initial_peer_addr.3          |  7 +-
 .../libcrypto/man/man3/SSL_set1_server_cert_type.3 |  9 +-
 .../libcrypto/man/man3/SSL_set_async_callback.3    | 11 ++-
 secure/lib/libcrypto/man/man3/SSL_set_bio.3        |  9 +-
 .../lib/libcrypto/man/man3/SSL_set_blocking_mode.3 |  9 +-
 .../lib/libcrypto/man/man3/SSL_set_connect_state.3 |  7 +-
 .../man/man3/SSL_set_default_stream_mode.3         | 21 +++--
 secure/lib/libcrypto/man/man3/SSL_set_fd.3         |  9 +-
 .../man/man3/SSL_set_incoming_stream_policy.3      | 13 +--
 .../lib/libcrypto/man/man3/SSL_set_retry_verify.3  |  7 +-
 secure/lib/libcrypto/man/man3/SSL_set_session.3    |  9 +-
 .../libcrypto/man/man3/SSL_set_session_secret_cb.3 | 11 ++-
 secure/lib/libcrypto/man/man3/SSL_set_shutdown.3   | 11 ++-
 .../lib/libcrypto/man/man3/SSL_set_verify_result.3 |  7 +-
 secure/lib/libcrypto/man/man3/SSL_shutdown.3       | 61 +++++++-------
 secure/lib/libcrypto/man/man3/SSL_state_string.3   |  9 +-
 .../lib/libcrypto/man/man3/SSL_stream_conclude.3   | 15 ++--
 secure/lib/libcrypto/man/man3/SSL_stream_reset.3   | 13 +--
 secure/lib/libcrypto/man/man3/SSL_want.3           |  9 +-
 secure/lib/libcrypto/man/man3/SSL_write.3          | 21 +++--
 secure/lib/libcrypto/man/man3/TS_RESP_CTX_new.3    |  7 +-
 secure/lib/libcrypto/man/man3/TS_VERIFY_CTX.3      | 19 +++--
 secure/lib/libcrypto/man/man3/UI_STRING.3          | 13 +--
 secure/lib/libcrypto/man/man3/UI_UTIL_read_pw.3    |  7 +-
 secure/lib/libcrypto/man/man3/UI_create_method.3   | 33 ++++----
 secure/lib/libcrypto/man/man3/X509V3_get_d2i.3     |  9 +-
 secure/lib/libcrypto/man/man3/X509V3_set_ctx.3     | 11 ++-
 .../lib/libcrypto/man/man3/X509_ACERT_add1_attr.3  |  7 +-
 .../libcrypto/man/man3/X509_ACERT_add_attr_nconf.3 |  7 +-
 .../man/man3/X509_ACERT_get0_holder_baseCertId.3   | 11 ++-
 .../lib/libcrypto/man/man3/X509_ACERT_get_attr.3   |  9 +-
 .../lib/libcrypto/man/man3/X509_ACERT_print_ex.3   |  9 +-
 secure/lib/libcrypto/man/man3/X509_ALGOR_dup.3     |  7 +-
 secure/lib/libcrypto/man/man3/X509_ATTRIBUTE.3     |  9 +-
 .../libcrypto/man/man3/X509_CRL_get0_by_serial.3   |  7 +-
 .../libcrypto/man/man3/X509_EXTENSION_set_object.3 | 13 +--
 secure/lib/libcrypto/man/man3/X509_LOOKUP.3        | 15 ++--
 .../lib/libcrypto/man/man3/X509_LOOKUP_hash_dir.3  | 11 ++-
 .../lib/libcrypto/man/man3/X509_LOOKUP_meth_new.3  | 13 +--
 .../man/man3/X509_NAME_add_entry_by_txt.3          | 11 ++-
 secure/lib/libcrypto/man/man3/X509_NAME_get0_der.3 |  7 +-
 .../man/man3/X509_NAME_get_index_by_NID.3          |  9 +-
 secure/lib/libcrypto/man/man3/X509_PUBKEY_new.3    | 15 ++--
 secure/lib/libcrypto/man/man3/X509_REQ_get_attr.3  | 13 +--
 .../libcrypto/man/man3/X509_REQ_get_extensions.3   |  9 +-
 secure/lib/libcrypto/man/man3/X509_SIG_get0.3      |  7 +-
 .../man/man3/X509_STORE_CTX_get_by_subject.3       |  7 +-
 .../libcrypto/man/man3/X509_STORE_CTX_get_error.3  | 45 +++++-----
 secure/lib/libcrypto/man/man3/X509_STORE_CTX_new.3 | 19 +++--
 .../man/man3/X509_STORE_CTX_set_verify_cb.3        |  9 +-
 .../lib/libcrypto/man/man3/X509_STORE_add_cert.3   | 17 ++--
 secure/lib/libcrypto/man/man3/X509_STORE_new.3     |  7 +-
 .../man/man3/X509_STORE_set_verify_cb_func.3       | 15 ++--
 .../man/man3/X509_VERIFY_PARAM_set_flags.3         | 47 ++++++-----
 secure/lib/libcrypto/man/man3/X509_add_cert.3      |  9 +-
 secure/lib/libcrypto/man/man3/X509_check_ca.3      |  9 +-
 secure/lib/libcrypto/man/man3/X509_check_host.3    | 17 ++--
 secure/lib/libcrypto/man/man3/X509_check_issued.3  |  9 +-
 .../libcrypto/man/man3/X509_check_private_key.3    |  7 +-
 secure/lib/libcrypto/man/man3/X509_check_purpose.3 | 17 ++--
 secure/lib/libcrypto/man/man3/X509_cmp.3           |  9 +-
 secure/lib/libcrypto/man/man3/X509_cmp_time.3      |  7 +-
 secure/lib/libcrypto/man/man3/X509_digest.3        |  7 +-
 secure/lib/libcrypto/man/man3/X509_dup.3           | 15 ++--
 .../man/man3/X509_get0_distinguishing_id.3         |  7 +-
 .../lib/libcrypto/man/man3/X509_get0_notBefore.3   |  9 +-
 .../lib/libcrypto/man/man3/X509_get0_signature.3   |  7 +-
 secure/lib/libcrypto/man/man3/X509_get0_uids.3     |  7 +-
 .../libcrypto/man/man3/X509_get_extension_flags.3  | 17 ++--
 secure/lib/libcrypto/man/man3/X509_get_pubkey.3    |  7 +-
 .../lib/libcrypto/man/man3/X509_get_serialNumber.3 |  7 +-
 .../lib/libcrypto/man/man3/X509_get_subject_name.3 |  7 +-
 secure/lib/libcrypto/man/man3/X509_get_version.3   |  7 +-
 secure/lib/libcrypto/man/man3/X509_load_http.3     |  7 +-
 secure/lib/libcrypto/man/man3/X509_new.3           |  9 +-
 secure/lib/libcrypto/man/man3/X509_sign.3          |  9 +-
 secure/lib/libcrypto/man/man3/X509_verify.3        | 11 ++-
 .../lib/libcrypto/man/man3/X509v3_get_ext_by_NID.3 | 13 +--
 secure/lib/libcrypto/man/man3/b2i_PVK_bio_ex.3     |  7 +-
 .../libcrypto/man/man3/d2i_PKCS8PrivateKey_bio.3   |  7 +-
 secure/lib/libcrypto/man/man3/d2i_PrivateKey.3     | 11 ++-
 secure/lib/libcrypto/man/man3/d2i_RSAPrivateKey.3  | 15 ++--
 secure/lib/libcrypto/man/man3/d2i_SSL_SESSION.3    | 11 ++-
 secure/lib/libcrypto/man/man3/i2d_CMS_bio_stream.3 |  7 +-
 .../lib/libcrypto/man/man3/i2d_PKCS7_bio_stream.3  |  7 +-
 secure/lib/libcrypto/man/man3/i2d_re_X509_tbs.3    | 15 ++--
 secure/lib/libcrypto/man/man3/o2i_SCT_LIST.3       |  7 +-
 secure/lib/libcrypto/man/man3/s2i_ASN1_IA5STRING.3 |  9 +-
 secure/lib/libcrypto/man/man5/config.5             | 65 ++++++++-------
 secure/lib/libcrypto/man/man5/fips_config.5        | 63 +++++++-------
 secure/lib/libcrypto/man/man5/x509v3_config.5      | 61 +++++++-------
 .../lib/libcrypto/man/man7/EVP_ASYM_CIPHER-RSA.7   | 31 +++----
 .../lib/libcrypto/man/man7/EVP_ASYM_CIPHER-SM2.7   |  9 +-
 secure/lib/libcrypto/man/man7/EVP_CIPHER-ARIA.7    |  7 +-
 .../lib/libcrypto/man/man7/EVP_CIPHER-BLOWFISH.7   | 15 ++--
 .../lib/libcrypto/man/man7/EVP_CIPHER-CAMELLIA.7   |  7 +-
 secure/lib/libcrypto/man/man7/EVP_CIPHER-CAST.7    |  7 +-
 secure/lib/libcrypto/man/man7/EVP_CIPHER-CHACHA.7  |  7 +-
 secure/lib/libcrypto/man/man7/EVP_CIPHER-DES.7     | 27 +++---
 secure/lib/libcrypto/man/man7/EVP_CIPHER-IDEA.7    | 15 ++--
 secure/lib/libcrypto/man/man7/EVP_CIPHER-NULL.7    | 11 ++-
 secure/lib/libcrypto/man/man7/EVP_CIPHER-RC2.7     |  7 +-
 secure/lib/libcrypto/man/man7/EVP_CIPHER-RC4.7     |  7 +-
 secure/lib/libcrypto/man/man7/EVP_CIPHER-RC5.7     |  7 +-
 secure/lib/libcrypto/man/man7/EVP_CIPHER-SEED.7    | 15 ++--
 secure/lib/libcrypto/man/man7/EVP_KDF-ARGON2.7     | 29 ++++---
 secure/lib/libcrypto/man/man7/EVP_KDF-HKDF.7       | 31 +++----
 secure/lib/libcrypto/man/man7/EVP_KDF-HMAC-DRBG.7  | 13 +--
 secure/lib/libcrypto/man/man7/EVP_KDF-KB.7         | 31 +++----
 secure/lib/libcrypto/man/man7/EVP_KDF-KRB5KDF.7    |  9 +-
 secure/lib/libcrypto/man/man7/EVP_KDF-PBKDF1.7     | 11 ++-
 secure/lib/libcrypto/man/man7/EVP_KDF-PBKDF2.7     | 17 ++--
 secure/lib/libcrypto/man/man7/EVP_KDF-PKCS12KDF.7  | 11 ++-
 secure/lib/libcrypto/man/man7/EVP_KDF-PVKKDF.7     | 11 ++-
 secure/lib/libcrypto/man/man7/EVP_KDF-SCRYPT.7     | 15 ++--
 secure/lib/libcrypto/man/man7/EVP_KDF-SS.7         | 23 +++---
 secure/lib/libcrypto/man/man7/EVP_KDF-SSHKDF.7     | 35 ++++----
 secure/lib/libcrypto/man/man7/EVP_KDF-TLS13_KDF.7  | 29 ++++---
 secure/lib/libcrypto/man/man7/EVP_KDF-TLS1_PRF.7   | 27 +++---
 secure/lib/libcrypto/man/man7/EVP_KDF-X942-ASN1.7  | 49 +++++------
 .../lib/libcrypto/man/man7/EVP_KDF-X942-CONCAT.7   |  7 +-
 secure/lib/libcrypto/man/man7/EVP_KDF-X963.7       | 23 +++---
 secure/lib/libcrypto/man/man7/EVP_KEM-EC.7         |  7 +-
 secure/lib/libcrypto/man/man7/EVP_KEM-RSA.7        | 11 ++-
 secure/lib/libcrypto/man/man7/EVP_KEM-X25519.7     |  7 +-
 secure/lib/libcrypto/man/man7/EVP_KEYEXCH-DH.7     | 31 +++----
 secure/lib/libcrypto/man/man7/EVP_KEYEXCH-ECDH.7   | 41 +++++-----
 secure/lib/libcrypto/man/man7/EVP_KEYEXCH-X25519.7 |  9 +-
 secure/lib/libcrypto/man/man7/EVP_MAC-BLAKE2.7     | 13 +--
 secure/lib/libcrypto/man/man7/EVP_MAC-KMAC.7       | 23 +++---
 secure/lib/libcrypto/man/man7/EVP_MAC-Siphash.7    |  7 +-
 secure/lib/libcrypto/man/man7/EVP_MD-BLAKE2.7      |  7 +-
 secure/lib/libcrypto/man/man7/EVP_MD-KECCAK.7      |  7 +-
 secure/lib/libcrypto/man/man7/EVP_MD-MD2.7         |  7 +-
 secure/lib/libcrypto/man/man7/EVP_MD-MD4.7         |  7 +-
 secure/lib/libcrypto/man/man7/EVP_MD-MD5-SHA1.7    |  9 +-
 secure/lib/libcrypto/man/man7/EVP_MD-MD5.7         |  7 +-
 secure/lib/libcrypto/man/man7/EVP_MD-MDC2.7        |  9 +-
 secure/lib/libcrypto/man/man7/EVP_MD-NULL.7        |  7 +-
 secure/lib/libcrypto/man/man7/EVP_MD-RIPEMD160.7   |  7 +-
 secure/lib/libcrypto/man/man7/EVP_MD-SHA1.7        |  7 +-
 secure/lib/libcrypto/man/man7/EVP_MD-SHA2.7        |  7 +-
 secure/lib/libcrypto/man/man7/EVP_MD-SHA3.7        |  7 +-
 secure/lib/libcrypto/man/man7/EVP_MD-SHAKE.7       | 11 ++-
 secure/lib/libcrypto/man/man7/EVP_MD-SM3.7         |  7 +-
 secure/lib/libcrypto/man/man7/EVP_MD-WHIRLPOOL.7   |  7 +-
 secure/lib/libcrypto/man/man7/EVP_PKEY-DSA.7       | 11 ++-
 secure/lib/libcrypto/man/man7/EVP_PKEY-EC.7        | 65 ++++++++-------
 secure/lib/libcrypto/man/man7/EVP_PKEY-FFC.7       | 33 ++++----
 secure/lib/libcrypto/man/man7/EVP_PKEY-SM2.7       | 11 ++-
 secure/lib/libcrypto/man/man7/EVP_PKEY-X25519.7    | 17 ++--
 secure/lib/libcrypto/man/man7/EVP_RAND-HASH-DRBG.7 | 15 ++--
 secure/lib/libcrypto/man/man7/EVP_RAND-HMAC-DRBG.7 | 15 ++--
 secure/lib/libcrypto/man/man7/EVP_RAND-SEED-SRC.7  |  9 +-
 secure/lib/libcrypto/man/man7/EVP_RAND-TEST-RAND.7 | 13 +--
 secure/lib/libcrypto/man/man7/EVP_RAND.7           | 39 +++++----
 secure/lib/libcrypto/man/man7/OSSL_PROVIDER-base.7 | 21 +++--
 .../lib/libcrypto/man/man7/OSSL_PROVIDER-default.7 | 37 +++++----
 .../lib/libcrypto/man/man7/OSSL_PROVIDER-legacy.7  | 11 ++-
 secure/lib/libcrypto/man/man7/OSSL_PROVIDER-null.7 |  7 +-
 .../lib/libcrypto/man/man7/OSSL_STORE-winstore.7   | 11 ++-
 secure/lib/libcrypto/man/man7/RAND.7               | 17 ++--
 secure/lib/libcrypto/man/man7/RSA-PSS.7            | 13 +--
 secure/lib/libcrypto/man/man7/X25519.7             |  7 +-
 secure/lib/libcrypto/man/man7/bio.7                |  9 +-
 secure/lib/libcrypto/man/man7/ct.7                 |  7 +-
 secure/lib/libcrypto/man/man7/des_modes.7          | 17 ++--
 secure/lib/libcrypto/man/man7/evp.7                | 19 +++--
 secure/lib/libcrypto/man/man7/life_cycle-cipher.7  | 23 +++---
 secure/lib/libcrypto/man/man7/life_cycle-digest.7  | 21 +++--
 secure/lib/libcrypto/man/man7/life_cycle-kdf.7     | 17 ++--
 secure/lib/libcrypto/man/man7/life_cycle-mac.7     | 15 ++--
 secure/lib/libcrypto/man/man7/life_cycle-pkey.7    | 21 +++--
 secure/lib/libcrypto/man/man7/life_cycle-rand.7    | 25 +++---
 secure/lib/libcrypto/man/man7/openssl-core.h.7     |  7 +-
 .../lib/libcrypto/man/man7/openssl-core_names.h.7  | 11 ++-
 secure/lib/libcrypto/man/man7/openssl-glossary.7   | 11 ++-
 secure/lib/libcrypto/man/man7/openssl-qlog.7       | 23 +++---
 .../libcrypto/man/man7/ossl-guide-introduction.7   | 23 +++---
 .../man/man7/ossl-guide-libcrypto-introduction.7   |  9 +-
 .../man/man7/ossl-guide-libraries-introduction.7   | 31 +++----
 .../man/man7/ossl-guide-libssl-introduction.7      | 13 +--
 .../man/man7/ossl-guide-quic-client-block.7        | 21 +++--
 .../man/man7/ossl-guide-quic-client-non-block.7    | 33 ++++----
 .../man/man7/ossl-guide-quic-introduction.7        | 31 +++----
 .../man/man7/ossl-guide-quic-multi-stream.7        | 53 ++++++------
 .../man/man7/ossl-guide-quic-server-block.7        | 17 ++--
 .../man/man7/ossl-guide-quic-server-non-block.7    | 21 +++--
 .../man/man7/ossl-guide-tls-client-non-block.7     | 41 +++++-----
 .../man/man7/ossl-guide-tls-server-block.7         | 13 +--
 secure/lib/libcrypto/man/man7/ossl_store-file.7    | 27 +++---
 secure/lib/libcrypto/man/man7/ossl_store.7         |  9 +-
 .../lib/libcrypto/man/man7/passphrase-encoding.7   | 31 +++----
 secure/lib/libcrypto/man/man7/provider-cipher.7    | 19 +++--
 secure/lib/libcrypto/man/man7/provider-decoder.7   | 43 +++++-----
 secure/lib/libcrypto/man/man7/provider-encoder.7   | 45 +++++-----
 secure/lib/libcrypto/man/man7/provider-kdf.7       | 29 ++++---
 secure/lib/libcrypto/man/man7/provider-keyexch.7   | 45 +++++-----
 secure/lib/libcrypto/man/man7/provider-keymgmt.7   | 55 +++++++------
 secure/lib/libcrypto/man/man7/provider-mac.7       | 31 +++----
 secure/lib/libcrypto/man/man7/provider-object.7    | 43 +++++-----
 secure/lib/libcrypto/man/man7/provider-rand.7      | 27 +++---
 secure/lib/libcrypto/man/man7/provider-skeymgmt.7  | 23 +++---
 secure/lib/libcrypto/man/man7/provider-storemgmt.7 | 19 +++--
 secure/lib/libcrypto/man/man7/provider.7           | 13 +--
 secure/lib/libcrypto/man/man7/proxy-certificates.7 |  9 +-
 secure/lib/libcrypto/man/man7/x509.7               | 11 ++-
 .../openssl/man/openssl-namedisplay-options.1      | 15 ++--
 .../openssl/man/openssl-passphrase-options.1       |  9 +-
 secure/usr.bin/openssl/man/tsget.1                 | 23 +++---
 719 files changed, 5792 insertions(+), 3637 deletions(-)

diff --git a/secure/lib/libcrypto/man/man3/ASN1_EXTERN_FUNCS.3 b/secure/lib/libcrypto/man/man3/ASN1_EXTERN_FUNCS.3
index cb458f74017b..0e58de05f52b 100644
--- a/secure/lib/libcrypto/man/man3/ASN1_EXTERN_FUNCS.3
+++ b/secure/lib/libcrypto/man/man3/ASN1_EXTERN_FUNCS.3
@@ -1,5 +1,5 @@
 .\" -*- mode: troff; coding: utf-8 -*-
-.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
+.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -52,10 +52,13 @@
 .    \}
 .\}
 .rr rF
+.\"
+.\" Required to disable full justification in groff 1.23.0.
+.if n .ds AD l
 .\" ========================================================================
 .\"
 .IX Title "ASN1_EXTERN_FUNCS 3ossl"
-.TH ASN1_EXTERN_FUNCS 3ossl 2025-09-30 3.5.4 OpenSSL
+.TH ASN1_EXTERN_FUNCS 3ossl 2026-09-29 3.5.9 OpenSSL
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -143,7 +146,7 @@ macro.
 .IP \fIasn1_ex_d2i\fR 4
 .IX Item "asn1_ex_d2i"
 A "d2i" function responsible for converting DER data with the tag \fItag\fR and
-class \fIclass\fR into an \fBASN1_VALUE\fR. If \fI*pval\fR is non-NULL then the
+class \fIclass\fR into an \fBASN1_VALUE\fR. If \fI*pval\fR is non\-NULL then the
 \&\fBASN_VALUE\fR it points to should be reused. Otherwise a new \fBASN1_VALUE\fR
 should be allocated and stored in \fI*pval\fR. \fI*in\fR points to the DER data to be
 decoded and \fIlen\fR is the length of that data. After decoding \fI*in\fR should be
@@ -177,7 +180,7 @@ The \fIasn1_ex_i2d\fR entry may be NULL if \fIasn1_ex_i2d_ex\fR has been specifi
 instead.
 .Sp
 The return value should be negative if a fatal error occurred, or 0 if a
-non-fatal error occurred. Otherwise it should return the length of the encoded
+non\-fatal error occurred. Otherwise it should return the length of the encoded
 data.
 .IP \fIasn1_ex_print\fR 4
 .IX Item "asn1_ex_print"
diff --git a/secure/lib/libcrypto/man/man3/ASN1_INTEGER_new.3 b/secure/lib/libcrypto/man/man3/ASN1_INTEGER_new.3
index 967d636f7550..9c377a98928f 100644
--- a/secure/lib/libcrypto/man/man3/ASN1_INTEGER_new.3
+++ b/secure/lib/libcrypto/man/man3/ASN1_INTEGER_new.3
@@ -1,5 +1,5 @@
 .\" -*- mode: troff; coding: utf-8 -*-
-.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
+.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -52,10 +52,13 @@
 .    \}
 .\}
 .rr rF
+.\"
+.\" Required to disable full justification in groff 1.23.0.
+.if n .ds AD l
 .\" ========================================================================
 .\"
 .IX Title "ASN1_INTEGER_NEW 3ossl"
-.TH ASN1_INTEGER_NEW 3ossl 2025-09-30 3.5.4 OpenSSL
+.TH ASN1_INTEGER_NEW 3ossl 2026-09-29 3.5.9 OpenSSL
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff --git a/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 b/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3
index e7a3e468edcb..47f171fccc47 100644
--- a/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3
+++ b/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3
@@ -1,5 +1,5 @@
 .\" -*- mode: troff; coding: utf-8 -*-
-.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
+.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -52,10 +52,13 @@
 .    \}
 .\}
 .rr rF
+.\"
+.\" Required to disable full justification in groff 1.23.0.
+.if n .ds AD l
 .\" ========================================================================
 .\"
 .IX Title "ASN1_ITEM_LOOKUP 3ossl"
-.TH ASN1_ITEM_LOOKUP 3ossl 2025-09-30 3.5.4 OpenSSL
+.TH ASN1_ITEM_LOOKUP 3ossl 2026-09-29 3.5.9 OpenSSL
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff --git a/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 b/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3
index 847469c18a63..322393d9b8c7 100644
--- a/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3
+++ b/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3
@@ -1,5 +1,5 @@
 .\" -*- mode: troff; coding: utf-8 -*-
-.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
+.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -52,10 +52,13 @@
 .    \}
 .\}
 .rr rF
+.\"
+.\" Required to disable full justification in groff 1.23.0.
+.if n .ds AD l
 .\" ========================================================================
 .\"
 .IX Title "ASN1_OBJECT_NEW 3ossl"
-.TH ASN1_OBJECT_NEW 3ossl 2025-09-30 3.5.4 OpenSSL
+.TH ASN1_OBJECT_NEW 3ossl 2026-09-29 3.5.9 OpenSSL
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff --git a/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 b/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3
index 0a020e53cf1e..54907fbb95bf 100644
--- a/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3
+++ b/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3
@@ -1,5 +1,5 @@
 .\" -*- mode: troff; coding: utf-8 -*-
-.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
+.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -52,10 +52,13 @@
 .    \}
 .\}
 .rr rF
+.\"
+.\" Required to disable full justification in groff 1.23.0.
+.if n .ds AD l
 .\" ========================================================================
 .\"
 .IX Title "ASN1_STRING_TABLE_ADD 3ossl"
-.TH ASN1_STRING_TABLE_ADD 3ossl 2025-09-30 3.5.4 OpenSSL
+.TH ASN1_STRING_TABLE_ADD 3ossl 2026-09-29 3.5.9 OpenSSL
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff --git a/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 b/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3
index 8c20ba8451ef..4c3bc2c52483 100644
--- a/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3
+++ b/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3
@@ -1,5 +1,5 @@
 .\" -*- mode: troff; coding: utf-8 -*-
-.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
+.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -52,10 +52,13 @@
 .    \}
 .\}
 .rr rF
+.\"
+.\" Required to disable full justification in groff 1.23.0.
+.if n .ds AD l
 .\" ========================================================================
 .\"
 .IX Title "ASN1_STRING_LENGTH 3ossl"
-.TH ASN1_STRING_LENGTH 3ossl 2025-09-30 3.5.4 OpenSSL
+.TH ASN1_STRING_LENGTH 3ossl 2026-09-29 3.5.9 OpenSSL
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -116,7 +119,7 @@ should be freed using \fBOPENSSL_free()\fR.
 .SH NOTES
 .IX Header "NOTES"
 Almost all ASN1 types in OpenSSL are represented as an \fBASN1_STRING\fR
-structure. Other types such as \fBASN1_OCTET_STRING\fR are simply typedef'ed
+structure. Other types such as \fBASN1_OCTET_STRING\fR are simply typedef\*(Aqed
 to \fBASN1_STRING\fR and the functions call the \fBASN1_STRING\fR equivalents.
 \&\fBASN1_STRING\fR is also used for some \fBCHOICE\fR types which consist
 entirely of primitive string types such as \fBDirectoryString\fR and
diff --git a/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 b/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3
index 9269ed3d19c6..6296667346a2 100644
--- a/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3
+++ b/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3
@@ -1,5 +1,5 @@
 .\" -*- mode: troff; coding: utf-8 -*-
-.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
+.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -52,10 +52,13 @@
 .    \}
 .\}
 .rr rF
+.\"
+.\" Required to disable full justification in groff 1.23.0.
+.if n .ds AD l
 .\" ========================================================================
 .\"
 .IX Title "ASN1_STRING_NEW 3ossl"
-.TH ASN1_STRING_NEW 3ossl 2025-09-30 3.5.4 OpenSSL
+.TH ASN1_STRING_NEW 3ossl 2026-09-29 3.5.9 OpenSSL
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff --git a/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 b/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3
index eb7d5bf0dd8a..305bbae495d4 100644
--- a/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3
+++ b/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3
@@ -1,5 +1,5 @@
 .\" -*- mode: troff; coding: utf-8 -*-
-.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
+.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -52,10 +52,13 @@
 .    \}
 .\}
 .rr rF
+.\"
+.\" Required to disable full justification in groff 1.23.0.
+.if n .ds AD l
 .\" ========================================================================
 .\"
 .IX Title "ASN1_STRING_PRINT_EX 3ossl"
-.TH ASN1_STRING_PRINT_EX 3ossl 2025-09-30 3.5.4 OpenSSL
+.TH ASN1_STRING_PRINT_EX 3ossl 2026-09-29 3.5.9 OpenSSL
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -85,9 +88,9 @@ to \fIfp\fR instead.
 .PP
 \&\fBASN1_STRING_print()\fR prints \fIstr\fR to \fIout\fR but using a different format to
 \&\fBASN1_STRING_print_ex()\fR. It replaces unprintable characters (other than CR, LF)
-with '.'.
+with \*(Aq.\*(Aq.
 .PP
-\&\fBASN1_tag2str()\fR returns a human-readable name of the specified ASN.1 \fItag\fR.
+\&\fBASN1_tag2str()\fR returns a human\-readable name of the specified ASN.1 \fItag\fR.
 .SH NOTES
 .IX Header "NOTES"
 \&\fBASN1_STRING_print()\fR is a deprecated function which should be avoided; use
@@ -111,7 +114,7 @@ using exactly four characters for the hex representation. If it is 32 bits then
 "\eWXXXXXXXX" is used using eight characters of its hex representation. These forms
*** 33654 LINES SKIPPED ***

From nobody Mon Nov 23 23:23:57 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYMT93qcNz71qLx
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 23:23: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYMT933cBz4HSS
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 23:23:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795476237;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=bamN3SAdJHKZMvj9+GflesJU7b5WuYI0z0o+apiawOw=;
	b=QsgjB0WSfXpdvBT5JtlB6AkSeDaLQ9qvbPgwDf7KCjhfi4Z75BNc6Q+ySqjiXMQfbr9goA
	cLC3FUFDXh1GuRFpRydsRfAUVEGntoiceLxjfqV8vgY27yDismE2SJvl/Tck5Md+k8brZs
	Ih8E7Q8Xo0VUm0owqiusSIhpNcEiHGJO7qQVyR6KBDqBr0O+abchjpoMxkZIGte6Zq6mcX
	qUWMadHuvq/Vvw1/hSNIlYEZgRiYfPUwdgRkGmsipAu00Ikf2G/iKADJkqbe9UU0NcuPNw
	8B2jXsB+lPiRR4+eHEayMKcrT9SZlfK3J0jmmhTIQXPx+Ms0uJGkThSwf868zA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795476237;
	b=eqCDOHLKOJm2JlRyvF+E8UiLFw7qFwTNS5NW/+Fn6m/KHbH0B3mC1BSaObadJFXUnnBr5j
	lV5whXjSMGOsTzK+tAskpcw9WF99W01GcYlFCSc4251RsKIICEFzWhS32UCP5l/1RtEHoT
	LPNBZdzVGT9sEwLLIF+flnHlIXVPjOJ0w1WLInwQeXBEu+C1qWX4Hzpe6f9Y3MTYsM7VKY
	ZZhlIvZepFix0y0rzf6dT+aCJqhnblOHKDWbXsbxcNXryJKNd8/5qn5dhtqIT1prP5I7VO
	OMOBUIrfAfHfNs/1j9oRhfbn6w4tFPmyN2xXfUZNK2suNoqyQmmCdtto3524VQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795476237;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=bamN3SAdJHKZMvj9+GflesJU7b5WuYI0z0o+apiawOw=;
	b=FYQvs7HzIfLj0rPqRcB8MI0uwpY+rJ2RVJeSpIMmm4JYN4ag0QeKBYnxjCPPlqZ7W1t60q
	zueWDWq2eHcdBFDdp8MAuZ83EDfjJesfEA2UirXxdkRQSRru3V3E18uocBY41pOGVh9oGZ
	CEeMFjenXt+TM3tyTso9ccApg74SiTcfPjgsX6QuxF7cMmEcMtb6dCUFCxdgIlBG0HPzdd
	RR28V6/KXJn8qtzIKCqTHOZUnt/z8OTrWr8v9X8zJb2t06ooxVnmQvTqs29uowNj7zgYCa
	cTeKn/g9K1DL4RWRRGKCHQEVcJk87ThOA4BBmgKLCGi/FDyXhcQRLaDOC5uowg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYMT92jLFz1Bs0
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 23:23:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 7424
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 23:23:57 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Olivier Cochard <olivier@FreeBSD.org>
Subject: git: bafddcaea8a9 - main - x86: Release the IOMMU entries of an MSI group at once
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: olivier
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: bafddcaea8a928eeecb9dc23a24a647580922975
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 23:23:57 +0000
Message-Id: <6b04cb0d.7424.24f8d4ed@gitrepo.freebsd.org>

The branch main has been updated by olivier:

URL: https://cgit.FreeBSD.org/src/commit/?id=bafddcaea8a928eeecb9dc23a24a647580922975

commit bafddcaea8a928eeecb9dc23a24a647580922975
Author:     Olivier Cochard <olivier@FreeBSD.org>
AuthorDate: 2026-11-22 11:51:54 +0000
Commit:     Olivier Cochard <olivier@FreeBSD.org>
CommitDate: 2026-11-23 23:17:34 +0000

    x86: Release the IOMMU entries of an MSI group at once
    
    msi_alloc() takes the interrupt remapping entries of a multiple-message
    MSI group as one block, but msi_release() returned them one message at
    a time.  The DMAR driver frees each with vmem_free(cookie, 1): the
    extra messages, released first, do not start a vmem segment, so
    releasing a group with interrupt remapping on fails an assertion or
    dereferences a NULL segment.
    
    Pass the whole group to iommu_unmap_msi_intr() with its count, and free
    the block at once in the DMAR driver, with one interrupt entry cache
    invalidation for the range, its index mask capped at the unit's MHMV.
    The AMD driver keeps clearing each entry for now.
    
    Reviewed by:    kib, kbowling, imp
    Approved by:    kib, kbowling
    Fixes:          0a110d5b172e ("Use VT-d interrupt remapping block (IR) to perform FSB messages translation.")
    MFC after:      1 week
    Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/112
---
 sys/x86/iommu/amd_intrmap.c   |  5 +++--
 sys/x86/iommu/amd_iommu.h     |  2 +-
 sys/x86/iommu/intel_dmar.h    |  2 +-
 sys/x86/iommu/intel_intrmap.c | 27 +++++++++++++++------------
 sys/x86/iommu/intel_qi.c      |  2 +-
 sys/x86/iommu/iommu_intrmap.h |  2 +-
 sys/x86/iommu/iommu_utils.c   |  6 +++---
 sys/x86/iommu/x86_iommu.h     |  2 +-
 sys/x86/x86/msi.c             | 19 ++++++++-----------
 9 files changed, 34 insertions(+), 33 deletions(-)

diff --git a/sys/x86/iommu/amd_intrmap.c b/sys/x86/iommu/amd_intrmap.c
index 3e48281d1931..585a5d84c3a2 100644
--- a/sys/x86/iommu/amd_intrmap.c
+++ b/sys/x86/iommu/amd_intrmap.c
@@ -192,14 +192,15 @@ amdiommu_map_msi_intr(device_t src, u_int cpu, u_int vector,
 }
 
 int
-amdiommu_unmap_msi_intr(device_t src, u_int cookie)
+amdiommu_unmap_msi_intr(device_t src, u_int cookie, u_int count)
 {
 	struct amdiommu_ctx *ctx;
 
 	if (cookie == -1)
 		return (0);
 	ctx = amdiommu_ir_find(src, NULL, NULL);
-	amdiommu_ir_free_irte(ctx, src, cookie);
+	for (u_int i = 0; i < count; i++)
+		amdiommu_ir_free_irte(ctx, src, cookie + i);
 	return (0);
 }
 
diff --git a/sys/x86/iommu/amd_iommu.h b/sys/x86/iommu/amd_iommu.h
index b9f07418ca9d..f138efb4b23e 100644
--- a/sys/x86/iommu/amd_iommu.h
+++ b/sys/x86/iommu/amd_iommu.h
@@ -199,7 +199,7 @@ void amdiommu_fini_event(struct amdiommu_unit *unit);
 int amdiommu_alloc_msi_intr(device_t src, u_int *cookies, u_int count);
 int amdiommu_map_msi_intr(device_t src, u_int cpu, u_int vector,
     u_int cookie, uint64_t *addr, uint32_t *data);
-int amdiommu_unmap_msi_intr(device_t src, u_int cookie);
+int amdiommu_unmap_msi_intr(device_t src, u_int cookie, u_int count);
 int amdiommu_map_ioapic_intr(u_int ioapic_id, u_int cpu, u_int vector,
     bool edge, bool activehi, int irq, u_int *cookie, uint32_t *hi,
     uint32_t *lo);
diff --git a/sys/x86/iommu/intel_dmar.h b/sys/x86/iommu/intel_dmar.h
index 018501082dd2..1a32506b8f47 100644
--- a/sys/x86/iommu/intel_dmar.h
+++ b/sys/x86/iommu/intel_dmar.h
@@ -258,7 +258,7 @@ void dmar_fini_irt(struct dmar_unit *unit);
 int dmar_alloc_msi_intr(device_t src, u_int *cookies, u_int count);
 int dmar_map_msi_intr(device_t src, u_int cpu, u_int vector, u_int cookie,
     uint64_t *addr, uint32_t *data);
-int dmar_unmap_msi_intr(device_t src, u_int cookie);
+int dmar_unmap_msi_intr(device_t src, u_int cookie, u_int count);
 int dmar_map_ioapic_intr(u_int ioapic_id, u_int cpu, u_int vector, bool edge,
     bool activehi, int irq, u_int *cookie, uint32_t *hi, uint32_t *lo);
 int dmar_unmap_ioapic_intr(u_int ioapic_id, u_int *cookie);
diff --git a/sys/x86/iommu/intel_intrmap.c b/sys/x86/iommu/intel_intrmap.c
index f12a0c9bae9b..4fef971231a1 100644
--- a/sys/x86/iommu/intel_intrmap.c
+++ b/sys/x86/iommu/intel_intrmap.c
@@ -63,7 +63,8 @@ static struct dmar_unit *dmar_ir_find(device_t src, uint16_t *rid,
     int *is_dmar);
 static void dmar_ir_program_irte(struct dmar_unit *unit, u_int idx,
     uint64_t low, uint16_t rid);
-static int dmar_ir_free_irte(struct dmar_unit *unit, u_int cookie);
+static int dmar_ir_free_irte(struct dmar_unit *unit, u_int cookie,
+    u_int count);
 
 int
 dmar_alloc_msi_intr(device_t src, u_int *cookies, u_int count)
@@ -140,14 +141,14 @@ dmar_map_msi_intr(device_t src, u_int cpu, u_int vector, u_int cookie,
 }
 
 int
-dmar_unmap_msi_intr(device_t src, u_int cookie)
+dmar_unmap_msi_intr(device_t src, u_int cookie, u_int count)
 {
 	struct dmar_unit *unit;
 
 	if (cookie == -1)
 		return (0);
 	unit = dmar_ir_find(src, NULL, NULL);
-	return (dmar_ir_free_irte(unit, cookie));
+	return (dmar_ir_free_irte(unit, cookie, count));
 }
 
 int
@@ -226,7 +227,7 @@ dmar_unmap_ioapic_intr(u_int ioapic_id, u_int *cookie)
 	unit = dmar_find_ioapic(ioapic_id, NULL);
 	KASSERT(unit != NULL && unit->ir_enabled,
 	    ("unmap: cookie %d unit %p", idx, unit));
-	return (dmar_ir_free_irte(unit, idx));
+	return (dmar_ir_free_irte(unit, idx, 1));
 }
 
 static struct dmar_unit *
@@ -302,21 +303,23 @@ dmar_ir_program_irte(struct dmar_unit *unit, u_int idx, uint64_t low,
 }
 
 static int
-dmar_ir_free_irte(struct dmar_unit *unit, u_int cookie)
+dmar_ir_free_irte(struct dmar_unit *unit, u_int cookie, u_int count)
 {
 	dmar_irte_t *irte;
 
 	KASSERT(unit != NULL && unit->ir_enabled,
 	    ("unmap: cookie %d unit %p", cookie, unit));
-	KASSERT(cookie < unit->irte_cnt,
-	    ("bad cookie %u %u", cookie, unit->irte_cnt));
-	irte = &(unit->irt[cookie]);
-	dmar_pte_clear(&irte->irte1);
-	dmar_pte_clear(&irte->irte2);
+	KASSERT(cookie < unit->irte_cnt && count <= unit->irte_cnt - cookie,
+	    ("bad cookie %u count %u %u", cookie, count, unit->irte_cnt));
+	for (u_int i = 0; i < count; i++) {
+		irte = &(unit->irt[cookie + i]);
+		dmar_pte_clear(&irte->irte1);
+		dmar_pte_clear(&irte->irte2);
+	}
 	DMAR_LOCK(unit);
-	dmar_qi_invalidate_iec(unit, cookie, 1);
+	dmar_qi_invalidate_iec(unit, cookie, count);
 	DMAR_UNLOCK(unit);
-	vmem_free(unit->irtids, cookie, 1);
+	vmem_free(unit->irtids, cookie, count);
 	return (0);
 }
 
diff --git a/sys/x86/iommu/intel_qi.c b/sys/x86/iommu/intel_qi.c
index c11946ad9447..567f946924cc 100644
--- a/sys/x86/iommu/intel_qi.c
+++ b/sys/x86/iommu/intel_qi.c
@@ -252,7 +252,7 @@ dmar_qi_invalidate_iec(struct dmar_unit *unit, u_int start, u_int cnt)
 	    start + cnt <= unit->irte_cnt,
 	    ("inv iec overflow %d %d %d", unit->irte_cnt, start, cnt));
 	for (; cnt > 0; cnt -= c, start += c) {
-		l = ffs(start | cnt) - 1;
+		l = min(ffs(start | cnt) - 1, DMAR_ECAP_MHMV(unit->hw_ecap));
 		c = 1 << l;
 		dmar_qi_ensure(DMAR2IOMMU(unit), 1);
 		dmar_qi_emit(unit, DMAR_IQ_DESCR_IEC_INV |
diff --git a/sys/x86/iommu/iommu_intrmap.h b/sys/x86/iommu/iommu_intrmap.h
index 59e6317f7e15..7fbc854f1e93 100644
--- a/sys/x86/iommu/iommu_intrmap.h
+++ b/sys/x86/iommu/iommu_intrmap.h
@@ -32,7 +32,7 @@
 int iommu_alloc_msi_intr(device_t src, u_int *cookies, u_int count);
 int iommu_map_msi_intr(device_t src, u_int cpu, u_int vector, u_int cookie,
     uint64_t *addr, uint32_t *data);
-int iommu_unmap_msi_intr(device_t src, u_int cookie);
+int iommu_unmap_msi_intr(device_t src, u_int cookie, u_int count);
 int iommu_map_ioapic_intr(u_int ioapic_id, u_int cpu, u_int vector, bool edge,
     bool activehi, int irq, u_int *cookie, uint32_t *hi, uint32_t *lo);
 int iommu_unmap_ioapic_intr(u_int ioapic_id, u_int *cookie);
diff --git a/sys/x86/iommu/iommu_utils.c b/sys/x86/iommu/iommu_utils.c
index d2ff9a985968..d984d6970d9d 100644
--- a/sys/x86/iommu/iommu_utils.c
+++ b/sys/x86/iommu/iommu_utils.c
@@ -218,7 +218,7 @@ x86_no_iommu_map_msi_intr(device_t src, u_int cpu, u_int vector,
 }
 
 static int
-x86_no_iommu_unmap_msi_intr(device_t src, u_int cookie)
+x86_no_iommu_unmap_msi_intr(device_t src, u_int cookie, u_int count)
 {
 	return (0);
 }
@@ -309,9 +309,9 @@ iommu_map_msi_intr(device_t src, u_int cpu, u_int vector, u_int cookie,
 }
 
 int
-iommu_unmap_msi_intr(device_t src, u_int cookie)
+iommu_unmap_msi_intr(device_t src, u_int cookie, u_int count)
 {
-	return (x86_iommu->unmap_msi_intr(src, cookie));
+	return (x86_iommu->unmap_msi_intr(src, cookie, count));
 }
 
 int
diff --git a/sys/x86/iommu/x86_iommu.h b/sys/x86/iommu/x86_iommu.h
index 431228512fd8..18a98893610a 100644
--- a/sys/x86/iommu/x86_iommu.h
+++ b/sys/x86/iommu/x86_iommu.h
@@ -85,7 +85,7 @@ struct x86_iommu {
 	int (*alloc_msi_intr)(device_t src, u_int *cookies, u_int count);
 	int (*map_msi_intr)(device_t src, u_int cpu, u_int vector,
 	    u_int cookie, uint64_t *addr, uint32_t *data);
-	int (*unmap_msi_intr)(device_t src, u_int cookie);
+	int (*unmap_msi_intr)(device_t src, u_int cookie, u_int count);
 	int (*map_ioapic_intr)(u_int ioapic_id, u_int cpu, u_int vector,
 	    bool edge, bool activehi, int irq, u_int *cookie, uint32_t *hi,
 	    uint32_t *lo);
diff --git a/sys/x86/x86/msi.c b/sys/x86/x86/msi.c
index 9d5409015de7..03b3dc5bac32 100644
--- a/sys/x86/x86/msi.c
+++ b/sys/x86/x86/msi.c
@@ -561,16 +561,18 @@ msi_release(int *irqs, int count)
 	}
 	KASSERT(first->msi_dev != NULL, ("unowned group"));
 
+#ifdef IOMMU
+	/* The remapping entries of the group were allocated as one block. */
+	mtx_unlock(&msi_lock);
+	iommu_unmap_msi_intr(first->msi_dev, first->msi_remap_cookie, count);
+	mtx_lock(&msi_lock);
+#endif
+
 	/* Clear all the extra messages in the group. */
 	for (i = 1; i < count; i++) {
 		msi = (struct msi_intsrc *)intr_lookup_source(irqs[i]);
 		KASSERT(msi->msi_first == first, ("message not in group"));
 		KASSERT(msi->msi_dev == first->msi_dev, ("owner mismatch"));
-#ifdef IOMMU
-		mtx_unlock(&msi_lock);
-		iommu_unmap_msi_intr(first->msi_dev, msi->msi_remap_cookie);
-		mtx_lock(&msi_lock);
-#endif
 		msi->msi_first = NULL;
 		msi->msi_dev = NULL;
 		apic_free_vector(msi->msi_cpu, msi->msi_vector, msi->msi_irq);
@@ -578,11 +580,6 @@ msi_release(int *irqs, int count)
 	}
 
 	/* Clear out the first message. */
-#ifdef IOMMU
-	mtx_unlock(&msi_lock);
-	iommu_unmap_msi_intr(first->msi_dev, first->msi_remap_cookie);
-	mtx_lock(&msi_lock);
-#endif
 	first->msi_first = NULL;
 	first->msi_dev = NULL;
 	apic_free_vector(first->msi_cpu, first->msi_vector, first->msi_irq);
@@ -787,7 +784,7 @@ msix_release(int irq)
 	/* Clear out the message. */
 #ifdef IOMMU
 	mtx_unlock(&msi_lock);
-	iommu_unmap_msi_intr(msi->msi_dev, msi->msi_remap_cookie);
+	iommu_unmap_msi_intr(msi->msi_dev, msi->msi_remap_cookie, 1);
 	mtx_lock(&msi_lock);
 #endif
 	msi->msi_first = NULL;

From nobody Mon Nov 23 23:23:58 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYMTB4DVYz71qM1
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 23:23: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYMTB3PBbz4HSY
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 23:23:58 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795476238;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=6dkTWVeAHPvxqWk4Dp+EY6r93sE2i6LRm9ak1NcxcsQ=;
	b=n+HDUvoNkvfiEm5rMiYlTboBZvUg30af9WpouHX3ssAKVTgNFoIroxJKqT0TdJKvuLozbW
	YFqAueoFg5V8ToF2gl3Wdsgx5LcmtU0IJDXYU572k/9NrIvnBpsUnVPVDocNZFJOWAw+0S
	LxZ7DpJ2h7FY6uXQg1wdLrcbmNfDcp6JkSdy6CwAdl150mpf/VKRPH7GoNrq19caKlg1VT
	XTSxLDxJJ/M/+TI/Brh81/e9q3yxDIpCchJjwFYrogjrXx10QNdhx00oVE9n9c6jDWvina
	nvZPs8YykxfgSfNnSsgXeu2KKd7I4mlZyvNqT8QQXHPYbC9e8xRNlExfVz1kuA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795476238;
	b=IWKpYpcWUt1f4+AGF3TIP1qftai4hPlHj0FR2eCqVMDXDYrz4H/CyHAHC0EcLVuJIHfrqV
	+FtwUX0U0/6MMQXJ0hyjWByLKCECwj4jXTTjEKFEuRhNYyNH76uSIHY94CGVSG0L32eAdp
	ej+BoLqrIsvFzsHa6jHCBwjlYTfp/GT8hqAiNdozq9pn/fHhoRHUh21MpEO1/3YHlITIHx
	YzwIDVzgIZ0BFAraLvkHdzTmlMOfxy4c/WOBoVZzdJw4bKNTpeVIxya3uK6eEu2mCSlJry
	EE3FrssKh3T5xug+PyX/zwWGGsAvP2TPdgwYVTA6Sx0HZXdRKl+wh0HsD1jm/w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795476238;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=6dkTWVeAHPvxqWk4Dp+EY6r93sE2i6LRm9ak1NcxcsQ=;
	b=Ryo4SproArKXa5OQnefVgrz9w9lje7OHfoCyQinxQZUpppcfq9MmnCDjVFl3jPcB/Y37G7
	9M1tEO7yyn1D4fH9/hItr8ifpetCETM8awhZpDFXUohCAcFx8HTQDiD7/92XSH8fKjL/xZ
	gVcFHP1Zfug7VCHa52hQzhZKWHLMuyzYv384qfgLBlllVyEchGamHa2beW3ZfdKNbdDobn
	qzdqMNr8KDiRoMxTkI69fBgfrg2KXe2nMM+Tt0nuuNGFBTY+ZCp8Sw+gNajw8beO/bypm8
	FQ665szRj3irWSiJSJkpsqEc/uRDlgGEDUFNX3TGOo3hL6PX3gcfNuljqbFhgQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYMTB33dJz1BN9
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 23:23:58 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 6c84
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 23:23:58 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Olivier Cochard <olivier@FreeBSD.org>
Subject: git: 244a39aca9f1 - main - amdiommu: Free and align interrupt remapping entries
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: olivier
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 244a39aca9f1d8d07c44e3b4250e06ba74f9299d
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 23:23:58 +0000
Message-Id: <6b04cb0e.6c84.6d11dfdd@gitrepo.freebsd.org>

The branch main has been updated by olivier:

URL: https://cgit.FreeBSD.org/src/commit/?id=244a39aca9f1d8d07c44e3b4250e06ba74f9299d

commit 244a39aca9f1d8d07c44e3b4250e06ba74f9299d
Author:     Olivier Cochard <olivier@FreeBSD.org>
AuthorDate: 2026-11-22 11:52:38 +0000
Commit:     Olivier Cochard <olivier@FreeBSD.org>
CommitDate: 2026-11-23 23:18:19 +0000

    amdiommu: Free and align interrupt remapping entries
    
    amdiommu_ir_free_irte() cleared the IRTE but never returned its index,
    so a device's 32 default entries run out: a driver using 32 MSI-X
    vectors gets ENOMEM from pci_alloc_msix() on its second attach.  Free
    the block with vmem_xfree(), now that msi_release() hands a group over
    whole, and allocate it with vmem_xalloc() aligned on its size, since
    the device ORs the message number into the MSI data, which is the IRTE
    index.
    
    As the entries are now reused, invalidate the interrupt table under the
    DeviceID it is installed at, the IVRS-resolved ctx->context.rid, not
    the PCI requester ID, which differs for aliased devices.
    
    Reviewed by:    kib, kbowling, imp
    Approved by:    kib, kbowling
    Fixes:          0f5116d7efe3 ("AMD IOMMU driver")
    MFC after:      1 week
    Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/112
---
 sys/x86/iommu/amd_intrmap.c | 74 ++++++++++++++++++++++-----------------------
 1 file changed, 36 insertions(+), 38 deletions(-)

diff --git a/sys/x86/iommu/amd_intrmap.c b/sys/x86/iommu/amd_intrmap.c
index 585a5d84c3a2..2d81ddef8bd0 100644
--- a/sys/x86/iommu/amd_intrmap.c
+++ b/sys/x86/iommu/amd_intrmap.c
@@ -75,8 +75,8 @@
 
 static struct amdiommu_ctx *amdiommu_ir_find(device_t src, uint16_t *rid,
     bool *is_iommu);
-static void amdiommu_ir_free_irte(struct amdiommu_ctx *ctx, device_t src,
-    u_int cookie);
+static void amdiommu_ir_free_irte(struct amdiommu_ctx *ctx, u_int cookie,
+    u_int count);
 
 int
 amdiommu_alloc_msi_intr(device_t src, u_int *cookies, u_int count)
@@ -93,8 +93,13 @@ amdiommu_alloc_msi_intr(device_t src, u_int *cookies, u_int count)
 		return (EOPNOTSUPP);
 	}
 
-	error = vmem_alloc(ctx->irtids, count, M_FIRSTFIT | M_NOWAIT,
-	    &vmem_res);
+	/*
+	 * The MSI data is the entry index, and a multiple-message device
+	 * ORs the message number into it: align the block on its size.
+	 */
+	KASSERT(powerof2(count), ("MSI count %u", count));
+	error = vmem_xalloc(ctx->irtids, count, count, 0, 0, VMEM_ADDR_MIN,
+	    VMEM_ADDR_MAX, M_FIRSTFIT | M_NOWAIT, &vmem_res);
 	if (error != 0) {
 		KASSERT(error != EOPNOTSUPP,
 		    ("impossible EOPNOTSUPP from vmem"));
@@ -112,12 +117,9 @@ amdiommu_map_msi_intr(device_t src, u_int cpu, u_int vector,
 {
 	struct amdiommu_ctx *ctx;
 	struct amdiommu_unit *unit;
-	device_t requester;
-	int error __diagused;
-	uint16_t rid;
 	bool is_iommu;
 
-	ctx = amdiommu_ir_find(src, &rid, &is_iommu);
+	ctx = amdiommu_ir_find(src, NULL, &is_iommu);
 	if (is_iommu) {
 		if (addr != NULL) {
 			*data = vector;
@@ -182,10 +184,8 @@ amdiommu_map_msi_intr(device_t src, u_int cpu, u_int vector,
 			*addr |= ((uint64_t)cpu & 0xffffff00) << 32;
 	}
 
-	error = iommu_get_requester(src, &requester, &rid);
-	MPASS(error == 0);
 	AMDIOMMU_LOCK(unit);
-	amdiommu_qi_invalidate_ir_locked(unit, rid);
+	amdiommu_qi_invalidate_ir_locked(unit, ctx->context.rid);
 	AMDIOMMU_UNLOCK(unit);
 
 	return (0);
@@ -199,8 +199,8 @@ amdiommu_unmap_msi_intr(device_t src, u_int cookie, u_int count)
 	if (cookie == -1)
 		return (0);
 	ctx = amdiommu_ir_find(src, NULL, NULL);
-	for (u_int i = 0; i < count; i++)
-		amdiommu_ir_free_irte(ctx, src, cookie + i);
+	amdiommu_ir_free_irte(ctx, cookie, count);
+	vmem_xfree(ctx->irtids, cookie, count);
 	return (0);
 }
 
@@ -267,41 +267,39 @@ amdiommu_ir_find(device_t src, uint16_t *ridp, bool *is_iommu)
 }
 
 static void
-amdiommu_ir_free_irte(struct amdiommu_ctx *ctx, device_t src,
-    u_int cookie)
+amdiommu_ir_free_irte(struct amdiommu_ctx *ctx, u_int cookie, u_int count)
 {
 	struct amdiommu_unit *unit;
-	device_t requester;
-	int error __diagused;
-	uint16_t rid;
 
 	MPASS(ctx != NULL);
 	unit = CTX2AMD(ctx);
 
 	KASSERT(unit->irte_enabled,
 	    ("unmap: cookie %d ctx %p unit %p", cookie, ctx, unit));
-	KASSERT(cookie < unit->irte_nentries,
-	    ("bad cookie %u %u", cookie, unit->irte_nentries));
-
-	if (unit->irte_x2apic) {
-		struct amdiommu_irte_basic_vapic_x2 *irte;
-
-		irte = &ctx->irtx2[cookie];
-		irte->remapen = 0;
-		atomic_thread_fence_rel();
-		bzero(irte, sizeof(*irte));
-	} else {
-		struct amdiommu_irte_basic_novapic *irte;
-
-		irte = &ctx->irtb[cookie];
-		irte->remapen = 0;
-		atomic_thread_fence_rel();
-		bzero(irte, sizeof(*irte));
+	KASSERT(cookie < unit->irte_nentries &&
+	    count <= unit->irte_nentries - cookie,
+	    ("bad cookie %u count %u %u", cookie, count, unit->irte_nentries));
+
+	for (u_int i = cookie; i < cookie + count; i++) {
+		if (unit->irte_x2apic) {
+			struct amdiommu_irte_basic_vapic_x2 *irte;
+
+			irte = &ctx->irtx2[i];
+			irte->remapen = 0;
+			atomic_thread_fence_rel();
+			bzero(irte, sizeof(*irte));
+		} else {
+			struct amdiommu_irte_basic_novapic *irte;
+
+			irte = &ctx->irtb[i];
+			irte->remapen = 0;
+			atomic_thread_fence_rel();
+			bzero(irte, sizeof(*irte));
+		}
 	}
-	error = iommu_get_requester(src, &requester, &rid);
-	MPASS(error == 0);
+	/* One invalidation covers the whole table of the device. */
 	AMDIOMMU_LOCK(unit);
-	amdiommu_qi_invalidate_ir_locked(unit, rid);
+	amdiommu_qi_invalidate_ir_locked(unit, ctx->context.rid);
 	AMDIOMMU_UNLOCK(unit);
 }
 

From nobody Mon Nov 23 23:30:04 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYMcF0Xt4z71qbC
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 23:30: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYMcD53dxz4JP4
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 23:30:04 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795476604;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=q5j7WyNNBOuESWMmf2u9MfpidhBkMYSPccgS6M9Jing=;
	b=XEmij6Pi08/Q2nucczM7qZSnyRIYeb0O+nG7IVveb6RUpmHlnSZAXyxLq41HTWX91WGmm4
	+HO0/j7wLX6F7T5eupOFUnzQDh/UFPEJyAlU2L7r++L9Zkvf+9XB62PDEv6L+ffFHTmS7O
	zEdhDRVT0+biW8Ea6DDXG0UF68smf5EIywhhWE2m8LOYOF3XkjQeBhMDLO29vWZHPhiqjE
	ByNaFN74daYW4LUSeFh1VqiO1kkO0goGZl1UokjXr+XH7M33sskWRRX16rruBM3weGKhGc
	kWfx/rrNnUnVd16CkYAgm3cNGL1yCS48PmeNUMP//DQTuSBvOkGMT/eY9gi0YQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795476604;
	b=E861jIiqm58oH4sqWhm6HlcUABFGw0Q+Fycon4386fozlwWV0z3jWZp/H/CtSfqWVFI13d
	QJnePnTx2750vuuywFjgXoqzhghz2aRu0+1PfRtor1emql6Mb0/RUXwgScHTC3/Oj1rhBr
	xIZvrHWVDHLR/YJJ1x6RixAfi711V6nuu6JSESW8JbJ0OwwfscysszRKAWvJlPtD4Vqoqd
	e6+7jKYl1IxotbpsGdo4s5NKhxeVRXIaMI13eax5fPxmx1HzzgLPIHj8Llc2m8kI/eqh0d
	Vlx+WTzsJDwMXltmS8kxH294zBw4I+TvvMARcFXiy/LjX+fxEqP0vRdQYyo88w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795476604;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=q5j7WyNNBOuESWMmf2u9MfpidhBkMYSPccgS6M9Jing=;
	b=E8wB0PrB6rXP9sMh9Qx8hoBWhgscOZKXmzPKcNdb378WaPIls18W09EikXm0X7yVHFKReU
	tgI7eyCsGLh0Csb4tWZtXf7Go3Edo2a5wHTDvyOo/hGodp6iIzYlcGatzagCAtdsM7qM8I
	P2+cIoJFOYjyD5yturl6nS7FXmIqvxBaPin9B4Nn4elb9iJNLPbtVIWLI4RGetsk69Ihqv
	r9DBGJP3y+ERW1NyUg5jYcBuPHiFtITnLpz9Gljnu98JWLlo3L5HNnIHFdgaLTEB+KmeAb
	PhnoQmlpcU+uvH75iVtkwTB9PRmAcvT53MWeNhQiSHOCXyKkrOUO6AksS0w1zg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYMcD4jc3z1Bqd
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 23:30:04 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 6fb1
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 23:30:04 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Olivier Cochard <olivier@FreeBSD.org>
Subject: git: 014091f5aba6 - main - iommu: Identity-map contexts when DMA remapping is disabled
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: olivier
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 014091f5aba650d02e31befe89ef2b2f36a2334f
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 23:30:04 +0000
Message-Id: <6b04cc7c.6fb1.18e9f74b@gitrepo.freebsd.org>

The branch main has been updated by olivier:

URL: https://cgit.FreeBSD.org/src/commit/?id=014091f5aba650d02e31befe89ef2b2f36a2334f

commit 014091f5aba650d02e31befe89ef2b2f36a2334f
Author:     Olivier Cochard <olivier@FreeBSD.org>
AuthorDate: 2026-11-16 14:34:06 +0000
Commit:     Olivier Cochard <olivier@FreeBSD.org>
CommitDate: 2026-11-23 23:23:38 +0000

    iommu: Identity-map contexts when DMA remapping is disabled
    
    With hw.amdiommu.enable=1 alone, interrupt remapping is on and DMA
    remapping is off.  amdiommu_ir_find() still instantiates a context for
    each MSI source, and it got a translating domain with an empty page
    table while busdma kept handing out physical addresses, so every DMA
    from these devices faulted.  On a Ryzen 7 7735HS the USB devices
    attached in an endless loop.
    
    Treat a unit with DMA remapping disabled like a device with remapping
    disabled: give the context the identity mapping.
    
    Reviewed by:    kib, kbowling
    Approved by:    kib, kbowling
    Fixes:          0f5116d7efe3 ("AMD IOMMU driver")
    MFC after:      1 week
    Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/113
---
 sys/dev/iommu/busdma_iommu.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/sys/dev/iommu/busdma_iommu.c b/sys/dev/iommu/busdma_iommu.c
index 3852429c4a8a..62fda6143892 100644
--- a/sys/dev/iommu/busdma_iommu.c
+++ b/sys/dev/iommu/busdma_iommu.c
@@ -261,10 +261,13 @@ iommu_instantiate_ctx(struct iommu_unit *unit, device_t dev, bool rmrr)
 	 * cannot disable the IOMMU unit, due to possibility of other
 	 * devices on the same IOMMU unit still requiring translation.
 	 * Instead provide the identity mapping for the device
-	 * context.
+	 * context.  Do the same when DMA remapping is disabled for
+	 * the unit: busdma then does not use the context, but
+	 * interrupt remapping might still create it.
 	 */
-	disabled = iommu_bus_dma_is_dev_disabled(pci_get_domain(requester),
-	    pci_get_bus(requester), pci_get_slot(requester), 
+	disabled = !unit->dma_enabled ||
+	    iommu_bus_dma_is_dev_disabled(pci_get_domain(requester),
+	    pci_get_bus(requester), pci_get_slot(requester),
 	    pci_get_function(requester));
 	ctx = iommu_get_ctx(unit, requester, rid, disabled, rmrr);
 	if (ctx == NULL)

From nobody Mon Nov 23 23:30:05 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYMcF6Q4Fz71qqH
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 23:30: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYMcF4ywHz4Jd5
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 23:30:05 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795476605;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=C+zcPiTkOiHqWkE8HTVf2yayZJaWIrFOzrzn1CoKbQM=;
	b=UMmhuZj2G8oDH313KdXjkhtqMuuL2ZTxTi6YpU0BORUVyXDpnkDy5IhV9PlWBjf8Pb/rux
	HpdMMNdprFWbVAtaWrlesG99SD4XaxI9lYSJei3/8sSr4xTaQt9pqkkhbHCE32MZ+ZY0zx
	tuz3M4LkIsdUOEVwxQaCBsfD6pWnuHx2D7337rLKBegJ+8MKxQocChxyVi8lxsdIiJSf7X
	CaetEoBPjNj8qsfGS72vLJcZy+yGTd+cP9xhRDpOWk6Enk3LCYPNMCwXMkFPfnO7gb2O5Q
	I19d6EYn+Et/52sgzM0obkSWW0X2gCuNxm1ahex8GVCRZhhH6/tmkmqJRFGQHw==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795476605;
	b=eHjjmUT5S1K4PrsH28otwt6SOVhfbNpcxiOyPENqqnxMc7Aw+IcJcyCs4yoo4k0qg1x3D3
	WNyfBIlyDlhikVHKugceUY3Fjg76hcYvbf4F5Gj0DU5t/CMe7AABieU1RoI2SEYWHj+Y5Z
	q9FkJPizzVsSiEitWY4P/pvH9B2m6T+NM7uc40WggmaBPrKHXWUqziGGA5BuL7qYwS1ojU
	05/Wi5AHixZ5DpbPOZjGVMmJoMSmjg3dCUqyU0mpM9buDc0wLm5/Tef1PzQcWbM83PusJc
	t5PAdH3Etecsvkjr54pYCJ6zX9tBLmME3/iZpWhTr1WYCiwRr/8355TQ7VPYkQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795476605;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=C+zcPiTkOiHqWkE8HTVf2yayZJaWIrFOzrzn1CoKbQM=;
	b=IwynvikCFIeHQbgBa0nqdv9QZCKwoea06leMzGBJUXdyK7rTpEa5GMCyrMtailG5OfLzOP
	+e/79uVjAlXgsymlTJo3ZRjZfUZz035VRU4k4sdoNM6qpma5NFc4QUttN5WbuZOBBMQT4S
	K3uGbKOn0ADVAy5MEavV81S70QUhNcpoH/coKrEPIjVT44bM2zVpRsszFjlHZHWIsb7Mea
	CijRQwFvb8QquWofkFWbRpuVVvbBrJIxbA8gNLzn4svHv+/qa7MthykVqBrsdpuienFdjl
	gQ08TmHSuDB8TDURKwrgrjV370j4ZVmgDDhkaAhqhZgYoNG3/T+TJktJWkdxiQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYMcF4b0Sz1BgD
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 23:30:05 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 7ad9
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 23:30:05 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Olivier Cochard <olivier@FreeBSD.org>
Subject: git: 5172cc8d5571 - main - amdiommu: Skip the invalidation after PTE-only maps
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: olivier
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 5172cc8d557118964c6203954ee7b55af40c0119
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 23:30:05 +0000
Message-Id: <6b04cc7d.7ad9.11cffb0b@gitrepo.freebsd.org>

The branch main has been updated by olivier:

URL: https://cgit.FreeBSD.org/src/commit/?id=5172cc8d557118964c6203954ee7b55af40c0119

commit 5172cc8d557118964c6203954ee7b55af40c0119
Author:     Olivier Cochard <olivier@FreeBSD.org>
AuthorDate: 2026-11-16 14:34:58 +0000
Commit:     Olivier Cochard <olivier@FreeBSD.org>
CommitDate: 2026-11-23 23:23:56 +0000

    amdiommu: Skip the invalidation after PTE-only maps
    
    amdiommu_map_buf() waited for an invalidation after every map, so each
    busdma load cost a command round trip and a completion interrupt.  A
    128 KB NVMe read raised 51 IOMMU interrupts on a Ryzen 7 7735HS and 66
    on a Ryzen AI Max+ PRO 395, where reads ran at 200 MB/s instead of
    900 MB/s without the IOMMU.
    
    Filling non-present PTEs needs no invalidation unless the capability
    header reports NpCache, which is how Linux handles it.  A new PDE still
    does: unmap frees empty page table pages and clears their PDE before
    the deferred invalidation runs, and skipping the flush then produced
    IO_PAGE_FAULTs from nvme(4).  A concurrent map that uses such a PDE
    before its flush completes flushes too.
    
    With this change the same reads raise 19 and 33 interrupts, and the
    second machine reads at 400 to 440 MB/s.
    
    Reviewed by:    kib, kbowling
    Approved by:    kib, kbowling
    MFC after:      1 week
    Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/113
---
 sys/x86/iommu/amd_drv.c     |  2 ++
 sys/x86/iommu/amd_idpgtbl.c | 48 +++++++++++++++++++++++++++++++++------------
 sys/x86/iommu/amd_iommu.h   |  2 ++
 3 files changed, 39 insertions(+), 13 deletions(-)

diff --git a/sys/x86/iommu/amd_drv.c b/sys/x86/iommu/amd_drv.c
index ba6abae055fa..c871681c3793 100644
--- a/sys/x86/iommu/amd_drv.c
+++ b/sys/x86/iommu/amd_drv.c
@@ -484,6 +484,8 @@ amdiommu_attach(device_t dev)
 	error = pci_find_cap(dev, PCIY_SECDEV, &sc->seccap_reg);
 	if (error != 0 || sc->seccap_reg == 0)
 		return (ENXIO);
+	sc->cap_hdr = pci_read_config(dev, sc->seccap_reg +
+	    PCIR_AMDIOMMU_CAP_HEADER, 4);
 
 	base_low = pci_read_config(dev, sc->seccap_reg +
 	    PCIR_AMDIOMMU_BASE_LOW, 4);
diff --git a/sys/x86/iommu/amd_idpgtbl.c b/sys/x86/iommu/amd_idpgtbl.c
index 007883ccdaa9..6fd5adde1e29 100644
--- a/sys/x86/iommu/amd_idpgtbl.c
+++ b/sys/x86/iommu/amd_idpgtbl.c
@@ -129,7 +129,7 @@ amdiommu_domain_free_pgtbl(struct amdiommu_domain *domain)
 
 static iommu_pte_t *
 amdiommu_pgtbl_map_pte(struct amdiommu_domain *domain, iommu_gaddr_t base,
-    int lvl, int flags, vm_pindex_t *idxp, struct sf_buf **sf)
+    int lvl, int flags, vm_pindex_t *idxp, struct sf_buf **sf, bool *pde_set)
 {
 	iommu_pte_t *pte, *ptep;
 	struct sf_buf *sfp;
@@ -162,7 +162,7 @@ retry:
 
 			sfp = NULL;
 			ptep = amdiommu_pgtbl_map_pte(domain, base, lvl - 1,
-			    flags, &idx1, &sfp);
+			    flags, &idx1, &sfp, pde_set);
 			if (ptep == NULL) {
 				KASSERT(m->pindex != 0,
 				    ("loosing root page %p", domain));
@@ -174,6 +174,15 @@ retry:
 			ptep->pte = VM_PAGE_TO_PHYS(m) |  AMDIOMMU_PTE_IR |
 			    AMDIOMMU_PTE_IW | AMDIOMMU_PTE_PR |
 			    ((domain->pglvl - lvl) << AMDIOMMU_PTE_NLVL_SHIFT);
+			/*
+			 * Count the pending flush now: a sleepable
+			 * iommu_map_pgtbl() may drop the page table lock
+			 * before this map returns.
+			 */
+			if (pde_set != NULL && !*pde_set) {
+				*pde_set = true;
+				domain->pde_flushes++;
+			}
 			vm_page_wire(sf_buf_page(sfp));
 			vm_page_unwire_noq(m);
 			iommu_unmap_pgtbl(sfp);
@@ -188,7 +197,7 @@ retry:
 static int
 amdiommu_map_buf_locked(struct amdiommu_domain *domain, iommu_gaddr_t base,
     iommu_gaddr_t size, vm_page_t *ma, uint64_t pflags, int flags,
-    struct iommu_map_entry *entry)
+    struct iommu_map_entry *entry, bool *pde_set)
 {
 	iommu_pte_t *pte;
 	struct sf_buf *sf;
@@ -202,6 +211,7 @@ amdiommu_map_buf_locked(struct amdiommu_domain *domain, iommu_gaddr_t base,
 	idx = -1;
 	pte = NULL;
 	sf = NULL;
+	*pde_set = false;
 
 	for (pi = 0; size > 0; base += IOMMU_PAGE_SIZE, size -= IOMMU_PAGE_SIZE,
 	    pi++) {
@@ -209,7 +219,7 @@ amdiommu_map_buf_locked(struct amdiommu_domain *domain, iommu_gaddr_t base,
 		    ("mapping loop overflow %p %jx %jx %jx", domain,
 		    (uintmax_t)base, (uintmax_t)size, (uintmax_t)IOMMU_PAGE_SIZE));
 		pte = amdiommu_pgtbl_map_pte(domain, base, domain->pglvl - 1,
-		    flags, &idx, &sf);
+		    flags, &idx, &sf, pde_set);
 		if (pte == NULL) {
 			KASSERT((flags & IOMMU_PGF_WAITOK) == 0,
 			    ("failed waitable pte alloc %p", domain));
@@ -236,6 +246,7 @@ amdiommu_map_buf(struct iommu_domain *iodom, struct iommu_map_entry *entry,
 	uint64_t pflags;
 	iommu_gaddr_t base, size;
 	int error;
+	bool flush, pde_set;
 
 	base = entry->start;
 	size = entry->end - entry->start;
@@ -274,15 +285,26 @@ amdiommu_map_buf(struct iommu_domain *iodom, struct iommu_map_entry *entry,
 
 	AMDIOMMU_DOMAIN_PGLOCK(domain);
 	error = amdiommu_map_buf_locked(domain, base, size, ma, pflags,
-	    flags, entry);
-	AMDIOMMU_DOMAIN_PGUNLOCK(domain);
-
+	    flags, entry, &pde_set);
 	/*
-	 * XXXKIB invalidation seems to be needed even for non-valid->valid
-	 * updates.  Recheck.
+	 * Filling a non-present PTE needs no invalidation unless the
+	 * IOMMU caches non-present entries (NpCache).  A new PDE does:
+	 * unmap clears a PDE before its invalidation is done, so the
+	 * IOMMU may still hold the old one.  So does a map that uses a
+	 * new PDE whose flush, by a concurrent map, is not done yet.
 	 */
-	iommu_qi_invalidate_sync(iodom, base, size,
-	    (flags & IOMMU_PGF_WAITOK) != 0);
+	flush = domain->pde_flushes != 0 ||
+	    (DOM2AMD(domain)->cap_hdr & PCIM_AMDIOMMU_CAP_NPCACHE) != 0;
+	AMDIOMMU_DOMAIN_PGUNLOCK(domain);
+
+	if (flush)
+		iommu_qi_invalidate_sync(iodom, base, size,
+		    (flags & IOMMU_PGF_WAITOK) != 0);
+	if (pde_set) {
+		AMDIOMMU_DOMAIN_PGLOCK(domain);
+		domain->pde_flushes--;
+		AMDIOMMU_DOMAIN_PGUNLOCK(domain);
+	}
 	return (error);
 }
 
@@ -295,7 +317,7 @@ amdiommu_free_pgtbl_pde(struct amdiommu_domain *domain, iommu_gaddr_t base,
 	vm_pindex_t idx;
 
 	sf = NULL;
-	pde = amdiommu_pgtbl_map_pte(domain, base, lvl, flags, &idx, &sf);
+	pde = amdiommu_pgtbl_map_pte(domain, base, lvl, flags, &idx, &sf, NULL);
 	amdiommu_unmap_clear_pte(domain, base, lvl, flags, pde, &sf, entry,
 	    true);
 }
@@ -362,7 +384,7 @@ amdiommu_unmap_buf_locked(struct amdiommu_domain *domain, iommu_gaddr_t base,
 
 	for (sf = NULL; size > 0; base += pg_sz, size -= pg_sz) {
 		pte = amdiommu_pgtbl_map_pte(domain, base,
-		    domain->pglvl - 1, flags, &idx, &sf);
+		    domain->pglvl - 1, flags, &idx, &sf, NULL);
 		KASSERT(pte != NULL,
 		    ("sleeping or page missed %p %jx %d 0x%x",
 		    domain, (uintmax_t)base, domain->pglvl - 1, flags));
diff --git a/sys/x86/iommu/amd_iommu.h b/sys/x86/iommu/amd_iommu.h
index f138efb4b23e..b2a7c30970fe 100644
--- a/sys/x86/iommu/amd_iommu.h
+++ b/sys/x86/iommu/amd_iommu.h
@@ -48,6 +48,7 @@ struct amdiommu_domain {
 	vm_object_t pgtbl_obj;		/* (c) Page table pages */
 	vm_page_t pgtblr;		/* (c) Page table root page */
 	u_int pglvl;			/* (c) Page table levels */
+	u_int pde_flushes;		/* Maps flushing a new PDE, pglock */
 };
 
 struct amdiommu_ctx {
@@ -65,6 +66,7 @@ struct amdiommu_unit {
 	u_int		unit_id;	/* Hypertransport Unit ID, deprecated */
 	TAILQ_ENTRY(amdiommu_unit) unit_next;
 	int		seccap_reg;
+	uint32_t	cap_hdr;	/* Capability header */
 	uint64_t	efr;
 	vm_paddr_t	mmio_base;
 	vm_size_t	mmio_sz;

From nobody Mon Nov 23 23:36:36 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYMlm6yLtz71qvJ
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 23:36: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYMlm6JnMz4KpG
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 23:36:36 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795476996;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=bOUflmuJvLiJicQt9FFpvfzOMLrpFxOZ5xvMK96Y3lw=;
	b=s7fARbOxLIG8x8vsuFcHjqavPLarobEaMQOKswVKHse+HpaC/Tg9OMJ6edNZR2qeDLhMCA
	zUYtIx+WiDTStxEjxhHQAQfNV4itQscLyjeUmDoT2wt2lkDJ6rTQ1R1lEVbLGrgiktkw2O
	T0eJ4oCbPBfJFO9RUHjhsWY60qf1QkvY6rcZSbfuE/ih8IAgATC2wjjQPPLHFWTd4VOwHK
	vulT+50cDcHcTNEqZj2PWcc4xb7MPDsfOMqGGyt7Cd0dUTNLNUujXexbk1gCmcbMXEj1zH
	kpAxZHJCvKgxaGcilX13ZFh3YNQR61XdUSRjvRpMmJelRETg6KSMMy25kZ45MQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795476996;
	b=M6v4TQii9PHsce69Tj3lFRsCjSQS44ipz2Z0uo70wfE1M/QT/s91QpONX+1M/xxXlLucI9
	UC7moM5RGcAujCZJeA2ZZNs3C81sMYjEp4DHkh27HT8ePYyEPiphJz8kX+gItuuk1+OVFL
	vrObeUlGdP3pIHUnOkoxvczshibwDnLwle+jcTSk7qAcXoL9ifIe6IHEFUNMFO8h8k/gu7
	Cce2sj3w/COcxGazGDhWsPfiauwj9Sg0cvObXfeQ7HOugI72ztwaU4aARWj1pTFtNOdV53
	hhlx+hr2XSGEm/dXEMgvfQyDLu15MBGSKAzTWDkDbWeO4Ve07EMkdYgQEryzqA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795476996;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=bOUflmuJvLiJicQt9FFpvfzOMLrpFxOZ5xvMK96Y3lw=;
	b=MberUu0a9b1AZbZXk+hRcEul9kcujjbLX+A2c9MsJ9ipolhbR9eYsFVV/lCNLKfyAmcuZ2
	XrL32eFR1j7Z4yTqjj9ttz4QThpbm+MldGZn023/ZOmAi7q406c0MG8CivszA++veJJqOR
	D77ekKz6x9GfN8PoBmRQrnelcvbMI0Mmr3I2Bz+sDHI832AxQ4P6/y0t+fLpQIMpTux8Di
	5/G21LQJtDqbHiKbqD/MoOBvNnbs2DtWyLscirotGbRZy0TNUeryOjL7ClDkbOBfCTqAiW
	87pSY8vc/+f6NNAM1lMiV3RlLgACTikdnDW7wNp7oV3evGjZln11ghbCNagWAg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYMlm5ykVz1BNb
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 23:36:36 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 7fa2
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 23:36:36 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Olivier Cochard <olivier@FreeBSD.org>
Subject: git: 11ba27a8a6a7 - main - ig4: Add an AMD generation with a 150 MHz clock
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: olivier
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 11ba27a8a6a7302453a561f32f28fb52f91d0108
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 23:36:36 +0000
Message-Id: <6b04ce04.7fa2.3f3f0872@gitrepo.freebsd.org>

The branch main has been updated by olivier:

URL: https://cgit.FreeBSD.org/src/commit/?id=11ba27a8a6a7302453a561f32f28fb52f91d0108

commit 11ba27a8a6a7302453a561f32f28fb52f91d0108
Author:     Olivier Cochard <olivier@FreeBSD.org>
AuthorDate: 2026-11-22 15:15:29 +0000
Commit:     Olivier Cochard <olivier@FreeBSD.org>
CommitDate: 2026-11-23 23:30:50 +0000

    ig4: Add an AMD generation with a 150 MHz clock
    
    AMDI0010 controllers attached as Atom, whose timings assume a 100 MHz
    input clock, but they run from 150 MHz (Linux drivers/acpi/acpi_apd.c),
    so the bus runs above the 400 kHz of fast mode and the SDA hold time
    is a third short.  The median of 200 timed 1 KB reads on an HP ZBook
    Ultra G1a gives an effective 472 kHz before and 348 kHz after.
    
    Give them their own generation: the Atom timings with a 150 MHz clock,
    and of the Atom register handling only the DesignWare FIFO depth and
    component version checks, not the Intel LPSS private registers.  It
    sorts before IG4_SKYLAKE, so IG4_HAS_ADDREGS() stays false.
    
    Reviewed by:    wulf, imp
    Approved by:    wulf, imp
    MFC after:      1 week
    Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/114
---
 sys/dev/ichiic/ig4_acpi.c |  2 ++
 sys/dev/ichiic/ig4_iic.c  | 14 ++++++++++++--
 sys/dev/ichiic/ig4_var.h  |  1 +
 3 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/sys/dev/ichiic/ig4_acpi.c b/sys/dev/ichiic/ig4_acpi.c
index 10540d2bd889..7bbd48208657 100644
--- a/sys/dev/ichiic/ig4_acpi.c
+++ b/sys/dev/ichiic/ig4_acpi.c
@@ -99,6 +99,8 @@ ig4iic_acpi_attach(device_t dev)
 	    strcmp(str, "INT3432") == 0 || strcmp(str, "INT3433") == 0) {
 		/* Lynx Point-LP / Wildcat Point-LP LPSS in ACPI mode. */
 		sc->version = IG4_HASWELL;
+	} else if (strcmp(str, "AMDI0010") == 0) {
+		sc->version = IG4_AMD;
 	} else {
 		/* All the other HIDs matched are Atom SOCs. */
 		sc->version = IG4_ATOM;
diff --git a/sys/dev/ichiic/ig4_iic.c b/sys/dev/ichiic/ig4_iic.c
index a326d487e1d9..c4dcaca4da00 100644
--- a/sys/dev/ichiic/ig4_iic.c
+++ b/sys/dev/ichiic/ig4_iic.c
@@ -106,6 +106,14 @@ static const struct ig4_hw ig4iic_hw[] = {
 		.txfifo_depth = 32,
 		.rxfifo_depth = 32,
 	},
+	[IG4_AMD] = {
+		.ic_clock_rate = 150,
+		.sda_fall_time = 280,
+		.scl_fall_time = 240,
+		.sda_hold_time = 60,
+		.txfifo_depth = 32,
+		.rxfifo_depth = 32,
+	},
 	[IG4_SKYLAKE] = {
 		.ic_clock_rate = 120,
 		.sda_hold_time = 230,
@@ -849,7 +857,8 @@ ig4iic_get_config(ig4iic_softc_t *sc)
 		sc->cfg.bus_speed = IG4_CTL_SPEED_FAST;
 
 	/* REG_COMP_PARAM1 is not documented in latest Intel specs */
-	if (sc->version == IG4_HASWELL || sc->version == IG4_ATOM) {
+	if (sc->version == IG4_HASWELL || sc->version == IG4_ATOM ||
+	    sc->version == IG4_AMD) {
 		v = reg_read(sc, IG4_REG_COMP_PARAM1);
 		if (IG4_PARAM1_TXFIFO_DEPTH(v) != 0)
 			sc->cfg.txfifo_depth = IG4_PARAM1_TXFIFO_DEPTH(v);
@@ -995,7 +1004,8 @@ ig4iic_set_config(ig4iic_softc_t *sc, bool reset, bool force_restore)
 		v = reg_read(sc, IG4_REG_IDLE_LTR_VALUE);
 	}
 
-	if (sc->version == IG4_HASWELL || sc->version == IG4_ATOM) {
+	if (sc->version == IG4_HASWELL || sc->version == IG4_ATOM ||
+	    sc->version == IG4_AMD) {
 		v = reg_read(sc, IG4_REG_COMP_VER);
 		if (v < IG4_COMP_MIN_VER)
 			return(ENXIO);
diff --git a/sys/dev/ichiic/ig4_var.h b/sys/dev/ichiic/ig4_var.h
index 0d000ab34c1d..91d467a11d83 100644
--- a/sys/dev/ichiic/ig4_var.h
+++ b/sys/dev/ichiic/ig4_var.h
@@ -45,6 +45,7 @@ enum ig4_vers {
 	IG4_EMAG,
 	IG4_HASWELL,
 	IG4_ATOM,
+	IG4_AMD,
 	IG4_SKYLAKE,
 	IG4_APL,
 	IG4_CANNONLAKE,

From nobody Mon Nov 23 23:39:42 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYMqL6DR8z71rV3
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 23:39: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYMqL5d6Wz4LQ9
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 23:39:42 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795477182;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=kuYmTHRvm5xDF+rz6q5Fb5Fi6SQcsa+Pa+cF4sIVCI4=;
	b=tUz/g5irDnfk1WSUlBUCId5Vqc1GRnOme0ovUHYFAxTGRylwWlhh40/Qi3UkkyHz82YmKH
	3Mj9UEN2UBMv7stgO4oPNuLY47EMXjoValjSRvY21R3aKeoVDCXR3YDlPujQcPPxWcaqWC
	gcwRB0HpY7U09h7kTiqUc+ZhqxwcySg2LWY5VKhLRsPzhVnjlwF92fi5QpLCA42C/VpAIN
	Nq/v9su/N4n7zmnfcnBpqsXqRvcXSOy9o7scXQihv8s4GCfhabN7WJc0DknYEWwUpHYHBZ
	wH2lg9zBXsejbD70RllnVYRHENa3kFfJcUoU7AyKuYcAD9Kw1oTwp28Jrf04rw==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795477182;
	b=f6b/Rhkr4OhBvLKDUMyMvpHNUPX36iSow1VIDNwB8kOPQw/sFi5K9Gj1ZHD368YTGRj99O
	KarOYtMTKC0Ki37kkrRjLMv7raGMAGdcNF1PDx4Lfn0aVzB+kRydEupJ7YOx5ynrieSAAq
	6+KvA1FNJreG6s0g7j+2VB6UhowzAwFnAcvizEAqnujqK2dN57erD3gAFDXo8x3ojUJcVL
	u9cfPXIuTKVAu/wrDCRHuiTSZr3Jn7L7Ptk9BpiG+vf/buGTyG7u5S2TC2IOQuXRDw/M7r
	SO6rPapdmjaK1vKNxidrhSsdw2qVCLsAbyB2tPyEGhV0+7A0iKbs4OvQA/DOaA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795477182;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=kuYmTHRvm5xDF+rz6q5Fb5Fi6SQcsa+Pa+cF4sIVCI4=;
	b=nRzDQMERybKHgza3FpZ5nVULiZGtARmSro0oDIikm5sFZuDuwrpUMdkrblkZ2Q+Ew4wnKx
	Yet2hbmo2fcDOFBYzAZV8qHt/m0kwwhB+JfDL3mInW/Lz8f4EnlPoCms5jGh0Kl4GwkPk0
	uut1cg6iJV8IjjN+mJOOyM3mBzMjadjttP7+adjN3AtoGblcYqr/gK4gXWitMCd/oHprtH
	eTZTNDXK8hyyVhPcqxyJ4rH3Fec05jpCl63LsSVAzUoTdzOQvDf5cIcg6F4SwsSHVgtwD3
	DShOyRjPHVtmhSwCB0kvFeIwgw+vOZb8ZtAegQUySJxn3D4K279/J3uXPDV5Iw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYMqL4zMGz1Bdh
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 23:39:42 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 8b8f
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 23:39:42 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Olivier Cochard <olivier@FreeBSD.org>
Subject: git: 44c85f6bbc06 - main - amdgpio: Add PNP info for devmatch
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: olivier
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 44c85f6bbc06a59ba30107e2610ed1af603b9884
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 23:39:42 +0000
Message-Id: <6b04cebe.8b8f.2cf7400e@gitrepo.freebsd.org>

The branch main has been updated by olivier:

URL: https://cgit.FreeBSD.org/src/commit/?id=44c85f6bbc06a59ba30107e2610ed1af603b9884

commit 44c85f6bbc06a59ba30107e2610ed1af603b9884
Author:     Olivier Cochard <olivier@FreeBSD.org>
AuthorDate: 2026-11-11 18:05:29 +0000
Commit:     Olivier Cochard <olivier@FreeBSD.org>
CommitDate: 2026-11-23 23:33:47 +0000

    amdgpio: Add PNP info for devmatch
    
    amdgpio is not in GENERIC and exports no PNP info, so devmatch(8)
    never loads it, and GPIO consumers on AMD systems find no controller
    unless amdgpio is in kld_list.
    
    Export the ACPI ids so devmatch(8) loads the module at boot.
    
    Reviewed by:    imp
    Approved by:    imp
    Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/116
---
 sys/dev/amdgpio/amdgpio.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sys/dev/amdgpio/amdgpio.c b/sys/dev/amdgpio/amdgpio.c
index 5cfddfaa338e..9e435256fde6 100644
--- a/sys/dev/amdgpio/amdgpio.c
+++ b/sys/dev/amdgpio/amdgpio.c
@@ -354,15 +354,16 @@ amdgpio_pin_toggle(device_t dev, uint32_t pin)
 	return (0);
 }
 
+static char *amdgpio_ids[] = { "AMD0030", "AMDI0030", NULL };
+
 static int
 amdgpio_probe(device_t dev)
 {
-	static char *gpio_ids[] = { "AMD0030", "AMDI0030", NULL };
 	int rv;
 
 	if (acpi_disabled("gpio"))
 		return (ENXIO);
-	rv = ACPI_ID_PROBE(device_get_parent(dev), dev, gpio_ids, NULL);
+	rv = ACPI_ID_PROBE(device_get_parent(dev), dev, amdgpio_ids, NULL);
 	if (rv <= 0)
 		device_set_desc(dev, "AMD GPIO Controller");
 
@@ -614,3 +615,4 @@ DRIVER_MODULE(amdgpio, acpi, amdgpio_driver, 0, 0);
 MODULE_DEPEND(amdgpio, acpi, 1, 1, 1);
 MODULE_DEPEND(amdgpio, gpiobus, 1, 1, 1);
 MODULE_VERSION(amdgpio, 1);
+ACPI_PNP_INFO(amdgpio_ids);

From nobody Mon Nov 23 23:50:46 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYN461VTzz71sfh
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 23:50: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYN460W4xz4NsK
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 23:50:46 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795477846;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=UwcWCaeRqolh/f4tQzDj7f2TT3nxhcczIcXINrEFP04=;
	b=tVBdZa7y0sxzrniS3tpxogJVt5JFH2MnPzdndrFE9ISChQb/0UW0zMZXW6116tNI45OpRx
	cCDsjxQLHiD1LsjaILdFNHP1W0eBgJ94hnKB1cjKGhDlIanp2ewmQ7hNVo4sNoDvjAsssi
	Uu6+zMs9/VxBeKqXasYoNpgYXofgxpfEAm40V8KOY/FFWcZ5ggzB7kZrqow2cI0fWUwLyV
	nKP6XYsCgjlA3y0m/Hp22i70TASMBRIm+8Qm1p/9AmWby3jbOIjms9Flp+/VLaxcxqQisc
	REqPGz/OX/gm/0istmCTfjw4T54a+ewTgX56Epwj7wYoacD16LeqStWFilgeCw==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795477846;
	b=Ndp2UeK6THtYx8yc9xqUvO9uqw6pz0rkniEABI3y7VQA+Av5p1YBMvOk2M/nDFf9OTeaKk
	HmEdHKtPMZ31AjCMz5aqu9qeKdFvkYmElIVBxEys8OqhWvuz5Xhy+2nFpXCQbO/30ytNBn
	c3bPgP7Y5TCkEUSPy8LLhM9D27J1EhlGeMQ8ZvZ5Bxl72vhgolFWV9wr6xbGRtzHtrn5Vt
	xCuOxoyBD2iINWTXv/g1KI62Ym58ulO/2hEKxUGdz4WWxsjQmdGGHCQWhTTLYuIyrBmalt
	Hl3X3J3GOakNWRgxzWBtbprVmfaCNo4tg+ZKBGlgCvYz+4fCz4QM3JuJpverSg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795477846;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=UwcWCaeRqolh/f4tQzDj7f2TT3nxhcczIcXINrEFP04=;
	b=dpSkoEOkh927d2rOdXqKlmW9aKcLjtMIdNUC+Ll2xCMoIZ+00hgW2lPlK9MafKF78ZNh85
	ZaLUS6VQNGQ1PeSws2ooD/Sm9etsoyigcJAYyrhaUVlWWK8u7r5nYESt5DP0lHci1ukIty
	nwbOZW81Ztjj+iEwXUt5ReAqTY7ir61bQa32wmlaRkufv2u4NeXjrOWLW1jJZz+5qRwVXd
	3GqNRnjQ7DLa3GlB7qOlx0ZwndZ9ULeFkKTyJ3TtTmp70WEAMq1M3irUJOxBjijOGcvKXr
	XSbrPD8Fd84lX2Jc+pgiLkAiYgw221MtguMV29zBHkVs/oqDBBpEgKzm8rDahA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYN460B7Wz1CYJ
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 23:50:46 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 9370
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 23:50:46 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Olivier Cochard <olivier@FreeBSD.org>
Subject: git: d5ad797c5e2a - main - acpi: Return the handle of a reference property, not its target
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: olivier
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: d5ad797c5e2a3fb4920262fe4fbd966177022b1b
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 23:50:46 +0000
Message-Id: <6b04d156.9370.3b165d70@gitrepo.freebsd.org>

The branch main has been updated by olivier:

URL: https://cgit.FreeBSD.org/src/commit/?id=d5ad797c5e2a3fb4920262fe4fbd966177022b1b

commit d5ad797c5e2a3fb4920262fe4fbd966177022b1b
Author:     Olivier Cochard <olivier@FreeBSD.org>
AuthorDate: 2026-11-22 23:47:23 +0000
Commit:     Olivier Cochard <olivier@FreeBSD.org>
CommitDate: 2026-11-23 23:45:11 +0000

    acpi: Return the handle of a reference property, not its target
    
    acpi_bus_get_prop() copied the first bytes of the namespace node a
    _DSD reference points to, instead of the handle itself, when a caller
    asked for such a property with a type other than DEVICE_PROP_HANDLE.
    
    Reviewed by:    wulf, imp
    Approved by:    wulf, imp
    Fixes:          99e6980fcf5e ("device_get_property: add a HANDLE case")
    MFC after:      1 week
    Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/117
---
 sys/dev/acpica/acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index b283856ffe52..993203c5caab 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -2161,7 +2161,7 @@ acpi_bus_get_prop(device_t bus, device_t child, const char *propname,
 
 			h = acpi_GetReference(NULL,
 			    __DECONST(ACPI_OBJECT *, obj));
-			memcpy(propvalue, h, sizeof(ACPI_HANDLE));
+			memcpy(propvalue, &h, sizeof(ACPI_HANDLE));
 		}
 		return (sizeof(ACPI_HANDLE));
 	default:

From nobody Mon Nov 23 23:50:47 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYN472TXDz71st4
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 23:50: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYN470r6Dz4Njf
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 23:50:47 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795477847;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Xmumbto7oz1mke6Y+f3NYzCiQEiyIKc1qoi+OZjdCrE=;
	b=KySS+LLlFhsSYV40hLY8YDMM+c25SwE6RvHXr428+KXOyquzVQUmkIhl/30AhPm+DTh+rt
	gEhFdr1Na3i6cQKUx8YgbHykh3VrL1sWwCjA5mOmiTjAikeM7hnB8wic2gdh97g08hVFLS
	gGx1I0pzsF9DLU81qkAKvlwHHGXC++4Jt0l8Z4PZ009fRfrPwZmJjLuLP/uBkoqO2RdpEh
	Da350ngglgGY62VDTBcdPkJO2vS/AAMeN9eqNAwnbLiCK57fFdjqaVp7oFUU5jVOsuNeP8
	oFcAplk5XDbp+1y1RjP8jjUGx34jGtRvPVoZ+89PD76hFGe5ha+gEtTQ2KJPlg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795477847;
	b=A5G9mXphwHlhQdF/dyVVSN9THGxH+wtRZVXySOBLaHOqKH+fUgf2PpKkRCxfHh2LQXIg3u
	W+pZIjQDMrmcnjy3nPNp0wYPC/67lsGMbilf/zH1Jk7/h3PwSvsRQKM/5+Q7KO4ZdGodmA
	x5PxGYL9b8RwwXJwEfonShpxi6OeG9pCTHMvXLwEkqcojce5mxdKjiErgh1ZMFB/EhMY5F
	ljA4kYKbZ918IIdYnV8/M6HX+PiacwYxVuugavbtSt4DAc3PYGFxIYJij1eXLhrgU6n+xq
	lFdacbUyXocNTPlyM8RZFMxtCz+4wQUuhNGlx3PaxBAX8iKjg4mNcin9KFwB/w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795477847;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Xmumbto7oz1mke6Y+f3NYzCiQEiyIKc1qoi+OZjdCrE=;
	b=fkKELFzwVeUcft74c9PD8SzDRJqmfCWY1bSJB5ndL4zuyZmtMJtJLSDtyoLU5ZsHDnT8oa
	NBHVF3lTuW2T8WbsL2wYY3/XC/zQjt5mV2DnI8WEaZkxHj3sGoujkMTMYx2tNc1t9hy0br
	rTD4xAMbJwbEND+k2YkUebeAoLPYMd/o2duBcDRkFhqk8PWT969juL0lTRB/NNZn/meSQ4
	ItanWCYZn+ETkyHsPqweFv4XfDtz8vCd5aQVCeFjqi+eA8RkJJXcLn6W17Bu4f7OsgHgzc
	iF+ciOh2h9hT9MK+0o47ofbG8rcebetOzrF1mD9Svw1wjhPri5pbb3+VnsGZMQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYN470V6Xz1CVF
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 23:50:47 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id a19d
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 23:50:47 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Olivier Cochard <olivier@FreeBSD.org>
Subject: git: 92a634d40f74 - main - acpi_iicbus: Free the ivars of deleted children
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: olivier
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 92a634d40f743f00afe0e874c880adefe2e021bf
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 23:50:47 +0000
Message-Id: <6b04d157.a19d.45238df4@gitrepo.freebsd.org>

The branch main has been updated by olivier:

URL: https://cgit.FreeBSD.org/src/commit/?id=92a634d40f743f00afe0e874c880adefe2e021bf

commit 92a634d40f743f00afe0e874c880adefe2e021bf
Author:     Olivier Cochard <olivier@FreeBSD.org>
AuthorDate: 2026-11-21 17:49:08 +0000
Commit:     Olivier Cochard <olivier@FreeBSD.org>
CommitDate: 2026-11-23 23:45:30 +0000

    acpi_iicbus: Free the ivars of deleted children
    
    acpi_iicbus_child_deleted() replaces iicbus_child_deleted() but only
    detached the ACPI data, so the ivars and their resource list leaked
    with every deleted child.  It also used the ivars without checking
    them, while iicbus_add_child_common() can leave a child without any.
    Check them and call iicbus_child_deleted() at the end.
    
    Reviewed by:    wulf, imp
    Approved by:    wulf, imp
    Fixes:          9b7938dcf338 ("iicbus(4): Add support for ACPI-based children enumeration")
    MFC after:      1 week
    Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/117
---
 sys/dev/iicbus/acpi_iicbus.c | 3 +++
 sys/dev/iicbus/iicbus.c      | 2 +-
 sys/dev/iicbus/iicbus.h      | 1 +
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/sys/dev/iicbus/acpi_iicbus.c b/sys/dev/iicbus/acpi_iicbus.c
index 873a96b04823..ffad1bfb9be7 100644
--- a/sys/dev/iicbus/acpi_iicbus.c
+++ b/sys/dev/iicbus/acpi_iicbus.c
@@ -670,8 +670,11 @@ acpi_iicbus_child_deleted(device_t bus, device_t child)
 {
 	struct acpi_iicbus_ivars *devi = device_get_ivars(child);
 
+	if (devi == NULL)
+		return;
 	if (acpi_get_device(devi->handle) == child)
 		AcpiDetachData(devi->handle, acpi_fake_objhandler);
+	iicbus_child_deleted(bus, child);
 }
 
 static int
diff --git a/sys/dev/iicbus/iicbus.c b/sys/dev/iicbus/iicbus.c
index 0894ddddb8e8..48daab6674a6 100644
--- a/sys/dev/iicbus/iicbus.c
+++ b/sys/dev/iicbus/iicbus.c
@@ -248,7 +248,7 @@ iicbus_add_child(device_t dev, u_int order, const char *name, int unit)
 	    dev, order, name, unit, sizeof(struct iicbus_ivar)));
 }
 
-static void
+void
 iicbus_child_deleted(device_t dev, device_t child)
 {
 	struct iicbus_ivar *devi;
diff --git a/sys/dev/iicbus/iicbus.h b/sys/dev/iicbus/iicbus.h
index a72b004fcc7f..ec12817bab18 100644
--- a/sys/dev/iicbus/iicbus.h
+++ b/sys/dev/iicbus/iicbus.h
@@ -89,6 +89,7 @@ device_t iicbus_add_child_common(device_t dev, u_int order, const char *name,
     int unit, size_t ivars_size);
 int iicbus_detach(device_t dev);
 void iicbus_probe_nomatch(device_t bus, device_t child);
+void iicbus_child_deleted(device_t dev, device_t child);
 int iicbus_read_ivar(device_t bus, device_t child, int which,
     uintptr_t *result);
 int iicbus_write_ivar(device_t bus, device_t child, int which,

From nobody Mon Nov 23 23:50:48 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYN484d6lz71srG
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Mon, 23 Nov 2026 23:50: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYN481x51z4Njn
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 23:50:48 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795477848;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=C/V2zRE6vPxMmGm6VhpLmwc6PURjAJe1cXAvwPWwsEI=;
	b=SqgUukwCOGiR8WBJLL+YGOHNAcPV9+3h7Fnl6p/htxIJbD7HvrRcJTscX8XmIIrOcf5nBO
	owfWhGnqxPkh655spGRUTUDmOJ19ooYy6cqvtJZyoz5A3NvJZRZFEdRaBMN2cJzsyr68OE
	QBy386C4CPzF8MF/Zifjg1Mc1mnbyKNY2FA/7uSW+TmqPAMaKWhDQ7Aehd0yPOqZFVq0Ts
	jNOR9z7CDYi+gjsZoPbB/cxbyG1YWdli2UQdcp31KmYbAc1MdBAZ+nhcVF+oF2qrnj7tIP
	T53jJQD4SXIH3m/2hI1JczcVfVAvqrwGtMmV9om0NcLF2HBOuP1FBhm7gJkzBA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795477848;
	b=cUM9LWsSIoPj3mNL8DSdcsplYM0/4hH2csq7nhse3hEBRYmaXyRQPxf7tEkewwb0tyhePR
	A2NfAOGeJRtaqXWY0gha5Rr2H9SinT59zOjzo2+/nIXGF3yuHM7jr44qKChTdAgHpmeH3o
	du/DXwxAMJKLh0oBv0BxzSIU89VwfAP4VxuVaqyZFrcoJoO2waFCy52CJ/Myb4fOQMUP1V
	RvgTMAaadTRu9qz6/3a+m9Nvh56pcKo6LgWg1PolQoYEhEDstzSMNmUhVll6sj4XozME9X
	Ukti2n6i3Y1OQ944xA6HGDMvkudtEsdAU+MDyjBH+g750AsDASJn31urtHwrOg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795477848;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=C/V2zRE6vPxMmGm6VhpLmwc6PURjAJe1cXAvwPWwsEI=;
	b=A/hDsGGlgoMo3uJTKTEkmDfBqcTPTd4jcoq9+YgyiJDkO7Kts+TAHHBovssVph+2ui30ib
	/mim+5CKQ9henk1zUyKKDTBptNzhIaHvbjuFO317Zo7Yot8J2OdFkMciJjLthv88wBOL9v
	rR13+vbhov3iw50fTP+gWmnxqppUdcZGR+362iP8kPwcpR4XqwrsFlYK3lcg+5wkKRTUnI
	2sJGnAv9ndZZieQwwsNbocRnPKOWQ/Uc8At8sthZSBFupcRdQBoxiguJ5TXcEB6pih8xa3
	Xke27kEBHTHOHcqrkh+kvosizxdZP96UtaZvu3rCI9ShzXwjQk1ykHpubiJRCQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYN48147bz1CRn
	for <dev-commits-src-all@FreeBSD.org>; Mon, 23 Nov 2026 23:50:48 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 9e07
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Mon, 23 Nov 2026 23:50:48 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Olivier Cochard <olivier@FreeBSD.org>
Subject: git: 17ebd95594cd - main - acpi_iicbus: Return _DSD properties of the I2C children
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: olivier
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 17ebd95594cd106b73cc9422ba86245e0bf5ab99
Auto-Submitted: auto-generated
Date: Mon, 23 Nov 2026 23:50:48 +0000
Message-Id: <6b04d158.9e07.e0d59e1@gitrepo.freebsd.org>

The branch main has been updated by olivier:

URL: https://cgit.FreeBSD.org/src/commit/?id=17ebd95594cd106b73cc9422ba86245e0bf5ab99

commit 17ebd95594cd106b73cc9422ba86245e0bf5ab99
Author:     Olivier Cochard <olivier@FreeBSD.org>
AuthorDate: 2026-11-21 17:29:07 +0000
Commit:     Olivier Cochard <olivier@FreeBSD.org>
CommitDate: 2026-11-23 23:45:39 +0000

    acpi_iicbus: Return _DSD properties of the I2C children
    
    acpi_iicbus has no bus_get_property method, so device_get_property()
    on one of its children reaches acpi(4) through
    bus_generic_get_property().  acpi_bus_get_prop() then takes the
    child's acpi_iicbus ivars for a struct acpi_device and follows garbage
    pointers: on an HP ZBook Ultra G1a, a driver reading _DSD of its I2C
    device froze the machine.
    
    Answer for the I2C children from their own ACPI handle, with a _DSD
    cache in the ivars, through a helper split out of acpi_bus_get_prop().
    
    Reviewed by:    wulf, imp
    Approved by:    wulf, imp
    MFC after:      1 week
    Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/117
---
 sys/dev/acpica/acpi.c        | 26 ++++++++++++++++++++++----
 sys/dev/acpica/acpivar.h     |  3 +++
 sys/dev/iicbus/acpi_iicbus.c | 21 +++++++++++++++++++++
 3 files changed, 46 insertions(+), 4 deletions(-)

diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index 993203c5caab..f63373ee06f9 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -168,6 +168,8 @@ static int	acpi_isa_get_compatid(device_t dev, uint32_t *cids, int count);
 static ACPI_STATUS acpi_device_scan_cb(ACPI_HANDLE h, UINT32 level,
 		    void *context, void **retval);
 static ACPI_STATUS acpi_find_dsd(struct acpi_device *ad);
+static ACPI_STATUS acpi_ad_get_prop(struct acpi_device *ad,
+		    const char *propname, const ACPI_OBJECT **value);
 static void	acpi_platform_osc(device_t dev);
 static void	acpi_probe_children(device_t bus);
 static void	acpi_probe_order(ACPI_HANDLE handle, int *order);
@@ -1999,14 +2001,18 @@ acpi_device_eval_obj(device_t bus, device_t dev, const char *pathname,
 static ACPI_STATUS
 acpi_device_get_prop(device_t bus, device_t dev, const char *propname,
     const ACPI_OBJECT **value)
+{
+	return (acpi_ad_get_prop(device_get_ivars(dev), propname, value));
+}
+
+static ACPI_STATUS
+acpi_ad_get_prop(struct acpi_device *ad, const char *propname,
+    const ACPI_OBJECT **value)
 {
 	const ACPI_OBJECT *pkg, *name, *val;
-	struct acpi_device *ad;
 	ACPI_STATUS status;
 	int i;
 
-	ad = device_get_ivars(dev);
-
 	if (ad == NULL || propname == NULL)
 		return (AE_BAD_PARAMETER);
 	if (ad->dsd_pkg == NULL) {
@@ -2102,11 +2108,23 @@ err:
 static ssize_t
 acpi_bus_get_prop(device_t bus, device_t child, const char *propname,
     void *propvalue, size_t size, device_property_type_t type)
+{
+	return (acpi_ad_get_property(device_get_ivars(child), propname,
+	    propvalue, size, type));
+}
+
+/*
+ * Return a _DSD property of the device described by ad, for buses whose
+ * children are ACPI devices but whose ivars are not a struct acpi_device.
+ */
+ssize_t
+acpi_ad_get_property(struct acpi_device *ad, const char *propname,
+    void *propvalue, size_t size, device_property_type_t type)
 {
 	ACPI_STATUS status;
 	const ACPI_OBJECT *obj;
 
-	status = acpi_device_get_prop(bus, child, propname, &obj);
+	status = acpi_ad_get_prop(ad, propname, &obj);
 	if (ACPI_FAILURE(status))
 		return (-1);
 
diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h
index 66050662853c..7dfdc2e600c5 100644
--- a/sys/dev/acpica/acpivar.h
+++ b/sys/dev/acpica/acpivar.h
@@ -508,6 +508,9 @@ acpi_d_state_to_str(int state)
 char		*acpi_name(ACPI_HANDLE handle);
 int		acpi_avoid(ACPI_HANDLE handle);
 int		acpi_disabled(char *subsys);
+ssize_t		acpi_ad_get_property(struct acpi_device *ad,
+		    const char *propname, void *propvalue, size_t size,
+		    device_property_type_t type);
 int		acpi_get_acpi_device_path(device_t bus, device_t child,
 		    const char *locator, struct sbuf *sb);
 int		acpi_machdep_init(device_t dev);
diff --git a/sys/dev/iicbus/acpi_iicbus.c b/sys/dev/iicbus/acpi_iicbus.c
index ffad1bfb9be7..5bee1fccd56c 100644
--- a/sys/dev/iicbus/acpi_iicbus.c
+++ b/sys/dev/iicbus/acpi_iicbus.c
@@ -73,6 +73,7 @@ struct acpi_iicbus_softc {
 struct acpi_iicbus_ivars {
 	struct iicbus_ivar	super_ivar;
 	ACPI_HANDLE		handle;
+	struct acpi_device	ad;	/* _DSD cache */
 };
 
 static int install_space_handler = 1;
@@ -674,9 +675,28 @@ acpi_iicbus_child_deleted(device_t bus, device_t child)
 		return;
 	if (acpi_get_device(devi->handle) == child)
 		AcpiDetachData(devi->handle, acpi_fake_objhandler);
+	if (devi->ad.dsd.Pointer != NULL)
+		AcpiOsFree(devi->ad.dsd.Pointer);
 	iicbus_child_deleted(bus, child);
 }
 
+static ssize_t
+acpi_iicbus_get_property(device_t bus, device_t child, const char *propname,
+    void *propvalue, size_t size, device_property_type_t type)
+{
+	struct acpi_iicbus_ivars *devi;
+
+	/* Deeper devices do not carry our ivars. */
+	if (device_get_parent(child) != bus)
+		return (-1);
+	devi = device_get_ivars(child);
+	if (devi->handle == NULL)
+		return (-1);
+	devi->ad.ad_handle = devi->handle;
+	return (acpi_ad_get_property(&devi->ad, propname, propvalue, size,
+	    type));
+}
+
 static int
 acpi_iicbus_read_ivar(device_t bus, device_t child, int which, uintptr_t *res)
 {
@@ -768,6 +788,7 @@ static device_method_t acpi_iicbus_methods[] = {
 	DEVMETHOD(bus_child_location,	acpi_iicbus_child_location),
 	DEVMETHOD(bus_child_pnpinfo,	acpi_iicbus_child_pnpinfo),
 	DEVMETHOD(bus_get_device_path,	acpi_get_acpi_device_path),
+	DEVMETHOD(bus_get_property,	acpi_iicbus_get_property),
 
 	DEVMETHOD_END,
 };

From nobody Tue Nov 24 00:09:43 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYNTz59t5z71vSX
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 00:09: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYNTz4hs5z4QbB
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 00:09:43 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795478983;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=g4Ena9BQhJoKXTp6bzO3vBxGL5fxWOJqfp7FpldKsDw=;
	b=HkD5q8tslF7YF2LSFjofIAHKOJ4N2NlZizP1c9Y8l0kFG8+2dDW80YgVTk9jUxE0/VWZ8v
	iI9OHgLybbNyXaAzxQLmRinbELyqKSZaO7POW67k02rnidJhCWlmSxu2SQf0gVPWTN84+q
	qkUu2pUPCPL1BaBDgWadjenGC2mrmCwdYPy8nIcESFB3SMwwaiBdsA+X86uX+chOcrArVC
	ZedIXIX856ronx98veLBO97vymGNOHJ3yPuEkWLetlf/dU7Rm5IOewo564OUjhzTzDGzWF
	PVMruixnuvoMwjr2PAAiok9fJgqAt3YalTwsNEQtAq5zqKFdsTbACtREm4b1LQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795478983;
	b=oAiml1dfeiWpUIxA1Yy9bnPp3fWYCza9pxuM4BFEV/DclPD94XNpNztSss7jnmJmepwi00
	eoo5EKtXSK6FpTn4RfJQ//2RL7N0sSxMa86zMeHYW6RzAHAavL0yN3BGL8/VIIw991Llrs
	ywBc286KlVqNDtQWPQss06k3IGU2xIKT3IxyUouORSvCqUwKXFmjkxXzytPgc5Jv8JHJdF
	RgNcrqepuuv4P2m8HDKl4L+r+YbrQUogupCdTYk7Tlh2QTG5z2+lDIgurIQJhHVMX4dQh+
	SwNBQ/CfAwenu/tEnfpluRTDy8VgIHLgiLOFxDbqZSATzF8Dp5Xnr1P4NF19UA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795478983;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=g4Ena9BQhJoKXTp6bzO3vBxGL5fxWOJqfp7FpldKsDw=;
	b=j/oRMi2PI5Gupf89qzdGoER1gDhFUkJCh/QwV56awFbK1x6U4wwBXxpTz3jlJaav+sEU3f
	UQsapFwcE6ufGL3M3aFntV4C4+ILJeOs+eCo6t3FpxPAyM2UMkfszenbXTpIc3zCA9AeOt
	/hU736I2DIJ1zZSWZoP0FsW2Ie1bo66qXs65y9NnqzZhbo/42WlHD+jyWzS3ABP5WEe9pU
	zfeDd4YrHYtfiwd6rurr8n94lslgfJenNT0N2tyDyC4d9WV/T9OoPNBbMXn9TB3flQINMX
	0c3yIiMqJ7Iyidl7ZukRcqQOAp+4hxCIQ7ZIjnzRIT8xQUkJa/9dqpEWnrxBfg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYNTz4Mvnz1Cwd
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 00:09:43 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id b513
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 00:09:43 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Simon J. Gerraty <sjg@FreeBSD.org>
Subject: git: 97fd69b0b884 - main - libsa add boot_serial to is_restricted_var allow list
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: 97fd69b0b88405e08c0b23d0a9a3a64e5b47fc84
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 00:09:43 +0000
Message-Id: <6b04d5c7.b513.3d7b4c6f@gitrepo.freebsd.org>

The branch main has been updated by sjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=97fd69b0b88405e08c0b23d0a9a3a64e5b47fc84

commit 97fd69b0b88405e08c0b23d0a9a3a64e5b47fc84
Author:     Simon J. Gerraty <sjg@FreeBSD.org>
AuthorDate: 2026-11-24 00:09:12 +0000
Commit:     Simon J. Gerraty <sjg@FreeBSD.org>
CommitDate: 2026-11-24 00:09:12 +0000

    libsa add boot_serial to is_restricted_var allow list
    
    NOTE: variables that get passed by boot_setenv() will not have '='
    so for these we need to leave that out.
    It doesn't matter much unless the variable we want to allow is
    also a prefix for something we do not.
    
    Sponsored by:   Hewlett Packard Enterprise Development LP
    
    Reviewed by:    kevans, imp
    Differential Revision:  https://reviews.freebsd.org/D61856
---
 stand/libsa/environment.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/stand/libsa/environment.c b/stand/libsa/environment.c
index 3882db6ee9e1..1e62b92d7160 100644
--- a/stand/libsa/environment.c
+++ b/stand/libsa/environment.c
@@ -229,16 +229,15 @@ is_restricted_var(const char *name)
 	 * We impose restrictions if input is not verified/trusted
 	 * allowing for exceptions.
 	 * These entries should probably include the '='
+	 * except if they need to be checked for boot_setenv()
 	 */
 	const char *allowed[] = {
-		"boot_function=",
-		"boot_phase=",
-		"boot_recover_cli=",
-		"boot_recover_volume=",
-		"boot_safe=",
-		"boot_set=",
-		"boot_single=",
-		"boot_verbose=",
+		"boot_multicons",
+		"boot_mutemsgs",
+		"boot_safe",
+		"boot_serial",
+		"boot_single",
+		"boot_verbose",
 #ifdef ENV_IS_RESTRICTED_ALLOWED_LIST
 		ENV_IS_RESTRICTED_ALLOWED_LIST,
 #endif

From nobody Tue Nov 24 00:21:44 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYNlr68KWz71wHx
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 00:21:44 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYNlr4k53z4TDd
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 00:21:44 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795479704;
	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=0qYFACekUIqrRVH83JAKeKX3/WZVARwZmQgkivXvYdk=;
	b=ZiDd4LnbyY2u2AMZGB8iOnqo/IQ5IQ4T2kiKXqtUYXnG5Poz1V0nA3pYgolgDR4d2X9yW1
	QWPNpYthU3oJck2zBpb/75H/Ofj3d7ox7DIwNe2F/EfGr6/126y7rIAAGnNisbP8q75Zfd
	ljQLU0HKjpvnYfwbOgi+haZ8nZsrvbIaiOj0lbB2TjkYFjNTqwBBj5h6F/2GKeO2JnjcI9
	xGXD5Xzg1YmS3ee42YElN0QJQAgyNFEK+8tmbMTsGROjW8TW8FHlVvpH78JWIughLk8Jpg
	9z9oHsUQY4feCzYIeou1gsUq+hbKLokjSoUKsXX8zHP9eqQOs3tMHTggpxUpZg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795479704;
	b=k2phVpgcMjWCVoucH8opl/RiSja/YroAhg7NzND/BnKbFZjs3JxaBAisBrlk2w2vezL5XU
	65hFZljPK92Uj5bw4fgK8zHqgSZKagMBVEFKpaR/0LtY+cZ27dAefAiHeVsLdnKCL7syfv
	qezc3BbcS96S+T8d3b74bAF2AZgC3zn82UYtmyY4hXuSaG7r/jk7+KleelAMAo2+VpV5Iw
	as32tiirRAaW4lPobV2097NQOl0KkIzgMe3R5xUFHzyfMZj+jWLLb41qdnDDBJb7d3WEmT
	idgaWhHytDnBBTS+gizNXr1FidfMxOS6mGY6g7UPD76yF4nOJyfr9x3r8wWkow==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795479704;
	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=0qYFACekUIqrRVH83JAKeKX3/WZVARwZmQgkivXvYdk=;
	b=A56fNV2fNJ32Wo2RBNWwvd4wz6AnQ+U20MKoh4yrw3CDycgdBFNc9+zDmzeB+bC3NHr/rV
	RfWdtDSgc4EVe5LOfgcGg2VblTzpgXlo/Yjz8bWU4Jn0EgCgPTueiydX2k6xcG64MQzI08
	yFm7mY4IDZtlgg5eVVFKy/NlvOTb0lwDxoqSQf5ZjN4XB9wzaFbs9kt0ITRO/Ik/pT3KeD
	+OLfB+AGgVUYiLo3Vzq1QDoM3mhfwzE5XpcEo12TdoVz14Co0T6bekP+Z+AP6hgxkwrufs
	TgWlRbl4HloIhGR8f8FcNM8DZCgSwGkeFIy0jiE+uYM/FGc42x7m+bluL/SO2w==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYNlr4P4SzDlZ
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 00:21:44 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id ca72
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 00:21:44 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Jose Luis Duran <jlduran@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: ec5fcc711384 - stable/14 - makefs: tests: Double the timeout of ZFS compression test
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: ec5fcc711384df7ce72e9f24874034ef9d80937f
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 00:21:44 +0000
Message-Id: <6b04d898.ca72.72b158a2@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=ec5fcc711384df7ce72e9f24874034ef9d80937f

commit ec5fcc711384df7ce72e9f24874034ef9d80937f
Author:     Jose Luis Duran <jlduran@FreeBSD.org>
AuthorDate: 2026-01-05 20:31:40 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-24 00:19:53 +0000

    makefs: tests: Double the timeout of ZFS compression test
    
    The test makefs_zfs_tests:compression is timing out on ci.freebsd.org.
    Double the default timeout to allow it to finish.
    
    While here, check if the file exists before cleaning up, otherwise, cat
    may fail.
    
    Reported by:    Jenkins
    Reviewed by:    asomers
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D54424
    
    (cherry picked from commit 9f28e92637e9a29124f407b74d7665a921865a53)
---
 usr.sbin/makefs/tests/makefs_zfs_tests.sh | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/usr.sbin/makefs/tests/makefs_zfs_tests.sh b/usr.sbin/makefs/tests/makefs_zfs_tests.sh
index 22b81d93267d..6f7b568531a0 100644
--- a/usr.sbin/makefs/tests/makefs_zfs_tests.sh
+++ b/usr.sbin/makefs/tests/makefs_zfs_tests.sh
@@ -41,14 +41,18 @@ common_cleanup()
 	# Try to force a TXG, this can help catch bugs by triggering a panic.
 	sync
 
-	pool=$(cat $TEST_ZFS_POOL_NAME)
-	if zpool list "$pool" >/dev/null; then
-		zpool destroy "$pool"
+	if [ -f "$TEST_ZFS_POOL_NAME" ]; then
+		pool=$(cat $TEST_ZFS_POOL_NAME)
+		if zpool list "$pool" >/dev/null; then
+			zpool destroy "$pool"
+		fi
 	fi
 
-	md=$(cat $TEST_MD_DEVICE_FILE)
-	if [ -c /dev/"$md" ]; then
-		mdconfig -d -u "$md"
+	if [ -f "$TEST_MD_DEVICE_FILE" ]; then
+		md=$(cat $TEST_MD_DEVICE_FILE)
+		if [ -c /dev/"$md" ]; then
+			mdconfig -d -u "$md"
+		fi
 	fi
 }
 
@@ -128,6 +132,12 @@ basic_cleanup()
 # Try configuring various compression algorithms.
 #
 atf_test_case compression cleanup
+compression_head()
+{
+	# Double the default timeout to make it pass on emulated architectures
+	# on ci.freebsd.org
+	atf_set "timeout" 600
+}
 compression_body()
 {
 	create_test_inputs

From nobody Tue Nov 24 00:21:45 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYNls5v83z71wCS
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 00:21: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYNls52FFz4TDg
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 00:21:45 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795479705;
	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=MSF9eyIpLT9ujl11m+vG6Y2tCLJDA9U+KtQ+ioBPNU4=;
	b=MyQLvZEtnjmIs/1cStD1caWx8bkxrCcooN5LexEOfW47JuGc762ySD8CG+aaDM+XKxMki6
	OCU9LJ8TKiiXMzke1F45QoLhXRr1Kuh+s9dgyovwUwLkZNlIJuM5Q+/UgwetnGc3UKC7zP
	hVz/aBovewJ0BZyggkwWaVCyIUzxBz53q2Nkup28WZk+zj3lIR0zRESTzU1mxpHFDrZzID
	xnvyY+vons5vFj5ztZvUvluCDSdRpVZe3RlGSUxbUt+lAg8AgyvobC0Xk1BdvW08lFR6du
	CLmG3mtzwf/3cJ6HMBwsbXjHmH1D0Tn8br7kvD4VGmDvHWhG2uSi3UO4jFzL3Q==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795479705;
	b=dBaXMfw1ut5BksT5l9ZLOKOQiuLfI+RXpJB2LPtWDvKZ+YE9uw3xxgGXIgaTSQNbawIVwN
	jGs6Bw+jx6rnvifvkvoq6P0ii8lpsAiesJIHPRjZsljQQZVk1hHbH4vaud58lg6KSkHWjA
	Q39pndf5m/vYERlCIcC3NUkU8fiJ/FCBxghHs+wsHKMIJpVLfF42iXFG3qTdVlWnt/v781
	LD6hEX7w+6AxZVcjQryIQgGNJnD/2Ye/K+iwSsrrumFgXoL+TW+Re5LxtwA32JRWP1uKgq
	nLD5q/Cslp9V949X4j+D9pT79XvYEX9zjZBpCmRKFhf6a0thVgxKcxRucTuiGA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795479705;
	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=MSF9eyIpLT9ujl11m+vG6Y2tCLJDA9U+KtQ+ioBPNU4=;
	b=Z6xOpI0DAFJ0NQa789hJx6gZEjp7sbaSIRbcNMmfxqpoL9WMAIk+xjEaov5kx7eCuwt4a2
	Qm7fl8cFGdeq3CesUiFPZ71A3/O/9RcrqX+Y70oY40NSgzMeDt10J1AQkTqsXGeQ61V+oI
	jdU6LdytccXYy645+awcCOYBWJZvkRnzJ2rwIWSegHMEf/0fVDSucmBgZtPbb52QGLLyfw
	bAdU/op66/Rwqp+m3jLhzyfgEq7FyR75ZSB4qHhp1u4MUqWeAFB611AQWM9gm2XtiUcB4B
	qml+/xToGn5ZkvLdFQKLwiOEiDeuZrH6QxUQ96MA+IB/LRT8B1b8B8zl+tAgJw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYNls4jB6zF3b
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 00:21:45 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id bdbd
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 00:21:45 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Jose Luis Duran <jlduran@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 95f994ed7bb0 - stable/14 - makefs: tests: Double the timeout of ZFS file_extend test
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 95f994ed7bb019011c9c9a6126ab74c36bcad981
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 00:21:45 +0000
Message-Id: <6b04d899.bdbd.602c5dee@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=95f994ed7bb019011c9c9a6126ab74c36bcad981

commit 95f994ed7bb019011c9c9a6126ab74c36bcad981
Author:     Jose Luis Duran <jlduran@FreeBSD.org>
AuthorDate: 2026-01-05 20:32:24 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-24 00:20:01 +0000

    makefs: tests: Double the timeout of ZFS file_extend test
    
    The test makefs_zfs_tests:file_extend is timing out on ci.freebsd.org.
    Double the default timeout to allow it to finish.
    
    Reported by:    Jenkins
    Reviewed by:    asomers
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D54425
    
    (cherry picked from commit 065f02174f76a49fbf537ee51ed8068d3d398b08)
---
 usr.sbin/makefs/tests/makefs_zfs_tests.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/usr.sbin/makefs/tests/makefs_zfs_tests.sh b/usr.sbin/makefs/tests/makefs_zfs_tests.sh
index 6f7b568531a0..d3cd0e0e4be3 100644
--- a/usr.sbin/makefs/tests/makefs_zfs_tests.sh
+++ b/usr.sbin/makefs/tests/makefs_zfs_tests.sh
@@ -312,6 +312,12 @@ empty_fs_cleanup()
 }
 
 atf_test_case file_extend cleanup
+file_extend_head()
+{
+	# Double the default timeout to make it pass on emulated architectures
+	# on ci.freebsd.org
+	atf_set "timeout" 600
+}
 file_extend_body()
 {
 	local i start

From nobody Tue Nov 24 00:24:57 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYNqY5cC4z71wYx
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 00:24:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYNqY55f9z4V1F
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 00:24:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795479897;
	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=6HUqddlmJoMXDpAfQWKTHkS+NXg0b5dOxbU4HmQB+os=;
	b=mdl8hcFIdW2HqJTzU0dRaoCrYfrQMnFrTg0WTNcFsDblVZO1P27nxt5CO9aXJgfN3GFEPd
	tRc5OOFEK5/oqQnrN1NEIlYYc+fK/7I64qtKk9lph5ftJFoWG8H7nR9vTZuztY4hkj35dI
	K4yagjIg+FAX8zQDoUww15rh+INWehE0s4GTO0N2PJfkjqbz6k7IB0bpIJcXCBcPclMnmg
	0Q+FNnmhp41ez7qd5C73C7u/Tqo+BV9tFmll11h8eGcHJjHmWcy1FRudNiuWn309sTCxyS
	LANdwRufiLNgtpWknZj4b++OzsdsRyJXWlLB3lzEpbtWD2K0F9pAmu50j0wnWw==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795479897;
	b=e4amUyWcPdLcZXPZm72Di/6fkJt33LnF84zq+mAd5UXGjsXQY4rJkHIDWVWVgdixvYLAQN
	JlS0UHNAYv7UfM3j1tzt85i1G67S/FO4xseY1/0ytg48WizKwIT1BbbO2yelpbBgqzQlZR
	PTjwgf9o0wBZulDByFMAgzGEy5lRSBofA5ME8wr4XmcuZfw/1TwUkdb39KW6q8D0eyO9tQ
	IonuKtVyjkDhrZA3Ut+DHus0XPjIsDqY3+mdZuFn8saYtEN4+/n/rGFE/BE2G7FezS63hs
	IzFYmiXPKbjuHF5MeOIhwLpsa34QcypYMyIVr4HXWEhIZy7Tzwf2z+do2H8fng==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795479897;
	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=6HUqddlmJoMXDpAfQWKTHkS+NXg0b5dOxbU4HmQB+os=;
	b=SrDWR6LArB5p7Orqb2NRSToqM0aeKPc8nrSdrynZjTlr733NVB/haHe/3FsJBLLdy7EvRV
	a7ESUBTMWl4OfSREfq/spn16WCvjAy7ibp76HTT9CtJHVkuCbS6ClkPOqdLg/FtodCOk+r
	MnMmBC3eBL0NNixDdlVufcHVjk2ah879sqnwBoYHeBO1eIUEh739B6Y5ki0diHhRHC8llR
	GOJGyMX3AY08SY/4CgrL/OyxS6j8MAGEaxlNYxEA4jSBoZ/DnCXDYlypBE5HOOtZxs9NG6
	roaiTesily2dJxq0JEA39IBSA9WpWxevEALN86F1dMcOTAdLeAWRBe3Mh7QQEA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYNqY4ljzzF9N
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 00:24:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id c2ea
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 00:24:57 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Kristof Provost <kp@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: b308cbd55841 - stable/14 - pf tests: give rules_counter:4G more time
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: b308cbd558410a75b1cabee522344fb52c1d6e58
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 00:24:57 +0000
Message-Id: <6b04d959.c2ea.6ec717ff@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=b308cbd558410a75b1cabee522344fb52c1d6e58

commit b308cbd558410a75b1cabee522344fb52c1d6e58
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2025-10-09 07:29:14 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-24 00:24:15 +0000

    pf tests: give rules_counter:4G more time
    
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
    
    (cherry picked from commit 8217075f9ecb12fa9a4cf746541b9d3e1dc57e79)
---
 tests/sys/netpfil/pf/rules_counter.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/sys/netpfil/pf/rules_counter.sh b/tests/sys/netpfil/pf/rules_counter.sh
index 60878c2bd99c..43bff3706f15 100644
--- a/tests/sys/netpfil/pf/rules_counter.sh
+++ b/tests/sys/netpfil/pf/rules_counter.sh
@@ -153,6 +153,7 @@ keepcounters_pool_head()
 {
 	atf_set descr 'Test keepcounters for a rule with an interface pool'
 	atf_set require.user root
+	atf_set timeout 900
 }
 
 keepcounters_pool_body()

From nobody Tue Nov 24 00:24:58 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYNqZ6G6Hz71wr1
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 00:24:58 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYNqZ5W7Zz4Tqj
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 00:24:58 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795479898;
	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=BVhrxYpOL4AkKO+lvsHOsZ1oMSmOTpZrnNWkURlA42w=;
	b=j8ntxeuIMoXl5aFMD4I69bJdrooVd4oF3dn6GaZxNvaKXd13/Jy7hlg2P7MRQNleJCutWk
	afMbqiCC+iYV4yqoCuEZFFcZx0KotUHi7tcChFq/6cdU1UvQEbITmSOwESia9z5IBHh6hS
	xVp819OYI/1zY7ct64EFfbkzROw1cjP5vMm1ReZHFRfWDi+AIbZt5lJ2rUjfBHjk+FwoC+
	hRCDrYfJgNf64U07HForO5DFJLA2u/5rXWmK/Ai5hcLLrHLCyDqS7ObLANZtcKql8kN+14
	dYriEofLo16ZreIZbDWiyQ542Ws7aNEk19KlIW8xT/mkkg+e3XCDpVv0LIS85Q==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795479898;
	b=MLBWCyzoUwtEv12Td58HtH84NNrfriN4BmydyDcRVANxFagLH0n7m+Ey2AfkOchkKWXqDZ
	GqFiJ4tMOGkO4VuT/4DvBfSghICUX0SL/sp24ihpF7US+XActAWfGt0FQ0v0TxNEZr0ygt
	qdqo5xFIEMfGNE4JQ+eiI3dCnuZ8mtS2w2UnH4G3arCvARJac1icK0N6PalHFrPCDxnK2C
	0z2fjb+90ADL12koxw/P7KElJkdRlBQoAtDKjNeqwfuJ6ScOOxEevNPlKkrCDxW0h14R/t
	+65Icqwv9m666fS/vOLf/poduGLFCjJw63W5v67IXhueSV51DCWhkalQarPgpw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795479898;
	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=BVhrxYpOL4AkKO+lvsHOsZ1oMSmOTpZrnNWkURlA42w=;
	b=YyuKR9VVVL6volVHSMFvTP/snW8/WHiE9Frcs+BAybdkQGZbpUmQ8dCmCEhYRK4Vb5DlzX
	vtYX2w72OvaMK6uz2d08OMRiwUVHY8g60Z8f6dUf2g+L+nCEq/M9D/aH/VFMvm9I/i2PLU
	xqd3cet1FdNrP40/M/vY9Ppmg8XiZ901gOttjeT9vEqQflyYTKcXg9hPOXeXInscRf7a50
	9yvAsVs4xcXJue8iAQlLeleuYwUQ6ZiLKWVSIPaucoknVS9HnFBUOazGxN9yq/yf7Is9xa
	gdjvJ+VmQeIUBpoQUpZK1zuvvAT4HZwKTR9MGH3MDyug+zpE+9aIhRM3QcbNUA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYNqZ57cvzDx4
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 00:24:58 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id ca77
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 00:24:58 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Jose Luis Duran <jlduran@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: b596b02a98d7 - stable/14 - tests: Increase timeout
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: b596b02a98d701b5a5586765d201cb37fc815d19
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 00:24:58 +0000
Message-Id: <6b04d95a.ca77.2db37d04@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=b596b02a98d701b5a5586765d201cb37fc815d19

commit b596b02a98d701b5a5586765d201cb37fc815d19
Author:     Jose Luis Duran <jlduran@FreeBSD.org>
AuthorDate: 2026-01-07 17:52:26 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-24 00:24:15 +0000

    tests: Increase timeout
    
    Bump the timeout value, to avoid cutoff on emulated architectures on
    ci.freebsd.org.
    
    Reported by:    Jenkins
    Reviewed by:    ngie
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D54550
    
    (cherry picked from commit 47015e4546619151f9bff548a3758b72286d04ed)
---
 tests/sys/fs/fusefs/Makefile                   | 2 +-
 tests/sys/fs/tarfs/tarfs_test.sh               | 2 +-
 tests/sys/geom/class/eli/online_resize_test.sh | 1 +
 tests/sys/geom/class/eli/reentrancy_test.sh    | 2 +-
 tests/sys/kern/jailmeta.sh                     | 2 +-
 tests/sys/mac/portacl/Makefile                 | 2 +-
 tests/sys/netpfil/pf/rules_counter.sh          | 2 +-
 7 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/tests/sys/fs/fusefs/Makefile b/tests/sys/fs/fusefs/Makefile
index a8035a3bd7a4..2b73df8bd30a 100644
--- a/tests/sys/fs/fusefs/Makefile
+++ b/tests/sys/fs/fusefs/Makefile
@@ -76,7 +76,7 @@ TEST_METADATA.ctl+=	required_kmods="ctl fusefs"
 TEST_METADATA.ctl+=	is_exclusive="true"
 TEST_METADATA.ctl+=	required_user="root"
 
-TEST_METADATA+=	timeout=10
+TEST_METADATA+=	timeout=20
 TEST_METADATA+=	required_kmods="fusefs"
 
 FUSEFS=		${SRCTOP}/sys/fs/fuse
diff --git a/tests/sys/fs/tarfs/tarfs_test.sh b/tests/sys/fs/tarfs/tarfs_test.sh
index 505bfc5325f0..3a95263aeda9 100644
--- a/tests/sys/fs/tarfs/tarfs_test.sh
+++ b/tests/sys/fs/tarfs/tarfs_test.sh
@@ -401,7 +401,7 @@ tarfs_large_head() {
 	atf_set "descr" "Test support for large files"
 	atf_set "require.user" "root"
 	atf_set "require.kmods" "tarfs"
-	atf_set "timeout" "600"
+	atf_set "timeout" "900"
 }
 tarfs_large_body() {
 	tarfs_setup
diff --git a/tests/sys/geom/class/eli/online_resize_test.sh b/tests/sys/geom/class/eli/online_resize_test.sh
index e137a7305122..ae73848f7fde 100755
--- a/tests/sys/geom/class/eli/online_resize_test.sh
+++ b/tests/sys/geom/class/eli/online_resize_test.sh
@@ -7,6 +7,7 @@ online_resize_head()
 {
 	atf_set "descr" "online resize of geli providers"
 	atf_set "require.user" "root"
+	atf_set "timeout" 600
 }
 online_resize_body()
 {
diff --git a/tests/sys/geom/class/eli/reentrancy_test.sh b/tests/sys/geom/class/eli/reentrancy_test.sh
index 92a85d4df10a..f70c574d5965 100755
--- a/tests/sys/geom/class/eli/reentrancy_test.sh
+++ b/tests/sys/geom/class/eli/reentrancy_test.sh
@@ -42,7 +42,7 @@ init_head()
 {
 	atf_set "descr" "Initialize a geli provider on top of another"
 	atf_set "require.user" "root"
-	atf_set "timeout" 600
+	atf_set "timeout" 900
 }
 init_body()
 {
diff --git a/tests/sys/kern/jailmeta.sh b/tests/sys/kern/jailmeta.sh
index 2d46abe0d07e..236690ffddcb 100644
--- a/tests/sys/kern/jailmeta.sh
+++ b/tests/sys/kern/jailmeta.sh
@@ -543,7 +543,7 @@ keyvalue_contention_head()
 	atf_set descr 'Try to stress metadata read/write mechanism with some contention'
 	atf_set require.user root
 	atf_set execenv jail
-	atf_set timeout 30
+	atf_set timeout 60
 }
 keyvalue_stresser()
 {
diff --git a/tests/sys/mac/portacl/Makefile b/tests/sys/mac/portacl/Makefile
index 8e23775c62c8..b0c1aa803940 100644
--- a/tests/sys/mac/portacl/Makefile
+++ b/tests/sys/mac/portacl/Makefile
@@ -11,7 +11,7 @@ TAP_TESTS_SH+=	root_test
 .for t in ${TAP_TESTS_SH}
 TEST_METADATA.$t+=	required_kmods="mac_portacl"
 TEST_METADATA.$t+=	required_user="root"
-TEST_METADATA.$t+=	timeout="450"
+TEST_METADATA.$t+=	timeout="600"
 TEST_METADATA.$t+=	is_exclusive="true"
 .endfor
 
diff --git a/tests/sys/netpfil/pf/rules_counter.sh b/tests/sys/netpfil/pf/rules_counter.sh
index 43bff3706f15..11afcde9dcc8 100644
--- a/tests/sys/netpfil/pf/rules_counter.sh
+++ b/tests/sys/netpfil/pf/rules_counter.sh
@@ -153,7 +153,7 @@ keepcounters_pool_head()
 {
 	atf_set descr 'Test keepcounters for a rule with an interface pool'
 	atf_set require.user root
-	atf_set timeout 900
+	atf_set timeout 1200
 }
 
 keepcounters_pool_body()

From nobody Tue Nov 24 00:24:59 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYNqc2VDqz71wcG
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 00: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYNqb609Dz4TyD
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 00:24:59 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795479899;
	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=RvcND/bojwhcmLKgioYFvVn708g1pyJkTYmnC+/lfIs=;
	b=yoRWvNBn2sPUYpT0l/tlvGXiZi1VJcyL+BFSqFkko0JEI1nZs57RXDyy18C1Y2atCBkqd7
	eqvr2mSSqpw1D7bBVX8mpKFmRgp9kdUZpYt5wPYg3CQRYB2aN1YDlBHITsDW5s2BgjPh4g
	/uUJpG+zpX/QxwiEsdf/U3clo2NOaCsy3HjVZf6ARNRDw3WvHo5F8pEaDrhxM+9/Qp6V8f
	xDMcQH+DTUNy4vN0CPP6eXq8c2vzO5ypxdeKWJyIVrqrb8PkKhRf7XmV3SnBSvLAZgrWEq
	M9JmGSYrSk8W/QGllqSFqHyuPvW0R6Zid6/UpYFua8e3j39IcUsYNiD3lmeBig==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795479899;
	b=K+hnwI++R+VNOLvFG10L/TU7OYbv1DKwQbHxnl10dfRFa2b1r97bYoxwX8C/hQ1Fm2lt2y
	FWeZ3Tm7CzF0TLD9XydKkFH7j/oNpUu0N8LbTbBGZygIvkJyW84Q4ORALBafHE7ZtcWI6e
	3bjKqT4IMyHs1+uwHdnKTyntLuTkiHYG875X2fJWFnMnCytJ+QmCwGXp7NQ0rbqr+WcANY
	0KkBTeZKhPGWOdmCaCuna009745dhlQAZABnShSHzrpOxUeHfKDpjTWf4Lqf3J2dyahNf3
	+2OsPmh/rC9Qlo3eNqIaFAawl/5A97nOT1UnCAW8KrG1+BFEarBZ5Npn7U4ZOg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795479899;
	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=RvcND/bojwhcmLKgioYFvVn708g1pyJkTYmnC+/lfIs=;
	b=LrPTHHHBzgcInKFEVUh6dnpA0TPNqpBA402waVNab/tV+DI/MNppm9A/kjCH81o90VVd2s
	hmGvZLdcYf1fwK9k1uSpQNrYEOVbcVQeufE+hM28jktU0kVqk8q/O/QMTOM52blUdSuEYu
	40HfYf/yg+1n49ZkFvsprwKiDS8u2YC+pR3Tf3gRnh56uHbZJdX3LIDrZ4nyB99fZgfbf9
	4BtU11/6XG98SQRfFdXfUC6oVcbQ1GelRXn3hvzlFCiNpJ5SFj/yLpk7OVovxCqxLXRkCb
	ikyTxAHVIEZLYg5PmCR2vmW2Cb/QINQ6MXtSl5lrn1O4HUFEUTlzfPQ5bRa/+Q==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYNqb5R6PzF9R
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 00:24:59 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id cb95
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 00:24:59 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Jose Luis Duran <jlduran@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: f3d13e071740 - stable/14 - tarfs: tests: Increase timeout (again)
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: f3d13e071740defdb24a630e0d4dd6a1fb435882
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 00:24:59 +0000
Message-Id: <6b04d95b.cb95.7c16c8df@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=f3d13e071740defdb24a630e0d4dd6a1fb435882

commit f3d13e071740defdb24a630e0d4dd6a1fb435882
Author:     Jose Luis Duran <jlduran@FreeBSD.org>
AuthorDate: 2026-01-12 18:15:10 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-24 00:24:16 +0000

    tarfs: tests: Increase timeout (again)
    
    Bump the timeout value (a little more), to avoid cutoff on emulated
    architectures on ci.freebsd.org.
    
    Reported by:    Jenkins
    Fixes:          47015e454661 ("tests: Increase timeout")
    MFC after:      3 days
    
    (cherry picked from commit a551b0524953cbfa4f1035c6d968623e64f4436a)
---
 tests/sys/fs/tarfs/tarfs_test.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/sys/fs/tarfs/tarfs_test.sh b/tests/sys/fs/tarfs/tarfs_test.sh
index 3a95263aeda9..9405697ab21f 100644
--- a/tests/sys/fs/tarfs/tarfs_test.sh
+++ b/tests/sys/fs/tarfs/tarfs_test.sh
@@ -401,7 +401,7 @@ tarfs_large_head() {
 	atf_set "descr" "Test support for large files"
 	atf_set "require.user" "root"
 	atf_set "require.kmods" "tarfs"
-	atf_set "timeout" "900"
+	atf_set "timeout" "1200"
 }
 tarfs_large_body() {
 	tarfs_setup

From nobody Tue Nov 24 00:25:00 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYNqd3d58z71wr6
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 00:25:01 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYNqc67Clz4Tr2
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 00: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=1795479900;
	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=DjOzLuyYCcnO+l4Ni1PWQDzS4wFhQd0VuD4Hv/2dFxM=;
	b=qDD3vwubLdp7r7p3134R4JJn4eIFf4P6B0O+rZsk/gTbURpkFGdRUiZgdxefziJtAuMqPE
	ybo2x8UIIprqT3gLDCU1di16avmjM/oYCjE+iLss0hvjzB4dEMl29U9f8IgL5ZrVbQKAqP
	dTmzAePwOazEaaoxf0VJ64Qj8uyfjv39LxafKNRr+5KWDQ07CUnI5dU+5g5cw4wAu3MCv0
	rmtwSEQR0Qoy3oY/yM2X6j5zlUxQpZ4bPRiqe5VHhUbkqnauBPhV38FdPBWYN5zrgkfTLj
	VHGbIymYjfHayaKtJHmM136d4mOMyqLUvaxCAY9VR0KGh4G5oRrdyS7OTtSdrg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795479900;
	b=up5hL4mWEG7Cqywdb1ThzEK4pQkcfrgDybLRanYIHCWOph44cc712UVsxxaxp6jvLCYGEU
	lzMV/Wrh3MM7DrYCAvM3akjMmAxTGqFXXAslpvaVIZE224BlepVgpE/vxLEYMvoBkmSa98
	wIz8vum+p2s9s+u1pBMJFne2gF9/knJSfH6Ci3uXuY2mST/dUftYIuuWywY/01q0n4lWRx
	LzGrOh6fjkEVnR1SH8hMU8mvi2rkeyXIN5+98P6sjLoFk4YU8v+77+Fy0qupkd9EcQyfEq
	/a6ZrQGt6O1iso6rxYF4XOT9LfEw8KojoLsKJh50qST1EGKMJHuwwJ9u5+s1PA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795479900;
	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=DjOzLuyYCcnO+l4Ni1PWQDzS4wFhQd0VuD4Hv/2dFxM=;
	b=k6IcBQl6s7vFp2I5SyAtNpAy11XUINYIdq9Kba7CQZ7x+HuPDxskqCQEauO9LQ46czTKJA
	fNBhFk+YTBrZz+aaEwImcXRxq0jN9jh2lbsmabtdxjyox1OrLrvucpqx6GEru0Vk1hYFeK
	QRelBCMvIITE3x5XlUkcliPTgDuqxk3yMZDwzC+XdBTwfBE2IokUKk90paFlDY+P/x/dmU
	q+bD/Yhe2A2SnSEnrMr6fjXHZhxVVZ1hftPmHOsORS2DsztRJh4xK9Xje9cYhrLv+D8Yk2
	xZRHTJiTMA1GbYtRu33TOfuhguttp1qhJqQOv2cQ3CySp1RamxU4u34+omPKAA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYNqc5nXKzF9T
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 00:25:00 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id da07
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 00:25:00 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: Jose Luis Duran <jlduran@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 8976206bfb10 - stable/14 - tarfs: tests: Increase timeout (again 2)
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 8976206bfb1052b8d4fc67bbfa37e7ee7967dfab
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 00:25:00 +0000
Message-Id: <6b04d95c.da07.399315dd@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=8976206bfb1052b8d4fc67bbfa37e7ee7967dfab

commit 8976206bfb1052b8d4fc67bbfa37e7ee7967dfab
Author:     Jose Luis Duran <jlduran@FreeBSD.org>
AuthorDate: 2026-01-14 17:48:43 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-24 00:24:16 +0000

    tarfs: tests: Increase timeout (again 2)
    
    Bump the timeout value (for the third time), to avoid cutoff on emulated
    architectures on ci.freebsd.org.  One of the runners will take
    considerably more time to complete this test.
    
    Reported by:    Jenkins
    Fixes:          a551b0524953 ("tarfs: tests: Increase timeout (again)")
    MFC after:      3 days
    
    (cherry picked from commit a4f0a60e05293f3f517324f3ebc41046a79a9feb)
---
 tests/sys/fs/tarfs/tarfs_test.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/sys/fs/tarfs/tarfs_test.sh b/tests/sys/fs/tarfs/tarfs_test.sh
index 9405697ab21f..c8579781b51c 100644
--- a/tests/sys/fs/tarfs/tarfs_test.sh
+++ b/tests/sys/fs/tarfs/tarfs_test.sh
@@ -401,7 +401,7 @@ tarfs_large_head() {
 	atf_set "descr" "Test support for large files"
 	atf_set "require.user" "root"
 	atf_set "require.kmods" "tarfs"
-	atf_set "timeout" "1200"
+	atf_set "timeout" "2400"
 }
 tarfs_large_body() {
 	tarfs_setup

From nobody Tue Nov 24 00:34:11 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYP2C26Xzz71wwV
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 00:34: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYP2C0TPJz4WfW
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 00:34:11 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795480451;
	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=RYhlWjccAR2ES0jy5MW9Pmv6xKURRSfw0jFwKTKf4dE=;
	b=hRm5hBtklWisNy5SN6ZEURiDMY92sVYZvJ+WKbmwkbmpBoPuAfU0SAztAX1GWVPiiUg5yq
	70Jwxb9duWpX2m6bYoDjH/f8ds/Esv8bpWGNRxrZSNDYo1vTDGs/2AXJil8XkTDWhKNtQF
	AT7lUmPgVj57SUmajJd+A4PQiLjGVy50P4/7NOcmZXORG9Uei8BFBwnHDQjuWGnPC2j8ry
	05EfqCvMl5JUSFYBKwU8bF4xBLFBOd35VIoYbjJMFdIi+2PMZ7VNxPaG8gQSAZ2EaFLD3E
	zEGqlpJ4uzCPjLCcQPmEDUA29f3es6ANbbegegogH8ZJ2rLeFQ+sFWk9xX+P1w==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795480451;
	b=D4O09JXYsnhAGngJrcNCIpfw6txVKbFD4W1FXQmorHOrsy1cjXgjxMjpBO8jenajESays6
	L+oXEfU5FgFs2V6nVV3uxloWv8gPxE8kl2p9gblpyJjkiyOLngp4LASJaRbxOP6pWRaqaY
	lAen6HXWQHhj+g2P+NwSB+x+SJJk/9b9QqYGPvAm7sQoKy2XsXsGYzEzPwekO7+gT3o7+p
	UIeMIk5Vqd9RAjffUxFkH5U1LNYwwe+Fpwt8PBIImfMCE7RW704kCDmruD0Pvgh9CEjDCr
	1M4VHBbYDT5AKrtjxteWQI0daa1/8l6JsgiKDt0qAgbObj3Jexv4pXku/uhjZg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795480451;
	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=RYhlWjccAR2ES0jy5MW9Pmv6xKURRSfw0jFwKTKf4dE=;
	b=VLokeogiQRfA0GjiNZH/PX5MSPN41TgW8MOG8cOOgO2JotXOtNLZVzWOjkZlHfyZV10SNm
	Q/RqIxcU9CNrr9OzFCtsgSPfK0hkGiJFARYDjxjUzIhNksvO4s0FxO1QjlNU+P6GMzoWYU
	XPrUuG0IeUOq14XjGEmBs/7m14Wv30p3iiKZ48ia42buVkmU4F3F2HmlLdpiHaEVkCn/Qv
	HojEX/Jp2g5MJ2xCiKlB/CxMRcWac/fsgzbn/0B4QdXq+zlK+2+ZSk/GRlpaoYWaJvnnBL
	3ybT7oJiAcKEnvETdbQCIxmjKn/ZMQYpBVgzoQsGnrkY4BGjTS7hJo9HjF4ycQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYP2C07XnzFL3
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 00:34:11 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id cbc7
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 00:34:11 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc: John Baldwin <jhb@FreeBSD.org>
From: Enji Cooper <ngie@FreeBSD.org>
Subject: git: 49e8ec6ea7ca - stable/14 - secure: Add ssh-sk-client to all consumers of libssh
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ngie
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 49e8ec6ea7ca11cde5b8f4e31cfa31e702ac0f88
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 00:34:11 +0000
Message-Id: <6b04db83.cbc7.74069e0b@gitrepo.freebsd.org>

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=49e8ec6ea7ca11cde5b8f4e31cfa31e702ac0f88

commit 49e8ec6ea7ca11cde5b8f4e31cfa31e702ac0f88
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2025-04-22 02:05:28 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-24 00:33:42 +0000

    secure: Add ssh-sk-client to all consumers of libssh
    
    These all failed to link with ld.bfd used by GCC due to
    Fssh_sshsk_sign being an unresolved symbol.
    
    Fixes:          65d8491719bb ("secure: Adapt Makefile to ssh-sk-client everywhere")
    (cherry picked from commit a098111a28ed59e1ab1101ad09913f0235ebd28f)
---
 secure/libexec/sftp-server/Makefile | 2 +-
 secure/usr.bin/scp/Makefile         | 2 +-
 secure/usr.bin/sftp/Makefile        | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/secure/libexec/sftp-server/Makefile b/secure/libexec/sftp-server/Makefile
index 00570268ffe6..5d32c8ae9660 100644
--- a/secure/libexec/sftp-server/Makefile
+++ b/secure/libexec/sftp-server/Makefile
@@ -3,7 +3,7 @@
 .include "${SRCTOP}/secure/ssh.mk"
 
 PROG=	sftp-server
-SRCS=	sftp-common.c sftp-server.c sftp-server-main.c
+SRCS=	sftp-common.c sftp-server.c sftp-server-main.c $(SKSRCS)
 MAN=	sftp-server.8
 
 LIBADD=	ssh
diff --git a/secure/usr.bin/scp/Makefile b/secure/usr.bin/scp/Makefile
index 8d38d815d3fb..ba9c1472936f 100644
--- a/secure/usr.bin/scp/Makefile
+++ b/secure/usr.bin/scp/Makefile
@@ -2,7 +2,7 @@
 .include "${SRCTOP}/secure/ssh.mk"
 
 PROG=	scp
-SRCS=	scp.c progressmeter.c $(SFTP_CLIENT_SRCS)
+SRCS=	scp.c progressmeter.c $(SFTP_CLIENT_SRCS) $(SKSRCS)
 PACKAGE=	ssh
 
 LIBADD=	ssh
diff --git a/secure/usr.bin/sftp/Makefile b/secure/usr.bin/sftp/Makefile
index cc13a86794c5..3f6fbeef695c 100644
--- a/secure/usr.bin/sftp/Makefile
+++ b/secure/usr.bin/sftp/Makefile
@@ -2,7 +2,7 @@
 .include "${SRCTOP}/secure/ssh.mk"
 
 PROG=	sftp
-SRCS=	sftp.c sftp-usergroup.c progressmeter.c $(SFTP_CLIENT_SRCS)
+SRCS=	sftp.c sftp-usergroup.c progressmeter.c $(SFTP_CLIENT_SRCS) $(SKSRCS)
 PACKAGE=	ssh
 
 LIBADD=	ssh edit

From nobody Tue Nov 24 03:25:50 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYSrG2Cqjz72F8Z
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 03:25:50 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYSrG1Ywnz4pv8
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 03:25:50 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795490750;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=v+zslM78JD7iZVdDapjtjRgrmndFsiLsAcDxDy0hFQ4=;
	b=tUnwvwTQCqd1dhMReMV2mu9j7fDoCRpVnjpeqgYWBczvxiiWZte9u9Wygsum9jLxhteQc2
	Qg6LtYLXxbv5dhHH66ikZzs2glxK4KcldavUmTHqHkL4++1lJKJaAMYDy5vKFuZFes/w/t
	6AjuK8sEIw7fXYYMf1dyZqjDqwfOY8pYS89yeCBf3yfXNa2HISFhJ9pbUmAqRjGjvtUIv9
	SUXbaXJPcjXEodck/8IkabDnhe5Dw7+rH2LBoMrJc1A1Wir14k1dXVOFukHI/DzG9euhBT
	Bct464py3fW0EP9J7iQvDHT3WY0RSpK1LrB5H+NS17UbHXeei8t81RRCQlkUSg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795490750;
	b=MxFAFyRSTYUoFx57ehqzCxvfSdkghbvm/kJngAIM8WAQyVRCik3T90OjwmLbeI6Wi334Cv
	E1e/0htgLz8Ejvl/DR7IZGOwgj7rpIuAijpx+o4E4j5cFTuHgWRtpy3xS5q/tG8ifxd8BN
	5vl56qIeXgOjANfixEQomUqFx2Hz1KjtIljlDGxP3bdqXLlevPa1VtCmtspmgVkir8Q/pg
	5ZTAy+gyA/UPnSFPMDiTsOQ/yVlDRDTto9pZswAz0brIVYAew7T/p5k599qVGxYRvlPOzl
	MOTP6jNqLkb8z8ceJfNltR3xMiI8nBH/VDw0eQM29gui86bobj9d5/WP0dB32g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795490750;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=v+zslM78JD7iZVdDapjtjRgrmndFsiLsAcDxDy0hFQ4=;
	b=Y5BzmgRVWoj1m2VMc1+eRYCMng/P/bdKcuLeU2cLowA1hh4r6mEjuI0Ro6Uq0cBGyScIiT
	kRlR8fr6pJDjG6JcD+mp59+oxGIP8yMSc1vaJN9wNBf4wKOLZpxb+SuZbVNPVhD3hUYVaN
	LgoO/JXB0ZcnZ+K8nBiRswu+oool0RnQuOrtoMg5cPkbQe1nEIiMScX52B6IT55Uit+8cp
	KhHUA6gzm5cQpRlMZXY1B+7ZB0L0ygyWJ4EYvMSwUkRIXNFdQHpOumNe12StYnrdqANUeF
	x5HUYbrJG1s0Nwc2yilkc1dmCjsTva2w7C89iZ1b9tPYjA/i3HWDzlgkEmGWvg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYSrG1DLfzL5f
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 03:25:50 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1f11b
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 03:25:50 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Kirk McKusick <mckusick@FreeBSD.org>
Subject: git: 5c0715d55ed5 - main - ext2fs: fix post-commit review issues in multi-block allocator
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: mckusick
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 5c0715d55ed577eeb71078490d2c14df9fd98746
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 03:25:50 +0000
Message-Id: <6b0503be.1f11b.5cc93269@gitrepo.freebsd.org>

The branch main has been updated by mckusick:

URL: https://cgit.FreeBSD.org/src/commit/?id=5c0715d55ed577eeb71078490d2c14df9fd98746

commit 5c0715d55ed577eeb71078490d2c14df9fd98746
Author:     Kirk McKusick <mckusick@FreeBSD.org>
AuthorDate: 2026-11-24 03:23:35 +0000
Commit:     Kirk McKusick <mckusick@FreeBSD.org>
CommitDate: 2026-11-24 03:25:24 +0000

    ext2fs: fix post-commit review issues in multi-block allocator
    
    Fix 8 issues identified in post-commit review of e590490:
    
    POSTCR-1: ext2_clusteralloc() asserted MA_NOTOWNED while holding
    EXT2_LOCK, causing INVARIANTS panic on successful cluster lookup.
    Changed assertion to MA_OWNED.
    
    POSTCR-2: ext2_balloc() IO_SYNC and ext4_ext_split() error paths freed
    blocks after bwrite() failure, but brelse() had redirtied the buffer
    which still named the freed block. Added B_INVALONERR flag before
    bwrite() to invalidate buffers on error (4 locations in ext2_balloc.c,
    3 in ext2_extents.c).
    
    POSTCR-3: ext4_ext_get_blocks() freed new run when ext4_ext_dirty()
    failed, but extent remained in i_data or cached leaf buffer. Simplified
    ext4_ext_dirty() error handling to use B_INVALONERR instead of manual
    getblk/bundirty/brelse.
    
    POSTCR-4: ext2_run_desired_length() truncated 64-bit e2fs_fbcount to
    uint32_t, causing spurious ENOSPC on filesystems with >2^32 free blocks.
    Changed all comparisons to use uint64_t arithmetic.
    
    POSTCR-5: ext4_ext_grow_indepth() double brelse() on bp after failed
    bwrite() had already released it. Set bp = NULL before goto out.
    
    POSTCR-6: ext4_ext_split() and ext4_ext_grow_indepth() returned 0 when
    ext4_ext_alloc_meta() failed, leading to buffer overflow or endless loop.
    Both now explicitly return ENOSPC.
    
    POSTCR-7: ext2_balloc() freed new indirect block after bwrite() failure
    while redirtied buffer stayed on vnode. Added B_INVALONERR to child
    indirect block writes (2 locations).
    
    POSTCR-8: ext2_clusteralloc() modified block bitmap without updating
    metadata_csum checksum. Added ext2_gd_b_bitmap_csum_set() and
    ext2_b_bitmap_validate() before bdwrite().
    
    Submitted by: Pedro Giffuni <pfg@freebsd.org>
    Reviewed by:  Kirk McKusick
    Reported by:  llm-postcr
    Differential Revision: https://reviews.freebsd.org/D61937
    MFC-after:    2 weeks
---
 sys/fs/ext2fs/ext2_alloc.c   | 25 ++++++++++++++++----
 sys/fs/ext2fs/ext2_balloc.c  |  4 ++++
 sys/fs/ext2fs/ext2_extents.c | 54 ++++++++++++++++++++++++++------------------
 3 files changed, 56 insertions(+), 27 deletions(-)

diff --git a/sys/fs/ext2fs/ext2_alloc.c b/sys/fs/ext2fs/ext2_alloc.c
index f6cd624ac542..afdb068d8a7f 100644
--- a/sys/fs/ext2fs/ext2_alloc.c
+++ b/sys/fs/ext2fs/ext2_alloc.c
@@ -190,12 +190,12 @@ ext2_run_desired_length(struct inode *ip, uint32_t logical_length,
 	fs = ip->i_e2fs;
 
 	/* Hard caps: free blocks, cluster summaries, group size, sysctl. */
-	maxlen = (uint32_t)fs->e2fs_fbcount;
-	if (fs->e2fs_contigsumsize > 0 && (uint32_t)fs->e2fs_contigsumsize < maxlen)
+	maxlen = fs->e2fs_fbcount;
+	if (fs->e2fs_contigsumsize > 0 && (uint64_t)fs->e2fs_contigsumsize < maxlen)
 		maxlen = fs->e2fs_contigsumsize;
-	if ((uint32_t)fs->e2fs_bpg < maxlen)
+	if ((uint64_t)fs->e2fs_bpg < maxlen)
 		maxlen = fs->e2fs_bpg;
-	if ((uint32_t)ext2_alloc_max_run < maxlen)
+	if ((uint64_t)ext2_alloc_max_run < maxlen)
 		maxlen = ext2_alloc_max_run;
 	if (maxlen < logical_length)
 		return (0);
@@ -1617,7 +1617,7 @@ ext2_clusteralloc(struct inode *ip, int cg, daddr_t bpref, int len)
 		fs->e2fs_maxcluster[cg] = i;
 		goto fail;
 	}
-	mtx_assert(EXT2_MTX(ump), MA_NOTOWNED);
+	mtx_assert(EXT2_MTX(ump), MA_OWNED);
 	EXT2_UNLOCK(ump);
 
 	/* Search the bitmap to find a big enough cluster like in FFS. */
@@ -1656,6 +1656,19 @@ ext2_clusteralloc(struct inode *ip, int cg, daddr_t bpref, int len)
 		panic("ext2_clusteralloc: allocated out of group");
 
 	EXT2_LOCK(ump);
+	if (EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_GDT_CSUM) ||
+	    EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_METADATA_CKSUM)) {
+		error = ext2_gd_b_bitmap_csum_verify(fs, cg, bp);
+		if (error) {
+			EXT2_UNLOCK(ump);
+			goto fail_lock;
+		}
+	}
+	error = ext2_b_bitmap_validate(fs, bp, cg);
+	if (error) {
+		EXT2_UNLOCK(ump);
+		goto fail_lock;
+	}
 	for (i = 0; i < len; i += fs->e2fs_fpb) {
 		setbit(bbp, bno + i);
 		ext2_clusteracct(fs, bbp, cg, bno + i, -1);
@@ -1666,6 +1679,8 @@ ext2_clusteralloc(struct inode *ip, int cg, daddr_t bpref, int len)
 	fs->e2fs_fmod = 1;
 	EXT2_UNLOCK(ump);
 
+	ext2_gd_b_bitmap_csum_set(fs, cg, bp);
+	ext2_b_bitmap_validate(fs, bp, cg);
 	bdwrite(bp);
 	return (cg * fs->e2fs_bpg + le32toh(fs->e2fs->e2fs_first_dblock)
 	    + bno);
diff --git a/sys/fs/ext2fs/ext2_balloc.c b/sys/fs/ext2fs/ext2_balloc.c
index bfbd4a417f61..224b70173c1b 100644
--- a/sys/fs/ext2fs/ext2_balloc.c
+++ b/sys/fs/ext2fs/ext2_balloc.c
@@ -215,6 +215,7 @@ ext2_balloc(struct inode *ip, e2fs_lbn_t lbn, int size, struct ucred *cred,
 		 * Write synchronously so that indirect blocks
 		 * never point at garbage.
 		 */
+		bp->b_flags |= B_INVALONERR;
 		if ((error = bwrite(bp)) != 0) {
 			/* bwrite() released bp; pref is still unreferenced. */
 			ext2_rollback_unpublished(ip, pref, 1);
@@ -264,6 +265,7 @@ ext2_balloc(struct inode *ip, e2fs_lbn_t lbn, int size, struct ucred *cred,
 		 * Write synchronously so that indirect blocks
 		 * never point at garbage.
 		 */
+		nbp->b_flags |= B_INVALONERR;
 		if ((error = bwrite(nbp)) != 0) {
 			/* bwrite() released nbp; pref is still unreferenced. */
 			ext2_rollback_unpublished(ip, pref, 1);
@@ -278,6 +280,7 @@ ext2_balloc(struct inode *ip, e2fs_lbn_t lbn, int size, struct ucred *cred,
 		 * at the top of the next iteration.
 		 */
 		if (flags & IO_SYNC) {
+			bp->b_flags |= B_INVALONERR;
 			if ((error = bwrite(bp)) != 0) {
 				/*
 				 * The child indirect block is on disk but
@@ -340,6 +343,7 @@ ext2_balloc(struct inode *ip, e2fs_lbn_t lbn, int size, struct ucred *cred,
 		 * delayed write.
 		 */
 		if (flags & IO_SYNC) {
+			bp->b_flags |= B_INVALONERR;
 			if ((error = bwrite(bp)) != 0) {
 				/*
 				 * The parent indirect block did not reach
diff --git a/sys/fs/ext2fs/ext2_extents.c b/sys/fs/ext2fs/ext2_extents.c
index b7c203f4ed50..3d02fe06bd52 100644
--- a/sys/fs/ext2fs/ext2_extents.c
+++ b/sys/fs/ext2fs/ext2_extents.c
@@ -830,20 +830,9 @@ ext4_ext_dirty(struct inode *ip, struct ext4_extent_path *path)
 			return (EIO);
 		ext4_ext_fill_path_buf(path, bp);
 		ext2_extent_blk_csum_set(ip, bp->b_data);
+		bp->b_flags |= B_INVALONERR;
 		error = bwrite(bp);
 		if (error) {
-			/*
-			 * bwrite() left the modified extent tree dirty in
-			 * the cache.  Discard it, so a later read sees the
-			 * on-disk tree instead of one naming blocks the
-			 * caller's rollback is about to free.
-			 */
-			bp = getblk(ip->i_devvp, fsbtodb(fs, blk),
-			    fs->e2fs_bsize, 0, 0, 0);
-			if (bp) {
-				bundirty(bp);
-				brelse(bp);
-			}
 			return (error);
 		}
 	} else {
@@ -972,8 +961,10 @@ ext4_ext_split(struct inode *ip, struct ext4_extent_path *path,
 	    M_EXT2EXTENTS, M_WAITOK | M_ZERO);
 	for (a = 0; a < depth - at; a++) {
 		newblk = ext4_ext_alloc_meta(ip);
-		if (newblk == 0)
+		if (newblk == 0) {
+			error = ENOSPC;
 			goto cleanup;
+		}
 		ablks[a] = newblk;
 	}
 
@@ -1013,6 +1004,7 @@ ext4_ext_split(struct inode *ip, struct ext4_extent_path *path,
 	}
 
 	ext2_extent_blk_csum_set(ip, bp->b_data);
+	bp->b_flags |= B_INVALONERR;
 	error = bwrite(bp);
 	bp = NULL;
 	if (error)
@@ -1063,14 +1055,16 @@ ext4_ext_split(struct inode *ip, struct ext4_extent_path *path,
 			neh->eh_ecount = htole16(le16toh(neh->eh_ecount) + m);
 		}
 
-		ext2_extent_blk_csum_set(ip, bp->b_data);
-		error = bwrite(bp);
-		bp = NULL;
-		if (error)
-			goto cleanup;
+ext2_extent_blk_csum_set(ip, bp->b_data);
+	bp->b_flags |= B_INVALONERR;
+	error = bwrite(bp);
+	bp = NULL;
+	if (error) {
+		goto cleanup;
+	}
 
-		/* Fix old index. */
-		if (m) {
+	/* Fix old index. */
+	if (m) {
 			path[i].ep_header->eh_ecount =
 			    htole16(le16toh(path[i].ep_header->eh_ecount) - m);
 			error = ext4_ext_dirty(ip, path + i);
@@ -1117,7 +1111,7 @@ ext4_ext_grow_indepth(struct inode *ip, struct ext4_extent_path *path,
 
 	newblk = ext4_ext_alloc_meta(ip);
 	if (newblk == 0)
-		return (error);
+		return (ENOSPC);
 
 	bp = getblk(ip->i_devvp, fsbtodb(fs, newblk), fs->e2fs_bsize, 0, 0, 0);
 	if (!bp) {
@@ -1138,9 +1132,11 @@ ext4_ext_grow_indepth(struct inode *ip, struct ext4_extent_path *path,
 		neh->eh_max = htole16(ext4_ext_space_block(ip));
 
 	ext2_extent_blk_csum_set(ip, bp->b_data);
+	bp->b_flags |= B_INVALONERR;
 	error = bwrite(bp);
 	if (error) {
 		ext2_rollback_unpublished(ip, newblk, 1);
+		bp = NULL;
 		goto out;
 	}
 
@@ -1274,6 +1270,8 @@ ext4_ext_insert_extent(struct inode *ip, struct ext4_extent_path *path,
 	struct ext4_extent *ex, *nex, *nearex;
 	struct ext4_extent_path *npath;
 	int depth, len, error, next;
+	char saved_i_data[sizeof(ip->i_data)];
+	bool saved_i_data_valid = false;
 
 	depth = ext4_ext_inode_depth(ip);
 	ex = path[depth].ep_ext;
@@ -1284,6 +1282,10 @@ ext4_ext_insert_extent(struct inode *ip, struct ext4_extent_path *path,
 
 	/* Insert block into found extent. */
 	if (ex && ext4_can_extents_be_merged(ex, newext)) {
+		if (depth == 0) {
+			memcpy(saved_i_data, ip->i_data, sizeof(ip->i_data));
+			saved_i_data_valid = true;
+		}
 		ex->e_len = htole16(le16toh(ex->e_len) + le16toh(newext->e_len));
 		eh = path[depth].ep_header;
 		nearex = ex;
@@ -1332,6 +1334,10 @@ repeat:
 	eh = path[depth].ep_header;
 
 has_space:
+	if (depth == 0 && !saved_i_data_valid) {
+		memcpy(saved_i_data, ip->i_data, sizeof(ip->i_data));
+		saved_i_data_valid = true;
+	}
 	nearex = path[depth].ep_ext;
 	if (!nearex) {
 		/* Create new extent in the leaf. */
@@ -1387,8 +1393,12 @@ merge:
 		goto cleanup;
 
 	error = ext4_ext_dirty(ip, path + depth);
-	if (error)
+	if (error) {
+		if (depth == 0 && saved_i_data_valid) {
+			memcpy(ip->i_data, saved_i_data, sizeof(ip->i_data));
+		}
 		goto cleanup;
+	}
 
 	/*
 	 * ext4_ext_dirty() wrote the tree out, so the extent now names

From nobody Tue Nov 24 03:52:35 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYTR75DwSz72H88
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 03: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYTR74dZQz4sNG
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 03:52:35 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795492355;
	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=JlBLzcUfpV/N4QQi89Goj1uzkWekmOgxK9FEWWzfBng=;
	b=g4Urv4A69TRtDDHOAfmy5FnpxjaeepZbmVnylve81bgO4HwFm1qvGE4wXEN9pkUreseNHl
	/Kjm0eACYzxhEaV+ZMZF5/Q6iSmo+wMxlfnMk7UaNTBdt9Hrx970MPpiF0ovNh8BVcfgc1
	0JsRzgJXjcIeT7sVInnHQItME94ZCtsUbH0s9xgiAH3fTQUiFQrfSqR4A5F7xCLtUj4NmD
	DKkoHMmgwf8q9la7OSx0OwgKVhaRJDwIak1H1ZUO6TXUd86q1rKNFejK6y3l0Ye+uB8TtR
	WXb/b/eJQof3iAUBIgfeveB78SZ/ucPzqbes/IptOzgjoRxiG0iLq21cuXWITg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795492355;
	b=sOWyVHzZRJgBjT4b43OJ3IarekbqNrR3lhbAnPQqRvlxySeQk1Pp71dQpmPIztHoJ//DzJ
	fbZyiFuboPh0eg/11bZu8mXZzOruE/x1GrIpgGft8bDyF01+fS6XBWCCMcT+S2D2xw7zOc
	7t4f65yt+PGBrQGEiBLKUt0/uaX0npUImrAEZQpXt8OXCWj2mP0RlLOuyMZV37WGzv7z0u
	+DQG976xNcVd2I/y7Ir8YbaB0Hosvkj2sNPu3TQBBR0tU7atk0oWZiM1+NMMYFautT8S1u
	ZIUBfl08kPkSjxbYtCjqIsOzrOIyOuRIZunAfjqj27zCQLu9QmWraR6psX77Dw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795492355;
	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=JlBLzcUfpV/N4QQi89Goj1uzkWekmOgxK9FEWWzfBng=;
	b=gPgOAZ4LQaQ2mBSt+WBa4yUy3d/9Vqlfaka1+9oRZk+z4lNxzTbe1f1jPJtotKtjkUHs1m
	R+FqPAlSv6eiuPX9h4mnwKKNDTqKdCZ73Pn4d1um6xfqmXdINJ+VDRjayv7xvplQwL/VPJ
	qZkp5HM14yS1gdk7t1XCHgcVfb/rWjuX8q9LBOYnUwesa2R5wEXxCw2ApblUIP7fKx1aWU
	n3oy1WAc8s6tVmGpPfLKCxZ8p8kXtud9qMyBE92VTXTzdE4WeSa56nZSfN5W7gJS4O382T
	cs66nJIwlrXgA7vDo+UNxXMp/xGxmYRU6m0orxwOMJgzLKSjc28VW3rHIDP0PA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYTR7428pzLb5
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 03:52:35 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 22831
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 03:52:35 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Cc: Laam Alif <laamalif@proton.me>
From: Konstantin Belousov <kib@FreeBSD.org>
Subject: git: f6bd65e922f6 - main - snp(4): drain snp_outpoll before destroying the open data
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: f6bd65e922f6acb0756f9e7d0610a23ec7f69318
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 03:52:35 +0000
Message-Id: <6b050a03.22831.47611849@gitrepo.freebsd.org>

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=f6bd65e922f6acb0756f9e7d0610a23ec7f69318

commit f6bd65e922f6acb0756f9e7d0610a23ec7f69318
Author:     Laam Alif <laamalif@proton.me>
AuthorDate: 2026-11-24 03:23:21 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-24 03:52:08 +0000

    snp(4): drain snp_outpoll before destroying the open data
    
    kib' note: comparing to the original submission, seldrain() is called
    before cv_destroy().
    
    PR:     301062
    MFC after:      1 week
---
 sys/dev/snp/snp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c
index 82b2f44e068b..0a9b7d378c76 100644
--- a/sys/dev/snp/snp.c
+++ b/sys/dev/snp/snp.c
@@ -125,6 +125,7 @@ snp_dtor(void *data)
 		ss->snp_tty = NULL;
 	}
 
+	seldrain(&ss->snp_outpoll);
 	cv_destroy(&ss->snp_outwait);
 	free(ss, M_SNP);
 }

From nobody Tue Nov 24 03:52:36 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYTR914VHz72HGw
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 03:52: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYTR865ZPz4sSn
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 03:52:36 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795492356;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=qh6g1UprzCLh/FwWzYM26YpPsCAx1BjSlZotj7CuHrE=;
	b=rIi6pVaZshcCq6Jk1Gup8Xkf5YXUJRwpeNfRijUKrnKkLZsQYK0LRpLLBqsTwZf54wBdgq
	bP6fu30+15PNeR8NFb/dO+i6lYL97HZcSuH2Zc1lG0bQy3NCgmFp7glCoQd9fc/A00CuJj
	q43kGB8CSZdKd70nDEtYJuQNSivKa8GTg0C9BJ8bbwH0OMDmOyBDgVEWbWMuEP8ZGkqBts
	wxMdDKYDcSVOrcYcaEObtdX6GnGtWKbagJiBGEEaF4tuGo6FRByufd7U9r9tj7FHezmtd2
	BdO9Ejb55MpO7aeGOkigimONmsYrPYL3x0nR8XXu5rWgi1fEJj8rbd9/ihksdg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795492356;
	b=OMVKC9vM4aWDXgKccw+hg/SMOw8avxXtAdATaCbnMBj1sw+sg/EX9tC/JPGPa0mR0QHSOd
	irDZO+gd9AP9u5C9gkFyR6GnhEcBtXt3S3KRTnlBZQMzmOM3W2ZVAta9JjfaLfWWsE4Mg0
	/fY8LggQ0gvCwaCpYsRQA/brdpyCdHXyt04oAOo6ZoOrX7cpy2e89kUMvLiK9gF0ZAsrNf
	ZNRnNwthQMzF1C+8g+B02scXKkhx8iQ2+9ctvJNwZHloFYm6etdEMUPaHWz0PrF+9+rr3a
	5eTro34UUH7oZg21loAXOyxn7WWjo+FwwWPYc2VrzJDL377APUe/0TNL+D4law==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795492356;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=qh6g1UprzCLh/FwWzYM26YpPsCAx1BjSlZotj7CuHrE=;
	b=OF5MUG4v2/eI+3wowoDC4RXr65xtlV1olSQZ9ejdavx2SAV8jPpi5hch3z8/cVbmwdUxER
	CGB0eF2bCmikyZ6avUK9pVQP+x/X/UPWrKwkHMaTVUGG5mIfACxQaebdbJ5chl9iNbm0GK
	0AWNZQ+d2qZMYCREoRqmCQTLeh3Wx64kkf/D6nf/wnrsQSR7hEJxklkSMFKOTdBJuBSWJs
	RTTJbzCzlH3omSmKvqGZRwDLn+WPD5MyoOJ1VHEdpEHe32X7V+XpQ1YoQtIsuhqW3WZsLv
	tAWSTd25oPRRl2x5Kms1BwFDHsEO43+9yE+iqgib+USuAhDGFGdWGpuYhasu7w==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYTR84LKrzLM2
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 03:52:36 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1ffe4
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 03:52:36 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Konstantin Belousov <kib@FreeBSD.org>
Subject: git: e035f2783661 - main - snp(4): do not ignore errors from devfs_set_cdevpriv()
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: e035f2783661085545d2d0ea8b9cf58f7fb3de7e
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 03:52:36 +0000
Message-Id: <6b050a04.1ffe4.16ff1a88@gitrepo.freebsd.org>

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=e035f2783661085545d2d0ea8b9cf58f7fb3de7e

commit e035f2783661085545d2d0ea8b9cf58f7fb3de7e
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-11-24 03:26:21 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-24 03:52:08 +0000

    snp(4): do not ignore errors from devfs_set_cdevpriv()
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
---
 sys/dev/snp/snp.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c
index 0a9b7d378c76..a2ef93173dcd 100644
--- a/sys/dev/snp/snp.c
+++ b/sys/dev/snp/snp.c
@@ -138,14 +138,16 @@ static int
 snp_open(struct cdev *dev, int flag, int mode, struct thread *td)
 {
 	struct snp_softc *ss;
+	int error;
 
 	/* Allocate per-snoop data. */
 	ss = malloc(sizeof(struct snp_softc), M_SNP, M_WAITOK|M_ZERO);
 	cv_init(&ss->snp_outwait, "snp out");
 
-	devfs_set_cdevpriv(ss, snp_dtor);
-
-	return (0);
+	error = devfs_set_cdevpriv(ss, snp_dtor);
+	if (error != 0)
+		snp_dtor(ss);
+	return (error);
 }
 
 static int

From nobody Tue Nov 24 05:46:51 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYWyz4FHhz72VL5
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 05:46: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYWyz2GJWz3KlQ
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 05:46:51 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795499211;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=yq0eKuiuKLtBoeqRg/D4JCRZpHLwhBhZHDQIvhcGFGM=;
	b=smboQbDnqW30Q4CLK9DCDeQbDeFWjXrRN6LaIYW/mKrhR/Zekl7QMnOc0TVUI9x/C07f+V
	KU+egrSRer3MfBn95ypRbIrZpehYd0SUvJXce/Rr30DXg5RghIwdbcR7RGVypoVSER3x9S
	RhTdun3cPuf9+aqaoaK2dzLKDe0YDtnYTzNo2+/VsKia2BK57g27wvUMVUX65h+fJerGq5
	4xXmGqhLw7ZQJ8ZbYIlR3xRPUotH0JRetjm7KWFrLFYdS0vYnvEouhJQXfZgfyRZvH2DW1
	5+56H7mfLokhxxHECLtveZz97iwED2O1KfnMC/Fq1r2DhPUO+wu0NZyj0uhVxg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795499211;
	b=vZrfrdCOWjCn64HrN/sEIsW7hqvCgnJLw80U29RCXQKH75TZzcX7GTiUTQ6hCL9hXjXKl5
	72YxkkQrW11VRJV9kUOODuuu9UYoYxoY0yhnBE36KkRDvJ4SZPnw+g1krCaWYfyb5F+hbB
	qzdwcyulferzVGKgY/Wm/4E7P7typ59rWtS/P9kMoHk/AYdpKnWj6bszokVtvOgCCrCqze
	RpJx0qIQUAy41sL+Ypdr4VnQ96hkQ+Fs2hR09hG/anu+SQOlxYin1U1nZ5xn8ldIBGG1wv
	xdbKixH2csnnFINJFoUwdvNz9SEZR84TB2KWnM2A3MJZNB4Qjvk5hmrlFHE+4A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795499211;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=yq0eKuiuKLtBoeqRg/D4JCRZpHLwhBhZHDQIvhcGFGM=;
	b=OM4YevSe4+SW1AqFZDLwyXsRjcWgJu+cotiF5Ch0m3DMObEew9a5cuOf6tg0H6D8f3tHjt
	KI0jm33Sj8gqxdhaxx6QqHM1cJo9FFqADK3dnfMsQcfWvktQKpO6pGJ64SWJT/+/wuxTgP
	PY7rzDzO0phtRBKfP/VPBmo7tEjIR4j5iTbAqtnaRgJmJJwMMOlwmL37xsEz3594D1V3TI
	YtqGXPXZuMU67BK72YMsrzp0fp6IwyKKgfGSrOhj3SOt3mlDTgIMsWaMNSM79KgZgs4IAN
	loTYeFn3DEghdndcY7ILDjrmgDfGK1PyR8WcLFpsOOuA1u1N+DnU44oQHIMIRQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYWyz1P1mzPXt
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 05:46:51 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 7598
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 05:46:51 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Nick Price <nprice@FreeBSD.org>
Subject: git: e58464800b48 - main - inpcb: treat the ephemeral port range as inclusive
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: nprice
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: e58464800b486e46615719d6e83ca61a0bc7dc97
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 05:46:51 +0000
Message-Id: <6b0524cb.7598.6c63c433@gitrepo.freebsd.org>

The branch main has been updated by nprice:

URL: https://cgit.FreeBSD.org/src/commit/?id=e58464800b486e46615719d6e83ca61a0bc7dc97

commit e58464800b486e46615719d6e83ca61a0bc7dc97
Author:     Nick Price <nprice@FreeBSD.org>
AuthorDate: 2026-11-24 05:41:45 +0000
Commit:     Nick Price <nprice@FreeBSD.org>
CommitDate: 2026-11-24 05:44:38 +0000

    inpcb: treat the ephemeral port range as inclusive
    
    in_pcb_lport_dest() sizes [first, last] as last - first, so the random
    start never picks last and the search tries one port too few.
    
    With first == last the random start divides by zero: once root sets the
    range, any user's connect() panics the host.
    
    Reviewed by:    glebius
    Differential Revision:  https://reviews.freebsd.org/D61010
    Signed-off-by:  Nick Price <nprice@FreeBSD.org>
---
 sys/netinet/in_pcb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index 5d2ea6ea3f4d..9a9ead358dcc 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -801,7 +801,7 @@ in_pcb_lport_dest(struct inpcbinfo_ctx *ipictx, struct inpcb *inp,
 #endif
 
 	if (V_ipport_randomized) {
-		port = first + (arc4random() % (last - first));
+		port = first + (arc4random() % (last - first + 1));
 	} else {
 		port = atomic_fetchadd_int(lastport, 1);
 		if (__predict_false(port < first || port > last)) {
@@ -810,7 +810,7 @@ in_pcb_lport_dest(struct inpcbinfo_ctx *ipictx, struct inpcb *inp,
 		}
 	}
 
-	for (count = last - first; count > 0; count--) {
+	for (count = last - first + 1; count > 0; count--) {
 		struct inpcbinfo_ctx tmpctx = {
 			.pcbinfo = ipictx->pcbinfo
 		};

From nobody Tue Nov 24 05:46:52 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYWz02ptLz72VQy
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 05:46: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYWz01vGfz3Kcp
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 05:46:52 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795499212;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=j2K3SlbhMWkgnnPkRq5yXc4HqLZ0G+omZ2vl8OFJcD0=;
	b=f2c15uk1F7IGrjqAkvxPGOOfy0/z3tuwCe9YmJySzwPipEmMlzfSV4z1yagvo00xWcHsaa
	BxoSEZd2n8qE1JeSryPlulwWUbpV/NmkP+XTZExOxp32k8DJEHBMtFhbyOdpJ4ou7q8NAI
	dNq3a3mb27qYr8FO4K/Y47UxeexhvHhLlgsn+T7S2DOuaIcBPbAHDg3d6gzxUITX8BWQ/7
	Ot9rYcpdbL6j7gMHztvv5eaxj598Ju631eJeuHE8JRtTI+/6lSpWybA0CNbSpeKq9svo5P
	4VDaz2tx0A4ZS6c7oaMTC1faSpvHknUDc5WXReMkN3/T/3A3FkbyXMoS8yvyjw==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795499212;
	b=YyPgSeP/M5NBvPHKCC240Uh9f6TcdQiJrodU2uFvar0BhD+SGtorN3uOdcANLkhGD722md
	Ncg0mIz1XQx2BwfOnVjtLvMryZnOa8A7k1yI0QFAO5NP6WgzEUNo+wPfjq5hAjm9sEMs2A
	/o6TNnj4lLLtvfXvjwB0nVTJbm/h0ulm357pXE+iAmHgXGozuuJ4ZazXvUiBhK5vRr6c2L
	RZVxrKr+FjNzs3AnpBOfBpzk+Qnb4utzIfA/33rL029I5lKrARrT4qFiGU0MPN6mzTgqep
	RuzjVsAo52WpX9PmvsxzT45Izb6iIXPMGpDLsCbqjFp0PFgHEQhHtyvWZJbEAA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795499212;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=j2K3SlbhMWkgnnPkRq5yXc4HqLZ0G+omZ2vl8OFJcD0=;
	b=mR9Pk8TcIG69alOY6d/3wipGp19lf1hsWHCnHrwM7QafAKhNajph6jMao2+Il0IlnkLUwj
	4OcBH0KS9cHt6h/yXWvebI/wQs/WfFkPN0FkbGINCBD3bl0yNL891StTPjgKQ78m8ceWDx
	ZScZDqo8TNZcFk0TkbLVZDE25raGdoGLUdP/XzCcGgPtY7qkApxXUgUyQtFuVRhbkUG9Ow
	sQ4UzwFZpLDSlo6A6dw/UC/CS2Xn1kG+cCvesjmHRhGtY6iZrESBY8pUtBqOMtyzOgMBQl
	S/xChZdwtU6ejRbmeixsgi8RQ7WNpscSd0Zo7/IW7g29+tLyiCo7oRVewcBzjA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYWz01Ys8zPXv
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 05:46:52 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 5fb9
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 05:46:52 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Nick Price <nprice@FreeBSD.org>
Subject: git: d0754fea495e - main - inpcb: reject a reversed ephemeral port range
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: nprice
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: d0754fea495e3b83945890613571584ab6031be8
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 05:46:52 +0000
Message-Id: <6b0524cc.5fb9.7ac0129f@gitrepo.freebsd.org>

The branch main has been updated by nprice:

URL: https://cgit.FreeBSD.org/src/commit/?id=d0754fea495e3b83945890613571584ab6031be8

commit d0754fea495e3b83945890613571584ab6031be8
Author:     Nick Price <nprice@FreeBSD.org>
AuthorDate: 2026-11-24 05:44:53 +0000
Commit:     Nick Price <nprice@FreeBSD.org>
CommitDate: 2026-11-24 05:46:27 +0000

    inpcb: reject a reversed ephemeral port range
    
    vxlan, geneve and the RDMA CM take portrange.first and last as an
    ordered pair and divide by zero when first == last + 1.
    
    Refuse a write that would put first above last or hifirst above hilast.
    
    Reviewed by:    glebius
    Differential Revision:  https://reviews.freebsd.org/D61010
    Signed-off-by:  Nick Price <nprice@FreeBSD.org>
---
 sys/netinet/in_pcb.c | 26 +++++++++++++++++---------
 1 file changed, 17 insertions(+), 9 deletions(-)

diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index 9a9ead358dcc..df1cd54b5855 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -149,18 +149,26 @@ static struct inpcb	*in_pcblookup_wild_locked(struct inpcbinfo *pcbinfo,
 static int
 sysctl_net_ipport_check(SYSCTL_HANDLER_ARGS)
 {
+	u_int *var, port;
 	int error;
 
-	error = sysctl_handle_int(oidp, arg1, arg2, req);
-	if (error == 0) {
-		RANGECHK(V_ipport_lowfirstauto, 1, IPPORT_RESERVED - 1);
-		RANGECHK(V_ipport_lowlastauto, 1, IPPORT_RESERVED - 1);
-		RANGECHK(V_ipport_firstauto, IPPORT_RESERVED, IPPORT_MAX);
-		RANGECHK(V_ipport_lastauto, IPPORT_RESERVED, IPPORT_MAX);
-		RANGECHK(V_ipport_hifirstauto, IPPORT_RESERVED, IPPORT_MAX);
-		RANGECHK(V_ipport_hilastauto, IPPORT_RESERVED, IPPORT_MAX);
+	var = arg1;
+	port = *var;
+	error = sysctl_handle_int(oidp, &port, 0, req);
+	if (error != 0 || req->newptr == NULL)
+		return (error);
+	if (var == &V_ipport_lowfirstauto || var == &V_ipport_lowlastauto) {
+		RANGECHK(port, 1, IPPORT_RESERVED - 1);
+	} else {
+		RANGECHK(port, IPPORT_RESERVED, IPPORT_MAX);
 	}
-	return (error);
+	if ((var == &V_ipport_firstauto && port > V_ipport_lastauto) ||
+	    (var == &V_ipport_lastauto && port < V_ipport_firstauto) ||
+	    (var == &V_ipport_hifirstauto && port > V_ipport_hilastauto) ||
+	    (var == &V_ipport_hilastauto && port < V_ipport_hifirstauto))
+		return (EINVAL);
+	*var = port;
+	return (0);
 }
 
 #undef RANGECHK

From nobody Tue Nov 24 05:50:03 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYX2g6WGSz72VCK
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 05:50:03 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYX2g4MnKz3LKB
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 05:50:03 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795499403;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=gf58EkRH50rhWcdNrtiT9DrOqcYoQYw0XnFnu0JFjvY=;
	b=GZAv67Fl3aex6Gm+6OtF1qvcQIqJpxLAAqUB48x6Sv6GtFQUjppuQAAiHGicDsThq99eBF
	Bhh4T15nLrk3XJ+PatIAVPOUW3IRP5vdEvGVRM7c70BatgzfffewTywLaEpa0yTDkFea+l
	fFUXdU24EibcErT8SfmN9RiEje7ZJDE+SSmkVGGjhxi38UZ6ZVUa0p3zJFcqc40GILKdUe
	JMQwJceqMuDrakvTyibYxlwBOi4Ws8Rfy/Jp3TwrbRTwU0Ka3eH1go2P2TTjitOVEksBoO
	rPIRwGCU2VkF4CtlMTmTVlIUA/atEz+mUeSTNodT3ov3wBZ7SMek82R5vQuFaQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795499403;
	b=IY4faKcbZvmblWOwiHOVp/Va3ZrR6/mCYv6mvsNGYO9NxX3yNx0KwNgJmJMnKAyd22PmL7
	0J6VmYYTYDv3mTqyG64UeP+0zx3ozAydCawwjjimz0ab7YQJQXssRwXiXIDZlxx/gqxBtt
	r2t75dEYRGOd3zZubbgincPAZqU8c7CyJ5ARjqoz4wPuSSKoeihndZPtOyncnzrDXZPu4V
	xTgR3Nz7/IpcxaDuhkX0Ls1hwkZgi6wly1RIcIsFDQFWbD2CAM9ubyg8mcWWq+JgI/o6/X
	CIZdw7IlbKD1LFLAeAY4GVVln7M5qDSyGM3ljdJiTvDhETSFc69L7nJ8LqaVbQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795499403;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=gf58EkRH50rhWcdNrtiT9DrOqcYoQYw0XnFnu0JFjvY=;
	b=McLd49nE/HbMeD6AONX23ZL8vfmu7qpsExnB0EMhdHHAXfV8Hn4sh10s3i+hVsCoFUPFK8
	PAkVkUC774W9UOz/Riki/utJezdSv7q7plxUbY9as7kb0ZVywT7fNMBw8oFBJTSV8qyQae
	U/5P/wYLcR0v97zR47AkoR+cy8Dia4G3ajKQdXPBNNMp3TPGEfwYawg9/6TH+HwEWO7L/X
	AMHvRHJbKhWlQPvU9pbfhtAG/mVEX+ghOsXSY19y8Q8B5VsaPHsp9bRV+pHkzmG7rPkYe9
	ftgQpM39C+zCEWTKexsb5BSBdXONuIvq6y9oAu8qdbr2Z4miEZGt/FdVGhodIA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYX2g3ljNzPnF
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 05:50:03 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 72e3
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 05:50:03 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Nick Price <nprice@FreeBSD.org>
Subject: git: 50bbc49becdf - main - vmm: don't hold the global PPT lock while resetting a device
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: nprice
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 50bbc49becdf92be114969b5f8e26fbe614422e0
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 05:50:03 +0000
Message-Id: <6b05258b.72e3.bf8dde1@gitrepo.freebsd.org>

The branch main has been updated by nprice:

URL: https://cgit.FreeBSD.org/src/commit/?id=50bbc49becdf92be114969b5f8e26fbe614422e0

commit 50bbc49becdf92be114969b5f8e26fbe614422e0
Author:     Nick Price <nprice@FreeBSD.org>
AuthorDate: 2026-11-24 05:49:09 +0000
Commit:     Nick Price <nprice@FreeBSD.org>
CommitDate: 2026-11-24 05:49:54 +0000

    vmm: don't hold the global PPT lock while resetting a device
    
    `ppt_assign_device()` holds the global PPT lock across the save/reset/restore. `pcie_flr()` can wait up to the reset timeout, and every PPT operation on every VM stalls behind it.
    
    Reserve the function with `resetting` and drop the lock for the reset, as `ppt_reset_device()` already does (D58864). Set `ppt->vm` first so a competing assign or `ppt_detach()` gets EBUSY at once instead of sleeping out the reset. Clear it if the assign fails.
    
    Apply matching changes to `ppt_unassign_device()` which may actually take longer on properly-functioning hardware due to teardown duration.
    
    Reviewed by:    adrian, markj
    Differential Revision:  https://reviews.freebsd.org/D60188
    Signed-off-by:  Nick Price <nprice@FreeBSD.org>
---
 sys/amd64/vmm/io/ppt.c | 38 +++++++++++++++++++++++++++++---------
 1 file changed, 29 insertions(+), 9 deletions(-)

diff --git a/sys/amd64/vmm/io/ppt.c b/sys/amd64/vmm/io/ppt.c
index 961c0747b201..ac399ee54b3b 100644
--- a/sys/amd64/vmm/io/ppt.c
+++ b/sys/amd64/vmm/io/ppt.c
@@ -90,7 +90,7 @@ struct pptseg {
 struct pptdev {
 	device_t	dev;
 	struct vm	*vm;			/* owner of this device */
-	bool		resetting;		/* guest FLR in progress */
+	bool		resetting;		/* reset in progress */
 	TAILQ_ENTRY(pptdev)	next;
 	struct pptseg mmio[MAX_MMIOSEGS];
 	struct {
@@ -251,11 +251,12 @@ ppt_find(struct vm *vm, int bus, int slot, int func, struct pptdev **pptp)
 		if (!ppt->resetting)
 			break;
 		/*
-		 * Once resetting is set, every exit from ppt_reset_device()
-		 * reacquires ppt_mtx, clears resetting, and wakes us.  The FLR wait
-		 * itself is bounded.
+		 * Once resetting is set, every exit from ppt_reset_device(),
+		 * ppt_assign_device(), and ppt_unassign_device() reacquires
+		 * ppt_mtx, clears resetting, and wakes us. The wait itself
+		 * is bounded.
 		 */
-		sx_sleep(ppt, &ppt_mtx, 0, "pptflr", 0);
+		sx_sleep(ppt, &ppt_mtx, 0, "pptrst", 0);
 	}
 
 	*pptp = ppt;
@@ -439,20 +440,31 @@ ppt_assign_device(struct vm *vm, int bus, int slot, int func)
 	/* Passing NULL requires the device to be unowned. */
 	error = ppt_find(NULL, bus, slot, func, &ppt);
 	if (error != 0)
-		goto out;
+		goto out_locked;
+
+	ppt->resetting = true;
+	ppt->vm = vm;
 
+	/* Release the lock to allow for longer reset cycles */
+	PPT_UNLOCK();
 	pci_save_state(ppt->dev);
 	ppt_pci_reset(ppt->dev);
 	pci_restore_state(ppt->dev);
+	PPT_LOCK();
+
 	error = iommu_add_device(vm_iommu_domain(vm), ppt->dev,
 	    pci_get_rid(ppt->dev));
 	if (error != 0)
-		goto out;
-	ppt->vm = vm;
+		goto out_reset;
 	cmd = pci_read_config(ppt->dev, PCIR_COMMAND, 2);
 	cmd |= PCIM_CMD_BUSMASTEREN | ppt_bar_enables(ppt);
 	pci_write_config(ppt->dev, PCIR_COMMAND, cmd, 2);
-out:
+out_reset:
+	if (error != 0)
+		ppt->vm = NULL;
+	ppt->resetting = false;
+	wakeup(ppt);
+out_locked:
 	PPT_UNLOCK();
 	return (error);
 }
@@ -472,15 +484,23 @@ ppt_unassign_device(struct vm *vm, int bus, int slot, int func)
 	cmd = pci_read_config(ppt->dev, PCIR_COMMAND, 2);
 	cmd &= ~(PCIM_CMD_PORTEN | PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN);
 	pci_write_config(ppt->dev, PCIR_COMMAND, cmd, 2);
+	ppt->resetting = true;
+
+	/* Release the lock to allow for longer reset/teardown cycles */
+	PPT_UNLOCK();
 	pci_save_state(ppt->dev);
 	ppt_pci_reset(ppt->dev);
 	pci_restore_state(ppt->dev);
 	ppt_unmap_all_mmio(vm, ppt);
 	ppt_teardown_msi(ppt);
 	ppt_teardown_msix(ppt);
+	PPT_LOCK();
+
 	error = iommu_remove_device(vm_iommu_domain(vm), ppt->dev,
 	    pci_get_rid(ppt->dev));
 	ppt->vm = NULL;
+	ppt->resetting = false;
+	wakeup(ppt);
 out:
 	PPT_UNLOCK();
 	return (error);

From nobody Tue Nov 24 05:53:25 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYX6Y3wBbz72W21
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 05:53:25 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYX6Y32SXz3MyC
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 05:53:25 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795499605;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=z6SpDanZ3tmhOdCItpI499TuFgNr90pfLEgl/NrX8pM=;
	b=s0rAYNLmwuCWpzOHExRzfVNXH43uxm0XHqbM6wCZyIYcEyrMM4JfkKhJbS90k41G7XtFPA
	lj1e0mPK1krPL3yZvZ+NUL28utXGvg7J5ZHTrXT6I/q2UfV4XDpnPthfBofBpVjLNBRBLk
	7HDw3TUOinoulZ73zWOYLfl7GcMnr2YhkHvAuT4fcz7MLi5NFnlh5GxtCCuDgUIe7pmAN1
	6qPFb6O0EqQv4VHbJMbDei5ARXlamP03NhXZQ/9UQ9n88KJN9KY6SDLyWM8te8uTsemxG5
	sq6UKiFRoaLONilOwGPh+A2yWXoLfEjmVT5i5vQKziVLsA0RVMVn8OFjnDEltA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795499605;
	b=auGSBvj3K4MLLhSv4Nb4I5HRBjO07Ka7Un6AXWF1gOJXjFTcW8Zsjmfv3rK9CupMn7q6Rr
	7t/XnzEid69xjySfKBivjmBwbozGdaktHg5WYQLXl2bsYqxT4C82rZKRMr5xs1j9pGg3tn
	laVzNvMUTyLU2Rf4rTfwKS9zZZQpxw1NZb4PShRltqxd4F6PnffDxD6K1M45PUaDQWhG4y
	3smvZmsvunmFY6Y2snr8ldhA5YZMP5JMk1e9yc+fqs1xTxGbEviUcmHugtGnhOiNskQWqj
	N1nezoyRK8xn0Gf+NbjpVv/nQwRQ2zMoiWSdBLruf5f0kH8EF73iIow5uaWiCQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795499605;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=z6SpDanZ3tmhOdCItpI499TuFgNr90pfLEgl/NrX8pM=;
	b=CqYFTpxgrwpQVbWwuv3IfO5tr0BGHCFRz8Rn0xPAvFzRazsqFtdD0fPjsaUkir0I1w0EmB
	lpHwU6ksW1FOCVlUQK9CI0EHUDxMUa1+WBpiKvmeMU9YBREFcV3BzJ+Yp4GeuhguGtYnDH
	4RWd8hOO8uTha1cmMRqjHiW6h4kpoVg75f05cXEWxOmoTYwd35Lt47IMu1zZuX2mZNpL7+
	0sO6sqVONLDejgqeMNYLW5qr7lbqhlgRVmr4/AT7tGv3vS/brmDMe2kcIsVXrhb3xJ1Sf0
	K1xThIrqgSuqZ6iIjF+e1jtMBj9hn2F9t1gfyftOQIkQoBRXVk+/sTNwLDguAQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYX6Y2jLczPwx
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 05:53:25 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 8e2d
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 05:53:25 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Nick Price <nprice@FreeBSD.org>
Subject: git: 2bcf5741a9d1 - main - acpi: set up the sysctl tree before acpi_machdep_init()
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: nprice
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 2bcf5741a9d16dbe8ac3fa00e33001ca30ac5d93
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 05:53:25 +0000
Message-Id: <6b052655.8e2d.51aa2c6b@gitrepo.freebsd.org>

The branch main has been updated by nprice:

URL: https://cgit.FreeBSD.org/src/commit/?id=2bcf5741a9d16dbe8ac3fa00e33001ca30ac5d93

commit 2bcf5741a9d16dbe8ac3fa00e33001ca30ac5d93
Author:     Nick Price <nprice@FreeBSD.org>
AuthorDate: 2026-11-24 05:52:34 +0000
Commit:     Nick Price <nprice@FreeBSD.org>
CommitDate: 2026-11-24 05:53:07 +0000

    acpi: set up the sysctl tree before acpi_machdep_init()
    
    On amd64 and i386, acpi_machdep_init() adds hw.acpi.reset_video under
    acpi_sysctl_tree.  Since the tree moved to the end of attach, it no
    longer exists at that point, so sysctl_add_oid() drops the node and the
    sysctl documented in acpi(4) is missing.  Found with KUBSAN.
    
    acpi_machdep_init() cannot fail, so calling it after the tree does not
    leave knobs behind on a failed attach.
    
    Fixes: 7f031c9f6b9f ("acpi: Move sysctl tree set up at end of initialization")
    Signed-off-by: Nick Price <nprice@FreeBSD.org>
    
    Reviewed by:    olce
    Differential Revision:  https://reviews.freebsd.org/D60797
---
 sys/dev/acpica/acpi.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index f63373ee06f9..1ce3781913a9 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -742,9 +742,6 @@ acpi_attach(device_t dev)
 			      "acpi");
     sc->acpi_dev_t->si_drv1 = sc;
 
-    if ((error = acpi_machdep_init(dev)))
-	goto out;
-
     /*
      * Setup our sysctl tree.
      *
@@ -813,6 +810,11 @@ acpi_attach(device_t dev)
 	"Force active-hi polarity for edge-triggered ISA IRQs");
 #endif
 
+    if ((error = acpi_machdep_init(dev))) {
+	sysctl_ctx_free(&sc->acpi_sysctl_ctx);
+	goto out;
+    }
+
     /* Register ACPI again to pass the correct argument of pm_func. */
     power_pm_register(POWER_PM_TYPE_ACPI, acpi_pm_func, sc,
 	sc->acpi_supported_stypes);

From nobody Tue Nov 24 05:54:53 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYX8F3dHLz72Vqn
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 05:54: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYX8F0wmZz3MjN
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 05:54:53 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795499693;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=xDOyC2/PDEeQK7n+YvkC9/FN0VskSk22eBQhSYoO014=;
	b=Dyyha16WuU34r0ZaIMQfk8UlEHvMjn7oxpxx5Nqca6BEYRvDdGbV2RHxocs1uSoeyT5VI2
	xxWva7R2aKyMdrBshm8M8sv0HCy6r+vjErGoB/WFbYFTBVUUDR6itizYej4ZNVbveBoBJc
	irGBt+BENJ3GV8w7OH9/bkbhMa0d0F8zLeHLsYJQvcCM9GIGkE5Zv+7eEvDq6MvdGBYn/W
	/onHXmCKAyDT5r2LEu9UW4QYLgvCw2iYXyLGqRw8XJEQxQqrXg/ExcMFR6ChvBjosYAwk2
	OVPQqz64GgJUtBic8nW4OSs6QWGZ0C5LCz/DCdyvMSA1iM/iKnkgIvORnTuqog==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795499693;
	b=A9WCH0U60xDGOANpzGuMaDsb/B9toQdzwnev7Zf311THpygCfX/6uKPo4flmMawD8VTz86
	uXr8r2MjcCqyJSPqJ+JSHzRIV89GvsoJS8+txYeUUjXDHxrqgx+zsPGKpxeL6kMCO47TOh
	lBVLadUSkn+ZjX7zJWrW4nmxbRz2JeI9/KPaNijoTis8XL52SbenS8GNxdHOXKKu+meRLg
	LdDJ9ZzYfeTIYhRMzJCpmj31p15aNry+W8ISHeu5tsxq8c1LD2DlYyWyPyXRJ89mGiFKeg
	1w+PIp+f4kCS1IRo50AHAJ+5SYSd3mr0/muS0ZO9z3lbMNbzjK+eS0fJoK9Yrw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795499693;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=xDOyC2/PDEeQK7n+YvkC9/FN0VskSk22eBQhSYoO014=;
	b=JblGVzwR0WNCYLFW6MF3SF4jr+v9FU+zb/KpCg0cgBznq9f8vlHwgvocBl+Zw+F/U3+7PT
	/5F84ZcraEZzXc9z0RuSNcx6oy3chGrPyq9swqrGrIY70Ub/ssRrFO11lBFEGCw2N6fo0l
	BQ3ya0fbABVNQi+AVUUB3/yh0jlx99qq8KZdAORMpKEbVQ3hqh5PG95mgFuXGMEBGhtJi7
	jkV6CxAgFITXi6Ca4bG4FoaXTwknjriPgmyjG/qhUVW2Xrsjazyf5K0yKTkvTPJmUfdgs4
	NLb0AGnjwkD8agGS+ISKOJb3B/pNm9MDnEoz8YXDaoUiS3mrgzk3FkT9ODzYKA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYX8F0X1MzPnt
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 05:54:53 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 8802
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 05:54:53 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Nick Price <nprice@FreeBSD.org>
Subject: git: 267910463a20 - main - bootpd: clamp the DHCP reply length to the packet buffer
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: nprice
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 267910463a20cd74a93bcdd129e36ded09faf1c8
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 05:54:53 +0000
Message-Id: <6b0526ad.8802.46d96183@gitrepo.freebsd.org>

The branch main has been updated by nprice:

URL: https://cgit.FreeBSD.org/src/commit/?id=267910463a20cd74a93bcdd129e36ded09faf1c8

commit 267910463a20cd74a93bcdd129e36ded09faf1c8
Author:     Nick Price <nprice@FreeBSD.org>
AuthorDate: 2026-11-24 05:54:18 +0000
Commit:     Nick Price <nprice@FreeBSD.org>
CommitDate: 2026-11-24 05:54:29 +0000

    bootpd: clamp the DHCP reply length to the packet buffer
    
    A client could set the DHCP maximum-message-size option to a large
    value; dovend_rfc1048() derived the reply length from it with no upper
    bound, so the trailing bzero() of the vendor area ran far past the
    MAX_MSG_SIZE packet buffer.  A value >= 0x8000 read into a signed short
    instead went negative and slipped past the length clamps, leaving
    sendto() to read a huge length from the buffer.
    
    Read msgsz unsigned and clamp the reply length to the buffer size.
    
    Reviewed by:    imp
    Differential Revision:  https://reviews.freebsd.org/D61009
    Signed-off-by:  Nick Price <nprice@FreeBSD.org>
---
 libexec/bootpd/bootpd.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libexec/bootpd/bootpd.c b/libexec/bootpd/bootpd.c
index f73671dab074..31e1967884ad 100644
--- a/libexec/bootpd/bootpd.c
+++ b/libexec/bootpd/bootpd.c
@@ -1250,7 +1250,7 @@ dovend_rfc1048(struct bootp *bp, struct host *hp, int32 bootsize)
 		{
 			byte *p, *ep;
 			byte tag, len;
-			short msgsz = 0;
+			u_short msgsz = 0;
 
 			p = vp + 4;
 			ep = p + BP_VEND_LEN - 4;
@@ -1289,6 +1289,10 @@ dovend_rfc1048(struct bootp *bp, struct host *hp, int32 bootsize)
 		report(LOG_ERR, "invalid response length=%d", pktlen);
 		pktlen = sizeof(*bp);
 	}
+	if (pktlen > MAX_MSG_SIZE) {
+		report(LOG_ERR, "response length=%d exceeds buffer", pktlen);
+		pktlen = MAX_MSG_SIZE;
+	}
 	bytesleft = ((byte*)bp + pktlen) - vp;
 	if (pktlen > sizeof(*bp)) {
 		if (debug > 1)

From nobody Tue Nov 24 05:57:37 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYXCQ01KHz72W61
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 05:57:38 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYXCP67F9z3NRT
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 05:57:37 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795499857;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=7ejzr7WMaxYqcOzZPuo/AUBamTUY9tdMytJf/8gErvg=;
	b=TQF/cKjQrXajjn8DTi/HqAVfStiqxW++qfvG7TuBmVxp3TYpdqjZKRVXW2rB5mr8+HAcE8
	l+TDKhEAn09NXQADn+zwljS/26ZQRlkNWDX6mgUPrOxc1U4EqtwJ8uHoOcmf62XZRO4ZTW
	sMMMb3pQTNyJu3RqUvwvzj8wNjjJu6YL6uVS8B8WbXg+V9Lj1wNY8pUlhrxj9km2cuOEU5
	KExo2EtGj+4hRpVigGYfj24itHCF91SWnoAX79MHDG+8kq7Gl5QOVsz/afTmuI+Zh+vG/g
	nkg3etBCc0Oo1h9u7EzDv9enFG9HXrRo5TGwuXOVFXb/eyA86VqLEhs5Ko+QAQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795499857;
	b=ds2VEk64SbZ2MXX/IkCADi1KQZgHCnwPwEPRqnkM1StJkLv2qm0Y2KskfTUhUmgJzeuejl
	DSG+hiU1nYlwPSWamdd6z1wTbikx2q+jciWGzgUklRHyJLVoZnzS9YZZyE0xjs3EOmCosM
	mxjOwfLmqFnP88c6w40s5E2XU+HO6pKMitSmQEvu/4UgigMPsdtO5X+WP+XqTkpuM4DLi6
	SPtXJ6oJmouEb7Gx3yxnu12fVuJWjVdABG7PM8Ar9hw6LMf+D8PlhO0MpaG1s7yhTVMn/s
	Yus3LtokRXTt/+qTNijC+gbTS26cFTQ2m+hULUtV4DpAwGHgKajSRpu2mRm5fA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795499857;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=7ejzr7WMaxYqcOzZPuo/AUBamTUY9tdMytJf/8gErvg=;
	b=J9QmRFjvyL+SdmtRFAkVGCTSeQOu3lqssOJOZBF4SZz2Bi3DgJOGzgKgdzEgoqUcx4UXoP
	AYGugHvWWiZa4ym+uAwhOiECtjFA4U2uM66mOppxoHgd/jRph6GWa4MZrGjDyRDIdwmWpj
	y6jnROm0CRl4plPHfwZsYPJS2OFDCeHyDgWxWBJ1imWiX/rebRuBVtNOrVSaF7m4TxTT54
	OD/sgvnqe5GsuoYLdYTeEMCAlf5YNEWVcsNy+UsXronnZigIOFWjWUL2bA/P7gEEQoQMmL
	ALA5MY2Qm47xFNdLNLYXa40rt4RpTMub09b/H3qoFGx4gWJQtj2Tt1xRLL/ptA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYXCP5p2szQ7p
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 05:57:37 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 70c9
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 05:57:37 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Nick Price <nprice@FreeBSD.org>
Subject: git: d888f02ab47a - main - tests/fdescfs: add a license header
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: nprice
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: d888f02ab47a8244ac366f66f076a25035c5d883
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 05:57:37 +0000
Message-Id: <6b052751.70c9.2cf0b23e@gitrepo.freebsd.org>

The branch main has been updated by nprice:

URL: https://cgit.FreeBSD.org/src/commit/?id=d888f02ab47a8244ac366f66f076a25035c5d883

commit d888f02ab47a8244ac366f66f076a25035c5d883
Author:     Nick Price <nprice@FreeBSD.org>
AuthorDate: 2026-11-24 05:57:07 +0000
Commit:     Nick Price <nprice@FreeBSD.org>
CommitDate: 2026-11-24 05:57:12 +0000

    tests/fdescfs: add a license header
    
    Differential Revision:  https://reviews.freebsd.org/D61230
    Signed-off-by:  Nick Price <nprice@FreeBSD.org>
---
 tests/sys/fs/fdescfs/fdescfs_test.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/sys/fs/fdescfs/fdescfs_test.c b/tests/sys/fs/fdescfs/fdescfs_test.c
index 95e38c970779..c24af3c0eaee 100644
--- a/tests/sys/fs/fdescfs/fdescfs_test.c
+++ b/tests/sys/fs/fdescfs/fdescfs_test.c
@@ -1,3 +1,9 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2026 Nick Price
+ */
+
 #include <sys/param.h>
 #include <sys/capsicum.h>
 #include <sys/filio.h>

From nobody Tue Nov 24 06:02:01 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYXJT6vPmz72WSC
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 06:02: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYXJT6D3kz3P89
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 06:02:01 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795500121;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=RHdMlif2gWWsr3LF+4VJd8vJMANYpO5dI+6aW2ptkkc=;
	b=sLOPML0VtKtbANxGFbu8qteYudxDX7zWoHhZ97JiTvHql/gsfi686Ce38H9e0K5aW0tVOT
	IwpcyI35FkovECslbFe7si8nVxr7AS1EG8PlNS6gSCuc9DsFhOqtJR6eDcVzpQOm5jDvVG
	BrC2dQQPWiKc0pYNJS7gzVaynQr9jwDFeZvzCRfkPFiC2Ijzl2JkQSSLSofohsHK0h8ETO
	rrfRKml0w2QY1eY7Cqmo/0BPM0wy+uT2ydjKfXzC+0z/owQdisiRj1yV/VZWKbG4PJi5hQ
	dDQmr12Zr6kO0yK3W3SKTi0VdVKP8CnfBLZP1E61oadQhs3WxTxphlga8aAowA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795500121;
	b=XvLOhQAl2iDZ6fpXcTt9qp0mg/zh3PwZq8+8HAtMAYMDEN/VZHjlHo4xfQh4thTElsWYiJ
	3zDHT3gBKxRLi4k+OmC3EmgBET+fhMgUehq0cgKecq5aw5y3GfMASSKfmdS0FturZ9+s2E
	+VwIgbk90K/QI5HVyvTqW6akj73t70E1LOvrEmRKSW/iIYQ/ciN5HaT0niWNaom/mO52ft
	DXMziEpD7bbDbdW9w01uB1kcquERJmuuMjiCnWnFMIpv9fUwOEA/BF0zF7N3iBqI/QZdjh
	knQk93QRKbp6+s1po1F8Jm02PXXhBy3411uNV1yZsp0uDD3kclg16pmH5S0NHg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795500121;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=RHdMlif2gWWsr3LF+4VJd8vJMANYpO5dI+6aW2ptkkc=;
	b=i7kPHDFW2rebOoezEQwlqQfYwpSU5A06LQ8Y6Pq0u8p64zBIyP1jQ70pKgHaflJjzvP5Vx
	FWOTzGx+Oh1an8xwVQ8Xlcb5pAkTL4Vs924PLC82ZPai+tgB8U/DnOSh0lJUnzCO9nD3pZ
	OfxLc6f6WbdMg/92BIXGuyK1E7pFBh6hWQp/xWqNhtsiX4qJwalEekKISfpxw4ahVlk12Q
	HbJa4Ih5/Yj8VQ9JVX6TM2ksXD8jauZKZ1XCZu8b+YHknJEG3/fn0Uy01POIj6L68VeppJ
	DyK3Qsw/6Y9AmNWhEypFkpcCKilGpCQCmf2J/J0adoY0Yq4Lg4vnzSgNDPRYCQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYXJT5bQJzPxj
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 06:02:01 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 9b0b
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 06:02:01 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Nick Price <nprice@FreeBSD.org>
Subject: git: 873a495d2643 - main - aq: support a legacy INTx interrupt
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: nprice
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 873a495d2643dc3e103649e9817caa00ac776df3
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 06:02:01 +0000
Message-Id: <6b052859.9b0b.2010ec43@gitrepo.freebsd.org>

The branch main has been updated by nprice:

URL: https://cgit.FreeBSD.org/src/commit/?id=873a495d2643dc3e103649e9817caa00ac776df3

commit 873a495d2643dc3e103649e9817caa00ac776df3
Author:     Nick Price <nprice@FreeBSD.org>
AuthorDate: 2026-11-24 06:01:26 +0000
Commit:     Nick Price <nprice@FreeBSD.org>
CommitDate: 2026-11-24 06:01:29 +0000

    aq: support a legacy INTx interrupt
    
    aq(4) attached only with MSI-X.  Without an MSI controller iflib falls
    back to INTx, and attach failed with EOPNOTSUPP.
    
    Accept IFLIB_INTR_LEGACY, program the controller for INTx, and add a
    legacy filter.  INTx is level-triggered and nothing auto-masks, so the
    filter masks the vector before acknowledging it; iflib unmasks it via
    IFDI_INTR_ENABLE once the queues are drained.  All causes already map
    to vector 0 in this mode.  MSI stays unsupported: iflib never selects
    it here, since these controllers advertise 32 messages.
    
    Reviewed by:    adrian
    Differential Revision:  https://reviews.freebsd.org/D60461
    Signed-off-by:  Nick Price <nprice@FreeBSD.org>
---
 sys/dev/aq/aq_device.h |  1 +
 sys/dev/aq/aq_hw.c     |  2 +-
 sys/dev/aq/aq_irq.c    | 19 +++++++++++++++++++
 sys/dev/aq/aq_main.c   |  6 +-----
 sys/dev/aq/aq_ring.c   |  2 +-
 5 files changed, 23 insertions(+), 7 deletions(-)

diff --git a/sys/dev/aq/aq_device.h b/sys/dev/aq/aq_device.h
index 1f71a410b9f0..553c1ed9d795 100644
--- a/sys/dev/aq/aq_device.h
+++ b/sys/dev/aq/aq_device.h
@@ -160,6 +160,7 @@ int aq_update_hw_stats(struct aq_dev *aq_dev);
 void aq_initmedia(struct aq_dev *aq_dev);
 int aq_linkstat_isr(void *arg);
 int aq_isr_rx(void *arg);
+int aq_isr_legacy(void *arg);
 void aq_mediastatus_update(struct aq_dev *aq_dev, uint32_t link_speed, const struct aq_hw_fc_info *fc_neg);
 void aq_mediastatus(struct ifnet *ifp, struct ifmediareq *ifmr);
 int aq_mediachange(struct ifnet *ifp);
diff --git a/sys/dev/aq/aq_hw.c b/sys/dev/aq/aq_hw.c
index 5c926f2ed960..d9850184e2da 100644
--- a/sys/dev/aq/aq_hw.c
+++ b/sys/dev/aq/aq_hw.c
@@ -871,7 +871,7 @@ aq_hw_init(struct aq_hw *hw, uint8_t *mac_addr, uint8_t adm_irq, bool msix)
 	if (msix)
 		itr_irq_mode_set(hw, 0x6); //MSIX + multi vector
 	else
-		itr_irq_mode_set(hw, 0x5); //MSI + multi vector
+		itr_irq_mode_set(hw, 0x0); //INTx, single vector
 
 	/* Route both hardware error causes (map reg 0) to the admin vector. */
 	reg_gen_irq_map_set(hw,
diff --git a/sys/dev/aq/aq_irq.c b/sys/dev/aq/aq_irq.c
index d3c1d5043969..33ef238f2d10 100644
--- a/sys/dev/aq/aq_irq.c
+++ b/sys/dev/aq/aq_irq.c
@@ -441,6 +441,25 @@ aq_isr_rx(void *arg)
 	return (FILTER_SCHEDULE_THREAD);
 }
 
+int
+aq_isr_legacy(void *arg)
+{
+	struct aq_dev	*aq_dev = arg;
+	struct aq_hw	*hw = &aq_dev->hw;
+	uint32_t	status;
+
+	status = itr_irq_statuslsw_get(hw);
+	if (status == 0)
+		return (FILTER_STRAY);
+
+	/* INTx is level-triggered: mask until iflib re-enables. */
+	itr_irq_msk_clearlsw_set(hw, status);
+	itr_irq_status_clearlsw_set(hw, status);
+	AQ_HW_FLUSH(hw);
+	counter_u64_add(aq_dev->rx_rings[0]->stats.irq, 1);
+	return (FILTER_SCHEDULE_THREAD);
+}
+
 /**************************************************************************/
 /* interrupt service routine  (Top half)                                  */
 /**************************************************************************/
diff --git a/sys/dev/aq/aq_main.c b/sys/dev/aq/aq_main.c
index c6396d6d9699..d54ab9931f9a 100644
--- a/sys/dev/aq/aq_main.c
+++ b/sys/dev/aq/aq_main.c
@@ -485,14 +485,10 @@ aq_if_attach_post(if_ctx_t ctx)
 
 
 	switch (softc->scctx->isc_intr) {
-	case IFLIB_INTR_LEGACY:
-		rc = EOPNOTSUPP;
-		goto exit;
-	goto exit;
-		break;
 	case IFLIB_INTR_MSI:
 		rc = EOPNOTSUPP;
 		goto exit;
+	case IFLIB_INTR_LEGACY:
 	case IFLIB_INTR_MSIX:
 		break;
 	default:
diff --git a/sys/dev/aq/aq_ring.c b/sys/dev/aq/aq_ring.c
index 8fef7ae7765d..185a52bfdbb4 100644
--- a/sys/dev/aq/aq_ring.c
+++ b/sys/dev/aq/aq_ring.c
@@ -68,7 +68,7 @@ struct if_txrx aq_txrx = {
 	.ift_rxd_pkt_get = aq_isc_rxd_pkt_get,
 	.ift_rxd_refill = aq_ring_rx_refill,
 	.ift_rxd_flush = aq_isc_rxd_flush,
-	.ift_legacy_intr = NULL
+	.ift_legacy_intr = aq_isr_legacy
 };
 
 

From nobody Tue Nov 24 06:02:51 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYXKR3V3Sz72Ws0
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 06:02: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYXKR11JHz3Ptx
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 06:02:51 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795500171;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=29znqwue1eg64KRfTqVSfZEUi6B7UNiL31HW4vSrzsY=;
	b=hHqBX2hc2w6t/gSqkukVajlwCnDO6EyPbjCKaedVovjPnL8THU8Ke/MQh9cJ8wdyiBUmfp
	yE7yL3ITRUucNCqgaLftQZEFYpkWSNAw9pw6/briDvq3qWLO4yU9PLTT91XmfZrtfiH+oz
	vlgPdIRagvWGgTY65iOS+RdfjOSKxMX69/cAqMHY+IKG+lJH8FEhKAVN6bajU+2ap3mAt+
	/BwXAu8TobaR7NidXsEfO7uHWVIRUITWxmcfeGGCN9oQhylCZ9jDViXwfb4L1i+Q9O6vZE
	meFld33kO9VDOumEsTK8jRROY2VjhWXiX+TwgT+r9/rP5MuQcNGiuF27O9Sfmg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795500171;
	b=JJ2Q9/puVtP6sKBDBQL0M1Mueo1b7NiW4i2mSlx/wesPxBSKS5d8f9wLaek5rdvuf7j3MJ
	ydtktppTavIJhJ+ljbVnfll9hdnqAi88GDoxCP82DE32OGGGnQud5nfHoOebYqja8QNDuC
	6cDlz4kwwtyqVq9WvqeJekjE7me7Xg3USPGBQ8MB18PjaVvg1s42YN26sC9O7mXfJZ+IVl
	9m0SF/KnywGaK478Dcoe1LbsU6nbENO1/UVIgv07rOA7WmGrTZd+KHOEqvcEUE7utqWk8l
	/Gepb/bwe6PRNVNxcU8+ivPn8dAXJshEXAIhHl7EWvMWkFMl+NnSnefJYAQiMg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795500171;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=29znqwue1eg64KRfTqVSfZEUi6B7UNiL31HW4vSrzsY=;
	b=Wt7yl3aw2fFm+utUjUQAZj0sx/JmgJ0mA9MYI6r0E17cAR0FyfEXbbtxQ1DfQAjxd8CbLF
	KdTkJDa1NeUO713radNihdBZB7d3Fa8smhIbVLCE7KmnJ5efr7an5hB1JP5ezauAJhBmG6
	/gtNeDSsczHHoEtLq6luAsJU1zpneDZZAE5ex61cdaPOoFbO5zAqnENnc55Mmb6LsHAFO2
	lYIpT8iG4iJAGphvT8HPI1/eNj8nugzDSBsq5ltieRlmWoNCeSx8Vek3wMlcx+kn32OCfW
	JOXwcJeZ9RSVHX2hlZtOQbiJFYlTUxoPLGPkgGw18A4SKeiT2C8FtKdBzi0fKA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYXKR0hl2zQJ0
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 06:02:51 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 95db
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 06:02:51 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Nick Price <nprice@FreeBSD.org>
Subject: git: 408af93b4bb3 - main - aq: build the module on arm64
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: nprice
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 408af93b4bb310a3de9c8fcd91a901105b31c32a
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 06:02:51 +0000
Message-Id: <6b05288b.95db.366129d7@gitrepo.freebsd.org>

The branch main has been updated by nprice:

URL: https://cgit.FreeBSD.org/src/commit/?id=408af93b4bb310a3de9c8fcd91a901105b31c32a

commit 408af93b4bb310a3de9c8fcd91a901105b31c32a
Author:     Nick Price <nprice@FreeBSD.org>
AuthorDate: 2026-11-24 06:02:31 +0000
Commit:     Nick Price <nprice@FreeBSD.org>
CommitDate: 2026-11-24 06:02:34 +0000

    aq: build the module on arm64
    
    The driver has no x86 dependency.  It attaches and passes traffic on a
    Raspberry Pi 5 with an AQC100 in its PCIe slot.
    
    Reviewed by:    adrian
    Differential Revision:  https://reviews.freebsd.org/D60462
    Signed-off-by:  Nick Price <nprice@FreeBSD.org>
---
 sys/modules/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/modules/Makefile b/sys/modules/Makefile
index 8a6832441a29..35c761215597 100644
--- a/sys/modules/Makefile
+++ b/sys/modules/Makefile
@@ -600,6 +600,7 @@ _mlx5ib=	mlx5ib
 .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
     ${MACHINE_CPUARCH} == "i386"
 _acpi=		acpi
+_aq=		aq
 _ena=		ena
 _gve=		gve
 _igc=		igc
@@ -758,7 +759,6 @@ _imx=		imx
 .endif
 
 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
-_aq=		aq
 _agp=		agp
 .if ${MACHINE_CPUARCH} == "i386" || !empty(COMPAT_FREEBSD32_ENABLED)
 _aout=		aout

From nobody Tue Nov 24 08:01:46 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYZyf4WQXz72jQr
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 08:01: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYZyf3jk4z4Sym
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 08:01:46 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795507306;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=6oeNQiYhDtqx8Bocqy0uCk6Nr3S2ahytrrQnyJdOcxg=;
	b=UHU/2VYAn/VSV8olYmu5X1qjDRGLp3FO8G5EQuo8snjQvYa8QhQ3SrCYE4c7B6uiQ32EBM
	D0aT6Pg5/Rmwjpu/etY4+uXBRRCM4rDfBpPut9YDGe9m/haWhDCOE3w1yk/9ID2EIArU+R
	APXeiE/iqqgdwWiNJKot5NF05wqtN5iU6ZEbrfEhqeWE/rUK1zuVL0H7EW4v7b48TYDnqM
	reWRs99y1I8J3EDfi1qZKZUFT2BxtOD8rIpbcWg9irFuaQzamvd67xkKPf4vRUd90CYKEw
	m85qIQOOYBO6Gw0/THdRo6EXI/P+1YRKBfbwIjwcCd8NanELmhIXneztz+o9JA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795507306;
	b=pPLA5ldjg0VVJLRdhyNEkB002AQmNlghGKgI8MYlpM7OgQ2hTFc8kHewX71OaCQnqRrTZE
	g9BULZRVljS/B5UFS+1NPH0STQyVnpNoUzSIGozxsgkT2Vu4PlrWTMs1gzGur6OkLW81/l
	ucfp+CGcdh0/2xqUpCtb2SJjOO3idXfZTbfDbUydlvoCSFaHu066rwAJQ0SLzVvLlH5D83
	rsfoWAX8Pm+ipIKDqu/6Y6kzhm04b+kBccTLhcZEXGFLO5MpgC7shAvaceh/qghspbZ6wj
	r2bz+DSkECL1KggPrjBcK7sUvwbZ1KqSgNms0CioRGAFCJKgBtzxCtqvcM+dcA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795507306;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=6oeNQiYhDtqx8Bocqy0uCk6Nr3S2ahytrrQnyJdOcxg=;
	b=fa1yDegbz3Zm3rxQxvrfGxJ2V/pwk8ZPYGmgJP023JQK+nMbWZAD/O5Ga1WjYPHqzzuDnf
	iawtbR7qao/3qVauXkpFlAvKdAVBcmSgi+nuLNk4wZ6mfmOlFH+NhEAK18XuvxAppk2630
	OdWNNtN9Slo/AJxYa1Mjjgy2D3TGrQ2UxICiwrBw7PrEKbYqwNr2SChUBOrl8CwKSHFky9
	JeR4zbpybSpOyxILe8gPUabLNUMqHny5+NPXYgdmK/RPz+N9xRaesymKeHIK9SMnOfJWWu
	OifBWMDBAchx9Dri0TzgSxJHZ17ZSswacli2D8nU2sTOZ8YtciLntWRDbLAcrA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYZyf3NcNzTHC
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 08:01:46 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 15863
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 08:01:46 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Hayzam Sherif <hayzam@FreeBSD.org>
Subject: git: d431c807f15d - main - amd64/vmm: Validate guest MSRs restored from a snapshot
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: hayzam
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: d431c807f15d8b0673b7d3ecc5aeec987ae9009b
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 08:01:46 +0000
Message-Id: <6b05446a.15863.7b30583f@gitrepo.freebsd.org>

The branch main has been updated by hayzam:

URL: https://cgit.FreeBSD.org/src/commit/?id=d431c807f15d8b0673b7d3ecc5aeec987ae9009b

commit d431c807f15d8b0673b7d3ecc5aeec987ae9009b
Author:     Hayzam Sherif <hayzam@FreeBSD.org>
AuthorDate: 2026-11-24 07:24:06 +0000
Commit:     Hayzam Sherif <hayzam@FreeBSD.org>
CommitDate: 2026-11-24 07:59:14 +0000

    amd64/vmm: Validate guest MSRs restored from a snapshot
    
    vmx_vcpu_snapshot() copies the saved guest MSR array from userspace
    without checking it.  vmx_msr_guest_enter() and
    vmx_msr_guest_enter_tsc_aux() write these values to the host's MSRs
    before guest entry, so a non-canonical LSTAR, CSTAR or KGSBASE, or a
    TSC_AUX with reserved bits set, raises #GP in the host and panics it.
    
    Check the values on restore and fail with EINVAL, leaving the vCPU's
    MSRs unchanged.  STAR and SF_MASK need no check, since the CPU accepts
    any value for them.  PAT is not written to a host MSR, but apply the
    check used for guest writes to it as well.
    
    Reported by:    llm-postcr
    Reviewed by:    markj
    Approved by:    markj
    Fixes:          483d953a86a2 (Initial support for bhyve save and restore.)
    Fixes:          f5f5f1e7d6de (Support guest rdtscp and rdpid instructions on Intel VT-x)
    MFC after:      1 week
    Sponsored by:   Alchemilla Ventures Private Limited
    Differential Revision:  https://reviews.freebsd.org/D61733
---
 sys/amd64/vmm/intel/vmx.c     | 10 ++++++++--
 sys/amd64/vmm/intel/vmx_msr.c | 38 ++++++++++++++++++++++++++++++++++++++
 sys/amd64/vmm/intel/vmx_msr.h |  4 ++++
 3 files changed, 50 insertions(+), 2 deletions(-)

diff --git a/sys/amd64/vmm/intel/vmx.c b/sys/amd64/vmm/intel/vmx.c
index 4ad17861a437..92f37d8f0009 100644
--- a/sys/amd64/vmm/intel/vmx.c
+++ b/sys/amd64/vmm/intel/vmx.c
@@ -4172,6 +4172,7 @@ vmx_vcpu_snapshot(void *vcpui, struct vm_snapshot_meta *meta)
 	struct vmx *vmx;
 	struct vmx_vcpu *vcpu;
 	struct vmxctx *vmxctx;
+	uint64_t guest_msrs[GUEST_MSR_NUM];
 	int err, run, hostcpu;
 
 	err = 0;
@@ -4241,8 +4242,13 @@ vmx_vcpu_snapshot(void *vcpui, struct vm_snapshot_meta *meta)
 	if (err != 0)
 		goto done;
 
-	SNAPSHOT_BUF_OR_LEAVE(vcpu->guest_msrs,
-	    sizeof(vcpu->guest_msrs), meta, err, done);
+	memcpy(guest_msrs, vcpu->guest_msrs, sizeof(guest_msrs));
+	SNAPSHOT_BUF_OR_LEAVE(guest_msrs, sizeof(guest_msrs), meta, err, done);
+	if (meta->op == VM_SNAPSHOT_RESTORE) {
+		err = vmx_msr_guest_restore(vcpu, guest_msrs);
+		if (err != 0)
+			goto done;
+	}
 
 	SNAPSHOT_BUF_OR_LEAVE(vcpu->pir_desc,
 	    sizeof(*vcpu->pir_desc), meta, err, done);
diff --git a/sys/amd64/vmm/intel/vmx_msr.c b/sys/amd64/vmm/intel/vmx_msr.c
index 1f9fbb0e0b0d..0e8e5815f43b 100644
--- a/sys/amd64/vmm/intel/vmx_msr.c
+++ b/sys/amd64/vmm/intel/vmx_msr.c
@@ -26,6 +26,8 @@
  * SUCH DAMAGE.
  */
 
+#include "opt_bhyve_snapshot.h"
+
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/proc.h>
@@ -398,6 +400,42 @@ vmx_msr_guest_exit_tsc_aux(struct vmx *vmx, struct vmx_vcpu *vcpu)
 		wrmsr(MSR_TSC_AUX, host_aux);
 }
 
+#ifdef BHYVE_SNAPSHOT
+static bool
+canonical_addr(uint64_t addr)
+{
+	uint64_t mask;
+
+	/*
+	 * WRMSR checks an address against the widest linear address that the
+	 * CPU supports, whether or not 5-level paging is in use.
+	 */
+	mask = ~0UL <<
+	    ((cpu_stdext_feature2 & CPUID_STDEXT2_LA57) != 0 ? 56 : 47);
+	return ((addr & mask) == 0 || (addr & mask) == mask);
+}
+
+/*
+ * Install guest MSR values supplied by userspace.  The values are later
+ * written to the host's MSRs, so reject any for which WRMSR would raise #GP.
+ * STAR and SF_MASK accept all values.
+ */
+int
+vmx_msr_guest_restore(struct vmx_vcpu *vcpu,
+    const uint64_t msrs[static GUEST_MSR_NUM])
+{
+	if (!canonical_addr(msrs[IDX_MSR_LSTAR]) ||
+	    !canonical_addr(msrs[IDX_MSR_CSTAR]) ||
+	    !canonical_addr(msrs[IDX_MSR_KGSBASE]) ||
+	    !pat_valid(msrs[IDX_MSR_PAT]) ||
+	    (msrs[IDX_MSR_TSC_AUX] >> 32) != 0)
+		return (EINVAL);
+
+	memcpy(vcpu->guest_msrs, msrs, sizeof(vcpu->guest_msrs));
+	return (0);
+}
+#endif
+
 int
 vmx_rdmsr(struct vmx_vcpu *vcpu, u_int num, uint64_t *val, bool *retu)
 {
diff --git a/sys/amd64/vmm/intel/vmx_msr.h b/sys/amd64/vmm/intel/vmx_msr.h
index f88f37bd9163..526a4f6f7e7d 100644
--- a/sys/amd64/vmm/intel/vmx_msr.h
+++ b/sys/amd64/vmm/intel/vmx_msr.h
@@ -37,6 +37,10 @@ void vmx_msr_guest_enter_tsc_aux(struct vmx *vmx, struct vmx_vcpu *vcpu);
 void vmx_msr_guest_enter(struct vmx_vcpu *vcpu);
 void vmx_msr_guest_exit(struct vmx_vcpu *vcpu);
 void vmx_msr_guest_exit_tsc_aux(struct vmx *vmx, struct vmx_vcpu *vcpu);
+#ifdef BHYVE_SNAPSHOT
+int vmx_msr_guest_restore(struct vmx_vcpu *vcpu,
+    const uint64_t msrs[static GUEST_MSR_NUM]);
+#endif
 int vmx_rdmsr(struct vmx_vcpu *vcpu, u_int num, uint64_t *val, bool *retu);
 int vmx_wrmsr(struct vmx_vcpu *vcpu, u_int num, uint64_t val, bool *retu);
 

From nobody Tue Nov 24 08:01:47 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYZyh6KmSz72jkJ
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 08:01: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYZyh4vTlz4Sfb
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 08:01:48 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795507308;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=MngeIHnLI9FugG2SXAokP8LyR0oB+wG1EF1z5/AnIiE=;
	b=vOqHJ09QDrpEUlXhcRy9pugLH+hAkRUQ/5B5g1xScMAfQP1Cs0KFRxTWK2V+cYbjMKoqEt
	K90pxS4et+IJhDlqw8l+jIg/zDN2/IsTF4vbiGmuxt/eOwVT2VBRFs4P4lBw746NNoO1wV
	MnbsO+KbSqv5ZxAJ/Iut303aZScEoOccwxD6yYatriYC6jjA7mrqXgYJEnpWfwmVtQCNmF
	PiaN0V2hJh0+E9YZH+10ueMVNgvOZ5221Wkr5ywRK3j0OgccDF8Lv3MHrVVIbo7tf1N6Wb
	+QlohLel2hX7Xl1KcImxo0XF+hYsz4lAwnJeVwRIOZd9U49/AG/qQ2/H3/oJbQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795507308;
	b=B4oDrqsrYLozk2N11iN43p6OdAIQhKB6rxipTxTxLh6ZnIXe7U9Qmw4ky3DcjLckdqqNg+
	vd6tq0U1pgOFOaMMjP9vmOMLzb/kG/LgS3uUABYeuuYUcUiS7Oq9mQEAXWaghhBe2zcY1B
	QXcKodrN8VxW/3/IScTM/Wxcfp1cqcAYBwjL94HhR7b/0RbXAXIiMDC6quzxOFz0JUS8Iz
	X9/siLHJ5wWe6OQBn5eSLJt9cf/7wn8c/TCEibiz+aMONg5t2LuRxchtaqLrfjN7OPG9tF
	cQ+uoPfux5rQ/IydFEoOeHZOpd6NAHgmuYiPAV3zE9PNq9BTPJY8WLN5tku8JQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795507308;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=MngeIHnLI9FugG2SXAokP8LyR0oB+wG1EF1z5/AnIiE=;
	b=rAr3FhqXocRXzCXbQimzbrT6axeyO8b6zbVfv4xQiVXhcwBmueABCNqPd3pwzcN0AtVT2/
	ZIuRhNzmJZ4znUjdKet1Axcd0rh+2oo6MvOHUDZfRzE9Whm7GnpQ4YoU8I2UIbOwGeS7S6
	UMZI1xcZymSbW2s7zbVx/KfnFmDV2UmGVIJjTV2qty807hBlRtMncrMdtkD1hnucO73GTW
	VjOFCcaXwxZDAMTUVEOWcaFWgTkqgSgLg2br1nKv5LCJH5PjK4Pjl97cASDBl1/W9oGDO0
	YhV6hdAJZdyFI+00yOFEi6Z/12VJ0GBY0ucPvxB5EjgjgeeS3bNHELPtsnwg6w==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYZyg3lfrzT3w
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 08:01:47 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 15dd1
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 08:01:47 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Hayzam Sherif <hayzam@FreeBSD.org>
Subject: git: a82c04293ecc - main - libvmmapi: Size the guard reservation from existing memory
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: hayzam
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: a82c04293ecc72ea87f68c9506e160944ec26047
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 08:01:47 +0000
Message-Id: <6b05446b.15dd1.2fcbd5c1@gitrepo.freebsd.org>

The branch main has been updated by hayzam:

URL: https://cgit.FreeBSD.org/src/commit/?id=a82c04293ecc72ea87f68c9506e160944ec26047

commit a82c04293ecc72ea87f68c9506e160944ec26047
Author:     Hayzam Sherif <hayzam@FreeBSD.org>
AuthorDate: 2026-11-24 07:24:23 +0000
Commit:     Hayzam Sherif <hayzam@FreeBSD.org>
CommitDate: 2026-11-24 07:59:16 +0000

    libvmmapi: Size the guard reservation from existing memory
    
    When the VM's memory already exists, as it does after bhyveload(8),
    vm_setup_memory_domains() maps the existing segment but sizes its
    address space reservation from the requested size.  If the existing
    segment is larger, the mapping runs past the reservation and replaces
    the guard region after it, and anything else mapped there.
    
    Look for existing memory before sizing the reservation.
    
    Reviewed by:    bnovkov, markj
    Approved by:    markj
    Fixes:          08c7dd2fbe4f (libvmmapi: Add support for setting up and configuring guest NUMA domains)
    MFC after:      1 week
    Sponsored by:   Alchemilla Ventures Private Limited
    Differential Revision:  https://reviews.freebsd.org/D61917
---
 lib/libvmmapi/vmmapi.c | 48 ++++++++++++++++++++++++++++--------------------
 1 file changed, 28 insertions(+), 20 deletions(-)

diff --git a/lib/libvmmapi/vmmapi.c b/lib/libvmmapi/vmmapi.c
index 99d0a1ec7e39..c9630e357940 100644
--- a/lib/libvmmapi/vmmapi.c
+++ b/lib/libvmmapi/vmmapi.c
@@ -498,6 +498,7 @@ vm_setup_memory_domains(struct vmctx *ctx, enum vm_mmap_style vms,
 	char *baseaddr, *ptr;
 	int error, i, segid;
 	vm_paddr_t gpa;
+	bool exists;
 
 	/* Sanity checks. */
 	assert(vms == VM_MMAP_ALL);
@@ -506,6 +507,32 @@ vm_setup_memory_domains(struct vmctx *ctx, enum vm_mmap_style vms,
 		return (-1);
 	}
 
+	/*
+	 * Check if the memory segments already exist.
+	 * If 'ndoms' is greater than one, refuse to proceed if a
+	 * memseg already exists. If only one domain was requested, use
+	 * the existing segment to preserve the behaviour of the previous
+	 * implementation. This has to be done before the address space
+	 * reservation below is sized.
+	 *
+	 * Splitting existing memory segments is tedious and
+	 * error-prone, which is why we don't support NUMA
+	 * domains for bhyveload(8)-loaded VMs.
+	 */
+	exists = false;
+	for (i = 0; i < ndoms; i++) {
+		error = vm_get_memseg(ctx, VM_SYSMEM + i, &len, memseg.name,
+		    sizeof(memseg.name));
+		if (error == 0 && len != 0) {
+			if (ndoms != 1) {
+				errno = EEXIST;
+				return (-1);
+			}
+			doms[0].size = len;
+			exists = true;
+		}
+	}
+
 	/* Calculate total memory size. */
 	totalsize = 0;
 	for (i = 0; i < ndoms; i++)
@@ -534,26 +561,7 @@ vm_setup_memory_domains(struct vmctx *ctx, enum vm_mmap_style vms,
 		segid = VM_SYSMEM + i;
 		dom = &doms[i];
 
-		/*
-		 * Check if the memory segment already exists.
-		 * If 'ndoms' is greater than one, refuse to proceed if the
-		 * memseg already exists. If only one domain was requested, use
-		 * the existing segment to preserve the behaviour of the previous
-		 * implementation.
-		 *
-		 * Splitting existing memory segments is tedious and
-		 * error-prone, which is why we don't support NUMA
-		 * domains for bhyveload(8)-loaded VMs.
-		 */
-		error = vm_get_memseg(ctx, segid, &len, memseg.name,
-		    sizeof(memseg.name));
-		if (error == 0 && len != 0) {
-			if (ndoms != 1) {
-				errno = EEXIST;
-				return (-1);
-			} else
-				doms[0].size = len;
-		} else {
+		if (!exists) {
 			error = vm_alloc_memseg(ctx, segid, dom->size, NULL,
 			    dom->ds_policy, dom->ds_mask, dom->ds_size);
 			if (error)

From nobody Tue Nov 24 10:13:56 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYdv84HJDz6w2FH
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 10:13:56 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYdv81hVDz4t4x
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 10:13:56 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795515236;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=exX6ikEYiTBEjTeXwnJEsVAgeWJWGB8/cZ8yOXn0dkc=;
	b=p3lTS2KK2rd9HXksvVse0l3vFPZEI0/VysqOQji1u/7/bUq7/xicoWLtNSNyjWdjk1AV6g
	W1lBT9kSn0JEeAid2j536MDsCJto/xwZgCz9dt8aJ4SfFAY2jJzunIvkwTeih1ECHhRT0Z
	WheRNiJLcLldUpjE/lS9R93xMowTzIxfkt8e4knKjM065aMMAlWBeKFGoN7ndhALFJ8cA0
	4+sa2V61CDsg+OFwD5C5ZV0qdpfSbCIrsrsSf9kYQbzUVAdAlK/J5R5Wyyxtd2Mp05Klby
	N0CDSUVTT8H1xFM2ppmL5I7IWaXlQE1EdLiwys4n3YD1v5ZUWZARiF8+Ulf6ow==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795515236;
	b=jQmSSUp5FguJTAVbt3XQhcbB6wRjm1ww4UUEhb/Sj8lrDfP+jMct9Pu26S7rBwAg/C3z95
	zvLpTnoqdLO2PomfMWYf+jq7GkfcXJvtcfyMlqtPB09CeTTA4fywyvqz4CJwqnhRZiE12R
	CXfhN5hIOkYt+t3WKUQzWenPLYlLfROO9Eb5MUZTEMJzUAGXDSP8sDiURQ9Ilau9wOaT42
	qVQeVwAsM3Q3YKa8WXM3Ch67PkdZ3Yj/fmjVx8SGa+bnOFZsndSMwVDHJxmvB5fbCGjOav
	XyTxV97FN3nWlgthlakUheYg/xMLUgOq+4BESutf4HKIXUV+jau9ghUBkrgX7Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795515236;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=exX6ikEYiTBEjTeXwnJEsVAgeWJWGB8/cZ8yOXn0dkc=;
	b=PtV36My7MuK6xMcLzOS/5vAjhqYurTPLTS6BwdiYdOvR8RoFUgm7kqmN8JWBHbV/N/djim
	LKJsfxaiUd1HPKYKRAFDIOKzcAT42pNdClhEUgmnz1ppZ+TkeJmsQt56Btpw+OLkrb6AVi
	F2CR5pYawCierq3/m/uAywDOosk8RYet4tjxpmPEGGBjgKeO7JuBOaYdc2YeR7u0qPk2Pj
	rMh5LtqY3x0i6btv2ZW/ySWJQZcZGTxyn1MuqPFVc7mtqKiwgFE/lY8zTLkQdJVVHKuvt8
	TAWykao63IofrwdtIoNxsIELJSgytWvY0niHSR++G3KoDaIqhGH5DydbaN+rMg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYdv81Llpzb0j
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 10:13:56 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1a37
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 10:13:56 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Rodrigo Osorio <rodrigo@FreeBSD.org>
Subject: git: d5f0768e13f3 - main - acpi_ec: Interpret a relative ECDT's EC_ID as an absolute namepath
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: rodrigo
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: d5f0768e13f396337f01a62598a6b24bbfb84282
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 10:13:56 +0000
Message-Id: <6b056364.1a37.45d670c@gitrepo.freebsd.org>

The branch main has been updated by rodrigo:

URL: https://cgit.FreeBSD.org/src/commit/?id=d5f0768e13f396337f01a62598a6b24bbfb84282

commit d5f0768e13f396337f01a62598a6b24bbfb84282
Author:     Rodrigo Osorio <rodrigo@FreeBSD.org>
AuthorDate: 2026-10-12 14:20:19 +0000
Commit:     Rodrigo Osorio <rodrigo@FreeBSD.org>
CommitDate: 2026-11-24 10:13:11 +0000

    acpi_ec: Interpret a relative ECDT's EC_ID as an absolute namepath
    
    This commit makes the Elan touchpad (ELAN06FA) on the Lenovo Thinkbook
    14 6G attach at boot by resolving the ECDT's relative EC_ID path from
    the namespace root.
    
    The motherboard supports multiple touchpad models (Synaptics, Elan, ...)
    As a result, the firmware defers the selection until runtime:
     - touchpad device _INI method queries the embedded controller (EC),
     - determines the actual model installed
     - writes the correct _HID and I²C slave address
    
    In acpi_ec_ecdt_probe(), the ECDT's EC_ID string is resolved with a NULL
    scope. However ACPICA only accepts absolute paths in this context, while
    the EC_ID provided by this machine's firmware is relative.
    
    Although this is not specification-compliant, this change interprets
    the relative EC_ID as an absolute namepath from the namespace root.
    
    Reviewed By:    olce
    Approved by:    olce
    Differential Revision: https://reviews.freebsd.org/D60648
---
 sys/dev/acpica/acpi_ec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/acpica/acpi_ec.c b/sys/dev/acpica/acpi_ec.c
index 8ee7bc54f304..b98d15d179db 100644
--- a/sys/dev/acpica/acpi_ec.c
+++ b/sys/dev/acpica/acpi_ec.c
@@ -298,7 +298,7 @@ acpi_ec_ecdt_probe(device_t parent)
     }
 
     /* Find and save the ACPI handle for this device. */
-    status = AcpiGetHandle(NULL, ecdt->Id, &h);
+    status = AcpiGetHandle(ACPI_ROOT_OBJECT, ecdt->Id, &h);
     if (ACPI_FAILURE(status)) {
 	device_delete_child(parent, child);
 	printf("%s: can't get handle\n", __func__);

From nobody Tue Nov 24 10:38:26 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYfRQ6xHkz6w4rX
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 10:38:26 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYfRQ6SFbz3Cry
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 10:38:26 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795516706;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=PHNzVwc1k3paRPMtuAqC1DoGwe9dkXIFDlOSF9dM81g=;
	b=dn4/xeuoo71oxbOZXsTaIJEbctMaJL3T/F3CHxAYAyGPR2ENqTGu7wBabxBCG7J6oPGsqQ
	V3bQCqz3W90MgwAae3wycv1EU5c2I2ZxvcIZBxPuu9ppH4Fx28eGfLuM5hq1LSWB3l3hd1
	dAA8Ni7gS0rHZVrkQT1xK1kEErG5guy8Id1l9vXVbOb061Ye6+EPmeHm/y8edmuizMW+Yu
	5FRckeowuwqPDXfOtIhkSkuCiqnqd7ZiscOn/YaH6bllnxWSlm9P9M/pCVhUDyAV6pVSJ8
	jkUgoyiO5T7xDc5lm+r+nAnhFdxVdMPUyzFzLPtiHvVAzJms4wH47AKyCgnmMA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795516706;
	b=L89WvBCTcftEsTCj3deJ/9Tbq/L0akbUYHyzspVbl6Lq0uGrEVOgFOlqa38fddWDGBZO1X
	VFlpYqEcI64i7kpk0Gk8EO7Zh4x+hQTHCFMRUHazRwOsSXP3A+SVAGEX7YjkzkXLN+bAbm
	KxWfJY/gGOe6MJf0xPYN9dFsMKZikMl7CS3ALd+UpVCNW33ZzlKxv5RN09eZ1m7Gb1ayQc
	YFjiBhfYxChpKXSRoSMIfVP2gFK5RkT5M0gMzphd/y47hpIbEIE5GAuGF2Jclnyqeea3Vo
	Ik4mfrOq6Gb3YZrag86VmqWkRfaao4GlDsLvEcthoKHsNorglixROTdDew0kjA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795516706;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=PHNzVwc1k3paRPMtuAqC1DoGwe9dkXIFDlOSF9dM81g=;
	b=W5zy5SDr1KSbBGS6kdluaPjQ1Mf6PPOZz+zdcL8F6dsCHLzNfYz3qSKdETpg/FsnWc8Len
	jHKG1V9bQvoTy/JB1yEtFSzNdPZaywZZxYGN2p4e6rRpWeCzJ27EMFa/72Cgumf/2kHvSi
	XdoZ+DBAoIGjua1rvBUVNY8D2qH/r2Wk5nP1eNHCeUXArbGHaf+YKUQTq8WlmlDC8pirFX
	T2tBVILlSAANkR5EiG8cZn63lRkNixJQeYqnyyJyqOoiP+cBFKc1lySdOGrGOH3pSnlhdI
	VEhr1csBQUYlqAM/T6Mzi44x2kK3EDvF9+UKBS+nNwJI0zjSC9vLPgM70L1PIw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYfRQ5s8RzbYF
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 10:38:26 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 5af2
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 10:38:26 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Michael Tuexen <tuexen@FreeBSD.org>
Subject: git: c8ca5fa512fb - stable/15 - tcp bbr: cleanup
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: c8ca5fa512fbbd04c69438cde86e6e2dd1c4597b
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 10:38:26 +0000
Message-Id: <6b056922.5af2.4cabee74@gitrepo.freebsd.org>

The branch stable/15 has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=c8ca5fa512fbbd04c69438cde86e6e2dd1c4597b

commit c8ca5fa512fbbd04c69438cde86e6e2dd1c4597b
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2026-11-14 17:36:42 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2026-11-24 09:49:34 +0000

    tcp bbr: cleanup
    
    No functional change intended.
    
    Sponsored by:   Netflix, Inc.
    
    (cherry picked from commit 34436bb7cf971dba1c0dcdb1d45f22fff1a4b6c1)
---
 sys/netinet/tcp_stacks/bbr.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c
index 1bd87ad9bc31..dd17cefe1449 100644
--- a/sys/netinet/tcp_stacks/bbr.c
+++ b/sys/netinet/tcp_stacks/bbr.c
@@ -4902,8 +4902,7 @@ bbr_remxt_tmr(struct tcpcb *tp)
 				 * With this option, we will rack out
 				 * in 1ms increments the rest of the packets.
 				 */
-				rsm->r_flags |= BBR_SACK_PASSED | BBR_MARKED_LOST;
-				rsm->r_flags &= ~BBR_WAS_SACKPASS;
+				rsm->r_flags |= BBR_SACK_PASSED;
 			} else {
 				/*
 				 * With this option we only mark them lost
@@ -4912,10 +4911,10 @@ bbr_remxt_tmr(struct tcpcb *tp)
 				 * us to eventually send more based on what
 				 * ack's come in.
 				 */
-				rsm->r_flags |= BBR_MARKED_LOST;
-				rsm->r_flags &= ~BBR_WAS_SACKPASS;
 				rsm->r_flags &= ~BBR_SACK_PASSED;
 			}
+			rsm->r_flags |= BBR_MARKED_LOST;
+			rsm->r_flags &= ~BBR_WAS_SACKPASS;
 		}
 		trsm = rsm;
 	}

From nobody Tue Nov 24 10:43:01 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYfXj4lqqz6w5rL
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 10:43: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYfXj3z7qz3Dsf
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 10:43:01 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795516981;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=+X8VUybOxvXNG6QNVNjfE2lnHwC00BjneEwtJqUVmeI=;
	b=f68njYCX6jrv4UdBhq6nF9+GZ7Fwwtnzl85a5sE68UdJXMJ3nEQrG9WLlBeCoUsi7TcMm5
	GRfh1SBAqzcpnup2eomHeXZYmu+1lFI7rpy8FDT57+Lvz9YwBp/zt/plS1+rm1scnSP1se
	GDqPptEmchmCTfoE+88b2AdxRmutgEu9FXNG8mWGfXpo/54NqwOQzvvIXf9qD0K/+2tf/T
	Fep5n04LkffSwhFNiZm/rPrWl7BQC/BBZCoODzVJkYoSyzqi7nQSXK5+BemkZztXJcqr4z
	1E8zGAJ/20VwyUWQ4DI58x2BojPLwFgfcHRlaSuUbMe5T22re346WbWlf4dB8Q==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795516981;
	b=Z6K7L930g/+yf2EGg7AKQAHT1uLYbSZGz4oQ8LdkYoB1E8aPv52PJNNT5Z7WfMGC6n4nhi
	XkSL/EX/K8f3cRdGWiUcqN73OUk7JwuZwEuWoiRjnJ+B75UuvMhu5VxV8FgxbmSeR5bo/r
	BaCxziE+/A/aMnBYPrY36pwP79G3/NY6FZuPTkHE0CxscSH31l3Ix3J9/Y09EUH+logetc
	AzpGArwcW23LhLORWN5GGjDmfcOl1J9UBX6udXSjTnmdspPqwNa4pUSGWhdWdZZY5tkGrq
	JR9j2bx7t4Y3VyKEe5+ACHkRi4VaL4PA0y7/SV1h2Fn7bSr61GGaPQ+P8n8Mog==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795516981;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=+X8VUybOxvXNG6QNVNjfE2lnHwC00BjneEwtJqUVmeI=;
	b=cTVrvBQiFaUmkR5u8moQgF8b+dS2112fX/ScU9O+mmw2ADeM532RWojH+B6DPwLRUcMkGl
	yLVkHM/22qRn7omcaW9FQ6dLUR82tlgLGWoo1pubNYKqIly90EX4DPUYqkEURbDiIlb83V
	2SMw+FV5tcwZs9tYJ9nOITYFLIdyd46FM5JVaOMCCVjjtTNrt0zoaxNbuYe0usm6u/q8B7
	E6Gj1OhA9aMHfelfWWocczGkncwOp+MOBy6vYPwPRtSuOb81Oe7L1PmpLEDeM3lj0VFcp2
	B718c9TpiX6+BQm7PMHaDFVu5b6R8AxUAtCp/xMLnQMVrzJlPYAH5j5ucZTB/g==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYfXj3f7Mzbyy
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 10:43:01 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 64c6
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 10:43:01 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Michael Tuexen <tuexen@FreeBSD.org>
Subject: git: 158dcb8e415d - stable/15 - tcp bbr: improve invalidating rtt
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: 158dcb8e415d84caf6ebc30841ed4bfc3148bc32
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 10:43:01 +0000
Message-Id: <6b056a35.64c6.2f092eb6@gitrepo.freebsd.org>

The branch stable/15 has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=158dcb8e415d84caf6ebc30841ed4bfc3148bc32

commit 158dcb8e415d84caf6ebc30841ed4bfc3148bc32
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2026-11-15 18:56:25 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2026-11-24 09:54:18 +0000

    tcp bbr: improve invalidating rtt
    
    Invalidate the rtt based on t_rxtshift instead of resetting t_srtt to 0,
    because using the latter also affects the retransmission timeout.
    
    Reviewed by:            Peter Lei
    Sponsored by:           Netflix, Inc.
    Differential Revision:  https://reviews.freebsd.org/D61585
    
    (cherry picked from commit 8018d75601dfe804a8d70f4f08bdb0e4e3a8c5c9)
---
 sys/netinet/tcp_stacks/bbr.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c
index dd17cefe1449..f2ab0a291c5e 100644
--- a/sys/netinet/tcp_stacks/bbr.c
+++ b/sys/netinet/tcp_stacks/bbr.c
@@ -5151,15 +5151,13 @@ bbr_timeout_rxt(struct tcpcb *tp, struct tcp_bbr *bbr, uint32_t cts)
 	 * move the current srtt into rttvar to keep the current retransmit
 	 * times until then.
 	 */
-	if (tp->t_rxtshift > TCP_MAXRXTSHIFT / 4) {
+	if (tp->t_rxtshift > TCP_RTT_INVALIDATE) {
 #ifdef INET6
 		if (bbr->r_is_v6)
 			in6_losing(inp);
 		else
 #endif
 			in_losing(inp);
-		tp->t_rttvar += (tp->t_srtt >> TCP_RTT_SHIFT);
-		tp->t_srtt = 0;
 	}
 	sack_filter_clear(&bbr->r_ctl.bbr_sf, tp->snd_una);
 	tp->snd_recover = tp->snd_max;
@@ -6315,7 +6313,7 @@ tcp_bbr_xmit_timer_commit(struct tcp_bbr *bbr, struct tcpcb *tp, uint32_t cts)
 	}
 	/* Round it up */
 	rtt_ticks = USEC_2_TICKS((rtt + (USECS_IN_MSEC - 1)));
-	if (tp->t_srtt != 0) {
+	if (tp->t_srtt != 0 && tp->t_rxtshift <= TCP_RTT_INVALIDATE) {
 		/*
 		 * srtt is stored as fixed point with 5 bits after the
 		 * binary point (i.e., scaled by 8).  The following magic is

From nobody Tue Nov 24 10:43:43 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYfYW5Rclz6w5d7
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 10:43: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYfYW4pHxz3F1W
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 10:43:43 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795517023;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=v0Sl4ysV0UTbKWvalemx+I22ZZOrcrRYh3qPqCG5hZo=;
	b=nsz4WYCHHnny/GDS+o/9G2z1kNnPyLzVxnFwQSUvSTNtaxYWNqM71qxnmh/Apnu0fhpHVQ
	qmhkQ2DXIGwK/XPfdVUGniC3Ov9T/I4P8dKt2ZqIeTvePQ+Ns08c39NUkBEBow5gE3jblZ
	JxmGUYLk2cxMiFSNmNGt83loUiq8jYysbDxnlaR+gq4G5fMx0pywwbduzsoySICpTnwJE5
	FWe0CqS1fONb8leDpuLWLJFsy48hKHsdMRfDLTG2YqdaTP5ZtkgBF7D84Cxz1U4M8e9OWe
	uqu/Q1Ii3QnOYa3aKJTDs6LP4tdBmUVo5t+tHIBUbgz0+So/7iRbx9FcdgTh5w==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795517023;
	b=ggJEskgraqdexBiwn15aKr+ZBYAbBB2kUwrmtWg4iPHQIMD/ornMzbtP9MYsKbJrLGxV/9
	exqapbv5DNkMQ1WzNE4JZGaIpmJhN56Q616bwXZ0RLKP2kzep2Qnl6dNElr9yLgo4bdb+2
	SAEurnmScfWxz6gO2DAb0OUx3bzeDEtqb5//VKOPNA6l25rZvFLWTXbwHiPMs7jIj8tVLG
	hfQ9mmofS1Asq/ENsz5TdEUAWDPgPPeRRwaU+nWBFipzPFhMcKknffsRAnTIAZbM0JhjHs
	BWdGTsia2RipKhGbxC9cBui8BHPGVOUQJi5vYdwH/e6vD43Smb+uHxa9G6UCtA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795517023;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=v0Sl4ysV0UTbKWvalemx+I22ZZOrcrRYh3qPqCG5hZo=;
	b=CR4/q+FcUrt2GuE3jzoX2Ksjep68JcN526fUWTlijNMafqhxrQAnzH5ewI/zAMpStHOqwC
	+X5V3Hly03wQ3/u4NuvquJMYEmaKrLSxPCReYOq/QYJn3Yeng2LaXRAbjAA6DDsFyCL0sb
	vw1n+SVdj4f8VY9C1e4N0y//r5XdxH+6jE511iqoCDbf5N83XpLJpuXdEAqCtD7Lkp2Rgu
	MkA9nFJ54fppkZcaS1l/b3jJKRRh5GbUVgPEAhLepxY4+dCkXMzZuqDiB4qUO9JqvWPH/D
	j7UMSIxF6B185MS269Q/q3ozEDUB4TQ4A9nllkLYVxKeeCggtoWA2w7ajN0rPA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYfYW4Shszc59
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 10:43:43 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 692b
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 10:43:43 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Michael Tuexen <tuexen@FreeBSD.org>
Subject: git: ccf8e3762c39 - stable/15 - tcp bbr: improve retransmit timout calculation
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: ccf8e3762c3948446263ae3ef0dd98391ef9f97e
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 10:43:43 +0000
Message-Id: <6b056a5f.692b.5d0e67a2@gitrepo.freebsd.org>

The branch stable/15 has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=ccf8e3762c3948446263ae3ef0dd98391ef9f97e

commit ccf8e3762c3948446263ae3ef0dd98391ef9f97e
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2026-11-15 19:04:33 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2026-11-24 09:55:03 +0000

    tcp bbr: improve retransmit timout calculation
    
    The retransmission timeout should the srtt + 4 * rttvar.
    The srtt is using 5 bits of fractions and rttvar is using 4 bits of
    fractions, some specific shifting is required.
    
    Reviewed by:            Peter Lei
    Sponsored by:           Netflix, Inc.
    Differential Revision:  https://reviews.freebsd.org/D61581
    
    (cherry picked from commit 2f98793a13fe3e69cf6b698fa469550b4ba0fea1)
---
 sys/netinet/tcp_stacks/bbr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c
index f2ab0a291c5e..034de828e478 100644
--- a/sys/netinet/tcp_stacks/bbr.c
+++ b/sys/netinet/tcp_stacks/bbr.c
@@ -594,8 +594,7 @@ activate_rxt:
 			if (tp->t_srtt == 0)
 				tov = BBR_INITIAL_RTO;
 			else
-				tov = ((uint64_t)(TICKS_2_USEC(tp->t_srtt) +
-				    ((uint64_t)TICKS_2_USEC(tp->t_rttvar) * (uint64_t)4)) >> TCP_RTT_SHIFT);
+				tov = TICKS_2_USEC(tp->t_srtt + (tp->t_rttvar << (TCP_RTT_SHIFT - TCP_DELTA_SHIFT))) >> TCP_RTT_SHIFT;
 			if (tp->t_rxtshift)
 				tov *= tcp_backoff[tp->t_rxtshift];
 			if (tov > time_since_sent)

From nobody Tue Nov 24 10:45:03 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYfb31hrSz6w5pP
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 10:45:03 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYfb312Lzz3FCb
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 10:45:03 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795517103;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=nEWK36ST3sIL4BBjBbmmZcKV7RWIV3i0Pf6JT7su6NQ=;
	b=yZXB8QTCXwF1TkSKAYvzTxnrwafmfdR7Zw59k93P7fJ6IhfYh20xz/fqyPkArgIHGADDXy
	1lf6ePsdmt2xGft5H/b16hpaud1nG9PVOPKreTvYo8lrsgGeFZScrrl9ChoAgQB1tisn1+
	s0abdXe3j9XuUTCcpltjjG9sPCkpH/01MG5f9qSDuUfqkeHUYzWuUKyufFun9p/RMliKFv
	zmtHNLWqQg6u9g1V7RdzIhmkIOVeVzob8/mvZzgHGXouRtrXJY7lLstdk3Hc8I1IF648z1
	IaAu8zC91WQ9LWi2o00cKLvLKGlDdwn1aSW4NNMG1tKdnoV6zLckjN/2SaBbVQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795517103;
	b=Y7N3eeU3h3+zQoWTntVfdNYSWT0SIAMQ3jbtTkvZIg1Bt6IOHmVLlkr8Yoqn0izpoEO6ii
	RBNRKIGIY3gv/gzWDlX2HT9hzZ9dZe+GJeNvmJ6CmZDYpoyPIXN00KxD/LpkU8fJ2MBVcq
	rVGCKfnCK+Xzq3vwsIszL9DZEk+ZOdaRnVw3/ZmQQhKMeOQtLk/JXn6xc18Zr0nobX8kJP
	QRryW7hg3n8onSQyHsMSc1jCD+c/6K+42xFt57DcS9O/CzhxOdw+NmcUT0zUsQkjdPzNlb
	w1JsNYyTotZbXNQmHKkk0f7uF2ryMSt6v7MpjOzoF4FBq6TQmaygDoeYgkfc0Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795517103;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=nEWK36ST3sIL4BBjBbmmZcKV7RWIV3i0Pf6JT7su6NQ=;
	b=EckrLHgnV9l9Zkwl6vYpc6ObrwqKjxTqRhzOkDKmdolA2mmPArXfM6ptFeDR1762ZTkOAd
	tWFjQCzmcmcSMLLFssWReXdHS9Gaz/+QI8Vbu7UpluXEaEAbaMWtoOL+Uv2hsvYexUDKts
	BAFUpOLl9T/a+ymkXbIEWPVAikGJthblmrwXHxH9W7qWTuYYKbTTe95A5vqv8P2Hnr/8Kp
	QAS8B2AbUiZncDLqsu2Cj3i4FbtH091FLTs6hKxcAwWkPtHX83PcmYYPGWJqAKAFDWKuB5
	C0BgU77WakiQgDl1xuBoUJUw1Pgn/4lTzaZL7s8F3t7BsIZ77+TbXqGdCubTUQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYfb30hSRzbYs
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 10:45:03 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 668f
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 10:45:03 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Michael Tuexen <tuexen@FreeBSD.org>
Subject: git: 3e74519d5136 - stable/15 - tcp bbr: improve persits timeout computation
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: 3e74519d5136d4eb0fee56148ff30c66607a3eac
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 10:45:03 +0000
Message-Id: <6b056aaf.668f.385fa462@gitrepo.freebsd.org>

The branch stable/15 has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=3e74519d5136d4eb0fee56148ff30c66607a3eac

commit 3e74519d5136d4eb0fee56148ff30c66607a3eac
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2026-11-15 20:21:14 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2026-11-24 09:55:42 +0000

    tcp bbr: improve persits timeout computation
    
    t_srtt and t_rttvar use different lengths of fractions, therefore use
    the appropriate shift value.
    
    Reviewed by:            Peter Lei
    Sponsored by:           Netflix, Inc.
    Differential Revision:  https://reviews.freebsd.org/D61600
    
    (cherry picked from commit 751882926dc0bb1f7a4834c4b5e8d951cee61c7c)
---
 sys/netinet/tcp_stacks/bbr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c
index 034de828e478..9dc560ca5643 100644
--- a/sys/netinet/tcp_stacks/bbr.c
+++ b/sys/netinet/tcp_stacks/bbr.c
@@ -540,7 +540,7 @@ bbr_get_persists_timer_val(struct tcpcb *tp, struct tcp_bbr *bbr)
 		var = 0;
 	} else {
 		srtt = ((uint64_t)TICKS_2_USEC(tp->t_srtt) >> TCP_RTT_SHIFT);
-		var = ((uint64_t)TICKS_2_USEC(tp->t_rttvar) >> TCP_RTT_SHIFT);
+		var = ((uint64_t)TICKS_2_USEC(tp->t_rttvar) >> TCP_RTTVAR_SHIFT);
 	}
 	TCPT_RANGESET_NOSLOP(ret_val, ((srtt + var) * tcp_backoff[tp->t_rxtshift]),
 	    bbr_persist_min, bbr_persist_max);

From nobody Tue Nov 24 10:45:04 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYfb4363Bz6w5c0
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 10:45:04 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYfb41SRzz3FLR
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 10:45:04 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795517104;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=DKAUtDhoZ7oPa7zlu79H3T48qer4Toajzg2o6vpYRbA=;
	b=qwad0emIKqr8uoU3Kxrr3CXCiD+jWIi0nYytRZiaKqOYX/3vynH6ODY/vrgi0qAIGUHNJa
	dUG9OIp0fPE17IU1eo15Lxdd4UofztTGZC6LNka4MNQNMuMA6P3EZ8aM16jmsLcSjGmakl
	aP5Bbbg9O+uNRLa+KoFgavVbX0RNmBIXGh1JMml23x8sbfO26s5Pv47XlTymzBzj127CSm
	8tFkLDzgJYdOICxB9r18BSfqKH8nkiDYxwzOrb7u5bbt6ZiEsgf3WOfMwSdfhCdTWpEsc3
	8FR4598kvbN8L+ezBYBbiWKpO5MAtDfTUtK1rVqpaPwAXwyU2NiLtEy31bU6PA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795517104;
	b=fci+0Q6JrAGD2iciBzAyVbnOUzCGnol2qT/Cq68cOc7Fgeiubdy8xQpF9Q27iP8FCvtoAY
	mtzqaBwAD8TvK6/Ljn5TlR2spe06Ab6vuPvhIVjlxMLiFDCYpBcCc0XwEGaEPMDmsiBTWk
	Ddmmb+ajoBdQcf5WZaWhX3+3k525ihZEhEpuza27kFiBkEJzZIpR11RQbJ+41SXirUh0wP
	opNz62SyJCXnepfjtktrSoZE84GkZZmDXcyi12J6XczvwiNn5sMHPFQLLO0lNO+cXjelGF
	kIFFdAZcW+x2h/g/ZROo28nkCuF/U8zf0BsMtmQrR3dCiZ9omBegPzbHMtbNBQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795517104;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=DKAUtDhoZ7oPa7zlu79H3T48qer4Toajzg2o6vpYRbA=;
	b=fFNziSTap3PCNnbIQl/9vtKCxjfkWk7GcRH4NrM/mIim2fJACmF6dmWpzWlvV4MKs4c8Np
	dp3YXwFv4AP1+70UPoOJvJhAuw3P5eWQ8AuMhr8DXUcmQa3kYlNsEjDCCnt4TRVrrvcDr4
	jCqO5FHpKE3LZcc6J1X6ZstFanUuaMovWjQ7SLEB/ILRlsdSpl54AQFAMYcr7IVl4kz9g2
	an8KMUtLtHlcbYN8SUOLfCdx8aT+wRCOWtl6ZfDWwKmlk+g0xokSwXtxhn3Sy8wv9IJhzU
	7gn1m3ANZ5Lftj64jsZfrnLGH1CC1t2+YaOa/XdzKLx/r2bthviZgSyIff5Nag==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYfb416XJzc5B
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 10:45:04 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 7313
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 10:45:04 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Michael Tuexen <tuexen@FreeBSD.org>
Subject: git: cbd17b66e64e - stable/15 - tcp bbr: improve handling of retransmissions in LAST-ACK
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: cbd17b66e64e9bdf025200c4993b8aeae6a0ebe9
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 10:45:04 +0000
Message-Id: <6b056ab0.7313.413f970d@gitrepo.freebsd.org>

The branch stable/15 has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=cbd17b66e64e9bdf025200c4993b8aeae6a0ebe9

commit cbd17b66e64e9bdf025200c4993b8aeae6a0ebe9
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2026-11-15 21:13:50 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2026-11-24 09:56:21 +0000

    tcp bbr: improve handling of retransmissions in LAST-ACK
    
    When performing a timer based retransmission, clear the
    BBR_RWND_COLLAPSED flag. If it sticks, t_rxtshift is never incremented
    resulting in unlimited retransmissions in the LAST-ACK state.
    
    Reported by:            Illia Vynohradov
    Reviewed by:            Peter Lei
    Sponsored by:           Netflix, Inc.
    Differential Revision:  https://reviews.freebsd.org/D61586
    
    (cherry picked from commit 3c6fd437b1824caeddb5f0d4570d43cf0c999c14)
---
 sys/netinet/tcp_stacks/bbr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c
index 9dc560ca5643..275728d29e8a 100644
--- a/sys/netinet/tcp_stacks/bbr.c
+++ b/sys/netinet/tcp_stacks/bbr.c
@@ -4913,7 +4913,7 @@ bbr_remxt_tmr(struct tcpcb *tp)
 				rsm->r_flags &= ~BBR_SACK_PASSED;
 			}
 			rsm->r_flags |= BBR_MARKED_LOST;
-			rsm->r_flags &= ~BBR_WAS_SACKPASS;
+			rsm->r_flags &= ~(BBR_WAS_SACKPASS | BBR_RWND_COLLAPSED);
 		}
 		trsm = rsm;
 	}

From nobody Tue Nov 24 10:46:13 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYfcP3DGXz6w5rv
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 10:46: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYfcP2Slrz3G1Z
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 10:46:13 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795517173;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=b75ZHFZEjHI7G8maKxut0nEhUVmkOcAs6WzzybAVi4o=;
	b=BcqE3QwyZhK1mY75uu4St0h8CQWhXx+IyxVmQjHDrYqwhizMDw29rIOvlhCmENWaVbxbgT
	EQii+laHPAFyYVyIW06LYTsZh9IVeYZtex472x2euwvvgWo5afRdao/Yx7CtI+sE9wTAHx
	ZNmhaXj4FeqsMASeHkY8Sfk8bYe+0A2G6SZEQExEU/SS7s0OIXow1Ycvj6ERlaL7dGNrKn
	wS3YpIuIIjjNON93zffWOmTVDPCc6C8GVx74QiM1OhPxHJWe2NxyIrJG5WIlvDoBBe+XFS
	BpXb27YvYK51EOpHaVrDQxLB8e9HrCyXZPB0QPaGlWC4l0tFIwS9PJNS8AINzw==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795517173;
	b=yOHBWUbMGU70SRTBgqRhAcvxAO/f/buBX+HVyGXdDWMtiUBKnRTb53coTYgVCYec6jC+uY
	BuA5pS9QVKhSiz/htC8iLWNQ23hBXPwiKhkCu4yedflysYsRMFjvMWYs7uAjHMv4MaEjg9
	Ht49nzMOLAdPTh2wy1Hht685f9PqVt1RxQIgqX6Q6ySB3KkTARlc29RnVhZL9AJ5sqYOUZ
	YyvlLzSTDcaaUQyEv/Hk9QrxVEYhZEc9Eo/boAy696RMZnfvGmDzPQ1m43WKiacdh06mwK
	mRCZLL81zE3U2MXV2s/iMjJiiiyyrGPWiOuNiTso0A2PYadjooG4sez/lC9ZmQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795517173;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=b75ZHFZEjHI7G8maKxut0nEhUVmkOcAs6WzzybAVi4o=;
	b=RC1680mgJiaiFAx0TjoX+0Heg9gju+kOauO0vuOFJFxyP6m8sQ/GqQ4sY5Firn0jlMJNSa
	qpeHQLU7gbQ2so3OF3izQqXjTlfwPnQfCYj4CztaAtOz18fRv+NHkdZcHY3BKYLFA4DJSn
	r1ksCg7fl/yEBGpBTWxfI2ebQi+XQPOFhIa9QP4fVpUt90DAkigui/ybFgYASgsdCVQPoE
	dtTfjnd/f333K1wcbzXnHzoGRX1PqCmsPn3MGof4iAb5S3QWm39Y2wjAVOWtk/6QXGbMYF
	k4fwWPU/RYlz31bJzYJkMKKZ3hj++6bb3wcHwllrStmtsAI827JALVMiEnkvBQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYfcP275RzbYv
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 10:46:13 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 6018
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 10:46:13 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Michael Tuexen <tuexen@FreeBSD.org>
Subject: git: 13357c1ee34f - stable/15 - tcp: improve sender side SWS avoidance
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: 13357c1ee34f9f8655375714c60da8bf4881493a
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 10:46:13 +0000
Message-Id: <6b056af5.6018.3abfd91c@gitrepo.freebsd.org>

The branch stable/15 has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=13357c1ee34f9f8655375714c60da8bf4881493a

commit 13357c1ee34f9f8655375714c60da8bf4881493a
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2026-11-16 17:25:32 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2026-11-24 09:57:01 +0000

    tcp: improve sender side SWS avoidance
    
    When checking for a full sized segment, take all TCP options that will
    be included into account. This fixes a bug which can trigger the
    "sent too much" KASSERT related to limited transmit.
    
    Reported by:            olivier
    Reviewed by:            rscheff, Peter Lei
    Sponsored by:           Netflix, Inc.
    Differential Revision:  https://reviews.freebsd.org/D61605
    
    (cherry picked from commit d174085f9f895ed444bd95120da3eff481a58f1a)
---
 sys/netinet/tcp_output.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index 55a8090cf7e2..fee4aa38f48f 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -587,19 +587,7 @@ after_sack_rexmit:
 	if (len) {
 		if (len >= tp->t_maxseg)
 			goto send;
-		/*
-		 * As the TCP header options are now
-		 * considered when setting up the initial
-		 * window, we would not send the last segment
-		 * if we skip considering the option length here.
-		 * Note: this may not work when tcp headers change
-		 * very dynamically in the future.
-		 */
-		if ((((tp->t_flags & TF_SIGNATURE) ?
-			PADTCPOLEN(TCPOLEN_SIGNATURE) : 0) +
-		    ((tp->t_flags & TF_RCVD_TSTMP) ?
-			PADTCPOLEN(TCPOLEN_TIMESTAMP) : 0) +
-		    len) >= tp->t_maxseg)
+		if (len >= tcp_maxseg(tp))
 			goto send;
 		/*
 		 * NOTE! on localhost connections an 'ack' from the remote

From nobody Tue Nov 24 10:52:55 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYfm80L4Hz6w6XH
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 10:52: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYfm76lmPz3Jvq
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 10:52:55 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795517576;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=/UFVHo5p+uQqGAkroafrXLPJg2Qv1kOhiLW/vR18xTM=;
	b=w7w649wgpIDGuG3VHUHeG5JhSfzyCKzr6PK9aW6phU2CxLF03lrk82dKTb2IELVlQ4OCEG
	aZrnUxP4/QhLVMHXfLMjAgYFAXItM6kbWL+XiCPsHZANFcaxMgdyg8zCNrjdpGbUdikgDy
	q+q2noDdz2F6JVR/fKXF28UfOpAg5ryefa7zfs61gQ/8b7p9YH/dSDjk5c1urNQSrt1xeE
	uxHXUKN1orqkaZXM0bUuNrp+4lXqw54833bmc09lpIrE/hpc+apTxJEOh/s08JDte7Ch8G
	ejq9rrmv6koFJVgBqQqBUg0qx8r2bSpKi8KTCpofa3ZYaBrTmJizqqnk1c+XKA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795517575;
	b=qO7pwzGbMq+XbMENf/Xfb7on2tjiI1wflLxQVadxSNXfDIN5MhT23nc1TDcGyY8mMriMEW
	HicnnpwCL27fIgtoG0g61IWiwKPz+Kua7TNvkm+yIFq/z+raBaTTLuv71cMlXB9uYQJpdr
	f8X5wr/aNhofZg2LLVliM//WesQz65NmeWEU3hqf2nSZKL7qFSUMduGOM9FPRTuD67ITLy
	bKIHAXLacNTSiToJxnXI0JFyQtcxJoANiPeGAjSt6gg4HdUn56sctfaDFc9DbiAuSuQRmm
	NzfybdLV6EB4LWKLflW78tUgBM+lGBsUFGjmpDeqEFvQHiTEdI8+qROkE6OCQw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795517575;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=/UFVHo5p+uQqGAkroafrXLPJg2Qv1kOhiLW/vR18xTM=;
	b=bZD/8MxsoX6Uuucnr3oqccSlkK8eQG0zfS9GfOazTPrGfUgjbBTmvs14A3VrE9fI6dVxJV
	PNzNr3+SzPFvFojUONxjuAwaBkjTQ+MvvoMpDnixwQ9dmjmUsUeHzDz3LjAl5iRC97PRD+
	99hhNsKwylF3W+30dAl//3sb6aVqt/m0t7oLlnDefzAiWuSUPJ0yF9A61TMhFDqJMzYPmy
	bEkHvqIDPw/6unNnrnSsC6LIluSNz1ckNxVrRQnogfLUhgKnNQKPR9jrXFGjSEBTVRM/do
	DVdJS1DO4Uwx4EyTBW2fz4A1zrxfvCHWorhdr3eOg0MOgMBK4h6nEwQoSeeNOA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYfm76PxMzcLG
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 10:52:55 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 6046
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 10:52:55 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Michael Tuexen <tuexen@FreeBSD.org>
Subject: git: a170546cb8d1 - stable/15 - tcp: make ghost ACK handling more conformant
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: a170546cb8d13a67ee3062114228d3df4744bbee
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 10:52:55 +0000
Message-Id: <6b056c87.6046.5f82c6ba@gitrepo.freebsd.org>

The branch stable/15 has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=a170546cb8d13a67ee3062114228d3df4744bbee

commit a170546cb8d13a67ee3062114228d3df4744bbee
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2026-07-23 16:03:39 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2026-11-24 10:03:00 +0000

    tcp: make ghost ACK handling more conformant
    
    The latest version of draft-ietf-tcpm-tcp-ghost-acks changed
    a condition. This should make no substantial difference, but makei
    it compliant to the latest version of the specification.
    
    Reviewed by:            rscheff, Peter Lei
    Sponsored by:           Netflix, Inc.
    Differential Revision:  https://reviews.freebsd.org/D58411
    
    (cherry picked from commit fa2ad70a4511e7b379e81de82c9e51b2e0994295)
---
 sys/netinet/tcp_input.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 03c9117891e8..0085a3cd1939 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -2439,7 +2439,7 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th,
 	/*
 	 * Ack processing.
 	 */
-	if (SEQ_GEQ(tp->snd_una, tp->iss + (TCP_MAXWIN << tp->snd_scale))) {
+	if (SEQ_GT(tp->snd_una, tp->iss + (TCP_MAXWIN << tp->snd_scale))) {
 		/* Checking SEG.ACK against ISS is definitely redundant. */
 		tp->t_flags2 |= TF2_NO_ISS_CHECK;
 	}

From nobody Tue Nov 24 10:54:59 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYfpW586Vz6w6pQ
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 10:54: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYfpW4dYzz3Jrb
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 10:54:59 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795517699;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Zs2pZzCqX5WoSwB89+lhn+XuMq2RAnTLOE9Tsnn1ydE=;
	b=Qs+0rR/r3P2gYuW/ekG//qSLGL9WmXXoiqg8YAarIVr4rJK5X2RcHr0tqyCohvsx/pqikC
	CBGlLRUZ2lZZscaEvaPaOmhlYjVSR+6au0/LLy9sSPsDaDGpCUXFOeU0Hho18gIKpKb7f6
	ZvDHy+jHZnG88ckp80HQ4XuxqWf81Ks7c/jSKcGcGKCMDau0fgfQEnPd3yur5pLhmH7dRc
	hIGiOjCllRaAL/JEXXg5nQalmL3LiHh1S31FbVEmw0gIuSwzuIz29G7fp917FOwgB1VJLe
	2Liyn5D3S6NrNVsMsX8/o3laqOTUg+tOKpDmYgSYfBrggDw/LHgB4bHev5tjJA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795517699;
	b=UrYeU18WowZWMCCyQiExj7b+9E4kucX14UaV6q3LI2ESZonnnQyxDNWZ7Nhm9wbucs+tw6
	6qKWgX1LqRy+XYfGpLV2sfjcCMfuBUGl7M7cCim16OKVwzmniJPv+cmi/6Rgs7sr8YtYXn
	7K9dGuRuACJ17M1rRfN2Zwcn/nAZfeCzbmCwUuPAWcQ1qU71g7kKTdlEX8wj0ONuQuhWZW
	1ynmVE3HfXIQAPbMitMNBJ6IrjVR12J1dMQq/6IfdzSptggSvR7NFABF/xXFbliUdrK4xJ
	EIvNOiRi8px2V7trx3eCGoe1ogPHHoJJRJwHggpQZwU2emHr1/klBQnSnP2zBg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795517699;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Zs2pZzCqX5WoSwB89+lhn+XuMq2RAnTLOE9Tsnn1ydE=;
	b=uXLHnKvdvjly4cr2ozGj4kuJKlOB9wHjnijN4q56G3zSEWwTHVlhycuYJdMt9LU8dGoLis
	FSOUrn5zJ0hjrnlceezmZ/gA2O+L6xsck/i3i3GaMUp7LuePf+Dag5ibTB7XC6g6KEph7p
	UXjbTxw93eNgtmF0mEAA2eUyONDYfEZbfRNcw6rhq/V9m9ufMGpANXN7mtQfADSKfMnHA9
	C526HbcUioCbk+DVUebtzR1GbpCc5aMbfQp4Xm5VX79qPZ+hG6ExhEpeEppXFbY3TuU5mv
	OYma28KZ9rxsaz12QyOqJr1+sg8Apuz+5Y2M4f2wzzVBGXtNhNcjlANI6eHiDQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYfpW4J7tzc0k
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 10:54:59 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 69c3
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 10:54:59 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Michael Tuexen <tuexen@FreeBSD.org>
Subject: git: 73929d1dc3b4 - stable/15 - tcp: improve consistency
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: 73929d1dc3b4116ca12cc3fe08fa3a9b66bf3318
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 10:54:59 +0000
Message-Id: <6b056d03.69c3.236776a8@gitrepo.freebsd.org>

The branch stable/15 has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=73929d1dc3b4116ca12cc3fe08fa3a9b66bf3318

commit 73929d1dc3b4116ca12cc3fe08fa3a9b66bf3318
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2026-11-17 19:42:36 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2026-11-24 10:05:02 +0000

    tcp: improve consistency
    
    Use an inline function tcp_adapt_iss_check() to perform the check
    consistently instead of replicating the code multiple times. These
    checks already became inconsistent.
    A fix for PR 298560 requires more calls to tcp_adapt_iss_check().
    
    Reviewed by:            Peter Lei
    Fixes:                  fa2ad70a4511 ("tcp: make ghost ACK handling more conformant")
    Sponsored by:           Netflix, Inc.
    Differential Revision:  https://reviews.freebsd.org/D61685
    
    (cherry picked from commit e3483dbc91b59b5b2c73a4bc792fbb834c3dc111)
---
 sys/netinet/tcp_input.c       |  5 +----
 sys/netinet/tcp_stacks/bbr.c  |  5 +----
 sys/netinet/tcp_stacks/rack.c |  5 +----
 sys/netinet/tcp_var.h         | 10 ++++++++++
 4 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 0085a3cd1939..9ce14e3019ca 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -2439,10 +2439,7 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th,
 	/*
 	 * Ack processing.
 	 */
-	if (SEQ_GT(tp->snd_una, tp->iss + (TCP_MAXWIN << tp->snd_scale))) {
-		/* Checking SEG.ACK against ISS is definitely redundant. */
-		tp->t_flags2 |= TF2_NO_ISS_CHECK;
-	}
+	tcp_adapt_iss_check(tp);
 	if (!V_tcp_insecure_ack) {
 		tcp_seq seq_min;
 		bool ghost_ack_check;
diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c
index 275728d29e8a..6e4535a87bb6 100644
--- a/sys/netinet/tcp_stacks/bbr.c
+++ b/sys/netinet/tcp_stacks/bbr.c
@@ -7686,10 +7686,7 @@ bbr_process_ack(struct mbuf *m, struct tcphdr *th, struct socket *so,
 	bbr = (struct tcp_bbr *)tp->t_fb_ptr;
 	lost = bbr->r_ctl.rc_lost;
 	nsegs = max(1, m->m_pkthdr.lro_nsegs);
-	if (SEQ_GEQ(tp->snd_una, tp->iss + (65535 << tp->snd_scale))) {
-		/* Checking SEG.ACK against ISS is definitely redundant. */
-		tp->t_flags2 |= TF2_NO_ISS_CHECK;
-	}
+	tcp_adapt_iss_check(tp);
 	if (!V_tcp_insecure_ack) {
 		tcp_seq seq_min;
 		bool ghost_ack_check;
diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c
index 1a2f6653ab79..503c172f78e5 100644
--- a/sys/netinet/tcp_stacks/rack.c
+++ b/sys/netinet/tcp_stacks/rack.c
@@ -11602,10 +11602,7 @@ rack_process_ack(struct mbuf *m, struct tcphdr *th, struct socket *so,
 	INP_WLOCK_ASSERT(tptoinpcb(tp));
 
 	rack = (struct tcp_rack *)tp->t_fb_ptr;
-	if (SEQ_GEQ(tp->snd_una, tp->iss + (65535 << tp->snd_scale))) {
-		/* Checking SEG.ACK against ISS is definitely redundant. */
-		tp->t_flags2 |= TF2_NO_ISS_CHECK;
-	}
+	tcp_adapt_iss_check(tp);
 	if (!V_tcp_insecure_ack) {
 		tcp_seq seq_min;
 		bool ghost_ack_check;
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h
index bbf11bfafd90..8fa7f077acf9 100644
--- a/sys/netinet/tcp_var.h
+++ b/sys/netinet/tcp_var.h
@@ -34,6 +34,7 @@
 
 #include <netinet/tcp.h>
 #include <netinet/tcp_fsm.h>
+#include <netinet/tcp_seq.h>
 
 #ifdef _KERNEL
 #include <net/vnet.h>
@@ -1619,6 +1620,15 @@ tcp_fields_to_net(struct tcphdr *th)
 	th->th_win = htons(th->th_win);
 	th->th_urp = htons(th->th_urp);
 }
+
+static inline void
+tcp_adapt_iss_check(struct tcpcb *tp)
+{
+	if (SEQ_GT(tp->snd_una, tp->iss + (TCP_MAXWIN << tp->snd_scale))) {
+		/* Checking SEG.ACK against ISS is definitely redundant. */
+		tp->t_flags2 |= TF2_NO_ISS_CHECK;
+	}
+}
 #endif /* _KERNEL */
 
 #endif /* _NETINET_TCP_VAR_H_ */

From nobody Tue Nov 24 12:53:35 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYjRM35Ytz713p6
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 12:53: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYjRM2VyHz4LyG
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 12:53:35 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795524815;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Qz/MjwoRB/5CVyGwWgpouqkDGQdtrJcJkfV/OiE4luA=;
	b=i3/6Tx55jfNkzPrHfnRFpPg8eza+VmCj3ROWfxfP35FlshMuE0clp4nIKM4vYRm6hMOm2x
	lcYyrYcI9u95hqC6n7HL1meqh349ALpmBZSqQy+qoGHi2Vl8CTb9fE7DuzYAQ3D4UHhr+V
	rWulpTZ70fkJXKxhevgPFoJAvrbqrxz63qYrjgiHc9B/FOnA/+RHDUYQZ6t8FhAf46tHpF
	qUlG1n8VbmDZANJOMilwa11SN5xb17retkHin0KCIe+0X+TK/h46zOlrwrvhv86/D6mIkR
	AZ2lpaejfEkxJ/b4n7OveJYMhsX1bkquQeIzHgx5MX/uGfrJ/QU0Z3nN4ihwBg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795524815;
	b=Cpmgt4lomELSwYYE9H5F8ZH84R6v7cPYwLhbWV1TxmgieoYXV0mekv4C7b5XGx2vrjCWIv
	XPg0kb/aviiUfJ5urMYtKDnXNMbgvlIhJFMyKlKrR7f7jztJVOA36WCcSJn2dMyQYqGBys
	w9/oGLkdBwmB9ZnTKRfH1Wkc2KEz6mq/bWp+awRSwlI51M1DCmYdwlqnCHwBbBJkhzM3Ij
	BXhYRa8eNKpR/ZumeO9H3hNxzXzVpqHUKOw2E1S3F9In1/FR5gTgjnlCLY/9aQuVgWi4mi
	k4EqjEmFOcmz/4v++7CUItEip9/dTATLIegdcnyahpTOG4x+7EUUoxa0VdfbvA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795524815;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Qz/MjwoRB/5CVyGwWgpouqkDGQdtrJcJkfV/OiE4luA=;
	b=dK0b6xLyp09nTxQzP/cWLYOzP6iW9olZ8CjHP88DkTahpsr/xJgi2A8aOAzjf8cL8YyHNk
	b/Y7NIWpj171FabJ1xb9x6P6f4Ux48Kqso4V2Fu1pzAivVLOKuvBC0Qfr4GKJuR0kXbMVZ
	cOs2uZdEtmNv6v4/R0pz49mmj1gNU2IYoP8RXYsI5gmL+vvptdNFaFj3xRER9SxEBX7ORK
	GvXf7l4St+ptHUB0EGP1Hr29+4cm83NbGPViTd0Lr+PmRALwBVLcI/Ic7e/+T4EAMeg67/
	r3/GoTbbRGWXsUQ/r+luLYCgMUi1GrrlHc3sm4ON0STsJYNZ0R5BFCuwe8N+PA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYjRM29tmzgk5
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 12:53:35 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 12ccf
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 12:53:35 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Kristof Provost <kp@FreeBSD.org>
Subject: git: ba70b704053f - main - pf: include orig_kif in the mark-and-sweep cleanup mechanism
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: ba70b704053f4a36514344a2cb7003ad11e06c60
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 12:53:35 +0000
Message-Id: <6b0588cf.12ccf.5427b5ed@gitrepo.freebsd.org>

The branch main has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=ba70b704053f4a36514344a2cb7003ad11e06c60

commit ba70b704053f4a36514344a2cb7003ad11e06c60
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2026-11-24 08:40:44 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2026-11-24 10:48:34 +0000

    pf: include orig_kif in the mark-and-sweep cleanup mechanism
    
    As part of the purge process we mark all kifs referenced by states, so
    that at the end of the sweep we know which ones are no longer referenced
    and can be safely cleaned up.
    We forgot to mark the orig_kif, so it was possible for a kif to be
    referenced only by a state's orig_kif field, and if the interface itself
    then went away we might end up freeing the kif while a state still
    referenced it.
    
    Reported by:    llm-postcr
    Fixes:          d0fdf2b28f9b ("pf: Track the original kif for floating states")
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sys/netpfil/pf/pf.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index 77a3eb643eeb..9def49c6052c 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -3252,6 +3252,8 @@ relock:
 					mrm->r->rule_ref |= PFRULE_REFS;
 				if (s->act.rt_kif)
 					pf_kkif_mark(s->act.rt_kif);
+				if (s->orig_kif)
+					pf_kkif_mark(s->orig_kif);
 				count++;
 			}
 			PF_HASHROW_UNLOCK(ih);

From nobody Tue Nov 24 12:53:36 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYjRN5xTRz713VF
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 12:53: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYjRN2ttGz4LyH
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 12: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=1795524816;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=l49iXU0TilYnheEWY0f9hsEe2JUmNu6quo8PRv19cns=;
	b=m+l14zLKNnEM7S8PiCL0RnYMTla3FwPVa0tMsjmrnxuv5upbAQbiJkk+3PQDkAkCEXWP0y
	xxs3TvVQvItCeHyzw1oby9C6NcjklbD4G839QPuNxpVxRtYjbM9UOeA4T+pc3/ALvNsNhW
	yyzs6SZkt6zwWuMVkzq+He1FnOYTg/JDCiV2VzmH7rht+5wtIvmCj1y9RVpDSh2bwjgNzP
	dOv+P805POlXUIlhje5cq+mPCumrFBR8tl6AYghG49M+LjBDh7JNS68Hp13cXzH5CRvPxW
	4Mj1RwLu01D9W4+CfVz4kRTHXCl+qfWipPlz7TQjfq7wrmAMDHlpxyDi9F0+PQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795524816;
	b=d4TecWACcixw+tX1uncQetAJDGjQdCA47J5BNP2oTcKqyeBh4XLqBns3nK/VpvsIkzA05/
	j9f046yJp448tIo4vaSYIMVSTuFkfXF5feIfUrBR//r3VH2hsqoo449DdCMp1IqRNK+DoW
	u5+CCnPzhQKEId8rgKVbsnHaziWy7/gQYXovzg+oPwpCvH3yai0ScZ/pRoFqqBTEISKvCP
	eZuWdd0Rjf7wp10Zlh4FbKW2KPAerlz8VlbubpqZJxgxcNWyu7e0T0yF0RWwzvqitW4bXM
	QkaOcWAqgT7x2u4hqLhEp1h0ZEapB3BqPhUtT+7Tg0APyHyOtHgd4NDhfC/KTg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795524816;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=l49iXU0TilYnheEWY0f9hsEe2JUmNu6quo8PRv19cns=;
	b=GTDpVhrmtWLAVOw8a9wn3KlSZWthAEXQU8c6LykgCVe4t3CzsyTAeoAN0fCAWIHyx00bxW
	kqQVF7kDzkrflUViO8eRoHAmUQGGV5GR9UYOVjQf5khsdzMzZuej7y8NUWhlRWNbvfERJF
	toKYHzWqlT8+vZ3yezRFvmNoddcF/wK/v3Iqmh+SSrQCjW+3N+RsPCafA2mdWHwI2mL+rK
	8YcQ+eoy/nF+ywAzCsHbZVhG7xSm1WwrnzkUfHwoi+yMR5GqASv2NlSQj87tjPXocryR7Z
	XWP9ghrYYJs18r/s4LGfQIkZ5UecRVzIar5YWoNsgWAck4DWUUw/5ZY+SArOdA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYjRN2YPrzgk6
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 12:53:36 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 117ee
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 12:53:36 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Kristof Provost <kp@FreeBSD.org>
Subject: git: 96c545176df7 - main - pf: don't allow any ioctl calls until we're fully initialised
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: 96c545176df7be2c33587fe4a35ac18af40d8dea
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 12:53:36 +0000
Message-Id: <6b0588d0.117ee.50d3df3f@gitrepo.freebsd.org>

The branch main has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=96c545176df7be2c33587fe4a35ac18af40d8dea

commit 96c545176df7be2c33587fe4a35ac18af40d8dea
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2026-11-24 09:58:25 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2026-11-24 10:48:34 +0000

    pf: don't allow any ioctl calls until we're fully initialised
    
    We create the /dev/pf node before we're fully initialised, leaving a
    (very small) gap where ioctl calls could be made before we're ready
    for them.
    
    PR:             301074
    MFC after:      2 weeks
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sys/netpfil/pf/pf_ioctl.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c
index 9d45145f6f63..297be51a58b5 100644
--- a/sys/netpfil/pf/pf_ioctl.c
+++ b/sys/netpfil/pf/pf_ioctl.c
@@ -4173,6 +4173,10 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td
 
 	CURVNET_SET(TD_TO_VNET(td));
 
+	/* Don't allow ioctl calls until we're fully initialised. */
+	if (V_pf_vnet_active == 0)
+		return (EBUSY);
+
 	switch (cmd) {
 #ifdef COMPAT_FREEBSD14
 	case DIOCSTART:

From nobody Tue Nov 24 13:49:23 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYkgm0nRKz7191P
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 13:49: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYkgm0FBKz4T0L
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 13:49:24 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795528164;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=NRkteRTm/Lvrp5goWt5Gxv53TUdLrKTYvT7CKXQEwWE=;
	b=ErLeK0pQw3+B5eNsrGl2yd+0MSu/SAMHsV7l/yuiS0fxwt0tRiSc7F6sJXfObrlJgkGWO2
	+4Oh3F7ftqM0PDcPwc4Um52stsqADCKGCAmDjTTsHJVX0LZASUlBJf0Ahbij1qBdgXJrGK
	qmB05ndUJ5p27m5eUacqJ6uKMHBaIizaeLJZ2ztWSRYS4gLSqpGN01KMQ4P6JbuONkUVwd
	Asa3EsoLkpmOQFl0an5sSprB25rhWHdG7IDuozeyyKbjhdP3YYNoa3K7gaoo7r26iMeGgQ
	rlTrXdnaFr1mGbRMmrPLvmx1fW4y6RZPvRtJGdBjktAqxW96MjJAfhtoXb8IzA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795528164;
	b=CDZWCcoeTwVSl4WIZdAUDWrDEQU9x1Eg2AqD89GyUIvgDDuGLxOTKA1ud8+qqgOl68moa6
	t4gaY4RisljpA6Q/+F80mU6EPXGm6Rp6Q0XqmKKwTwU9Jsmh0hePUdBcQU8mQk22ZN8jCX
	tYf3LGjg+CPI9p8e9vhCVS4pStXI583RcDBrFrmFCZvLjNmkfj2OLvaeYlyNJHH1L5KUUo
	h+pKZNZKAdzOaaxdLko45+JEMlObvHmbCKs+D/X8bYzGuCEZRclO25UEZ3BJLVKH0KgPwo
	9Mpmp417DZWHWa3+H4qjMGymnBuNQKHKDcGv+qSlqNwu28nDTWkf9iiF5aa7yQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795528164;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=NRkteRTm/Lvrp5goWt5Gxv53TUdLrKTYvT7CKXQEwWE=;
	b=pD4KKg+1w8LHCAK77u577GSjMle4pXlES81SosdEEJKoOu0L7nytBPkIkym8uHRZs6/3xi
	qQ31ZexdGDcMFRBYshoQ5Itqz4R8271mVsB3A97+jtiDjDxvMEc7nFONVchrwxUqRgjcg5
	F3+tS66wfxYs7gGEy6i3pFhReeL02YxI01GXKSSiGCXGGgNCIH/8nVuzc9JU4X5oS3QxBe
	VAxO9hp2Jh5m2kOKU8VohZ15XlHf4dTiWJ/TctYVkrSMwNVs5jnZZmwMm6NxOSMaRKkSIN
	vjC9tbbCSQ44fT1lGjcjnz7I94vvbx+V74u5Dl0mxWXrWlZtrt2/l2VcBPbxjQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYkgl71dRzj5b
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 13:49:23 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 19681
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 13:49:23 +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 <des@FreeBSD.org>
Subject: git: 3fe8d7695f17 - main - geom: Restore group operator
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: 3fe8d7695f176a9f8c10c4b8f5ef752bf96e3023
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 13:49:23 +0000
Message-Id: <6b0595e3.19681.302b77f8@gitrepo.freebsd.org>

The branch main has been updated by des:

URL: https://cgit.FreeBSD.org/src/commit/?id=3fe8d7695f176a9f8c10c4b8f5ef752bf96e3023

commit 3fe8d7695f176a9f8c10c4b8f5ef752bf96e3023
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2026-11-20 15:39:21 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2026-11-24 13:49:01 +0000

    geom: Restore group operator
    
    Traditionally, in BSD, the operator group has been intended for backup
    operators and has been granted read-only access to disks and related
    devices.  This includes geom.ctl, because backup operators need to be
    able to dump partition tables.
    
    Unfortunately, the geom.ctl device previously lacked proper access
    control, and anyone with read access to it was able to modify GEOM
    configuration, including modifying or destroying partitions, RAID
    volumes, etc.  As a workaround, the ownership of geom.ctl was changed to
    root:wheel so that only users who presumably already have root
    privileges were able to access it.
    
    Now that access control has been implemented, we can restore the
    original ownership so backup operators can once more dump partition
    tables.
    
    This reverts commit 7d576f1d657fc21f97cedc28cc971621ee2490a7.
---
 sys/geom/geom_ctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/geom/geom_ctl.c b/sys/geom/geom_ctl.c
index 64a56908e0ea..f2b44c5ef2f2 100644
--- a/sys/geom/geom_ctl.c
+++ b/sys/geom/geom_ctl.c
@@ -70,7 +70,7 @@ g_ctl_init(void)
 {
 
 	make_dev_credf(MAKEDEV_ETERNAL, &g_ctl_cdevsw, 0, NULL,
-	    UID_ROOT, GID_WHEEL, 0640, PATH_GEOM_CTL);
+	    UID_ROOT, GID_OPERATOR, 0640, PATH_GEOM_CTL);
 }
 
 /*

From nobody Tue Nov 24 14:19:24 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYlLP3DnFz71D3c
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 14:19: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYlLP0hjyz4WZ5
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 14:19:25 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795529965;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=FzCDevuzKi4vgdrACBR1VydteTu5A0h/OqkBj0xFWNE=;
	b=PCAhosVbgYpm0lqS49Mhohqk4gtPwyv768u+mIspKPnnkij+Qv8XxQ//q3db4bBQTIpr25
	Djx/oZSI3HMCWsF0466zI9LA+ukmPyMOshiBsrq3FDI50Z1U947kyk4dOG3SU0hGEYc1Ky
	3NVJrjg3+ld3v1HQivlbFbEhutC5z3HrRsiMxWbrCouOldB8WTdRliGWqrnMDtdFbO2SFx
	uffdPAP+jJxO4aQNlgaBnw89tP46j5xOz+VstuQUtbM0rEBWo5EzKpeEMNJbZG0dHJ4Qoc
	UUSQnIsjHMomWuIhytcmKzSk5t4+0Yw9kDQzRWvlaS+MYjvrn6GQAraCAHlv+g==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795529965;
	b=uDytrdhG3FfYzdbRWmNntCRnYkXJQwziQ9qIliElIBoIVeMi3E//LJ02VfqU4ToxW29drO
	DWTjLDfv+yjN6ik74aauBKt1Ti58GMedfM+qBODLo2bYmk4kwtixKbku4kp1B4XrV2+/R0
	Mds0p5vMeVkEEKPMPCC3ULLY1xhDokgKL7XhJ7+sf9l11agCU6sqi3cp479iV3N1njizZJ
	0KvQU6r5AeVCB+JIj8GguI71PZ5nc0YcgTroY7snbUSwqKykqIVNrAMzoXshC3HWnhq2BO
	/Xm2G8QBQYsqehF8mu0eoEbBH+hseqxKAKRwvxbgjE1JLx2f/dplNItx/B01+w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795529965;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=FzCDevuzKi4vgdrACBR1VydteTu5A0h/OqkBj0xFWNE=;
	b=JxxwEcPS1Uov5XuILfpH4F7y/yaW0zW4XceRZ8iLpKfX8Qw37F875RVYy4xqeZ5xqhK27R
	Dve8wVULLKJoMPigjdR9kkL7fUcFo1NLzRPbx2wzfsoBC+1NUZ34hikA25c/cKb8xsgO28
	QEl1ojyDFtGvYCwbqJPAF0jnajVzIDHrY4gLnch7qgnASVbhSJCIc7GIE/0SrnlyQcTh8Y
	bIZFQGqbjuDr71v6KuSXUpXg9M8KSZSdRioniq7ESw34Ub4I5YwIhMKI6MJy4Touy6qrw1
	RvaOvAgLbottXjn1RuMGNjl46srJX1SCSAfo1pJWEzQeo11qB+iGxDgwJzPN3w==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYlLN6sPyzjXb
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 14:19:24 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1b620
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 14:19:24 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Olivier Cochard <olivier@FreeBSD.org>
Subject: git: f19206c660fc - main - acpi_spmc: Make Intel device-specific state optional
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: olivier
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: f19206c660fc600b88c02dddda401eec0697965c
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 14:19:24 +0000
Message-Id: <6b059cec.1b620.38af6e3a@gitrepo.freebsd.org>

The branch main has been updated by olivier:

URL: https://cgit.FreeBSD.org/src/commit/?id=f19206c660fc600b88c02dddda401eec0697965c

commit f19206c660fc600b88c02dddda401eec0697965c
Author:     Olivier Cochard <olivier@FreeBSD.org>
AuthorDate: 2026-11-24 12:00:59 +0000
Commit:     Olivier Cochard <olivier@FreeBSD.org>
CommitDate: 2026-11-24 14:10:44 +0000

    acpi_spmc: Make Intel device-specific state optional
    
    The Intel Low Power S0 Idle _DSM specification marks the minimum
    device-specific state of a constraint package as optional, and its own
    example returns {0xFF, 0}.  Requiring three elements rejected such
    constraints, with one boot message each.
    
    Reviewed by:    olce
    Approved by:    olce
    Fixes:          508efe35e577 ("acpi_spmc: Check Intel constraint packages")
    Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/134
---
 sys/dev/acpica/acpi_spmc.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sys/dev/acpica/acpi_spmc.c b/sys/dev/acpica/acpi_spmc.c
index 32456852052c..9a716be3c006 100644
--- a/sys/dev/acpica/acpi_spmc.c
+++ b/sys/dev/acpica/acpi_spmc.c
@@ -691,7 +691,7 @@ acpi_spmc_parse_constraints_intel(struct acpi_spmc_softc *sc, ACPI_OBJECT *objec
 			    "constraint %zu's constraint package.\n", i);
 			goto skip;
 		}
-		if (constraint_package->Package.Count != 3) {
+		if (constraint_package->Package.Count < 2) {
 			device_printf(sc->dev, "Intel: Wrong package length "
 			    "for constraint %zu's constraint package.\n", i);
 			goto skip;
@@ -703,8 +703,10 @@ acpi_spmc_parse_constraints_intel(struct acpi_spmc_softc *sc, ACPI_OBJECT *objec
 		    constraint_package->Package.Elements[0].Integer.Value;
 		constraint->min_d_state =
 		    constraint_package->Package.Elements[1].Integer.Value;
+		/* Optional: Intel Low Power S0 Idle _DSM spec, Table 9. */
 		constraint->min_dev_specific_state =
-		    constraint_package->Package.Elements[2].Integer.Value;
+		    constraint_package->Package.Count > 2 ?
+		    constraint_package->Package.Elements[2].Integer.Value : 0;
 
 		j++;
 		continue;

From nobody Tue Nov 24 15:57:55 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYnX40zMLz71Q95
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 15:57: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYnX35FY8z4l9S
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 15:57:55 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795535875;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=SM27g2jXZ+yZb405Jmd5H/tAlI2tyOGFuw6kfS/dnZc=;
	b=b94Ig/WZ9m61FkaSXrQ/6PtHFmNCCUVML6ERvwvBh+FGfyGc0qpIn2FJ3askqp+8g6/fS5
	/oq/6FSp6IHEJHm0TB0JNwV+jXvlSQabYJfMRo8EXWy/9akQqhOE6q3Cx29oLs59IJ0aBr
	TD/WWT4OUchcYg0UXolbC3+rqXF+gejjFGBL5v3zxO82rEglVBACRRY4V693dXsqdiyMxH
	/hGc1z7Xt6FB+c3Xel/yZ2afryrmZ9wnahS8p/4gVAgC2XmUwSRIx5mgbMuB0ckX26EUS+
	H09Y1xVEvKdzzBKFeCXLDz16e3LqREcJAmLbwhWrOUqpV5CSjpYkg1+W9xXxjw==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795535875;
	b=jqyJfQyjplTBMf7NHf9tU5PCluNeOHkDDYk133CP8Ky2IyHQBIRm94Cj1NZb6f80dWVXpu
	74kk5L8LOcx9XlswWOFVnviNc8KGZdCANwtuJ0h9GomP5IkyyRcAecPwkpbDGs+NiuwMtj
	sY7edppL0vp1OKLpxs1Mkftg6dRgIpeXGVmEZPM5575ZbZbg9baJG8HsOFrf7Y33nQYDgb
	djBnL+HFw9VtW9FOustDTJ0DxCBqcDoJRcv8VgsLPEjTu1jwJDaeVXCuph/r94M2kKz0aB
	cowe0rUwECRxNOe5dtXlIIKNKxKh2VqGgkE73oIj36vg5jvgWoI2/5N+pbyWKA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795535875;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=SM27g2jXZ+yZb405Jmd5H/tAlI2tyOGFuw6kfS/dnZc=;
	b=cjYPLKX44rOFnSJPD8i6I9z0s3pJXd2km3jf1KIXMD7SamZHwnj/o8xkG7xdQlmbnTq5lj
	SuBg5dhZByUBOezn+zfyJ1rT8Usr0uLD+oPdBj+CUh1JCXHYUbDv+5456edYhmXhpa2SIK
	BNxcNuxbycw22QBoXgT1/LfrRt9KDXLPAuy6jXOoVS2q/l53uI+Q5OoLkRrpnNlj1aggCZ
	JZNjaUw0wjJaEyEQYth9Re8zEhRcD/+pg/JNz043muEC6HgEGF8Ylu3i+Fs4FGNGIr2MII
	qYuGQVJ48qXOyI5euIiJNm48vevAWq+1xNmTuRDn4jXUb9w+A0V7h/3MoGS34g==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYnX34wVGzlnL
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 15:57:55 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 6223
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 15:57:55 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Nick Price <nprice@FreeBSD.org>
Subject: git: 70133cdf2d93 - main - iflib: return one vector when falling back to a legacy interrupt
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: nprice
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 70133cdf2d935fba24353ca2be24297dda4868c4
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 15:57:55 +0000
Message-Id: <6b05b403.6223.13ed807d@gitrepo.freebsd.org>

The branch main has been updated by nprice:

URL: https://cgit.FreeBSD.org/src/commit/?id=70133cdf2d935fba24353ca2be24297dda4868c4

commit 70133cdf2d935fba24353ca2be24297dda4868c4
Author:     Nick Price <nprice@FreeBSD.org>
AuthorDate: 2026-11-24 15:57:33 +0000
Commit:     Nick Price <nprice@FreeBSD.org>
CommitDate: 2026-11-24 15:57:38 +0000

    iflib: return one vector when falling back to a legacy interrupt
    
    iflib_msix_init() is documented to "return us the number of supported
    vectors (will be 1 for a legacy interrupt and MSI)", and
    iflib_device_register() relies on that: it treats a return greater than
    one as "MSI-X was set up" and calls IFDI_MSIX_INTR_ASSIGN().
    
    On the legacy fallback the function sets scctx->isc_vectors to 1 but
    returns the raw pci_msi_count() it fetched at the msi: label.
    
    Set vectors to 1 alongside isc_vectors so the return value matches both
    the documented contract and the interrupt mode that was chosen.
    
    Reported by: llm-postcr
    Signed-off-by: Nick Price <nprice@FreeBSD.org>
    Reviewed by:    gallatin
    Differential Revision:  https://reviews.freebsd.org/D61974
---
 sys/net/iflib.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/net/iflib.c b/sys/net/iflib.c
index bae5271d38c2..205d2ff0d63f 100644
--- a/sys/net/iflib.c
+++ b/sys/net/iflib.c
@@ -7382,7 +7382,8 @@ msi:
 		device_printf(dev, "Using an MSI interrupt\n");
 		scctx->isc_intr = IFLIB_INTR_MSI;
 	} else {
-		scctx->isc_vectors = 1;
+		vectors = 1;
+		scctx->isc_vectors = vectors;
 		device_printf(dev, "Using a Legacy interrupt\n");
 		scctx->isc_intr = IFLIB_INTR_LEGACY;
 	}

From nobody Tue Nov 24 16:32:07 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYpHX1GVpz71V5b
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 16:32: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYpHW5mwkz4pws
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 16:32:07 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795537927;
	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=GjXZYnhTQEZDPnO2kJ9zXwQAHe49MwYBy1E1cfdtZh8=;
	b=DX7pMUg7Csihot8+f1DkobVOr7ZGl9HQNuI9s8eAbxOZxyY3eQAckQXsgMtePZpDqG691f
	JYh/TtLxhGmc8p6sGVSZKHzIw1ofrEJ8aNNRxUCoheKnk9XEYtRVGZSZcejDaCvOavkYUW
	ggKYQoL6f2zuuQy4/09Cfyv3ZA2YCjQ1USZkAKVprVngWSBLLkE/DFK2rFWEjoUethQrfD
	dI/ME1GfODgdqJmyq88O/w2WqqCU3IQTcCx3FfGceAbs+s/Yk6Q/2ILqLJSpHmfwnW4kKS
	9peDLNa1XuEgwtvGZvBjOQv47IMcjaFqqKzssrvKIXTbyTQAItrWPTUXXVSz+g==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795537927;
	b=DHZnIM2MbFZLZeuv3yL/W9GqjH5wcrb6rDBT8WDyLsMKrF+emtJckFmWZrfmtWmL7an/ZM
	5rLrY0oVcH5D5oaRYkWlEgNjD3JCI7n2aRPfAjZzFhoDVVNleEh+bavEERTv//K5MKnVz+
	jwWvCJcziibWsmnunKGn/mqV49A65ZLftJ45fwVYwndTiwaq8n6eGzsOHgfBnz8WSxM9X1
	V4Q9JOGYsWmap6hfjnJA2oDQVvl7eLA+MXkBSpyOuGBl0HXUuWx8cPKT8Js6BSJLmZGjSJ
	+1tWvuUGoNJdmvYKmxQZ1rDf4L/viJJeGuVM9gmsXUjVOr9hCRTw/yMf0IuUsA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795537927;
	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=GjXZYnhTQEZDPnO2kJ9zXwQAHe49MwYBy1E1cfdtZh8=;
	b=CK0XkEgAN2xgjAFW3wo2b9ti1FbgT51uwRAv3gcC0JFWsYTdFNIckTcs5l9pUeq7yGQoqs
	8NGzarOYT43t+HWNsgRF1356+k+QnqhRYL/5/sHbibBeQzwRg5uinwbVVHx5iYfPzWpqVb
	Qxogdh5B8CgS4XPjDrG/X5czGIVLaDSL5EjQ57byUag1XX7Mx12XxohSsNqnfWhJkBxBUL
	mKiUaxaMq2hKVAgwdiEEs6rEmSEUXVx1ZfMQLy3Ze9LyuxbYryl3B+V2CPDGLG+5DA9MTo
	5Mq0pSUJerCj34M4IeHEA1Yx5P9R3q1D1rsYKYYBQNk8c3SZHPAFc/EFewypnA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYpHW5S6WznQG
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 16:32:07 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id ca8a
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 16:32:07 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Cc: Sarah Walker <sarah.walker2@arm.com>
From: Andrew Turner <andrew@FreeBSD.org>
Subject: git: 41d1dd6a4ed2 - main - sys/arm64: TTL fixes
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: andrew
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 41d1dd6a4ed2dd441c0f7fb3e0bd646e86559f52
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 16:32:07 +0000
Message-Id: <6b05bc07.ca8a.5b583179@gitrepo.freebsd.org>

The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=41d1dd6a4ed2dd441c0f7fb3e0bd646e86559f52

commit 41d1dd6a4ed2dd441c0f7fb3e0bd646e86559f52
Author:     Sarah Walker <sarah.walker2@arm.com>
AuthorDate: 2026-11-09 12:09:57 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2026-11-24 16:31:39 +0000

    sys/arm64: TTL fixes
    
    Set TTL bits in TLBI_RANGE_FIELDS() regardless of FEAT_TTL; these bits are
    defined by FEAT_TLBIRANGE.
    Set TTL in per-page invalidate path (pmap_s1_invalidate_loop()).
    
    Reported by:    alc
    Reviewed by:    alc
    Sponsored by:   Arm Ltd
    Differential Revision:  https://reviews.freebsd.org/D61390
---
 sys/arm64/arm64/pmap.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c
index e6e53d05fefe..72ed9a1c3726 100644
--- a/sys/arm64/arm64/pmap.c
+++ b/sys/arm64/arm64/pmap.c
@@ -538,8 +538,7 @@ void (*pmap_stage2_invalidate_all)(uint64_t);
 
 #define	TLBI_RANGE_FIELDS(va, va_shift, num, scale, ttl)		\
 	(TLBI_RANGE_TG | ((u_long)(scale) << TLBI_RANGE_SCALE_SHIFT) |	\
-	((u_long)(num) << TLBI_RANGE_NUM_SHIFT) |			\
-	(pmap_ttl_support ? TLBI_RANGE_TTL(ttl) : 0) |			\
+	((u_long)(num) << TLBI_RANGE_NUM_SHIFT) | TLBI_RANGE_TTL(ttl) |	\
 	(((va) >> (va_shift)) & TLBI_RANGE_BADDR_MASK))
 
 static bool __read_frequently pmap_tlbi_range_support = false;
@@ -2230,7 +2229,7 @@ pmap_s1_invalidate_loop(vm_offset_t sva, vm_offset_t eva, vm_offset_t stride,
     int va_shift, vm_offset_t va_mask, uint64_t asid, bool kernel,
     bool final_only, int ttl)
 {
-	uint64_t units;
+	uint64_t r, units;
 	vm_size_t pages;
 	int scale, unit_shift;
 
@@ -2254,12 +2253,13 @@ pmap_s1_invalidate_loop(vm_offset_t sva, vm_offset_t eva, vm_offset_t stride,
 				continue;
 			}
 		}
+		r = asid | TLBI_VA(va);
+		if (pmap_ttl_support)
+			r |= TLBI_VA_TTL(ttl);
 		if (kernel)
-			pmap_s1_invalidate_kernel(asid | TLBI_VA(va),
-			    final_only);
+			pmap_s1_invalidate_kernel(r, final_only);
 		else
-			pmap_s1_invalidate_user(asid | TLBI_VA(va),
-			    final_only);
+			pmap_s1_invalidate_user(r, final_only);
 		va += stride;
 	}
 }

From nobody Tue Nov 24 16:32:08 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYpHY0hLQz71TkY
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 16: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYpHX6SqCz4q05
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 16:32:08 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795537928;
	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=9xC8itcoCSNCPQNQmdqbGGfB63r6InyCBVp8zizWogI=;
	b=ldJ5IfKDsnwXygj+W9vZPyS/vP0dT74YDD4jyIBKtsP7HzJfXgpB+xSlGcVnurC/P00vxL
	WNRkn/3gvXoMZBZQSQyK2RKdL6nN31d0VJj4tlBzrcdipZdqnHUJ8kHZj0AfN5kBjfzqVR
	PA5nLiF5OkWMKIe5ONGp0iYVZndJyOXeKFC4omnpczAWuzbM+JRmMaPkrJrYSeUtmVk13X
	aEyf4N/11j857nEHVRhiRD2iDp0lO/B2DU5UEw7jH+qvqa0iCJDZMBRRPEmh86woQt4A9K
	/gQamFpX9m6mEO91DRQT1mdGAI5jwLtVo0BQM3wV6UXcQ6B43tp1J35N6AXzkw==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795537928;
	b=ahDwSllqfQiklRLb/I5vbMQkC87BoSMScx7+lTweIWcbyNL6riqHrMqQF+wMa1aWGchA2l
	ERwvaKhymrm1B2bm20S6Z0esZPJYeNE4hrK5meQftschkU+ejXgBP1AC0PtdGO5q6/6zlW
	18Zyq8xzqJJuI6f90Nug14DCttlst3nAtDhm+Hs6JvGbWqYYW+6Cw+0fyAtUUr3I/bkYZm
	Ig+TH0NMas1oOfo64H++gzk6gzFthR4ifBAU6pTo/I7JuEtAioQBrLnP5Y6klRxXUa67ru
	xH8Wa32X7IB5Q4kxZqmrFIhPn9keBcPym75+aLF460enYBhVzrB+mI6BneaQMQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795537928;
	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=9xC8itcoCSNCPQNQmdqbGGfB63r6InyCBVp8zizWogI=;
	b=p0Zp/60vkR5Jdr5cl50oV80FL9cBQixB0jelBWL/MFlGA58t5cUCuuXpYeb9i3n2VW7SId
	L9d/MylfZYuX8CPKWaK9QBoDmodjuTVRw89G1homSW/32BizFeuTA24MvYh0JDj8h+CB0b
	whuqY1VW6vebRjgi2ukHeTTsUB/Ezdh8y29tKw9Z6liiT8vSywqbrtB9GBbmjXZ3DdwRQl
	NO95tLySX6UdAVFpg1CPQa2Pt/NBA5jOFHli5RueJXwd1MT2EItV6VHqUyFhT6gGBYllpR
	/50DuMZmrmeqTGACRpTX+bOg1JC96txF1PEm/ljgOYyzfqPH1izBhyiqVMog5w==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYpHX67r0znQK
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 16:32:08 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id a47c
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 16:32:08 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Cc: Sarah Walker <sarah.walker2@arm.com>
From: Andrew Turner <andrew@FreeBSD.org>
Subject: git: 3c52edc8d169 - main - sys/arm64: Add ttl parameter to pmap_invalidate_range()
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: andrew
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 3c52edc8d16959c155ee3a4f5489da511033f8fa
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 16:32:08 +0000
Message-Id: <6b05bc08.a47c.27a3f813@gitrepo.freebsd.org>

The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=3c52edc8d16959c155ee3a4f5489da511033f8fa

commit 3c52edc8d16959c155ee3a4f5489da511033f8fa
Author:     Sarah Walker <sarah.walker2@arm.com>
AuthorDate: 2026-11-09 14:41:27 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2026-11-24 16:31:39 +0000

    sys/arm64: Add ttl parameter to pmap_invalidate_range()
    
    Reviewed by:    alc, andrew
    Sponsored by:   Arm Ltd
    Differential Revision:  https://reviews.freebsd.org/D61391
---
 sys/arm64/arm64/pmap.c | 51 +++++++++++++++++++++++++++++---------------------
 1 file changed, 30 insertions(+), 21 deletions(-)

diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c
index 72ed9a1c3726..0e22db5f0493 100644
--- a/sys/arm64/arm64/pmap.c
+++ b/sys/arm64/arm64/pmap.c
@@ -2303,9 +2303,9 @@ pmap_s1_invalidate_strided(pmap_t pmap, vm_offset_t sva, vm_offset_t eva,
  */
 static __inline void
 pmap_s1_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva,
-    bool final_only)
+    bool final_only, int ttl)
 {
-	pmap_s1_invalidate_strided(pmap, sva, eva, L3_SIZE, final_only, TLBI_TTL_UNKNOWN);
+	pmap_s1_invalidate_strided(pmap, sva, eva, L3_SIZE, final_only, ttl);
 }
 
 static __inline void
@@ -2319,10 +2319,10 @@ pmap_s2_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva,
 
 static __inline void
 pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva,
-    bool final_only)
+    bool final_only, int ttl)
 {
 	if (pmap->pm_stage == PM_STAGE1)
-		pmap_s1_invalidate_range(pmap, sva, eva, final_only);
+		pmap_s1_invalidate_range(pmap, sva, eva, final_only, ttl);
 	else
 		pmap_s2_invalidate_range(pmap, sva, eva, final_only);
 }
@@ -2729,7 +2729,8 @@ pmap_kenter(vm_offset_t sva, vm_size_t size, vm_paddr_t pa, int mode)
 		size -= PAGE_SIZE;
 	}
 	if ((old_l3e & ATTR_DESCR_VALID) != 0)
-		pmap_s1_invalidate_range(kernel_pmap, sva, va, true);
+		pmap_s1_invalidate_range(kernel_pmap, sva, va, true,
+		    TLBI_TTL_L3);
 	else {
 		/*
 		 * Because the old entries were invalid and the new mappings
@@ -2792,10 +2793,11 @@ pmap_kremove_device(vm_offset_t sva, vm_size_t size)
 
 			if (va != sva) {
 				pmap_s1_invalidate_range(kernel_pmap, sva, va,
-				    true);
+				    true, TLBI_TTL_L3);
 			}
 			pmap_clear(ptep);
-			pmap_s1_invalidate_page(kernel_pmap, va, true, TLBI_TTL_L2);
+			pmap_s1_invalidate_page(kernel_pmap, va, true,
+			    TLBI_TTL_L2);
 			PMAP_LOCK(kernel_pmap);
 			pmap_remove_kernel_l2(kernel_pmap, ptep, va);
 			PMAP_UNLOCK(kernel_pmap);
@@ -2830,7 +2832,8 @@ pmap_kremove_device(vm_offset_t sva, vm_size_t size)
 		}
 	}
 	if (va != sva)
-		pmap_s1_invalidate_range(kernel_pmap, sva, va, true);
+		pmap_s1_invalidate_range(kernel_pmap, sva, va, true,
+		    TLBI_TTL_L3);
 }
 
 /*
@@ -2889,7 +2892,7 @@ pmap_qenter(void *sva, vm_page_t *ma, int count)
 	}
 	if ((old_l3e & ATTR_DESCR_VALID) != 0)
 		pmap_s1_invalidate_range(kernel_pmap, (vm_offset_t)sva, va,
-		    true);
+		    true, TLBI_TTL_L3);
 	else {
 		/*
 		 * Because the old entries were invalid and the new mappings
@@ -2923,7 +2926,8 @@ pmap_qremove(void *sva, int count)
 
 		va += PAGE_SIZE;
 	}
-	pmap_s1_invalidate_range(kernel_pmap, (vm_offset_t)sva, va, true);
+	pmap_s1_invalidate_range(kernel_pmap, (vm_offset_t)sva, va, true,
+	    TLBI_TTL_L3);
 }
 
 /***************************************************
@@ -4407,7 +4411,7 @@ pmap_remove_l3c(pmap_t pmap, pt_entry_t *l3p, vm_offset_t va, vm_offset_t *vap,
 				 */
 				if (*vap != va_next) {
 					pmap_invalidate_range(pmap, *vap, va,
-					    true);
+					    true, TLBI_TTL_L3);
 					*vap = va_next;
 				}
 				rw_wunlock(*lockp);
@@ -4468,7 +4472,8 @@ pmap_remove_l3_range(pmap_t pmap, pd_entry_t l2e, vm_offset_t sva,
 		old_l3 = pmap_load(l3);
 		if (!pmap_l3_valid(old_l3)) {
 			if (va != eva) {
-				pmap_invalidate_range(pmap, va, sva, true);
+				pmap_invalidate_range(pmap, va, sva, true,
+				    TLBI_TTL_L3);
 				va = eva;
 			}
 			continue;
@@ -4520,7 +4525,7 @@ pmap_remove_l3_range(pmap_t pmap, pd_entry_t l2e, vm_offset_t sva,
 					 */
 					if (va != eva) {
 						pmap_invalidate_range(pmap, va,
-						    sva, true);
+						    sva, true, TLBI_TTL_L3);
 						va = eva;
 					}
 					rw_wunlock(*lockp);
@@ -4547,7 +4552,7 @@ pmap_remove_l3_range(pmap_t pmap, pd_entry_t l2e, vm_offset_t sva,
 			va = sva;
 	}
 	if (va != eva)
-		pmap_invalidate_range(pmap, va, sva, true);
+		pmap_invalidate_range(pmap, va, sva, true, TLBI_TTL_L3);
 }
 
 static void
@@ -4954,7 +4959,7 @@ pmap_mask_set_locked(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, pt_entry_t m
 				if (va != va_next) {
 					if (invalidate)
 						pmap_s1_invalidate_range(pmap,
-						    va, sva, true);
+						    va, sva, true, TLBI_TTL_L3);
 					va = va_next;
 				}
 				if ((l3 & ATTR_CONTIGUOUS) != 0) {
@@ -5018,7 +5023,8 @@ pmap_mask_set_locked(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, pt_entry_t m
 				va = sva;
 		}
 		if (va != va_next && invalidate)
-			pmap_s1_invalidate_range(pmap, va, sva, true);
+			pmap_s1_invalidate_range(pmap, va, sva, true,
+			    TLBI_TTL_L3);
 	}
 }
 
@@ -5157,7 +5163,8 @@ pmap_update_entry(pmap_t pmap, pd_entry_t *ptep, pd_entry_t newpte,
 	 * We always inline pmap_update_entry() so that constant propagation
 	 * and dead code elimination will specialize the following code.
 	 */
-	pmap_s1_invalidate_range(pmap, va, va + size, final_only);
+	pmap_s1_invalidate_range(pmap, va, va + size, final_only,
+	    TLBI_TTL_UNKNOWN);
 
 	/* Create the new mapping */
 	pmap_store(ptep, newpte);
@@ -5681,7 +5688,7 @@ restart:
 	if ((origpte & ATTR_DESCR_VALID) != 0 &&
 	    ((origpte ^ newpte) & ~ATTR_SW_WIRED) != 0)
 		pmap_invalidate_range(pmap, va, va + (psind == 1 ?
-		    L3C_SIZE : PAGE_SIZE), true);
+		    L3C_SIZE : PAGE_SIZE), true, TLBI_TTL_UNKNOWN);
 	else
 		dsb(ishst);
 
@@ -8388,12 +8395,14 @@ pmap_advise(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, int advice)
 			continue;
 maybe_invlrng:
 			if (va != va_next) {
-				pmap_s1_invalidate_range(pmap, va, sva, true);
+				pmap_s1_invalidate_range(pmap, va, sva,
+				    true, TLBI_TTL_L3);
 				va = va_next;
 			}
 		}
 		if (va != va_next)
-			pmap_s1_invalidate_range(pmap, va, sva, true);
+			pmap_s1_invalidate_range(pmap, va, sva, true,
+			    TLBI_TTL_L3);
 	}
 	PMAP_UNLOCK(pmap);
 }
@@ -9484,7 +9493,7 @@ pmap_demote_l3c(pmap_t pmap, pt_entry_t *l3p, vm_offset_t va)
 	}
 	if ((nbits & ATTR_AF) != 0) {
 		pmap_invalidate_range(pmap, va & ~L3C_OFFSET, (va + L3C_SIZE) &
-		    ~L3C_OFFSET, true);
+		    ~L3C_OFFSET, true, TLBI_TTL_L3);
 	}
 
 	/*

From nobody Tue Nov 24 16:44:21 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYpYd66k7z71W9Q
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 16:44: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYpYd3PRDz4rt5
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 16:44:21 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795538661;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=JaOYJOXBP1chghnif5oKa3aqNjl21tMS2VnbeqBV8wQ=;
	b=uNmZpWg+IW0G6nzrY6TtfLmZIl5S1EfedinqsW2hbhqJZIkrv9e4Jx6OkMcx+MSbczmntX
	6175zJh/2JDYR12ilUXmwzqnVmMZbjuGwzSm9rNzWrQU6bC3JMXuO0SrPu0Z6Ka9oxrbjN
	zPhFxVwtPrjK5iBYgM/Q3NklPKbAGuM799hK00DOEpOPzjTW6S3uB1NKI3ipN7XtuN2nGS
	w52stljOVd5tJrlLzkGiE7Hf0RG4rjEWRCCK5qxK3ukNRKEYEvnH9A3EmmQ3+/F+G/3sY5
	BFea7cZtss0KJJNhkJoZ7bnvsWTMAOMw5QPi9dF3rDA47eOKysNvL735ITHPKA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795538661;
	b=SCRGfBhWw1N2z2v3LXIoJxt+K+iK2Hfd26AsUkTyKygAaRkxl5PMRZNc4wjT2s9wnI5+Dr
	yGwT/4USdI6hSoDw3FKDOmvRAslJMWlnCxdRd6dMMlfu1jkD92ifMfk7jab2iyqJ92YHWy
	YxOs0D+k/FNt2BZoR1o0Me4zSDkp6j5ISm35pSDcJxRPrzuETInu5eUOKSj7bSmMEneYe5
	9FTPymh3aE/X5djeJmFbo3DZ/IxzHEsgwg1FwnisZdUDhmbSvtCjOzIZAju8YlQhN3BsbG
	OY2XvMZuVKIl9NWNin+2Ee9hVp0wFwOUd/FLtq0GyLjyWj77zphSYJQqd50haw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795538661;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=JaOYJOXBP1chghnif5oKa3aqNjl21tMS2VnbeqBV8wQ=;
	b=dXsSt4ovW4dxZOLxDoscTxUlCQRrxO3J6qZetCIIn/v0vEoxJ8VZQAfPOBaWMC4TRWX6IN
	uEieFPwnYpaPIbDlKonZH+FQcbvQ50qUKTgI6L6QewknLQNFulfXp0KHb6eIIAHp+e3deq
	auLUFxFfUhtvZCE1e3m+zRS117oFo0iQ57bEqRsVkPSIRn8lX+adsxvinxtqORfLh8XwHD
	UjTald9qWSCYy3hMs9StzSvpcHPKdZOiyH8u13KvD4+ZGfLwZquEzY++jiKt6Fpdz4sBcI
	pNGGLkfzL3MpBijkH/sQvIYgd98P5ZUZ365V3vN6PEbghuHhPiO5su7RBNhbBQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYpYd2bqjzn8x
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 16:44:21 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id e6d3
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 16:44:21 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Justin Hibbits <jhibbits@FreeBSD.org>
Subject: git: 12751d7e8ea7 - main - lindebugfs: Remove unneeded header
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: 12751d7e8ea76bd6a4a3fedc665ef298a3d2b786
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 16:44:21 +0000
Message-Id: <6b05bee5.e6d3.407dc444@gitrepo.freebsd.org>

The branch main has been updated by jhibbits:

URL: https://cgit.FreeBSD.org/src/commit/?id=12751d7e8ea76bd6a4a3fedc665ef298a3d2b786

commit 12751d7e8ea76bd6a4a3fedc665ef298a3d2b786
Author:     Justin Hibbits <jhibbits@FreeBSD.org>
AuthorDate: 2026-11-22 19:12:33 +0000
Commit:     Justin Hibbits <jhibbits@FreeBSD.org>
CommitDate: 2026-11-24 16:36:25 +0000

    lindebugfs: Remove unneeded header
    
    linux_ioctl.h is not needed in order to build, so remove it.  A future
    change will split linux_ioctl.h into arch-specific headers, and 32-bit
    arm does not have a compat linux so would fail the build, and adding a
    header just to appease lindebugfs would be superfluous, given that it's
    not needed.
---
 sys/compat/lindebugfs/lindebugfs.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sys/compat/lindebugfs/lindebugfs.c b/sys/compat/lindebugfs/lindebugfs.c
index af9e2a24b899..9eb83ff165ea 100644
--- a/sys/compat/lindebugfs/lindebugfs.c
+++ b/sys/compat/lindebugfs/lindebugfs.c
@@ -61,7 +61,6 @@
 
 #include <machine/bus.h>
 
-#include <compat/linux/linux_ioctl.h>
 #include <compat/linux/linux_mib.h>
 #include <compat/linux/linux_util.h>
 #include <fs/pseudofs/pseudofs.h>

From nobody Tue Nov 24 16:44:22 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYpYf3y5Jz71WRL
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 16:44: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYpYf2jqPz4rqM
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 16:44:22 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795538662;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=i+nvcwpDYMLWRED2D/Lath2pJxndxe7RhvWX5g3GJ4A=;
	b=v2gqVFb0iiArgBpbX4yRV6hfNOND1fHFDIKvQxsdUMcyR1z6ftnsIocMVRUAISUPP00Pnd
	szkdm/MVEsZl9haZfmG1mZ7BivXkqA16R2pjfwfinhwXu1za5RBlZy17RuzFHsa4ukROzf
	he8FIFl+oNs5zTjs9hHX9YlCFQ0B3EVn9IXKvagIK+R93wsHlY253H3T/jvIYmxHoTWhlt
	rOHGs38ZiXDzrhs29xi3pJBGP9EDB6Q738AodtcmuGhip+e3KzEXdo5TvgusGKx3H9oo9d
	Rl9/XVEeeYngBYSVPGo3/HN5fUclYLW5Fjm6yf30cp0dyeTlvW+qJhxnIwDsxQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795538662;
	b=wQ14QDIZqJ3hxPCkGIeGRTCk9KOjusOx6FTD7xRcJrecUKNvEYd1QpJD85Vs7KfYSV9kAQ
	0z7ueHcKmZgFE8yWmP6MzMzt1DcCDT63wM36LFLOcf+411qV7rZTelFcllz4iiFrbq2tvd
	wn2gOmF7bdbMHTrGaWAnDQoeU7OWYKHJXUo7eb0C9SmPrbK8kgTp8X6e0VP5dspT99B39V
	ypxlD3FKg+gFiH/OtR11fP/spO6rB6c8qdv0okpZ94PtP/V3W3jxS3yFo6sIU2D3mY4Vdi
	Q9S7+keq9z7CwkKkgQbFEXVLEqk5ZEiEABs8a667/N1b73xL7jU9jdSHGX2PXg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795538662;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=i+nvcwpDYMLWRED2D/Lath2pJxndxe7RhvWX5g3GJ4A=;
	b=WquuDGEk4GTXjZGxrKQKzzplRJyrVNhMDWz97+QBcjZySkl/ZYuGBfYWlcCR8aJSiOc/Cr
	j1ucOKUfM868nY5NR31qyR/bFdXpwujXE+WRl8wUETfsOzEBzMRwQmEVsiXgBzpRFPxJrt
	Cmupd25PKlWvGZ9bDyQNaXSOA8aKQBQiYjq1S3PCVeF5RRbF9TqWOwkgdOXZj5WxrvL0B3
	AiF1nzxM9OqvKDDj9DIdiJF64L7Eg7ChZC+IiX/PlPNdaWzvo3lqdS+/UryL6Fv9lQ75bH
	u7mIFcUOwDllOuwG50i5+lOrLh7+nqGScn1Cj+sQVJe7P51kmotJMfrLRHeVzg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYpYf2MfCzmfv
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 16:44:22 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id c6b2
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 16:44:22 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Justin Hibbits <jhibbits@FreeBSD.org>
Subject: git: 0a005bcc57de - main - linux: Add a LINUX_TODO() macro
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: 0a005bcc57de5b35bc8f0a7111f245b3ca0e9232
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 16:44:22 +0000
Message-Id: <6b05bee6.c6b2.5ce958eb@gitrepo.freebsd.org>

The branch main has been updated by jhibbits:

URL: https://cgit.FreeBSD.org/src/commit/?id=0a005bcc57de5b35bc8f0a7111f245b3ca0e9232

commit 0a005bcc57de5b35bc8f0a7111f245b3ca0e9232
Author:     Justin Hibbits <jhibbits@FreeBSD.org>
AuthorDate: 2026-11-24 15:15:49 +0000
Commit:     Justin Hibbits <jhibbits@FreeBSD.org>
CommitDate: 2026-11-24 16:36:26 +0000

    linux: Add a LINUX_TODO() macro
    
    Unimplemented corners of the Linuxulator are easier to find when they
    announce themselves instead of silently returning.  LINUX_TODO() prints
    a rate-limited message naming the function and what the stub is still
    missing, built on the existing LINUX_RATELIMIT_MSG_OPT1().
    
    Reviewed by:    adrian
    Differential Revision:  https://reviews.freebsd.org/D61329
---
 sys/compat/linux/linux_util.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sys/compat/linux/linux_util.h b/sys/compat/linux/linux_util.h
index 58f7c533d647..5a95d711f7ba 100644
--- a/sys/compat/linux/linux_util.h
+++ b/sys/compat/linux/linux_util.h
@@ -176,4 +176,11 @@ void	translate_vnhook_major_minor(struct vnode *vp, struct stat *sb);
 		}						\
 	} while (0)
 
+/*
+ * Flag a code path left as a stub.  _criteria is a string literal
+ * naming what the stub still needs before it can be removed.
+ */
+#define LINUX_TODO(_criteria)						\
+	LINUX_RATELIMIT_MSG_OPT1("TODO in %s: " _criteria, __func__)
+
 #endif /* ! _LINUX_UTIL_H_ */

From nobody Tue Nov 24 16:44:23 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYpYg4jbQz71W9V
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 16:44:23 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYpYg37pNz4rtD
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 16:44:23 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795538663;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=OUDB959/xqWQRIcPy+idYCXxqAhAAJmpkt/tjWYr0Sk=;
	b=mHUUFX6ro+EA/dkP5Sr7SNmhSxLzPVZ0MAA0xI3qDsQnOQQg0R9pBmtGuBXUXHUIFMiufI
	vc3MnqgoJZnAPFAJ8a0IMSyc/QoEAvg+6YyWEI5yzSbQ6TdhT3XatrGC5mvC6wcQITLTXd
	svJkA6Vt9R6ULK5AK8KXIsm+ZBrjhUGo5WNAsd+2R88sJu2/9N2eH4yNK5j9uUfEG6hHo4
	SF0ICM1V1oFSS+wYbSNxBryALFZTIsn2/pgQwqiRmGOoWOCW6pknr4NnODiUzdVUqZMoVG
	RyK98/iPQf0B6/55VXAwz0mjn7pioBPZ29nS7ByI3xi3mpsjaPF55rdZa18dtQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795538663;
	b=D/sPl4/MVkc0h+dFCjIKkGDlMB75DKalKm3K2S40v4ieI0vUVjMOeDs2oHkUHcteBWY7sj
	1r8RegvjOGhz2hgyUknFjQzE4We2R7YWYyod6sIziSrNu7AfG3thnJtVh+mukag3haJHgO
	83MvSwwmeekRLsJSvDg3bNw4VDgzSkgMTF0QVw8ZsYwoLWhN4WHFmWQZF800wzxjqMaafr
	pGfarDIfHr9LlkLHeHEKWemAffBM80XysHTg+W3xG/6bKHVkOm2UR7jb/QT64yVa1Fstja
	ILjkM1I2dj2QnHVnHa/v38Dlw1CRjr2e01Eyirzuqg+0F7Jlw/033x7TgXHqVg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795538663;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=OUDB959/xqWQRIcPy+idYCXxqAhAAJmpkt/tjWYr0Sk=;
	b=jpxRWJeRUpbCi6jyCE1vzFohOY6fFOXQHwOjZp3Xf6nkV9giincT14ircNqhl4jNEo450i
	HTnU1xw9DG/iNec/sgaTkJ5L9umY8C37Kbp6/barcD/+VQolB0L+MBKMzGkl/kw1OZ7sgH
	sVfotAkRyhddUsLRQnZ6LtGdSADNv6fEyt1ln61tUORJM36pcoc+Qap5B0xndVl1MmBd5Z
	ii+eaYqYiWsTtOQQFy5fKBqzHYGeOm6w7c2Q8HPP0sjMOZPPftG3uEX19hvFhIstjKsT1f
	o6UE62BwtVfJf5YkVogH6N953S44Hrr/pCIQZKA6Rxfs9nX2C45wlLcZefK+oQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYpYg2pBxznRK
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 16:44:23 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id dd61
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 16:44:23 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Justin Hibbits <jhibbits@FreeBSD.org>
Subject: git: b65eaa67bdd5 - main - linux: Move the machine-dependent ioctl bits into per-arch headers
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: b65eaa67bdd5fc624de52894581e2662234f3d2a
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 16:44:23 +0000
Message-Id: <6b05bee7.dd61.679d6dd7@gitrepo.freebsd.org>

The branch main has been updated by jhibbits:

URL: https://cgit.FreeBSD.org/src/commit/?id=b65eaa67bdd5fc624de52894581e2662234f3d2a

commit b65eaa67bdd5fc624de52894581e2662234f3d2a
Author:     Justin Hibbits <jhibbits@FreeBSD.org>
AuthorDate: 2026-11-24 15:16:10 +0000
Commit:     Justin Hibbits <jhibbits@FreeBSD.org>
CommitDate: 2026-11-24 16:40:24 +0000

    linux: Move the machine-dependent ioctl bits into per-arch headers
    
    Move both out of <compat/linux/linux_ioctl.h> and into
    <machine/../linux/linux_ioctl.h> and <machine/../linux/linux_termbits.h>,
    following the lead of linux_emul_md.h.  Every architecture linuxulator
    currently supports uses the asm-generic values, so the new per-arch
    headers either spell out the generic encoding or just include the common
    termbits set, and nothing changes for them.  This is all in preparation
    for powerpc64 linuxulator.
    
    While here, move the termio structures from linux_ioctl.c up to
    linux_ioctl.h, next to the constants that size them.
    
    No functional change intended.
    
    Differential Revision:  https://reviews.freebsd.org/D61330
---
 sys/amd64/linux/linux_ioctl.h     |  15 +++
 sys/amd64/linux/linux_termbits.h  |   7 ++
 sys/arm64/linux/linux_ioctl.h     |  15 +++
 sys/arm64/linux/linux_termbits.h  |   7 ++
 sys/compat/linux/linux_ioctl.c    |  34 -------
 sys/compat/linux/linux_ioctl.h    | 189 ++++++++------------------------------
 sys/compat/linux/linux_termbits.h | 152 ++++++++++++++++++++++++++++++
 sys/i386/linux/linux_ioctl.h      |  15 +++
 sys/i386/linux/linux_termbits.h   |   7 ++
 9 files changed, 256 insertions(+), 185 deletions(-)

diff --git a/sys/amd64/linux/linux_ioctl.h b/sys/amd64/linux/linux_ioctl.h
new file mode 100644
index 000000000000..d465fe14ba6c
--- /dev/null
+++ b/sys/amd64/linux/linux_ioctl.h
@@ -0,0 +1,15 @@
+/*-
+ * Copyright (c) 2026 Justin Hibbits
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#ifndef _MACHINE_LINUX_IOCTL_H_
+#define	_MACHINE_LINUX_IOCTL_H_
+
+#define	LINUX_IOC_VOID		0
+#define	LINUX_IOC_IN		0x40000000
+#define	LINUX_IOC_OUT		0x80000000
+#define	LINUX_IOC_INOUT		(LINUX_IOC_IN|LINUX_IOC_OUT)
+
+#endif /* !_MACHINE_LINUX_IOCTL_H_ */
diff --git a/sys/amd64/linux/linux_termbits.h b/sys/amd64/linux/linux_termbits.h
new file mode 100644
index 000000000000..418b17ad976a
--- /dev/null
+++ b/sys/amd64/linux/linux_termbits.h
@@ -0,0 +1,7 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2025 Justin Hibbits
+ */
+
+#include <compat/linux/linux_termbits.h>
diff --git a/sys/arm64/linux/linux_ioctl.h b/sys/arm64/linux/linux_ioctl.h
new file mode 100644
index 000000000000..d465fe14ba6c
--- /dev/null
+++ b/sys/arm64/linux/linux_ioctl.h
@@ -0,0 +1,15 @@
+/*-
+ * Copyright (c) 2026 Justin Hibbits
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#ifndef _MACHINE_LINUX_IOCTL_H_
+#define	_MACHINE_LINUX_IOCTL_H_
+
+#define	LINUX_IOC_VOID		0
+#define	LINUX_IOC_IN		0x40000000
+#define	LINUX_IOC_OUT		0x80000000
+#define	LINUX_IOC_INOUT		(LINUX_IOC_IN|LINUX_IOC_OUT)
+
+#endif /* !_MACHINE_LINUX_IOCTL_H_ */
diff --git a/sys/arm64/linux/linux_termbits.h b/sys/arm64/linux/linux_termbits.h
new file mode 100644
index 000000000000..418b17ad976a
--- /dev/null
+++ b/sys/arm64/linux/linux_termbits.h
@@ -0,0 +1,7 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2025 Justin Hibbits
+ */
+
+#include <compat/linux/linux_termbits.h>
diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c
index dd261aeca56d..0fab4e2b682b 100644
--- a/sys/compat/linux/linux_ioctl.c
+++ b/sys/compat/linux/linux_ioctl.c
@@ -332,40 +332,6 @@ linux_ioctl_disk(struct thread *td, struct linux_ioctl_args *args)
  * termio related ioctls
  */
 
-struct linux_termio {
-	unsigned short c_iflag;
-	unsigned short c_oflag;
-	unsigned short c_cflag;
-	unsigned short c_lflag;
-	unsigned char c_line;
-	unsigned char c_cc[LINUX_NCC];
-};
-
-struct linux_termios {
-	unsigned int c_iflag;
-	unsigned int c_oflag;
-	unsigned int c_cflag;
-	unsigned int c_lflag;
-	unsigned char c_line;
-	unsigned char c_cc[LINUX_NCCS];
-};
-
-struct linux_termios2 {
-	unsigned int c_iflag;
-	unsigned int c_oflag;
-	unsigned int c_cflag;
-	unsigned int c_lflag;
-	unsigned char c_line;
-	unsigned char c_cc[LINUX_NCCS];
-	unsigned int c_ispeed;
-	unsigned int c_ospeed;
-};
-
-struct linux_winsize {
-	unsigned short ws_row, ws_col;
-	unsigned short ws_xpixel, ws_ypixel;
-};
-
 struct speedtab {
 	int sp_speed;			/* Speed. */
 	int sp_code;			/* Code. */
diff --git a/sys/compat/linux/linux_ioctl.h b/sys/compat/linux/linux_ioctl.h
index 5585f7e866fe..028152f66d07 100644
--- a/sys/compat/linux/linux_ioctl.h
+++ b/sys/compat/linux/linux_ioctl.h
@@ -30,15 +30,11 @@
 #define	_LINUX_IOCTL_H_
 
 /*
- * ioctl
- *
- * XXX comments in Linux' <asm-generic/ioctl.h> indicate these
- * could be arch-dependant...
+ * The ioctl encoding (LINUX_IOC_*) and any ioctl numbers that vary
+ * between Linux architectures live in <machine/../linux/linux_ioctl.h>.
  */
-#define LINUX_IOC_VOID		0
-#define LINUX_IOC_IN		0x40000000
-#define LINUX_IOC_OUT		0x80000000
-#define LINUX_IOC_INOUT		(LINUX_IOC_IN|LINUX_IOC_OUT)
+#include <machine/../linux/linux_ioctl.h>
+#include <machine/../linux/linux_termbits.h>
 
 /*
  * disk
@@ -447,149 +443,6 @@
 #define	LINUX_N_MOUSE		2
 #define	LINUX_N_PPP		3
 
-/* Linux termio c_cc values */
-#define	LINUX_VINTR		0
-#define	LINUX_VQUIT		1
-#define	LINUX_VERASE		2
-#define	LINUX_VKILL		3
-#define	LINUX_VEOF		4
-#define	LINUX_VTIME		5
-#define	LINUX_VMIN		6
-#define	LINUX_VSWTC		7
-#define	LINUX_NCC		8
-
-/* Linux termios c_cc values */
-/* In addition to the termio values */
-#define	LINUX_VSTART		8
-#define	LINUX_VSTOP		9
-#define	LINUX_VSUSP		10
-#define	LINUX_VEOL		11
-#define	LINUX_VREPRINT		12
-#define	LINUX_VDISCARD		13
-#define	LINUX_VWERASE		14
-#define	LINUX_VLNEXT		15
-#define	LINUX_VEOL2		16
-#define	LINUX_VSTATUS		18
-#define	LINUX_NCCS		19
-
-#define	LINUX_POSIX_VDISABLE	'\0'
-
-/* Linux c_iflag masks */
-#define	LINUX_IGNBRK		0x0000001
-#define	LINUX_BRKINT		0x0000002
-#define	LINUX_IGNPAR		0x0000004
-#define	LINUX_PARMRK		0x0000008
-#define	LINUX_INPCK		0x0000010
-#define	LINUX_ISTRIP		0x0000020
-#define	LINUX_INLCR		0x0000040
-#define	LINUX_IGNCR		0x0000080
-#define	LINUX_ICRNL		0x0000100
-
-#define	LINUX_IUCLC		0x0000200
-#define	LINUX_IXON		0x0000400
-#define	LINUX_IXANY		0x0000800
-#define	LINUX_IXOFF		0x0001000
-
-#define	LINUX_IMAXBEL		0x0002000
-#define	LINUX_IUTF8		0x0004000
-
-/* Linux c_oflag masks */
-#define	LINUX_OPOST		0x0000001
-
-#define	LINUX_OLCUC		0x0000002
-#define	LINUX_ONLCR		0x0000004
-
-#define	LINUX_OCRNL		0x0000008
-#define	LINUX_ONOCR		0x0000010
-#define	LINUX_ONLRET		0x0000020
-#define	LINUX_OFILL		0x0000040
-#define	LINUX_OFDEL		0x0000080
-
-#define	LINUX_NLDLY		0x0000100
-#define	LINUX_NL0		0x0000000
-#define	LINUX_NL1		0x0000100
-#define	LINUX_CRDLY		0x0000600
-#define	LINUX_CR0		0x0000000
-#define	LINUX_CR1		0x0000200
-#define	LINUX_CR2		0x0000400
-#define	LINUX_CR3		0x0000600
-#define	LINUX_TABDLY		0x0001800
-#define	LINUX_TAB0		0x0000000
-#define	LINUX_TAB1		0x0000800
-#define	LINUX_TAB2		0x0001000
-#define	LINUX_TAB3		0x0001800
-#define	LINUX_XTABS		0x0001800
-#define	LINUX_BSDLY		0x0002000
-#define	LINUX_BS0		0x0000000
-#define	LINUX_BS1		0x0002000
-#define	LINUX_VTDLY		0x0004000
-#define	LINUX_VT0		0x0000000
-#define	LINUX_VT1		0x0004000
-#define	LINUX_FFDLY		0x0008000
-#define	LINUX_FF0		0x0000000
-#define	LINUX_FF1		0x0008000
-
-#define	LINUX_CBAUD		0x0000100f
-#define	LINUX_CIBAUD		(LINUX_CBAUD << LINUX_IBSHIFT)
-
-#define	LINUX_B0		0x00000000
-#define	LINUX_B50		0x00000001
-#define	LINUX_B75		0x00000002
-#define	LINUX_B110		0x00000003
-#define	LINUX_B134		0x00000004
-#define	LINUX_B150		0x00000005
-#define	LINUX_B200		0x00000006
-#define	LINUX_B300		0x00000007
-#define	LINUX_B600		0x00000008
-#define	LINUX_B1200		0x00000009
-#define	LINUX_B1800		0x0000000a
-#define	LINUX_B2400		0x0000000b
-#define	LINUX_B4800		0x0000000c
-#define	LINUX_B9600		0x0000000d
-#define	LINUX_B19200		0x0000000e
-#define	LINUX_B38400		0x0000000f
-#define	LINUX_EXTA		LINUX_B19200
-#define	LINUX_EXTB		LINUX_B38400
-
-#define	LINUX_CBAUDEX		0x00001000
-#define	LINUX_B57600		0x00001001
-#define	LINUX_B115200		0x00001002
-
-#define	LINUX_CSIZE		0x00000030
-#define	LINUX_CS5		0x00000000
-#define	LINUX_CS6		0x00000010
-#define	LINUX_CS7		0x00000020
-#define	LINUX_CS8		0x00000030
-#define	LINUX_CSTOPB		0x00000040
-#define	LINUX_CREAD		0x00000080
-#define	LINUX_PARENB		0x00000100
-#define	LINUX_PARODD		0x00000200
-#define	LINUX_HUPCL		0x00000400
-#define	LINUX_CLOCAL		0x00000800
-
-#define	LINUX_BOTHER		0x00001000
-
-#define	LINUX_CRTSCTS		0x80000000
-
-#define	LINUX_IBSHIFT		16
-
-/* Linux c_lflag masks */
-#define	LINUX_ISIG		0x00000001
-#define	LINUX_ICANON		0x00000002
-#define	LINUX_XCASE		0x00000004
-#define	LINUX_ECHO		0x00000008
-#define	LINUX_ECHOE		0x00000010
-#define	LINUX_ECHOK		0x00000020
-#define	LINUX_ECHONL		0x00000040
-#define	LINUX_NOFLSH		0x00000080
-#define	LINUX_TOSTOP		0x00000100
-#define	LINUX_ECHOCTL		0x00000200
-#define	LINUX_ECHOPRT		0x00000400
-#define	LINUX_ECHOKE		0x00000800
-#define	LINUX_FLUSHO		0x00001000
-#define	LINUX_PENDIN		0x00002000
-#define	LINUX_IEXTEN		0x00008000
-
 /* serial_struct values for TIOC[GS]SERIAL ioctls */
 #define	LINUX_ASYNC_CLOSING_WAIT_INF  0
 #define	LINUX_ASYNC_CLOSING_WAIT_NONE 65535
@@ -836,6 +689,40 @@
 #define	LINUX_KCOV_DISABLE		0x6365
 #define	LINUX_KCOV_REMOTE_ENABLE	0x6366
 
+struct linux_termio {
+	unsigned short c_iflag;
+	unsigned short c_oflag;
+	unsigned short c_cflag;
+	unsigned short c_lflag;
+	unsigned char c_line;
+	unsigned char c_cc[LINUX_NCC];
+};
+
+struct linux_termios {
+	unsigned int c_iflag;
+	unsigned int c_oflag;
+	unsigned int c_cflag;
+	unsigned int c_lflag;
+	unsigned char c_line;
+	unsigned char c_cc[LINUX_NCCS];
+};
+
+struct linux_termios2 {
+	unsigned int c_iflag;
+	unsigned int c_oflag;
+	unsigned int c_cflag;
+	unsigned int c_lflag;
+	unsigned char c_line;
+	unsigned char c_cc[LINUX_NCCS];
+	unsigned int c_ispeed;
+	unsigned int c_ospeed;
+};
+
+struct linux_winsize {
+	unsigned short ws_row, ws_col;
+	unsigned short ws_xpixel, ws_ypixel;
+};
+
 /*
  * NVMe IOCTLs defined by Linux
  */
diff --git a/sys/compat/linux/linux_termbits.h b/sys/compat/linux/linux_termbits.h
new file mode 100644
index 000000000000..8e3c1c7cf7a1
--- /dev/null
+++ b/sys/compat/linux/linux_termbits.h
@@ -0,0 +1,152 @@
+/*-
+ * Copyright (c) 2025 Justin Hibbits
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#ifndef	_LINUX_TERMBITS_H_
+#define	_LINUX_TERMBITS_H_
+
+/* Linux termio c_cc values */
+#define	LINUX_VINTR		0
+#define	LINUX_VQUIT		1
+#define	LINUX_VERASE		2
+#define	LINUX_VKILL		3
+#define	LINUX_VEOF		4
+#define	LINUX_VTIME		5
+#define	LINUX_VMIN		6
+#define	LINUX_VSWTC		7
+#define	LINUX_NCC		8
+
+/* Linux termios c_cc values */
+/* In addition to the termio values */
+#define	LINUX_VSTART		8
+#define	LINUX_VSTOP		9
+#define	LINUX_VSUSP		10
+#define	LINUX_VEOL		11
+#define	LINUX_VREPRINT		12
+#define	LINUX_VDISCARD		13
+#define	LINUX_VWERASE		14
+#define	LINUX_VLNEXT		15
+#define	LINUX_VEOL2		16
+#define	LINUX_VSTATUS		18
+#define	LINUX_NCCS		19
+
+#define	LINUX_POSIX_VDISABLE	'\0'
+
+/* Linux c_iflag masks */
+#define	LINUX_IGNBRK		0x0000001
+#define	LINUX_BRKINT		0x0000002
+#define	LINUX_IGNPAR		0x0000004
+#define	LINUX_PARMRK		0x0000008
+#define	LINUX_INPCK		0x0000010
+#define	LINUX_ISTRIP		0x0000020
+#define	LINUX_INLCR		0x0000040
+#define	LINUX_IGNCR		0x0000080
+#define	LINUX_ICRNL		0x0000100
+
+#define	LINUX_IUCLC		0x0000200
+#define	LINUX_IXON		0x0000400
+#define	LINUX_IXANY		0x0000800
+#define	LINUX_IXOFF		0x0001000
+
+#define	LINUX_IMAXBEL		0x0002000
+#define	LINUX_IUTF8		0x0004000
+
+/* Linux c_oflag masks */
+#define	LINUX_OPOST		0x0000001
+
+#define	LINUX_OLCUC		0x0000002
+#define	LINUX_ONLCR		0x0000004
+
+#define	LINUX_OCRNL		0x0000008
+#define	LINUX_ONOCR		0x0000010
+#define	LINUX_ONLRET		0x0000020
+#define	LINUX_OFILL		0x0000040
+#define	LINUX_OFDEL		0x0000080
+
+#define	LINUX_NLDLY		0x0000100
+#define	LINUX_NL0		0x0000000
+#define	LINUX_NL1		0x0000100
+#define	LINUX_CRDLY		0x0000600
+#define	LINUX_CR0		0x0000000
+#define	LINUX_CR1		0x0000200
+#define	LINUX_CR2		0x0000400
+#define	LINUX_CR3		0x0000600
+#define	LINUX_TABDLY		0x0001800
+#define	LINUX_TAB0		0x0000000
+#define	LINUX_TAB1		0x0000800
+#define	LINUX_TAB2		0x0001000
+#define	LINUX_TAB3		0x0001800
+#define	LINUX_XTABS		0x0001800
+#define	LINUX_BSDLY		0x0002000
+#define	LINUX_BS0		0x0000000
+#define	LINUX_BS1		0x0002000
+#define	LINUX_VTDLY		0x0004000
+#define	LINUX_VT0		0x0000000
+#define	LINUX_VT1		0x0004000
+#define	LINUX_FFDLY		0x0008000
+#define	LINUX_FF0		0x0000000
+#define	LINUX_FF1		0x0008000
+
+#define	LINUX_CBAUD		0x0000100f
+
+#define	LINUX_B0		0x00000000
+#define	LINUX_B50		0x00000001
+#define	LINUX_B75		0x00000002
+#define	LINUX_B110		0x00000003
+#define	LINUX_B134		0x00000004
+#define	LINUX_B150		0x00000005
+#define	LINUX_B200		0x00000006
+#define	LINUX_B300		0x00000007
+#define	LINUX_B600		0x00000008
+#define	LINUX_B1200		0x00000009
+#define	LINUX_B1800		0x0000000a
+#define	LINUX_B2400		0x0000000b
+#define	LINUX_B4800		0x0000000c
+#define	LINUX_B9600		0x0000000d
+#define	LINUX_B19200		0x0000000e
+#define	LINUX_B38400		0x0000000f
+#define	LINUX_EXTA		LINUX_B19200
+#define	LINUX_EXTB		LINUX_B38400
+
+#define	LINUX_CBAUDEX		0x00001000
+#define	LINUX_B57600		0x00001001
+#define	LINUX_B115200		0x00001002
+
+#define	LINUX_BOTHER		0x00001000
+#define	LINUX_IBSHIFT		16
+#define	LINUX_CIBAUD		(LINUX_CBAUD << LINUX_IBSHIFT)
+
+#define	LINUX_CSIZE		0x00000030
+#define	LINUX_CS5		0x00000000
+#define	LINUX_CS6		0x00000010
+#define	LINUX_CS7		0x00000020
+#define	LINUX_CS8		0x00000030
+#define	LINUX_CSTOPB		0x00000040
+#define	LINUX_CREAD		0x00000080
+#define	LINUX_PARENB		0x00000100
+#define	LINUX_PARODD		0x00000200
+#define	LINUX_HUPCL		0x00000400
+#define	LINUX_CLOCAL		0x00000800
+
+#define	LINUX_CRTSCTS		0x80000000
+
+/* Linux c_lflag masks */
+#define	LINUX_ISIG		0x00000001
+#define	LINUX_ICANON		0x00000002
+#define	LINUX_XCASE		0x00000004
+#define	LINUX_ECHO		0x00000008
+#define	LINUX_ECHOE		0x00000010
+#define	LINUX_ECHOK		0x00000020
+#define	LINUX_ECHONL		0x00000040
+#define	LINUX_NOFLSH		0x00000080
+#define	LINUX_TOSTOP		0x00000100
+#define	LINUX_ECHOCTL		0x00000200
+#define	LINUX_ECHOPRT		0x00000400
+#define	LINUX_ECHOKE		0x00000800
+#define	LINUX_FLUSHO		0x00001000
+#define	LINUX_PENDIN		0x00002000
+#define	LINUX_IEXTEN		0x00008000
+
+#endif	/* _LINUX_TERMBITS_H_ */
diff --git a/sys/i386/linux/linux_ioctl.h b/sys/i386/linux/linux_ioctl.h
new file mode 100644
index 000000000000..d465fe14ba6c
--- /dev/null
+++ b/sys/i386/linux/linux_ioctl.h
@@ -0,0 +1,15 @@
+/*-
+ * Copyright (c) 2026 Justin Hibbits
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#ifndef _MACHINE_LINUX_IOCTL_H_
+#define	_MACHINE_LINUX_IOCTL_H_
+
+#define	LINUX_IOC_VOID		0
+#define	LINUX_IOC_IN		0x40000000
+#define	LINUX_IOC_OUT		0x80000000
+#define	LINUX_IOC_INOUT		(LINUX_IOC_IN|LINUX_IOC_OUT)
+
+#endif /* !_MACHINE_LINUX_IOCTL_H_ */
diff --git a/sys/i386/linux/linux_termbits.h b/sys/i386/linux/linux_termbits.h
new file mode 100644
index 000000000000..418b17ad976a
--- /dev/null
+++ b/sys/i386/linux/linux_termbits.h
@@ -0,0 +1,7 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2025 Justin Hibbits
+ */
+
+#include <compat/linux/linux_termbits.h>

From nobody Tue Nov 24 17:12:01 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYq9Y6lhLz71Z3K
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 17:12: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYq9Y5mvvz3GZd
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 17:12:01 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795540321;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=ZYVQWIf17YfSdSmgU19kAVEBJTxoUGX4uvypwEL/kzE=;
	b=DLlF8Yu0FhSMwGHyC4bubrgzayekRhTP6f4XBp7985M2MVW4qFPj45FGBqiHEWeyPA7OMw
	/Av8ma168OiEZaAp+h8jOww0YNsV4JPp+HrgmmadA9WJqp8fTF1Ga0zoBvf6mMmRGOX36+
	iyuUqz40WUVrqOfceU4EYeEUaznOYZvyZgjczOLqvj5RKvN8IlXhbf8E1GAzT7+dq7zEmY
	KZCYAiqdfI/8P543XCdEXJSb9xJYDT0Ssb5+Sd6j96I+8a9pXrF93kgkYF6nSgDBZB/okt
	986jeDIHkNo4u3uLSDWHHcbch6TonYVNPndoD9M22HNEIe4GWO/gdiOrUGK+iQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795540321;
	b=Y6FSvlA7BSR7dkRm5cZaWiHxn36Xvkqi5hpHOj4o9yPXtlyETxBJ6dRjlfFMn+lmBcQjKQ
	H1DLzDGpAfkqDCDYWmt1pIDitWm7Pff46TUXhex/wsdgC77mixfuW9zhjnpONnYoKauY8y
	9TN/mMqnbdjc02UY/mEWpPTZWpOhjJlUAPbMUD/PEs94J/OltBhkZr3LLuHw9JzqzCjWar
	mhfrz/6AGyt/JnnoXQMHmXKv3sgnc3NdQ63Q1J/L1f4ySn8FoV0JLz5IIgmyqQUmD8ABGo
	dSqp08BG6LfuC8v3+hJp+266JcsK8lSvpIrI7KTM+OgkkqYffefn0bDvciMorA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795540321;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=ZYVQWIf17YfSdSmgU19kAVEBJTxoUGX4uvypwEL/kzE=;
	b=dFzGklSib/H/n0obrW6GyWlRbkizCqS7yP39jlo+blQS34gv0XhtlzxnKVQrvsd/pxfPlY
	I7OXbSdJwtIrxa6HnemuAmXdvApqHSdMGj7hKNNMnVVvJO28fF8TLgbMCQIYhsZpdnqmIZ
	CXL03p6nrX8fqdOx1sP0LkHZn3oz2pWUpDV0VDoPQs+UVs4dCSZ/mlH5kItye8VjG4evZH
	t0e5JUwiwgZ5yZlczLXw/omzlExI2j9/ukkLmswroIdYOPL6FMq0MLfA4KhH9goM740SPN
	tDZX5Fo6selh6QCmZXmMudorCgG5R0041/MWN7UxGA+72bn004OFpNnn/Zr/zA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYq9Y5RjSzpDK
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 17:12:01 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 10d0a
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 17:12:01 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Michael Tuexen <tuexen@FreeBSD.org>
Subject: git: 9e345ca583f7 - main - tcp: improve ISS checking for ghost ACKs
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
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: 9e345ca583f702e7472f836136e766d3346c049d
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 17:12:01 +0000
Message-Id: <6b05c561.10d0a.3d6e2e88@gitrepo.freebsd.org>

The branch main has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=9e345ca583f702e7472f836136e766d3346c049d

commit 9e345ca583f702e7472f836136e766d3346c049d
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2026-11-24 13:45:27 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2026-11-24 13:45:27 +0000

    tcp: improve ISS checking for ghost ACKs
    
    The check in tcp_adapt_iss_check() depends on SND.UNA and therefore
    should be performed whenever SND.UNA is incremented.
    
    PR:                     298560
    Reviewed by:            Peter Lei
    MFC after:              3 days
    MFC to:                 stable/14
    MFC to:                 stable/15
    Sponsored by:           Netflix, Inc.
    Differential Revision:  https://reviews.freebsd.org/D61749
---
 sys/netinet/tcp_input.c       | 3 ++-
 sys/netinet/tcp_stacks/bbr.c  | 3 ++-
 sys/netinet/tcp_stacks/rack.c | 5 ++++-
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 92fd7ae50a50..c5d5b0e25e90 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1853,6 +1853,7 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th,
 				cc_ack_received(tp, th, nsegs, CC_ACK);
 
 				tp->snd_una = th->th_ack;
+				tcp_adapt_iss_check(tp);
 				/*
 				 * Pull snd_wl2 up to prevent seq wrap relative
 				 * to th_ack.
@@ -2424,7 +2425,6 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th,
 	/*
 	 * Ack processing.
 	 */
-	tcp_adapt_iss_check(tp);
 	if (!V_tcp_insecure_ack) {
 		tcp_seq seq_min;
 		bool ghost_ack_check;
@@ -3021,6 +3021,7 @@ process_ACK:
 		    SEQ_LEQ(th->th_ack, tp->snd_recover))
 			tp->snd_recover = th->th_ack - 1;
 		tp->snd_una = th->th_ack;
+		tcp_adapt_iss_check(tp);
 		if (IN_RECOVERY(tp->t_flags) &&
 		    SEQ_GEQ(th->th_ack, tp->snd_recover)) {
 			cc_post_recovery(tp, th);
diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c
index 1a6d59111494..ce3394e06be7 100644
--- a/sys/netinet/tcp_stacks/bbr.c
+++ b/sys/netinet/tcp_stacks/bbr.c
@@ -7681,7 +7681,6 @@ bbr_process_ack(struct mbuf *m, struct tcphdr *th, struct socket *so,
 	bbr = (struct tcp_bbr *)tp->t_fb_ptr;
 	lost = bbr->r_ctl.rc_lost;
 	nsegs = max(1, m->m_pkthdr.lro_nsegs);
-	tcp_adapt_iss_check(tp);
 	if (!V_tcp_insecure_ack) {
 		tcp_seq seq_min;
 		bool ghost_ack_check;
@@ -7801,6 +7800,7 @@ bbr_process_ack(struct mbuf *m, struct tcphdr *th, struct socket *so,
 		bbr_collapse_rtt(tp, bbr, TCP_REXMTVAL(tp));
 	}
 	tp->snd_una = th->th_ack;
+	tcp_adapt_iss_check(tp);
 	bbr_ack_received(tp, bbr, th, acked, sack_changed, prev_acked, __LINE__, (bbr->r_ctl.rc_lost - lost));
 	if (IN_RECOVERY(tp->t_flags)) {
 		if (SEQ_LT(th->th_ack, tp->snd_recover) &&
@@ -8658,6 +8658,7 @@ bbr_fastack(struct mbuf *m, struct tcphdr *th, struct socket *so,
 	if (SEQ_GT(th->th_ack, tp->snd_una))
 		bbr_collapse_rtt(tp, bbr, TCP_REXMTVAL(tp));
 	tp->snd_una = th->th_ack;
+	tcp_adapt_iss_check(tp);
 	if (tp->snd_wnd < ctf_outstanding(tp))
 		/* The peer collapsed its window on us */
 		bbr_collapsed_window(bbr);
diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c
index b4ff35b3acfe..4c000908a0f1 100644
--- a/sys/netinet/tcp_stacks/rack.c
+++ b/sys/netinet/tcp_stacks/rack.c
@@ -11701,7 +11701,6 @@ rack_process_ack(struct mbuf *m, struct tcphdr *th, struct socket *so,
 	INP_WLOCK_ASSERT(tptoinpcb(tp));
 
 	rack = (struct tcp_rack *)tp->t_fb_ptr;
-	tcp_adapt_iss_check(tp);
 	if (!V_tcp_insecure_ack) {
 		tcp_seq seq_min;
 		bool ghost_ack_check;
@@ -11919,6 +11918,7 @@ rack_process_ack(struct mbuf *m, struct tcphdr *th, struct socket *so,
 		ourfinisacked = 1;
 	}
 	tp->snd_una = th->th_ack;
+	tcp_adapt_iss_check(tp);
 	/* wakeups? */
 	if (acked_amount && sbavail(&so->so_snd))
 		rack_adjust_sendmap_head(rack, &so->so_snd);
@@ -12678,6 +12678,7 @@ rack_fastack(struct mbuf *m, struct tcphdr *th, struct socket *so,
 		SOCK_SENDBUF_LOCK(so);
 		mfree = sbcut_locked(&so->so_snd, acked);
 		tp->snd_una = th->th_ack;
+		tcp_adapt_iss_check(tp);
 		/* Note we want to hold the sb lock through the sendmap adjust */
 		rack_adjust_sendmap_head(rack, &so->so_snd);
 		/* Wake up the socket if we have room to write more */
@@ -15963,6 +15964,7 @@ rack_do_compressed_ack_processing(struct tcpcb *tp, struct socket *so, struct mb
 			 * should be).
 			 */
 			tp->snd_una = high_seq;
+			tcp_adapt_iss_check(tp);
 		}
 		/* Did we make a RTO error? */
 		if ((tp->t_flags & TF_PREVVALID) &&
@@ -15997,6 +15999,7 @@ rack_do_compressed_ack_processing(struct tcpcb *tp, struct socket *so, struct mb
 			SOCK_SENDBUF_LOCK(so);
 			mfree = sbcut_locked(&so->so_snd, acked_amount);
 			tp->snd_una = high_seq;
+			tcp_adapt_iss_check(tp);
 			/* Note we want to hold the sb lock through the sendmap adjust */
 			rack_adjust_sendmap_head(rack, &so->so_snd);
 			/* Wake up the socket if we have room to write more */

From nobody Tue Nov 24 17:21:30 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYqNW3w15z71Zw5
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYqNW0GgNz3JQt
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 17:21:31 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795540891;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=yLLyclAMlNLJKFGmPMoQgThSmuM5ezpralaLdJUfZrk=;
	b=iIjt513iL6ruoqavY4biwGLz0k8leQTMgQ6MvHcK0pafBil1kH7PGmmFq3J5v94ENUVhTO
	oNgmhDHceSPLzf2Dd/rCGFZrZEbJFZSfqvRB2lCa7Qg9hk/yT9gEQCpdUBIaWNgAMMRcxs
	ZK+ngCfDwcrH5thwuxOAG0IpNOJJSYCU5LzlMLgn9AMj0QhL5mshSy17yOFvqvant6mgxf
	Hit1ixhBhy6cfxpGVTzDsCNv3+5ll2OSlgFPWGapITJzH5pQCREmi0ZgvgIpNy76VsFSBP
	VufFmZ2csjtvdsbGRgEvLuDBV56bFv+3SkrOfK1wT0yETq2J78FhRtVY140AxA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795540891;
	b=nGPUAAKUdSstSSg3p+mX3q2EXjBAmZlMjRr2WliZJDwYJAhhX0Wc3ofSGpgG5PpXKUrTsd
	vIl0qYVQPV11shFC7kNJl5iYG7Y8GyBfTPBisCvDqP+uBluU6UBO0Mc+tD8Zh8NnrNquck
	rlUdN7UyesFmRdjGP28zqXvu9opW2E8GtPJbG+gWrLqxGNhMl6CDEnJ7nnx/s9QJh0p3SU
	8LwQPxdZ/2GnMlCi7jHqQU8DagUxtaRvfazbQfOfJJVnT0oHy3THxvBxIkMPXc9T86uJPZ
	91goMiNuj0dfkV/6a4xGRy6SWrClZLdOyVDTtUg3yksG4b0ivb9vfRWeDDAYQQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795540891;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=yLLyclAMlNLJKFGmPMoQgThSmuM5ezpralaLdJUfZrk=;
	b=RcRMz3UJN7yEpin/sjEgVCYA4TZSr7Ts/3erEHW44CC3d3WLzzGMeBt9Xu2j4LlrbTZygM
	GoBRKrcg7DUGAnUalBV0yLnZeIDRs8ZSgwfvjzB5d4Zug8GcswBQRU/qOAhEG7ciHKtyQW
	vAL7m11lsDW8UTcvHWOcTiZ0X6kRTTv5i63clAw93ds7Q3yyOWQPbYwy4LkymMj1JRF5xO
	X+OREQADPYfT6rJH87+ffH+EjFPDfwExzuQzgsgPKzVYFJ6WglTdH59boDjR1OAFebQlbL
	XSVGRUYshvAFnKW05RJQMjZLErLblEtBC98BB0Ns29g4alDUgZkb7XSyKw7IVQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYqNV6Q67zpF2
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 17:21:30 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 119c6
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 17:21:30 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Piotr Kubaj <pkubaj@FreeBSD.org>
Subject: git: c411e13ce133 - stable/14 - powerpc: move get_pcpu() to machine/pcpu.h
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: pkubaj
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: c411e13ce133a27ea25aac054d740c938cb9bd11
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 17:21:30 +0000
Message-Id: <6b05c79a.119c6.260a558c@gitrepo.freebsd.org>

The branch stable/14 has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/src/commit/?id=c411e13ce133a27ea25aac054d740c938cb9bd11

commit c411e13ce133a27ea25aac054d740c938cb9bd11
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2026-11-07 21:12:48 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2026-11-24 16:11:11 +0000

    powerpc: move get_pcpu() to machine/pcpu.h
    
    Every other arch defines get_pcpu() in machine/pcpu.h, powerpc has it in
    machine/cpufunc.h, which is entirely under _KERNEL. lsof includes
    sys/systm.h without _KERNEL first on purpose, so on powerpc cpufunc.h
    turns into an empty header and pcpup later expands to a call of an
    undeclared get_pcpu(). Since sys/mount.h started pulling in sys/proc.h
    this breaks the lsof build on powerpc64 and powerpc64le.
    
    Reviewed by:    jhibbits
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D61305
    
    (cherry picked from commit 4b3364a4bceb61c5870f50b75bf56272ca850944)
---
 sys/powerpc/include/cpufunc.h | 10 ----------
 sys/powerpc/include/pcpu.h    | 10 ++++++++++
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/sys/powerpc/include/cpufunc.h b/sys/powerpc/include/cpufunc.h
index 19a7ae01df0c..0754b51df1b9 100644
--- a/sys/powerpc/include/cpufunc.h
+++ b/sys/powerpc/include/cpufunc.h
@@ -246,16 +246,6 @@ intr_restore(register_t msr)
 	mtmsr(msr);
 }
 
-static __inline struct pcpu *
-get_pcpu(void)
-{
-	struct pcpu *ret;
-
-	__asm __volatile("mfsprg %0, 0" : "=r"(ret));
-
-	return (ret);
-}
-
 /* "NOP" operations to signify priorities to the kernel. */
 static __inline void
 nop_prio_vlow(void)
diff --git a/sys/powerpc/include/pcpu.h b/sys/powerpc/include/pcpu.h
index 1e60a78bb204..28edd0f46987 100644
--- a/sys/powerpc/include/pcpu.h
+++ b/sys/powerpc/include/pcpu.h
@@ -145,6 +145,16 @@ struct pvo_entry;
 
 #ifdef _KERNEL
 
+static __inline struct pcpu *
+get_pcpu(void)
+{
+	struct pcpu *ret;
+
+	__asm __volatile("mfsprg %0, 0" : "=r"(ret));
+
+	return (ret);
+}
+
 #define pcpup	(get_pcpu())
 
 static __inline __pure2 struct thread *

From nobody Tue Nov 24 17:21:31 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYqNX3kRPz71bBx
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 17:21: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYqNX0HFjz3JT7
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 17:21:32 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795540892;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=G8NOy+EVA+7soHAuEsAQyuLB3MqXilNopmFCQ67/hE8=;
	b=SF/CyA4zFOqTkGT413ZLiq5ML2vXVIbv73398qKwmiJR9VOuWbNxT2CAMoDxkDB5dPCKYX
	MXePwOfB1wMfUK4dROlygHdKLfeD169UPGa28G/21g7h1p90UUpwlT7+Wml7j5YalS3cXR
	WnBmaJotc7KfOKCXuFLcodSDVkkvUgG4KfpmrIBku884nrTpSlL1kuC2V4pAqYl+bKuBCQ
	YrDM62U21lE38OIUS4sib1HleRT/5gr1DrhU18YReFyX5IhVF076NKnXBJKrMBgfEXJQte
	50LQNcPJOwcTTkU/RsO1GNCeBp/dl8Bf7XqH66frwgnUqonWXvdSfXNoWTdhqg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795540892;
	b=umWxF8RAOAQEDl5tzNokZxXcA8ckWs8y4YxhCpej4fuZZDB9vdPs8Bopw5YmO+MQmHV6LP
	d06Y751Kklk/o05AUYXVx//pAHQfCsI69G1zTI9ZGZYyGQQV4pfFTWnk+aal/bPPqp7fWV
	uzhpcTRO/YXSquU/ANXLSY3MBPUbS8xrHMjm/Iugk3azn1gEpDeK5Wmti0Q1nSWtgflu65
	XIxsM2ywZ/hlYKnpD5iEp3zbN3jQHq801gAdsg0GP/S6gmOT+XU3jdawM8lr5Nk5c0XXwu
	uAws1u3H6ZVkojM2ZA4B/u2zGzg8jaPhE4mVx61JRmSIxRrTw+ljYNKQuT4j9A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795540892;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=G8NOy+EVA+7soHAuEsAQyuLB3MqXilNopmFCQ67/hE8=;
	b=BRt0+KFyFzYNm9sMDaoiq+3TBy0FwcNK/8LdLTGLPLP/qMZAjl82Me1H6HCvFEvNaR1ryZ
	Cw/YwVUyOFZ6W8zzqL8B5FMznt5+Tb4I3Q7jcaDuCa29olM6n1QwE8LtSDvfKxjaVdxVog
	7N0o99+Z5KATrzaA7tBw6cJiNEqC8YWepOWxB/czIG36TO/ODqySyPEfMmK2T5tSX+Bqdr
	2x4UOteazcfn9nMKDE8o72FcAmcEamhzk2DDwX4XXyVO2NoEHtsjNj7emNpKrOlN1L5qmj
	S4XI6iSKp9iuTvPEqfKzZd8LMhF1/F/4JGEtRLIW4CEe5Wr3Eptizsn6D+0SSw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYqNW6m2bzp4l
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 17:21:31 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id f6fb
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 17:21:31 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Piotr Kubaj <pkubaj@FreeBSD.org>
Subject: git: 9745bab3cd30 - stable/14 - powerpc: save and restore VRSAVE with the vector state
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: pkubaj
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 9745bab3cd30d715fd2173dc72346b85f5522df0
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 17:21:31 +0000
Message-Id: <6b05c79b.f6fb.586e9cd7@gitrepo.freebsd.org>

The branch stable/14 has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/src/commit/?id=9745bab3cd30d715fd2173dc72346b85f5522df0

commit 9745bab3cd30d715fd2173dc72346b85f5522df0
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2026-10-18 10:41:40 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2026-11-24 16:11:12 +0000

    powerpc: save and restore VRSAVE with the vector state
    
    VRSAVE was never saved or restored, although user code can write it
    and the mcontext carries it, so every process saw the value the
    previous process on that CPU had left there.
    
    Two processes pinned to the same CPU and writing different values to
    VRSAVE each read back the other's; each reads back its own now.
    
    Reviewed by:    jhibbits
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D61544
    
    (cherry picked from commit 26b47fd4b63c4e67a952f9a4f0ceb89bcb6a24ac)
---
 sys/powerpc/powerpc/altivec.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sys/powerpc/powerpc/altivec.c b/sys/powerpc/powerpc/altivec.c
index e0f807cc0b53..25622988320b 100644
--- a/sys/powerpc/powerpc/altivec.c
+++ b/sys/powerpc/powerpc/altivec.c
@@ -40,8 +40,10 @@
 #include <sys/limits.h>
 
 #include <machine/altivec.h>
+#include <machine/cpufunc.h>
 #include <machine/pcb.h>
 #include <machine/psl.h>
+#include <machine/spr.h>
 
 static void
 save_vec_int(struct thread *td)
@@ -81,6 +83,7 @@ save_vec_int(struct thread *td)
 	 */
 	__asm __volatile("mfvscr 0; vspltw 0,0,3; stvewx 0,0,%0"
 	    :: "b"(&pcb->pcb_vec.vscr));
+	pcb->pcb_vec.vrsave = mfspr(SPR_VRSAVE);
 
 	/*
 	 * Disable vector unit again
@@ -127,6 +130,8 @@ enable_vec(struct thread *td)
 	msr = mfmsr();
 	mtmsr(msr | PSL_VEC);
 
+	mtspr(SPR_VRSAVE, pcb->pcb_vec.vrsave);
+
 	/*
 	 * Restore VSCR by first loading it into a vector and then into VSCR.
 	 * (this needs to done before loading the user's vector registers

From nobody Tue Nov 24 17:21:33 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYqNZ1FnFz71Zxj
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 17:21: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYqNY1TYkz3JJp
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 17:21:33 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795540893;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=6txhjkEAPREzHHI7+ta0MD3SSBZSiFJ3Eqa5YJHB12Q=;
	b=TDqpArg4PgFZrW9kqLI7GxoFvbXxMVLHy3hxTaduYN/HLrsoYZYjXcQD8DUlN5sjjEnPXi
	gZK+KjDJPq7OviBdgN1rTgW+FG+aWWhboO2z5JqWkPwn/9wRA4gPeT4Wy1pbi0hdR6r1Ed
	45HS+vJB4l9PahULNBmyoQ0t/3Hr34MZxZ2YFJqgeakd38BnovWqL47CfDHjbxTWxOHc8q
	4X6MboL72ftbrkhT0319g+bIQR3tDlI9h2BFEQHqTru/Rq1k9jca8Cgy0kAbMveRCCrHfU
	9jGxhZ0s0DHQ4JX8c+N+/BZtWu1VAujnm9QrsnGqvDGY+Naq/B0+4w81Dv+gww==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795540893;
	b=TKfVM0Ipzq9P2BUWNl2gMxRYKDbcgjPGUWtRa5dR+fRnsottWJixs5ljeQFTygdUH0sDwn
	iUsdHDcXDZUleR7A7WAADjF9k81WBVPzCTd07JQpw9BjAQet6+PM7bHL58j3V2IzfZ8s89
	Acxt+EE7kjVwRDX1XT8rEbX9UAVJ+mqxc2d7FhsmlPuWj/JKQX3FCPhdCbxY4WPHTQhV6L
	qSqD6pfrY9zXoy/0RgjNhhv9uWVPE9Uc4ztSAKLfMYHYGuBqGWgYthEvzyXpxIQkOieVtJ
	ncoMd3iZtxvwpDEBDWbjZ4TK3PnixX5uVtq9BGlryra/f5bbUpINOWe9C70yAQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795540893;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=6txhjkEAPREzHHI7+ta0MD3SSBZSiFJ3Eqa5YJHB12Q=;
	b=Gi779Tk/Zz99wCKwGWgqojLt4VnAwacTui662dKuXkQr2sBtwumB/FOuLDc3r60JJuT8af
	3/fWyM24DejPgdBzA5nidkqhlSuFfon9E1HH2UYZzS+6QrB8r0a7ZEUC8JSb1iJAcb/m/v
	1MrsAkz8lIu3Q6MA2HPOvqQZXF1auodCds2pHYaV9F6NhqRXf0HyBcDE9W+L+PCBqY7N6T
	3iWfWttYso0HWhlscVxhAjqC8tFGnH1YlftXiy4skccU2SWgZRE19XpV6z5XJVzTLEWAMO
	t8Obefn87NbvdQMhAyjVOylf4WYVs5DDPkKlePmZi/lXx23JT0o46lBCImpkJw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYqNY03s7zp4n
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 17:21:33 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 11c69
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 17:21:33 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Piotr Kubaj <pkubaj@FreeBSD.org>
Subject: git: 4d0163d6063c - stable/14 - Merge commit 5472aa0c1321 from llvm git (by Piotr Kubaj):
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: pkubaj
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 4d0163d6063c67a0062c1ed9a29cb84da0b6eb41
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 17:21:33 +0000
Message-Id: <6b05c79d.11c69.35c0ddf@gitrepo.freebsd.org>

The branch stable/14 has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/src/commit/?id=4d0163d6063c67a0062c1ed9a29cb84da0b6eb41

commit 4d0163d6063c67a0062c1ed9a29cb84da0b6eb41
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2026-11-17 16:28:06 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2026-11-24 16:11:13 +0000

    Merge commit 5472aa0c1321 from llvm git (by Piotr Kubaj):
    
      [PowerPC] Use the 16-byte stack and vector alignment on FreeBSD (#232336)
    
      FreeBSD uses the ELFv2 ABI on both byte orders, so it has the same
      16-byte stack alignment as Linux. The explicit vector alignment is a
      backend workaround that does not depend on the OS. There is no
      reason for the layouts to differ.
    
    llvm 21 still keeps the data layout in two places, so the check is
    changed in both the PowerPC backend and clang. They have to match, or
    clang errors out with a data layout mismatch.
    
    Reviewed by:    dim
    MFC after:      3 days
    Differential Revision:  https://reviews.freebsd.org/D61678
    
    (cherry picked from commit d1470ac7f365a1846b8cc565b76592c7a79a22e3)
---
 contrib/llvm-project/clang/lib/Basic/Targets/PPC.h                | 2 +-
 contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h b/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h
index 9f3a4cd2da71..2eee8688db47 100644
--- a/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h
+++ b/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h
@@ -473,7 +473,7 @@ public:
       LongDoubleFormat = &llvm::APFloat::IEEEdouble();
     }
 
-    if (Triple.isOSAIX() || Triple.isOSLinux())
+    if (Triple.isOSAIX() || Triple.isOSLinux() || Triple.isOSFreeBSD())
       DataLayout += "-S128-v256:256:256-v512:512:512";
     resetDataLayout(DataLayout);
 
diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
index b5c6ac111dff..484fbbebf060 100644
--- a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -195,7 +195,9 @@ static std::string getDataLayoutString(const Triple &T) {
   // Specify the vector alignment explicitly. For v256i1 and v512i1, the
   // calculated alignment would be 256*alignment(i1) and 512*alignment(i1),
   // which is 256 and 512 bytes - way over aligned.
-  if (is64Bit && (T.isOSAIX() || T.isOSLinux()))
+  // FreeBSD uses the ELFv2 ABI and has the same 16-byte stack alignment as
+  // Linux.
+  if (is64Bit && (T.isOSAIX() || T.isOSLinux() || T.isOSFreeBSD()))
     Ret += "-S128-v256:256:256-v512:512:512";
 
   return Ret;

From nobody Tue Nov 24 17:21:53 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYqNx5R52z71ZwK
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 17:21: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYqNx3wfSz3Jsg
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 17:21:53 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795540913;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=ZoAcwyRfEswQ/l/K/OIVIQgKp6r2MgjqzakSB897/ag=;
	b=Yk8zlFT5y0VDUUZ1i8JYojK8KgwBSuP89QZzJ/eBBXnc5Buv6fa75tpf0xhZiaZJnLIZju
	WHg5nKGL4YekyVmXW1u/+lzbJtL7uTHDhYZa2i9ajeA4cKuBUfaxhihYv5qfOSLeVw7vTk
	dyt2mc4OV+x87W1cE2RP5d7zyKRDVdQajQOkqRzE0I24NF+uoMdcc+KLUsaY961hHHW07p
	UJPS8YPJe+Bo01fdACjZcy9y/Rpl5M/mPb1hSUoNw44nwnYgoMOsEBv5qz4OkWtzySp6tb
	A4D0LNQrj8Mphhn3HLyBCBociwnEg0E7Fmo/D+7PCWCzhHKNQ0x/54STlCY+WQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795540913;
	b=Q+cr8zXrPBToYuX/vWDPEjjlK2V4+k1DOrkTCD7r+sAy+GPF3KDEi4TwE4Rxg1xNSwD+3m
	hXht7MLHXQKybfFTAUrgLJfPnToSBIRLLMFW5nwrklEOkPcMKBvgL5phlWGjKqSgLBGzrg
	q34Oc9vVhZOKoQqtFDMfxmCgKK/RQCeIfEwDZ39tbSHjuQJcCi/lagQw6TTj+o8dr5Y8ld
	7kwmzI80HcMXSSrbjjCQik0u58xscUyMNrjNcwvzjn5VK7417FVNi/XfS+yUUamCaK5Kod
	eOZ/oeWhjK7iscovrzivFQ5ElCJsW9iEIeVWgsBhlGZRT+FBAy/5TAxuNbaieg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795540913;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=ZoAcwyRfEswQ/l/K/OIVIQgKp6r2MgjqzakSB897/ag=;
	b=WG5qU4mgknt+953sEMws8zncoadEX5TFp0JtV6gSkG6xfegihkhOasdMeqcPuyR8ihDqCP
	xS3H4AEIhd/0XSFJJDM4dvF/9DjQlACMw8Ry2JUozUHs0cKnrGhvqu+m7sX8agZ0CzmE1D
	QEXUS7qnkhDkeWwxVYRg/cWfhcJSO95pZ6uVoIIs5eQZolITLBPcXpmnFTcCP1/Mz8/q4B
	/SSeloQc6RyIEMpN3i3UjDk8KmSi6QyIRznesKtQBpDeo41KkwZpbW7bxDiF2iUd39riU+
	sPPGlD/T3OWjQ2Dxg23FSSlqw0yqFEzUP3q0Wb66tH8mlWTuR8VsMsAdpPSJDg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYqNx3TsCzpS6
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 17:21:53 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 108be
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 17:21:53 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Piotr Kubaj <pkubaj@FreeBSD.org>
Subject: git: 496ed837bc27 - stable/15 - powerpc: move get_pcpu() to machine/pcpu.h
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: pkubaj
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 496ed837bc27af467d4fb94a78fa63a61b6162cf
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 17:21:53 +0000
Message-Id: <6b05c7b1.108be.63f9e828@gitrepo.freebsd.org>

The branch stable/15 has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/src/commit/?id=496ed837bc27af467d4fb94a78fa63a61b6162cf

commit 496ed837bc27af467d4fb94a78fa63a61b6162cf
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2026-11-07 21:12:48 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2026-11-24 16:11:18 +0000

    powerpc: move get_pcpu() to machine/pcpu.h
    
    Every other arch defines get_pcpu() in machine/pcpu.h, powerpc has it in
    machine/cpufunc.h, which is entirely under _KERNEL. lsof includes
    sys/systm.h without _KERNEL first on purpose, so on powerpc cpufunc.h
    turns into an empty header and pcpup later expands to a call of an
    undeclared get_pcpu(). Since sys/mount.h started pulling in sys/proc.h
    this breaks the lsof build on powerpc64 and powerpc64le.
    
    Reviewed by:    jhibbits
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D61305
    
    (cherry picked from commit 4b3364a4bceb61c5870f50b75bf56272ca850944)
---
 sys/powerpc/include/cpufunc.h | 10 ----------
 sys/powerpc/include/pcpu.h    | 10 ++++++++++
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/sys/powerpc/include/cpufunc.h b/sys/powerpc/include/cpufunc.h
index 19a7ae01df0c..0754b51df1b9 100644
--- a/sys/powerpc/include/cpufunc.h
+++ b/sys/powerpc/include/cpufunc.h
@@ -246,16 +246,6 @@ intr_restore(register_t msr)
 	mtmsr(msr);
 }
 
-static __inline struct pcpu *
-get_pcpu(void)
-{
-	struct pcpu *ret;
-
-	__asm __volatile("mfsprg %0, 0" : "=r"(ret));
-
-	return (ret);
-}
-
 /* "NOP" operations to signify priorities to the kernel. */
 static __inline void
 nop_prio_vlow(void)
diff --git a/sys/powerpc/include/pcpu.h b/sys/powerpc/include/pcpu.h
index 1e60a78bb204..28edd0f46987 100644
--- a/sys/powerpc/include/pcpu.h
+++ b/sys/powerpc/include/pcpu.h
@@ -145,6 +145,16 @@ struct pvo_entry;
 
 #ifdef _KERNEL
 
+static __inline struct pcpu *
+get_pcpu(void)
+{
+	struct pcpu *ret;
+
+	__asm __volatile("mfsprg %0, 0" : "=r"(ret));
+
+	return (ret);
+}
+
 #define pcpup	(get_pcpu())
 
 static __inline __pure2 struct thread *

From nobody Tue Nov 24 17:21:54 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYqNy6p9yz71bCN
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 17:21: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYqNy4JFKz3Jqx
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 17:21:54 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795540914;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=IkD4dIxyXY7CWBZ/xUVEs5DU43l/2OrHVe2OoZYX4pM=;
	b=M1kdQ08uKOKTuPb0OyGpobyYqxQaDhyyzrMEm1TFjUvnabtmmX4yTLn5pr8IgsU/WkwJTQ
	YSeXEcKWxd9h6zJgQfGrZaLTGXK8Uqn6bYMYghD8HWcdb0iIvmIEpUccyuvgwo0wvV0s1a
	J30i9mPvOKf9/LmokERCFXL4gi6/ErJlZ1b4iBkvoIvMQBm7iGkdddyK/Yu8eZNKleNz2U
	t/04kJqCYvIX5b9t3xwRjHBaOXfYPPceqBbELDfld46obvlRRbXoHdxIh3LHRjJA3oSep1
	y7f7BMG0oO+6zS4+aC/t4dsHetFCVSTFVEJNO0Zxvt6cytaWdzzm7vs8vJEgcA==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795540914;
	b=tQCQVoovByFzO4WbfsZCz/weptA14eClEgkeaK4mv5KRFfNTvaGchKIu/qyCOe7MALy8rk
	ZMIf9IdmVAE+zqgS6KibEFDMgCSXfMaOUQFTY+uSjGK+3vUdZ/C3DEDGQlzw51/+YbD41h
	/gjD/Ifw8tWouCtp265/Yr4yfvG3bfR2YJsCAHZbD7gfbXFak6ph8/Dc+ncYHnsBamDj3J
	muvOPfSsKXdGhY1uyq+PwHjFXlX0raO3KQiCkSh1g9HUzPVwk4zPygBAzIDwjFwHk8Sk7g
	p3JwOV5mNbfEHTi6l/G4BRiAcBl7oqRpYT2GJSqjPQ0nEsevsaAZY2wZekhIUA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795540914;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=IkD4dIxyXY7CWBZ/xUVEs5DU43l/2OrHVe2OoZYX4pM=;
	b=BCP6nqBPXHaeaRih/C3MysXcUoEJ6jaV5CKw8p9JNEqB4ld/OUUyMYk1UZU893bngub7QH
	V5QiEU4R/0gKoSP1eQsOxGNlu2pGnPEB0kh8DeRHWSOl827VF31smHE1T5fiXnV2IHRMEg
	koD377GZt9dFerGGFuG3F51f4BwjkBsCga1N+96MxZFe8XCEu1eZ8RMLx2iuQe/cQuuU5P
	x+jhlHyDocMgaVGqSjwdFle4fmZinCo6jHroDK+CirMLckijUzwVAEIxzJIOtya+Cpj/9z
	LT4zLXFJVwXPox4wHEyMvRql4yzCdRspaymKxI9a0xIXqVjhemODeEC9CA9cYw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYqNy3sXMzpRk
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 17:21:54 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 11f42
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 17:21:54 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Piotr Kubaj <pkubaj@FreeBSD.org>
Subject: git: aa462d88f9e5 - stable/15 - powerpc: save and restore VRSAVE with the vector state
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: pkubaj
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: aa462d88f9e595fcfda633a30c0be7afb4793ae7
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 17:21:54 +0000
Message-Id: <6b05c7b2.11f42.6d4a41c1@gitrepo.freebsd.org>

The branch stable/15 has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/src/commit/?id=aa462d88f9e595fcfda633a30c0be7afb4793ae7

commit aa462d88f9e595fcfda633a30c0be7afb4793ae7
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2026-10-18 10:41:40 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2026-11-24 16:11:18 +0000

    powerpc: save and restore VRSAVE with the vector state
    
    VRSAVE was never saved or restored, although user code can write it
    and the mcontext carries it, so every process saw the value the
    previous process on that CPU had left there.
    
    Two processes pinned to the same CPU and writing different values to
    VRSAVE each read back the other's; each reads back its own now.
    
    Reviewed by:    jhibbits
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D61544
    
    (cherry picked from commit 26b47fd4b63c4e67a952f9a4f0ceb89bcb6a24ac)
---
 sys/powerpc/powerpc/altivec.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sys/powerpc/powerpc/altivec.c b/sys/powerpc/powerpc/altivec.c
index 928e5cf2f0eb..b847a2e5f12e 100644
--- a/sys/powerpc/powerpc/altivec.c
+++ b/sys/powerpc/powerpc/altivec.c
@@ -39,8 +39,10 @@
 #include <sys/limits.h>
 
 #include <machine/altivec.h>
+#include <machine/cpufunc.h>
 #include <machine/pcb.h>
 #include <machine/psl.h>
+#include <machine/spr.h>
 
 static void
 save_vec_int(struct thread *td)
@@ -80,6 +82,7 @@ save_vec_int(struct thread *td)
 	 */
 	__asm __volatile("mfvscr 0; vspltw 0,0,3; stvewx 0,0,%0"
 	    :: "b"(&pcb->pcb_vec.vscr));
+	pcb->pcb_vec.vrsave = mfspr(SPR_VRSAVE);
 
 	/*
 	 * Disable vector unit again
@@ -126,6 +129,8 @@ enable_vec(struct thread *td)
 	msr = mfmsr();
 	mtmsr(msr | PSL_VEC);
 
+	mtspr(SPR_VRSAVE, pcb->pcb_vec.vrsave);
+
 	/*
 	 * Restore VSCR by first loading it into a vector and then into VSCR.
 	 * (this needs to done before loading the user's vector registers

From nobody Tue Nov 24 17:21:55 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYqP054zjz71Zs7
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 17:21: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYqNz4bCjz3JlD
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 17:21:55 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795540915;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=MOzoZpdiCfoJIOSnw8F1xR4BgH4b1PcHuK81+rKOQjM=;
	b=JDdk9cZ6QHOS9gJF/ZXb78p34qzftIjxd1Ve+vDKw41mBwmhMDn5Rvmdlr00/yf3Iky1Lo
	1fcSGZvNzhD9JXNwuoCUe54IJLWY7hulZh/GPzFGWEQ8MqAxeUbtNmo2CRrY880CRQz4kW
	Qv/eW7F/F3vSlD2xEIo6ofO4eiterPLaq+NSHmySdkJ/gw9qZVtaZxUMRbesxkaThHLkPr
	FL2r+jbY3F/AoaQMnquToPbUZvGqXJFW/oLML44ZvrjBo1ZaKkKUVQ39T785CNWdt1RcwE
	2XSGXY/v5j1w8MyUo0jvNPJEqa9hDzH1PFncQL4hFi4rBiBwod8rCeMr8TSkMQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795540915;
	b=cYs+74nCBI/YVbIW7aVGFTQvLrX83adVbQsl2aToaBaJAVof1dc74KJekMUGghMfD24JMP
	IOnNveq9trIhqp+ByI4PRHx40ioODZR9hcKMm/qwnbdw8mX1DcdhGufLZ19XSHdyWdNfBq
	Fk81pewWGAeyf06kA0Jr2Wqg8jzXtjUDYSypEL1XdWuNlNZy8dmCFhiYvgxnIBG38U5AzQ
	i5/xNbi3/JwxThi1+PKf5hmbtpRuIvfno5WuFB4XAd818wjSU0Gb9DDJtugl4jL6iSlvBS
	3m+fpeQVBYntFkBxuRZzjrmP4LW+4WjOXwQNIFXD4T980wxI0waReCtMHnzkiQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795540915;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=MOzoZpdiCfoJIOSnw8F1xR4BgH4b1PcHuK81+rKOQjM=;
	b=kIz7+HKdI1kXloIPI/t2Wl9BnWlTO1VASXmGwvDNs/aOZ3kXQKo3Y3/RFUA8OPOLCpzYG/
	etJx1oF1AV7cr5jpT9uAbt6hCcSuSQBBhaJsnWYvboE9Xk5ofKvtHut2+vhtCZKDwtw7v7
	CshVprLddU013c9P6I4hR/T0ZmQdT2HOK8CW/M1U3Fvd0AULPV6zhYGR+5U4H46auqq20j
	Inl9Eanfs1gj5I34k2yTFT6IZAXvVV5LL/Y6RhXmMNO7EuxwFkBNptPAhQ42vpMl7n6WmW
	1uSmGJ+75LKQuchEL6LWQ2NsPd7MgoAXOF5FaK2KyXt6dGVhuQdtyHbiob7Z7A==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYqNz4FVdzpFC
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 17:21:55 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 10ecc
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 17:21:55 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Piotr Kubaj <pkubaj@FreeBSD.org>
Subject: git: d3899081b93f - stable/15 - Merge commit 5472aa0c1321 from llvm git (by Piotr Kubaj):
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: pkubaj
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: d3899081b93f8ba19d21a01ad42e67b4f5f0a559
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 17:21:55 +0000
Message-Id: <6b05c7b3.10ecc.606a26b6@gitrepo.freebsd.org>

The branch stable/15 has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/src/commit/?id=d3899081b93f8ba19d21a01ad42e67b4f5f0a559

commit d3899081b93f8ba19d21a01ad42e67b4f5f0a559
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2026-11-17 16:28:06 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2026-11-24 16:11:19 +0000

    Merge commit 5472aa0c1321 from llvm git (by Piotr Kubaj):
    
      [PowerPC] Use the 16-byte stack and vector alignment on FreeBSD (#232336)
    
      FreeBSD uses the ELFv2 ABI on both byte orders, so it has the same
      16-byte stack alignment as Linux. The explicit vector alignment is a
      backend workaround that does not depend on the OS. There is no
      reason for the layouts to differ.
    
    llvm 21 still keeps the data layout in two places, so the check is
    changed in both the PowerPC backend and clang. They have to match, or
    clang errors out with a data layout mismatch.
    
    Reviewed by:    dim
    MFC after:      3 days
    Differential Revision:  https://reviews.freebsd.org/D61678
    
    (cherry picked from commit d1470ac7f365a1846b8cc565b76592c7a79a22e3)
---
 contrib/llvm-project/clang/lib/Basic/Targets/PPC.h                | 2 +-
 contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h b/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h
index 9f3a4cd2da71..2eee8688db47 100644
--- a/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h
+++ b/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h
@@ -473,7 +473,7 @@ public:
       LongDoubleFormat = &llvm::APFloat::IEEEdouble();
     }
 
-    if (Triple.isOSAIX() || Triple.isOSLinux())
+    if (Triple.isOSAIX() || Triple.isOSLinux() || Triple.isOSFreeBSD())
       DataLayout += "-S128-v256:256:256-v512:512:512";
     resetDataLayout(DataLayout);
 
diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
index b5c6ac111dff..484fbbebf060 100644
--- a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -195,7 +195,9 @@ static std::string getDataLayoutString(const Triple &T) {
   // Specify the vector alignment explicitly. For v256i1 and v512i1, the
   // calculated alignment would be 256*alignment(i1) and 512*alignment(i1),
   // which is 256 and 512 bytes - way over aligned.
-  if (is64Bit && (T.isOSAIX() || T.isOSLinux()))
+  // FreeBSD uses the ELFv2 ABI and has the same 16-byte stack alignment as
+  // Linux.
+  if (is64Bit && (T.isOSAIX() || T.isOSLinux() || T.isOSFreeBSD()))
     Ret += "-S128-v256:256:256-v512:512:512";
 
   return Ret;

From nobody Tue Nov 24 17:23:36 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYqQw2cXKz71bV1
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 17:23: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYqQw22Jyz3MRL
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 17:23:36 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795541016;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=5EmX901eodt8OdhLPoujVEZYNpEy0oPiT8V4emoF/vE=;
	b=Xd1OtusF4MWDc5cvV1af6wWUEwCtEP2567UwU+sLVC6zKLez+ZeNeolSfXFS5h9hsACk7H
	LZwnLM4l2K6P4ejATcWVnrZxoX2OtgcrHrrS68kjwucTW+GGreSaWbEVpOy+Qpj6PkOp2w
	M+0aq+mgMXwzPTseevlkiuVQoC2kQO8I/BwrfW5lO6zEMuaWonHdAXE8jPMQOJtA1oH5iO
	Yc203HcXEBB7sQRwcQPie6SS1NLyM7mN7HPJnDrsNobZCm9lrkLmI+DGO5+mKiqSjuor9/
	CwNmZ2FHtw3SuJ6sFSzGDjG2q+QqDJFiqdQScfIS0F8h1GHfQr5OvN3Bip2cLg==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795541016;
	b=GwqSDhY7MAHKC6jbN3us4w3548d9cOTfbkn29IXFuPs+h5vgFqkXE+hq6mwW/Oz+O8yqJX
	EZBp+vHWta3qzBBdLVDLP/kCK0MekoPkgK6OvL9sYHsvClzrci10TDHffIMERsBvBmmeYV
	zTUFDk1DveH6bYp0clFlNuDucz4dRg0EzS8Vr7ahFekAlwf9yxlzp96HEtOMH7qtXxn1fX
	NI51/WSkUaLe2oPoxnyaPkDwAborsj4lDqpaIAy8z4eR5Czwi1Hr2TrEk2ikxG8hsBEKmx
	NdVCW1e9v6hW5UqIuabDNRjbMVpDK46wolxEEUJ68N1S6EJu/XOnnqrLucbdNw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795541016;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=5EmX901eodt8OdhLPoujVEZYNpEy0oPiT8V4emoF/vE=;
	b=HdkChyi05fhUoQcRkKwuPpajKUBXqQzQnQJm5t82VLvIuRUy56RW1L09E2loprm6AnRxk+
	uZDRWz33wAoDqvZmAidjzgIy/JtX+asRzJkxE59XLDnT7W0o6w2tGXimI7PREhFUNDDi2g
	e9uTd0YxxZdBjzSLM4XA3w5+l99CM9iz0JbKWOFT6XK3g3itDw6pBQ4238vpvNH8KVD8bh
	gjXCx66lIBcox5JNCOhBvbcPYa2O95XRgItgNuYdTMjtqLDnnor2vQqru2sgsmVhKc5FWO
	YN1kGQiacYipIg7stYaJ5zEjVGl+nU+0Msr873DCPH7JA0a0hi++IvuYsPcMSA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYqQw1hCGzpf0
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 17:23:36 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 1189b
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 17:23:36 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
From: Roman Bogorodskiy <novel@FreeBSD.org>
Subject: git: 5ec1d41902cc - stable/15 - bhyve: add command to list config options
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: novel
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 5ec1d41902cc1f331f590bac8777c62e81e90d3f
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 17:23:36 +0000
Message-Id: <6b05c818.1189b.26affe3c@gitrepo.freebsd.org>

The branch stable/15 has been updated by novel:

URL: https://cgit.FreeBSD.org/src/commit/?id=5ec1d41902cc1f331f590bac8777c62e81e90d3f

commit 5ec1d41902cc1f331f590bac8777c62e81e90d3f
Author:     Roman Bogorodskiy <novel@FreeBSD.org>
AuthorDate: 2026-07-22 16:08:09 +0000
Commit:     Roman Bogorodskiy <novel@FreeBSD.org>
CommitDate: 2026-11-24 17:22:47 +0000

    bhyve: add command to list config options
    
    For a software built on top of bhyve(8) and/or managing bhyve(8),
    it is very convenient to know what specific features the given binary supports.
    Currently, bhyve(8) provides some of this information, and it could be
    retrieved by parsing `bhyve -h`, `bhyve -s help`, `bhyve -l help`.
    
    Sometimes it is not enough, for example, the recently added
    "oemstrings" feature cannot be fully probed using these commands.
    Over time, some workarounds were suggested. Specifically:
    
     - Mapping features to __FreeBSD_version. I see at least two issues with
       that:
    
         * __FreeBSD_version does not directly map to bhyve(8) features,
           so this is simply not accurate.
         * bhyve(8) might be updated separately from the system, which
           is not so uncommon, especially for development purposes.
           Then such a probing will be inaccurate.
    
     - Manual pages parsing. I see more disadvantages with that:
    
         * Manual pages are meant to be read by a human. Extracting
           information from it by a machine is not the most convenient thing.
           Especially understanding side notes like: "Note, feature 'foo'
           is arm64-only!".
         * Manual pages might be inaccurate, they might miss options.
         * bhyve(8) could be used in an environment where manual pages
           are not installed.
    
    This commit attempts to close this gap by introducing the "bhyve -o
    help" command which prints all the supported configuration variables.
    In my opinion, it is, in combination with the other commands mentioned
    above, sufficient to retrieve most of the capabilities of the given
    bhyve(8) binary.
    
    The current implementation defines a simple configuration schema for
    common and machdep code and prints out a list of supported configuration
    variables for the current architecture.
    
    The next step as I see it would be extending set_config*() functions
    to validate the user provided values against the schema, so users get
    notified early on incorrect or misspelled configuration variables.
    It would also be nice to allow users to only validate their
    configuration, think of 'nginx configtest / -t'.
    
    Reviewed by:    chuck (previous revision), bnovkov
    MFC after:      1 month
    MFC to:         stable/15
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D58419
    
    (cherry picked from commit e809c7d810ced2307741a7c0c135a8b1bef1851b)
---
 usr.sbin/bhyve/Makefile                   |   1 +
 usr.sbin/bhyve/aarch64/bhyverun_machdep.c |  22 ++++
 usr.sbin/bhyve/amd64/bhyverun_machdep.c   |  94 +++++++++++++++
 usr.sbin/bhyve/bhyve.8                    |   4 +
 usr.sbin/bhyve/block_if.c                 |  17 +++
 usr.sbin/bhyve/block_if.h                 |   3 +
 usr.sbin/bhyve/config_schema.c            | 193 ++++++++++++++++++++++++++++++
 usr.sbin/bhyve/config_schema.h            |  40 +++++++
 usr.sbin/bhyve/pci_nvme.c                 |  20 ++++
 usr.sbin/bhyve/riscv/bhyverun_machdep.c   |  18 +++
 10 files changed, 412 insertions(+)

diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile
index 25fb71b5768f..03f9eb53f9e2 100644
--- a/usr.sbin/bhyve/Makefile
+++ b/usr.sbin/bhyve/Makefile
@@ -25,6 +25,7 @@ SRCS=	\
 	block_if.c		\
 	bootrom.c		\
 	config.c		\
+	config_schema.c		\
 	console.c		\
 	crc16.c			\
 	ctl_nvme_all.c		\
diff --git a/usr.sbin/bhyve/aarch64/bhyverun_machdep.c b/usr.sbin/bhyve/aarch64/bhyverun_machdep.c
index b1dd906da254..816eba561d42 100644
--- a/usr.sbin/bhyve/aarch64/bhyverun_machdep.c
+++ b/usr.sbin/bhyve/aarch64/bhyverun_machdep.c
@@ -46,6 +46,7 @@
 #include "bhyve_machdep.h"
 #include "bhyverun.h"
 #include "config.h"
+#include "config_schema.h"
 #include "debug.h"
 #include "fdt.h"
 #include "mem.h"
@@ -54,6 +55,23 @@
 #include "rtc_pl031.h"
 #include "uart_emul.h"
 
+static const struct config_option config_options_machdep[] = {
+	{ "gdb.address", CONFIG_OPTION_STRING },
+	{ "gdb.port", CONFIG_OPTION_INTEGER },
+	{ "gdb.wait", CONFIG_OPTION_BOOL },
+	{ "rtc.use_localtime", CONFIG_OPTION_BOOL },
+	{ "console", CONFIG_OPTION_STRING },
+	{ "fdt.bootargs", CONFIG_OPTION_STRING },
+};
+
+void
+config_schema_merge_options_machdep(struct config_schema *schema)
+{
+
+	config_schema_merge_options(schema, NULL, config_options_machdep,
+	    nitems(config_options_machdep));
+}
+
 /* Start of mem + 1M */
 #define	FDT_BASE	0x100000
 #define	FDT_SIZE	(64 * 1024)
@@ -151,6 +169,10 @@ bhyve_optparse(int argc, char **argv)
 			set_config_value("memory.size", optarg);
 			break;
 		case 'o':
+			if (strcmp(optarg, "help") == 0) {
+				print_config_options();
+				exit(0);
+			}
 			if (!bhyve_parse_config_option(optarg)) {
 				errx(EX_USAGE,
 				    "invalid configuration option '%s'",
diff --git a/usr.sbin/bhyve/amd64/bhyverun_machdep.c b/usr.sbin/bhyve/amd64/bhyverun_machdep.c
index a31c1512dbc3..51140fe51a18 100644
--- a/usr.sbin/bhyve/amd64/bhyverun_machdep.c
+++ b/usr.sbin/bhyve/amd64/bhyverun_machdep.c
@@ -26,10 +26,13 @@
  * SUCH DAMAGE.
  */
 
+#include <sys/param.h>
+
 #include <assert.h>
 #include <err.h>
 #include <stdbool.h>
 #include <stdlib.h>
+#include <string.h>
 #include <sysexits.h>
 
 #include <vmmapi.h>
@@ -39,6 +42,7 @@
 #include "bhyverun.h"
 #include "bootrom.h"
 #include "config.h"
+#include "config_schema.h"
 #include "debug.h"
 #include "e820.h"
 #include "fwctl.h"
@@ -53,6 +57,92 @@
 #include "smbiostbl.h"
 #include "xmsr.h"
 
+static const struct config_option config_options_machdep[] = {
+	{ "bootvars", CONFIG_OPTION_STRING },
+	{ "acpi_tables", CONFIG_OPTION_BOOL },
+	{ "acpi_tables_in_memory", CONFIG_OPTION_BOOL },
+
+	{ "gdb.address", CONFIG_OPTION_STRING },
+	{ "gdb.port", CONFIG_OPTION_INTEGER },
+	{ "gdb.wait", CONFIG_OPTION_BOOL },
+	{ "keyboard.layout", CONFIG_OPTION_STRING },
+	{ "rtc.use_localtime", CONFIG_OPTION_BOOL },
+
+	{ "bios.vendor", CONFIG_OPTION_STRING },
+	{ "bios.version", CONFIG_OPTION_STRING },
+	{ "bios.release_date", CONFIG_OPTION_STRING },
+	{ "system.family_name", CONFIG_OPTION_STRING },
+	{ "system.manufacturer", CONFIG_OPTION_STRING },
+	{ "system.product_name", CONFIG_OPTION_STRING },
+	{ "system.serial_number", CONFIG_OPTION_STRING },
+	{ "system.sku", CONFIG_OPTION_STRING },
+	{ "system.version", CONFIG_OPTION_STRING },
+	{ "board.manufacturer", CONFIG_OPTION_STRING },
+	{ "board.product_name", CONFIG_OPTION_STRING },
+	{ "board.version", CONFIG_OPTION_STRING },
+	{ "board.serial_number", CONFIG_OPTION_STRING },
+	{ "board.asset_tag", CONFIG_OPTION_STRING },
+	{ "board.location", CONFIG_OPTION_STRING },
+	{ "chassis.manufacturer", CONFIG_OPTION_STRING },
+	{ "chassis.version", CONFIG_OPTION_STRING },
+	{ "chassis.serial_number", CONFIG_OPTION_STRING },
+	{ "chassis.asset_tag", CONFIG_OPTION_STRING },
+	{ "chassis.sku", CONFIG_OPTION_STRING },
+
+	{ "x86.mptable", CONFIG_OPTION_BOOL },
+	{ "x86.x2apic", CONFIG_OPTION_BOOL },
+	{ "x86.strictio", CONFIG_OPTION_BOOL },
+	{ "x86.strictmsr", CONFIG_OPTION_BOOL },
+	{ "x86.verbosemsr", CONFIG_OPTION_BOOL },
+	{ "x86.vmexit_on_hlt", CONFIG_OPTION_BOOL },
+	{ "x86.vmexit_on_pause", CONFIG_OPTION_BOOL },
+
+	{ "pci.B.S.F.wait", CONFIG_OPTION_BOOL },
+	{ "pci.B.S.F.rfb", CONFIG_OPTION_STRING },
+	{ "pci.B.S.F.vga", CONFIG_OPTION_STRING },
+	{ "pci.B.S.F.w", CONFIG_OPTION_INTEGER },
+	{ "pci.B.S.F.h", CONFIG_OPTION_INTEGER },
+	{ "pci.B.S.F.password", CONFIG_OPTION_STRING },
+	{ "pci.B.S.F.tcp", CONFIG_OPTION_STRING },
+
+	{ "lpc.com1.path", CONFIG_OPTION_STRING },
+	{ "lpc.com1.tcp", CONFIG_OPTION_STRING },
+	{ "lpc.com2.path", CONFIG_OPTION_STRING },
+	{ "lpc.com2.tcp", CONFIG_OPTION_STRING },
+	{ "lpc.com3.path", CONFIG_OPTION_STRING },
+	{ "lpc.com3.tcp", CONFIG_OPTION_STRING },
+	{ "lpc.com4.path", CONFIG_OPTION_STRING },
+	{ "lpc.com4.tcp", CONFIG_OPTION_STRING },
+	{ "lpc.fwcfg", CONFIG_OPTION_STRING },
+	{ "lpc.pc-testdev", CONFIG_OPTION_BOOL },
+	{ "lpc.pcireg.*", CONFIG_OPTION_INTEGER },
+	{ "lpc.pcireg.vendor", CONFIG_OPTION_INTEGER },
+	{ "lpc.pcireg.device", CONFIG_OPTION_INTEGER },
+	{ "lpc.pcireg.revid", CONFIG_OPTION_INTEGER },
+	{ "lpc.pcireg.subvendor", CONFIG_OPTION_INTEGER },
+	{ "lpc.pcireg.subdevice", CONFIG_OPTION_INTEGER },
+
+	{ "tpm.path", CONFIG_OPTION_STRING },
+	{ "tpm.type", CONFIG_OPTION_STRING },
+	{ "tpm.version", CONFIG_OPTION_STRING },
+	{ "tpm.intf", CONFIG_OPTION_STRING },
+	{ "tpm.ppi", CONFIG_OPTION_STRING },
+
+	{ "pci.B.S.F.bus", CONFIG_OPTION_INTEGER },
+	{ "pci.B.S.F.slot", CONFIG_OPTION_INTEGER },
+	{ "pci.B.S.F.func", CONFIG_OPTION_INTEGER },
+	{ "pci.B.S.F.pptdev", CONFIG_OPTION_STRING },
+	{ "pci.B.S.F.rom", CONFIG_OPTION_STRING },
+};
+
+void
+config_schema_merge_options_machdep(struct config_schema *schema)
+{
+
+	config_schema_merge_options(schema, NULL, config_options_machdep,
+	    nitems(config_options_machdep));
+}
+
 void
 bhyve_init_config(void)
 {
@@ -206,6 +296,10 @@ bhyve_optparse(int argc, char **argv)
 				errx(EX_USAGE, "NUMA emulation requires ACPI");
 			break;
 		case 'o':
+			if (strcmp(optarg, "help") == 0) {
+				print_config_options();
+				exit(0);
+			}
 			if (!bhyve_parse_config_option(optarg)) {
 				errx(EX_USAGE,
 				    "invalid configuration option '%s'",
diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8
index b73d0dae32ab..7400c99b3529 100644
--- a/usr.sbin/bhyve/bhyve.8
+++ b/usr.sbin/bhyve/bhyve.8
@@ -91,6 +91,8 @@
 .Nm
 .Fl l Cm help
 .Nm
+.Fl o Cm help
+.Nm
 .Fl s Cm help
 .Sh DESCRIPTION
 .Nm
@@ -324,6 +326,8 @@ See the
 flag in
 .Xr cpuset 1
 for a list of valid NUMA memory allocation policies and their formats.
+.It Fl o Cm help
+Print a list of supported configuration variables.
 .It Fl o Ar var Ns Cm = Ns Ar value
 Set the configuration variable
 .Ar var
diff --git a/usr.sbin/bhyve/block_if.c b/usr.sbin/bhyve/block_if.c
index 0a4f76ae197d..311809f0c0e5 100644
--- a/usr.sbin/bhyve/block_if.c
+++ b/usr.sbin/bhyve/block_if.c
@@ -57,6 +57,7 @@
 
 #include "bhyverun.h"
 #include "config.h"
+#include "config_schema.h"
 #include "debug.h"
 #include "mevent.h"
 #include "pci_emul.h"
@@ -67,6 +68,22 @@
 #define BLOCKIF_NUMTHR	8
 #define BLOCKIF_MAXREQ	(BLOCKIF_RING_MAX + BLOCKIF_NUMTHR)
 
+static const struct config_option blockif_config_options[] = {
+	{ "path", CONFIG_OPTION_STRING },
+	{ "nocache", CONFIG_OPTION_BOOL },
+	{ "nodelete", CONFIG_OPTION_BOOL },
+	{ "sync", CONFIG_OPTION_BOOL },
+	{ "direct", CONFIG_OPTION_BOOL },
+	{ "ro", CONFIG_OPTION_BOOL },
+	{ "sectorsize", CONFIG_OPTION_STRING },
+	{ "bootindex", CONFIG_OPTION_INTEGER },
+};
+
+const struct config_option_set blockif_config_option_set = {
+	.options = blockif_config_options,
+	.count = nitems(blockif_config_options),
+};
+
 enum blockop {
 	BOP_READ,
 	BOP_WRITE,
diff --git a/usr.sbin/bhyve/block_if.h b/usr.sbin/bhyve/block_if.h
index 9a1a65a1bfe9..afe56570035b 100644
--- a/usr.sbin/bhyve/block_if.h
+++ b/usr.sbin/bhyve/block_if.h
@@ -40,8 +40,11 @@
 #include <sys/uio.h>
 #include <sys/unistd.h>
 
+struct config_option_set;
 struct vm_snapshot_meta;
 
+extern const struct config_option_set blockif_config_option_set;
+
 
 /*
  * BLOCKIF_IOV_MAX is the maximum number of scatter/gather entries in
diff --git a/usr.sbin/bhyve/config_schema.c b/usr.sbin/bhyve/config_schema.c
new file mode 100644
index 000000000000..ced31250bed7
--- /dev/null
+++ b/usr.sbin/bhyve/config_schema.c
@@ -0,0 +1,193 @@
+/*
+ * Copyright (c) 2026 The FreeBSD Foundation
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#include <sys/cdefs.h>
+#include <sys/param.h>
+#include <sys/tree.h>
+
+#include <err.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sysexits.h>
+
+#include "config_schema.h"
+
+SET_DECLARE(config_option_set, struct config_option_set);
+
+struct config_schema_option {
+	RB_ENTRY(config_schema_option) entry;
+	char *name;
+	enum config_option_type type;
+};
+
+RB_HEAD(config_schema, config_schema_option);
+
+static int
+config_schema_option_compare(struct config_schema_option *a,
+    struct config_schema_option *b)
+{
+
+	return (strcmp(a->name, b->name));
+}
+
+RB_GENERATE_STATIC(config_schema, config_schema_option, entry,
+    config_schema_option_compare);
+
+static const struct config_option config_options[] = {
+	{ "name", CONFIG_OPTION_STRING },
+	{ "cpus", CONFIG_OPTION_INTEGER },
+	{ "cores", CONFIG_OPTION_INTEGER },
+	{ "threads", CONFIG_OPTION_INTEGER },
+	{ "sockets", CONFIG_OPTION_INTEGER },
+	{ "memory.guest_in_core", CONFIG_OPTION_BOOL },
+	{ "memory.size", CONFIG_OPTION_STRING },
+	{ "memory.wired", CONFIG_OPTION_BOOL },
+	{ "bootrom", CONFIG_OPTION_STRING },
+	{ "destroy_on_poweroff", CONFIG_OPTION_BOOL },
+	{ "pci.enable_bars", CONFIG_OPTION_BOOL },
+	{ "uuid", CONFIG_OPTION_STRING },
+	{ "virtio_msix", CONFIG_OPTION_BOOL },
+	{ "config.dump", CONFIG_OPTION_BOOL },
+
+	{ "vcpu.N.cpuset", CONFIG_OPTION_STRING },
+	{ "domains.N.size", CONFIG_OPTION_STRING },
+	{ "domains.N.domain_policy", CONFIG_OPTION_STRING },
+	{ "domains.N.cpus", CONFIG_OPTION_STRING },
+
+	{ "pci.B.S.F.device", CONFIG_OPTION_STRING },
+	{ "pci.B.S.F.vendor", CONFIG_OPTION_INTEGER },
+	{ "pci.B.S.F.devid", CONFIG_OPTION_INTEGER },
+	{ "pci.B.S.F.pcireg.*", CONFIG_OPTION_INTEGER },
+	{ "pci.B.S.F.pcireg.vendor", CONFIG_OPTION_INTEGER },
+	{ "pci.B.S.F.pcireg.device", CONFIG_OPTION_INTEGER },
+	{ "pci.B.S.F.port.N.type", CONFIG_OPTION_STRING },
+	{ "pci.B.S.F.port.N.path", CONFIG_OPTION_STRING },
+	{ "pci.B.S.F.port.N.nocache", CONFIG_OPTION_BOOL },
+	{ "pci.B.S.F.port.N.nodelete", CONFIG_OPTION_BOOL },
+	{ "pci.B.S.F.port.N.sync", CONFIG_OPTION_BOOL },
+	{ "pci.B.S.F.port.N.direct", CONFIG_OPTION_BOOL },
+	{ "pci.B.S.F.port.N.ro", CONFIG_OPTION_BOOL },
+	{ "pci.B.S.F.port.N.sectorsize", CONFIG_OPTION_STRING },
+	{ "pci.B.S.F.port.N.nmrr", CONFIG_OPTION_INTEGER },
+	{ "pci.B.S.F.port.N.ser", CONFIG_OPTION_STRING },
+	{ "pci.B.S.F.port.N.rev", CONFIG_OPTION_STRING },
+	{ "pci.B.S.F.port.N.model", CONFIG_OPTION_STRING },
+	{ "pci.B.S.F.port.N.bootindex", CONFIG_OPTION_INTEGER },
+
+	{ "pci.B.S.F.backend", CONFIG_OPTION_STRING },
+	{ "pci.B.S.F.type", CONFIG_OPTION_STRING },
+	{ "pci.B.S.F.peerhook", CONFIG_OPTION_STRING },
+	{ "pci.B.S.F.socket", CONFIG_OPTION_STRING },
+	{ "pci.B.S.F.hook", CONFIG_OPTION_STRING },
+	{ "pci.B.S.F.hostfwd", CONFIG_OPTION_STRING },
+	{ "pci.B.S.F.mac", CONFIG_OPTION_STRING },
+	{ "pci.B.S.F.mtu", CONFIG_OPTION_INTEGER },
+	{ "pci.B.S.F.play", CONFIG_OPTION_STRING },
+	{ "pci.B.S.F.rec", CONFIG_OPTION_STRING },
+
+	{ "pci.B.S.F.serial", CONFIG_OPTION_STRING },
+	{ "pci.B.S.F.sharename", CONFIG_OPTION_STRING },
+	{ "pci.B.S.F.port.N.name", CONFIG_OPTION_STRING },
+
+	{ "pci.B.S.F.dev", CONFIG_OPTION_STRING },
+	{ "pci.B.S.F.iid", CONFIG_OPTION_INTEGER },
+	{ "pci.B.S.F.slot.N.device", CONFIG_OPTION_STRING },
+};
+
+static const char *
+config_option_type_name(enum config_option_type type)
+{
+
+	switch (type) {
+	case CONFIG_OPTION_BOOL:
+		return ("bool");
+	case CONFIG_OPTION_INTEGER:
+		return ("integer");
+	case CONFIG_OPTION_STRING:
+		return ("string");
+	}
+	errx(EX_SOFTWARE, "invalid configuration option type");
+}
+
+void
+config_schema_merge_options(struct config_schema *schema, const char *prefix,
+    const struct config_option *options, size_t count)
+{
+	struct config_schema_option *existing, *option;
+	char *name;
+	size_t i;
+
+	if (prefix == NULL)
+		prefix = "";
+	for (i = 0; i < count; i++) {
+		if (asprintf(&name, "%s%s", prefix, options[i].name) == -1)
+			err(EX_OSERR, "asprintf");
+		option = malloc(sizeof(*option));
+		if (option == NULL)
+			err(EX_OSERR, "malloc");
+		option->name = name;
+		option->type = options[i].type;
+
+		existing = RB_INSERT(config_schema, schema, option);
+		if (existing == NULL)
+			continue;
+		if (existing->type != option->type) {
+			errx(EX_SOFTWARE,
+			    "conflicting types for configuration option "
+			    "'%s': %s and %s", option->name,
+			    config_option_type_name(existing->type),
+			    config_option_type_name(option->type));
+		}
+		free(option->name);
+		free(option);
+	}
+}
+
+static void
+config_schema_merge_option_set(struct config_schema *schema,
+    const struct config_option_set *set, const char *inherited_prefix)
+{
+	const char *prefix;
+
+	prefix = set->prefix != NULL ? set->prefix : inherited_prefix;
+	if (set->base != NULL)
+		config_schema_merge_option_set(schema, set->base, prefix);
+	config_schema_merge_options(schema, prefix, set->options, set->count);
+}
+
+static void
+config_schema_destroy(struct config_schema *schema)
+{
+	struct config_schema_option *option, *tmp;
+
+	RB_FOREACH_SAFE(option, config_schema, schema, tmp) {
+		RB_REMOVE(config_schema, schema, option);
+		free(option->name);
+		free(option);
+	}
+}
+
+void
+print_config_options(void)
+{
+	struct config_schema_option *option;
+	struct config_option_set **setp;
+	struct config_schema schema;
+
+	RB_INIT(&schema);
+	config_schema_merge_options(&schema, NULL, config_options,
+	    nitems(config_options));
+	SET_FOREACH(setp, config_option_set) {
+		config_schema_merge_option_set(&schema, *setp, NULL);
+	}
+	config_schema_merge_options_machdep(&schema);
+
+	RB_FOREACH(option, config_schema, &schema) {
+		printf("%s\n", option->name);
+	}
+	config_schema_destroy(&schema);
+}
diff --git a/usr.sbin/bhyve/config_schema.h b/usr.sbin/bhyve/config_schema.h
new file mode 100644
index 000000000000..2a6890ac6675
--- /dev/null
+++ b/usr.sbin/bhyve/config_schema.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2026 The FreeBSD Foundation
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#ifndef __CONFIG_SCHEMA_H__
+#define __CONFIG_SCHEMA_H__
+
+#include <sys/linker_set.h>
+#include <sys/types.h>
+
+enum config_option_type {
+	CONFIG_OPTION_BOOL,
+	CONFIG_OPTION_INTEGER,
+	CONFIG_OPTION_STRING,
+};
+
+struct config_option {
+	const char *name;
+	enum config_option_type type;
+};
+
+struct config_option_set {
+	const char *prefix;
+	const struct config_option_set *base;
+	const struct config_option *options;
+	size_t count;
+};
+
+struct config_schema;
+
+#define	CONFIG_OPTION_SET(x)	DATA_SET(config_option_set, x)
+
+void	config_schema_merge_options(struct config_schema *, const char *,
+	    const struct config_option *, size_t);
+void	config_schema_merge_options_machdep(struct config_schema *);
+void	print_config_options(void);
+
+#endif /* !__CONFIG_SCHEMA_H__ */
diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c
index c8e74434b3ae..8862b625b80b 100644
--- a/usr.sbin/bhyve/pci_nvme.c
+++ b/usr.sbin/bhyve/pci_nvme.c
@@ -55,6 +55,7 @@
 
 #include <sys/cdefs.h>
 #include <sys/errno.h>
+#include <sys/param.h>
 #include <sys/types.h>
 #include <sys/crc16.h>
 #include <net/ieee_oui.h>
@@ -79,9 +80,28 @@
 #include "bhyverun.h"
 #include "block_if.h"
 #include "config.h"
+#include "config_schema.h"
 #include "debug.h"
 #include "pci_emul.h"
 
+static const struct config_option pci_nvme_config_options[] = {
+	{ "maxq", CONFIG_OPTION_INTEGER },
+	{ "qsz", CONFIG_OPTION_INTEGER },
+	{ "ioslots", CONFIG_OPTION_INTEGER },
+	{ "sectsz", CONFIG_OPTION_INTEGER },
+	{ "ser", CONFIG_OPTION_STRING },
+	{ "eui64", CONFIG_OPTION_INTEGER },
+	{ "dsm", CONFIG_OPTION_STRING },
+	{ "ram", CONFIG_OPTION_INTEGER },
+};
+
+static const struct config_option_set pci_nvme_config_option_set = {
+	.prefix = "pci.B.S.F.",
+	.base = &blockif_config_option_set,
+	.options = pci_nvme_config_options,
+	.count = nitems(pci_nvme_config_options),
+};
+CONFIG_OPTION_SET(pci_nvme_config_option_set);
 
 static int nvme_debug = 0;
 #define	DPRINTF(fmt, args...) if (nvme_debug) PRINTLN(fmt, ##args)
diff --git a/usr.sbin/bhyve/riscv/bhyverun_machdep.c b/usr.sbin/bhyve/riscv/bhyverun_machdep.c
index 942044157bbb..31a7dcad3e70 100644
--- a/usr.sbin/bhyve/riscv/bhyverun_machdep.c
+++ b/usr.sbin/bhyve/riscv/bhyverun_machdep.c
@@ -49,6 +49,7 @@
 
 #include "bhyverun.h"
 #include "config.h"
+#include "config_schema.h"
 #include "debug.h"
 #include "fdt.h"
 #include "mem.h"
@@ -57,6 +58,19 @@
 #include "uart_emul.h"
 #include "riscv.h"
 
+static const struct config_option config_options_machdep[] = {
+	{ "console", CONFIG_OPTION_STRING },
+	{ "fdt.bootargs", CONFIG_OPTION_STRING },
+};
+
+void
+config_schema_merge_options_machdep(struct config_schema *schema)
+{
+
+	config_schema_merge_options(schema, NULL, config_options_machdep,
+	    nitems(config_options_machdep));
+}
+
 #define	FDT_SIZE	(64 * 1024)
 #define	FDT_DTB_ALIGN	8
 
@@ -142,6 +156,10 @@ bhyve_optparse(int argc, char **argv)
 			set_config_value("memory.size", optarg);
 			break;
 		case 'o':
+			if (strcmp(optarg, "help") == 0) {
+				print_config_options();
+				exit(0);
+			}
 			if (!bhyve_parse_config_option(optarg)) {
 				errx(EX_USAGE,
 				    "invalid configuration option '%s'",

From nobody Tue Nov 24 17:31:16 2026
X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jYqbm5Kl9z71btW
	for <dev-commits-src-all@mlmmj.nyi.freebsd.org>; Tue, 24 Nov 2026 17:31: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)
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4jYqbm4Lpnz3N87
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 17:31:16 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795541476;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=6JPGNgqj/KGR431AQ7Gu00ie4winXlfzg6TWLTOCno8=;
	b=NaMmT58pOoakO1YMZfLtm6L3yR800e1tV4OqZ6oOIQk9sMsrstUudPghEOBO5a9Q0sy+I2
	zdHJ7nVyd7ubPmz5aULccL5Q4ZrUbP+P8Q0/S4gyM3KYCD7UWyvtBMoub+TajWeyesrdwn
	Ob7oxefOSXclFH2q1t2YhgPb1nc1PcCSFJGzuapGCMcEKK0QZw2QRJGF+J2R8LrNwrqGJr
	wsBOxKWt4x1xFgaU1q6OuBVq/YdaveSd4WOFTFWX/VzdV3LtmuKc492qzSRODwAXpWBqqg
	F7djImlzlrkhgJURybyyWEG+Xfdhu38psGbwtu9s/ORFY1oPw5LwcCvMRvzFAQ==
ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795541476;
	b=NgOHdtV1FPWww07B5s3O4vVD/qnwCdWnt30Z5U8ea/4BMyKzo6En593LbsvFjPKRA6gL96
	RzgrCfQpoKxzTGEocSHJb5QohQG6ciWYxNMPVDVBuqdzR/W/IE8ivTgavgMlSni90if6+s
	XsmDrI0o7y/3geA6Y6cXS1noMOXstFivdhbsgSD4S7TH6KL8eiu6DnPJQhygUFjTVNvXby
	GSzrPU10KPxy1NtkV/8k4vPJVgzfzavhS8f7N25VfDd6FHM4kSr4wDRLb6aqah+pdXhXKN
	Dz1+41sgZb8RzgZ5I3XDnSQKE50KU43Lr0iNP76SU2Pf9MtVAtqT6fwufopYRA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1795541476;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=6JPGNgqj/KGR431AQ7Gu00ie4winXlfzg6TWLTOCno8=;
	b=O1o+L6FsONaOh8ArU0StJU7gZYb4rB4FJeyxlZeOnU9bl2xuOBdx+iVInyLkLSkn27XGbg
	MmMU2Tpqg44Im63oQm56GZHrABRCyt30e4CCiHcnJXhWsKw/cE2ijnWgmCwCDSlf5RwzH3
	ePPYIL0Ln6vO3gbQUeFF90e3wUdjMe8qdugz96i8zSzabQtZxhfIYH7i38PYRhVmChc6P5
	2Nme1jeskrpi+bpXcIpMfIwta1i0oiHjMsNg5UOkUg6I3HAWGKy0o/PcX+1oQS13NQ3xgA
	U6W96D58uNXOacGjFcFw0SeDuEUvgw6uqDR2faO53FTimEbpG+ROMqWrqHiuyQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jYqbm41cLzp5G
	for <dev-commits-src-all@FreeBSD.org>; Tue, 24 Nov 2026 17:31:16 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from git (uid 1279)
	(envelope-from git@FreeBSD.org)
	id 12882
	by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org);
	Tue, 24 Nov 2026 17:31:16 +0000
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
From: Olivier Cochard <olivier@FreeBSD.org>
Subject: git: e5477acb8a8b - main - cd9660 tests: Require the cd9660 kernel module
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all
X-BeenThere: dev-commits-src-all@freebsd.org
List-Id: Commit messages for all branches of the src repository <dev-commits-src-all.FreeBSD.org>
List-Post: <mailto:dev-commits-src-all@FreeBSD.org>
List-Help: <mailto:dev-commits-src-all+help@FreeBSD.org>
List-Subscribe: <mailto:dev-commits-src-all+subscribe@FreeBSD.org>
List-Unsubscribe: <mailto:dev-commits-src-all+unsubscribe@FreeBSD.org>
List-Owner: <mailto:dev-commits-src-all+owner@FreeBSD.org>
Precedence: list
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: olivier
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: e5477acb8a8b7f69ae9143f4fd7270ede7174884
Auto-Submitted: auto-generated
Date: Tue, 24 Nov 2026 17:31:16 +0000
Message-Id: <6b05c9e4.12882.f739357@gitrepo.freebsd.org>

The branch main has been updated by olivier:

URL: https://cgit.FreeBSD.org/src/commit/?id=e5477acb8a8b7f69ae9143f4fd7270ede7174884

commit e5477acb8a8b7f69ae9143f4fd7270ede7174884
Author:     Olivier Cochard <olivier@FreeBSD.org>
AuthorDate: 2026-11-24 07:18:47 +0000
Commit:     Olivier Cochard <olivier@FreeBSD.org>
CommitDate: 2026-11-24 17:26:21 +0000

    cd9660 tests: Require the cd9660 kernel module
    
    When cd9660(4) is not loaded and cannot be loaded, mount(8) fails
    with ENODEV instead of the expected EINVAL, and cd9660_rrip_pr296853
    fails rather than skips.
    
    Reviewed by:    jfree
    Approved by:    jfree
    Fixes:          1a4c2eedad5b ("cd9660: Fix dereferencing invalid RR outlen ptr")
    Sponsored by:   Netflix
    Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/132
---
 tests/sys/fs/cd9660/cd9660_test.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/sys/fs/cd9660/cd9660_test.sh b/tests/sys/fs/cd9660/cd9660_test.sh
index d817b635d297..d0ea944c09b8 100755
--- a/tests/sys/fs/cd9660/cd9660_test.sh
+++ b/tests/sys/fs/cd9660/cd9660_test.sh
@@ -23,6 +23,7 @@ atf_test_case cd9660_rrip_pr296853 cleanup
 
 cd9660_rrip_pr296853_head() {
 	atf_set "descr" "Regression test for PR 296853"
+	atf_set "require.kmods" "cd9660"
 	atf_set "require.progs" "makefs mdconfig mount umount"
 	atf_set "require.user" "root"
 }

