From nobody Mon Sep 22 04:53:49 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVW3K5x2dz68ZdL; Mon, 22 Sep 2025 04:53:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVW3K5Pr9z3NZW; Mon, 22 Sep 2025 04:53:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758516829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y6P9GSgtY6aINs6dXrU+wZh53/4CtjcY61t6g4dyteU=; b=vUz/+GREp7EPpCWET8O5Sz+gPjqOiIhaB2cj0OKyn7+PSQ3SXHQWb28/T2cBEHOVtFcwEr MMm6bMjR0nBKSs4DqEwseMz+j+WhXEGC4/9uvdYnx26bt4/6GiF6+9iZL+zFc4OI8Q4YyX tYen9U+xHpSaepVG4w9meEnrGBMNAOWcef8DBwnHoF+6PL0O4XkGClr3Ud5PzZyrU1zGEL s7ww92jUaaYxTTRl7kpJXpzoqEFAywEiBNjXNoShH8j0vW+n2hHbiSNOO93xO2P1r2EurJ 0fT5GA6/G/Pu3GOJFyGenSSwx/E/0uKjxc1pxg8aPLU8Dj6ylM1fdrKfrNnbHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758516829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y6P9GSgtY6aINs6dXrU+wZh53/4CtjcY61t6g4dyteU=; b=l7ulxSLD00UHMwC+XjnfbT+p79M5zAsIqKeFGiHqsVr9JYM3dnQP+NxKNx677HpNQyoUjU /L89DF/9BXOIz6PD1lfNBGH/SfNG75SCBKVJAGOCwwxnPwKDcezcjTzQNgcgT4KdE+mw6X Jk0/eI0xJ7IHOaoA0/NWV8GcJVVpa7NQcA8gap8fAbujRJBrC3GMgZgjfSJ6w2lXkZYeaW xc3657MI/wesn0ZYItIDrzwheiA6gkjQ2W4AZSom12kL4HW/6/lw1VlBiLkMGqoK/O6LeY EHBw9ObbJFhd74WOdVfPB3OWoYNnydNp3zE170sNJYSte5BumZsiZlaXbs2E4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758516829; a=rsa-sha256; cv=none; b=YE2uadMG25Pq1k8+RigblZMu4iPdrBKUh/KiPxzlQFQ6fkDoNRB2XMPMAsmpoRbtwWthLo G0YwKO9ssLAU7qUnXWyNq4D3rUO36g4Kdr2xhqg5JoXeCunFgptuD6qUAncWY5TlfW0mnR Gz2hER8GC3a2uA7G87doyXONRrndmHOCNwVlKnSahvkNa8pzY0kkw2DM2ysZ4w4bID3FzI 9s8tJtS08u6fQn7U1HX3iNrobtFwpccf0WRMWXr6ETpcejUnWnNn2LLzuXEALFXc8ORBus DEyc/+ZsKWE3XHnCbRVp1tC4qgeJ8n0CmouX3+1Ais3x6WrSH3+EOah7AfdcMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVW3K4tbLzmNn; Mon, 22 Sep 2025 04:53:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58M4rnTA092663; Mon, 22 Sep 2025 04:53:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58M4rnPA092660; Mon, 22 Sep 2025 04:53:49 GMT (envelope-from git) Date: Mon, 22 Sep 2025 04:53:49 GMT Message-Id: <202509220453.58M4rnPA092660@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: de19a7d54d30 - stable/15 - Revert "zfs readdir: if there were no dirents to copy out, return EINVAL same as UFS" List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: de19a7d54d30483343dbc526af8e0b4cb83892f7 Auto-Submitted: auto-generated The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=de19a7d54d30483343dbc526af8e0b4cb83892f7 commit de19a7d54d30483343dbc526af8e0b4cb83892f7 Author: Konstantin Belousov AuthorDate: 2025-09-19 17:05:08 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-21 23:25:16 +0000 Revert "zfs readdir: if there were no dirents to copy out, return EINVAL same as UFS" PR: 289485, 289678 (cherry picked from commit 932e404f12c172e3d4ec47dedee02da400ef8f92) --- sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c index 174141a5deab..6b55329da7a7 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c @@ -1695,7 +1695,6 @@ zfs_readdir(vnode_t *vp, zfs_uio_t *uio, cred_t *cr, int *eofp, objset_t *os; caddr_t outbuf; size_t bufsize; - ssize_t orig_resid; zap_cursor_t zc; zap_attribute_t *zap; uint_t bytes_wanted; @@ -1744,7 +1743,6 @@ zfs_readdir(vnode_t *vp, zfs_uio_t *uio, cred_t *cr, int *eofp, error = 0; os = zfsvfs->z_os; offset = zfs_uio_offset(uio); - orig_resid = zfs_uio_resid(uio); prefetch = zp->z_zn_prefetch; zap = zap_attribute_long_alloc(); @@ -1924,7 +1922,7 @@ update: kmem_free(outbuf, bufsize); if (error == ENOENT) - error = orig_resid == zfs_uio_resid(uio) ? EINVAL : 0; + error = 0; ZFS_ACCESSTIME_STAMP(zfsvfs, zp); From nobody Mon Sep 22 04:53:50 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVW3M06bjz68ZXC; Mon, 22 Sep 2025 04:53:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVW3L6XBdz3Ncw; Mon, 22 Sep 2025 04:53:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758516830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F2ZkE2KaincyMHPj7kqtqAXG7BDir5UazXY74MDXGks=; b=DNtaadOhhBLnvQCGphbnSnMjSU1YrI3PYB9ORfQMB9A5YebiuT7SDiP+M7snA+SvCNPGWL F0DZH4PPv4wr9LEZCA0ra5OyeeSppciNfm0Ql3/eWDDotoJwbU3l0GpppPnAVeGAE3tfWs X8gzjVL6qXJRWnKvlLYHtdWkyOcj0TSabcEtbo8UynlSzQ7h0eHPbRud1u0TdqA5fE/f8/ tXGVw4+WxWksALVO0zOyaEna98h8KOfD8MMBDZKVshAl1dBGR1Co0WNaEIdc2+n03ccHXW BAzKCLX5hhBX8P+0veGN4JU0dPDdVNeQSEWjgHcOjX1gQzI+0LFYyXlp5D2N5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758516830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F2ZkE2KaincyMHPj7kqtqAXG7BDir5UazXY74MDXGks=; b=QduQ5+DOgBs8kMIzocxgMNr1w4pztS9FTX5rmLqO+Vpu7R7rgxK/rW1QqE6hOSsmUBK+15 Smn6aHbSTrOc7HqRCqsR4CRt8RhJ8wDrhSkiJw288VmH7WjqN9CsLdwD3jUt7YsBw7J45e DZi2o1bzYRkHWYEtt2hW27GonKfWUDa8Ve0wUsHq5nA0Qlj8Gx/QwWt70w3ROXQ0DSl86P sNJNKq7KFdL+xvMYHeXKpca/OnF843doOdiSvmE/eAfSmG729aeyQFETmVl1CDQVSnd5qN WFSSMYzOS95IMtiALtxTSgcFLdP1gQBsgSMVJs5P+ZQrdXn9mzhX2/HevQB5mQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758516830; a=rsa-sha256; cv=none; b=bRu5hpwMfgiRWYUJNNKSn+9Uvq8N3Z6AsXN+p8pEs6sBTiSaCMcpKjb/Mx1UACEYr7gjDX xQvHoFPBTYGe+kgtNArMZc2WdusiXlo5l+/n+dv6sFZa4ny1lPO/i2cuc/cCtvpYpMky7Q M3zOmdS1FPYOm0IsBMoyySqnVq2DoF+fbVNPRaw84pl+k3mG1cctbCGJHbaLAjpApX3WKq tWRZKsWrW3qlDT19W8YzViUPbn0ApASt+Lpo0GB6NuTbDlQ6WhjavWgE8AVqzTrtWcsdJR fxAR7/u5SZWwWcWZxgPdvLFjrIqZdfdKRDdn13duxJA2P0SUfyCrIF+L3Dcbhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVW3L5rKMzmTj; Mon, 22 Sep 2025 04:53:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58M4roku092699; Mon, 22 Sep 2025 04:53:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58M4roQs092696; Mon, 22 Sep 2025 04:53:50 GMT (envelope-from git) Date: Mon, 22 Sep 2025 04:53:50 GMT Message-Id: <202509220453.58M4roQs092696@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 23004dbe58f6 - stable/15 - Revert "zfsctl_root_readdir: if there were no dirents to copy out, return EINVAL" List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 23004dbe58f62be4e9646ed96192ad4aa556a3eb Auto-Submitted: auto-generated The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=23004dbe58f62be4e9646ed96192ad4aa556a3eb commit 23004dbe58f62be4e9646ed96192ad4aa556a3eb Author: Konstantin Belousov AuthorDate: 2025-09-19 17:06:54 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-21 23:25:16 +0000 Revert "zfsctl_root_readdir: if there were no dirents to copy out, return EINVAL" (cherry picked from commit 72924ce99c7f177db486bd2764a76bcf25892a17) --- .../openzfs/module/os/freebsd/zfs/zfs_ctldir.c | 40 ++++++++-------------- 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c index a222c5de4a2a..4de48e013ec4 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c @@ -674,7 +674,6 @@ zfsctl_root_readdir(struct vop_readdir_args *ap) zfs_uio_t uio; int *eofp = ap->a_eofflag; off_t dots_offset; - ssize_t orig_resid; int error; zfs_uio_init(&uio, ap->a_uio); @@ -694,11 +693,13 @@ zfsctl_root_readdir(struct vop_readdir_args *ap) return (0); } - orig_resid = zfs_uio_resid(&uio); error = sfs_readdir_common(zfsvfs->z_root, ZFSCTL_INO_ROOT, ap, &uio, &dots_offset); - if (error != 0) - goto err; + if (error != 0) { + if (error == ENAMETOOLONG) /* ran out of destination space */ + error = 0; + return (error); + } if (zfs_uio_offset(&uio) != dots_offset) return (SET_ERROR(EINVAL)); @@ -711,11 +712,8 @@ zfsctl_root_readdir(struct vop_readdir_args *ap) entry.d_reclen = sizeof (entry); error = vfs_read_dirent(ap, &entry, zfs_uio_offset(&uio)); if (error != 0) { -err: - if (error == ENAMETOOLONG) { - error = orig_resid == zfs_uio_resid(&uio) ? - EINVAL : 0; - } + if (error == ENAMETOOLONG) + error = 0; return (SET_ERROR(error)); } if (eofp != NULL) @@ -1060,21 +1058,17 @@ zfsctl_snapdir_readdir(struct vop_readdir_args *ap) zfs_uio_t uio; int *eofp = ap->a_eofflag; off_t dots_offset; - ssize_t orig_resid; int error; zfs_uio_init(&uio, ap->a_uio); - orig_resid = zfs_uio_resid(&uio); ASSERT3S(vp->v_type, ==, VDIR); error = sfs_readdir_common(ZFSCTL_INO_ROOT, ZFSCTL_INO_SNAPDIR, ap, &uio, &dots_offset); if (error != 0) { - if (error == ENAMETOOLONG) { /* ran out of destination space */ - error = orig_resid == zfs_uio_resid(&uio) ? - EINVAL : 0; - } + if (error == ENAMETOOLONG) /* ran out of destination space */ + error = 0; return (error); } @@ -1092,13 +1086,9 @@ zfsctl_snapdir_readdir(struct vop_readdir_args *ap) dsl_pool_config_exit(dmu_objset_pool(zfsvfs->z_os), FTAG); if (error != 0) { if (error == ENOENT) { - if (orig_resid == zfs_uio_resid(&uio)) { - error = EINVAL; - } else { - error = 0; - if (eofp != NULL) - *eofp = 1; - } + if (eofp != NULL) + *eofp = 1; + error = 0; } zfs_exit(zfsvfs, FTAG); return (error); @@ -1111,10 +1101,8 @@ zfsctl_snapdir_readdir(struct vop_readdir_args *ap) entry.d_reclen = sizeof (entry); error = vfs_read_dirent(ap, &entry, zfs_uio_offset(&uio)); if (error != 0) { - if (error == ENAMETOOLONG) { - error = orig_resid == zfs_uio_resid(&uio) ? - EINVAL : 0; - } + if (error == ENAMETOOLONG) + error = 0; zfs_exit(zfsvfs, FTAG); return (SET_ERROR(error)); } From nobody Mon Sep 22 04:54:34 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVW4B3GHmz68ZJt; Mon, 22 Sep 2025 04:54:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVW4B2dSwz3Pdw; Mon, 22 Sep 2025 04:54:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758516874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6RYA3RJdF5d1Oz6I3SvU6oJgyGxWglH9Y3BnddYLxEo=; b=TcgCFldTm1GAPwDQVUXPn4pTA60Q+q0QXFkwjmQPDTi10JH2w7Twc590UJti6ZBNVOqtiz NnhWg8tWcnHNRbwgTXzQCnDuSnaK3/T5cDogrmfX4frofdW4z69PWnBFg5buCgrO2wIZ1H VlpbqkjCbVdr57s1R2sAtrlwQtRYF13XUD70OxluvN+2xOim4P7Aix267O0EQCdVlXhInH Gsxj58ZodFsqkDoiwLqnMHnavEqHg+sx5Uq6+Nm3iJt3gah4FrtIpCS156rBELYGZrRw+c N59uo75w8G7NVneglmPZlSw7SUTG3Kc+vnxC6CoVr3tLaanT19T5P7fES7j9Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758516874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6RYA3RJdF5d1Oz6I3SvU6oJgyGxWglH9Y3BnddYLxEo=; b=lM/ULFT3zpMGQQPmg9PJS9GANQfRVaP2BEc6ZbO2GK+m2E3DYyyKKRl3ewCZlGkyHwsWqc /IygAZhFcDRlxx3msUkmq2pL57zpYkkzmWhCxq+J0O8PRGC7L708iUNRyRy+cJ7BHjbVrO kjUxjVB7m6LwrHkHFZD8EMXls1bb7BCox1OZbAY5sr2S+rlbwOQe87tjcIRbHZVYZf6d0l G/eSh+7VpwnxAaX+ZtdNCDyaoP14MVifv0+HpTWHr1Ibih7EENb69w+941Rq6G3RdJPEh1 2TOy1H5VOWR3AtvdaVtA/ZgHvsNc4YUMsphEG/saLo/o9792P3d2rjL696dZ7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758516874; a=rsa-sha256; cv=none; b=b3L16yhozDUyr0I3iOs0r7g3WVQGe0KnXqIvq/Wmnuk7J9f3sczkClNF9f/s6BtbjGDSx1 SvpF8aRApk5CZImBbIvaLLzXL0+h0LYsyUuA2NRiDSqi+JG9Z1CoQndxVUO0/z4733BQLm P9On6CMHic5PSmbQ2mcJiN117kU2WdbYSmNh1AYf4wfSjRDqFgstR6cNPjZH7dpi2OFBop OEpYRPmkcs4L1kWBgSV/tWue2u5YeMoocWxNtpSJJebGq7pVR1J5ynPPh6nt/KY6uG5OBG jygZMS378+DwmfoHwzTGsClzVORMTXfWryDQZDgdPZPS2oSCi6ZiI1WDpZJsKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVW4B21SBzmLp; Mon, 22 Sep 2025 04:54:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58M4sYI0093038; Mon, 22 Sep 2025 04:54:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58M4sY6r093035; Mon, 22 Sep 2025 04:54:34 GMT (envelope-from git) Date: Mon, 22 Sep 2025 04:54:34 GMT Message-Id: <202509220454.58M4sY6r093035@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 5367bef13886 - stable/14 - Revert "zfs readdir: if there were no dirents to copy out, return EINVAL same as UFS" List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5367bef138862b21f937a66b5647f8f81e6f2ab7 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5367bef138862b21f937a66b5647f8f81e6f2ab7 commit 5367bef138862b21f937a66b5647f8f81e6f2ab7 Author: Konstantin Belousov AuthorDate: 2025-09-19 17:05:08 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-22 04:54:00 +0000 Revert "zfs readdir: if there were no dirents to copy out, return EINVAL same as UFS" PR: 289485, 289678 (cherry picked from commit 932e404f12c172e3d4ec47dedee02da400ef8f92) --- sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c index f87182d1c484..c477ad55dbaa 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c @@ -1561,7 +1561,6 @@ zfs_readdir(vnode_t *vp, zfs_uio_t *uio, cred_t *cr, int *eofp, objset_t *os; caddr_t outbuf; size_t bufsize; - ssize_t orig_resid; zap_cursor_t zc; zap_attribute_t zap; uint_t bytes_wanted; @@ -1610,7 +1609,6 @@ zfs_readdir(vnode_t *vp, zfs_uio_t *uio, cred_t *cr, int *eofp, error = 0; os = zfsvfs->z_os; offset = zfs_uio_offset(uio); - orig_resid = zfs_uio_resid(uio); prefetch = zp->z_zn_prefetch; /* @@ -1788,7 +1786,7 @@ update: kmem_free(outbuf, bufsize); if (error == ENOENT) - error = orig_resid == zfs_uio_resid(uio) ? EINVAL : 0; + error = 0; ZFS_ACCESSTIME_STAMP(zfsvfs, zp); From nobody Mon Sep 22 04:54:35 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVW4C3wmNz68ZJv; Mon, 22 Sep 2025 04:54:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVW4C30bCz3PhG; Mon, 22 Sep 2025 04:54:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758516875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K8ageN5embyoczY2q2Mash8D0ofamrg6tmkH64yxzU0=; b=Y7NKcyhk1k1/R1XJTCgEoFUhCPgLo92ZEPRyPAgIw8GVIUJ6KYTLOnLzkZ1eV4C05OSp4x ec8Xv+u9eyqHfzxH8fFYIpy9Iu3aTGbmClcjkNFwIGMzkrIrZpGGMULNK8KSFSybj22LHF rOJzdII1O7xjJx1tZIEi2yr5EcIuR4KNbLLwBa4G+vrROuRXNAXk5IfC3JkNRekneFSZdV ED0v2Nype4cHvHws8G9fHtWu643Q3SFxeMx2Crlx4HnXEL+jyldnPIsbYh15KprkI8iUT8 uDAVgcLAumZGlDChN202fyRgyD88RS1FEa0+CQ03u3mkovOgiiLJAvykZzHNRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758516875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K8ageN5embyoczY2q2Mash8D0ofamrg6tmkH64yxzU0=; b=khnLuwD0XFZpBH6132WkaNf6opNUyjoKDW7/KHfrPz1w5G095pAgVakwyop6kQRLHHVPP8 2eCoWXcpi0KnZyLiFacCLisnm3n2Td7fy2PgBejFIcEa9RYu/tXLrC1Tat30xEHC7Csac4 dTm5IA5bUCZzJxcwohsknAGTbUvhYIKssLsWT4p8KRCtq2oPopkumT3yu2N9A6R5306P3b C5leja5PhXwHMJzfeusgTC4iSab+/K/Ow0q0m44fkPrrQkxCXcb9c3KjVB9opC04Apeoc7 +NAHf7i+de7+Z45ZUsYsK04ldKZfHdQDWx4oPm6iRKk6OASeD14l1D9CT5uzEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758516875; a=rsa-sha256; cv=none; b=QxYlQSCHV/zra+2B5wpK/IWEqPKwF8cNMZMXHlRDBpsIUbNNw/ZbfX0QfXC47PT1XAgbpn DZQmMUFCp4ZkGOi+ZSnUMC+ZRShHhVkLjb1svg4rII+rLmjx7lHjw9GlsIW952zkIuWBOa yav8gsesSmQM22+KZ2ALGS3ibR4SC2BOWX7vWxn7Se5IY8CPOcskNyN949mwweYDKPN2AR yXsFZDa0OeRl2JYyVX9b3ZZV5diR+yXboyqxPB8QHTTQv45e5YAmiGyuhAM+bEavi8+U0t QeRHG8zsdls5e+B7V2kb43jmbAYqGefNvAWPP1qgArWXCXmcCWsIuGsFIldy1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVW4C2c13zmNp; Mon, 22 Sep 2025 04:54:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58M4sZe3093075; Mon, 22 Sep 2025 04:54:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58M4sZ7B093072; Mon, 22 Sep 2025 04:54:35 GMT (envelope-from git) Date: Mon, 22 Sep 2025 04:54:35 GMT Message-Id: <202509220454.58M4sZ7B093072@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: bd49a8db47dd - stable/14 - Revert "zfsctl_root_readdir: if there were no dirents to copy out, return EINVAL" List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: bd49a8db47dd3a825a48f4dcf1c8684675a502c2 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=bd49a8db47dd3a825a48f4dcf1c8684675a502c2 commit bd49a8db47dd3a825a48f4dcf1c8684675a502c2 Author: Konstantin Belousov AuthorDate: 2025-09-19 17:06:54 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-22 04:54:00 +0000 Revert "zfsctl_root_readdir: if there were no dirents to copy out, return EINVAL" (cherry picked from commit 72924ce99c7f177db486bd2764a76bcf25892a17) --- .../openzfs/module/os/freebsd/zfs/zfs_ctldir.c | 40 ++++++++-------------- 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c index 0c0112c29ae7..3f955b296f1e 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c @@ -673,7 +673,6 @@ zfsctl_root_readdir(struct vop_readdir_args *ap) zfs_uio_t uio; int *eofp = ap->a_eofflag; off_t dots_offset; - ssize_t orig_resid; int error; zfs_uio_init(&uio, ap->a_uio); @@ -693,11 +692,13 @@ zfsctl_root_readdir(struct vop_readdir_args *ap) return (0); } - orig_resid = zfs_uio_resid(&uio); error = sfs_readdir_common(zfsvfs->z_root, ZFSCTL_INO_ROOT, ap, &uio, &dots_offset); - if (error != 0) - goto err; + if (error != 0) { + if (error == ENAMETOOLONG) /* ran out of destination space */ + error = 0; + return (error); + } if (zfs_uio_offset(&uio) != dots_offset) return (SET_ERROR(EINVAL)); @@ -710,11 +711,8 @@ zfsctl_root_readdir(struct vop_readdir_args *ap) entry.d_reclen = sizeof (entry); error = vfs_read_dirent(ap, &entry, zfs_uio_offset(&uio)); if (error != 0) { -err: - if (error == ENAMETOOLONG) { - error = orig_resid == zfs_uio_resid(&uio) ? - EINVAL : 0; - } + if (error == ENAMETOOLONG) + error = 0; return (SET_ERROR(error)); } if (eofp != NULL) @@ -1059,21 +1057,17 @@ zfsctl_snapdir_readdir(struct vop_readdir_args *ap) zfs_uio_t uio; int *eofp = ap->a_eofflag; off_t dots_offset; - ssize_t orig_resid; int error; zfs_uio_init(&uio, ap->a_uio); - orig_resid = zfs_uio_resid(&uio); ASSERT3S(vp->v_type, ==, VDIR); error = sfs_readdir_common(ZFSCTL_INO_ROOT, ZFSCTL_INO_SNAPDIR, ap, &uio, &dots_offset); if (error != 0) { - if (error == ENAMETOOLONG) { /* ran out of destination space */ - error = orig_resid == zfs_uio_resid(&uio) ? - EINVAL : 0; - } + if (error == ENAMETOOLONG) /* ran out of destination space */ + error = 0; return (error); } @@ -1091,13 +1085,9 @@ zfsctl_snapdir_readdir(struct vop_readdir_args *ap) dsl_pool_config_exit(dmu_objset_pool(zfsvfs->z_os), FTAG); if (error != 0) { if (error == ENOENT) { - if (orig_resid == zfs_uio_resid(&uio)) { - error = EINVAL; - } else { - error = 0; - if (eofp != NULL) - *eofp = 1; - } + if (eofp != NULL) + *eofp = 1; + error = 0; } zfs_exit(zfsvfs, FTAG); return (error); @@ -1110,10 +1100,8 @@ zfsctl_snapdir_readdir(struct vop_readdir_args *ap) entry.d_reclen = sizeof (entry); error = vfs_read_dirent(ap, &entry, zfs_uio_offset(&uio)); if (error != 0) { - if (error == ENAMETOOLONG) { - error = orig_resid == zfs_uio_resid(&uio) ? - EINVAL : 0; - } + if (error == ENAMETOOLONG) + error = 0; zfs_exit(zfsvfs, FTAG); return (SET_ERROR(error)); } From nobody Mon Sep 22 04:57:59 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVW873sCrz68ZfC; Mon, 22 Sep 2025 04:57:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVW873Jdgz3QLT; Mon, 22 Sep 2025 04:57:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758517079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NkUwlw+NO6kW000LcQ4NUgju03ozNqWDudBmNtxu2x8=; b=AWIiAe0VfUbdMHNfkYCdrwMYm1EUdpcXvcECwlJEzrFI11AVDuHfZRo4NszaPxYIp1CSDK zOzRT4KLpEhpx0GluNYEhhTEXfmT2/EiNKKj3uq9MTy2RgQu834ejG9PqnPVMGzhV4h7jS V1IsKuGcymn6bHbpnUxt1WI6xBGnxxGoiRkhDkc4QvaSj+0WJZEKviNXHv68+1ixWgleFg 0ScKjf3/3ClvAH3MeJGtZ+EWsT+3fMMibneVKJJ1Fb6gsyic6h01qcSNiCHQfvXv8ayRqY /UP0Jfax1N2civcc4MPgkrsMUToJ6TvZHZgSoRid12MLIknyFXef+Pu+w2o8Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758517079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NkUwlw+NO6kW000LcQ4NUgju03ozNqWDudBmNtxu2x8=; b=Cui+DfKLNXlV4a/k9PSdwddeFIK8jAdvcs5HU44PtTjtI81M1Hyc36G8KtMQi/APHVzA13 oEjcH1v2KelCxL9Bn83WHsNxwcIROAZSfoDbZg093x4Y7XDBvlrH/qFanirD4xQHRVkj3A g8gn4GZgWp45/M/xpIuGNdn5ZVYefzt3AQ9YycGYvBUyeEYv/6f3aC7O81xtWnA4Y6cmfJ ddifA+yvLc88SmLGZ7+ubfGOhi13S6wtc0xY8XG63yC25XB/2UuzUesLhwnarbjJLVFsUk zXeEa+Pg7NWVKyvrqgRlppArJXCMEg48114xURIESWSUncwdJGm0pttsNNkPrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758517079; a=rsa-sha256; cv=none; b=kAWSaMdkfhrGYZfONAUIBjNxfdJioq4a1SmoZEnIPa7vkeojatQ6TSN9X0ERhnBF7NqnOn Z+2TVkILFDTigtJtjZJB2qgRyc18GbSfJAjU6kmrLGHc+gW48mXE8hcaPM3I0tidIWHarU UM62ALynxuONyits+kCxtzVG/Nt0WrSs6eUxjhHNsDGL+oyfYMp/36m//OoZVikkzg5gE6 VBogaE7KGL04HsTrDg0rB4DnQwvdxlPfrmUupF7KwYaBeE2yTMTqlWbBWOYJyaEk4AdYaW j0TKoFpsAp38r34kHfhn8nNGIzKUMipdgiA7x/h4lutYyj2r6Yw25MqaUN12TA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVW872kbdzmNt; Mon, 22 Sep 2025 04:57:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58M4vxLw094321; Mon, 22 Sep 2025 04:57:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58M4vx1O094318; Mon, 22 Sep 2025 04:57:59 GMT (envelope-from git) Date: Mon, 22 Sep 2025 04:57:59 GMT Message-Id: <202509220457.58M4vx1O094318@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: c6dc9decd745 - stable/15 - iommu_get_requester(): make it more resilient against arbitrary dev arg List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c6dc9decd7455577528e198d13740bfd5216d015 Auto-Submitted: auto-generated The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c6dc9decd7455577528e198d13740bfd5216d015 commit c6dc9decd7455577528e198d13740bfd5216d015 Author: Konstantin Belousov AuthorDate: 2025-09-05 23:06:18 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-22 04:56:13 +0000 iommu_get_requester(): make it more resilient against arbitrary dev arg PR: 289318 (cherry picked from commit c745a6818bcbf33cf7f59641c925d19b3f98cea8) --- sys/dev/iommu/busdma_iommu.c | 54 ++++++++++++++++++++++++++++++++----------- sys/dev/iommu/iommu.h | 2 +- sys/kern/subr_bus.c | 13 +++++++++-- sys/x86/iommu/amd_intrmap.c | 14 ++++++++--- sys/x86/iommu/intel_intrmap.c | 8 +++++-- 5 files changed, 70 insertions(+), 21 deletions(-) diff --git a/sys/dev/iommu/busdma_iommu.c b/sys/dev/iommu/busdma_iommu.c index 6856b0551dde..668ccf056463 100644 --- a/sys/dev/iommu/busdma_iommu.c +++ b/sys/dev/iommu/busdma_iommu.c @@ -114,8 +114,8 @@ iommu_bus_dma_is_dev_disabled(int domain, int bus, int slot, int func) * domain, and must collectively be assigned to use either IOMMU or * bounce mapping. */ -device_t -iommu_get_requester(device_t dev, uint16_t *rid) +int +iommu_get_requester(device_t dev, device_t *requesterp, uint16_t *rid) { devclass_t pci_class; device_t l, pci, pcib, pcip, pcibp, requester; @@ -129,7 +129,8 @@ iommu_get_requester(device_t dev, uint16_t *rid) pci = device_get_parent(dev); if (pci == NULL || device_get_devclass(pci) != pci_class) { *rid = 0; /* XXXKIB: Could be ACPI HID */ - return (requester); + *requesterp = NULL; + return (ENOTTY); } *rid = pci_get_rid(dev); @@ -141,16 +142,39 @@ iommu_get_requester(device_t dev, uint16_t *rid) */ for (;;) { pci = device_get_parent(l); - KASSERT(pci != NULL, ("iommu_get_requester(%s): NULL parent " - "for %s", device_get_name(dev), device_get_name(l))); - KASSERT(device_get_devclass(pci) == pci_class, - ("iommu_get_requester(%s): non-pci parent %s for %s", - device_get_name(dev), device_get_name(pci), - device_get_name(l))); + if (pci == NULL) { + if (bootverbose) { + printf( + "iommu_get_requester(%s): NULL parent for %s\n", + device_get_name(dev), device_get_name(l)); + } + *rid = 0; + *requesterp = NULL; + return (ENXIO); + } + if (device_get_devclass(pci) != pci_class) { + if (bootverbose) { + printf( + "iommu_get_requester(%s): non-pci parent %s for %s\n", + device_get_name(dev), device_get_name(pci), + device_get_name(l)); + } + *rid = 0; + *requesterp = NULL; + return (ENXIO); + } pcib = device_get_parent(pci); - KASSERT(pcib != NULL, ("iommu_get_requester(%s): NULL bridge " - "for %s", device_get_name(dev), device_get_name(pci))); + if (pcib == NULL) { + if (bootverbose) { + printf( + "iommu_get_requester(%s): NULL bridge for %s\n", + device_get_name(dev), device_get_name(pci)); + } + *rid = 0; + *requesterp = NULL; + return (ENXIO); + } /* * The parent of our "bridge" isn't another PCI bus, @@ -229,7 +253,8 @@ iommu_get_requester(device_t dev, uint16_t *rid) } } } - return (requester); + *requesterp = requester; + return (0); } struct iommu_ctx * @@ -237,10 +262,13 @@ iommu_instantiate_ctx(struct iommu_unit *unit, device_t dev, bool rmrr) { device_t requester; struct iommu_ctx *ctx; + int error; bool disabled; uint16_t rid; - requester = iommu_get_requester(dev, &rid); + error = iommu_get_requester(dev, &requester, &rid); + if (error != 0) + return (NULL); /* * If the user requested the IOMMU disabled for the device, we diff --git a/sys/dev/iommu/iommu.h b/sys/dev/iommu/iommu.h index b1858f0df9f7..55044042c5d2 100644 --- a/sys/dev/iommu/iommu.h +++ b/sys/dev/iommu/iommu.h @@ -170,7 +170,7 @@ void iommu_domain_unload(struct iommu_domain *domain, void iommu_unit_pre_instantiate_ctx(struct iommu_unit *iommu); struct iommu_ctx *iommu_instantiate_ctx(struct iommu_unit *iommu, device_t dev, bool rmrr); -device_t iommu_get_requester(device_t dev, uint16_t *rid); +int iommu_get_requester(device_t dev, device_t *requester, uint16_t *rid); int iommu_init_busdma(struct iommu_unit *unit); void iommu_fini_busdma(struct iommu_unit *unit); diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 62a3da964c37..bf5bda7e058d 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -280,6 +280,9 @@ device_sysctl_handler(SYSCTL_HANDLER_ARGS) struct sbuf sb; device_t dev = (device_t)arg1; device_t iommu; +#ifdef IOMMU + device_t requester; +#endif int error; uint16_t rid; const char *c; @@ -314,9 +317,15 @@ device_sysctl_handler(SYSCTL_HANDLER_ARGS) } rid = 0; #ifdef IOMMU - iommu_get_requester(dev, &rid); + error = iommu_get_requester(dev, &requester, &rid); + /* + * Do not return requester error from sysctl, iommu + * unit might be assigned by other means. + */ +#else + error = ENXIO; #endif - if (rid != 0) + if (error == 0) sbuf_printf(&sb, "%srid=%#x", c, rid); break; default: diff --git a/sys/x86/iommu/amd_intrmap.c b/sys/x86/iommu/amd_intrmap.c index a4c1a7836268..f8900fe0561f 100644 --- a/sys/x86/iommu/amd_intrmap.c +++ b/sys/x86/iommu/amd_intrmap.c @@ -112,6 +112,8 @@ 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; @@ -180,7 +182,8 @@ amdiommu_map_msi_intr(device_t src, u_int cpu, u_int vector, *addr |= ((uint64_t)cpu & 0xffffff00) << 32; } - iommu_get_requester(src, &rid); + error = iommu_get_requester(src, &requester, &rid); + MPASS(error == 0); AMDIOMMU_LOCK(unit); amdiommu_qi_invalidate_ir_locked(unit, rid); AMDIOMMU_UNLOCK(unit); @@ -220,6 +223,7 @@ static struct amdiommu_ctx * amdiommu_ir_find(device_t src, uint16_t *ridp, bool *is_iommu) { devclass_t src_class; + device_t requester; struct amdiommu_unit *unit; struct amdiommu_ctx *ctx; uint32_t edte; @@ -251,7 +255,8 @@ amdiommu_ir_find(device_t src, uint16_t *ridp, bool *is_iommu) error = amdiommu_find_unit(src, &unit, &rid, &dte, &edte, bootverbose); if (error == 0) { - iommu_get_requester(src, &rid); + error = iommu_get_requester(src, &requester, &rid); + MPASS(error == 0); ctx = amdiommu_get_ctx_for_dev(unit, src, rid, 0, false /* XXXKIB */, false, dte, edte); } @@ -266,6 +271,8 @@ amdiommu_ir_free_irte(struct amdiommu_ctx *ctx, device_t src, u_int cookie) { struct amdiommu_unit *unit; + device_t requester; + int error __diagused; uint16_t rid; MPASS(ctx != NULL); @@ -291,7 +298,8 @@ amdiommu_ir_free_irte(struct amdiommu_ctx *ctx, device_t src, atomic_thread_fence_rel(); bzero(irte, sizeof(*irte)); } - iommu_get_requester(src, &rid); + error = iommu_get_requester(src, &requester, &rid); + MPASS(error == 0); AMDIOMMU_LOCK(unit); amdiommu_qi_invalidate_ir_locked(unit, rid); AMDIOMMU_UNLOCK(unit); diff --git a/sys/x86/iommu/intel_intrmap.c b/sys/x86/iommu/intel_intrmap.c index 06e41523624b..f12a0c9bae9b 100644 --- a/sys/x86/iommu/intel_intrmap.c +++ b/sys/x86/iommu/intel_intrmap.c @@ -234,6 +234,8 @@ dmar_ir_find(device_t src, uint16_t *rid, int *is_dmar) { devclass_t src_class; struct dmar_unit *unit; + device_t requester; + int error __diagused; /* * We need to determine if the interrupt source generates FSB @@ -253,8 +255,10 @@ dmar_ir_find(device_t src, uint16_t *rid, int *is_dmar) unit = dmar_find_hpet(src, rid); } else { unit = dmar_find(src, bootverbose); - if (unit != NULL && rid != NULL) - iommu_get_requester(src, rid); + if (unit != NULL && rid != NULL) { + error = iommu_get_requester(src, &requester, rid); + MPASS(error == 0); + } } return (unit); } From nobody Mon Sep 22 04:59:33 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVW9x3d3Xz68Zt6; Mon, 22 Sep 2025 04:59:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVW9x2Wk4z3Qy5; Mon, 22 Sep 2025 04:59:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758517173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ND98FnKMMVEPG2XuM9KH733kVKekQAyG55GJ7xAt1WY=; b=R2qwdxtOyyUs1BtQ9IEyCiRXn8m292B9/uN9G6Muxguv0EaX62g2izuKM28JsU2WF9Itl2 DnFHIHRT9NkkvEMWRZC3fZI+rw+FE/mqasDEEg975efrfeuD+jSuuTkXjPxS3xdcHsx5uW WbQqhjvahUk1SgFobTnuXHSxLzzMau16fD2cmSIgatBuJw0xdkPjbwZaCaySy9QY6Iwz9i QK1O0jRjAaOSI2ZINSIplJNiOM3hg0iHKFetFL53twwpW7kfNimBccHpzzKKS0DGeyAk9V nH7PTJq6ZDBj7uBAW1DpYwEzCaiFTUuLhZdp4LzfaHcbvJlS+2dmHSbTMLfFtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758517173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ND98FnKMMVEPG2XuM9KH733kVKekQAyG55GJ7xAt1WY=; b=yaNaDjuY0c85gE0BMY4usnjXP2zY7U8lgqjFJaQAHAJ7AUXWxkaBEfOaNhHvCjSf1NxIc+ RviNapQbqKDPCKSIgcN4CNeXrZc6ARzRwQP7IgApxa2zQwoaSaK42eeC7UjrstErP1cP39 KLQr/ovV1hMYnF9M2DhOKZDfkeX87bGxajK/g1QbilcDqfVrFTSIdVdqrOGGXgx2Ag++PE aVR2RGGPAS43/mraqlZsQIaA804JP63mmKQsEvzRhdjg/fVAXMvu7AKg6VgOr6+vd1T1ZW CtDP+DP3nykcjipB5782NTpAP1gewgTCYGa15gJOQcNqJGTrQDYQD62YdDQ+tQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758517173; a=rsa-sha256; cv=none; b=rMKkAggFtvc8QT9VdPKj2vs3rctZngf4qsYLlYrBqEihb1D75GRZjA2L2xxihI4LSWB3QL MgpVe1ZvujFZn9Rnn8SnCGEgwYcnjeobHiCYZajLb/y3EuogKr5axxzOP7O0c/kATUMbmN a4+GN9YanrGz3GwP1RNZXa71AvaELLgV7Mby6Gaf7K0KxdGt8WLyE4gX60deL9/TzhaCRr W691ddGHOWWzW0ABeYDveFRnf1vGqsrbQ9+KBF/nVnR+ZZnQQ/vzNWBj2+REKzm25+QKVr ppgJWWLjBKdCPJmKsIlcExElKQK/0785us64Y5B5AZguLDRo0yOzIKo1UPtJbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVW9x1zP0zm43; Mon, 22 Sep 2025 04:59:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58M4xXRj094866; Mon, 22 Sep 2025 04:59:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58M4xXB7094863; Mon, 22 Sep 2025 04:59:33 GMT (envelope-from git) Date: Mon, 22 Sep 2025 04:59:33 GMT Message-Id: <202509220459.58M4xXB7094863@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: ea4e916858ef - stable/14 - iommu_get_requester(): make it more resilient against arbitrary dev arg List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ea4e916858ef29a29236b292c188d83eac5e1ebc Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ea4e916858ef29a29236b292c188d83eac5e1ebc commit ea4e916858ef29a29236b292c188d83eac5e1ebc Author: Konstantin Belousov AuthorDate: 2025-09-05 23:06:18 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-22 04:59:08 +0000 iommu_get_requester(): make it more resilient against arbitrary dev arg PR: 289318 (cherry picked from commit c745a6818bcbf33cf7f59641c925d19b3f98cea8) --- sys/dev/iommu/busdma_iommu.c | 54 ++++++++++++++++++++++++++++++++----------- sys/dev/iommu/iommu.h | 2 +- sys/kern/subr_bus.c | 13 +++++++++-- sys/x86/iommu/amd_intrmap.c | 14 ++++++++--- sys/x86/iommu/intel_intrmap.c | 8 +++++-- 5 files changed, 70 insertions(+), 21 deletions(-) diff --git a/sys/dev/iommu/busdma_iommu.c b/sys/dev/iommu/busdma_iommu.c index 8c97965bcdf1..afb6267fc792 100644 --- a/sys/dev/iommu/busdma_iommu.c +++ b/sys/dev/iommu/busdma_iommu.c @@ -115,8 +115,8 @@ iommu_bus_dma_is_dev_disabled(int domain, int bus, int slot, int func) * domain, and must collectively be assigned to use either IOMMU or * bounce mapping. */ -device_t -iommu_get_requester(device_t dev, uint16_t *rid) +int +iommu_get_requester(device_t dev, device_t *requesterp, uint16_t *rid) { devclass_t pci_class; device_t l, pci, pcib, pcip, pcibp, requester; @@ -130,7 +130,8 @@ iommu_get_requester(device_t dev, uint16_t *rid) pci = device_get_parent(dev); if (pci == NULL || device_get_devclass(pci) != pci_class) { *rid = 0; /* XXXKIB: Could be ACPI HID */ - return (requester); + *requesterp = NULL; + return (ENOTTY); } *rid = pci_get_rid(dev); @@ -142,16 +143,39 @@ iommu_get_requester(device_t dev, uint16_t *rid) */ for (;;) { pci = device_get_parent(l); - KASSERT(pci != NULL, ("iommu_get_requester(%s): NULL parent " - "for %s", device_get_name(dev), device_get_name(l))); - KASSERT(device_get_devclass(pci) == pci_class, - ("iommu_get_requester(%s): non-pci parent %s for %s", - device_get_name(dev), device_get_name(pci), - device_get_name(l))); + if (pci == NULL) { + if (bootverbose) { + printf( + "iommu_get_requester(%s): NULL parent for %s\n", + device_get_name(dev), device_get_name(l)); + } + *rid = 0; + *requesterp = NULL; + return (ENXIO); + } + if (device_get_devclass(pci) != pci_class) { + if (bootverbose) { + printf( + "iommu_get_requester(%s): non-pci parent %s for %s\n", + device_get_name(dev), device_get_name(pci), + device_get_name(l)); + } + *rid = 0; + *requesterp = NULL; + return (ENXIO); + } pcib = device_get_parent(pci); - KASSERT(pcib != NULL, ("iommu_get_requester(%s): NULL bridge " - "for %s", device_get_name(dev), device_get_name(pci))); + if (pcib == NULL) { + if (bootverbose) { + printf( + "iommu_get_requester(%s): NULL bridge for %s\n", + device_get_name(dev), device_get_name(pci)); + } + *rid = 0; + *requesterp = NULL; + return (ENXIO); + } /* * The parent of our "bridge" isn't another PCI bus, @@ -230,7 +254,8 @@ iommu_get_requester(device_t dev, uint16_t *rid) } } } - return (requester); + *requesterp = requester; + return (0); } struct iommu_ctx * @@ -238,10 +263,13 @@ iommu_instantiate_ctx(struct iommu_unit *unit, device_t dev, bool rmrr) { device_t requester; struct iommu_ctx *ctx; + int error; bool disabled; uint16_t rid; - requester = iommu_get_requester(dev, &rid); + error = iommu_get_requester(dev, &requester, &rid); + if (error != 0) + return (NULL); /* * If the user requested the IOMMU disabled for the device, we diff --git a/sys/dev/iommu/iommu.h b/sys/dev/iommu/iommu.h index b1858f0df9f7..55044042c5d2 100644 --- a/sys/dev/iommu/iommu.h +++ b/sys/dev/iommu/iommu.h @@ -170,7 +170,7 @@ void iommu_domain_unload(struct iommu_domain *domain, void iommu_unit_pre_instantiate_ctx(struct iommu_unit *iommu); struct iommu_ctx *iommu_instantiate_ctx(struct iommu_unit *iommu, device_t dev, bool rmrr); -device_t iommu_get_requester(device_t dev, uint16_t *rid); +int iommu_get_requester(device_t dev, device_t *requester, uint16_t *rid); int iommu_init_busdma(struct iommu_unit *unit); void iommu_fini_busdma(struct iommu_unit *unit); diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 211fe45b1374..28d37ad8d450 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -280,6 +280,9 @@ device_sysctl_handler(SYSCTL_HANDLER_ARGS) struct sbuf sb; device_t dev = (device_t)arg1; device_t iommu; +#ifdef IOMMU + device_t requester; +#endif int error; uint16_t rid; const char *c; @@ -314,9 +317,15 @@ device_sysctl_handler(SYSCTL_HANDLER_ARGS) } rid = 0; #ifdef IOMMU - iommu_get_requester(dev, &rid); + error = iommu_get_requester(dev, &requester, &rid); + /* + * Do not return requester error from sysctl, iommu + * unit might be assigned by other means. + */ +#else + error = ENXIO; #endif - if (rid != 0) + if (error == 0) sbuf_printf(&sb, "%srid=%#x", c, rid); break; default: diff --git a/sys/x86/iommu/amd_intrmap.c b/sys/x86/iommu/amd_intrmap.c index c5c1706f1f3e..d49d40375448 100644 --- a/sys/x86/iommu/amd_intrmap.c +++ b/sys/x86/iommu/amd_intrmap.c @@ -112,6 +112,8 @@ 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; @@ -180,7 +182,8 @@ amdiommu_map_msi_intr(device_t src, u_int cpu, u_int vector, *addr |= ((uint64_t)cpu & 0xffffff00) << 32; } - iommu_get_requester(src, &rid); + error = iommu_get_requester(src, &requester, &rid); + MPASS(error == 0); AMDIOMMU_LOCK(unit); amdiommu_qi_invalidate_ir_locked(unit, rid); AMDIOMMU_UNLOCK(unit); @@ -220,6 +223,7 @@ static struct amdiommu_ctx * amdiommu_ir_find(device_t src, uint16_t *ridp, bool *is_iommu) { devclass_t src_class; + device_t requester; struct amdiommu_unit *unit; struct amdiommu_ctx *ctx; uint32_t edte; @@ -251,7 +255,8 @@ amdiommu_ir_find(device_t src, uint16_t *ridp, bool *is_iommu) error = amdiommu_find_unit(src, &unit, &rid, &dte, &edte, bootverbose); if (error == 0) { - iommu_get_requester(src, &rid); + error = iommu_get_requester(src, &requester, &rid); + MPASS(error == 0); ctx = amdiommu_get_ctx_for_dev(unit, src, rid, 0, false /* XXXKIB */, false, dte, edte); } @@ -266,6 +271,8 @@ amdiommu_ir_free_irte(struct amdiommu_ctx *ctx, device_t src, u_int cookie) { struct amdiommu_unit *unit; + device_t requester; + int error __diagused; uint16_t rid; MPASS(ctx != NULL); @@ -291,7 +298,8 @@ amdiommu_ir_free_irte(struct amdiommu_ctx *ctx, device_t src, atomic_thread_fence_rel(); bzero(irte, sizeof(*irte)); } - iommu_get_requester(src, &rid); + error = iommu_get_requester(src, &requester, &rid); + MPASS(error == 0); AMDIOMMU_LOCK(unit); amdiommu_qi_invalidate_ir_locked(unit, rid); AMDIOMMU_UNLOCK(unit); diff --git a/sys/x86/iommu/intel_intrmap.c b/sys/x86/iommu/intel_intrmap.c index 4f69e2d44996..88d46cfdf67b 100644 --- a/sys/x86/iommu/intel_intrmap.c +++ b/sys/x86/iommu/intel_intrmap.c @@ -235,6 +235,8 @@ dmar_ir_find(device_t src, uint16_t *rid, int *is_dmar) { devclass_t src_class; struct dmar_unit *unit; + device_t requester; + int error __diagused; /* * We need to determine if the interrupt source generates FSB @@ -254,8 +256,10 @@ dmar_ir_find(device_t src, uint16_t *rid, int *is_dmar) unit = dmar_find_hpet(src, rid); } else { unit = dmar_find(src, bootverbose); - if (unit != NULL && rid != NULL) - iommu_get_requester(src, rid); + if (unit != NULL && rid != NULL) { + error = iommu_get_requester(src, &requester, rid); + MPASS(error == 0); + } } return (unit); } From nobody Mon Sep 22 05:55:57 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVXR11t7tz68f2Y; Mon, 22 Sep 2025 05:55:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVXR11TzQz3ZbV; Mon, 22 Sep 2025 05:55:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758520557; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ObeY0eBCtekE5+c6D4rT15wkUoOzaUD4b32n7E0i6iQ=; b=ywcMZNIacRtVZl49v9XY2arPkkjJyMe5EJGa08K6KUiTHmheLha7gxovI/q6wCrovtPg02 /bvF3n1c1hDdOrhpWbhsgkXOA3o32Dve8yZjxQQ+BY0UBH2Qo7rqawFQK+01PP5OOQqWTY VYsET/K4o1fNhLywCPtzBfZ3cyoJR/w/2zQMmKN8V+JMVRAebSy6648fM4mCsqO6Br1tQw /RVtceu/TWfvz5hPhXp0MNIBvVNNl6ntZ0d82chUSYixVhUigZuxCgCcGPKgrE5SSn32ka U8Jt5WTdHRl8VOqtrSl7yt5kay4lfsQMZ8N17lICFbVbQehLOf6I1FMEpVdsMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758520557; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ObeY0eBCtekE5+c6D4rT15wkUoOzaUD4b32n7E0i6iQ=; b=kWbJxSpennwF/NDm3O4+K+g+mrMcaMT42SnQnUxjp4NlRdaxwQ6zl64bDn1QBKZ2FdjsjJ XqKEjzpOTRTbhozj5E2U6+0n781ydBEtCdIrRDVG1tHpe4ly2BRdl2tqJTVOSYxmBIkzsZ 6HdQRJq+Hd4Xjj8fnmYGsYQ/aD9jPsk1kuSykHI2FcpoUpNa8YBZXo7QFiePpThNsxGVz5 0WtxUm5ZPNQwZElctXX7Hz5G1LuqQ6ZLg028ZURCbwWESeN9W2OsxsabuHJSncLDtlR9lF Dbqy5NGOOvqGc2R2oqqBOLeOywnGx8zJ3HqzFS75+GJhilwUiTs5ctbmbieJ8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758520557; a=rsa-sha256; cv=none; b=FOpCFEHfAN7IGZMJVXPS+gIjYuBKjKEBHLG5wxjUVKr5lw1yNbQ9+w35fGGoJKEuvCPtVY iuTdRUp0dHq+aWIEbDBYHJMC7HFHaw4ANgB3WmQomUAC4tTm/A9yzkR4G0BKzSTXmQ0oPz CZxatbzmLFvCbRbBlbiD4I7K8ZctckWm2AipwhZ4Wvm8xj8K3ZMFyw01rESTkWM6448E1j IOeNkQpK127O54PDJ0mCjHETYRsgVb2A3x4l9OpvK+8l2Os8cUDTfJZn/TRiuAg7gUVQY4 3G6mqnND2c0M7k0EwIZ8vB2I9qnNWw/Q/JjFk1SkJp5/vym0lo2IcxCoSVoEGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVXR113SgznNy; Mon, 22 Sep 2025 05:55:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58M5tvTm005726; Mon, 22 Sep 2025 05:55:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58M5tvBe005723; Mon, 22 Sep 2025 05:55:57 GMT (envelope-from git) Date: Mon, 22 Sep 2025 05:55:57 GMT Message-Id: <202509220555.58M5tvBe005723@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Xin LI Subject: git: 78b179fe9280 - stable/15 - MFC: MFV: libexpat 2.7.2 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 78b179fe928097f0e9e9ccc15857ceb2d4a43624 Auto-Submitted: auto-generated The branch stable/15 has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=78b179fe928097f0e9e9ccc15857ceb2d4a43624 commit 78b179fe928097f0e9e9ccc15857ceb2d4a43624 Author: Xin LI AuthorDate: 2025-09-19 02:43:17 +0000 Commit: Xin LI CommitDate: 2025-09-22 05:55:22 +0000 MFC: MFV: libexpat 2.7.2 (cherry picked from commit 627b778d9e6b603a44a010d22d823ca7c392b363) --- contrib/expat/Changes | 81 +++- contrib/expat/Makefile.am | 7 +- contrib/expat/Makefile.in | 128 +++--- contrib/expat/README.md | 6 +- contrib/expat/configure.ac | 22 +- contrib/expat/doc/Makefile.in | 29 +- contrib/expat/doc/reference.html | 136 +++++- contrib/expat/doc/xmlwf.1 | 30 +- contrib/expat/doc/xmlwf.xml | 28 +- contrib/expat/examples/Makefile.in | 35 +- contrib/expat/expat_config.h.in | 12 +- contrib/expat/fuzz/xml_lpm_fuzzer.cpp | 6 +- contrib/expat/fuzz/xml_parse_fuzzer.c | 20 +- contrib/expat/fuzz/xml_parsebuffer_fuzzer.c | 24 +- contrib/expat/lib/Makefile.in | 49 ++- contrib/expat/lib/expat.h | 61 ++- contrib/expat/lib/expat_external.h | 123 +++--- contrib/expat/lib/internal.h | 8 + contrib/expat/lib/xmlparse.c | 658 +++++++++++++++++++++------- contrib/expat/lib/xmlrole.h | 34 +- contrib/expat/lib/xmltok.c | 4 +- contrib/expat/lib/xmltok.h | 226 +++++----- contrib/expat/tests/Makefile.in | 99 +++-- contrib/expat/tests/alloc_tests.c | 220 +++++++++- contrib/expat/tests/basic_tests.c | 8 +- contrib/expat/tests/benchmark/Makefile.in | 35 +- contrib/expat/tests/common.c | 11 +- contrib/expat/tests/handlers.c | 29 +- contrib/expat/tests/minicheck.h | 3 +- contrib/expat/tests/misc_tests.c | 7 +- contrib/expat/tests/nsalloc_tests.c | 11 +- contrib/expat/xmlwf/Makefile.in | 37 +- contrib/expat/xmlwf/unixfilemap.c | 6 +- contrib/expat/xmlwf/xmlfile.c | 21 +- contrib/expat/xmlwf/xmlwf.c | 21 +- contrib/expat/xmlwf/xmlwf_helpgen.py | 18 +- lib/libexpat/expat_config.h | 18 +- lib/libexpat/libbsdxml.3 | 2 +- 38 files changed, 1615 insertions(+), 658 deletions(-) diff --git a/contrib/expat/Changes b/contrib/expat/Changes index 9d6c64b6a460..092252ed1fa3 100644 --- a/contrib/expat/Changes +++ b/contrib/expat/Changes @@ -15,12 +15,16 @@ !! ClusterFuzz findings with few-days-max response times in communication !! !! in order to (1) have a sound fix ready before the end of a 90 days !! !! grace period and (2) in a sustainable manner, !! -!! - helping CPython Expat bindings with supporting Expat's billion laughs !! +!! - helping CPython Expat bindings with supporting Expat's amplification !! !! attack protection API (https://github.com/python/cpython/issues/90949): !! +!! - XML_SetAllocTrackerActivationThreshold !! +!! - XML_SetAllocTrackerMaximumAmplification !! !! - XML_SetBillionLaughsAttackProtectionActivationThreshold !! !! - XML_SetBillionLaughsAttackProtectionMaximumAmplification !! !! - helping Perl's XML::Parser Expat bindings with supporting Expat's !! !! security API (https://github.com/cpan-authors/XML-Parser/issues/102): !! +!! - XML_SetAllocTrackerActivationThreshold !! +!! - XML_SetAllocTrackerMaximumAmplification !! !! - XML_SetBillionLaughsAttackProtectionActivationThreshold !! !! - XML_SetBillionLaughsAttackProtectionMaximumAmplification !! !! - XML_SetReparseDeferralEnabled !! @@ -37,6 +41,79 @@ !! THANK YOU! Sebastian Pipping -- Berlin, 2024-03-09 !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +Release 2.7.2 Tue September 16 2025 + Security fixes: + #1018 #1034 CVE-2025-59375 -- Disallow use of disproportional amounts of + dynamic memory from within an Expat parser (e.g. previously + a ~250 KiB sized document was able to cause allocation of + ~800 MiB from the heap, i.e. an "amplification" of factor + ~3,300); once a threshold (that defaults to 64 MiB) is + reached, a maximum amplification factor (that defaults to + 100.0) is enforced, and violating documents are rejected + with an out-of-memory error. + There are two new API functions to fine-tune this new + behavior: + - XML_SetAllocTrackerActivationThreshold + - XML_SetAllocTrackerMaximumAmplification . + If you ever need to increase these defaults for non-attack + XML payload, please file a bug report with libexpat. + There is also a new environment variable + EXPAT_MALLOC_DEBUG=(0|1|2) to control the verbosity + of allocations debugging at runtime, disabled by default. + Known impact is (reliable and easy) denial of service: + CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:H/RL:O/RC:C + (Base Score: 7.5, Temporal Score: 7.2) + Please note that a layer of compression around XML can + significantly reduce the minimum attack payload size. + Distributors intending to backport (or cherry-pick) the + fix need to copy 99% of the related pull request, not just + the "lib: Implement tracking of dynamic memory allocations" + commit, to not end up with a state that literally does both + too much and too little at the same time. Appending ".diff" + to the pull request URL could be of help. + + Other changes: + #1008 #1017 Autotools: Sync CMake templates with CMake 3.31 for macOS + #1007 CMake: Drop support for CMake <3.15 + #1004 CMake: Fix off_t detection for -Werror + #1007 CMake|Windows: Fix -DEXPAT_MSVC_STATIC_CRT=ON + #1013 Windows: Drop support for Visual Studio <=16.0/2019 + #1026 xmlwf: Mention supported environment variables in + --help output + #1024 xmlwf: Fix (internal) help generator + #1034 docs: Promote the contract to call function + XML_FreeContentModel when registering a custom + element declaration handler (via a call to function + XML_SetElementDeclHandler) + #1027 docs: Add missing

..

wrap + #994 docs: Drop AppVeyor badge + #1000 tests: Fix portable_strndup + #1036 Drop casts around malloc/free/realloc that C99 does not need + #1010 Replace empty for-loops with while loops + #1011 Add const with internal XmlInitUnknownEncodingNS + #14 #1037 Drop an OpenVMS support leftover + #999 #1001 Address more clang-tidy warnings + #1030 #1038 Version info bumped from 11:2:10 (libexpat*.so.1.10.2) + to 12:0:11 (libexpat*.so.1.11.0); see https://verbump.de/ + for what these numbers do + + Infrastructure: + #1003 CI: Cover compilation on FreeBSD + #1009 #1035 CI: Upgrade Clang from 19 to 21 + #1031 CI: Make calling Cppcheck without --suppress=objectIndex + and --suppress=unknownMacro possible + #1013 CI|Windows: Get off of deprecated image "windows-2019" + #1008 #1017 .. + #1023 #1025 CI: Adapt to breaking changes in GitHub Actions + + Special thanks to: + Alexander Bluhm + Neil Pang + Theo Buehler + and + OSS-Fuzz / ClusterFuzz + Perl XML::Parser + Release 2.7.1 Thu March 27 2025 Bug fixes: #980 #989 Restore event pointer behavior from Expat 2.6.4 @@ -54,7 +131,7 @@ Release 2.7.1 Thu March 27 2025 #983 #984 Fix printf format specifiers for 32bit Emscripten #992 docs: Promote OpenSSF Best Practices self-certification #978 tests/benchmark: Resolve mistaken double close - #986 Address compiler warnings + #986 Address Frama-C warnings #990 #993 Version info bumped from 11:1:10 (libexpat*.so.1.10.1) to 11:2:10 (libexpat*.so.1.10.2); see https://verbump.de/ for what these numbers do diff --git a/contrib/expat/Makefile.am b/contrib/expat/Makefile.am index c20531a8d6c6..d612d432becb 100644 --- a/contrib/expat/Makefile.am +++ b/contrib/expat/Makefile.am @@ -58,10 +58,8 @@ pkgconfig_DATA = expat.pc pkgconfigdir = $(libdir)/pkgconfig -dist_cmake_DATA = \ - cmake/autotools/expat.cmake - nodist_cmake_DATA = \ + cmake/autotools/expat.cmake \ cmake/autotools/expat-config-version.cmake \ cmake/autotools/expat-noconfig.cmake \ cmake/expat-config.cmake @@ -70,6 +68,9 @@ cmakedir = $(libdir)/cmake/expat-@PACKAGE_VERSION@ _EXTRA_DIST_CMAKE = \ + cmake/autotools/expat__linux.cmake.in \ + cmake/autotools/expat__macos.cmake.in \ + cmake/autotools/expat__windows.cmake.in \ cmake/autotools/expat-noconfig__linux.cmake.in \ cmake/autotools/expat-noconfig__macos.cmake.in \ cmake/autotools/expat-noconfig__windows.cmake.in \ diff --git a/contrib/expat/Makefile.in b/contrib/expat/Makefile.in index 069ec4047eea..b799591f2fc2 100644 --- a/contrib/expat/Makefile.in +++ b/contrib/expat/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.5 from Makefile.am. +# Makefile.in generated by automake 1.18.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2021 Free Software Foundation, Inc. +# Copyright (C) 1994-2025 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -105,6 +105,8 @@ am__make_running_with_option = \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +am__rm_f = rm -f $(am__rm_f_notfound) +am__rm_rf = rm -rf $(am__rm_f_notfound) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -145,12 +147,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ - $(am__configure_deps) $(dist_cmake_DATA) $(am__DIST_COMMON) + $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = expat_config.h CONFIG_CLEAN_FILES = expat.pc cmake/expat-config.cmake \ + cmake/autotools/expat.cmake \ cmake/autotools/expat-config-version.cmake \ cmake/autotools/expat-noconfig.cmake run.sh CONFIG_CLEAN_VPATH_FILES = @@ -203,14 +206,12 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ + { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \ } -am__installdirs = "$(DESTDIR)$(cmakedir)" "$(DESTDIR)$(cmakedir)" \ - "$(DESTDIR)$(pkgconfigdir)" -DATA = $(dist_cmake_DATA) $(nodist_cmake_DATA) $(pkgconfig_DATA) +am__installdirs = "$(DESTDIR)$(cmakedir)" "$(DESTDIR)$(pkgconfigdir)" +DATA = $(nodist_cmake_DATA) $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ @@ -256,8 +257,8 @@ distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ - find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -rf "$(distdir)" \ + find "$(distdir)" -type d ! -perm -700 -exec chmod u+rwx {} ';' \ + ; rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) @@ -288,14 +289,16 @@ am__relativize = \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).tar.lz \ $(distdir).tar.xz -GZIP_ENV = --best +GZIP_ENV = -9 DIST_TARGETS = dist-lzip dist-xz dist-bzip2 dist-gzip # Exists only to be overridden by the user if desired. AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' -distcleancheck_listfiles = find . -type f -print +distcleancheck_listfiles = \ + find . \( -type f -a \! \ + \( -name .nfs* -o -name .smb* -o -name .__afs* \) \) -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_CFLAGS = @AM_CFLAGS@ @@ -403,8 +406,10 @@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__rm_f_notfound = @am__rm_f_notfound@ am__tar = @am__tar@ am__untar = @am__untar@ +am__xargs_n = @am__xargs_n@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -458,16 +463,17 @@ LIBTOOLFLAGS = --verbose SUBDIRS = lib $(am__append_1) $(am__append_2) $(am__append_3) pkgconfig_DATA = expat.pc pkgconfigdir = $(libdir)/pkgconfig -dist_cmake_DATA = \ - cmake/autotools/expat.cmake - nodist_cmake_DATA = \ + cmake/autotools/expat.cmake \ cmake/autotools/expat-config-version.cmake \ cmake/autotools/expat-noconfig.cmake \ cmake/expat-config.cmake cmakedir = $(libdir)/cmake/expat-@PACKAGE_VERSION@ _EXTRA_DIST_CMAKE = \ + cmake/autotools/expat__linux.cmake.in \ + cmake/autotools/expat__macos.cmake.in \ + cmake/autotools/expat__windows.cmake.in \ cmake/autotools/expat-noconfig__linux.cmake.in \ cmake/autotools/expat-noconfig__macos.cmake.in \ cmake/autotools/expat-noconfig__windows.cmake.in \ @@ -552,12 +558,12 @@ expat_config.h: stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/expat_config.h.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status expat_config.h + $(AM_V_at)rm -f stamp-h1 + $(AM_V_GEN)cd $(top_builddir) && $(SHELL) ./config.status expat_config.h $(srcdir)/expat_config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f stamp-h1 - touch $@ + $(AM_V_GEN)($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + $(AM_V_at)rm -f stamp-h1 + $(AM_V_at)touch $@ distclean-hdr: -rm -f expat_config.h stamp-h1 @@ -565,6 +571,8 @@ expat.pc: $(top_builddir)/config.status $(srcdir)/expat.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ cmake/expat-config.cmake: $(top_builddir)/config.status $(top_srcdir)/cmake/expat-config.cmake.in cd $(top_builddir) && $(SHELL) ./config.status $@ +cmake/autotools/expat.cmake: $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $@ cmake/autotools/expat-config-version.cmake: $(top_builddir)/config.status $(top_srcdir)/cmake/autotools/expat-config-version.cmake.in cd $(top_builddir) && $(SHELL) ./config.status $@ cmake/autotools/expat-noconfig.cmake: $(top_builddir)/config.status @@ -580,27 +588,6 @@ clean-libtool: distclean-libtool: -rm -f libtool config.lt -install-dist_cmakeDATA: $(dist_cmake_DATA) - @$(NORMAL_INSTALL) - @list='$(dist_cmake_DATA)'; test -n "$(cmakedir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(cmakedir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(cmakedir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(cmakedir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(cmakedir)" || exit $$?; \ - done - -uninstall-dist_cmakeDATA: - @$(NORMAL_UNINSTALL) - @list='$(dist_cmake_DATA)'; test -n "$(cmakedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(cmakedir)'; $(am__uninstall_files_from_dir) install-nodist_cmakeDATA: $(nodist_cmake_DATA) @$(NORMAL_INSTALL) @list='$(nodist_cmake_DATA)'; test -n "$(cmakedir)" || list=; \ @@ -749,12 +736,13 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files + distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) $(am__remove_distdir) - test -d "$(distdir)" || mkdir "$(distdir)" + $(AM_V_at)$(MKDIR_P) "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -822,6 +810,10 @@ dist-gzip: distdir dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) + +dist-bzip3: distdir + tardir=$(distdir) && $(am__tar) | bzip3 -c >$(distdir).tar.bz3 + $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) @@ -862,9 +854,11 @@ dist dist-all: distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ + eval GZIP= gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.bz3*) \ + bzip3 -dc $(distdir).tar.bz3 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ @@ -872,7 +866,7 @@ distcheck: dist *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ + eval GZIP= gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ *.tar.zst*) \ @@ -948,7 +942,7 @@ check: check-recursive all-am: Makefile $(DATA) expat_config.h installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(cmakedir)" "$(DESTDIR)$(cmakedir)" "$(DESTDIR)$(pkgconfigdir)"; do \ + for dir in "$(DESTDIR)$(cmakedir)" "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive @@ -975,8 +969,8 @@ mostlyclean-generic: clean-generic: distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -$(am__rm_f) $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -1003,8 +997,7 @@ info: info-recursive info-am: -install-data-am: install-dist_cmakeDATA install-nodist_cmakeDATA \ - install-pkgconfigDATA +install-data-am: install-nodist_cmakeDATA install-pkgconfigDATA install-dvi: install-dvi-recursive @@ -1050,29 +1043,27 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-dist_cmakeDATA uninstall-nodist_cmakeDATA \ - uninstall-pkgconfigDATA +uninstall-am: uninstall-nodist_cmakeDATA uninstall-pkgconfigDATA .MAKE: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ - dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ - dist-xz dist-zip dist-zstd distcheck distclean \ + dist-all dist-bzip2 dist-bzip3 dist-gzip dist-lzip dist-shar \ + dist-tarZ dist-xz dist-zip dist-zstd distcheck distclean \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dist_cmakeDATA \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-nodist_cmakeDATA install-pdf \ - install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-am uninstall uninstall-am \ - uninstall-dist_cmakeDATA uninstall-nodist_cmakeDATA \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man \ + install-nodist_cmakeDATA install-pdf install-pdf-am \ + install-pkgconfigDATA install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-nodist_cmakeDATA \ uninstall-pkgconfigDATA .PRECIOUS: Makefile @@ -1149,3 +1140,10 @@ qa: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: + +# Tell GNU make to disable its built-in pattern rules. +%:: %,v +%:: RCS/%,v +%:: RCS/% +%:: s.% +%:: SCCS/s.% diff --git a/contrib/expat/README.md b/contrib/expat/README.md index 77c6bf27d307..fdaaf459e204 100644 --- a/contrib/expat/README.md +++ b/contrib/expat/README.md @@ -1,5 +1,4 @@ [![Run Linux CI tasks](https://github.com/libexpat/libexpat/actions/workflows/linux.yml/badge.svg)](https://github.com/libexpat/libexpat/actions/workflows/linux.yml) -[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/libexpat/libexpat?svg=true)](https://ci.appveyor.com/project/libexpat/libexpat) [![Packaging status](https://repology.org/badge/tiny-repos/expat.svg)](https://repology.org/metapackage/expat/versions) [![Downloads SourceForge](https://img.shields.io/sourceforge/dt/expat?label=Downloads%20SourceForge)](https://sourceforge.net/projects/expat/files/) [![Downloads GitHub](https://img.shields.io/github/downloads/libexpat/libexpat/total?label=Downloads%20GitHub)](https://github.com/libexpat/libexpat/releases) @@ -12,7 +11,7 @@ > at the top of the `Changes` file. -# Expat, Release 2.7.1 +# Expat, Release 2.7.2 This is Expat, a C99 library for parsing [XML 1.0 Fourth Edition](https://www.w3.org/TR/2006/REC-xml-20060816/), started by @@ -27,7 +26,8 @@ Expat supports the following C99 compilers: - GNU GCC >=4.5 (for use from C) or GNU GCC >=4.8.1 (for use from C++) - LLVM Clang >=3.5 -- Microsoft Visual Studio >=16.0/2019 (rolling `${today} minus 5 years`) +- Microsoft Visual Studio >=17.0/2022 + (the oldest version supported by the [official GitHub Actions Windows images](https://github.com/actions/runner-images)) Windows users can use the [`expat-win32bin-*.*.*.{exe,zip}` download](https://github.com/libexpat/libexpat/releases), diff --git a/contrib/expat/configure.ac b/contrib/expat/configure.ac index 0c88b8867019..b9966eabcd60 100644 --- a/contrib/expat/configure.ac +++ b/contrib/expat/configure.ac @@ -84,9 +84,9 @@ dnl dnl If the API changes incompatibly set LIBAGE back to 0 dnl -LIBCURRENT=11 # sync -LIBREVISION=2 # with -LIBAGE=10 # CMakeLists.txt! +LIBCURRENT=12 # sync +LIBREVISION=0 # with +LIBAGE=11 # CMakeLists.txt! AC_CONFIG_HEADERS([expat_config.h]) AH_TOP([#ifndef EXPAT_CONFIG_H @@ -440,12 +440,22 @@ AC_MSG_RESULT([${CMAKE_SHARED_LIBRARY_PREFIX}]) AC_SUBST([CMAKE_SHARED_LIBRARY_PREFIX]) AS_CASE("${host_os}", - [darwin*], [CMAKE_NOCONFIG_SOURCE=cmake/autotools/expat-noconfig__macos.cmake.in], - [mingw*|cygwin*], [CMAKE_NOCONFIG_SOURCE=cmake/autotools/expat-noconfig__windows.cmake.in], - [CMAKE_NOCONFIG_SOURCE=cmake/autotools/expat-noconfig__linux.cmake.in]) + [darwin*], [ + CMAKE_SOURCE=cmake/autotools/expat__macos.cmake.in + CMAKE_NOCONFIG_SOURCE=cmake/autotools/expat-noconfig__macos.cmake.in + ], + [mingw*|cygwin*], [ + CMAKE_SOURCE=cmake/autotools/expat__windows.cmake.in + CMAKE_NOCONFIG_SOURCE=cmake/autotools/expat-noconfig__windows.cmake.in + ], + [ + CMAKE_SOURCE=cmake/autotools/expat__linux.cmake.in + CMAKE_NOCONFIG_SOURCE=cmake/autotools/expat-noconfig__linux.cmake.in + ]) AC_CONFIG_FILES([Makefile] [expat.pc] [cmake/expat-config.cmake] + [cmake/autotools/expat.cmake:${CMAKE_SOURCE}] [cmake/autotools/expat-config-version.cmake] [cmake/autotools/expat-noconfig.cmake:${CMAKE_NOCONFIG_SOURCE}] [doc/Makefile] diff --git a/contrib/expat/doc/Makefile.in b/contrib/expat/doc/Makefile.in index 72deb0565d94..13be5107f89b 100644 --- a/contrib/expat/doc/Makefile.in +++ b/contrib/expat/doc/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.5 from Makefile.am. +# Makefile.in generated by automake 1.18.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2021 Free Software Foundation, Inc. +# Copyright (C) 1994-2025 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -102,6 +102,8 @@ am__make_running_with_option = \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +am__rm_f = rm -f $(am__rm_f_notfound) +am__rm_rf = rm -rf $(am__rm_f_notfound) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -184,10 +186,9 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ + { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \ } man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" @@ -303,8 +304,10 @@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__rm_f_notfound = @am__rm_f_notfound@ am__tar = @am__tar@ am__untar = @am__untar@ +am__xargs_n = @am__xargs_n@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -442,6 +445,7 @@ ctags CTAGS: cscope cscopelist: @WITH_DISTRIBUTABLE_MANPAGE_TRUE@dist-hook: + distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -507,11 +511,11 @@ install-strip: mostlyclean-generic: clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + -$(am__rm_f) $(CLEANFILES) distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -$(am__rm_f) $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -616,3 +620,10 @@ uninstall-man: uninstall-man1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: + +# Tell GNU make to disable its built-in pattern rules. +%:: %,v +%:: RCS/%,v +%:: RCS/% +%:: s.% +%:: SCCS/s.% diff --git a/contrib/expat/doc/reference.html b/contrib/expat/doc/reference.html index 2b3bd39580a9..12b12b92ff6d 100644 --- a/contrib/expat/doc/reference.html +++ b/contrib/expat/doc/reference.html @@ -52,7 +52,7 @@

The Expat XML Parser - Release 2.7.1 + Release 2.7.2

@@ -157,6 +157,8 @@ interface.

@@ -319,7 +321,7 @@ directions in the next section. Otherwise if you have Microsoft's Developer Studio installed, you can use CMake to generate a .sln file, e.g. -cmake -G"Visual Studio 16 2019" -DCMAKE_BUILD_TYPE=RelWithDebInfo . +cmake -G"Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=RelWithDebInfo . , and build Expat using msbuild /m expat.sln after.

Alternatively, you may download the Win32 binary package that @@ -1905,7 +1907,7 @@ struct XML_cp {

Sets a handler for element declarations in a DTD. The handler gets called with the name of the element in the declaration and a pointer to a structure that contains the element model. It's the user code's -responsibility to free model when finished with it. See +responsibility to free model when finished with via a call to XML_FreeContentModel. There is no need to free the model from the handler, it can be kept around and freed at a later stage.

@@ -2198,13 +2200,13 @@ XML_SetBillionLaughsAttackProtectionMaximumAmplification(XML_Parser p, returns XML_TRUE upon success and XML_FALSE upon error.

- The amplification factor is calculated as .. -
-    amplification := (direct + indirect) / direct
-  
- .. while parsing, whereas - direct is the number of bytes read from the primary document in parsing and - indirect is the number of bytes added by expanding entities and reading of external DTD files, combined. +

The amplification factor is calculated as ..

+
amplification := (direct + indirect) / direct
+

+ .. while parsing, whereas + direct is the number of bytes read from the primary document in parsing and + indirect is the number of bytes added by expanding entities and reading of external DTD files, combined. +

For a call to XML_SetBillionLaughsAttackProtectionMaximumAmplification to succeed:

    @@ -2267,6 +2269,120 @@ XML_SetBillionLaughsAttackProtectionActivationThreshold(XML_Parser p,

+

XML_SetAllocTrackerMaximumAmplification

+
+/* Added in Expat 2.7.2. */
+XML_Bool
+XML_SetAllocTrackerMaximumAmplification(XML_Parser p,
+                                        float maximumAmplificationFactor);
+
+
+

+ Sets the maximum tolerated amplification factor + between direct input and bytes of dynamic memory allocated + (default: 100.0) + of parser p to maximumAmplificationFactor, and + returns XML_TRUE upon success and XML_FALSE upon error. +

+ +

+ Note: + There are three types of allocations that intentionally bypass tracking and limiting: +

+ + +

The amplification factor is calculated as ..

+
amplification := allocated / direct
+

+ .. while parsing, whereas + direct is the number of bytes read from the primary document in parsing and + allocated is the number of bytes of dynamic memory allocated in the parser hierarchy. +

+ +

For a call to XML_SetAllocTrackerMaximumAmplification to succeed:

+
    +
  • parser p must be a non-NULL root parser (without any parent parsers) and
  • +
  • maximumAmplificationFactor must be non-NaN and greater than or equal to 1.0.
  • +
+ +

+ Note: + If you ever need to increase this value for non-attack payload, + please file a bug report. +

+ +

+ Note: + Amplifications factors greater than 100 can been observed near the start of parsing + even with benign files in practice. + + So if you do reduce the maximum allowed amplification, + please make sure that the activation threshold is still big enough + to not end up with undesired false positives (i.e. benign files being rejected). +

+
+ +

XML_SetAllocTrackerActivationThreshold

+
+/* Added in Expat 2.7.2. */
+XML_Bool
+XML_SetAllocTrackerActivationThreshold(XML_Parser p,
+                                       unsigned long long activationThresholdBytes);
+
+
+

+ Sets number of allocated bytes of dynamic memory + needed to activate protection against disproportionate use of RAM + (default: 64 MiB) + of parser p to activationThresholdBytes, and + returns XML_TRUE upon success and XML_FALSE upon error. +

+ +

+ Note: + For types of allocations that intentionally bypass tracking and limiting, please see + XML_SetAllocTrackerMaximumAmplification + above. +

+ +

For a call to XML_SetAllocTrackerActivationThreshold to succeed:

+
    +
  • parser p must be a non-NULL root parser (without any parent parsers).
  • +
+ +

+ Note: + If you ever need to increase this value for non-attack payload, + please file a bug report. +

+
+

XML_SetReparseDeferralEnabled

 /* Added in Expat 2.6.0. */
diff --git a/contrib/expat/doc/xmlwf.1 b/contrib/expat/doc/xmlwf.1
index 76aa7e30d074..5f50ba9e4d00 100644
--- a/contrib/expat/doc/xmlwf.1
+++ b/contrib/expat/doc/xmlwf.1
@@ -5,7 +5,7 @@
 \\$2 \(la\\$1\(ra\\$3
 ..
 .if \n(.g .mso www.tmac
-.TH XMLWF 1 "March 27, 2025" "" ""
+.TH XMLWF 1 "September 16, 2025" "" ""
 .SH NAME
 xmlwf \- Determines if an XML document is well-formed
 .SH SYNOPSIS
@@ -88,7 +88,11 @@ supports both.
 .TP 
 \*(T<\fB\-a\fR\*(T> \fIfactor\fR
 Sets the maximum tolerated amplification factor
-for protection against billion laughs attacks (default: 100.0).
+for protection against amplification attacks
+like the billion laughs attack
+(default: 100.0
+for the sum of direct and indirect output and also
+for allocations of dynamic memory).
 The amplification factor is calculated as ..
 
 .nf
@@ -97,12 +101,22 @@ The amplification factor is calculated as ..
           
 .fi
 
-\&.. while parsing, whereas
+\&.. with regard to use of entities and ..
+
+.nf
+
+            amplification := allocated / direct
+          
+.fi
+
+\&.. with regard to dynamic memory while parsing.
  is the number of bytes read
-from the primary document in parsing and
+from the primary document in parsing,
  is the number of bytes
 added by expanding entities and reading of external DTD files,
-combined.
+combined, and
+ is the total number of bytes of dynamic memory
+allocated (and not freed) per hierarchy of parsers.
 
 \fINOTE\fR:
 If you ever need to increase this value for non-attack payload,
@@ -110,8 +124,10 @@ please file a bug report.
 .TP 
 \*(T<\fB\-b\fR\*(T> \fIbytes\fR
 Sets the number of output bytes (including amplification)
-needed to activate protection against billion laughs attacks
-(default: 8 MiB).
+needed to activate protection against amplification attacks
+like billion laughs
+(default: 8 MiB for the sum of direct and indirect output,
+and 64 MiB for allocations of dynamic memory).
 This can be thought of as an "activation threshold".
 
 \fINOTE\fR:
diff --git a/contrib/expat/doc/xmlwf.xml b/contrib/expat/doc/xmlwf.xml
index 17e9cf51c191..defe9df8e46a 100644
--- a/contrib/expat/doc/xmlwf.xml
+++ b/contrib/expat/doc/xmlwf.xml
@@ -21,7 +21,7 @@
           "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
   Scott">
   Bronson">
-  March 27, 2025">
+  September 16, 2025">
   
   1">
   bronson@rinspin.com">
@@ -158,19 +158,31 @@ supports both.
         
           
             Sets the maximum tolerated amplification factor
-            for protection against billion laughs attacks (default: 100.0).
+            for protection against amplification attacks
+            like the billion laughs attack
+            (default: 100.0
+            for the sum of direct and indirect output and also
+            for allocations of dynamic memory).
             The amplification factor is calculated as ..
           
           
             amplification := (direct + indirect) / direct
           
           
-            .. while parsing, whereas
+            .. with regard to use of entities and ..
+          
+          
+            amplification := allocated / direct
+          
+          
+            .. with regard to dynamic memory while parsing.
             <direct> is the number of bytes read
-              from the primary document in parsing and
+              from the primary document in parsing,
             <indirect> is the number of bytes
               added by expanding entities and reading of external DTD files,
-              combined.
+              combined, and
+            <allocated> is the total number of bytes of dynamic memory
+              allocated (and not freed) per hierarchy of parsers.
           
           
             NOTE:
@@ -185,8 +197,10 @@ supports both.
         
           
             Sets the number of output bytes (including amplification)
-            needed to activate protection against billion laughs attacks
-            (default: 8 MiB).
+            needed to activate protection against amplification attacks
+            like billion laughs
+            (default: 8 MiB for the sum of direct and indirect output,
+            and 64 MiB for allocations of dynamic memory).
             This can be thought of as an "activation threshold".
           
           
diff --git a/contrib/expat/examples/Makefile.in b/contrib/expat/examples/Makefile.in
index 044c9089c565..0e55052ce6e4 100644
--- a/contrib/expat/examples/Makefile.in
+++ b/contrib/expat/examples/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# Makefile.in generated by automake 1.18.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+# Copyright (C) 1994-2025 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -101,6 +101,8 @@ am__make_running_with_option = \
   test $$has_opt = yes
 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+am__rm_f = rm -f $(am__rm_f_notfound)
+am__rm_rf = rm -rf $(am__rm_f_notfound)
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -330,8 +332,10 @@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
*** 3751 LINES SKIPPED ***

From nobody Mon Sep 22 05:56:18 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVXRR1GgRz68f4D;
	Mon, 22 Sep 2025 05:56:19 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cVXRR0k5hz3Zlw;
	Mon, 22 Sep 2025 05:56:19 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758520579;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=zbC+qrkyfd3aKbpDln57HiX5Q0nybxH/m9L3x0CpVAs=;
	b=MgItyRc2NeHJIhDTqihh07JDFN8wLHYau/e6M5jzRujB1xzt4tQ+ldb3Bz0QtYFxMxcfw4
	WsBb3J7VCV5WqXug9DrPes1UT+m7igSVsquujlb4Qxaa0q1gyLkGP9eBATzH55XU7UXf+I
	OH6w1KhrZN8RHf9m2MFd0vLJZ0IsQxNLmVRucASN2+uwdaic3Jwm0FgtY8fcZmv3P0k157
	911MxYIq7l2ITFCBY4rzv5tDm9v5GfyzizBubKvM5zcdOoZkKO0Noc0yl4v/XMyrUT8FVF
	SOzO8SDazi4DxharU/b+0ATl3OC0IU2bI6pO1cBht4z401L6cQ88NQQuTFOgOw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758520579;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=zbC+qrkyfd3aKbpDln57HiX5Q0nybxH/m9L3x0CpVAs=;
	b=ZrqylUKY2/PnZN2/udLNArESrFLAlnQuYFD0cctb9EbbKJeqReBD77NFom250Oek2trJQ/
	4FTcFKntSMvIW9iiVMO5yfUbNE3oUx19cYYfBhLvyTyOh7GeZC7/6y6IFJv3nT88AYd/pR
	6cO31abDAAFAC4WoZYC8NMNd9MwPIpacxxZuv0PBm6ic17NNjafxzHMj8SDYViM8PLxoyP
	VupJ2MWmcAzcl8r6lu1bibVMO2dColSmCUCjvcSwfrbHofgVg/blwNzU/SRuc+w+aQKRs9
	tF1m+6AF9ur4oGulkHbuzd9lDNQ4PWLPz/9wyK65eRwZLhToNS3mRdnpRJS9ZA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758520579; a=rsa-sha256; cv=none;
	b=bEibYsH151tUb6cZ7XwFpDNWdkEKel7X3WZJ+TYMbmGi2HRfC2XrpZv+zIDO6bL/T9HuuE
	KdE08qLj7e06WKn6UHhzOhymsp2pKTVuCtSxLsJC4Vk7kBIrmaNSjijt1c1Unm6xk6fZ6b
	6x18NfuooNVWGHUcwala/zctIQKMmrzIjrleWMr9qmgeAYFc7Vx5gcwu5ahXIwoWFQ3WR4
	QakDrLASYod2Hjte+EmJaQrKYm9lgnU2a1Xh7sUsA7JGTwDJ6Qd3BT+fnjdni9hrtGpfFP
	z3PEZY2rO1Bh9OMuD+ruQ5wa3Hvs9FPeZJ29cz36qY2hzw+t0n9aPWxbHIalYA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVXRR0DswznkL;
	Mon, 22 Sep 2025 05:56:19 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58M5uI02005923;
	Mon, 22 Sep 2025 05:56:18 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58M5uIDE005920;
	Mon, 22 Sep 2025 05:56:18 GMT
	(envelope-from git)
Date: Mon, 22 Sep 2025 05:56:18 GMT
Message-Id: <202509220556.58M5uIDE005920@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Xin LI 
Subject: git: 78f39a55b205 - stable/14 - MFC: MFV: libexpat 2.7.2
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: delphij
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 78f39a55b205eace7f0a308066864aef1ec925ea
Auto-Submitted: auto-generated

The branch stable/14 has been updated by delphij:

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

commit 78f39a55b205eace7f0a308066864aef1ec925ea
Author:     Xin LI 
AuthorDate: 2025-09-19 02:43:17 +0000
Commit:     Xin LI 
CommitDate: 2025-09-22 05:56:02 +0000

    MFC: MFV: libexpat 2.7.2
    
    (cherry picked from commit 627b778d9e6b603a44a010d22d823ca7c392b363)
---
 contrib/expat/Changes                       |  81 +++-
 contrib/expat/Makefile.am                   |   7 +-
 contrib/expat/Makefile.in                   | 128 +++---
 contrib/expat/README.md                     |   6 +-
 contrib/expat/configure.ac                  |  22 +-
 contrib/expat/doc/Makefile.in               |  29 +-
 contrib/expat/doc/reference.html            | 136 +++++-
 contrib/expat/doc/xmlwf.1                   |  30 +-
 contrib/expat/doc/xmlwf.xml                 |  28 +-
 contrib/expat/examples/Makefile.in          |  35 +-
 contrib/expat/expat_config.h.in             |  12 +-
 contrib/expat/fuzz/xml_lpm_fuzzer.cpp       |   6 +-
 contrib/expat/fuzz/xml_parse_fuzzer.c       |  20 +-
 contrib/expat/fuzz/xml_parsebuffer_fuzzer.c |  24 +-
 contrib/expat/lib/Makefile.in               |  49 ++-
 contrib/expat/lib/expat.h                   |  61 ++-
 contrib/expat/lib/expat_external.h          | 123 +++---
 contrib/expat/lib/internal.h                |   8 +
 contrib/expat/lib/xmlparse.c                | 658 +++++++++++++++++++++-------
 contrib/expat/lib/xmlrole.h                 |  34 +-
 contrib/expat/lib/xmltok.c                  |   4 +-
 contrib/expat/lib/xmltok.h                  | 226 +++++-----
 contrib/expat/tests/Makefile.in             |  99 +++--
 contrib/expat/tests/alloc_tests.c           | 220 +++++++++-
 contrib/expat/tests/basic_tests.c           |   8 +-
 contrib/expat/tests/benchmark/Makefile.in   |  35 +-
 contrib/expat/tests/common.c                |  11 +-
 contrib/expat/tests/handlers.c              |  29 +-
 contrib/expat/tests/minicheck.h             |   3 +-
 contrib/expat/tests/misc_tests.c            |   7 +-
 contrib/expat/tests/nsalloc_tests.c         |  11 +-
 contrib/expat/xmlwf/Makefile.in             |  37 +-
 contrib/expat/xmlwf/unixfilemap.c           |   6 +-
 contrib/expat/xmlwf/xmlfile.c               |  21 +-
 contrib/expat/xmlwf/xmlwf.c                 |  21 +-
 contrib/expat/xmlwf/xmlwf_helpgen.py        |  18 +-
 lib/libexpat/expat_config.h                 |  18 +-
 lib/libexpat/libbsdxml.3                    |   2 +-
 38 files changed, 1615 insertions(+), 658 deletions(-)

diff --git a/contrib/expat/Changes b/contrib/expat/Changes
index 9d6c64b6a460..092252ed1fa3 100644
--- a/contrib/expat/Changes
+++ b/contrib/expat/Changes
@@ -15,12 +15,16 @@
 !!   ClusterFuzz findings with few-days-max response times in communication  !!
 !!   in order to (1) have a sound fix ready before the end of a 90 days      !!
 !!   grace period and (2) in a sustainable manner,                           !!
-!! - helping CPython Expat bindings with supporting Expat's billion laughs   !!
+!! - helping CPython Expat bindings with supporting Expat's amplification    !!
 !!   attack protection API (https://github.com/python/cpython/issues/90949): !!
+!!   - XML_SetAllocTrackerActivationThreshold                                !!
+!!   - XML_SetAllocTrackerMaximumAmplification                               !!
 !!   - XML_SetBillionLaughsAttackProtectionActivationThreshold               !!
 !!   - XML_SetBillionLaughsAttackProtectionMaximumAmplification              !!
 !! - helping Perl's XML::Parser Expat bindings with supporting Expat's       !!
 !!   security API (https://github.com/cpan-authors/XML-Parser/issues/102):   !!
+!!   - XML_SetAllocTrackerActivationThreshold                                !!
+!!   - XML_SetAllocTrackerMaximumAmplification                               !!
 !!   - XML_SetBillionLaughsAttackProtectionActivationThreshold               !!
 !!   - XML_SetBillionLaughsAttackProtectionMaximumAmplification              !!
 !!   - XML_SetReparseDeferralEnabled                                         !!
@@ -37,6 +41,79 @@
 !! THANK YOU!                        Sebastian Pipping -- Berlin, 2024-03-09 !!
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
+Release 2.7.2 Tue September 16 2025
+        Security fixes:
+     #1018 #1034  CVE-2025-59375 -- Disallow use of disproportional amounts of
+                    dynamic memory from within an Expat parser (e.g. previously
+                    a ~250 KiB sized document was able to cause allocation of
+                    ~800 MiB from the heap, i.e. an "amplification" of factor
+                    ~3,300); once a threshold (that defaults to 64 MiB) is
+                    reached, a maximum amplification factor (that defaults to
+                    100.0) is enforced, and violating documents are rejected
+                    with an out-of-memory error.
+                    There are two new API functions to fine-tune this new
+                    behavior:
+                      - XML_SetAllocTrackerActivationThreshold
+                      - XML_SetAllocTrackerMaximumAmplification .
+                    If you ever need to increase these defaults for non-attack
+                    XML payload, please file a bug report with libexpat.
+                      There is also a new environment variable
+                    EXPAT_MALLOC_DEBUG=(0|1|2) to control the verbosity
+                    of allocations debugging at runtime, disabled by default.
+                      Known impact is (reliable and easy) denial of service:
+                    CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:H/RL:O/RC:C
+                    (Base Score: 7.5, Temporal Score: 7.2)
+                    Please note that a layer of compression around XML can
+                    significantly reduce the minimum attack payload size.
+                      Distributors intending to backport (or cherry-pick) the
+                    fix need to copy 99% of the related pull request, not just
+                    the "lib: Implement tracking of dynamic memory allocations"
+                    commit, to not end up with a state that literally does both
+                    too much and too little at the same time. Appending ".diff"
+                    to the pull request URL could be of help.
+
+        Other changes:
+     #1008 #1017  Autotools: Sync CMake templates with CMake 3.31 for macOS
+           #1007  CMake: Drop support for CMake <3.15
+           #1004  CMake: Fix off_t detection for -Werror
+           #1007  CMake|Windows: Fix -DEXPAT_MSVC_STATIC_CRT=ON
+           #1013  Windows: Drop support for Visual Studio <=16.0/2019
+           #1026  xmlwf: Mention supported environment variables in
+                    --help output
+           #1024  xmlwf: Fix (internal) help generator
+           #1034  docs: Promote the contract to call function
+                    XML_FreeContentModel when registering a custom
+                    element declaration handler (via a call to function
+                    XML_SetElementDeclHandler)
+           #1027  docs: Add missing 

..

wrap + #994 docs: Drop AppVeyor badge + #1000 tests: Fix portable_strndup + #1036 Drop casts around malloc/free/realloc that C99 does not need + #1010 Replace empty for-loops with while loops + #1011 Add const with internal XmlInitUnknownEncodingNS + #14 #1037 Drop an OpenVMS support leftover + #999 #1001 Address more clang-tidy warnings + #1030 #1038 Version info bumped from 11:2:10 (libexpat*.so.1.10.2) + to 12:0:11 (libexpat*.so.1.11.0); see https://verbump.de/ + for what these numbers do + + Infrastructure: + #1003 CI: Cover compilation on FreeBSD + #1009 #1035 CI: Upgrade Clang from 19 to 21 + #1031 CI: Make calling Cppcheck without --suppress=objectIndex + and --suppress=unknownMacro possible + #1013 CI|Windows: Get off of deprecated image "windows-2019" + #1008 #1017 .. + #1023 #1025 CI: Adapt to breaking changes in GitHub Actions + + Special thanks to: + Alexander Bluhm + Neil Pang + Theo Buehler + and + OSS-Fuzz / ClusterFuzz + Perl XML::Parser + Release 2.7.1 Thu March 27 2025 Bug fixes: #980 #989 Restore event pointer behavior from Expat 2.6.4 @@ -54,7 +131,7 @@ Release 2.7.1 Thu March 27 2025 #983 #984 Fix printf format specifiers for 32bit Emscripten #992 docs: Promote OpenSSF Best Practices self-certification #978 tests/benchmark: Resolve mistaken double close - #986 Address compiler warnings + #986 Address Frama-C warnings #990 #993 Version info bumped from 11:1:10 (libexpat*.so.1.10.1) to 11:2:10 (libexpat*.so.1.10.2); see https://verbump.de/ for what these numbers do diff --git a/contrib/expat/Makefile.am b/contrib/expat/Makefile.am index c20531a8d6c6..d612d432becb 100644 --- a/contrib/expat/Makefile.am +++ b/contrib/expat/Makefile.am @@ -58,10 +58,8 @@ pkgconfig_DATA = expat.pc pkgconfigdir = $(libdir)/pkgconfig -dist_cmake_DATA = \ - cmake/autotools/expat.cmake - nodist_cmake_DATA = \ + cmake/autotools/expat.cmake \ cmake/autotools/expat-config-version.cmake \ cmake/autotools/expat-noconfig.cmake \ cmake/expat-config.cmake @@ -70,6 +68,9 @@ cmakedir = $(libdir)/cmake/expat-@PACKAGE_VERSION@ _EXTRA_DIST_CMAKE = \ + cmake/autotools/expat__linux.cmake.in \ + cmake/autotools/expat__macos.cmake.in \ + cmake/autotools/expat__windows.cmake.in \ cmake/autotools/expat-noconfig__linux.cmake.in \ cmake/autotools/expat-noconfig__macos.cmake.in \ cmake/autotools/expat-noconfig__windows.cmake.in \ diff --git a/contrib/expat/Makefile.in b/contrib/expat/Makefile.in index 069ec4047eea..b799591f2fc2 100644 --- a/contrib/expat/Makefile.in +++ b/contrib/expat/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.5 from Makefile.am. +# Makefile.in generated by automake 1.18.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2021 Free Software Foundation, Inc. +# Copyright (C) 1994-2025 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -105,6 +105,8 @@ am__make_running_with_option = \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +am__rm_f = rm -f $(am__rm_f_notfound) +am__rm_rf = rm -rf $(am__rm_f_notfound) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -145,12 +147,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ - $(am__configure_deps) $(dist_cmake_DATA) $(am__DIST_COMMON) + $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = expat_config.h CONFIG_CLEAN_FILES = expat.pc cmake/expat-config.cmake \ + cmake/autotools/expat.cmake \ cmake/autotools/expat-config-version.cmake \ cmake/autotools/expat-noconfig.cmake run.sh CONFIG_CLEAN_VPATH_FILES = @@ -203,14 +206,12 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ + { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \ } -am__installdirs = "$(DESTDIR)$(cmakedir)" "$(DESTDIR)$(cmakedir)" \ - "$(DESTDIR)$(pkgconfigdir)" -DATA = $(dist_cmake_DATA) $(nodist_cmake_DATA) $(pkgconfig_DATA) +am__installdirs = "$(DESTDIR)$(cmakedir)" "$(DESTDIR)$(pkgconfigdir)" +DATA = $(nodist_cmake_DATA) $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ @@ -256,8 +257,8 @@ distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ - find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -rf "$(distdir)" \ + find "$(distdir)" -type d ! -perm -700 -exec chmod u+rwx {} ';' \ + ; rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) @@ -288,14 +289,16 @@ am__relativize = \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).tar.lz \ $(distdir).tar.xz -GZIP_ENV = --best +GZIP_ENV = -9 DIST_TARGETS = dist-lzip dist-xz dist-bzip2 dist-gzip # Exists only to be overridden by the user if desired. AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' -distcleancheck_listfiles = find . -type f -print +distcleancheck_listfiles = \ + find . \( -type f -a \! \ + \( -name .nfs* -o -name .smb* -o -name .__afs* \) \) -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_CFLAGS = @AM_CFLAGS@ @@ -403,8 +406,10 @@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__rm_f_notfound = @am__rm_f_notfound@ am__tar = @am__tar@ am__untar = @am__untar@ +am__xargs_n = @am__xargs_n@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -458,16 +463,17 @@ LIBTOOLFLAGS = --verbose SUBDIRS = lib $(am__append_1) $(am__append_2) $(am__append_3) pkgconfig_DATA = expat.pc pkgconfigdir = $(libdir)/pkgconfig -dist_cmake_DATA = \ - cmake/autotools/expat.cmake - nodist_cmake_DATA = \ + cmake/autotools/expat.cmake \ cmake/autotools/expat-config-version.cmake \ cmake/autotools/expat-noconfig.cmake \ cmake/expat-config.cmake cmakedir = $(libdir)/cmake/expat-@PACKAGE_VERSION@ _EXTRA_DIST_CMAKE = \ + cmake/autotools/expat__linux.cmake.in \ + cmake/autotools/expat__macos.cmake.in \ + cmake/autotools/expat__windows.cmake.in \ cmake/autotools/expat-noconfig__linux.cmake.in \ cmake/autotools/expat-noconfig__macos.cmake.in \ cmake/autotools/expat-noconfig__windows.cmake.in \ @@ -552,12 +558,12 @@ expat_config.h: stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/expat_config.h.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status expat_config.h + $(AM_V_at)rm -f stamp-h1 + $(AM_V_GEN)cd $(top_builddir) && $(SHELL) ./config.status expat_config.h $(srcdir)/expat_config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f stamp-h1 - touch $@ + $(AM_V_GEN)($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + $(AM_V_at)rm -f stamp-h1 + $(AM_V_at)touch $@ distclean-hdr: -rm -f expat_config.h stamp-h1 @@ -565,6 +571,8 @@ expat.pc: $(top_builddir)/config.status $(srcdir)/expat.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ cmake/expat-config.cmake: $(top_builddir)/config.status $(top_srcdir)/cmake/expat-config.cmake.in cd $(top_builddir) && $(SHELL) ./config.status $@ +cmake/autotools/expat.cmake: $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $@ cmake/autotools/expat-config-version.cmake: $(top_builddir)/config.status $(top_srcdir)/cmake/autotools/expat-config-version.cmake.in cd $(top_builddir) && $(SHELL) ./config.status $@ cmake/autotools/expat-noconfig.cmake: $(top_builddir)/config.status @@ -580,27 +588,6 @@ clean-libtool: distclean-libtool: -rm -f libtool config.lt -install-dist_cmakeDATA: $(dist_cmake_DATA) - @$(NORMAL_INSTALL) - @list='$(dist_cmake_DATA)'; test -n "$(cmakedir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(cmakedir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(cmakedir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(cmakedir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(cmakedir)" || exit $$?; \ - done - -uninstall-dist_cmakeDATA: - @$(NORMAL_UNINSTALL) - @list='$(dist_cmake_DATA)'; test -n "$(cmakedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(cmakedir)'; $(am__uninstall_files_from_dir) install-nodist_cmakeDATA: $(nodist_cmake_DATA) @$(NORMAL_INSTALL) @list='$(nodist_cmake_DATA)'; test -n "$(cmakedir)" || list=; \ @@ -749,12 +736,13 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files + distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) $(am__remove_distdir) - test -d "$(distdir)" || mkdir "$(distdir)" + $(AM_V_at)$(MKDIR_P) "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -822,6 +810,10 @@ dist-gzip: distdir dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) + +dist-bzip3: distdir + tardir=$(distdir) && $(am__tar) | bzip3 -c >$(distdir).tar.bz3 + $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) @@ -862,9 +854,11 @@ dist dist-all: distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ + eval GZIP= gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.bz3*) \ + bzip3 -dc $(distdir).tar.bz3 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ @@ -872,7 +866,7 @@ distcheck: dist *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ + eval GZIP= gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ *.tar.zst*) \ @@ -948,7 +942,7 @@ check: check-recursive all-am: Makefile $(DATA) expat_config.h installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(cmakedir)" "$(DESTDIR)$(cmakedir)" "$(DESTDIR)$(pkgconfigdir)"; do \ + for dir in "$(DESTDIR)$(cmakedir)" "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive @@ -975,8 +969,8 @@ mostlyclean-generic: clean-generic: distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -$(am__rm_f) $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -1003,8 +997,7 @@ info: info-recursive info-am: -install-data-am: install-dist_cmakeDATA install-nodist_cmakeDATA \ - install-pkgconfigDATA +install-data-am: install-nodist_cmakeDATA install-pkgconfigDATA install-dvi: install-dvi-recursive @@ -1050,29 +1043,27 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-dist_cmakeDATA uninstall-nodist_cmakeDATA \ - uninstall-pkgconfigDATA +uninstall-am: uninstall-nodist_cmakeDATA uninstall-pkgconfigDATA .MAKE: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ - dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ - dist-xz dist-zip dist-zstd distcheck distclean \ + dist-all dist-bzip2 dist-bzip3 dist-gzip dist-lzip dist-shar \ + dist-tarZ dist-xz dist-zip dist-zstd distcheck distclean \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dist_cmakeDATA \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-nodist_cmakeDATA install-pdf \ - install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-am uninstall uninstall-am \ - uninstall-dist_cmakeDATA uninstall-nodist_cmakeDATA \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man \ + install-nodist_cmakeDATA install-pdf install-pdf-am \ + install-pkgconfigDATA install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-nodist_cmakeDATA \ uninstall-pkgconfigDATA .PRECIOUS: Makefile @@ -1149,3 +1140,10 @@ qa: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: + +# Tell GNU make to disable its built-in pattern rules. +%:: %,v +%:: RCS/%,v +%:: RCS/% +%:: s.% +%:: SCCS/s.% diff --git a/contrib/expat/README.md b/contrib/expat/README.md index 77c6bf27d307..fdaaf459e204 100644 --- a/contrib/expat/README.md +++ b/contrib/expat/README.md @@ -1,5 +1,4 @@ [![Run Linux CI tasks](https://github.com/libexpat/libexpat/actions/workflows/linux.yml/badge.svg)](https://github.com/libexpat/libexpat/actions/workflows/linux.yml) -[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/libexpat/libexpat?svg=true)](https://ci.appveyor.com/project/libexpat/libexpat) [![Packaging status](https://repology.org/badge/tiny-repos/expat.svg)](https://repology.org/metapackage/expat/versions) [![Downloads SourceForge](https://img.shields.io/sourceforge/dt/expat?label=Downloads%20SourceForge)](https://sourceforge.net/projects/expat/files/) [![Downloads GitHub](https://img.shields.io/github/downloads/libexpat/libexpat/total?label=Downloads%20GitHub)](https://github.com/libexpat/libexpat/releases) @@ -12,7 +11,7 @@ > at the top of the `Changes` file. -# Expat, Release 2.7.1 +# Expat, Release 2.7.2 This is Expat, a C99 library for parsing [XML 1.0 Fourth Edition](https://www.w3.org/TR/2006/REC-xml-20060816/), started by @@ -27,7 +26,8 @@ Expat supports the following C99 compilers: - GNU GCC >=4.5 (for use from C) or GNU GCC >=4.8.1 (for use from C++) - LLVM Clang >=3.5 -- Microsoft Visual Studio >=16.0/2019 (rolling `${today} minus 5 years`) +- Microsoft Visual Studio >=17.0/2022 + (the oldest version supported by the [official GitHub Actions Windows images](https://github.com/actions/runner-images)) Windows users can use the [`expat-win32bin-*.*.*.{exe,zip}` download](https://github.com/libexpat/libexpat/releases), diff --git a/contrib/expat/configure.ac b/contrib/expat/configure.ac index 0c88b8867019..b9966eabcd60 100644 --- a/contrib/expat/configure.ac +++ b/contrib/expat/configure.ac @@ -84,9 +84,9 @@ dnl dnl If the API changes incompatibly set LIBAGE back to 0 dnl -LIBCURRENT=11 # sync -LIBREVISION=2 # with -LIBAGE=10 # CMakeLists.txt! +LIBCURRENT=12 # sync +LIBREVISION=0 # with +LIBAGE=11 # CMakeLists.txt! AC_CONFIG_HEADERS([expat_config.h]) AH_TOP([#ifndef EXPAT_CONFIG_H @@ -440,12 +440,22 @@ AC_MSG_RESULT([${CMAKE_SHARED_LIBRARY_PREFIX}]) AC_SUBST([CMAKE_SHARED_LIBRARY_PREFIX]) AS_CASE("${host_os}", - [darwin*], [CMAKE_NOCONFIG_SOURCE=cmake/autotools/expat-noconfig__macos.cmake.in], - [mingw*|cygwin*], [CMAKE_NOCONFIG_SOURCE=cmake/autotools/expat-noconfig__windows.cmake.in], - [CMAKE_NOCONFIG_SOURCE=cmake/autotools/expat-noconfig__linux.cmake.in]) + [darwin*], [ + CMAKE_SOURCE=cmake/autotools/expat__macos.cmake.in + CMAKE_NOCONFIG_SOURCE=cmake/autotools/expat-noconfig__macos.cmake.in + ], + [mingw*|cygwin*], [ + CMAKE_SOURCE=cmake/autotools/expat__windows.cmake.in + CMAKE_NOCONFIG_SOURCE=cmake/autotools/expat-noconfig__windows.cmake.in + ], + [ + CMAKE_SOURCE=cmake/autotools/expat__linux.cmake.in + CMAKE_NOCONFIG_SOURCE=cmake/autotools/expat-noconfig__linux.cmake.in + ]) AC_CONFIG_FILES([Makefile] [expat.pc] [cmake/expat-config.cmake] + [cmake/autotools/expat.cmake:${CMAKE_SOURCE}] [cmake/autotools/expat-config-version.cmake] [cmake/autotools/expat-noconfig.cmake:${CMAKE_NOCONFIG_SOURCE}] [doc/Makefile] diff --git a/contrib/expat/doc/Makefile.in b/contrib/expat/doc/Makefile.in index 72deb0565d94..13be5107f89b 100644 --- a/contrib/expat/doc/Makefile.in +++ b/contrib/expat/doc/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.5 from Makefile.am. +# Makefile.in generated by automake 1.18.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2021 Free Software Foundation, Inc. +# Copyright (C) 1994-2025 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -102,6 +102,8 @@ am__make_running_with_option = \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +am__rm_f = rm -f $(am__rm_f_notfound) +am__rm_rf = rm -rf $(am__rm_f_notfound) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -184,10 +186,9 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ + { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \ } man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" @@ -303,8 +304,10 @@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__rm_f_notfound = @am__rm_f_notfound@ am__tar = @am__tar@ am__untar = @am__untar@ +am__xargs_n = @am__xargs_n@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -442,6 +445,7 @@ ctags CTAGS: cscope cscopelist: @WITH_DISTRIBUTABLE_MANPAGE_TRUE@dist-hook: + distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -507,11 +511,11 @@ install-strip: mostlyclean-generic: clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + -$(am__rm_f) $(CLEANFILES) distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -$(am__rm_f) $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -616,3 +620,10 @@ uninstall-man: uninstall-man1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: + +# Tell GNU make to disable its built-in pattern rules. +%:: %,v +%:: RCS/%,v +%:: RCS/% +%:: s.% +%:: SCCS/s.% diff --git a/contrib/expat/doc/reference.html b/contrib/expat/doc/reference.html index 2b3bd39580a9..12b12b92ff6d 100644 --- a/contrib/expat/doc/reference.html +++ b/contrib/expat/doc/reference.html @@ -52,7 +52,7 @@

The Expat XML Parser - Release 2.7.1 + Release 2.7.2

@@ -157,6 +157,8 @@ interface.

@@ -319,7 +321,7 @@ directions in the next section. Otherwise if you have Microsoft's Developer Studio installed, you can use CMake to generate a .sln file, e.g. -cmake -G"Visual Studio 16 2019" -DCMAKE_BUILD_TYPE=RelWithDebInfo . +cmake -G"Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=RelWithDebInfo . , and build Expat using msbuild /m expat.sln after.

Alternatively, you may download the Win32 binary package that @@ -1905,7 +1907,7 @@ struct XML_cp {

Sets a handler for element declarations in a DTD. The handler gets called with the name of the element in the declaration and a pointer to a structure that contains the element model. It's the user code's -responsibility to free model when finished with it. See +responsibility to free model when finished with via a call to XML_FreeContentModel. There is no need to free the model from the handler, it can be kept around and freed at a later stage.

@@ -2198,13 +2200,13 @@ XML_SetBillionLaughsAttackProtectionMaximumAmplification(XML_Parser p, returns XML_TRUE upon success and XML_FALSE upon error.

- The amplification factor is calculated as .. -
-    amplification := (direct + indirect) / direct
-  
- .. while parsing, whereas - direct is the number of bytes read from the primary document in parsing and - indirect is the number of bytes added by expanding entities and reading of external DTD files, combined. +

The amplification factor is calculated as ..

+
amplification := (direct + indirect) / direct
+

+ .. while parsing, whereas + direct is the number of bytes read from the primary document in parsing and + indirect is the number of bytes added by expanding entities and reading of external DTD files, combined. +

For a call to XML_SetBillionLaughsAttackProtectionMaximumAmplification to succeed:

    @@ -2267,6 +2269,120 @@ XML_SetBillionLaughsAttackProtectionActivationThreshold(XML_Parser p,

+

XML_SetAllocTrackerMaximumAmplification

+
+/* Added in Expat 2.7.2. */
+XML_Bool
+XML_SetAllocTrackerMaximumAmplification(XML_Parser p,
+                                        float maximumAmplificationFactor);
+
+
+

+ Sets the maximum tolerated amplification factor + between direct input and bytes of dynamic memory allocated + (default: 100.0) + of parser p to maximumAmplificationFactor, and + returns XML_TRUE upon success and XML_FALSE upon error. +

+ +

+ Note: + There are three types of allocations that intentionally bypass tracking and limiting: +

+ + +

The amplification factor is calculated as ..

+
amplification := allocated / direct
+

+ .. while parsing, whereas + direct is the number of bytes read from the primary document in parsing and + allocated is the number of bytes of dynamic memory allocated in the parser hierarchy. +

+ +

For a call to XML_SetAllocTrackerMaximumAmplification to succeed:

+
    +
  • parser p must be a non-NULL root parser (without any parent parsers) and
  • +
  • maximumAmplificationFactor must be non-NaN and greater than or equal to 1.0.
  • +
+ +

+ Note: + If you ever need to increase this value for non-attack payload, + please file a bug report. +

+ +

+ Note: + Amplifications factors greater than 100 can been observed near the start of parsing + even with benign files in practice. + + So if you do reduce the maximum allowed amplification, + please make sure that the activation threshold is still big enough + to not end up with undesired false positives (i.e. benign files being rejected). +

+
+ +

XML_SetAllocTrackerActivationThreshold

+
+/* Added in Expat 2.7.2. */
+XML_Bool
+XML_SetAllocTrackerActivationThreshold(XML_Parser p,
+                                       unsigned long long activationThresholdBytes);
+
+
+

+ Sets number of allocated bytes of dynamic memory + needed to activate protection against disproportionate use of RAM + (default: 64 MiB) + of parser p to activationThresholdBytes, and + returns XML_TRUE upon success and XML_FALSE upon error. +

+ +

+ Note: + For types of allocations that intentionally bypass tracking and limiting, please see + XML_SetAllocTrackerMaximumAmplification + above. +

+ +

For a call to XML_SetAllocTrackerActivationThreshold to succeed:

+
    +
  • parser p must be a non-NULL root parser (without any parent parsers).
  • +
+ +

+ Note: + If you ever need to increase this value for non-attack payload, + please file a bug report. +

+
+

XML_SetReparseDeferralEnabled

 /* Added in Expat 2.6.0. */
diff --git a/contrib/expat/doc/xmlwf.1 b/contrib/expat/doc/xmlwf.1
index 76aa7e30d074..5f50ba9e4d00 100644
--- a/contrib/expat/doc/xmlwf.1
+++ b/contrib/expat/doc/xmlwf.1
@@ -5,7 +5,7 @@
 \\$2 \(la\\$1\(ra\\$3
 ..
 .if \n(.g .mso www.tmac
-.TH XMLWF 1 "March 27, 2025" "" ""
+.TH XMLWF 1 "September 16, 2025" "" ""
 .SH NAME
 xmlwf \- Determines if an XML document is well-formed
 .SH SYNOPSIS
@@ -88,7 +88,11 @@ supports both.
 .TP 
 \*(T<\fB\-a\fR\*(T> \fIfactor\fR
 Sets the maximum tolerated amplification factor
-for protection against billion laughs attacks (default: 100.0).
+for protection against amplification attacks
+like the billion laughs attack
+(default: 100.0
+for the sum of direct and indirect output and also
+for allocations of dynamic memory).
 The amplification factor is calculated as ..
 
 .nf
@@ -97,12 +101,22 @@ The amplification factor is calculated as ..
           
 .fi
 
-\&.. while parsing, whereas
+\&.. with regard to use of entities and ..
+
+.nf
+
+            amplification := allocated / direct
+          
+.fi
+
+\&.. with regard to dynamic memory while parsing.
  is the number of bytes read
-from the primary document in parsing and
+from the primary document in parsing,
  is the number of bytes
 added by expanding entities and reading of external DTD files,
-combined.
+combined, and
+ is the total number of bytes of dynamic memory
+allocated (and not freed) per hierarchy of parsers.
 
 \fINOTE\fR:
 If you ever need to increase this value for non-attack payload,
@@ -110,8 +124,10 @@ please file a bug report.
 .TP 
 \*(T<\fB\-b\fR\*(T> \fIbytes\fR
 Sets the number of output bytes (including amplification)
-needed to activate protection against billion laughs attacks
-(default: 8 MiB).
+needed to activate protection against amplification attacks
+like billion laughs
+(default: 8 MiB for the sum of direct and indirect output,
+and 64 MiB for allocations of dynamic memory).
 This can be thought of as an "activation threshold".
 
 \fINOTE\fR:
diff --git a/contrib/expat/doc/xmlwf.xml b/contrib/expat/doc/xmlwf.xml
index 17e9cf51c191..defe9df8e46a 100644
--- a/contrib/expat/doc/xmlwf.xml
+++ b/contrib/expat/doc/xmlwf.xml
@@ -21,7 +21,7 @@
           "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
   Scott">
   Bronson">
-  March 27, 2025">
+  September 16, 2025">
   
   1">
   bronson@rinspin.com">
@@ -158,19 +158,31 @@ supports both.
         
           
             Sets the maximum tolerated amplification factor
-            for protection against billion laughs attacks (default: 100.0).
+            for protection against amplification attacks
+            like the billion laughs attack
+            (default: 100.0
+            for the sum of direct and indirect output and also
+            for allocations of dynamic memory).
             The amplification factor is calculated as ..
           
           
             amplification := (direct + indirect) / direct
           
           
-            .. while parsing, whereas
+            .. with regard to use of entities and ..
+          
+          
+            amplification := allocated / direct
+          
+          
+            .. with regard to dynamic memory while parsing.
             <direct> is the number of bytes read
-              from the primary document in parsing and
+              from the primary document in parsing,
             <indirect> is the number of bytes
               added by expanding entities and reading of external DTD files,
-              combined.
+              combined, and
+            <allocated> is the total number of bytes of dynamic memory
+              allocated (and not freed) per hierarchy of parsers.
           
           
             NOTE:
@@ -185,8 +197,10 @@ supports both.
         
           
             Sets the number of output bytes (including amplification)
-            needed to activate protection against billion laughs attacks
-            (default: 8 MiB).
+            needed to activate protection against amplification attacks
+            like billion laughs
+            (default: 8 MiB for the sum of direct and indirect output,
+            and 64 MiB for allocations of dynamic memory).
             This can be thought of as an "activation threshold".
           
           
diff --git a/contrib/expat/examples/Makefile.in b/contrib/expat/examples/Makefile.in
index 044c9089c565..0e55052ce6e4 100644
--- a/contrib/expat/examples/Makefile.in
+++ b/contrib/expat/examples/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# Makefile.in generated by automake 1.18.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+# Copyright (C) 1994-2025 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -101,6 +101,8 @@ am__make_running_with_option = \
   test $$has_opt = yes
 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+am__rm_f = rm -f $(am__rm_f_notfound)
+am__rm_rf = rm -rf $(am__rm_f_notfound)
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -330,8 +332,10 @@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
*** 3751 LINES SKIPPED ***

From nobody Mon Sep 22 05:56:44 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVXRw5LLJz68f0J;
	Mon, 22 Sep 2025 05:56:44 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cVXRw50rrz3b3m;
	Mon, 22 Sep 2025 05:56:44 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758520604;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=grL2CZu77E2Yi45vIkIYCprXomeF2c1TK8Cq3Oh1RSA=;
	b=YLWVtDHMg8STOovAzbCK5EAHpKOvsxYv2yvW4va7OBD7im3/TCjixwFkifkr7TN1I7pRHW
	yM5VBnP+5sYj0A9Pp6CLFI/iOb9L6K2LUuAl5ZukTIFpuWN1OM5xr7dFWmOS1tSznJfYGf
	GMNCsxip5rZ22bIXUXNNZr4A7FwsP3Xo7CLrUU+D4cVMzjocxQ2j4ObrX+Ojh7gYNxMn96
	5szGS4llIKDtJg47/YQsMzdvfw2UYGdKlLrUnN8TvlvGPC5IH8AlDVUZE5Q2yaETpLXrC8
	kNXxf8Wx9By2Ii6hlN5B34t4auGdGf4TVQnT7AB5Dpk4dOkDWCisCp82b8VYYg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758520604;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=grL2CZu77E2Yi45vIkIYCprXomeF2c1TK8Cq3Oh1RSA=;
	b=q2UQgmK6QKUK6zxzZRj9mnCIfGK+qofShF2S5I66LnCCH0vlPnEquaSFnZhHmyEWKWF0VP
	tEvGGT/fQfXNU+vcJDx94xxcpzfqpMFnp2LRMcUFgK94D7oWqSJluH8p5IcrvrQbQHxLOz
	RT51NSgdIx5FczD5SEus7oFFGAflExye9oWpuWE9OPFwnkpRuEfDMkOaHNnvXHASJdoK5d
	ocGgxejy4cnL7mPmba8x6gxI4I9qmq4Kd/+tsyyK8QJZH2KXjaahI/hXIRJeNQT6WXZWij
	XO61GEf6C/Qc8QuuWrAWlFFNCA8KCZZzHen0AuWEsHIlXjIcjA3s8YvuTy3njQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758520604; a=rsa-sha256; cv=none;
	b=t+qNocmAsbqWOkac77x0Z6EnIfSMRa4xFRuvG+Dh2aTDyLXWQSHJhT0xf6F8pr9KMb1UcN
	1yKDrkeDiZRMbTJIFYk7xXtpnJ5QuLsG/rPQnUcyFEmZR8I3Dsdr4G2ojkVsnXZ0mft9Wv
	MFsEg51DZ7NpnZ1upKDUfa/+g0RxwLwV1yajqt2jHuMElwx5738ClptHAllETFEWnnWD7t
	og6feqWipxS1FsC6CeLGHdp2OfhKeSpLse4kepYO+wmhEB+l98orO1Xw3TJyRPmStbmGxb
	DGoxltN/MmX1Cqo8DUxY9K+XCrKPY2z9kFJrbq+u8opSP6LJ4/QLW9BwRnzu7w==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVXRw4Jw1zp0k;
	Mon, 22 Sep 2025 05:56:44 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58M5uiiq006136;
	Mon, 22 Sep 2025 05:56:44 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58M5uiJW006133;
	Mon, 22 Sep 2025 05:56:44 GMT
	(envelope-from git)
Date: Mon, 22 Sep 2025 05:56:44 GMT
Message-Id: <202509220556.58M5uiJW006133@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Xin LI 
Subject: git: bbdd55f00d9b - stable/13 - MFC: MFV: libexpat 2.7.2
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: delphij
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/13
X-Git-Reftype: branch
X-Git-Commit: bbdd55f00d9b2c8830a5f35a0b7e0412b7a85e15
Auto-Submitted: auto-generated

The branch stable/13 has been updated by delphij:

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

commit bbdd55f00d9b2c8830a5f35a0b7e0412b7a85e15
Author:     Xin LI 
AuthorDate: 2025-09-19 02:43:17 +0000
Commit:     Xin LI 
CommitDate: 2025-09-22 05:56:32 +0000

    MFC: MFV: libexpat 2.7.2
    
    (cherry picked from commit 627b778d9e6b603a44a010d22d823ca7c392b363)
---
 contrib/expat/Changes                       |  81 +++-
 contrib/expat/Makefile.am                   |   7 +-
 contrib/expat/Makefile.in                   | 128 +++---
 contrib/expat/README.md                     |   6 +-
 contrib/expat/configure.ac                  |  22 +-
 contrib/expat/doc/Makefile.in               |  29 +-
 contrib/expat/doc/reference.html            | 136 +++++-
 contrib/expat/doc/xmlwf.1                   |  30 +-
 contrib/expat/doc/xmlwf.xml                 |  28 +-
 contrib/expat/examples/Makefile.in          |  35 +-
 contrib/expat/expat_config.h.in             |  12 +-
 contrib/expat/fuzz/xml_lpm_fuzzer.cpp       |   6 +-
 contrib/expat/fuzz/xml_parse_fuzzer.c       |  20 +-
 contrib/expat/fuzz/xml_parsebuffer_fuzzer.c |  24 +-
 contrib/expat/lib/Makefile.in               |  49 ++-
 contrib/expat/lib/expat.h                   |  61 ++-
 contrib/expat/lib/expat_external.h          | 123 +++---
 contrib/expat/lib/internal.h                |   8 +
 contrib/expat/lib/xmlparse.c                | 658 +++++++++++++++++++++-------
 contrib/expat/lib/xmlrole.h                 |  34 +-
 contrib/expat/lib/xmltok.c                  |   4 +-
 contrib/expat/lib/xmltok.h                  | 226 +++++-----
 contrib/expat/tests/Makefile.in             |  99 +++--
 contrib/expat/tests/alloc_tests.c           | 220 +++++++++-
 contrib/expat/tests/basic_tests.c           |   8 +-
 contrib/expat/tests/benchmark/Makefile.in   |  35 +-
 contrib/expat/tests/common.c                |  11 +-
 contrib/expat/tests/handlers.c              |  29 +-
 contrib/expat/tests/minicheck.h             |   3 +-
 contrib/expat/tests/misc_tests.c            |   7 +-
 contrib/expat/tests/nsalloc_tests.c         |  11 +-
 contrib/expat/xmlwf/Makefile.in             |  37 +-
 contrib/expat/xmlwf/unixfilemap.c           |   6 +-
 contrib/expat/xmlwf/xmlfile.c               |  21 +-
 contrib/expat/xmlwf/xmlwf.c                 |  21 +-
 contrib/expat/xmlwf/xmlwf_helpgen.py        |  18 +-
 lib/libexpat/expat_config.h                 |  18 +-
 lib/libexpat/libbsdxml.3                    |   2 +-
 38 files changed, 1615 insertions(+), 658 deletions(-)

diff --git a/contrib/expat/Changes b/contrib/expat/Changes
index 9d6c64b6a460..092252ed1fa3 100644
--- a/contrib/expat/Changes
+++ b/contrib/expat/Changes
@@ -15,12 +15,16 @@
 !!   ClusterFuzz findings with few-days-max response times in communication  !!
 !!   in order to (1) have a sound fix ready before the end of a 90 days      !!
 !!   grace period and (2) in a sustainable manner,                           !!
-!! - helping CPython Expat bindings with supporting Expat's billion laughs   !!
+!! - helping CPython Expat bindings with supporting Expat's amplification    !!
 !!   attack protection API (https://github.com/python/cpython/issues/90949): !!
+!!   - XML_SetAllocTrackerActivationThreshold                                !!
+!!   - XML_SetAllocTrackerMaximumAmplification                               !!
 !!   - XML_SetBillionLaughsAttackProtectionActivationThreshold               !!
 !!   - XML_SetBillionLaughsAttackProtectionMaximumAmplification              !!
 !! - helping Perl's XML::Parser Expat bindings with supporting Expat's       !!
 !!   security API (https://github.com/cpan-authors/XML-Parser/issues/102):   !!
+!!   - XML_SetAllocTrackerActivationThreshold                                !!
+!!   - XML_SetAllocTrackerMaximumAmplification                               !!
 !!   - XML_SetBillionLaughsAttackProtectionActivationThreshold               !!
 !!   - XML_SetBillionLaughsAttackProtectionMaximumAmplification              !!
 !!   - XML_SetReparseDeferralEnabled                                         !!
@@ -37,6 +41,79 @@
 !! THANK YOU!                        Sebastian Pipping -- Berlin, 2024-03-09 !!
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
+Release 2.7.2 Tue September 16 2025
+        Security fixes:
+     #1018 #1034  CVE-2025-59375 -- Disallow use of disproportional amounts of
+                    dynamic memory from within an Expat parser (e.g. previously
+                    a ~250 KiB sized document was able to cause allocation of
+                    ~800 MiB from the heap, i.e. an "amplification" of factor
+                    ~3,300); once a threshold (that defaults to 64 MiB) is
+                    reached, a maximum amplification factor (that defaults to
+                    100.0) is enforced, and violating documents are rejected
+                    with an out-of-memory error.
+                    There are two new API functions to fine-tune this new
+                    behavior:
+                      - XML_SetAllocTrackerActivationThreshold
+                      - XML_SetAllocTrackerMaximumAmplification .
+                    If you ever need to increase these defaults for non-attack
+                    XML payload, please file a bug report with libexpat.
+                      There is also a new environment variable
+                    EXPAT_MALLOC_DEBUG=(0|1|2) to control the verbosity
+                    of allocations debugging at runtime, disabled by default.
+                      Known impact is (reliable and easy) denial of service:
+                    CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:H/RL:O/RC:C
+                    (Base Score: 7.5, Temporal Score: 7.2)
+                    Please note that a layer of compression around XML can
+                    significantly reduce the minimum attack payload size.
+                      Distributors intending to backport (or cherry-pick) the
+                    fix need to copy 99% of the related pull request, not just
+                    the "lib: Implement tracking of dynamic memory allocations"
+                    commit, to not end up with a state that literally does both
+                    too much and too little at the same time. Appending ".diff"
+                    to the pull request URL could be of help.
+
+        Other changes:
+     #1008 #1017  Autotools: Sync CMake templates with CMake 3.31 for macOS
+           #1007  CMake: Drop support for CMake <3.15
+           #1004  CMake: Fix off_t detection for -Werror
+           #1007  CMake|Windows: Fix -DEXPAT_MSVC_STATIC_CRT=ON
+           #1013  Windows: Drop support for Visual Studio <=16.0/2019
+           #1026  xmlwf: Mention supported environment variables in
+                    --help output
+           #1024  xmlwf: Fix (internal) help generator
+           #1034  docs: Promote the contract to call function
+                    XML_FreeContentModel when registering a custom
+                    element declaration handler (via a call to function
+                    XML_SetElementDeclHandler)
+           #1027  docs: Add missing 

..

wrap + #994 docs: Drop AppVeyor badge + #1000 tests: Fix portable_strndup + #1036 Drop casts around malloc/free/realloc that C99 does not need + #1010 Replace empty for-loops with while loops + #1011 Add const with internal XmlInitUnknownEncodingNS + #14 #1037 Drop an OpenVMS support leftover + #999 #1001 Address more clang-tidy warnings + #1030 #1038 Version info bumped from 11:2:10 (libexpat*.so.1.10.2) + to 12:0:11 (libexpat*.so.1.11.0); see https://verbump.de/ + for what these numbers do + + Infrastructure: + #1003 CI: Cover compilation on FreeBSD + #1009 #1035 CI: Upgrade Clang from 19 to 21 + #1031 CI: Make calling Cppcheck without --suppress=objectIndex + and --suppress=unknownMacro possible + #1013 CI|Windows: Get off of deprecated image "windows-2019" + #1008 #1017 .. + #1023 #1025 CI: Adapt to breaking changes in GitHub Actions + + Special thanks to: + Alexander Bluhm + Neil Pang + Theo Buehler + and + OSS-Fuzz / ClusterFuzz + Perl XML::Parser + Release 2.7.1 Thu March 27 2025 Bug fixes: #980 #989 Restore event pointer behavior from Expat 2.6.4 @@ -54,7 +131,7 @@ Release 2.7.1 Thu March 27 2025 #983 #984 Fix printf format specifiers for 32bit Emscripten #992 docs: Promote OpenSSF Best Practices self-certification #978 tests/benchmark: Resolve mistaken double close - #986 Address compiler warnings + #986 Address Frama-C warnings #990 #993 Version info bumped from 11:1:10 (libexpat*.so.1.10.1) to 11:2:10 (libexpat*.so.1.10.2); see https://verbump.de/ for what these numbers do diff --git a/contrib/expat/Makefile.am b/contrib/expat/Makefile.am index c20531a8d6c6..d612d432becb 100644 --- a/contrib/expat/Makefile.am +++ b/contrib/expat/Makefile.am @@ -58,10 +58,8 @@ pkgconfig_DATA = expat.pc pkgconfigdir = $(libdir)/pkgconfig -dist_cmake_DATA = \ - cmake/autotools/expat.cmake - nodist_cmake_DATA = \ + cmake/autotools/expat.cmake \ cmake/autotools/expat-config-version.cmake \ cmake/autotools/expat-noconfig.cmake \ cmake/expat-config.cmake @@ -70,6 +68,9 @@ cmakedir = $(libdir)/cmake/expat-@PACKAGE_VERSION@ _EXTRA_DIST_CMAKE = \ + cmake/autotools/expat__linux.cmake.in \ + cmake/autotools/expat__macos.cmake.in \ + cmake/autotools/expat__windows.cmake.in \ cmake/autotools/expat-noconfig__linux.cmake.in \ cmake/autotools/expat-noconfig__macos.cmake.in \ cmake/autotools/expat-noconfig__windows.cmake.in \ diff --git a/contrib/expat/Makefile.in b/contrib/expat/Makefile.in index 069ec4047eea..b799591f2fc2 100644 --- a/contrib/expat/Makefile.in +++ b/contrib/expat/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.5 from Makefile.am. +# Makefile.in generated by automake 1.18.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2021 Free Software Foundation, Inc. +# Copyright (C) 1994-2025 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -105,6 +105,8 @@ am__make_running_with_option = \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +am__rm_f = rm -f $(am__rm_f_notfound) +am__rm_rf = rm -rf $(am__rm_f_notfound) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -145,12 +147,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ - $(am__configure_deps) $(dist_cmake_DATA) $(am__DIST_COMMON) + $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = expat_config.h CONFIG_CLEAN_FILES = expat.pc cmake/expat-config.cmake \ + cmake/autotools/expat.cmake \ cmake/autotools/expat-config-version.cmake \ cmake/autotools/expat-noconfig.cmake run.sh CONFIG_CLEAN_VPATH_FILES = @@ -203,14 +206,12 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ + { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \ } -am__installdirs = "$(DESTDIR)$(cmakedir)" "$(DESTDIR)$(cmakedir)" \ - "$(DESTDIR)$(pkgconfigdir)" -DATA = $(dist_cmake_DATA) $(nodist_cmake_DATA) $(pkgconfig_DATA) +am__installdirs = "$(DESTDIR)$(cmakedir)" "$(DESTDIR)$(pkgconfigdir)" +DATA = $(nodist_cmake_DATA) $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ @@ -256,8 +257,8 @@ distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ - find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -rf "$(distdir)" \ + find "$(distdir)" -type d ! -perm -700 -exec chmod u+rwx {} ';' \ + ; rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) @@ -288,14 +289,16 @@ am__relativize = \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).tar.lz \ $(distdir).tar.xz -GZIP_ENV = --best +GZIP_ENV = -9 DIST_TARGETS = dist-lzip dist-xz dist-bzip2 dist-gzip # Exists only to be overridden by the user if desired. AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' -distcleancheck_listfiles = find . -type f -print +distcleancheck_listfiles = \ + find . \( -type f -a \! \ + \( -name .nfs* -o -name .smb* -o -name .__afs* \) \) -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_CFLAGS = @AM_CFLAGS@ @@ -403,8 +406,10 @@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__rm_f_notfound = @am__rm_f_notfound@ am__tar = @am__tar@ am__untar = @am__untar@ +am__xargs_n = @am__xargs_n@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -458,16 +463,17 @@ LIBTOOLFLAGS = --verbose SUBDIRS = lib $(am__append_1) $(am__append_2) $(am__append_3) pkgconfig_DATA = expat.pc pkgconfigdir = $(libdir)/pkgconfig -dist_cmake_DATA = \ - cmake/autotools/expat.cmake - nodist_cmake_DATA = \ + cmake/autotools/expat.cmake \ cmake/autotools/expat-config-version.cmake \ cmake/autotools/expat-noconfig.cmake \ cmake/expat-config.cmake cmakedir = $(libdir)/cmake/expat-@PACKAGE_VERSION@ _EXTRA_DIST_CMAKE = \ + cmake/autotools/expat__linux.cmake.in \ + cmake/autotools/expat__macos.cmake.in \ + cmake/autotools/expat__windows.cmake.in \ cmake/autotools/expat-noconfig__linux.cmake.in \ cmake/autotools/expat-noconfig__macos.cmake.in \ cmake/autotools/expat-noconfig__windows.cmake.in \ @@ -552,12 +558,12 @@ expat_config.h: stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/expat_config.h.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status expat_config.h + $(AM_V_at)rm -f stamp-h1 + $(AM_V_GEN)cd $(top_builddir) && $(SHELL) ./config.status expat_config.h $(srcdir)/expat_config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f stamp-h1 - touch $@ + $(AM_V_GEN)($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + $(AM_V_at)rm -f stamp-h1 + $(AM_V_at)touch $@ distclean-hdr: -rm -f expat_config.h stamp-h1 @@ -565,6 +571,8 @@ expat.pc: $(top_builddir)/config.status $(srcdir)/expat.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ cmake/expat-config.cmake: $(top_builddir)/config.status $(top_srcdir)/cmake/expat-config.cmake.in cd $(top_builddir) && $(SHELL) ./config.status $@ +cmake/autotools/expat.cmake: $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $@ cmake/autotools/expat-config-version.cmake: $(top_builddir)/config.status $(top_srcdir)/cmake/autotools/expat-config-version.cmake.in cd $(top_builddir) && $(SHELL) ./config.status $@ cmake/autotools/expat-noconfig.cmake: $(top_builddir)/config.status @@ -580,27 +588,6 @@ clean-libtool: distclean-libtool: -rm -f libtool config.lt -install-dist_cmakeDATA: $(dist_cmake_DATA) - @$(NORMAL_INSTALL) - @list='$(dist_cmake_DATA)'; test -n "$(cmakedir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(cmakedir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(cmakedir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(cmakedir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(cmakedir)" || exit $$?; \ - done - -uninstall-dist_cmakeDATA: - @$(NORMAL_UNINSTALL) - @list='$(dist_cmake_DATA)'; test -n "$(cmakedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(cmakedir)'; $(am__uninstall_files_from_dir) install-nodist_cmakeDATA: $(nodist_cmake_DATA) @$(NORMAL_INSTALL) @list='$(nodist_cmake_DATA)'; test -n "$(cmakedir)" || list=; \ @@ -749,12 +736,13 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files + distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) $(am__remove_distdir) - test -d "$(distdir)" || mkdir "$(distdir)" + $(AM_V_at)$(MKDIR_P) "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -822,6 +810,10 @@ dist-gzip: distdir dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) + +dist-bzip3: distdir + tardir=$(distdir) && $(am__tar) | bzip3 -c >$(distdir).tar.bz3 + $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) @@ -862,9 +854,11 @@ dist dist-all: distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ + eval GZIP= gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.bz3*) \ + bzip3 -dc $(distdir).tar.bz3 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ @@ -872,7 +866,7 @@ distcheck: dist *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ + eval GZIP= gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ *.tar.zst*) \ @@ -948,7 +942,7 @@ check: check-recursive all-am: Makefile $(DATA) expat_config.h installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(cmakedir)" "$(DESTDIR)$(cmakedir)" "$(DESTDIR)$(pkgconfigdir)"; do \ + for dir in "$(DESTDIR)$(cmakedir)" "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive @@ -975,8 +969,8 @@ mostlyclean-generic: clean-generic: distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -$(am__rm_f) $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -1003,8 +997,7 @@ info: info-recursive info-am: -install-data-am: install-dist_cmakeDATA install-nodist_cmakeDATA \ - install-pkgconfigDATA +install-data-am: install-nodist_cmakeDATA install-pkgconfigDATA install-dvi: install-dvi-recursive @@ -1050,29 +1043,27 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-dist_cmakeDATA uninstall-nodist_cmakeDATA \ - uninstall-pkgconfigDATA +uninstall-am: uninstall-nodist_cmakeDATA uninstall-pkgconfigDATA .MAKE: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ - dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ - dist-xz dist-zip dist-zstd distcheck distclean \ + dist-all dist-bzip2 dist-bzip3 dist-gzip dist-lzip dist-shar \ + dist-tarZ dist-xz dist-zip dist-zstd distcheck distclean \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dist_cmakeDATA \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-nodist_cmakeDATA install-pdf \ - install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-am uninstall uninstall-am \ - uninstall-dist_cmakeDATA uninstall-nodist_cmakeDATA \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man \ + install-nodist_cmakeDATA install-pdf install-pdf-am \ + install-pkgconfigDATA install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-nodist_cmakeDATA \ uninstall-pkgconfigDATA .PRECIOUS: Makefile @@ -1149,3 +1140,10 @@ qa: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: + +# Tell GNU make to disable its built-in pattern rules. +%:: %,v +%:: RCS/%,v +%:: RCS/% +%:: s.% +%:: SCCS/s.% diff --git a/contrib/expat/README.md b/contrib/expat/README.md index 77c6bf27d307..fdaaf459e204 100644 --- a/contrib/expat/README.md +++ b/contrib/expat/README.md @@ -1,5 +1,4 @@ [![Run Linux CI tasks](https://github.com/libexpat/libexpat/actions/workflows/linux.yml/badge.svg)](https://github.com/libexpat/libexpat/actions/workflows/linux.yml) -[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/libexpat/libexpat?svg=true)](https://ci.appveyor.com/project/libexpat/libexpat) [![Packaging status](https://repology.org/badge/tiny-repos/expat.svg)](https://repology.org/metapackage/expat/versions) [![Downloads SourceForge](https://img.shields.io/sourceforge/dt/expat?label=Downloads%20SourceForge)](https://sourceforge.net/projects/expat/files/) [![Downloads GitHub](https://img.shields.io/github/downloads/libexpat/libexpat/total?label=Downloads%20GitHub)](https://github.com/libexpat/libexpat/releases) @@ -12,7 +11,7 @@ > at the top of the `Changes` file. -# Expat, Release 2.7.1 +# Expat, Release 2.7.2 This is Expat, a C99 library for parsing [XML 1.0 Fourth Edition](https://www.w3.org/TR/2006/REC-xml-20060816/), started by @@ -27,7 +26,8 @@ Expat supports the following C99 compilers: - GNU GCC >=4.5 (for use from C) or GNU GCC >=4.8.1 (for use from C++) - LLVM Clang >=3.5 -- Microsoft Visual Studio >=16.0/2019 (rolling `${today} minus 5 years`) +- Microsoft Visual Studio >=17.0/2022 + (the oldest version supported by the [official GitHub Actions Windows images](https://github.com/actions/runner-images)) Windows users can use the [`expat-win32bin-*.*.*.{exe,zip}` download](https://github.com/libexpat/libexpat/releases), diff --git a/contrib/expat/configure.ac b/contrib/expat/configure.ac index 0c88b8867019..b9966eabcd60 100644 --- a/contrib/expat/configure.ac +++ b/contrib/expat/configure.ac @@ -84,9 +84,9 @@ dnl dnl If the API changes incompatibly set LIBAGE back to 0 dnl -LIBCURRENT=11 # sync -LIBREVISION=2 # with -LIBAGE=10 # CMakeLists.txt! +LIBCURRENT=12 # sync +LIBREVISION=0 # with +LIBAGE=11 # CMakeLists.txt! AC_CONFIG_HEADERS([expat_config.h]) AH_TOP([#ifndef EXPAT_CONFIG_H @@ -440,12 +440,22 @@ AC_MSG_RESULT([${CMAKE_SHARED_LIBRARY_PREFIX}]) AC_SUBST([CMAKE_SHARED_LIBRARY_PREFIX]) AS_CASE("${host_os}", - [darwin*], [CMAKE_NOCONFIG_SOURCE=cmake/autotools/expat-noconfig__macos.cmake.in], - [mingw*|cygwin*], [CMAKE_NOCONFIG_SOURCE=cmake/autotools/expat-noconfig__windows.cmake.in], - [CMAKE_NOCONFIG_SOURCE=cmake/autotools/expat-noconfig__linux.cmake.in]) + [darwin*], [ + CMAKE_SOURCE=cmake/autotools/expat__macos.cmake.in + CMAKE_NOCONFIG_SOURCE=cmake/autotools/expat-noconfig__macos.cmake.in + ], + [mingw*|cygwin*], [ + CMAKE_SOURCE=cmake/autotools/expat__windows.cmake.in + CMAKE_NOCONFIG_SOURCE=cmake/autotools/expat-noconfig__windows.cmake.in + ], + [ + CMAKE_SOURCE=cmake/autotools/expat__linux.cmake.in + CMAKE_NOCONFIG_SOURCE=cmake/autotools/expat-noconfig__linux.cmake.in + ]) AC_CONFIG_FILES([Makefile] [expat.pc] [cmake/expat-config.cmake] + [cmake/autotools/expat.cmake:${CMAKE_SOURCE}] [cmake/autotools/expat-config-version.cmake] [cmake/autotools/expat-noconfig.cmake:${CMAKE_NOCONFIG_SOURCE}] [doc/Makefile] diff --git a/contrib/expat/doc/Makefile.in b/contrib/expat/doc/Makefile.in index 72deb0565d94..13be5107f89b 100644 --- a/contrib/expat/doc/Makefile.in +++ b/contrib/expat/doc/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.5 from Makefile.am. +# Makefile.in generated by automake 1.18.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2021 Free Software Foundation, Inc. +# Copyright (C) 1994-2025 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -102,6 +102,8 @@ am__make_running_with_option = \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +am__rm_f = rm -f $(am__rm_f_notfound) +am__rm_rf = rm -rf $(am__rm_f_notfound) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -184,10 +186,9 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ + { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \ } man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" @@ -303,8 +304,10 @@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__rm_f_notfound = @am__rm_f_notfound@ am__tar = @am__tar@ am__untar = @am__untar@ +am__xargs_n = @am__xargs_n@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -442,6 +445,7 @@ ctags CTAGS: cscope cscopelist: @WITH_DISTRIBUTABLE_MANPAGE_TRUE@dist-hook: + distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -507,11 +511,11 @@ install-strip: mostlyclean-generic: clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + -$(am__rm_f) $(CLEANFILES) distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -$(am__rm_f) $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -616,3 +620,10 @@ uninstall-man: uninstall-man1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: + +# Tell GNU make to disable its built-in pattern rules. +%:: %,v +%:: RCS/%,v +%:: RCS/% +%:: s.% +%:: SCCS/s.% diff --git a/contrib/expat/doc/reference.html b/contrib/expat/doc/reference.html index 2b3bd39580a9..12b12b92ff6d 100644 --- a/contrib/expat/doc/reference.html +++ b/contrib/expat/doc/reference.html @@ -52,7 +52,7 @@

The Expat XML Parser - Release 2.7.1 + Release 2.7.2

@@ -157,6 +157,8 @@ interface.

@@ -319,7 +321,7 @@ directions in the next section. Otherwise if you have Microsoft's Developer Studio installed, you can use CMake to generate a .sln file, e.g. -cmake -G"Visual Studio 16 2019" -DCMAKE_BUILD_TYPE=RelWithDebInfo . +cmake -G"Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=RelWithDebInfo . , and build Expat using msbuild /m expat.sln after.

Alternatively, you may download the Win32 binary package that @@ -1905,7 +1907,7 @@ struct XML_cp {

Sets a handler for element declarations in a DTD. The handler gets called with the name of the element in the declaration and a pointer to a structure that contains the element model. It's the user code's -responsibility to free model when finished with it. See +responsibility to free model when finished with via a call to XML_FreeContentModel. There is no need to free the model from the handler, it can be kept around and freed at a later stage.

@@ -2198,13 +2200,13 @@ XML_SetBillionLaughsAttackProtectionMaximumAmplification(XML_Parser p, returns XML_TRUE upon success and XML_FALSE upon error.

- The amplification factor is calculated as .. -
-    amplification := (direct + indirect) / direct
-  
- .. while parsing, whereas - direct is the number of bytes read from the primary document in parsing and - indirect is the number of bytes added by expanding entities and reading of external DTD files, combined. +

The amplification factor is calculated as ..

+
amplification := (direct + indirect) / direct
+

+ .. while parsing, whereas + direct is the number of bytes read from the primary document in parsing and + indirect is the number of bytes added by expanding entities and reading of external DTD files, combined. +

For a call to XML_SetBillionLaughsAttackProtectionMaximumAmplification to succeed:

    @@ -2267,6 +2269,120 @@ XML_SetBillionLaughsAttackProtectionActivationThreshold(XML_Parser p,

+

XML_SetAllocTrackerMaximumAmplification

+
+/* Added in Expat 2.7.2. */
+XML_Bool
+XML_SetAllocTrackerMaximumAmplification(XML_Parser p,
+                                        float maximumAmplificationFactor);
+
+
+

+ Sets the maximum tolerated amplification factor + between direct input and bytes of dynamic memory allocated + (default: 100.0) + of parser p to maximumAmplificationFactor, and + returns XML_TRUE upon success and XML_FALSE upon error. +

+ +

+ Note: + There are three types of allocations that intentionally bypass tracking and limiting: +

+ + +

The amplification factor is calculated as ..

+
amplification := allocated / direct
+

+ .. while parsing, whereas + direct is the number of bytes read from the primary document in parsing and + allocated is the number of bytes of dynamic memory allocated in the parser hierarchy. +

+ +

For a call to XML_SetAllocTrackerMaximumAmplification to succeed:

+
    +
  • parser p must be a non-NULL root parser (without any parent parsers) and
  • +
  • maximumAmplificationFactor must be non-NaN and greater than or equal to 1.0.
  • +
+ +

+ Note: + If you ever need to increase this value for non-attack payload, + please file a bug report. +

+ +

+ Note: + Amplifications factors greater than 100 can been observed near the start of parsing + even with benign files in practice. + + So if you do reduce the maximum allowed amplification, + please make sure that the activation threshold is still big enough + to not end up with undesired false positives (i.e. benign files being rejected). +

+
+ +

XML_SetAllocTrackerActivationThreshold

+
+/* Added in Expat 2.7.2. */
+XML_Bool
+XML_SetAllocTrackerActivationThreshold(XML_Parser p,
+                                       unsigned long long activationThresholdBytes);
+
+
+

+ Sets number of allocated bytes of dynamic memory + needed to activate protection against disproportionate use of RAM + (default: 64 MiB) + of parser p to activationThresholdBytes, and + returns XML_TRUE upon success and XML_FALSE upon error. +

+ +

+ Note: + For types of allocations that intentionally bypass tracking and limiting, please see + XML_SetAllocTrackerMaximumAmplification + above. +

+ +

For a call to XML_SetAllocTrackerActivationThreshold to succeed:

+
    +
  • parser p must be a non-NULL root parser (without any parent parsers).
  • +
+ +

+ Note: + If you ever need to increase this value for non-attack payload, + please file a bug report. +

+
+

XML_SetReparseDeferralEnabled

 /* Added in Expat 2.6.0. */
diff --git a/contrib/expat/doc/xmlwf.1 b/contrib/expat/doc/xmlwf.1
index 76aa7e30d074..5f50ba9e4d00 100644
--- a/contrib/expat/doc/xmlwf.1
+++ b/contrib/expat/doc/xmlwf.1
@@ -5,7 +5,7 @@
 \\$2 \(la\\$1\(ra\\$3
 ..
 .if \n(.g .mso www.tmac
-.TH XMLWF 1 "March 27, 2025" "" ""
+.TH XMLWF 1 "September 16, 2025" "" ""
 .SH NAME
 xmlwf \- Determines if an XML document is well-formed
 .SH SYNOPSIS
@@ -88,7 +88,11 @@ supports both.
 .TP 
 \*(T<\fB\-a\fR\*(T> \fIfactor\fR
 Sets the maximum tolerated amplification factor
-for protection against billion laughs attacks (default: 100.0).
+for protection against amplification attacks
+like the billion laughs attack
+(default: 100.0
+for the sum of direct and indirect output and also
+for allocations of dynamic memory).
 The amplification factor is calculated as ..
 
 .nf
@@ -97,12 +101,22 @@ The amplification factor is calculated as ..
           
 .fi
 
-\&.. while parsing, whereas
+\&.. with regard to use of entities and ..
+
+.nf
+
+            amplification := allocated / direct
+          
+.fi
+
+\&.. with regard to dynamic memory while parsing.
  is the number of bytes read
-from the primary document in parsing and
+from the primary document in parsing,
  is the number of bytes
 added by expanding entities and reading of external DTD files,
-combined.
+combined, and
+ is the total number of bytes of dynamic memory
+allocated (and not freed) per hierarchy of parsers.
 
 \fINOTE\fR:
 If you ever need to increase this value for non-attack payload,
@@ -110,8 +124,10 @@ please file a bug report.
 .TP 
 \*(T<\fB\-b\fR\*(T> \fIbytes\fR
 Sets the number of output bytes (including amplification)
-needed to activate protection against billion laughs attacks
-(default: 8 MiB).
+needed to activate protection against amplification attacks
+like billion laughs
+(default: 8 MiB for the sum of direct and indirect output,
+and 64 MiB for allocations of dynamic memory).
 This can be thought of as an "activation threshold".
 
 \fINOTE\fR:
diff --git a/contrib/expat/doc/xmlwf.xml b/contrib/expat/doc/xmlwf.xml
index 17e9cf51c191..defe9df8e46a 100644
--- a/contrib/expat/doc/xmlwf.xml
+++ b/contrib/expat/doc/xmlwf.xml
@@ -21,7 +21,7 @@
           "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
   Scott">
   Bronson">
-  March 27, 2025">
+  September 16, 2025">
   
   1">
   bronson@rinspin.com">
@@ -158,19 +158,31 @@ supports both.
         
           
             Sets the maximum tolerated amplification factor
-            for protection against billion laughs attacks (default: 100.0).
+            for protection against amplification attacks
+            like the billion laughs attack
+            (default: 100.0
+            for the sum of direct and indirect output and also
+            for allocations of dynamic memory).
             The amplification factor is calculated as ..
           
           
             amplification := (direct + indirect) / direct
           
           
-            .. while parsing, whereas
+            .. with regard to use of entities and ..
+          
+          
+            amplification := allocated / direct
+          
+          
+            .. with regard to dynamic memory while parsing.
             <direct> is the number of bytes read
-              from the primary document in parsing and
+              from the primary document in parsing,
             <indirect> is the number of bytes
               added by expanding entities and reading of external DTD files,
-              combined.
+              combined, and
+            <allocated> is the total number of bytes of dynamic memory
+              allocated (and not freed) per hierarchy of parsers.
           
           
             NOTE:
@@ -185,8 +197,10 @@ supports both.
         
           
             Sets the number of output bytes (including amplification)
-            needed to activate protection against billion laughs attacks
-            (default: 8 MiB).
+            needed to activate protection against amplification attacks
+            like billion laughs
+            (default: 8 MiB for the sum of direct and indirect output,
+            and 64 MiB for allocations of dynamic memory).
             This can be thought of as an "activation threshold".
           
           
diff --git a/contrib/expat/examples/Makefile.in b/contrib/expat/examples/Makefile.in
index 044c9089c565..0e55052ce6e4 100644
--- a/contrib/expat/examples/Makefile.in
+++ b/contrib/expat/examples/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# Makefile.in generated by automake 1.18.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+# Copyright (C) 1994-2025 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -101,6 +101,8 @@ am__make_running_with_option = \
   test $$has_opt = yes
 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+am__rm_f = rm -f $(am__rm_f_notfound)
+am__rm_rf = rm -rf $(am__rm_f_notfound)
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -330,8 +332,10 @@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
*** 3751 LINES SKIPPED ***

From nobody Mon Sep 22 09:23:29 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVd2T4w4wz68rTj;
	Mon, 22 Sep 2025 09:23:29 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cVd2T41pMz40Nt;
	Mon, 22 Sep 2025 09:23:29 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758533009;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=SY2QZPzztqqLH1JKTHrEX0k7kRE1zwXEJA3tdIO6Vh8=;
	b=ifHusSxMiGOZizZX8X1DLnaqUxu3xPRRhoptCAYKehgDwHOW/6qn/DzF0wmUpfdpmqA3QN
	Ulgl4EezaW7XS6qLy6PgSMGRxz+YaFL7oY3WyepVfTm5El2HerA+cw6D7xOnOhvypURWFl
	UprI/ffsjCbbIBtyFlkZzm7/pj3VhG00hJ2KYQIQWPdyiVWhM9jP+nRw74rTKiWvnMN6wp
	8Bz5AdAQfcSV1BxnWNWBxD8UtpqakKlsgg88HH6u2kWwhlgaaQyxRj5m9nTSIvRGU4NciY
	m2QhuoYi0Dq1tZgcFFv0XQANVyYgPMmcw6mcyRku1A7s4pWN/FKeXOD6IQXBJw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758533009;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=SY2QZPzztqqLH1JKTHrEX0k7kRE1zwXEJA3tdIO6Vh8=;
	b=hC+gL+s7ZPSoFGvPLgCkq77KDCLeGzZd0oyFwP+5bHy59Az2Zq1fmU5BmoaIvqUtwZgZtM
	hW+yg/3qRQnEAkIF/RXT3QuSqs5Es754DCDSkoP3s8N0aAx10QGw4uuYhMna7NI0JivFlt
	3gY55Gav9oe1GhOEDn50Zv9nba2qVpONMlZovYFuc3/pABEbv9Ir7VyzQQ30He00FP7dEV
	Z0PJJv847Gow+u9cq9qc66BTPTidMeurjUamEsXMwM3SyON3E5zhPOkKsHMcAh9TRhnbcy
	ULkSAruDzd9O5GdFNNFAq73sPJqFla36Rc6ONDvsmlnQ9Bww4BUCWRUik5gAjA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758533009; a=rsa-sha256; cv=none;
	b=FisCR0mLsRXCRR6uyT5Nvwf25rrpWviqYYyWUCQGkJBbcJSJslkldGKXuNtl7v1vYdGsdl
	UiOjtfC95NEDlrR9zfSXFzDUtn/XyFzYs0QHTuMr+n0IsL6fNXJmqaMXBtJTWP6+JuKRa1
	DduZHl5onoUa3NJ5NhbVWi6lJ87vumjU+k++81r81b4mF5b5evYgxTBEXEbwmhmmX7JX1f
	dGE2FKWrOeqLf8xvR0O8vkf3gOjcsoEyI5kTY5q+qaGKeBQtDm/XawDBKw0OSdN2FjcOLd
	RFL7uRpsY8faYYF+lQ7w4Bda7zQsjZxtaevtX9vaehVJD3+KfQ6RihYd2/WaRg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVd2T3bNPztjt;
	Mon, 22 Sep 2025 09:23:29 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58M9NTCB099955;
	Mon, 22 Sep 2025 09:23:29 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58M9NTS7099952;
	Mon, 22 Sep 2025 09:23:29 GMT
	(envelope-from git)
Date: Mon, 22 Sep 2025 09:23:29 GMT
Message-Id: <202509220923.58M9NTS7099952@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Vladimir Kondratyev 
Subject: git: d5f63d6b3738 - stable/15 - moused(8): Add command
  line option to restrict interface type
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: wulf
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: d5f63d6b373890ce4654f27d89e281d3c4c265cf
Auto-Submitted: auto-generated

The branch stable/15 has been updated by wulf:

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

commit d5f63d6b373890ce4654f27d89e281d3c4c265cf
Author:     Vladimir Kondratyev 
AuthorDate: 2025-09-21 13:14:48 +0000
Commit:     Vladimir Kondratyev 
CommitDate: 2025-09-22 09:22:12 +0000

    moused(8): Add command line option to restrict interface type
    
    to evdev or sysmouse. It is required to avoid receiving of double events
    on hybrid devices supporting both interfaces like ums (4).
    
    MFC after:      1 day
    Reviewed by:    glebius (via private chat)
    Differential Revision:  https://reviews.freebsd.org/D52647
    
    (cherry picked from commit 1335bf5ce1c9f0bf15c1fbed502f49e5a4950e32)
---
 libexec/rc/rc.conf              |  2 +-
 libexec/rc/rc.d/moused          |  7 +++++--
 usr.sbin/moused/moused/moused.8 | 31 +++++++++++++++++++++++++++----
 usr.sbin/moused/moused/moused.c | 39 +++++++++++++++++++++++++++------------
 4 files changed, 60 insertions(+), 19 deletions(-)

diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf
index 82b6efa6ca62..2506bd45a53f 100644
--- a/libexec/rc/rc.conf
+++ b/libexec/rc/rc.conf
@@ -589,7 +589,7 @@ saver="NO"		# screen saver: Uses /boot/kernel/${saver}_saver.ko
 moused_nondefault_enable="NO" # Treat non-default mice as enabled unless
 			       # specifically overridden in rc.conf(5).
 moused_enable="NO"	# Run the mouse daemon.
-moused_type="auto"	# See man page for rc.conf(5) for available settings.
+moused_type="evdev"	# See man page for rc.conf(5) for available settings.
 moused_port="auto"	# Set to your mouse port.
 moused_flags=""		# Any additional flags to moused.
 mousechar_start="NO"	# if 0xd0-0xd3 default range is occupied in your
diff --git a/libexec/rc/rc.d/moused b/libexec/rc/rc.d/moused
index aaf0dd0890a8..64e4f815eea9 100755
--- a/libexec/rc/rc.d/moused
+++ b/libexec/rc/rc.d/moused
@@ -16,6 +16,7 @@ start_cmd="moused_start"
 pidprefix="/var/run/moused"
 pidfile="${pidprefix}.pid"
 pidarg=
+typearg=
 load_rc_config $name
 
 # doesn't make sense to run in a svcj: nojail keyword
@@ -49,15 +50,17 @@ moused_start()
 		eval myflags=\${moused_${ms}_flags-$moused_flags}
 		eval myport=\${moused_${ms}_port-/dev/$ms}
 		eval mytype=\${moused_${ms}_type-$moused_type}
+		if [ -n "$mytype" ] && check_kern_features evdev_support; then
+			typearg="-t ${mytype}"
+		fi
 	else
 		ms="default"
 		myflags="$moused_flags"
 		myport="$moused_port"
-		mytype="$moused_type"
 	fi
 
 	startmsg -n "Starting ${ms} moused"
-	/usr/sbin/moused ${myflags} -p ${myport} -t ${mytype} ${pidarg}
+	/usr/sbin/moused ${myflags} -p ${myport} ${typearg} ${pidarg}
 	startmsg '.'
 
 	mousechar_arg=
diff --git a/usr.sbin/moused/moused/moused.8 b/usr.sbin/moused/moused/moused.8
index 96feeda336c9..2483f8a04b2a 100644
--- a/usr.sbin/moused/moused/moused.8
+++ b/usr.sbin/moused/moused/moused.8
@@ -49,7 +49,7 @@
 .Op Fl m Ar N=M
 .Op Fl w Ar N
 .Op Fl z Ar target
-.Op Fl t Ar mousetype
+.Op Fl t Ar interfacetype
 .Op Fl l Ar level
 .Op Fl 3 Op Fl E Ar timeout
 .Op Fl T Ar distance Ns Op , Ns Ar time Ns Op , Ns Ar after
@@ -329,9 +329,32 @@ or
 .Ar high .
 This option may not be supported by all the device.
 .It Fl t Ar type
-Ignored.
-Used for compatibiliy with legacy
-.Nm .
+Force the interface type of the mouse attached to the port.
+You may explicitly specify a type listed below, or use
+.Ar auto
+to let the
+.Nm
+utility automatically select an appropriate protocol for the given
+character device.
+If you entirely omit this option in the command line,
+.Fl t Ar auto
+is assumed.
+.Pp
+Valid types for this option are listed below.
+.Bl -tag -compact -width systemmouse
+.It Ar evdev
+Input event device usualy residing in
+.Pa /dev/input .
+.It Ar sysmouse
+Traditional protocol used by e.g.
+.Xr ums 4
+and
+.Xr psm 4
+drivers.
+.El
+.Pp
+Note that this option restricts usage of the given port rather then gives
+a hint.
 .It Fl q Ar config
 Path to configuration file.
 .It Fl Q Ar quirks
diff --git a/usr.sbin/moused/moused/moused.c b/usr.sbin/moused/moused/moused.c
index 33bcf359a1a0..fa3bfbbf2b3e 100644
--- a/usr.sbin/moused/moused/moused.c
+++ b/usr.sbin/moused/moused/moused.c
@@ -448,6 +448,7 @@ static const char *config_file = CONFDIR "/moused.conf";
 #endif
 static const char *quirks_path = QUIRKSDIR;
 static struct quirks_context *quirks;
+static enum device_if force_if = DEVICE_IF_UNKNOWN;
 
 static int	opt_rate = 0;
 static int	opt_resolution = MOUSE_RES_UNKNOWN;
@@ -529,7 +530,8 @@ main(int argc, char *argv[])
 	struct rodent *r;
 	pid_t mpid;
 	int c;
-	int	i;
+	u_int i;
+	int n;
 	u_long ul;
 	char *errstr;
 
@@ -552,26 +554,26 @@ main(int argc, char *argv[])
 			break;
 
 		case 'a':
-			i = sscanf(optarg, "%lf,%lf", &opt_accelx, &opt_accely);
-			if (i == 0) {
+			n = sscanf(optarg, "%lf,%lf", &opt_accelx, &opt_accely);
+			if (n == 0) {
 				warnx("invalid linear acceleration argument "
 				    "'%s'", optarg);
 				usage();
 			}
-			if (i == 1)
+			if (n == 1)
 				opt_accely = opt_accelx;
 			break;
 
 		case 'A':
 			opt_exp_accel = true;
-			i = sscanf(optarg, "%lf,%lf", &opt_expoaccel,
+			n = sscanf(optarg, "%lf,%lf", &opt_expoaccel,
 			    &opt_expoffset);
-			if (i == 0) {
+			if (n == 0) {
 				warnx("invalid exponential acceleration "
 				    "argument '%s'", optarg);
 				usage();
 			}
-			if (i == 1)
+			if (n == 1)
 				opt_expoffset = 1.0;
 			break;
 
@@ -646,8 +648,19 @@ main(int argc, char *argv[])
 			break;
 
 		case 't':
-			if (strcmp(optarg, "auto") != 0)
-				warnx("ignore mouse type `%s'", optarg);
+			if (strcmp(optarg, "auto") == 0) {
+				force_if = DEVICE_IF_UNKNOWN;
+				break;
+			}
+			for (i = 0; i < nitems(rifs); i++)
+				if (strcmp(optarg, rifs[i].name) == 0) {
+					force_if = i;
+					break;
+				}
+			if (i == nitems(rifs)) {
+				warnx("no such interface type `%s'", optarg);
+				usage();
+			}
 			break;
 
 		case 'w':
@@ -1224,7 +1237,7 @@ usage(void)
 	fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n",
 	    "usage: moused [-dfg] [-I file] [-F rate] [-r resolution]",
 	    "              [-VH [-U threshold]] [-a X[,Y]] [-C threshold] [-m N=M] [-w N]",
-	    "              [-z N] [-t ] [-l level] [-3 [-E timeout]]",
+	    "              [-z N] [-t ] [-l level] [-3 [-E timeout]]",
 	    "              [-T distance[,time[,after]]] -p  [-q config] [-Q quirks]",
 	    "       moused [-d] -i  -p ");
 	exit(1);
@@ -1338,9 +1351,11 @@ r_identify_if(int fd)
 {
 	int dummy;
 
-	if (ioctl(fd, EVIOCGVERSION, &dummy) >= 0)
+	if ((force_if == DEVICE_IF_UNKNOWN || force_if == DEVICE_IF_EVDEV) &&
+	    ioctl(fd, EVIOCGVERSION, &dummy) >= 0)
 		return (DEVICE_IF_EVDEV);
-	if (ioctl(fd, MOUSE_GETLEVEL, &dummy) >= 0)
+	if ((force_if == DEVICE_IF_UNKNOWN || force_if == DEVICE_IF_SYSMOUSE) &&
+	    ioctl(fd, MOUSE_GETLEVEL, &dummy) >= 0)
 		return (DEVICE_IF_SYSMOUSE);
 	return (DEVICE_IF_UNKNOWN);
 }

From nobody Mon Sep 22 09:23:30 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVd2W6VTDz68rtn;
	Mon, 22 Sep 2025 09:23:31 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cVd2V6HrRz40Qg;
	Mon, 22 Sep 2025 09:23:30 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758533010;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=FKXUrw1cLpLTIkrqGRdgpCnwtuXvkzfC3nZORmpEpsw=;
	b=U/bH7vHo6ZrR3IyZhdHYKHO2Izly8u4wyyCjCqPFij9h0Lp2/XcjOU9y/kbgXweAdDIQUX
	Ngp9NomN2qGFNHi6eGGLFecnZ274Ktg9PpYggUtjRltVd6y0ixIq8Sv8TNjn3P2ISjlw9q
	mclh/JYoaCcWNhxXoCQ7TQMp6TMWu4Ds4x1WX8EgLS6mkzOrCDNfvajcX3kV7ls0CHzPa/
	8vk1tg2fzfNBMDtUjUMlBhCfgygl/6F8F6OT2ysieOZth2Ggp629Ed5klh6JEA2pAxS3P3
	G/ZXhhhU3mmOkJo4zCHyTC19dS9x9o+pEeah8mQPa7elY1tNPEdqPW3YXD4RfA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758533010;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=FKXUrw1cLpLTIkrqGRdgpCnwtuXvkzfC3nZORmpEpsw=;
	b=xkEfpblCsyGQTLjdmbhZXSpiIgEjWWcbqwnAxbsDor4Jhxc2C8YZvBGaZOYpeaFuCxrTdS
	XKP2oFWGvmIYEbf0ivNxa3O3GSIfLFGdcmhI5koIZOYG+l4VPISvyP7B8PDK1jxtAjUqKY
	puk9KgAsHLLNPglUaljY73rIcN5jlZr01NKw6A+g0z9UcV6Rgn45z4/KRQ0LkP83QQ3tiA
	fhmVLPuU2ZXf98swwiBjjAHBCpIrcEjAApGPAW9TfLQmGe3QCHQH3g9DreuGmdJ2iR3E5Z
	A5UEnGxG2i588al1wZNHSHu9+NQq1AjaMixids2DUfuo1KB2UewkAHYLqVK1eQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758533010; a=rsa-sha256; cv=none;
	b=ZWb7X9pgKuznObnW7/f2PGnLN3iBQDAUEvHA+Lx8xhjuqr4tpiQj3OgKCqUWKSLMDQwogf
	v1jOIIhzPO/y42bKNQHC6oWJqwykB9rj9oBIzZ4/Kld7t8Ur5+lLXjquxW5IVGboj7M3rZ
	28LeUHv8xo80hyEt9DP6glEbciuJIM1bodVPUCmTJ1uGAR05hfiFyO2b2AXq/Jmn7EKshH
	gtOLayHdhmqIRWbHFDLLiwfCLuDXy4fj/ekSUtT+iLQ/CLBY8uo0ImgstAMxx3a6NU2SUC
	jx1Omc74OfTRc666vBOs/FZeyIE4HPRcm95Mx3k2JHcZU9WW09XMLJHZ/cv1kQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVd2V4999ztTh;
	Mon, 22 Sep 2025 09:23:30 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58M9NUlT099995;
	Mon, 22 Sep 2025 09:23:30 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58M9NUsR099992;
	Mon, 22 Sep 2025 09:23:30 GMT
	(envelope-from git)
Date: Mon, 22 Sep 2025 09:23:30 GMT
Message-Id: <202509220923.58M9NUsR099992@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Vladimir Kondratyev 
Subject: git: a4417b9f9cde - stable/15 - moused(8): Start moused
  with devd
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: wulf
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: a4417b9f9cde5ab1ca1ff84da4847bd7d5141c29
Auto-Submitted: auto-generated

The branch stable/15 has been updated by wulf:

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

commit a4417b9f9cde5ab1ca1ff84da4847bd7d5141c29
Author:     Vladimir Kondratyev 
AuthorDate: 2025-09-21 13:14:49 +0000
Commit:     Vladimir Kondratyev 
CommitDate: 2025-09-22 09:22:24 +0000

    moused(8): Start moused with devd
    
    It is appeared that currently starting of moused does not depend on
    moused_enable variable value in rc.conf. That leads to missing USB mice
    support in default configuration. Start moused in traditional per
    device mode with devd to follow POLA.
    
    One daemon per system mode still can be enabled with setting of
    moused_port="auto"
    moused_nondefault_enable="NO"
    variables in /etc/rc.conf
    
    To revert to sysmouse mode add moused_type="sysmouse" to /etc/rc.conf
    
    Reported by:    many
    Requested by:   glebius
    Reviewed by:    glebius
    MFC after:      1 day
    Differential Revision:  https://reviews.freebsd.org/D52430
    
    (cherry picked from commit 66e7f048f0c8e9e726738fadd9dc819bfda3cbfe)
---
 libexec/rc/rc.conf     |  4 ++--
 libexec/rc/rc.d/moused | 11 ++++++-----
 sbin/devd/moused.conf  |  9 +++++++++
 3 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf
index 2506bd45a53f..7525f7c9d1fc 100644
--- a/libexec/rc/rc.conf
+++ b/libexec/rc/rc.conf
@@ -586,11 +586,11 @@ font8x14="NO"		# font 8x14 from /usr/share/{syscons,vt}/fonts/* (or NO).
 font8x8="NO"		# font 8x8 from /usr/share/{syscons,vt}/fonts/* (or NO).
 blanktime="300"		# blank time (in seconds) or "NO" to turn it off.
 saver="NO"		# screen saver: Uses /boot/kernel/${saver}_saver.ko
-moused_nondefault_enable="NO" # Treat non-default mice as enabled unless
+moused_nondefault_enable="YES" # Treat non-default mice as enabled unless
 			       # specifically overridden in rc.conf(5).
 moused_enable="NO"	# Run the mouse daemon.
 moused_type="evdev"	# See man page for rc.conf(5) for available settings.
-moused_port="auto"	# Set to your mouse port.
+moused_port="/dev/psm0"	# Set to your mouse port.
 moused_flags=""		# Any additional flags to moused.
 mousechar_start="NO"	# if 0xd0-0xd3 default range is occupied in your
 			# language code table, specify alternative range
diff --git a/libexec/rc/rc.d/moused b/libexec/rc/rc.d/moused
index 64e4f815eea9..35a26bd57275 100755
--- a/libexec/rc/rc.d/moused
+++ b/libexec/rc/rc.d/moused
@@ -28,9 +28,10 @@ moused_svcj="NO"
 # expected to be the mouse device.
 #
 if [ -n "$2" ]; then
-	eval moused_$2_enable=\${moused_$2_enable-${moused_nondefault_enable}}
-	rcvar="moused_${2}_enable"
-	pidfile="${pidprefix}.$2.pid"
+	ms=`basename $2`
+	eval moused_${ms}_enable=\${moused_${ms}_enable-${moused_nondefault_enable}}
+	rcvar="moused_${ms}_enable"
+	pidfile="${pidprefix}.${ms}.pid"
 	pidarg="-I $pidfile"
 fi
 
@@ -45,10 +46,10 @@ moused_start()
 	# the moused_port variable, which if not defined sets it to the
 	# passed in device name.
 	#
-	ms=$1
+	ms=`basename $1`
 	if [ -n "$ms" ]; then
 		eval myflags=\${moused_${ms}_flags-$moused_flags}
-		eval myport=\${moused_${ms}_port-/dev/$ms}
+		eval myport=\${moused_${ms}_port-/dev/$1}
 		eval mytype=\${moused_${ms}_type-$moused_type}
 		if [ -n "$mytype" ] && check_kern_features evdev_support; then
 			typearg="-t ${mytype}"
diff --git a/sbin/devd/moused.conf b/sbin/devd/moused.conf
index ed1060ffdf2e..8821c2bb8375 100644
--- a/sbin/devd/moused.conf
+++ b/sbin/devd/moused.conf
@@ -33,3 +33,12 @@ notify 100 {
 
 	action "service moused quietstop $cdev";
 };
+
+notify 100 {
+	match "system" "DEVFS";
+	match "subsystem" "CDEV";
+	match "type" "CREATE";
+	match "cdev" "input/event[0-9]+";
+
+	action "service moused quietstart $cdev";
+};

From nobody Mon Sep 22 12:08:13 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVhhY3T75z67nqg;
	Mon, 22 Sep 2025 12:08:13 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cVhhY2y75z3FZs;
	Mon, 22 Sep 2025 12:08:13 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758542893;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=raY7eKkzD9nsfr1ap9Q5cUUTVrVjPzaruGFldgxvQw0=;
	b=dO7ktw1qB9b1bmQRWsKLk8Zc7PNX4sOtoldbDbFKwv9t/f61S5yUhQV+LeIJwMA5MGNiUs
	D5FEC5u2W6vR3I4MoA7Mzjk0qQKb+cf9aB0Grv8V/bS2ACozKGQj4IF7ybo9flsFZaRXsx
	5Ev0OH+xGEmGmq76WvUYo1/hUX3p5/ZBG9Cgvw2eMD8d6/bnh1exBQOYJybwwng+zGatSP
	Hdq9dxBlA541z2gWia/zx5ZK38VtO0rYeOjA36970oVYFTB7p6kbzSpfK97EYGiYx0N9mm
	o+fY+voIbS5ZJoVE07gE+nnTnws3QMavLHuwHmHeX63VOd5e+ZVroAM+qkylzA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758542893;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=raY7eKkzD9nsfr1ap9Q5cUUTVrVjPzaruGFldgxvQw0=;
	b=QnqsfYj41ZpETDAu9DHZYpx2CLv0vgZhWJ2qsNW7zv4t8mQduaOhXR6nAJEGETyQFcIVxx
	vXbSFkdQLmuAI0QLljbQtPfGkBoIazPXL1UEya927ePnma9W8/HWYQ6fR1mcICcb6qZZa8
	yLRBZfGZTxHoa+td4T+Wl6YXK0g8B50geMhrUUdhHKP2WoDMwzjUnmvt87ZKWar/ssPV17
	gox3EUpI8PWQvPZpdUQTshDGRy6GJ6Q9dgw/G+BRxgJl1IuBjNGTx8L/wGg4vbNxE6f9+F
	Rc86kd+XnwU/wCsEAe9nXmGILtF6RTb40lwokvgYLUsCT6pSAIY40oryGuSqVQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758542893; a=rsa-sha256; cv=none;
	b=utKbYhI3AvEljahCboaklR54p5YesXz5ap4/vWzYOzji3WwCgKebYAP+eDAUrLsiXXFhln
	mQORKxRv3y1NbYjFfOckha0X3Wat+HkmNHylhdRIYf7BD4H3rU96xkVCT4B4lCDacoUam1
	tgqTLTl8P22nFyY/31LDdmnTQSu9jOBaSa3cXYmYFB/yiAbJOoD4NLw+euBTsdUCEHoOuB
	7CVDgJUg+4VLGQ2/MPcZAZ3RwklmJVpNsnH3KU2K8pJKMTkWIq0I+anHTKvFXl7pONHVaV
	Y3eW5PWH1QQcsN1E8G+Zv8DKPs5IWPTsGTywFUM92MMJddW29Yd2WQZS9VKyeA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVhhY2Vydz1037;
	Mon, 22 Sep 2025 12:08:13 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58MC8DsW002328;
	Mon, 22 Sep 2025 12:08:13 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58MC8D4J002325;
	Mon, 22 Sep 2025 12:08:13 GMT
	(envelope-from git)
Date: Mon, 22 Sep 2025 12:08:13 GMT
Message-Id: <202509221208.58MC8D4J002325@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= 
Subject: git: e1401a283d10 - stable/14 - ifconfig: Enter jail as
  soon as possible
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: des
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: e1401a283d101acd94d14d769a0a2d80c34a65dc
Auto-Submitted: auto-generated

The branch stable/14 has been updated by des:

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

commit e1401a283d101acd94d14d769a0a2d80c34a65dc
Author:     Dag-Erling Smørgrav 
AuthorDate: 2025-09-15 17:56:33 +0000
Commit:     Dag-Erling Smørgrav 
CommitDate: 2025-09-22 10:29:54 +0000

    ifconfig: Enter jail as soon as possible
    
    Some options (in particular, -g) are processed immediately upon being
    parsed.  This will produce the wrong result in combination with -j since
    we only attach to the jail after we're done parsing arguments.  Solve
    this by attaching to the jail immediately when -j is encountered.  The
    downside is that e.g. `ifconfig -j foo -j bar` would previously attach
    to jail “bar”, whereas now it will attempt to attach to jail “foo”, and
    if successful, attempt to attach to jail “bar” within jail “foo”.  This
    may be considered a feature.
    
    PR:             289134
    MFC after:      1 week
    Reviewed by:    zlei
    Differential Revision:  https://reviews.freebsd.org/D52501
    
    (cherry picked from commit 18fd1443d205aed6be22966125a4820f77571948)
---
 sbin/ifconfig/ifconfig.8 | 42 +++++++++++++++++++++---------------------
 sbin/ifconfig/ifconfig.c | 22 ++++++++--------------
 sbin/ifconfig/ifconfig.h |  1 -
 3 files changed, 29 insertions(+), 36 deletions(-)

diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8
index 85dad643f588..980d61e9c214 100644
--- a/sbin/ifconfig/ifconfig.8
+++ b/sbin/ifconfig/ifconfig.8
@@ -28,7 +28,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd July 30, 2025
+.Dd September 12, 2025
 .Dt IFCONFIG 8
 .Os
 .Sh NAME
@@ -36,7 +36,7 @@
 .Nd configure network interface parameters
 .Sh SYNOPSIS
 .Nm
-.Op Fl j Ar jail
+.Op Fl j Ar jid
 .Op Fl DkLmn
 .Op Fl f Ar type Ns Cm \&: Ns Ar format
 .Ar interface
@@ -50,11 +50,11 @@
 .Oc
 .Op Ar parameters
 .Nm
-.Op Fl j Ar jail
+.Op Fl j Ar jid
 .Ar interface
 .Cm destroy
 .Nm
-.Op Fl j Ar jail
+.Op Fl j Ar jid
 .Fl a
 .Op Fl dDkLmuv
 .Op Fl f Ar type Ns Cm \&: Ns Ar format
@@ -64,16 +64,16 @@
 .Nm
 .Fl C
 .Nm
-.Op Fl j Ar jail
+.Op Fl j Ar jid
 .Fl g Ar groupname
 .Nm
-.Op Fl j Ar jail
+.Op Fl j Ar jid
 .Fl l
 .Op Fl du
 .Op Fl g Ar groupname
 .Op Ar address_family
 .Nm
-.Op Fl j Ar jail
+.Op Fl j Ar jid
 .Op Fl dkLmuv
 .Op Fl f Ar type Ns Cm \&: Ns Ar format
 .Sh DESCRIPTION
@@ -257,22 +257,22 @@ Setting
 to
 .Cm all
 selects all interfaces.
-.It Fl j Ar jail
-Perform the actions inside the
-.Ar jail .
+.It Fl j Ar jid
+Perform the actions inside the jail specified by
+.Ar jid ,
+which may be either a jail name or a numeric jail ID.
 .Pp
 The
-.Cm ifconfig
-will first attach to the
-.Ar jail
-(by jail id or jail name) before performing the effects.
-.Pp
-This allow network interfaces of
-.Ar jail
-to be configured even if the
-.Cm ifconfig
-binary is not available in
-.Ar jail .
+.Nm
+utility will attach to the specified jail immediately upon
+encountering the option on the command line.
+The option may be specified multiple times to attach to a nested jail
+(jail within a jail).
+.Pp
+This makes it possible to configure network interfaces within a vnet
+jail even if the
+.Nm
+binary is not available inside the jail.
 .It Fl k
 Print keying information for the
 .Ar interface ,
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 9d7a40b9049a..2449d6ca484e 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -472,6 +472,9 @@ args_parse(struct ifconfig_args *args, int argc, char *argv[])
 {
 	char options[1024];
 	struct option *p;
+#ifdef JAIL
+	int jid;
+#endif
 	int c;
 
 	/* Parse leading line options */
@@ -503,7 +506,11 @@ args_parse(struct ifconfig_args *args, int argc, char *argv[])
 #ifdef JAIL
 			if (optarg == NULL)
 				usage();
-			args->jail_name = optarg;
+			jid = jail_getid(optarg);
+			if (jid == -1)
+				Perror("jail not found");
+			if (jail_attach(jid) != 0)
+				Perror("cannot attach to jail");
 #else
 			Perror("not built with jail support");
 #endif
@@ -620,9 +627,6 @@ main(int ac, char *av[])
 {
 	char *envformat;
 	int flags;
-#ifdef JAIL
-	int jid;
-#endif
 	struct ifconfig_args _args = {};
 	struct ifconfig_args *args = &_args;
 
@@ -647,16 +651,6 @@ main(int ac, char *av[])
 
 	args_parse(args, ac, av);
 
-#ifdef JAIL
-	if (args->jail_name) {
-		jid = jail_getid(args->jail_name);
-		if (jid == -1)
-			Perror("jail not found");
-		if (jail_attach(jid) != 0)
-			Perror("cannot attach to jail");
-	}
-#endif
-
 	if (!args->all && !args->namesonly) {
 		/* not listing, need an argument */
 		args->ifname = args_pop(args);
diff --git a/sbin/ifconfig/ifconfig.h b/sbin/ifconfig/ifconfig.h
index be333d0ae02f..264e7b82a40e 100644
--- a/sbin/ifconfig/ifconfig.h
+++ b/sbin/ifconfig/ifconfig.h
@@ -248,7 +248,6 @@ struct ifconfig_args {
 	const char *matchgroup;		/* Group name to match */
 	const char *nogroup;		/* Group name to exclude */
 	const struct afswtch *afp;	/* AF we're operating on */
-	const char *jail_name;	/* Jail name or jail id specified */
 };
 
 struct option {

From nobody Mon Sep 22 12:08:18 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVhhf6L5Hz67nmS;
	Mon, 22 Sep 2025 12:08:18 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cVhhf4tkxz3G7l;
	Mon, 22 Sep 2025 12:08:18 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758542898;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=QNTrAMVQP2GuknQfY0x34dJWeJZYRX638DtXD/fSPgw=;
	b=ggfefrpx1O0LwpHvxjPnX/Pmz+yOs3f2n0QZgFy9Zym5M12z5SYUCdOOxZwnuTcKc+YoH9
	Pp3fe/q0SARBrwv4TSB44J9za3M7Y0bpQoxZiAnbz9hZVvqkcNYdBHJYZ+uIKQF5hVtwKr
	jBWZ5F06tgQvQ3/hi7bxk306+FSXMmqUIm90kSuAhhTcv0jUehvbJNiJlge43MSbwzrRBw
	V190Pn66i5Y4eXlRJ7RlsTWnciRdkT/r/BaYN9uEfj6sKb/mQgPgPEIW0ZIZHTYqSnpWqF
	faxhmXhze7CTVbEuz42l7btRklqStpP+V4dPXURXUEl9nogk+ujZZWkkR7H0wg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758542898;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=QNTrAMVQP2GuknQfY0x34dJWeJZYRX638DtXD/fSPgw=;
	b=Hq/cQbTggODzjT73RvFEFcBChgIwM51hODwdnl1UGfHx+BOWUXDTHK5qcd6NV5jrzN6pAz
	JZDHnwW4gDDVeRqNjg4BJlDnZjQeIdt3TVeqALgD6XL/DoJbQGPIFvMspnxxP9K4Q+ajvH
	g9iJSb1AEQx1tCjUE+FKxgj5yKP/hX2JoadUE/Ci7YDKTHwVd6Qw2Kbdfx4BUcOfrvOw9r
	mQElrR8p9fpookByv2Il4E4MM5hNSB6lenYjHfHZwlZIOB89elKviz5Tku0aaK7n+U3FVY
	gP2CLG4bZbdE98qHuxCoFJuI621YFKviyc0pmOfMSDDSpIvAwNoCaksDkcgv7Q==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758542898; a=rsa-sha256; cv=none;
	b=ajv20UjkdM6K547RJIBFecf8dNBVwJq2fsF+GiWJSE7Ut4/iq4ZeJ1DXQwK9YRCg0RNksU
	EWYLtsLFDOXnVr9a+NZnoD0Puma4oeujHzgJjksQLxnBNcuTrr1QVmQBeH5s5bGZ4ff/6i
	sJ37VCPz7KLPoLdOPFM6/qM77Ex4xpQ7tN8HfDM4bfvLaQq97cOe6LCUs0F4RdQwgZhIIM
	mC42/QcnbFXOx9/Aa4Z2h+8LHnyFEDNbH/drBcIcAipeIzY45t8AcPPMAMb1cD+81epMGk
	+pJczaSW42Id6ZPX9CiQAmSIk8KRrfXvtclU6AkcJDMSPsB2ZuaisUw+jsU3UA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVhhf3wWFz10GK;
	Mon, 22 Sep 2025 12:08:18 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58MC8IX9002482;
	Mon, 22 Sep 2025 12:08:18 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58MC8INk002479;
	Mon, 22 Sep 2025 12:08:18 GMT
	(envelope-from git)
Date: Mon, 22 Sep 2025 12:08:18 GMT
Message-Id: <202509221208.58MC8INk002479@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= 
Subject: git: 6d3de817987a - stable/15 - ifconfig: Enter jail as
  soon as possible
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: des
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 6d3de817987ac7c3b0dc661feec954ecb0a53861
Auto-Submitted: auto-generated

The branch stable/15 has been updated by des:

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

commit 6d3de817987ac7c3b0dc661feec954ecb0a53861
Author:     Dag-Erling Smørgrav 
AuthorDate: 2025-09-15 17:56:33 +0000
Commit:     Dag-Erling Smørgrav 
CommitDate: 2025-09-22 10:26:59 +0000

    ifconfig: Enter jail as soon as possible
    
    Some options (in particular, -g) are processed immediately upon being
    parsed.  This will produce the wrong result in combination with -j since
    we only attach to the jail after we're done parsing arguments.  Solve
    this by attaching to the jail immediately when -j is encountered.  The
    downside is that e.g. `ifconfig -j foo -j bar` would previously attach
    to jail “bar”, whereas now it will attempt to attach to jail “foo”, and
    if successful, attempt to attach to jail “bar” within jail “foo”.  This
    may be considered a feature.
    
    PR:             289134
    MFC after:      1 week
    Reviewed by:    zlei
    Differential Revision:  https://reviews.freebsd.org/D52501
    
    (cherry picked from commit 18fd1443d205aed6be22966125a4820f77571948)
---
 sbin/ifconfig/ifconfig.8 | 42 +++++++++++++++++++++---------------------
 sbin/ifconfig/ifconfig.c | 22 ++++++++--------------
 sbin/ifconfig/ifconfig.h |  1 -
 3 files changed, 29 insertions(+), 36 deletions(-)

diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8
index b580191383b3..c4184ba61ee4 100644
--- a/sbin/ifconfig/ifconfig.8
+++ b/sbin/ifconfig/ifconfig.8
@@ -28,7 +28,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd August 10, 2025
+.Dd September 12, 2025
 .Dt IFCONFIG 8
 .Os
 .Sh NAME
@@ -36,7 +36,7 @@
 .Nd configure network interface parameters
 .Sh SYNOPSIS
 .Nm
-.Op Fl j Ar jail
+.Op Fl j Ar jid
 .Op Fl DkLmn
 .Op Fl f Ar type Ns Cm \&: Ns Ar format
 .Ar interface
@@ -50,11 +50,11 @@
 .Oc
 .Op Ar parameters
 .Nm
-.Op Fl j Ar jail
+.Op Fl j Ar jid
 .Ar interface
 .Cm destroy
 .Nm
-.Op Fl j Ar jail
+.Op Fl j Ar jid
 .Fl a
 .Op Fl dDkLmuv
 .Op Fl f Ar type Ns Cm \&: Ns Ar format
@@ -64,16 +64,16 @@
 .Nm
 .Fl C
 .Nm
-.Op Fl j Ar jail
+.Op Fl j Ar jid
 .Fl g Ar groupname
 .Nm
-.Op Fl j Ar jail
+.Op Fl j Ar jid
 .Fl l
 .Op Fl du
 .Op Fl g Ar groupname
 .Op Ar address_family
 .Nm
-.Op Fl j Ar jail
+.Op Fl j Ar jid
 .Op Fl dkLmuv
 .Op Fl f Ar type Ns Cm \&: Ns Ar format
 .Sh DESCRIPTION
@@ -257,22 +257,22 @@ Setting
 to
 .Cm all
 selects all interfaces.
-.It Fl j Ar jail
-Perform the actions inside the
-.Ar jail .
+.It Fl j Ar jid
+Perform the actions inside the jail specified by
+.Ar jid ,
+which may be either a jail name or a numeric jail ID.
 .Pp
 The
-.Cm ifconfig
-will first attach to the
-.Ar jail
-(by jail id or jail name) before performing the effects.
-.Pp
-This allow network interfaces of
-.Ar jail
-to be configured even if the
-.Cm ifconfig
-binary is not available in
-.Ar jail .
+.Nm
+utility will attach to the specified jail immediately upon
+encountering the option on the command line.
+The option may be specified multiple times to attach to a nested jail
+(jail within a jail).
+.Pp
+This makes it possible to configure network interfaces within a vnet
+jail even if the
+.Nm
+binary is not available inside the jail.
 .It Fl k
 Print keying information for the
 .Ar interface ,
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 3f998b7f2b52..c323a26ec1a8 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -463,6 +463,9 @@ args_parse(struct ifconfig_args *args, int argc, char *argv[])
 {
 	char options[1024];
 	struct option *p;
+#ifdef JAIL
+	int jid;
+#endif
 	int c;
 
 	/* Parse leading line options */
@@ -494,7 +497,11 @@ args_parse(struct ifconfig_args *args, int argc, char *argv[])
 #ifdef JAIL
 			if (optarg == NULL)
 				usage();
-			args->jail_name = optarg;
+			jid = jail_getid(optarg);
+			if (jid == -1)
+				Perror("jail not found");
+			if (jail_attach(jid) != 0)
+				Perror("cannot attach to jail");
 #else
 			Perror("not built with jail support");
 #endif
@@ -611,9 +618,6 @@ main(int ac, char *av[])
 {
 	char *envformat;
 	int flags;
-#ifdef JAIL
-	int jid;
-#endif
 	struct ifconfig_args _args = {};
 	struct ifconfig_args *args = &_args;
 
@@ -638,16 +642,6 @@ main(int ac, char *av[])
 
 	args_parse(args, ac, av);
 
-#ifdef JAIL
-	if (args->jail_name) {
-		jid = jail_getid(args->jail_name);
-		if (jid == -1)
-			Perror("jail not found");
-		if (jail_attach(jid) != 0)
-			Perror("cannot attach to jail");
-	}
-#endif
-
 	if (!args->all && !args->namesonly) {
 		/* not listing, need an argument */
 		args->ifname = args_pop(args);
diff --git a/sbin/ifconfig/ifconfig.h b/sbin/ifconfig/ifconfig.h
index 468c9b4e80da..672020443b8c 100644
--- a/sbin/ifconfig/ifconfig.h
+++ b/sbin/ifconfig/ifconfig.h
@@ -249,7 +249,6 @@ struct ifconfig_args {
 	const char *matchgroup;		/* Group name to match */
 	const char *nogroup;		/* Group name to exclude */
 	const struct afswtch *afp;	/* AF we're operating on */
-	const char *jail_name;	/* Jail name or jail id specified */
 };
 
 struct option {

From nobody Mon Sep 22 15:20:16 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVmy90bqmz682cc;
	Mon, 22 Sep 2025 15:20:17 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cVmy9026Tz3WpJ;
	Mon, 22 Sep 2025 15:20:17 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758554417;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=51TU0SinzSJ1ZYyy16X48XSIc/pZCFbO4IcpYPSMjdg=;
	b=nMS9DoE9lKtLY2u/+STMbxeL5NmuTSXis8w3cu4SRGqb5xhwAOHnGFp+sU6+FXBhe9hIb7
	Sm+Rl3WPz0K6BX9UZqeztu4Qs1DayvXr6GNLApMFuG3WXDHWs5+TbckT0IlvxiwsRUiLVU
	WTuVnouo1tu3LRo6ChuU1NYocYcyTMNHCwzs+L+E29LJARBrEkmjwSAkIQmPOZx/2UyNg0
	NmV1/FvF2H9aNEDN2138w/W+qlTu0uSW+2D6S6ZvPFkDagRWE7A9Qf6Ck0JenVqhexGvBe
	AuyIre89Xhqg2+iooMD3nFND2qE4CUrG2Ti5oKiuOADOyvUDGfCGIddiUFeZLQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758554417;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=51TU0SinzSJ1ZYyy16X48XSIc/pZCFbO4IcpYPSMjdg=;
	b=Knac73Sbr2f467oAUdoLMxOK0Ken3WaU47yVsV/i47Xz00zATxSxRMdTWe/Reh4fDY4qMo
	CvfTlWh+e1iRvX6RhYoDxP4fdmClzgX1pxJ3evh7H9b7tX7lHBzyZkDPvqN5uQXIvLW++K
	WhYvVIyfmLxv824lGIjp4Fo6XMM56fYLp5S1AUsKy4XL/jlADPrN8C153FSvuYNBkzYoux
	sWxT1dPzKi2b7gPjKUclTJsNh8/rp5d3crvxf5u0Z/Dq2xnV5Oli5N+srTOUwm2QWRjkY9
	xnOdoZX1YZBSTEIhugIgRGWrJ+aXiEWets7anK0Knq5ZfMsoYnf7GXHbnJUNJQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758554417; a=rsa-sha256; cv=none;
	b=Bctmsis+PhmuAAzweV0w5EIbOIMCe24TZllE7oNx80EA2UCZCnHvk3wteRVkdwUD+GYpRU
	rLJMrbeZ+VinQls7cbn7HnTZzTVoJXc96xYj6L33CYIhTf/WO+0loOp8WWOzKwe6akdts0
	MfpvEQ07aMok/05N3YqhrF3eHfOPfOcu5RvScJGT9oKoDhC1vFUhLUWm7fqIemGBt3R40w
	gyLpdBDLeY5e63NcfnvELTba6zNpd2xAmdJbJOEnHWqwJkYUjHFiAfDP3D04W9AZDI3KnU
	zzz5rUExo8lWfIwnxqDp0qAZW1RSiwxEoY0lyT8kvbAl8lH13MgADf6q3ebY+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])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVmy86SXMz1536;
	Mon, 22 Sep 2025 15:20:16 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58MFKGfD068167;
	Mon, 22 Sep 2025 15:20:16 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58MFKGQ9068159;
	Mon, 22 Sep 2025 15:20:16 GMT
	(envelope-from git)
Date: Mon, 22 Sep 2025 15:20:16 GMT
Message-Id: <202509221520.58MFKGQ9068159@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Andrew Turner 
Subject: git: f408052d7bfb - stable/15 - arm64: Add the new C1 CPU
  IDs
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: andrew
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: f408052d7bfb52afcf5b2fdd444e30ebc1a001d5
Auto-Submitted: auto-generated

The branch stable/15 has been updated by andrew:

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

commit f408052d7bfb52afcf5b2fdd444e30ebc1a001d5
Author:     Andrew Turner 
AuthorDate: 2025-09-15 12:05:05 +0000
Commit:     Andrew Turner 
CommitDate: 2025-09-20 01:00:51 +0000

    arm64: Add the new C1 CPU IDs
    
    Add the Arm C1-Nano, C1-Pro, C1-Premium, and C1-Ultra CPUs from their
    Technical Reference Manuals.
    
    Sponsored by:   Arm Ltd
    
    (cherry picked from commit 8fee6b9ecc84d3602a461f1cd33df91e50849cdf)
---
 sys/arm64/arm64/identcpu.c | 4 ++++
 sys/arm64/include/cpu.h    | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c
index a001be200518..01b4ece59861 100644
--- a/sys/arm64/arm64/identcpu.c
+++ b/sys/arm64/arm64/identcpu.c
@@ -232,6 +232,10 @@ static const struct cpu_parts cpu_parts_arm[] = {
 	{ CPU_PART_CORTEX_X2, "Cortex-X2" },
 	{ CPU_PART_CORTEX_X3, "Cortex-X3" },
 	{ CPU_PART_CORTEX_X4, "Cortex-X4" },
+	{ CPU_PART_C1_NANO, "C1-Nano" },
+	{ CPU_PART_C1_PRO, "C1-Pro" },
+	{ CPU_PART_C1_PREMIUM, "C1-Premium" },
+	{ CPU_PART_C1_ULTRA, "C1-Ultra" },
 	{ CPU_PART_NEOVERSE_E1, "Neoverse-E1" },
 	{ CPU_PART_NEOVERSE_N1, "Neoverse-N1" },
 	{ CPU_PART_NEOVERSE_N2, "Neoverse-N2" },
diff --git a/sys/arm64/include/cpu.h b/sys/arm64/include/cpu.h
index 07a783138f42..124da8c215ed 100644
--- a/sys/arm64/include/cpu.h
+++ b/sys/arm64/include/cpu.h
@@ -125,7 +125,11 @@
 #define	CPU_PART_NEOVERSE_V3	0xD84
 #define	CPU_PART_CORTEX_X925	0xD85
 #define	CPU_PART_CORTEX_A725	0xD87
+#define	CPU_PART_C1_NANO	0xD8A
+#define	CPU_PART_C1_PRO		0xD8B
+#define	CPU_PART_C1_ULTRA	0xD8C
 #define	CPU_PART_NEOVERSE_N3	0xD8E
+#define	CPU_PART_C1_PREMIUM	0xD90
 
 /* Cavium Part numbers */
 #define	CPU_PART_THUNDERX	0x0A1

From nobody Mon Sep 22 15:20:17 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVmyB24PYz682ZD;
	Mon, 22 Sep 2025 15:20:18 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cVmy96qcYz3WZT;
	Mon, 22 Sep 2025 15:20:17 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758554418;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=AjRDo0u5ptpr64XLYQJUQRHhvLTuKn9USzvxMoEFk6Q=;
	b=YwgZsNTuPMzsK6dAloTRZnn85nVKOkzCf8Sxk1rC2zmQnRwG2GOCzSVCyP3FZijsroFKlC
	XuMU0nwYWRammDglSu25YmVTgCAW8M1DN3WMT0hcRWO4iq6qtuc+/Gt0KChlNAhp8FhIBn
	FqZPLeXJcWbIJ9owRGu4ZBRLVw3OCGzE2vWug2t6BBE+jdBlJNa4Jr7FXozDuDbLonwTCF
	+OOXXToi/X+MYG+iV8i8G2b3RJD7YGRkJ04kbA4OrhDgixXMzoFzCmj+f8eLTSwuJvHPNG
	d3tMukfs45sjTpzgtf5Vv6NMze9nc4jwX/iAMq23yQ2MZyI87srXjMjkoXL31w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758554418;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=AjRDo0u5ptpr64XLYQJUQRHhvLTuKn9USzvxMoEFk6Q=;
	b=rSWF+UG/qWbDTaFd/dNYEVu2gCXVvkFht0dYAeybdsdNKXbDG2g6s00UeYvC+p3fycgS/y
	hTsYFEuNIn4+ygmL22v6eZFH43el9b8EmNRKiLr9Q7mYa/opMwBxDJcQaxA6Zqmz3JGJCh
	xMoLuzQqYYMo5vgvcmhdXB3ynBcWAQlUH1k9eTB6F6Xjk6v3lTGzGPr22Uwj4dZ9CoqM62
	TBg/9FWQgx14ts8G4F7CeAcR5jI7KCMBfJ6XOVAH3/RQV5SyK3KS2tAVmRqngyB5InXWyH
	DBeuQc+r/0tkRRfH/0xr1Tfc3LWy3Cw/83o2e6FyYFYeHG68ARvJxs5YaHRc3w==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758554418; a=rsa-sha256; cv=none;
	b=v2a98wa17SUSrKWtrNkoI4txFejqVgfKII1dG9NIAMSdarx9R44z5cJlzYH1vGUbq64JzY
	4jEnTyXcZFFwfF1MMMEBi6mE3rejLjWvMFNv9sMCDZRkQ+MFCabvY7XuKRFbtiv47m6AXX
	Po4N3vbQsLYqAbvpuABxDDM3KI/b+p4/3+BOt4QcxMsXLeVIkRkIAb2jV8Ui+M5RfuPL2C
	xDvZnG5UfDfZaoWDghV8WPTTzfSkNdnGUXO5NQ8XrYUPvZzL0k5ZPPSb7N+eYr2dq+yZjR
	uAJK9druk4vIlXecvAqeV3gfoL3H14fpvPlwWD18OBX05eKjBoc2XWY0CZC5/A==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVmy96QgWz1537;
	Mon, 22 Sep 2025 15:20:17 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58MFKHHr068772;
	Mon, 22 Sep 2025 15:20:17 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58MFKHdS068768;
	Mon, 22 Sep 2025 15:20:17 GMT
	(envelope-from git)
Date: Mon, 22 Sep 2025 15:20:17 GMT
Message-Id: <202509221520.58MFKHdS068768@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Andrew Turner 
Subject: git: e52a47446e50 - stable/15 - arm64: Fix the FEAT_WFxT
  check
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: andrew
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: e52a47446e5068513ffb93929a896cab76b5bb26
Auto-Submitted: auto-generated

The branch stable/15 has been updated by andrew:

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

commit e52a47446e5068513ffb93929a896cab76b5bb26
Author:     Andrew Turner 
AuthorDate: 2025-09-15 12:08:04 +0000
Commit:     Andrew Turner 
CommitDate: 2025-09-20 01:00:52 +0000

    arm64: Fix the FEAT_WFxT check
    
    The check was always true so would incorrectly enable the feature when
    it wasn't supported.
    
    Due to another bug this was harmless.
    
    Sponsored by:   Arm Ltd
    
    (cherry picked from commit 226375a1f6e3a71ca250c717e8d6d2c2e4b0b2e7)
---
 sys/arm/arm/generic_timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/arm/arm/generic_timer.c b/sys/arm/arm/generic_timer.c
index 97976408c943..dacef8de2257 100644
--- a/sys/arm/arm/generic_timer.c
+++ b/sys/arm/arm/generic_timer.c
@@ -889,7 +889,7 @@ wfxt_check(const struct cpu_feat *feat __unused, u_int midr __unused)
 
 	if (!get_kernel_reg(ID_AA64ISAR2_EL1, &id_aa64isar2))
 		return (FEAT_ALWAYS_DISABLE);
-	if (ID_AA64ISAR2_WFxT_VAL(id_aa64isar2) >= ID_AA64ISAR2_WFxT_NONE)
+	if (ID_AA64ISAR2_WFxT_VAL(id_aa64isar2) >= ID_AA64ISAR2_WFxT_IMPL)
 		return (FEAT_DEFAULT_ENABLE);
 
 	return (FEAT_ALWAYS_DISABLE);

From nobody Mon Sep 22 15:20:18 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVmyC3YQJz682jS;
	Mon, 22 Sep 2025 15:20:19 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cVmyC0rf3z3Wj4;
	Mon, 22 Sep 2025 15:20:19 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758554419;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=2J0POWH17BuCDppObbYfXm5hGp6P6AdwIYAnTxr3mS8=;
	b=Chy6mV5y0pot1tI71/xRoYnxWvztwR0T4oEhfHOPhRFreb3Q5iZXrHB3ltY5NwUwE04DOj
	ZFfHEGTNqatu5SmMMDmclm1HVZZsm/Gcd+g8VfrhmvbTwcmaGRpUbQyOZ5n8g7t8pPvopw
	JmJBOCmXfLGGPY0VTH/JDlguq1o3LEZrT8PzZTjt69ih3g1Kp33BMhqAUGyGmm4hqTByrv
	c0SReVRAA6qcZJc8CYOpU8NTqopZOW4dkz5plvCYl2Oncy/YbunZgWTn0dZfJ2Vc+hW4Iu
	KHcw67enwfi3+YcGIK7sBXiuDgC7m7RI+qXNLyelGCNDnUEmfOYOZOFMrZhEEQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758554419;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=2J0POWH17BuCDppObbYfXm5hGp6P6AdwIYAnTxr3mS8=;
	b=VY+vElWCJcRh+kjYNrjRotJlzhdjHBWemU0VeKTPL7G33QBPoft8pt2vQvdj6WqW15SNFa
	EMUFvpmE0yzCOPGBP7oKSqHlJvBG0SHzebYWbgMlAd1wzdCItY0Q/ke6eWeTs5YagmRX9I
	WsHhGWHL7DXj6fBUstCWT4yUPTd0cWwn4UZmpSRVsloYbqzw59TDA+n3WdgcjgNgfc/wJ0
	fqXl4PEewhKaHwMCUAXVQoBA5p/m4VtY707LDYfkF1ovIKt76l97wheQmkteahUegebDbD
	GPloZOdsOu+J763cmMrOn2Wo/IdQosPXhu3cPCV2m+fP4qKgi9SIUXm+KuKOQQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758554419; a=rsa-sha256; cv=none;
	b=ho2NX8JlamCI07sSK5KSW6GLP8k/oR4+JrpKbYlrEsQnklAawHrlYLkiGg+ipQgCIxVOqn
	q+yC7NXUcl+Zg1TY/JyHmiezos19p9j7R1hujc9vMg7GOtA4B+MnoxWonux1OmllwQPzdm
	PEeUiiLALg8BV/EHi2jIN4nCWVoBiyAY+TxZ1pEtgl/RTNAY+IUS0uuWSVkd8gh+XqDNAI
	L4/lwDI2qXmDQygIW0XCjk51GDv3BJ+FHYpKtDaazZ9IXFMkmXbm22e9xVT9LACZlcZBIV
	RYbPNkCq+EOVw5t2YZFBoZuBPPcGmj+/mxT4Fh+DdjtiM+nEvxraw3vVaZ5vWw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVmyC0983z140X;
	Mon, 22 Sep 2025 15:20:19 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58MFKIr4069189;
	Mon, 22 Sep 2025 15:20:18 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58MFKIAY069186;
	Mon, 22 Sep 2025 15:20:18 GMT
	(envelope-from git)
Date: Mon, 22 Sep 2025 15:20:18 GMT
Message-Id: <202509221520.58MFKIAY069186@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Andrew Turner 
Subject: git: 6492b6247826 - stable/15 - arm64: Move the FEAT_PAN
  check later
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: andrew
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 6492b6247826681258034a768e37af8c36179683
Auto-Submitted: auto-generated

The branch stable/15 has been updated by andrew:

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

commit 6492b6247826681258034a768e37af8c36179683
Author:     Andrew Turner 
AuthorDate: 2025-09-19 10:05:46 +0000
Commit:     Andrew Turner 
CommitDate: 2025-09-20 01:00:52 +0000

    arm64: Move the FEAT_PAN check later
    
    We only need to enable PAN (Privileged access never) before userspace
    is running. Before that there are no unprivileged mappings to protect
    the kernel from accessing.
    
    While here switch to use get_kernel_reg to handle the case some CPUs
    have FEAT_PAN, while some don't.
    
    Reviewed by:    emaste
    Sponsored by:   Arm Ltd
    Differential Revision:  https://reviews.freebsd.org/D52576
    
    (cherry picked from commit 72828486ca9412f118d7e2316e584cd1cab8c90f)
---
 sys/arm64/arm64/machdep.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c
index 47c701e8588c..29ffa5109305 100644
--- a/sys/arm64/arm64/machdep.c
+++ b/sys/arm64/arm64/machdep.c
@@ -178,7 +178,8 @@ pan_check(const struct cpu_feat *feat __unused, u_int midr __unused)
 {
 	uint64_t id_aa64mfr1;
 
-	id_aa64mfr1 = READ_SPECIALREG(id_aa64mmfr1_el1);
+	if (!get_kernel_reg(ID_AA64MMFR1_EL1, &id_aa64mfr1))
+		return (FEAT_ALWAYS_DISABLE);
 	if (ID_AA64MMFR1_PAN_VAL(id_aa64mfr1) == ID_AA64MMFR1_PAN_NONE)
 		return (FEAT_ALWAYS_DISABLE);
 
@@ -209,7 +210,7 @@ pan_enable(const struct cpu_feat *feat __unused,
 
 CPU_FEAT(feat_pan, "Privileged access never",
     pan_check, NULL, pan_enable,
-    CPU_FEAT_EARLY_BOOT | CPU_FEAT_PER_CPU);
+    CPU_FEAT_AFTER_DEV | CPU_FEAT_PER_CPU);
 
 bool
 has_hyp(void)

From nobody Mon Sep 22 15:20:19 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVmyF0pldz682ZH;
	Mon, 22 Sep 2025 15:20:21 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cVmyD1Fl8z3Wmj;
	Mon, 22 Sep 2025 15:20:20 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758554420;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=U+S9HjoODw9Avhf2P0CCKqTxKZuXmGBWsAg6RZXOE6g=;
	b=kF0TPkeslpRfpx6vvqahnhUsAH4KhiYP3TmE9fOQETyCIzR5sETtnIu1dF6ZxiiHOAalPN
	W5lip6mGFz8YPwcLh5SX+j5z4TE8fDPGy/0MpC+BKt2UR9c024UTCwNkjpHC0XUThCcv3n
	qeXvQ6cqLv/bnSlRArUA+VjXQAyWHsqyN6GD9kQIncIj2XbM9JJkPRCuFvKWAsfCLHFPKL
	QFXrM5AAQjAjHfK5GfIoqTLpKbwv34YqaUtzVkttLRQQLZVFIFSdUPE5Kaq1j+JGAcD6ZD
	g2zsVZrkZ8qZ4K9Xuw42LxvhBSyFbhuhKxa35o5GhyYQnnPKfHD8cWEXPFy3ng==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758554420;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=U+S9HjoODw9Avhf2P0CCKqTxKZuXmGBWsAg6RZXOE6g=;
	b=WKoN7k707c6s85myJ4dfZNjZjOtg1CeBe0KwN9vLatJv16w6DKdFM6/np5qhJdZpwd8OJ2
	2l1SQeqnuENgPtjh/CCXLZbJ+X+A4aipNcOAIIIoKNrssFwJfBWh84xO8AIkaV/Bxo+fP5
	MTe8Q/kls7eyx3Yow7Jd1KbIYjRr6dXk2ZmQMqIA5PotNj3O9cI3VmM7kaGZP/EBf5p8vs
	SjMKQF5lSjSzNMm2bTj8L5EJx0YV+ewpyb+qVisQOyAsVfnm+fCTE8W0hUVx1wjdVfobfi
	gxSAt7iOb3/Bftp5DZEEijwdLc/Ud2XMQ4ky4c0EG84fO7Phda8HHVMHh4KYJw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758554420; a=rsa-sha256; cv=none;
	b=mdAlfax964Yb98mhfNKiqnJuvvmG+Q/NwRGdftnOwQoY7/pt0QniCwU44+knb90B5xWsC9
	5weHly5Fjn78Ky5+NrCO28rET1/vaUT2+4j1GlPn/APAi3YBT4rNNMFppeNIR58780ITqu
	QmZPrBU5pKP67hBw6PsDO6KmeP9gbNJYwxjnYE4wq3l7/dDe7QF7ZdLq+jNlel2uSD4zKn
	rvVkHrC20am0nZllU2NQeyJlmS5Vm4NWvLe5DL9GEItYf841sx+QmeHrvdqZE2iYAyRr2s
	SMU0o2CUb8eyN2eFvCmYsf8ISTIgdm37rECTeF8gmNEoxL++e29HrJLGIkchOg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVmyD0mv8z1501;
	Mon, 22 Sep 2025 15:20:20 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58MFKKBZ069224;
	Mon, 22 Sep 2025 15:20:20 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58MFKJEo069220;
	Mon, 22 Sep 2025 15:20:19 GMT
	(envelope-from git)
Date: Mon, 22 Sep 2025 15:20:19 GMT
Message-Id: <202509221520.58MFKJEo069220@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Andrew Turner 
Subject: git: 20fee5aa5053 - stable/15 - arm64: Add cpu_feat_disabled
  for disabled features
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: andrew
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 20fee5aa505334f890c74a9059613ad7d61afe07
Auto-Submitted: auto-generated

The branch stable/15 has been updated by andrew:

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

commit 20fee5aa505334f890c74a9059613ad7d61afe07
Author:     Andrew Turner 
AuthorDate: 2025-09-19 10:05:46 +0000
Commit:     Andrew Turner 
CommitDate: 2025-09-20 01:00:53 +0000

    arm64: Add cpu_feat_disabled for disabled features
    
    When a feature is disabled we may need to run a cleanup handler, e.g.
    to remove a feature from the sanitized ID registers. Add support for
    this with a new feat_disabled handler.
    
    Sponsored by:   Arm Ltd
    Differential Revision:  https://reviews.freebsd.org/D52577
    
    (cherry picked from commit 055229eda697445880edd0050d0230a3f1bc85b3)
---
 sys/arm/arm/generic_timer.c  |  9 ++++++++-
 sys/arm64/arm64/cpu_feat.c   | 10 +++++++---
 sys/arm64/arm64/identcpu.c   |  2 +-
 sys/arm64/arm64/machdep.c    |  9 ++++++++-
 sys/arm64/arm64/pmap.c       |  4 ++--
 sys/arm64/arm64/ptrauth.c    | 34 ++++++++++++++++++++--------------
 sys/arm64/include/cpu_feat.h |  5 ++++-
 7 files changed, 50 insertions(+), 23 deletions(-)

diff --git a/sys/arm/arm/generic_timer.c b/sys/arm/arm/generic_timer.c
index dacef8de2257..c4a1f44a0079 100644
--- a/sys/arm/arm/generic_timer.c
+++ b/sys/arm/arm/generic_timer.c
@@ -905,8 +905,15 @@ wfxt_enable(const struct cpu_feat *feat __unused,
 	return (true);
 }
 
+static void
+wfxt_disabled(const struct cpu_feat *feat __unused)
+{
+	if (PCPU_GET(cpuid) == 0)
+		update_special_reg(ID_AA64ISAR2_EL1, ID_AA64ISAR2_WFxT_MASK, 0);
+}
+
 CPU_FEAT(feat_wfxt, "WFE and WFI instructions with timeout",
-    wfxt_check, NULL, wfxt_enable,
+    wfxt_check, NULL, wfxt_enable, wfxt_disabled,
     CPU_FEAT_AFTER_DEV | CPU_FEAT_SYSTEM);
 #endif
 
diff --git a/sys/arm64/arm64/cpu_feat.c b/sys/arm64/arm64/cpu_feat.c
index 986d5079e980..0ffcdf2c9ed1 100644
--- a/sys/arm64/arm64/cpu_feat.c
+++ b/sys/arm64/arm64/cpu_feat.c
@@ -69,18 +69,18 @@ enable_cpu_feat(uint32_t stage)
 		check_status = feat->feat_check(feat, midr);
 		/* Ignore features that are not present */
 		if (check_status == FEAT_ALWAYS_DISABLE)
-			continue;
+			goto next;
 
 		snprintf(tunable, sizeof(tunable), "hw.feat.%s",
 		    feat->feat_name);
 		if (TUNABLE_BOOL_FETCH(tunable, &val)) {
 			/* Is the feature disabled by the tunable? */
 			if (!val)
-				continue;
+				goto next;
 			/* If enabled by the tunable then enable it */
 		} else if (check_status == FEAT_DEFAULT_DISABLE) {
 			/* No tunable set and disabled by default */
-			continue;
+			goto next;
 		}
 
 		/*
@@ -122,6 +122,10 @@ enable_cpu_feat(uint32_t stage)
 		if (feat->feat_enable(feat, errata_status, errata_list,
 		    errata_count))
 			feat->feat_enabled = true;
+
+next:
+		if (!feat->feat_enabled && feat->feat_disabled != NULL)
+			feat->feat_disabled(feat);
 	}
 }
 
diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c
index 01b4ece59861..2d07420bcdb0 100644
--- a/sys/arm64/arm64/identcpu.c
+++ b/sys/arm64/arm64/identcpu.c
@@ -2353,7 +2353,7 @@ user_ctr_enable(const struct cpu_feat *feat __unused,
 }
 
 CPU_FEAT(trap_ctr, "Trap CTR_EL0",
-    user_ctr_check, user_ctr_has_errata, user_ctr_enable,
+    user_ctr_check, user_ctr_has_errata, user_ctr_enable, NULL,
     CPU_FEAT_AFTER_DEV | CPU_FEAT_PER_CPU);
 
 static bool
diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c
index 29ffa5109305..322bad273a08 100644
--- a/sys/arm64/arm64/machdep.c
+++ b/sys/arm64/arm64/machdep.c
@@ -208,8 +208,15 @@ pan_enable(const struct cpu_feat *feat __unused,
 	return (true);
 }
 
+static void
+pan_disabled(const struct cpu_feat *feat __unused)
+{
+	if (PCPU_GET(cpuid) == 0)
+		update_special_reg(ID_AA64MMFR1_EL1, ID_AA64MMFR1_PAN_MASK, 0);
+}
+
 CPU_FEAT(feat_pan, "Privileged access never",
-    pan_check, NULL, pan_enable,
+    pan_check, NULL, pan_enable, pan_disabled,
     CPU_FEAT_AFTER_DEV | CPU_FEAT_PER_CPU);
 
 bool
diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c
index 8a4395aa1c89..dbf5c820d20b 100644
--- a/sys/arm64/arm64/pmap.c
+++ b/sys/arm64/arm64/pmap.c
@@ -1722,7 +1722,7 @@ pmap_dbm_enable(const struct cpu_feat *feat __unused,
 }
 
 CPU_FEAT(feat_hafdbs, "Hardware management of the Access flag and dirty state",
-    pmap_dbm_check, pmap_dbm_has_errata, pmap_dbm_enable,
+    pmap_dbm_check, pmap_dbm_has_errata, pmap_dbm_enable, NULL,
     CPU_FEAT_AFTER_DEV | CPU_FEAT_PER_CPU);
 
 static cpu_feat_en
@@ -1767,7 +1767,7 @@ pmap_multiple_tlbi_enable(const struct cpu_feat *feat __unused,
 }
 
 CPU_FEAT(errata_multi_tlbi, "Multiple TLBI errata",
-    pmap_multiple_tlbi_check, NULL, pmap_multiple_tlbi_enable,
+    pmap_multiple_tlbi_check, NULL, pmap_multiple_tlbi_enable, NULL,
     CPU_FEAT_EARLY_BOOT | CPU_FEAT_PER_CPU);
 
 /*
diff --git a/sys/arm64/arm64/ptrauth.c b/sys/arm64/arm64/ptrauth.c
index fdab5414e24c..ab40b72887e9 100644
--- a/sys/arm64/arm64/ptrauth.c
+++ b/sys/arm64/arm64/ptrauth.c
@@ -97,11 +97,11 @@ ptrauth_check(const struct cpu_feat *feat __unused, u_int midr __unused)
 	if (!pac_enable) {
 		if (boothowto & RB_VERBOSE)
 			printf("Pointer authentication is disabled\n");
-		goto out;
+		return (FEAT_ALWAYS_DISABLE);
 	}
 
 	if (ptrauth_disable())
-		goto out;
+		return (FEAT_ALWAYS_DISABLE);
 
 	/*
 	 * This assumes if there is pointer authentication on the boot CPU
@@ -127,17 +127,6 @@ ptrauth_check(const struct cpu_feat *feat __unused, u_int midr __unused)
 		}
 	}
 
-out:
-	/*
-	 * Pointer authentication may be disabled, mask out the ID fields we
-	 * expose to userspace and the rest of the kernel so they don't try
-	 * to use it.
-	 */
-	update_special_reg(ID_AA64ISAR1_EL1, ID_AA64ISAR1_API_MASK |
-	    ID_AA64ISAR1_APA_MASK | ID_AA64ISAR1_GPA_MASK |
-	    ID_AA64ISAR1_GPI_MASK, 0);
-	update_special_reg(ID_AA64ISAR2_EL1, ID_AA64ISAR2_APA3_MASK, 0);
-
 	return (FEAT_ALWAYS_DISABLE);
 }
 
@@ -157,8 +146,25 @@ ptrauth_enable(const struct cpu_feat *feat __unused,
 	return (true);
 }
 
+static void
+ptrauth_disabled(const struct cpu_feat *feat __unused)
+{
+	/*
+	 * Pointer authentication may be disabled, mask out the ID fields we
+	 * expose to userspace and the rest of the kernel so they don't try
+	 * to use it.
+	 */
+	if (PCPU_GET(cpuid) == 0) {
+		update_special_reg(ID_AA64ISAR1_EL1, ID_AA64ISAR1_API_MASK |
+		    ID_AA64ISAR1_APA_MASK | ID_AA64ISAR1_GPA_MASK |
+		    ID_AA64ISAR1_GPI_MASK, 0);
+		update_special_reg(ID_AA64ISAR2_EL1, ID_AA64ISAR2_APA3_MASK, 0);
+	}
+
+}
+
 CPU_FEAT(feat_pauth, "Pointer Authentication",
-    ptrauth_check, NULL, ptrauth_enable,
+    ptrauth_check, NULL, ptrauth_enable, ptrauth_disabled,
     CPU_FEAT_EARLY_BOOT | CPU_FEAT_SYSTEM);
 
 /* Copy the keys when forking a new process */
diff --git a/sys/arm64/include/cpu_feat.h b/sys/arm64/include/cpu_feat.h
index 6a554b6baedf..20c743a7e507 100644
--- a/sys/arm64/include/cpu_feat.h
+++ b/sys/arm64/include/cpu_feat.h
@@ -80,12 +80,14 @@ typedef bool (cpu_feat_has_errata)(const struct cpu_feat *, u_int,
     u_int **, u_int *);
 typedef bool (cpu_feat_enable)(const struct cpu_feat *, cpu_feat_errata,
     u_int *, u_int);
+typedef void (cpu_feat_disabled)(const struct cpu_feat *);
 
 struct cpu_feat {
 	const char		*feat_name;
 	cpu_feat_check		*feat_check;
 	cpu_feat_has_errata	*feat_has_errata;
 	cpu_feat_enable		*feat_enable;
+	cpu_feat_disabled	*feat_disabled;
 	uint32_t		 feat_flags;
 	bool			 feat_enabled;
 };
@@ -93,12 +95,13 @@ SET_DECLARE(cpu_feat_set, struct cpu_feat);
 
 SYSCTL_DECL(_hw_feat);
 
-#define	CPU_FEAT(name, descr, check, has_errata, enable, flags)	\
+#define	CPU_FEAT(name, descr, check, has_errata, enable, disabled, flags) \
 static struct cpu_feat name = {						\
 	.feat_name		= #name,				\
 	.feat_check		= check,				\
 	.feat_has_errata	= has_errata,				\
 	.feat_enable		= enable,				\
+	.feat_disabled		= disabled,				\
 	.feat_flags		= flags,				\
 	.feat_enabled		= false,				\
 };									\

From nobody Mon Sep 22 15:20:21 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVmyF71Z7z682cn;
	Mon, 22 Sep 2025 15:20:21 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cVmyF2KrCz3Wgq;
	Mon, 22 Sep 2025 15:20:21 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758554421;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=DEJ0Ma4ipD0YfeNDif/0naDJBIZZbR0kkuLM86ivEpY=;
	b=f9HXR6pgNZm3qmOdk/fvEh7a5DUBRju8WWaHbFoeFdTR2nUUkMZWoyTMBIM5xGEnNWMjXh
	qRnLjDBczhxqM9E/CRoyCbZzHjnwAylkGSAXVtCsmdQ1TgwAwwtf9hPqpAyqk2ZxBs3kQY
	o45l8AXbtrU81alfOgTjmSvyUnSHHq3PBsfeTVjNDn1bX/YoiDOpGzdaFPtDoJqHpe/ejl
	a7zWiVxFYPlzcoNq7MKMi6GbqAu9uat0GJkGSCiRH9DVUKlf5KubyDRkq9RzastYC5zuME
	brgXcq9+gEUIp8LYR4Hw7XayWaXCJUELF0ZjSXSpgPQ3Vm1as+PZEi4KEoSOjg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758554421;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=DEJ0Ma4ipD0YfeNDif/0naDJBIZZbR0kkuLM86ivEpY=;
	b=XkpebCEuYcKrc3ZiOIKKXI3Dcrruw4mtJY0xyJqJSGz+FPbkHncYrE1zFxEesVvtzOtJgV
	NW3dbyCyYuOQTMB7E8PNToJfKLNAKXYousebNwHitDAe3R0ouepf9lMnIsLwh7Kr4Wm89n
	yFI/jtfNmhoh8nwhnGVK5ranb/xQmjAM/8sU1wHl22sJmSQxnGjS/YjjDUZ+bqi3IbuMUZ
	txmYzdJTI2QJpVFtuLxKOj2BrhSM0MkdmlpeumXU1t+alwzg00KpeNBvXlfVKORm6X8Bvx
	48C7gkFZCILcTcBaWZQoWYiHkEtqzXre7k02Yx5Zbdfk1JeXITQzMTNKcLl5yw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758554421; a=rsa-sha256; cv=none;
	b=VQBvg1BvvztYuYdYrO0hDD66X7u/vQs6OtvRFoacV1+HjHOHoFFj4R+AOMSy7IsIPyJJx9
	cTNY+GAfcpSGLrm4qSWjbA6F1BJ7K6xfO6Ilx8bpcXz/at/PcKW/o4EcY680pDTzV8qfMw
	/CHqJFHDdULE0i+xd4woA74M4TeFWRZ0BKhGs1Ky3Epv7xRCHTONZV9K5taYr5RsYGN1FB
	t37/igogrElP4l2wzUi2s6BZIqQWJ9p+Rq+8LRhpVmHsaZIJHXDrxOMMRXgz4hJzHUaVcR
	oIWcq1Qw6DHe34B/dts5uV6av44lSNQY+HZEnKxfiu9Kmqo/yQypFsrEGVF0ZQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVmyF1mfkz157m;
	Mon, 22 Sep 2025 15:20:21 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58MFKLWS069264;
	Mon, 22 Sep 2025 15:20:21 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58MFKL3e069261;
	Mon, 22 Sep 2025 15:20:21 GMT
	(envelope-from git)
Date: Mon, 22 Sep 2025 15:20:21 GMT
Message-Id: <202509221520.58MFKL3e069261@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Andrew Turner 
Subject: git: 3c25261ea29c - stable/15 - arm64: Read the CPU feature
  tunables once
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: andrew
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 3c25261ea29c7b3c32556db2927a95b7c7acecee
Auto-Submitted: auto-generated

The branch stable/15 has been updated by andrew:

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

commit 3c25261ea29c7b3c32556db2927a95b7c7acecee
Author:     Andrew Turner 
AuthorDate: 2025-09-19 10:05:47 +0000
Commit:     Andrew Turner 
CommitDate: 2025-09-20 01:00:53 +0000

    arm64: Read the CPU feature tunables once
    
    Rather than reading the CPU tunables each time we enable a feature
    just read them once on boot. Reading them early on non-boot CPUs
    causes issues where they try to allocate memory before the core is set
    up to do so. As they don't change it is safe to cache the state of
    them.
    
    Sponsored by:   Arm Ltd
    Differential Revision:  https://reviews.freebsd.org/D52578
    
    (cherry picked from commit 5e0e2565288f3d1f1b4223d8bb53c7d70e0aa92c)
---
 sys/arm64/arm64/cpu_feat.c   | 35 +++++++++++++++++++++++++----------
 sys/arm64/include/cpu_feat.h |  3 +++
 2 files changed, 28 insertions(+), 10 deletions(-)

diff --git a/sys/arm64/arm64/cpu_feat.c b/sys/arm64/arm64/cpu_feat.c
index 0ffcdf2c9ed1..fb065ea463cf 100644
--- a/sys/arm64/arm64/cpu_feat.c
+++ b/sys/arm64/arm64/cpu_feat.c
@@ -54,6 +54,21 @@ enable_cpu_feat(uint32_t stage)
 	SET_FOREACH(featp, cpu_feat_set) {
 		feat = *featp;
 
+		/* Read any tunable the user may have set */
+		if (stage == CPU_FEAT_EARLY_BOOT && PCPU_GET(cpuid) == 0) {
+			snprintf(tunable, sizeof(tunable), "hw.feat.%s",
+			    feat->feat_name);
+			if (TUNABLE_BOOL_FETCH(tunable, &val)) {
+				if (val) {
+					feat->feat_flags |=
+					    CPU_FEAT_USER_ENABLED;
+				} else {
+					feat->feat_flags |=
+					    CPU_FEAT_USER_DISABLED;
+				}
+			}
+		}
+
 		/* Run the enablement code at the correct stage of boot */
 		if ((feat->feat_flags & CPU_FEAT_STAGE_MASK) != stage)
 			continue;
@@ -71,17 +86,17 @@ enable_cpu_feat(uint32_t stage)
 		if (check_status == FEAT_ALWAYS_DISABLE)
 			goto next;
 
-		snprintf(tunable, sizeof(tunable), "hw.feat.%s",
-		    feat->feat_name);
-		if (TUNABLE_BOOL_FETCH(tunable, &val)) {
-			/* Is the feature disabled by the tunable? */
-			if (!val)
-				goto next;
-			/* If enabled by the tunable then enable it */
-		} else if (check_status == FEAT_DEFAULT_DISABLE) {
-			/* No tunable set and disabled by default */
+		/* The user disabled the feature */
+		if ((feat->feat_flags & CPU_FEAT_USER_DISABLED) != 0)
+			goto next;
+
+		/*
+		 * The feature was disabled by default and the user
+		 * didn't enable it then skip.
+		 */
+		if (check_status == FEAT_DEFAULT_DISABLE &&
+		    (feat->feat_flags & CPU_FEAT_USER_ENABLED) == 0)
 			goto next;
-		}
 
 		/*
 		 * Check if the feature has any errata that may need a
diff --git a/sys/arm64/include/cpu_feat.h b/sys/arm64/include/cpu_feat.h
index 20c743a7e507..6a311d4000bb 100644
--- a/sys/arm64/include/cpu_feat.h
+++ b/sys/arm64/include/cpu_feat.h
@@ -73,6 +73,9 @@ typedef enum {
 #define	CPU_FEAT_PER_CPU	0x00000000
 #define	CPU_FEAT_SYSTEM		0x00000010
 
+#define	CPU_FEAT_USER_ENABLED	0x40000000
+#define	CPU_FEAT_USER_DISABLED	0x80000000
+
 struct cpu_feat;
 
 typedef cpu_feat_en (cpu_feat_check)(const struct cpu_feat *, u_int);

From nobody Mon Sep 22 15:20:22 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVmyH71Fsz682fx;
	Mon, 22 Sep 2025 15:20:23 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cVmyH1dQgz3Wjp;
	Mon, 22 Sep 2025 15:20:23 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758554423;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=KQGT7yUMSIqK9w+irMnno2J7BA/BOZKXEoNcNaWv+UI=;
	b=xBxQ1oYl9wV+QRuTW+70G1ofirYALG2uZICvTxdFkCHlbEjUXGqLcyq6OU4zk57NyzGnFA
	qYuEFXZ2yt/AmmUCHzN54zsmCBfgKlNd/phrEDJ4IhaiwrWEujU7jybLGEFPpF0sNHZp96
	jlpVAFIXeMtvlkmxJPPhWn6JulWOBfhucdzAdpIDFfmVAxyRi0w0QUWalS6DunzS2megiD
	pGi3bD1QvFvDeSsj8yctWCD/KYYQKQKZ2zBONEAZCYmpghtOpMOAr5dMwj8IPsTx1Srwk1
	+CYUeRav2qlNG7BIXLrvqPZgdfhxIfn2wnv7sZIRrhi0BrI2CN+MhXLjaoTpAg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758554423;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=KQGT7yUMSIqK9w+irMnno2J7BA/BOZKXEoNcNaWv+UI=;
	b=gAFCEU/uxbJwmbapTZvxilTp22n7INcnLulI7lX0ZWwdcvkQKpufdJyrmKvFOiG8B1sy/a
	H0sHXF/oJpUp8X+ZppWSF5B+MRHakhMUFU65KXt8tUZ7UDoN4GHyF61eS0S4yT6kiI1nFU
	vjPht8GA37n8hv1ApF9borOVTaVaCDVLSbliGk7/0PJYDWqD9jO/5UcsKhoB1mmC5ZYqZm
	1ZLWgmnY33baYbrbKjWojTHcmCTNHplMeLwqzq8xdCUmmykXEGtfHiJ863LhlTMzztPPkd
	fYYi8OEu8Vt5odEqooV9+HYEIJGKPArLLYad4afJNc+9mQsplCmVyM6Ehr3Zhw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758554423; a=rsa-sha256; cv=none;
	b=fMRr6e4A3s6IXLb7h5I3IIqClrP8xQra9Arcd5gNFwTBDDoP6PUNlY04MpB3mrJn0KselK
	U6Q6/ROfovCD57J/7Mgd6xAIHw0ABiftyqYiir74gQYGWAIm40a/6IcQXeWVdVSIOTxH5n
	HpiQZyZ22ipUTx24eFGH8ZC1svfTEYaKTe7kl2L2lULT1Ugl0UqL/odIUE87RvgEW9dBuc
	toTGF1UwDt3EelDk+nrivHoQWdLsZu8Jx6+LpmRDNdljky7eEeJJs+bKCJeBktYiooaMS+
	CJUtS66iwhNJiAPh606d6UNrPEJrOXxXA5wTIMPgSz7qAJc796m3qnn0eMLRyQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVmyG2gwlz1502;
	Mon, 22 Sep 2025 15:20:22 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58MFKM2W069297;
	Mon, 22 Sep 2025 15:20:22 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58MFKMCj069295;
	Mon, 22 Sep 2025 15:20:22 GMT
	(envelope-from git)
Date: Mon, 22 Sep 2025 15:20:22 GMT
Message-Id: <202509221520.58MFKMCj069295@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Andrew Turner 
Subject: git: 88489d90afa5 - stable/15 - arm64: Fix enabling CPU
  features
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: andrew
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 88489d90afa5306b1dbbecca19efdb1cc4fd133f
Auto-Submitted: auto-generated

The branch stable/15 has been updated by andrew:

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

commit 88489d90afa5306b1dbbecca19efdb1cc4fd133f
Author:     Andrew Turner 
AuthorDate: 2025-09-19 10:05:47 +0000
Commit:     Andrew Turner 
CommitDate: 2025-09-20 01:00:54 +0000

    arm64: Fix enabling CPU features
    
    Previously when enabling CPU feature we assumed the no check function
    means the feature was unconditionally enabled. When adding support to
    disable features on boot this check was incorrectly partially left in
    place. As all current features have a check function this meant all
    features were disabled.
    
    Fix this by restoring the previous behaviour while also allowing the
    user to disable the feature.
    
    Reviewed by:    emaste
    Fixes:          4bc68fa98f68 ("arm64: Support managing features from loader")
    Sponsored by:   Arm Ltd
    Differential Revision:  https://reviews.freebsd.org/D52579
    
    (cherry picked from commit 5e690f1e12ce8699f16019854dfffd1857a801d8)
---
 sys/arm64/arm64/cpu_feat.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/sys/arm64/arm64/cpu_feat.c b/sys/arm64/arm64/cpu_feat.c
index fb065ea463cf..94114d47f846 100644
--- a/sys/arm64/arm64/cpu_feat.c
+++ b/sys/arm64/arm64/cpu_feat.c
@@ -78,10 +78,11 @@ enable_cpu_feat(uint32_t stage)
 		    PCPU_GET(cpuid) != 0)
 			continue;
 
-		if (feat->feat_check != NULL)
-			continue;
-
-		check_status = feat->feat_check(feat, midr);
+		if (feat->feat_check != NULL) {
+			check_status = feat->feat_check(feat, midr);
+		} else {
+			check_status = FEAT_DEFAULT_ENABLE;
+		}
 		/* Ignore features that are not present */
 		if (check_status == FEAT_ALWAYS_DISABLE)
 			goto next;

From nobody Mon Sep 22 16:11:54 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVp5k2dSXz685vD;
	Mon, 22 Sep 2025 16: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
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cVp5k2BVXz3fnl;
	Mon, 22 Sep 2025 16: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=1758557514;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=3YjFMBU277+MKfJ0vbwntZlJqpk8rtg9BM2qfbcID6w=;
	b=fAGGK1w9uN/cAjO/QSkf3vt+gpI9m6OdhH3qhLiArkwCd5qyOxG5PwCzUZlugE7+Xb0H5e
	PVYiIaFLrrS9F8//rEjGkivc+sX1PcxXlDojjQx5CztJRQ32EKZqJynKOecaSLzvZmW/V4
	bEiuF07TjPWul0rMnciUxzeFGsCvDyfy73K+kGhtfsq8+xuuAJl02fxAJJgcrUH7zq1t6U
	FmySo0XtRIzlfnhRf5CKl/vO4+FGrgD4LD2ESzTonRDcaJZDxNTg0EMeEQ95U4wEzUMkuP
	bE0Fn1DMshjPPAOmWeTJYlVpCMyzbOuoqs1fMywHR3/7jzorT71Db3SDvKTmFw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758557514;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=3YjFMBU277+MKfJ0vbwntZlJqpk8rtg9BM2qfbcID6w=;
	b=AUdABwMg62r1MU2GCNex1EZojBlmSHL1VA9ysnD9XKgLj7HltuwTmaZmND3I1TyZelQQ/K
	vfWXHzY2QW7X+feMXdUwyZGH+faqRW/clsICNXiPVXgaKaUcukWtGNGTp5RNuQ+CcHvZcl
	FYH0HGLIfuI1cNLH4wT5nKfO4YJiw4VaBkpUeW7+UULgm/xJPi8GWZ6QCIbOc5P42umEjH
	9JRz17NednAV2wLTOjFxarB9rEhaH7QtONVOXErsAakfelVw6JfZnewsjg/aDqoycyq+mJ
	oRCjkXVHaIcjKYZ8qUYZNAm1SnjazSqSHe8HBjZhRIHU3I9vVRyg6/V8sssnJw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758557514; a=rsa-sha256; cv=none;
	b=ifXOs/ayokECyj+iIFK3yIoa4ipBMCDHbhTSV5fRK+YJA2BuFF4j7YltS3HVsZ3rI+fyQF
	4wvBMRPXU2rg+AP1gsv6tz/tRUBdpU9Cad1HNfKORcSpRGbhm1mdsAtYLbZ2ORyVTtfY43
	vx7vNpvlG+1rPy74Xuvb0tSw7kOcRitZmxMRO6RAiApN2Q5Gl0YGfCp8rCpu9mLRIo3Wkc
	d4349K0HvrN6QP2EAOcofXvgzvRXtrtEPMvREgKmegxySZHgyRzKrRx946485I9/OEqZX1
	U6ahBvNooS3mGCxWftNb8YnXgjGqawMNb+WWFrRyxHOVtAF3uvrItndPRt08Bg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVp5k1WSNz16Lq;
	Mon, 22 Sep 2025 16:11:54 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58MGBstv070259;
	Mon, 22 Sep 2025 16:11:54 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58MGBsRS070256;
	Mon, 22 Sep 2025 16:11:54 GMT
	(envelope-from git)
Date: Mon, 22 Sep 2025 16:11:54 GMT
Message-Id: <202509221611.58MGBsRS070256@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Gleb Smirnoff 
Subject: git: 418bf338747a - stable/15 - Revert "linux: fix reporting
  NL_RTM_DELLINK to Netlink sockets"
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: glebius
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 418bf338747ad470ad91fbfe4f2767ab820dc988
Auto-Submitted: auto-generated

The branch stable/15 has been updated by glebius:

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

commit 418bf338747ad470ad91fbfe4f2767ab820dc988
Author:     Gleb Smirnoff 
AuthorDate: 2025-09-11 21:02:51 +0000
Commit:     Gleb Smirnoff 
CommitDate: 2025-09-22 16:11:33 +0000

    Revert "linux: fix reporting NL_RTM_DELLINK to Netlink sockets"
    
    I received a report that certain Linux application would crash on a
    message of a departure of an interface with FreeBSD name.  Looks like
    dropping NL_RTM_DELLINK is a lesser evil than relay them with FreeBSD
    names.
    
    This reverts commit 554907bac3b264863a051f75eedc35d180d3e18c.
    
    (cherry picked from commit 1014003c538ccf8b258c9f0b11c0c131573a63cf)
---
 sys/compat/linux/linux_netlink.c | 39 ++++++++++++++++++++++++++-------------
 1 file changed, 26 insertions(+), 13 deletions(-)

diff --git a/sys/compat/linux/linux_netlink.c b/sys/compat/linux/linux_netlink.c
index 927f3689e2b6..6aeafe84adc6 100644
--- a/sys/compat/linux/linux_netlink.c
+++ b/sys/compat/linux/linux_netlink.c
@@ -241,10 +241,25 @@ nlmsg_copy_nla(const struct nlattr *nla_orig, struct nl_writer *nw)
 	return (false);
 }
 
+/*
+ * Translate a FreeBSD interface name to a Linux interface name.
+ */
+static bool
+nlmsg_translate_ifname_nla(struct nlattr *nla, struct nl_writer *nw)
+{
+	char ifname[LINUX_IFNAMSIZ];
+
+	if (ifname_bsd_to_linux_name((char *)(nla + 1), ifname,
+	    sizeof(ifname)) <= 0)
+		return (false);
+	return (nlattr_add_string(nw, IFLA_IFNAME, ifname));
+}
+
+#define	LINUX_NLA_UNHANDLED	-1
 /*
  * Translate a FreeBSD attribute to a Linux attribute.
- * Returns false when the attribute is not processed and the caller must take
- * care of it.
+ * Returns LINUX_NLA_UNHANDLED when the attribute is not processed
+ * and the caller must take care of it, otherwise the result is returned.
  */
 static int
 nlmsg_translate_all_nla(struct nlmsghdr *hdr, struct nlattr *nla,
@@ -256,27 +271,22 @@ nlmsg_translate_all_nla(struct nlmsghdr *hdr, struct nlattr *nla,
 	case NL_RTM_DELLINK:
 	case NL_RTM_GETLINK:
 		switch (nla->nla_type) {
-		case IFLA_IFNAME: {
-			char ifname[LINUX_IFNAMSIZ];
-
-			if (ifname_bsd_to_linux_name((char *)(nla + 1), ifname,
-			    sizeof(ifname)) > 0)
-				return (true);
-			break;
-		}
+		case IFLA_IFNAME:
+			return (nlmsg_translate_ifname_nla(nla, nw));
 		default:
 			break;
 		}
 	default:
 		break;
 	}
-	return (false);
+	return (LINUX_NLA_UNHANDLED);
 }
 
 static bool
 nlmsg_copy_all_nla(struct nlmsghdr *hdr, int raw_hdrlen, struct nl_writer *nw)
 {
 	struct nlattr *nla;
+	int ret;
 
 	int hdrlen = NETLINK_ALIGN(raw_hdrlen);
 	int attrs_len = hdr->nlmsg_len - sizeof(struct nlmsghdr) - hdrlen;
@@ -287,12 +297,15 @@ nlmsg_copy_all_nla(struct nlmsghdr *hdr, int raw_hdrlen, struct nl_writer *nw)
 		if (nla->nla_len < sizeof(struct nlattr)) {
 			return (false);
 		}
-		if (!nlmsg_translate_all_nla(hdr, nla, nw) &&
-		    !nlmsg_copy_nla(nla, nw))
+		ret = nlmsg_translate_all_nla(hdr, nla, nw);
+		if (ret == LINUX_NLA_UNHANDLED)
+			ret = nlmsg_copy_nla(nla, nw);
+		if (!ret)
 			return (false);
 	}
 	return (true);
 }
+#undef LINUX_NLA_UNHANDLED
 
 static unsigned int
 rtnl_if_flags_to_linux(unsigned int if_flags)

From nobody Mon Sep 22 16:11:55 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVp5l49jPz686Mh;
	Mon, 22 Sep 2025 16:11:55 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cVp5l2V8Bz3fj4;
	Mon, 22 Sep 2025 16:11:55 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758557515;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=NQodGKo2GbbTkCwxkJvzCGwhvR0VvT30YHDRjlST3sU=;
	b=mxOVnN1ctrnoo++9ND9J5DXnYtfIsYYnWokDOB2AaOujkbD0lcWDKReVPprT1pv1C4oD8v
	zkhU5RwayXBnG18OcqrVIBxMdMs/l05uiEgfIDRj/VJRjhOpe04IxMeGe/zqBassr6r21H
	j6m+Adq+vjrYH/W5U02q4NoZuuLlRR0gNSlaA0d2jst2NuLqSiSdoPsK4oqkXpBycomake
	1VnXHMDUU9vmI9BilVQGxzSLAgElOyfgRHlDrJqtrTfdZC3TwuChi3aPgQUhGFtkZVSPfo
	XlP5EJNfA9JKH4Ji7yszRxkZnu+av+BaIWmjIoptsAK6PhMYvfSVXGKacFwQ/g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758557515;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=NQodGKo2GbbTkCwxkJvzCGwhvR0VvT30YHDRjlST3sU=;
	b=d88czvJ6o88ZNa+Xw7Loz1RRmgIdgA4JbSgtCA8xxVTQ6NYkNc9Vrv6qsQEYtIAFVum+fe
	goGvvVwrIgxdQDDWafyh39HcqlsmdBGFfc4zHGtsvAm4o2Xe30SS4u8+CRgBhE03GnPh4T
	3VEEgcZ2ELCGaq4QyEbdWNI/1fKcGJeE21qgNDHDvY2Jix2e5lTtz5qtaelVj+OfI/P5X+
	x7Ltx09h9QmFflikptm1UE4cv4iZZKydvXTqVJCHzQcYRoG1Dr+qcwq02uFlpFdctGNi1j
	GNQ1CHXID3plA/2K5znJTxr8WfpZmxaxvl4WvRtIjK7rrd6qQslBD0aD+ZZs6w==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758557515; a=rsa-sha256; cv=none;
	b=ZWRJWc+nrQ2+Jw6HEJagzWD3vkbat/d5V178bdVHtheX5aH3pKMKq4F7UxC51UBwVK9wUQ
	AtwXY+sDZqr0K5WTOG1F/SXxd/SLBkpLMFwHeixkj4b4F1MHH67hymTfPePzJT/K6e8jUt
	TRSsY8WLvr1f/IJABVP7k3BaSVrFzcwembLBny19c+EfutxAovnON6pw6/gvcgK88KoNhs
	oI4jcn0Ne4JSbmmykm57sGG7fxnuvc2PVKUD85Zprl30keODomu1yDR/XGq99++cS1c3Vb
	xY+KtzrM9Q1iVlXnaFoApbdS6+cWDpJbISNO3geKtARORRquwxa0X+9xo2DTdA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVp5l258xz15xb;
	Mon, 22 Sep 2025 16:11:55 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58MGBtcT070300;
	Mon, 22 Sep 2025 16:11:55 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58MGBt75070297;
	Mon, 22 Sep 2025 16:11:55 GMT
	(envelope-from git)
Date: Mon, 22 Sep 2025 16:11:55 GMT
Message-Id: <202509221611.58MGBt75070297@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Gleb Smirnoff 
Subject: git: 7a7fbb13f546 - stable/15 - cpucontrol: fix -DDEBUG
  build
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: glebius
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 7a7fbb13f546e15cabb622feaf3acbb9847578e7
Auto-Submitted: auto-generated

The branch stable/15 has been updated by glebius:

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

commit 7a7fbb13f546e15cabb622feaf3acbb9847578e7
Author:     Gleb Smirnoff 
AuthorDate: 2025-09-09 20:32:16 +0000
Commit:     Gleb Smirnoff 
CommitDate: 2025-09-22 16:11:33 +0000

    cpucontrol: fix -DDEBUG build
    
    (cherry picked from commit f113980fe24fbbb95b75321cb916ed9d48771840)
---
 usr.sbin/cpucontrol/cpucontrol.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/usr.sbin/cpucontrol/cpucontrol.h b/usr.sbin/cpucontrol/cpucontrol.h
index a4b3a94c19e6..d03c30a6bd6d 100644
--- a/usr.sbin/cpucontrol/cpucontrol.h
+++ b/usr.sbin/cpucontrol/cpucontrol.h
@@ -43,6 +43,7 @@ typedef void ucode_update_t(const struct ucode_update_params *params);
 extern int verbosity_level;
 
 #ifdef DEBUG
+#include 
 # define WARNX(level, ...)					\
 	if ((level) <= verbosity_level) {			\
 		fprintf(stderr, "%s:%d ", __FILE__, __LINE__);	\

From nobody Mon Sep 22 16:11:56 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVp5n4gfzz686Mj;
	Mon, 22 Sep 2025 16:11:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cVp5m4LVQz3fwc;
	Mon, 22 Sep 2025 16:11:56 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758557516;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=3rDjgEIM9/Noyso3BF7CumhyLXa+wiT6KiP1DKVq3EM=;
	b=fFy5lO8RlDfewqyBUDMIXRslKSvJ/U0CATInHsDB8HcVibwLBvi7owhBw7swtTqurzh4nP
	BJMByd5hBPk1gDd9TT09qszJHLp1HE12mD1I0Nf3UdwI5fn/grSEeT6rJHGk6Hp/qt8jY6
	sW0OdL/7jffPj2mkG0aZMEGFAqOLZPFFbFJ9kasX+fzJ77JO+E0+VSM9f6ZlMhjcxCIbMD
	n1COEw53xtN/V3w8GXoywGD/CIsiSDUcFfw32r4Y4PNKxJLUYJMvNS5pSOxiS4vkbw5j/Q
	TohaoixfsRDQ9WMRxTn1f09/WrgXl08jjYi7XV6vK0CUV/p81LQIQDZifO7Obg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758557516;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=3rDjgEIM9/Noyso3BF7CumhyLXa+wiT6KiP1DKVq3EM=;
	b=QQEAlMlxfuVG3zXMgXL2n2iFN5aJ9zX41nEmprejjq18YtupWIU/iku5qEvHXnPfEOizYt
	tengwHdkZlsRG1GQOzERS4Vnu88pBKxmXIAJqtPEArFtV1+dYkdRfjSGiRz15hCpfzTibm
	xo8e7M74DjO+rGx9YSy7puTgbfRq1XbIb0Okfxb3AFu18+zbzc6mr6oZDJFE2efkMaMTcD
	EnIBCyn1HRNuOfPc340tfxsfyBT6bl08GopNgnwqPHrAhQUm40bAfMSauBlAxsip3ielvE
	IAi+jFCw03UUm4mCXmHO6c/UOvdis3O1iKhMftp0yNBGXeE3hwSh/xT8MAd1Og==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758557516; a=rsa-sha256; cv=none;
	b=kEF/9E7NCmhBQ4BPXz3bu8bx3fEc7pmx4pmHCr/VFutB4ovOy2qhZ/t/EKzgaENWJ809/z
	Q7LJ1D/1pbl9M2qelPnTPmUzAS1M2eaU689p36JmvG0cmr384AHPM4+3viOI5TqHfxo7vn
	ZDXOd2G5+YlB47/FCEbD39ZHyDRR3831qdfpkBER9D7B7+Xa63mqkkLTD/uFZZv+sCM2pn
	Iwc3poHsuRuP7ILEO65JN3ZoYsC32UR+b9+tewRu/qQDhclqMCNqfSUt4+E00IxoZEHLGX
	Lcy0xzYrdUi2/FBEb8U0/nedi7FKWX4A1Lnaeiur+M2X/z2r5iMlv4DKrendxA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVp5m2nw7z15xd;
	Mon, 22 Sep 2025 16:11:56 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58MGBupV070335;
	Mon, 22 Sep 2025 16:11:56 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58MGBuoR070332;
	Mon, 22 Sep 2025 16:11:56 GMT
	(envelope-from git)
Date: Mon, 22 Sep 2025 16:11:56 GMT
Message-Id: <202509221611.58MGBuoR070332@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Gleb Smirnoff 
Subject: git: 797e92944d11 - stable/15 - cpuctl: run amd_ucode_wrmsr
  only on one CPU and report if it failed
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: glebius
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 797e92944d118c0fe7de20ae92a18066eaf9a194
Auto-Submitted: auto-generated

The branch stable/15 has been updated by glebius:

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

commit 797e92944d118c0fe7de20ae92a18066eaf9a194
Author:     Gleb Smirnoff 
AuthorDate: 2025-09-18 15:10:59 +0000
Commit:     Gleb Smirnoff 
CommitDate: 2025-09-22 16:11:33 +0000

    cpuctl: run amd_ucode_wrmsr only on one CPU and report if it failed
    
    The CPUCTL_UPDATE is supposed to be applied only to the CPU the ioctl(2)
    was performed on.  This is true for Intel CPUs, but for AMD the SMP
    rendezvouz of amd_ucode_wrmsr() effectively executed it on all CPUs.
    Also, the update failure was not reported.
    
    Reviewed by:            markj
    Differential Revision:  https://reviews.freebsd.org/D52466
    
    (cherry picked from commit 6683dcf61b3d0dfa8639c9e501eefb7709922ddf)
---
 sys/dev/cpuctl/cpuctl.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/sys/dev/cpuctl/cpuctl.c b/sys/dev/cpuctl/cpuctl.c
index 9253b17a259d..b0ab3467df69 100644
--- a/sys/dev/cpuctl/cpuctl.c
+++ b/sys/dev/cpuctl/cpuctl.c
@@ -402,19 +402,20 @@ out:
  * its workings.
  */
 static void
-amd_ucode_wrmsr(void *ucode_ptr)
+amd_ucode_wrmsr(void *arg)
 {
+	struct ucode_update_data *d = arg;
 	uint32_t tmp[4];
 
-	wrmsr_safe(MSR_K8_UCODE_UPDATE, (uintptr_t)ucode_ptr);
+	if (PCPU_GET(cpuid) == d->cpu)
+		d->ret = wrmsr_safe(MSR_K8_UCODE_UPDATE, (uintptr_t)d->ptr);
 	do_cpuid(0, tmp);
 }
 
 static int
 update_amd(int cpu, cpuctl_update_args_t *args, struct thread *td)
 {
-	void *ptr;
-	int ret;
+	struct ucode_update_data d = { .cpu = cpu };
 
 	if (args->size == 0 || args->data == NULL) {
 		DPRINTF("[cpuctl,%d]: zero-sized firmware image", __LINE__);
@@ -430,18 +431,17 @@ update_amd(int cpu, cpuctl_update_args_t *args, struct thread *td)
 	 * malloc(9) always returns the pointer aligned at least on
 	 * the size of the allocation.
 	 */
-	ptr = malloc(args->size + 16, M_CPUCTL, M_ZERO | M_WAITOK);
-	if (copyin(args->data, ptr, args->size) != 0) {
+	d.ptr = malloc(args->size + 16, M_CPUCTL, M_ZERO | M_WAITOK);
+	if (copyin(args->data, d.ptr, args->size) != 0) {
 		DPRINTF("[cpuctl,%d]: copyin %p->%p of %zd bytes failed",
 		    __LINE__, args->data, ptr, args->size);
-		ret = EFAULT;
+		d.ret = EFAULT;
 		goto fail;
 	}
-	smp_rendezvous(NULL, amd_ucode_wrmsr, NULL, ptr);
-	ret = 0;
+	smp_rendezvous(NULL, amd_ucode_wrmsr, NULL, &d);
 fail:
-	free(ptr, M_CPUCTL);
-	return (ret);
+	free(d.ptr, M_CPUCTL);
+	return (d.ret);
 }
 
 static int

From nobody Mon Sep 22 16:11:57 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVp5p0PqMz6862j;
	Mon, 22 Sep 2025 16:11:58 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cVp5n4Yqzz3fjc;
	Mon, 22 Sep 2025 16:11:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758557517;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=zyHNA6YWPCgj0XRU/mbAnDdmPfvZL8C5RzHn/4IF/7Q=;
	b=Mq6HfNRo15i5zve0DKqa77c4g7C0Bl8dv+GTwHJ1/f8RHe8VhIRG/6C2bWB1Yvg9KYGmEp
	19s2f1pE0MpH5D7vltvVgsbHKhO2pJdWFN506Q2sUG1yxbKa2uFBqSp99lAf7Nd/oFcAPB
	DfGUQs0a7yWwUJg/mQaqpsflGXPmhsbLK2FI0L2pD5cUQNeSFjpF/5WOjgqCp2MqlYLatx
	vNAZ6WfrMiw9NtAZA9JzOFvO74CXZyMYDR1ZL5mPTA2ro113HjMtYtbiHWfnl5oFsiFcKg
	BA8ipb3D2qdDy2VO6YnSJlm64HKiQk4y+at4r1MSJ9VG38kIydmTaXzoUvrkiQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758557517;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=zyHNA6YWPCgj0XRU/mbAnDdmPfvZL8C5RzHn/4IF/7Q=;
	b=VEmEBpqADG88P4KlaSaIm1u7RB0W4q2dLgIeBWH4P0vx5oBs015tcf+gLnYSGVleMElYU3
	9ay8dmjGQqEN9WM9J6y2WjsckugwNd06JY4QRNE6oMjwypN4v9TYKU0DfSsCLYIPhWFgp+
	U2VvfP++rD9cS5Ps9gn/yMgmOx7gTclnL0POWC8wjdqeq9tYZTh4X4k/BUce+l876ltalu
	hZw9rZGh4Dnk1FI3KofsG984BvV27tA5l8RvBIuurWMoFs25UpOuH7l+xBUWGxCBsrMhum
	GKYjOqs8u9FOueZjuRAZUTsdj43ueUUkbDw2yzVVbfiAqkI24Wx0eP6AiujaAQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758557517; a=rsa-sha256; cv=none;
	b=tnOX7EPEVVxRo/XeBTfRc1rF87PSdTEI/KiRtEy6lw5eDX5jaqZzdpbSBQoMOMB3nHx7oI
	xfpJ3hu7pVQwdlWSpAJRAmEYUcuINv01UwSw5kqqGSA0gISAy5kR+fCvdTThRdi+ICskM5
	WI10C1WyQbFOTvcWpLaVWkZxtoLQW3e08IiOHpMKMeB4obnKuTGMpBCaZAHaLFkcLXpzro
	mke2LrdfPqteoD7maqGfFUDpqLCbWXvWOcTUe2ht+8URh8OjhZvn8jilzE0CbTyz0aET70
	WzJpokebJ2AfYP0du70HpdL/4vPom3a4/isrs/iBmtKdVes7lWh+KKc1oUiXSw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVp5n42ZLz16Qf;
	Mon, 22 Sep 2025 16:11:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58MGBvxL070370;
	Mon, 22 Sep 2025 16:11:57 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58MGBvjE070367;
	Mon, 22 Sep 2025 16:11:57 GMT
	(envelope-from git)
Date: Mon, 22 Sep 2025 16:11:57 GMT
Message-Id: <202509221611.58MGBvjE070367@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Gleb Smirnoff 
Subject: git: dbff73873577 - stable/15 - cpucontrol: return selected
  revision from ucode_amd_find()
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: glebius
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: dbff738735777dd16490e0fdebd743a48a7ca222
Auto-Submitted: auto-generated

The branch stable/15 has been updated by glebius:

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

commit dbff738735777dd16490e0fdebd743a48a7ca222
Author:     Gleb Smirnoff 
AuthorDate: 2025-09-18 15:11:03 +0000
Commit:     Gleb Smirnoff 
CommitDate: 2025-09-22 16:11:33 +0000

    cpucontrol: return selected revision from ucode_amd_find()
    
    This fixes two printing bugs in cpucontrol(1).  First, the utility will
    now print "updating from rev X to rev Y", instead of incorrect "updating
    to revision X", where X is actually the old revision.  This also matches
    what Intel updater prints.  Second, the utility won't incorrectly warn
    that the update failed after reading the new revision post update.
    
    Reviewed by:            kib, markj
    Differential Revision:  https://reviews.freebsd.org/D52506
    
    (cherry picked from commit 83804499b72405475027e670690d4cdbada46090)
---
 sys/x86/include/ucode.h      |  2 +-
 sys/x86/x86/ucode.c          |  3 ++-
 sys/x86/x86/ucode_subr.c     | 10 +++++-----
 usr.sbin/cpucontrol/amd10h.c | 11 ++++++-----
 4 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/sys/x86/include/ucode.h b/sys/x86/include/ucode.h
index 0338d48a0832..75b9ff3afbd0 100644
--- a/sys/x86/include/ucode.h
+++ b/sys/x86/include/ucode.h
@@ -63,7 +63,7 @@ struct ucode_intel_extsig_table {
 };
 
 const void *ucode_amd_find(const char *path, uint32_t signature,
-	    uint32_t revision, const uint8_t *fw_data, size_t fw_size,
+	    uint32_t *revision, const uint8_t *fw_data, size_t fw_size,
 	    size_t *selected_sizep);
 int	ucode_intel_load(const void *data, bool unsafe,
 	    uint64_t *nrevp, uint64_t *orevp);
diff --git a/sys/x86/x86/ucode.c b/sys/x86/x86/ucode.c
index 0c153c0b656c..1973047fafd1 100644
--- a/sys/x86/x86/ucode.c
+++ b/sys/x86/x86/ucode.c
@@ -277,7 +277,8 @@ ucode_amd_match(const uint8_t *data, size_t *len)
 	signature = regs[0];
 	revision = rdmsr(MSR_BIOS_SIGN);
 
-	return (ucode_amd_find("loader blob", signature, revision, data, *len, len));
+	return (ucode_amd_find("loader blob", signature, &revision, data, *len,
+	    len));
 }
 
 /*
diff --git a/sys/x86/x86/ucode_subr.c b/sys/x86/x86/ucode_subr.c
index 9e128ad2bf04..53d7cfc06769 100644
--- a/sys/x86/x86/ucode_subr.c
+++ b/sys/x86/x86/ucode_subr.c
@@ -94,7 +94,7 @@ typedef struct container_header {
  * source code.
  */
 const void *
-ucode_amd_find(const char *path, uint32_t signature, uint32_t revision,
+ucode_amd_find(const char *path, uint32_t signature, uint32_t *revision,
     const uint8_t *fw_data, size_t fw_size, size_t *selected_sizep)
 {
 	const amd_10h_fw_header_t *fw_header;
@@ -112,7 +112,7 @@ ucode_amd_find(const char *path, uint32_t signature, uint32_t revision,
 	    (signature >> 4) & 0x0f,
 	    (signature >> 0) & 0x0f, (signature >> 20) & 0xff,
 	    (signature >> 16) & 0x0f);
-	WARNX(1, "microcode revision %#x", revision);
+	WARNX(1, "microcode revision %#x", *revision);
 
 nextfile:
 	WARNX(1, "checking %s for update.", path);
@@ -212,9 +212,9 @@ nextfile:
 			    fw_header->processor_rev_id, equiv_id);
 			continue; /* different cpu */
 		}
-		if (fw_header->patch_id <= revision) {
+		if (fw_header->patch_id <= *revision) {
 			WARNX(1, "patch_id %x, revision %x",
-			    fw_header->patch_id, revision);
+			    fw_header->patch_id, *revision);
 			continue; /* not newer revision */
 		}
 		if (fw_header->nb_dev_id != 0 || fw_header->sb_dev_id != 0) {
@@ -222,7 +222,7 @@ nextfile:
 		}
 
 		WARNX(3, "selecting revision: %x", fw_header->patch_id);
-		revision = fw_header->patch_id;
+		*revision = fw_header->patch_id;
 		selected_fw = fw_header;
 		selected_size = section_header->size;
 	}
diff --git a/usr.sbin/cpucontrol/amd10h.c b/usr.sbin/cpucontrol/amd10h.c
index 4fda44f0b797..9fc861fe5914 100644
--- a/usr.sbin/cpucontrol/amd10h.c
+++ b/usr.sbin/cpucontrol/amd10h.c
@@ -93,7 +93,7 @@ amd10h_update(const struct ucode_update_params *params)
 	size_t fw_size;
 	size_t selected_size;
 	uint32_t revision;
-	uint32_t new_rev;
+	uint32_t new_rev, old_rev;
 	uint32_t signature;
 	int devfd;
 	int error;
@@ -121,15 +121,16 @@ amd10h_update(const struct ucode_update_params *params)
 		WARN(0, "ioctl(%s)", dev);
 		goto done;
 	}
-	revision = (uint32_t)msrargs.data;
+	old_rev = revision = (uint32_t)msrargs.data;
 
-	selected_fw = ucode_amd_find(path, signature, revision, fw_image,
+	selected_fw = ucode_amd_find(path, signature, &revision, fw_image,
 	    fw_size, &selected_size);
 
 	if (selected_fw != NULL) {
 		WARNX(1, "selected ucode size is %zu", selected_size);
-		fprintf(stderr, "%s: updating cpu %s to revision %#x... ",
-		    path, dev, revision);
+		fprintf(stderr,
+		    "%s: updating cpu %s from rev %#x to rev %#x... ",
+		    path, dev, old_rev, revision);
 
 		args.data = __DECONST(void *, selected_fw);
 		args.size = selected_size;

From nobody Mon Sep 22 18:16:38 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVrzt4C0rz68Ftr;
	Mon, 22 Sep 2025 18:22:02 +0000 (UTC)
	(envelope-from cy.schubert@cschubert.com)
Received: from omta004.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "Client", Issuer "CA" (not verified))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cVrzt1ysVz3wyR;
	Mon, 22 Sep 2025 18:22:02 +0000 (UTC)
	(envelope-from cy.schubert@cschubert.com)
Authentication-Results: mx1.freebsd.org;
	none
Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227])
	by cmsmtp with ESMTPS
	id 0ajIvGP9oPzKy0lAnvMd6e; Mon, 22 Sep 2025 18:22:01 +0000
Received: from spqr.komquats.com ([70.66.136.217])
	by cmsmtp with ESMTPSA
	id 0lAlvEJzwJhBP0lAmvYE0n; Mon, 22 Sep 2025 18:22:01 +0000
X-Auth-User: cschuber
X-Authority-Analysis: v=2.4 cv=QY3Fvdbv c=1 sm=1 tr=0 ts=68d193c9
 a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17
 a=kj9zAlcOel0A:10 a=yJojWOMRYYMA:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8
 a=YxBL1-UpAAAA:8 a=_jZRaqlFIkvtVTtRhTwA:9 a=CjuIK1q_8ugA:10
 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22
Received: from slippy.cwsent.com (slippy.cwsent.com [10.1.1.91])
	by spqr.komquats.com (Postfix) with ESMTP id 1C6171CB8;
	Mon, 22 Sep 2025 11:21:59 -0700 (PDT)
Received: by slippy.cwsent.com (Postfix, from userid 1000)
	id 5C842A0; Mon, 22 Sep 2025 11:16:38 -0700 (PDT)
X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev
Reply-to: Cy Schubert 
From: Cy Schubert 
X-os: FreeBSD
X-Sender: cy@cwsent.com
X-URL: http://www.cschubert.com/
To: Vladimir Kondratyev 
cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
    dev-commits-src-branches@FreeBSD.org
Subject: Re: git: a4417b9f9cde - stable/15 - moused(8): Start moused with 
 devd
In-reply-to: <202509220923.58M9NUsR099992@gitrepo.freebsd.org>
References: <202509220923.58M9NUsR099992@gitrepo.freebsd.org>
Comments: In-reply-to Vladimir Kondratyev 
   message dated "Mon, 22 Sep 2025 09:23:30 +0000."
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Mon, 22 Sep 2025 11:16:38 -0700
Message-Id: <20250922181638.5C842A0@slippy.cwsent.com>
X-CMAE-Envelope: MS4xfH/+4+SxivJiEbOQOitjCY8RNq7QyW3BqVz8am6GohSWMgAMX1AaX4IUQHbAVX2ugr8Slih8WIbATBRDTEPDemRzn+SaXHbxRsKvHd0iX6U3l0fLAdhg
 jAQDwdkjs0zmeK0G+8dptkL1TpFECuHbapgXcjd+/KPoxAFFUaYSn/VVAb28fM5nlK8ZpOmMGlatiYGy2B9WTWnLU6qVGWLKjJqPp0P/NRiuVD8l4Qy9GPBZ
 Ip8Yfz6GiKgGw8nfgLReAzN+taMh1wQ0AeodqLlBJRQKGTStTmHVL8b4TThZ18QlnIRXVJRLVrJXxaow+As7Swv3nCEUmkryO6yU9wbt7ms=
X-Spamd-Bar: ----
X-Spamd-Result: default: False [-4.00 / 15.00];
	REPLY(-4.00)[];
	ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US]
X-Rspamd-Pre-Result: action=no action;
	module=replies;
	Message is reply to one we originated
X-Rspamd-Queue-Id: 4cVrzt1ysVz3wyR

In message <202509220923.58M9NUsR099992@gitrepo.freebsd.org>, Vladimir 
Kondraty
ev writes:
> The branch stable/15 has been updated by wulf:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=a4417b9f9cde5ab1ca1ff84da4847bd7
> d5141c29
>
> commit a4417b9f9cde5ab1ca1ff84da4847bd7d5141c29
> Author:     Vladimir Kondratyev 
> AuthorDate: 2025-09-21 13:14:49 +0000
> Commit:     Vladimir Kondratyev 
> CommitDate: 2025-09-22 09:22:24 +0000
>
>     moused(8): Start moused with devd
>     
>     It is appeared that currently starting of moused does not depend on
>     moused_enable variable value in rc.conf. That leads to missing USB mice
>     support in default configuration. Start moused in traditional per
>     device mode with devd to follow POLA.
>     
>     One daemon per system mode still can be enabled with setting of
>     moused_port="auto"
>     moused_nondefault_enable="NO"
>     variables in /etc/rc.conf
>     
>     To revert to sysmouse mode add moused_type="sysmouse" to /etc/rc.conf
>     
>     Reported by:    many
>     Requested by:   glebius
>     Reviewed by:    glebius
>     MFC after:      1 day
>     Differential Revision:  https://reviews.freebsd.org/D52430
>     
>     (cherry picked from commit 66e7f048f0c8e9e726738fadd9dc819bfda3cbfe)
> ---
>  libexec/rc/rc.conf     |  4 ++--
>  libexec/rc/rc.d/moused | 11 ++++++-----
>  sbin/devd/moused.conf  |  9 +++++++++
>  3 files changed, 17 insertions(+), 7 deletions(-)
>
> diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf
> index 2506bd45a53f..7525f7c9d1fc 100644
> --- a/libexec/rc/rc.conf
> +++ b/libexec/rc/rc.conf
> @@ -586,11 +586,11 @@ font8x14="NO"		# font 8x14 from /usr/share/{sy
> scons,vt}/fonts/* (or NO).
>  font8x8="NO"		# font 8x8 from /usr/share/{syscons,vt}/fonts/* (or NO)
> .
>  blanktime="300"		# blank time (in seconds) or "NO" to turn it of
> f.
>  saver="NO"		# screen saver: Uses /boot/kernel/${saver}_saver.ko
> -moused_nondefault_enable="NO" # Treat non-default mice as enabled unless
> +moused_nondefault_enable="YES" # Treat non-default mice as enabled unless
>  			       # specifically overridden in rc.conf(5).
>  moused_enable="NO"	# Run the mouse daemon.
>  moused_type="evdev"	# See man page for rc.conf(5) for available settings.
> -moused_port="auto"	# Set to your mouse port.
> +moused_port="/dev/psm0"	# Set to your mouse port.
>  moused_flags=""		# Any additional flags to moused.
>  mousechar_start="NO"	# if 0xd0-0xd3 default range is occupied in your
>  			# language code table, specify alternative range
> diff --git a/libexec/rc/rc.d/moused b/libexec/rc/rc.d/moused
> index 64e4f815eea9..35a26bd57275 100755
> --- a/libexec/rc/rc.d/moused
> +++ b/libexec/rc/rc.d/moused
> @@ -28,9 +28,10 @@ moused_svcj="NO"
>  # expected to be the mouse device.
>  #
>  if [ -n "$2" ]; then
> -	eval moused_$2_enable=\${moused_$2_enable-${moused_nondefault_enable}}
> -	rcvar="moused_${2}_enable"
> -	pidfile="${pidprefix}.$2.pid"
> +	ms=`basename $2`
> +	eval moused_${ms}_enable=\${moused_${ms}_enable-${moused_nondefault_ena
> ble}}
> +	rcvar="moused_${ms}_enable"
> +	pidfile="${pidprefix}.${ms}.pid"
>  	pidarg="-I $pidfile"
>  fi
>  
> @@ -45,10 +46,10 @@ moused_start()
>  	# the moused_port variable, which if not defined sets it to the
>  	# passed in device name.
>  	#
> -	ms=$1
> +	ms=`basename $1`

This is misplaced resulting in,

usage: basename string [suffix]
       basename [-a] [-s suffix] string [...]

>  	if [ -n "$ms" ]; then

This should be $1.

>  		eval myflags=\${moused_${ms}_flags-$moused_flags}
> -		eval myport=\${moused_${ms}_port-/dev/$ms}
> +		eval myport=\${moused_${ms}_port-/dev/$1}
>  		eval mytype=\${moused_${ms}_type-$moused_type}
>  		if [ -n "$mytype" ] && check_kern_features evdev_support; then
>  			typearg="-t ${mytype}"
> diff --git a/sbin/devd/moused.conf b/sbin/devd/moused.conf
> index ed1060ffdf2e..8821c2bb8375 100644
> --- a/sbin/devd/moused.conf
> +++ b/sbin/devd/moused.conf
> @@ -33,3 +33,12 @@ notify 100 {
>  
>  	action "service moused quietstop $cdev";
>  };
> +
> +notify 100 {
> +	match "system" "DEVFS";
> +	match "subsystem" "CDEV";
> +	match "type" "CREATE";
> +	match "cdev" "input/event[0-9]+";
> +
> +	action "service moused quietstart $cdev";
> +};
>


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX:     Web:  https://FreeBSD.org
NTP:               Web:  https://nwtime.org

			e**(i*pi)+1=0



From nobody Mon Sep 22 19:23:03 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVtLH6Fbgz68JwL;
	Mon, 22 Sep 2025 19:23:03 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cVtLH5cYTz45NP;
	Mon, 22 Sep 2025 19:23:03 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758568983;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=rLHtr55Wig4dIn3qv/Fx+Xft/SP5Kpi37XoAMeAU/zY=;
	b=FQDJ/bLa8oFiBfPOBkgZc4kXIWRNuIr1KxWQ0uD/RufNAiqa+/gurQSr+LGvCYLWQ6XG9s
	ie6lEofV4b0juqIGxs0Zym+DUHfDtPxvvGWTJoyUtpMUSJPsIB/88u6JR+QmRckXE8/4UR
	n8ma4O89BJkJ+KJ5RPpa+u4G1/ZVuEUxMJUaYmGazPMRAgw3ZcauOEMddrUUj4dZ3twFfK
	ypshzMOmGaLzoyu7JROKYMHjAvpC/B/nzWHAYKut/i1N5bXusNGULx0yuhln01HT0BuKz6
	0QyUQ9eocSLkwh7reXXTKWhpTv/Ow1XiZ76NkR6YSdsNRFs3cnFn2+U85SIyjQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758568983;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=rLHtr55Wig4dIn3qv/Fx+Xft/SP5Kpi37XoAMeAU/zY=;
	b=Gx7IYSbqxTOOIH+eVOJN7AUUdETUbMnfFdKoaZm+bSLOLAMHGTf9LbqHi9lB5IZ74T1WCY
	MsuRsTOSG35dpa72gddiy0EORYW5ZFm/fPl+JdoT0LGD3kLYf8yAtjgIT/KJ6m9XFai//P
	/wbGI9+6xUc/Xpo34XuxwxhumkmJ82u7OJV0kt1Q4w//+IbKAep9dKcQY/X4oYvTili+C2
	ZQoCtMVtzGzHxGFNN+c0c89r92962IXyAjbSrfQF2hfn5XnyOd/ZKYPRi1C0yvryqVjU4e
	OsrYxwV04OaupOdZKReHhCUH2G2yq2GxbFOjgJc2iNAOIOzstDemk7TrIxy5Gw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758568983; a=rsa-sha256; cv=none;
	b=nQT5wky6wXPMHObdsin1iTqkey5w40yxRCNXKY5JXz3qsbrJayzxYdxaCyp1E5MBMEZiFV
	p2mFhC2bEz5Io+nEKPZgheu4r8/ssSRh3TUHZ2BoEpSCrTA7Lo52gKuMcw3wZAiB9Zrzhr
	AiIL+PBF45gFwXmn0iH3IB5RcxRHnu2XMOliV6IxF/DWquqy9wNasFBCAskppTwFZIAxgz
	OQDtbjC640ymYbgUZb8P7y4kcHkR0Z9TD8OdRVtyKwKlp64G6hfPJXB/LAhwCRmM3OC9rx
	GA79NBtlNXWEPKW8/pWVXVRlUhWQ3+KlY8bGDNxQBVEqGGGqht1O0qwVIRENQA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVtLH4fM8z1CR5;
	Mon, 22 Sep 2025 19:23:03 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58MJN35T028331;
	Mon, 22 Sep 2025 19:23:03 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58MJN3Hp028328;
	Mon, 22 Sep 2025 19:23:03 GMT
	(envelope-from git)
Date: Mon, 22 Sep 2025 19:23:03 GMT
Message-Id: <202509221923.58MJN3Hp028328@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Michael Tuexen 
Subject: git: 65a9bef46996 - stable/15 - tcp: improve compilation
  of cc and their helper modules
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: tuexen
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 65a9bef469969dda95d7c5cc4a525a3b33c76cd7
Auto-Submitted: auto-generated

The branch stable/15 has been updated by tuexen:

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

commit 65a9bef469969dda95d7c5cc4a525a3b33c76cd7
Author:     Michael Tuexen 
AuthorDate: 2025-09-16 21:30:40 +0000
Commit:     Michael Tuexen 
CommitDate: 2025-09-17 04:49:21 +0000

    tcp: improve compilation of cc and their helper modules
    
    * Allow the congestion control modules CDG, CHD, HD, and vegas also
      to be compiled into the kernel for IPv6 only kernel configs.
    * Compile the helper module h_ertt for round trip time estimation only
      into the kernel, if one of the congestion control module using it
      (one of CDG, CDH, HD, or vegas) is also compiled into the kernel.
    Please note the second point implies that TCP TSO is done whenever
    possible as long as none of the congestion control modules CDG, CHD,
    HD, or vegas is loaded or compiled into the kernel.
    
    Reviewed by:            cc
    Sponsored by:           Netflix, Inc.
    Differential Revision:  https://reviews.freebsd.org/D52547
    
    (cherry picked from commit 1bb72d3d6eee50232b6d6acbc201f9aaac93e2b5)
---
 sys/conf/files | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/sys/conf/files b/sys/conf/files
index 9661bafea8f9..db05a1424f00 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -4369,15 +4369,23 @@ netinet/cc/cc.c			optional cc_newreno inet | cc_vegas inet | \
 	cc_chd inet | cc_cdg inet | cc_newreno inet6 | cc_vegas inet6 | \
 	cc_htcp inet6 | cc_hd inet6 |cc_dctcp inet6 | cc_cubic inet6 | \
 	cc_chd inet6 | cc_cdg inet6
-netinet/cc/cc_cdg.c		optional inet cc_cdg tcp_hhook
-netinet/cc/cc_chd.c		optional inet cc_chd tcp_hhook
+netinet/cc/cc_cdg.c		optional inet cc_cdg tcp_hhook | \
+	inet6 cc_cdg tcp_hhook
+netinet/cc/cc_chd.c		optional inet cc_chd tcp_hhook | \
+	inet6 cc_chd tcp_hhook
 netinet/cc/cc_cubic.c		optional inet cc_cubic | inet6 cc_cubic
 netinet/cc/cc_dctcp.c		optional inet cc_dctcp | inet6 cc_dctcp
-netinet/cc/cc_hd.c		optional inet cc_hd tcp_hhook
+netinet/cc/cc_hd.c		optional inet cc_hd tcp_hhook | \
+	inet6 cc_hd tcp_hhook
 netinet/cc/cc_htcp.c		optional inet cc_htcp | inet6 cc_htcp
 netinet/cc/cc_newreno.c		optional inet cc_newreno | inet6 cc_newreno
-netinet/cc/cc_vegas.c		optional inet cc_vegas tcp_hhook
-netinet/khelp/h_ertt.c		optional inet tcp_hhook
+netinet/cc/cc_vegas.c		optional inet cc_vegas tcp_hhook | \
+	inet6 cc_vegas tcp_hhook
+netinet/khelp/h_ertt.c		optional inet tcp_hhook cc_cdg | \
+	inet tcp_hhook cc_chd | inet tcp_hhook cc_hd | \
+	inet tcp_hhook cc_vegas | inet6 tcp_hhook cc_cdg | \
+	inet6 tcp_hhook cc_chd | inet6 tcp_hhook cc_hd | \
+	inet6 tcp_hhook cc_vegas
 netinet/sctp_asconf.c		optional inet sctp | inet6 sctp
 netinet/sctp_auth.c		optional inet sctp | inet6 sctp
 netinet/sctp_bsd_addr.c		optional inet sctp | inet6 sctp

From nobody Mon Sep 22 19:23:41 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVtM135Gyz68K8Z;
	Mon, 22 Sep 2025 19:23:41 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cVtM1290Mz45XJ;
	Mon, 22 Sep 2025 19:23:41 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758569021;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=/XSVS+at88Atqi/5b54sBNBWq+D8cq1CN1lQPcyJhl0=;
	b=lefVY4hwl/hg80tEMI6eiXNVL+rsv9lXSilwRPiikAaYnCIEgGDkiaLccd3/pk0+SLlLKH
	Y6ofGgC7Lf8CZjbOO0kjeKa2AS/y48XYeVFYBriDIUy5YLuMzEvdjguZSWrYi1NxohKOSL
	QmjwwsrB9G3hKW/TmeTKX/nJwe9SNhXdfFDxa+fX+jFyRoQtWb8G8WyEdamR/ZIp0tbbLA
	UemF4H0z8ihT7V6iemXXnJPlzqC8ZjrobUOhjLR827bUPGo23L0FhUpIG9hABraLPxb7/y
	4F73LFI8qkSDMvg1bkpkdX9BBNK1vphPp2yATLjcSX/sJMl5DYV8rg/hLaGl2g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758569021;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=/XSVS+at88Atqi/5b54sBNBWq+D8cq1CN1lQPcyJhl0=;
	b=jObgXYjGSHWBpKTN+hKpV+7OdeLMQBBeP/wEEBJpaCR3/QRXpWgBGqzJUhFJtX+7PuJ8n5
	FZohMsb3LLpjvtuCZw4ZQbMC8Q7AutDQmQaFYDZYKuhsboi3JIG1rZj2wmIVwcgbDhaOSO
	ayawooGOxECjpcmV4y2nnoCDYzdvzB4Sc2JmeBh8HRUiwmYiQ9yfe/cvOo81yS5dPyhwAd
	5unqgZZwY6cjbV5fi6kHmAYHptkoSYXBhgdCZjLmCusEStnTCyUM41IbZnWpikz+4rhQQJ
	1KVSsCr1gHcGJgkgxfOMWs7ySDTlBBjm0jxjh1TA9Simk+a85C3ZX42li0+KUA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758569021; a=rsa-sha256; cv=none;
	b=irnWQpjUXsnq9vsDa3SE8x0PCtbfIfxUxXGdGzJAd0jxr4mkTmUZG6p0hEVJMrzro/9D27
	oG7eRCBnsmSkFAJqbH8na7BiWKf/kHShrpSmF28l6JSUJmzrQDUiEJfYBskXQX3vmHjNd1
	pCNVac7vE3dwzZtILJIKQnZnKrc+UBwldhaM9390UxfCUNJfUBm29K8leKzssdbvDoM+Wz
	YJxKhdoyZ8/Rz5zf3lSpMAOJchWlSd+AWSc3r/ZgO3jl9dFyQXNf5lY/s6XwaKAQmq0Ioi
	t0AxfV0IMiCjh0BemPqn+OWb1TZAvUChv3Jt0OglWQz38EUCtdfctjcceCu7cg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVtM11kxNz1CFV;
	Mon, 22 Sep 2025 19:23:41 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58MJNfL0028588;
	Mon, 22 Sep 2025 19:23:41 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58MJNfuY028585;
	Mon, 22 Sep 2025 19:23:41 GMT
	(envelope-from git)
Date: Mon, 22 Sep 2025 19:23:41 GMT
Message-Id: <202509221923.58MJNfuY028585@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Michael Tuexen 
Subject: git: 28f2d9b86de5 - stable/15 - vtnet: deprecate loader
  tunable fixup_needs_csum
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: tuexen
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 28f2d9b86de5aa337f9f5f28e95e112722cfa14d
Auto-Submitted: auto-generated

The branch stable/15 has been updated by tuexen:

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

commit 28f2d9b86de5aa337f9f5f28e95e112722cfa14d
Author:     Timo Völker 
AuthorDate: 2025-09-16 21:37:45 +0000
Commit:     Michael Tuexen 
CommitDate: 2025-09-17 04:49:54 +0000

    vtnet: deprecate loader tunable fixup_needs_csum
    
    If this tunable is enabled and vtnet receives a packet with
    VIRTIO_NET_HDR_F_NEEDS_CSUM set, vtnet computes the TCP/UDP checksum
    and writes it in the checksum field.
    This was somewhat useful when vtnet pretended that such a packet has
    a correct checksum and set the mbuf flag CSUM_DATA_VALID.
    But this is not the case anymore.
    
    Reviewed by:            tuexen
    Differential Revision:  https://reviews.freebsd.org/D52546
    
    (cherry picked from commit 5da388d93917f5fa74022960cc65452592f71539)
---
 share/man/man4/vtnet.4 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/share/man/man4/vtnet.4 b/share/man/man4/vtnet.4
index 1df79da5f42e..0594ca70e99a 100644
--- a/share/man/man4/vtnet.4
+++ b/share/man/man4/vtnet.4
@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd September 8, 2025
+.Dd September 16, 2025
 .Dt VTNET 4
 .Os
 .Sh NAME
@@ -84,6 +84,8 @@ field of the structure
 .Vt struct virtio_net_hdr .
 It also marks the checksum as being correct in the mbuf packet header.
 The default value is 0.
+This tunable is deprecated and will be removed in
+.Fx 16 .
 .It Va hw.vtnet.tso_disable
 .It Va hw.vtnet. Ns Ar X Ns Va .tso_disable
 This tunable disables TCP segmentation offloading.

From nobody Mon Sep 22 19:31:03 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVtWX0ZGHz68Kh7;
	Mon, 22 Sep 2025 19:31:04 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cVtWX04X2z45tC;
	Mon, 22 Sep 2025 19:31:04 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758569464;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=EcO3Z7ZL2gC/pPAUHOOGB5dmJmFDzRnYpwDOuGljVOQ=;
	b=KgHMEmXYVSRRw8wj9RYSw9o2tO7yeGzT9eiPTbYJQbBJuTolXkrmsKx7Lgi+XlFqPX7Nxb
	HqBwTthHNbD88rHmsd3ao582ByPADu41q1fEhMj9CtDn/YD05XH6fCf0QKuwOYraKfStyv
	PhkLct/MjMkuXvcveaoyl+TpJdYlD7yIPq7aqtkxIigjDg2JCL1GYtBR1nzLQfj86IvozT
	2j28xALL800AK82s9XdQWuVLouQv7gUIiZ+kdminFomcxM2WZjRXByzdQqJXIjW/qvBA+5
	5He+FB85Ib4j5djEZ0n2rGyB+GSpkEUSLgpXO7UUq01+2yN9M+eM8jNnmRcMXw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758569464;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=EcO3Z7ZL2gC/pPAUHOOGB5dmJmFDzRnYpwDOuGljVOQ=;
	b=Ef1ch4rVwrn9jBz9LOfB4zz5wSXA9+DKOcV/puT7QY9kNjTGiZwsG/fJV3SI+2BtS7nvZE
	vF85oDKHUelrUM1ebPqNu1um4/EuD2oaR9PuDV1DXXSTPlFZSRPjokIwNQMZayb+sEUxDB
	aLbCFdgvXSKJAPxzNuanRCVldMQe48zAw+eObjc7Ai0hMYkv9P4h4OlZ/hJJQycJm4Fyhe
	0mKPI8vU80+oeY8KPsXHCKcmPhSYpZgZJxPdb99cV+ieEQ8g9OoCSc6e/qRph8Np61l/Kh
	6XwBceZphZC1aDkqAfTzBhRtfgTg/u6E932bu8ebdzBJuYjjzMfNvK6szVkWCA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758569464; a=rsa-sha256; cv=none;
	b=FbBXuQAyc0fPqRgmD8VOxBhNVi9IgbrCUM/LuPbYWBoZDjaiWBhzewFeQcTQeYg4+af+S0
	RewJ7kcZ3ZP9CH6HEbk2PeZBO+mDH8LW0r5a/JEqlbZ/9TAQXKMUZg5d2osU0ipWoIV8Ex
	G8nIpBvGlED4voWeFBkCHybF+jcsZOfxSCVYCuejdFQlMpw5E9CpaAvZH2AHlpWXkP4Aqx
	B9DtK0TTHQWG58df6z619YiOyEPi50vlL1xPfq8ZyytnOpBrZHkf35UnUdml09ZlirWz9u
	d8yT8dBLAbjVXjeplWjnCEoYCgzPxd/KB/rVNZPbJkl+rbhv6lfmx+TorQOusw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVtWW6nnMz1C9d;
	Mon, 22 Sep 2025 19:31:03 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58MJV3kK041565;
	Mon, 22 Sep 2025 19:31:03 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58MJV340041562;
	Mon, 22 Sep 2025 19:31:03 GMT
	(envelope-from git)
Date: Mon, 22 Sep 2025 19:31:03 GMT
Message-Id: <202509221931.58MJV340041562@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Michael Tuexen 
Subject: git: bf2391ee2ef2 - stable/14 - tcp: improve compilation
  of cc and their helper modules
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: tuexen
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: bf2391ee2ef274dd24b27a67c0a850b1d6cc2df9
Auto-Submitted: auto-generated

The branch stable/14 has been updated by tuexen:

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

commit bf2391ee2ef274dd24b27a67c0a850b1d6cc2df9
Author:     Michael Tuexen 
AuthorDate: 2025-09-16 21:30:40 +0000
Commit:     Michael Tuexen 
CommitDate: 2025-09-22 19:30:19 +0000

    tcp: improve compilation of cc and their helper modules
    
    * Allow the congestion control modules CDG, CHD, HD, and vegas also
      to be compiled into the kernel for IPv6 only kernel configs.
    * Compile the helper module h_ertt for round trip time estimation only
      into the kernel, if one of the congestion control module using it
      (one of CDG, CDH, HD, or vegas) is also compiled into the kernel.
    Please note the second point implies that TCP TSO is done whenever
    possible as long as none of the congestion control modules CDG, CHD,
    HD, or vegas is loaded or compiled into the kernel.
    
    Reviewed by:            cc
    Sponsored by:           Netflix, Inc.
    Differential Revision:  https://reviews.freebsd.org/D52547
    
    (cherry picked from commit 1bb72d3d6eee50232b6d6acbc201f9aaac93e2b5)
---
 sys/conf/files | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/sys/conf/files b/sys/conf/files
index 66d2916ed174..12ddadf62154 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -4327,15 +4327,23 @@ netinet/cc/cc.c			optional cc_newreno inet | cc_vegas inet | \
 	cc_chd inet | cc_cdg inet | cc_newreno inet6 | cc_vegas inet6 | \
 	cc_htcp inet6 | cc_hd inet6 |cc_dctcp inet6 | cc_cubic inet6 | \
 	cc_chd inet6 | cc_cdg inet6
-netinet/cc/cc_cdg.c		optional inet cc_cdg tcp_hhook
-netinet/cc/cc_chd.c		optional inet cc_chd tcp_hhook
+netinet/cc/cc_cdg.c		optional inet cc_cdg tcp_hhook | \
+	inet6 cc_cdg tcp_hhook
+netinet/cc/cc_chd.c		optional inet cc_chd tcp_hhook | \
+	inet6 cc_chd tcp_hhook
 netinet/cc/cc_cubic.c		optional inet cc_cubic | inet6 cc_cubic
 netinet/cc/cc_dctcp.c		optional inet cc_dctcp | inet6 cc_dctcp
-netinet/cc/cc_hd.c		optional inet cc_hd tcp_hhook
+netinet/cc/cc_hd.c		optional inet cc_hd tcp_hhook | \
+	inet6 cc_hd tcp_hhook
 netinet/cc/cc_htcp.c		optional inet cc_htcp | inet6 cc_htcp
 netinet/cc/cc_newreno.c		optional inet cc_newreno | inet6 cc_newreno
-netinet/cc/cc_vegas.c		optional inet cc_vegas tcp_hhook
-netinet/khelp/h_ertt.c		optional inet tcp_hhook
+netinet/cc/cc_vegas.c		optional inet cc_vegas tcp_hhook | \
+	inet6 cc_vegas tcp_hhook
+netinet/khelp/h_ertt.c		optional inet tcp_hhook cc_cdg | \
+	inet tcp_hhook cc_chd | inet tcp_hhook cc_hd | \
+	inet tcp_hhook cc_vegas | inet6 tcp_hhook cc_cdg | \
+	inet6 tcp_hhook cc_chd | inet6 tcp_hhook cc_hd | \
+	inet6 tcp_hhook cc_vegas
 netinet/sctp_asconf.c		optional inet sctp | inet6 sctp
 netinet/sctp_auth.c		optional inet sctp | inet6 sctp
 netinet/sctp_bsd_addr.c		optional inet sctp | inet6 sctp

From nobody Mon Sep 22 19:31:35 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVtX72l36z68Kpb;
	Mon, 22 Sep 2025 19:31:35 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cVtX720lPz4642;
	Mon, 22 Sep 2025 19:31:35 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758569495;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=KHJlrZKw7zLolvRJ+juDB6PEGoc7tIYYVl35jN42P58=;
	b=H4nk7ihhcyoCNeRQJbdRv05E0kNMm85FkP3vzuo8BC+A4M4OSbq5JxX5C4V28ZNjewNJPQ
	A5yA0keoXBe3u18ur5Nmf9CFBdTkDRKkWZLJTOTs+7KwGjMyc4KPSStXVTvKca5FxwSViH
	wSg74CL/1CKy1LwJgJYzwt4NgeUOnZdjszDKWjDQwq4bjzkhZdUk3uncgo3/DSaESCwZoR
	834O7/Kdf2VtdEWr9pwGQ38cTo/7hENJ9xppQSrvi0LaOehGDI8a0I5DJOYJ1JmZGuk33y
	srpa63PWmkrB6a122BP9NVoP1meQc5tqSOJnYggZm9Ru1abU+5Hsp3c06J9OHw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758569495;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=KHJlrZKw7zLolvRJ+juDB6PEGoc7tIYYVl35jN42P58=;
	b=VkM6aSYtby30SUEtyHAsvEtWAnN89k0OC07u7UWAlpZe5k8V4PmtvA71Mr0rgMF1r3hbTj
	oX1GrCINJG1OpsZBXF/5g2BXlS19nEd4P2hEdZ+g8njZo02ervXeBWkMpz7xvWOgVJQ3SA
	RWXV2HEzfI7a1kEJg9+skwjqLKZYiF6fCbWLMcOIVoOK+iLN0Lj3s0hQaJRUvSuqfFXgNc
	qIo/1PjFa/C3HkOoa3/gN7BjcimElSNuWwwc1nGvp4PPDV3tlwZdXJfFkPFwujWfE4Zb9W
	MIJryfmo+8399Yc8kktC3orBBvE+YGDWu4LbQG3jkxMZxwZIwlj0FhKqPhY2mA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758569495; a=rsa-sha256; cv=none;
	b=WEz+lPjvW1u0KYMCJ0n8FKuNrihPHlaUOsSY9zKtQkIFrvbwVInQuX9Ar3oBvIuS8Amrpy
	pInq2mV3bZ9bNWvSeUgKa6pP5scANqkeY054ISnzqikdniWcGaPtJRJCPCj0sciUN8YuX3
	/ifc5LLTXjErrdm5cH+AjxLxaLt2dAZYEqt/UQgbnsSmkCI/68DiMadg+IYs+xd6p9vS8N
	y6RXbyP0Odev8gfi8qC6jmA0HYb3S/1qxo5cR8kKe2pY2XvMAmdNGeDITFi0aZ1kmUdPY6
	RtHjO3dRNVxL2M1h4bFfIEiPpZqFsw7WhBOeHwPhGpTwRusNHMPTSYoKZReMiA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVtX71Sqmz1CRS;
	Mon, 22 Sep 2025 19:31:35 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58MJVZO1043430;
	Mon, 22 Sep 2025 19:31:35 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58MJVZNg043417;
	Mon, 22 Sep 2025 19:31:35 GMT
	(envelope-from git)
Date: Mon, 22 Sep 2025 19:31:35 GMT
Message-Id: <202509221931.58MJVZNg043417@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Michael Tuexen 
Subject: git: a16c7286b5c4 - stable/14 - vtnet: deprecate loader
  tunable fixup_needs_csum
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: tuexen
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: a16c7286b5c4c63867626fa9fcfba82d8edec4ba
Auto-Submitted: auto-generated

The branch stable/14 has been updated by tuexen:

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

commit a16c7286b5c4c63867626fa9fcfba82d8edec4ba
Author:     Timo Völker 
AuthorDate: 2025-09-16 21:37:45 +0000
Commit:     Michael Tuexen 
CommitDate: 2025-09-22 19:31:17 +0000

    vtnet: deprecate loader tunable fixup_needs_csum
    
    If this tunable is enabled and vtnet receives a packet with
    VIRTIO_NET_HDR_F_NEEDS_CSUM set, vtnet computes the TCP/UDP checksum
    and writes it in the checksum field.
    This was somewhat useful when vtnet pretended that such a packet has
    a correct checksum and set the mbuf flag CSUM_DATA_VALID.
    But this is not the case anymore.
    
    Reviewed by:            tuexen
    Differential Revision:  https://reviews.freebsd.org/D52546
    
    (cherry picked from commit 5da388d93917f5fa74022960cc65452592f71539)
---
 share/man/man4/vtnet.4 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/share/man/man4/vtnet.4 b/share/man/man4/vtnet.4
index bbe86fa1bf69..4a58822e7095 100644
--- a/share/man/man4/vtnet.4
+++ b/share/man/man4/vtnet.4
@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd September 8, 2025
+.Dd September 16, 2025
 .Dt VTNET 4
 .Os
 .Sh NAME
@@ -84,6 +84,8 @@ field of the structure
 .Vt struct virtio_net_hdr .
 It also marks the checksum as being correct in the mbuf packet header.
 The default value is 0.
+This tunable is deprecated and will be removed in
+.Fx 16 .
 .It Va hw.vtnet.tso_disable
 .It Va hw.vtnet. Ns Ar X Ns Va .tso_disable
 This tunable disables TCP segmentation offloading.

From nobody Tue Sep 23 00:40:58 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cW1P66DdCz67lxw;
	Tue, 23 Sep 2025 00:40:58 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cW1P65hzgz3vn8;
	Tue, 23 Sep 2025 00:40:58 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758588058;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=ynFDYWhOrRL382z2qq7oAFfX4xj+NZ+qNU4TSqQvZhM=;
	b=QwLvQK41sQ9ap2IcSzjxvXcWKxE4bTNvs0CD5XeSw02WMlPdmApKDdIPoV1cCKm9sXu8vw
	LxSRekilFsFMptOTV4xrP/vRJUaiBb++RuMszZK739UgbwMrM+yk2RHKxVbbdXJZTSD6u2
	2IXgqrSa4Xzyqo0Nv+qcTlSQsVKcxySJsxqOsH9LOw+IDiKbI2H1Or1RmsBk3ccSCMF7Bb
	UkYphGOn1iyzzB5fas9JNajKBmcEFr9DtvefjP51IYBDDn2BylUagJF+Y+WKrVPl33VSUx
	GBvFZyS8zAdumwC0CoBim6UEvnUaIC/YDlz+MkmxO3eb9KXc9HnWili7KPRQaQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758588058;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=ynFDYWhOrRL382z2qq7oAFfX4xj+NZ+qNU4TSqQvZhM=;
	b=ZNRwAmehEKLNXMaY5/d7KSsaqMl31Kb1dJibvSn4Qnf0thiIlZup8YKRaNY/YD3rSBVxNb
	fIAVG7rk6SmfCQ0qa/Gonjs55wUNspihAjNrCedfQjAC7pWk5GXeymbkpumFFBc/4gY1oV
	/ZKFRaq+MlPXPbop9lr9b5Cv9X2733LP9fDGBKT+HhuLCDGSwFWze/EoiXqv2NFLJvIhwj
	MmCu5h4qiCiaLvhSd3zDztYqEKUpnzvd/FBLpDbCm3hchA6LQwWWFVxMHksjDMwWnU0uZv
	ud4PsLyopXVJghM5XFRg9fbIg5sGepqYSyDGSlEFyeDP2S/3pAauDiLVJFwyww==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758588058; a=rsa-sha256; cv=none;
	b=W+P4A/yIbPsM8fpb/dWklaCHPi6NFiiSmWtCy3hkXbDNY2MFM1saMJvCQTU50IS0kNJfOe
	HG8qnV5TsDoGlZHikZK4Q/nxXtGuwBClJP7hGq4E9Oi9Kq5GnTaHknIjlOAXdkDjYuqlfj
	xUtieoCTdQx7GxRlAuPi8O/Cju8mYg0ffmKvThgV5Jqqx79qb5lKchLAFc/7lznEbeA/pf
	IDkQBerAboDtHffrnuZRgGtHIWh+oJo4rwCYRZuBrqiRyMGyd5uveF4agYJigH/MWTrP+S
	WKzV6mec5hv775ffAw6FxHWBzoIiJDd6dBSrEY2B0xiPZFKFT7TNnm8iBaK+9A==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cW1P65Hy0z7L7;
	Tue, 23 Sep 2025 00:40:58 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58N0ewHA020778;
	Tue, 23 Sep 2025 00:40:58 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58N0ewRJ020775;
	Tue, 23 Sep 2025 00:40:58 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 00:40:58 GMT
Message-Id: <202509230040.58N0ewRJ020775@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Konstantin Belousov 
Subject: git: 0add74cd82d8 - stable/15 - remote coredump: fully
  initialize coredump_vnode_ctx and coredump_writer structs
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: kib
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 0add74cd82d874b702ba9dcf1fa0097d4c340232
Auto-Submitted: auto-generated

The branch stable/15 has been updated by kib:

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

commit 0add74cd82d874b702ba9dcf1fa0097d4c340232
Author:     Konstantin Belousov 
AuthorDate: 2025-09-19 15:38:07 +0000
Commit:     Konstantin Belousov 
CommitDate: 2025-09-23 00:40:33 +0000

    remote coredump: fully initialize coredump_vnode_ctx and coredump_writer structs
    
    (cherry picked from commit 11205b0854113eae68f725287b8501951d67be0f)
---
 sys/kern/kern_sig.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index da0efac0598d..8efc0886988b 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -2656,9 +2656,11 @@ ptrace_coredumpreq(struct thread *td, struct proc *p,
 		return;
 	}
 
+	memset(&wctx, 0, sizeof(wctx));
 	wctx.vp = tcq->tc_vp;
 	wctx.fcred = NOCRED;
 
+	memset(&cdw, 0, sizeof(wctx));
 	cdw.ctx = &wctx;
 	cdw.write_fn = core_vn_write;
 	cdw.extend_fn = core_vn_extend;

From nobody Tue Sep 23 00:40:59 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cW1P81FbPz67m7v;
	Tue, 23 Sep 2025 00:41:00 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cW1P773sCz3vn9;
	Tue, 23 Sep 2025 00:40:59 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758588060;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=hZCOZzMztTMm8BYZvsCFlrCvgmHIpNxx4SxU9YLGkFE=;
	b=HZN2/UyUciia0/F9J/3o76oR2nh79jUh2EyTvHliUIhG+hidv7INBihIaWyaDW1x9LT0/U
	s1FOPR1kGQ+aMJT8Y+z+9mL71J86+SFS9D0OXzHm1Sq1erNuAJS1CKhkIN+etm7KujM1kt
	AOYTX5gs6OKQLfwi7p8JoEG8csmAlqDTwZMx3xPwZptl2zvhC79ZFVPDJ8OJVN2pl/Hh59
	4mUK/CbJtpNxCi9+m0jlSTxVaiEc6/14WfsOWyB0NpDNZFEFPfmdgMpXWaT6u5sfSvntG4
	4rj1i+74kFfkN2YiiraUHTnKA8qNe7o/6bRyNXahVb6IAINot3H5qUu+kM900g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758588060;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=hZCOZzMztTMm8BYZvsCFlrCvgmHIpNxx4SxU9YLGkFE=;
	b=m2ItAj3ciqSvXaaxm2b9ZxKc4YK6aousm5OrTpV+4olXkndFLXExKgeL5of2JnIHd12Y5c
	oPy/LmHW43SKiDQ19hi4FqxStpU3kQzNExhUePVx/UzsDb1jccH3wXTOKxW/vf30plV8Nh
	CbIFbTgWJ5KRuhTOKOcH0QtQdkdpXdB1eHvz53EJVftOQhUO3LKkMTeKHmLRRhoVfspHl5
	JwOsN8E1Uy+tNayVae46ZVSkPNNxNG2dx5LnVgTI0GikUyJdUtrqH+QATI2CcoGYnXj1uj
	Erf9KcHNByfrB9IrEkxhhN29Pkim8kdpxw4PR1foSgBHXgO6stcU00kanT+jrA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758588060; a=rsa-sha256; cv=none;
	b=Ox2zQLXit4/L6pdk758XF2dm26itAQVtaRAMszDkFFSJhzs+vMKdyZbncLFV0AgmqcLxEJ
	zEd2j7P0kT9d75v250mp43CD77+PBCv4eALnv9pHDygagyGhMh8FbeCuHEJQWtYa2YK29/
	Dgfh5B6vSp3wM+sFzywiMcYUv80J+9iYwMszccf6BTmrpZOWeR6ksFjgrjmM+hApN2HL4U
	x4v5dzzgdhlx1utJK9DqRgvCA93wTEl+q+R1FhXztINxlRTZBIHcFOvF+0fnTIp4vBp4rl
	z2G8Er6GmhrA4mFWSSCEx8HC0RdCUtBvvGR+lIHgGoPPmzUuKZc/4PKKgFICAg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cW1P76BPBz6xK;
	Tue, 23 Sep 2025 00:40:59 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58N0exp3020813;
	Tue, 23 Sep 2025 00:40:59 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58N0exYO020810;
	Tue, 23 Sep 2025 00:40:59 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 00:40:59 GMT
Message-Id: <202509230040.58N0exYO020810@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Konstantin Belousov 
Subject: git: a05c806a78a7 - stable/15 - vm/vm_fault.c: update and
  split comments for vm_fault() and vm_fault_trap()
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: kib
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: a05c806a78a7ad359e607c92d1e1f60c78d51e48
Auto-Submitted: auto-generated

The branch stable/15 has been updated by kib:

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

commit a05c806a78a7ad359e607c92d1e1f60c78d51e48
Author:     Konstantin Belousov 
AuthorDate: 2025-09-16 03:41:55 +0000
Commit:     Konstantin Belousov 
CommitDate: 2025-09-23 00:40:33 +0000

    vm/vm_fault.c: update and split comments for vm_fault() and vm_fault_trap()
    
    (cherry picked from commit 22cce201da76a1916be5c993201f0478f3048292)
---
 sys/vm/vm_fault.c | 42 ++++++++++++++++++++++++++++++------------
 1 file changed, 30 insertions(+), 12 deletions(-)

diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
index 58f8ac16fa0c..22558a12b44b 100644
--- a/sys/vm/vm_fault.c
+++ b/sys/vm/vm_fault.c
@@ -694,21 +694,18 @@ _Static_assert(UCODE_PAGEFLT == T_PAGEFLT, "T_PAGEFLT");
 #endif
 
 /*
- *	vm_fault_trap:
+ * vm_fault_trap:
  *
- *	Handle a page fault occurring at the given address,
- *	requiring the given permissions, in the map specified.
- *	If successful, the page is inserted into the
- *	associated physical map.
+ * Helper for the page fault trap handlers, wrapping vm_fault().
+ * Issues ktrace(2) tracepoints for the faults.
  *
- *	NOTE: the given address should be truncated to the
- *	proper page address.
+ * If a fault cannot be handled successfully by satisfying the
+ * required mapping, and the faulted instruction cannot be restarted,
+ * the signal number and si_code values are returned for trapsignal()
+ * to deliver.
  *
- *	KERN_SUCCESS is returned if the page fault is handled; otherwise,
- *	a standard error specifying why the fault is fatal is returned.
- *
- *	The map in question must be referenced, and remains so.
- *	Caller may hold no locks.
+ * Returns Mach error codes, but callers should only check for
+ * KERN_SUCCESS.
  */
 int
 vm_fault_trap(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type,
@@ -1546,6 +1543,27 @@ vm_fault_object(struct faultstate *fs, int *behindp, int *aheadp)
 	return (res);
 }
 
+/*
+ * vm_fault:
+ *
+ * Handle a page fault occurring at the given address, requiring the
+ * given permissions, in the map specified.  If successful, the page
+ * is inserted into the associated physical map, and optionally
+ * referenced and returned in *m_hold.
+ *
+ * The given address should be truncated to the proper page address.
+ *
+ * KERN_SUCCESS is returned if the page fault is handled; otherwise, a
+ * Mach error specifying why the fault is fatal is returned.
+ *
+ * The map in question must be alive, either being the map for current
+ * process, or the owner process hold count incremented to prevent
+ * exit().
+ *
+ * If the thread private TDP_NOFAULTING flag is set, any fault results
+ * in immediate protection failure.  Otherwise the fault is processed,
+ * and caller may hold no locks.
+ */
 int
 vm_fault(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type,
     int fault_flags, vm_page_t *m_hold)

From nobody Tue Sep 23 00:41:47 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cW1Q40sPpz67mNK;
	Tue, 23 Sep 2025 00:41:48 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cW1Q409Cxz3w6S;
	Tue, 23 Sep 2025 00:41:48 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758588108;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=tceWgFX2Mz8fInTjWJEks6kFR5Mhm2gBcWmKxSziSp0=;
	b=nMY7WNPy4LEv4QDDUHdkyzuVGkdCXibszdpl/Fj3D+8stAjw4lrqeEkzM4ZuvrHG5aft5H
	Q2Z+co1n2LLI21MmFN3WQKvhu5BHtOR4vaBUrHdlFdtKzaIWBzPqy9uGCnVqa5/ZcUbqDN
	MvyvZwy6fd3yDF2HNCpib2IlcvFgB5MhEjtQPKnTVBOe54WgbdVHue1O/wjobx7bgJOwWl
	UzrPrtASxqkgo5jPR4hk5dlRUUOeGnPphiAcOo4qownqNCEXulIU1BfThzKP2cKYyr6l46
	BaQNfEcKgTZdRdHzhFYMcphRqPZL7Ke7tuDuA3/lpSu+Lr8mg6viJdKPLavjmg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758588108;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=tceWgFX2Mz8fInTjWJEks6kFR5Mhm2gBcWmKxSziSp0=;
	b=Dz1sjTKFtz6A9PSgpqeuxdZZi/uysOSExL7//rU2okqR1oK8+h4Lw2xyt29asIgC0sJiqf
	z1ls13VjJiAmjxn04WnRmzppvaIyWusEaWNK9wbxCOjShB8nVVypHWdt43B5ZH+LWdupbT
	vRFqUP5x6U9dhwrXlpwn9CatLTwHZ6egLVYryPUb3MBuUKe9/ScxGVrecj29PKaeIsoAxg
	Jxfly+U43jwDqS1u0UFeIa93Wb0TjakWBVH0TuXy44ftMxbH+tEGqYIysl3q4fpIcoSBRd
	OhK3Yz0tdJm9JW345apKFE0Xqj+QDnc6IzgwRjsfH7cHCDQr0/ydDU1av/5bXA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758588108; a=rsa-sha256; cv=none;
	b=sdHcc/5NHmAAcxGK9qhRGkK7dkhE3FV8q5YKIMbPwAlAh8D+TXnJB9czyZAYVvF1F5JLa2
	4rROgf9ky/yiaRN8IxEjElJhNUoHGEVeQG9WSF/Att4b5dHifsWablam5gEDcN1WYRzWRR
	Fsnrn9wOKgSDpgyvOfRsjVy/BIoOBnjzfzoeLxtdQSVXasc6XVI/XIwS0+lZn3gNF/5GSY
	Gjo/SJyAxDSU9AUILokgVw3fJ3VWlPVbfVyS/PzM158em7ne67yNCZZuV2kdwN9rtOUc/N
	uj8r+1v8TTNe0JMjxW8SdshWAYXHgibYTVT//kZpqcUoixrpRCwQY29b6T/aCA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cW1Q367LHz7XG;
	Tue, 23 Sep 2025 00:41:47 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58N0flVX021153;
	Tue, 23 Sep 2025 00:41:47 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58N0flfv021150;
	Tue, 23 Sep 2025 00:41:47 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 00:41:47 GMT
Message-Id: <202509230041.58N0flfv021150@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Konstantin Belousov 
Subject: git: 4e0d2f1566b3 - stable/14 - vm/vm_fault.c: update and
  split comments for vm_fault() and vm_fault_trap()
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: kib
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 4e0d2f1566b3b588908a098c3ee672a202978a15
Auto-Submitted: auto-generated

The branch stable/14 has been updated by kib:

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

commit 4e0d2f1566b3b588908a098c3ee672a202978a15
Author:     Konstantin Belousov 
AuthorDate: 2025-09-16 03:41:55 +0000
Commit:     Konstantin Belousov 
CommitDate: 2025-09-23 00:41:21 +0000

    vm/vm_fault.c: update and split comments for vm_fault() and vm_fault_trap()
    
    (cherry picked from commit 22cce201da76a1916be5c993201f0478f3048292)
---
 sys/vm/vm_fault.c | 42 ++++++++++++++++++++++++++++++------------
 1 file changed, 30 insertions(+), 12 deletions(-)

diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
index c8ace2b41345..3e4fe7bdae36 100644
--- a/sys/vm/vm_fault.c
+++ b/sys/vm/vm_fault.c
@@ -682,21 +682,18 @@ _Static_assert(UCODE_PAGEFLT == T_PAGEFLT, "T_PAGEFLT");
 #endif
 
 /*
- *	vm_fault_trap:
+ * vm_fault_trap:
  *
- *	Handle a page fault occurring at the given address,
- *	requiring the given permissions, in the map specified.
- *	If successful, the page is inserted into the
- *	associated physical map.
+ * Helper for the page fault trap handlers, wrapping vm_fault().
+ * Issues ktrace(2) tracepoints for the faults.
  *
- *	NOTE: the given address should be truncated to the
- *	proper page address.
+ * If a fault cannot be handled successfully by satisfying the
+ * required mapping, and the faulted instruction cannot be restarted,
+ * the signal number and si_code values are returned for trapsignal()
+ * to deliver.
  *
- *	KERN_SUCCESS is returned if the page fault is handled; otherwise,
- *	a standard error specifying why the fault is fatal is returned.
- *
- *	The map in question must be referenced, and remains so.
- *	Caller may hold no locks.
+ * Returns Mach error codes, but callers should only check for
+ * KERN_SUCCESS.
  */
 int
 vm_fault_trap(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type,
@@ -1532,6 +1529,27 @@ vm_fault_object(struct faultstate *fs, int *behindp, int *aheadp)
 	return (res);
 }
 
+/*
+ * vm_fault:
+ *
+ * Handle a page fault occurring at the given address, requiring the
+ * given permissions, in the map specified.  If successful, the page
+ * is inserted into the associated physical map, and optionally
+ * referenced and returned in *m_hold.
+ *
+ * The given address should be truncated to the proper page address.
+ *
+ * KERN_SUCCESS is returned if the page fault is handled; otherwise, a
+ * Mach error specifying why the fault is fatal is returned.
+ *
+ * The map in question must be alive, either being the map for current
+ * process, or the owner process hold count incremented to prevent
+ * exit().
+ *
+ * If the thread private TDP_NOFAULTING flag is set, any fault results
+ * in immediate protection failure.  Otherwise the fault is processed,
+ * and caller may hold no locks.
+ */
 int
 vm_fault(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type,
     int fault_flags, vm_page_t *m_hold)

From nobody Tue Sep 23 08:31:57 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWCrY4JMWz68JVs;
	Tue, 23 Sep 2025 08:31:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWCrY3nx8z3pDm;
	Tue, 23 Sep 2025 08:31:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758616317;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=hjfvQ3tCVloz9GUu5xzDpPwAZZFs9BPHeNesgh7frNk=;
	b=ZxnVCFIB7msALQQoQnLYczEKHnqCrqFSzD1AOUZrfTcD4OATC83LUGx+UKt2T8fPbupmCc
	vvQDAtrUzW8DTjd7VK/VntOqvyEYajdFutr98IlRONt9JtLfiCE0ngU/a1zuB22k6mt5mq
	DxcJt0oLvf076ZIm4oXH1/Go35s/JxcHuC8upJTJEDS+70E1EXs//bl18rmKFfX+cpOxpW
	RulYfgyofrxV6TiHcMz7oRtgw2EguNwFkOfcYGsU6pBYbfDScqP8XI4xMtr0OcknJ7pGor
	s30h2F1eODKQifbNjItj6t3zp5N0KgDekpp4ZRhB3h9qeCLxzwYCRW0ISj6cFw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758616317;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=hjfvQ3tCVloz9GUu5xzDpPwAZZFs9BPHeNesgh7frNk=;
	b=g2F/ejBxfiT6y55+JhXR+SyQHiUAm1Cgi7eOu1dtyfNEuxKOSK4CZNzTO5zMbrPAeEQ2tU
	87oAk5uSLsJRpG2p0HAhwPXo9sJVUTil1m446aD/NbhsfhoNTp7ZDYQDs0rDEkNNiaATRa
	2MdsT4GpM8QeJA5udkLHHGhr9y7FQQddqdTJtkGIoSFtQvHUqWMytWt44eB9Zb2AwlTnSr
	J0AJHoBNzpYpo9ekAYVmUxF9hGjPgUSCx/1ZfzJON2X+YN6O/An989xgG7vFl03aX6aGB+
	PtLmoplKzuXra/ZjndoceTOG9J3Zo06Dnujk6tYd2vYt0vy+W0mTRf6xdTrpzg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758616317; a=rsa-sha256; cv=none;
	b=dMz8s/MEzvuUAhazOdlXuiQcY/WPExqCafRYqJzBiZ1PRll8TyolLYIOX6GFzLdsSzQMyu
	cvMQ1kWzE92PSzJIZ6i0oWI9eMENgJz1278+d24g0gBr2n/xE6KecQD+Afh1HBuhGkChG9
	PG6W978uF0r39ImqFGizxGU1BhraOmtlXoE8xH6fJ0GJHwOyMaOJu+h76H49C+9ooexpRm
	FO2ZVoc2dOxvEWXZnlYa0JlltFa3faYxIIvoBwTjUMcY1CxH9br+gLAjA47wcoeaZfQOLP
	PTqx+K3Gklq4xLcfsGdS0Qs7Dpnb4eVslS/4MJ6XPSCRYsLw7xZpltbIKu1GdQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWCrY3M9nzfTj;
	Tue, 23 Sep 2025 08:31:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58N8VvqZ010638;
	Tue, 23 Sep 2025 08:31:57 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58N8VvWL010635;
	Tue, 23 Sep 2025 08:31:57 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 08:31:57 GMT
Message-Id: <202509230831.58N8VvWL010635@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: "Andrey V. Elsukov" 
Subject: git: fb4be8661166 - stable/15 - IPv6: fix off-by-one in
  pltime and vltime expiration checks
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: fb4be8661166e18afa4b10921f7d5fbd22460390
Auto-Submitted: auto-generated

The branch stable/15 has been updated by ae:

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

commit fb4be8661166e18afa4b10921f7d5fbd22460390
Author:     Andrey V. Elsukov 
AuthorDate: 2025-09-16 07:34:55 +0000
Commit:     Andrey V. Elsukov 
CommitDate: 2025-09-23 08:31:12 +0000

    IPv6: fix off-by-one in pltime and vltime expiration checks
    
    Previously, the macros used '>' instead of '>=' when comparing elapsed
    time against the preferred and valid lifetimes. This caused any deprecated
    address to become usable again for one extra second after receiving each
    Router Advertisement. In that short window, the address could be
    selected as a source for outgoing connections.
    
    Update the checks to use '>=' so that addresses are deprecated or
    invalid when their lifetime expires.
    
    PR:             289177
    Reported by:    Dmitry Nexus 
    Reviewed by:    zlei
    Submitted by:   Marek Zarychta
    Differential Revision:  https://reviews.freebsd.org/D52323
    
    (cherry picked from commit 588a5fad3e8b98955b60707e3e92b8b43566e3f7)
---
 sys/netinet6/in6.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h
index 1ca846ebf514..67c3ccbb1be8 100644
--- a/sys/netinet6/in6.h
+++ b/sys/netinet6/in6.h
@@ -358,11 +358,11 @@ extern const struct in6_addr in6addr_linklocal_allv2routers;
 
 #define IFA6_IS_DEPRECATED(a) \
 	((a)->ia6_lifetime.ia6t_pltime != ND6_INFINITE_LIFETIME && \
-	 (u_int32_t)((time_uptime - (a)->ia6_updatetime)) > \
+	 (u_int32_t)((time_uptime - (a)->ia6_updatetime)) >= \
 	 (a)->ia6_lifetime.ia6t_pltime)
 #define IFA6_IS_INVALID(a) \
 	((a)->ia6_lifetime.ia6t_vltime != ND6_INFINITE_LIFETIME && \
-	 (u_int32_t)((time_uptime - (a)->ia6_updatetime)) > \
+	 (u_int32_t)((time_uptime - (a)->ia6_updatetime)) >= \
 	 (a)->ia6_lifetime.ia6t_vltime)
 #endif /* _KERNEL */
 

From nobody Tue Sep 23 08:33:14 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWCt24y3Nz68JTF;
	Tue, 23 Sep 2025 08:33:14 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWCt22tq9z3qGx;
	Tue, 23 Sep 2025 08:33:14 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758616394;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=bPu8nOnsXnGgtGLDOJt/bq6ScHFjqm30ASZUNOFmRuM=;
	b=d4uLxCEVyJKgVLtpM0SevU99GY/pa2+ibnXllrYVBOoRPFdS2C/QoJ7ReqlBIOJQkeV6WQ
	Gj7IYUO2lXAPSES+S6DSE5UcpXbLNWGeWYUtM4UO7In0x9rsJPtWBK5yJsI/2WiHlnsnkM
	5oueLPg1dxOHbPg9ZHMEFcqTbT5FI/bYawatSCPVOb6LF7zUUlHM7hMSpXafFQZSsqQW9S
	mIfMFWIA5wEQKcWfMewnq5Yl7N+/IgaAswE3ggkbBJ9ZexrxYRStZSoB/gWL1Y/HTYDYgM
	dsHQ8f+HNqCv+k/9QXJUOYokVAwfESkcd4sV6QO+18AYa491pEbINnPkZCpQ8Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758616394;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=bPu8nOnsXnGgtGLDOJt/bq6ScHFjqm30ASZUNOFmRuM=;
	b=FrCwmX/nReZnYAhIVS5yGWaQj2v/8362V0Vymy1MPfxBu3GkIfO4r+ZvHh0NYX8oPL8w4s
	eXC6QBVLLxp0G0UxblIKTpYdXeHVCyOVs4HkJVU2PRNQXzV4jEGNd70EqQQ8DeZ50p/XjC
	vR8mZtUyDYz8C7uESODeIcpRCho9azM1qHy7UKtxFNORoslpnSeco8N1vsR6LQaq3/Q8sk
	N2ugauWg3Nn7glnCpdAF476tvkVYKld+ns2sVA0bKNRY9izlfhlFmegpu2ySqKnxraJee2
	XKn6zojhVXbgr5uuZG0nZqA/NFjJtiBhok4B32sL2zoCQcMbA7bxjGd2pAX22Q==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758616394; a=rsa-sha256; cv=none;
	b=yLeK7vsIzIwhkHQS3VTp4WtPVRu0Qwthxr5tSrYsvJz/KBKd5YW7yEMoMkYgxlhYMmo3xF
	+1y2uz0ejRTILTgyV7YkblV7J9EXHBMwfIkPdEIuufLAMKrVRjHI73X5nhZ7BQyX+5XK6V
	/d1qAV5+4UGS+Cda7U85pw/eYhne57tCYSmUFtPm2cq2WNSyWTVlEVcNXqe0KBRP32Nr+V
	1Vn8QDYIJm4qYTMhOEbE+QUdO0quz+JIYHMdyjGLBSFQ0HA8J+TmEI0aEr0jZhXQI6oTPY
	4G1cQb/eXTP3nIY2lrLJN7DsuWkia/2pHX5WA2dmB7qNx+5FvrbJoPbOuSdlgQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWCt22VQfzf1B;
	Tue, 23 Sep 2025 08:33:14 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58N8XEY4012174;
	Tue, 23 Sep 2025 08:33:14 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58N8XECH012171;
	Tue, 23 Sep 2025 08:33:14 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 08:33:14 GMT
Message-Id: <202509230833.58N8XECH012171@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: "Andrey V. Elsukov" 
Subject: git: 586183128f2f - stable/14 - IPv6: fix off-by-one in
  pltime and vltime expiration checks
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/14
X-Git-Reftype: branch
X-Git-Commit: 586183128f2f04b84a9a564f83289963671f0ff2
Auto-Submitted: auto-generated

The branch stable/14 has been updated by ae:

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

commit 586183128f2f04b84a9a564f83289963671f0ff2
Author:     Andrey V. Elsukov 
AuthorDate: 2025-09-16 07:34:55 +0000
Commit:     Andrey V. Elsukov 
CommitDate: 2025-09-23 08:32:45 +0000

    IPv6: fix off-by-one in pltime and vltime expiration checks
    
    Previously, the macros used '>' instead of '>=' when comparing elapsed
    time against the preferred and valid lifetimes. This caused any deprecated
    address to become usable again for one extra second after receiving each
    Router Advertisement. In that short window, the address could be
    selected as a source for outgoing connections.
    
    Update the checks to use '>=' so that addresses are deprecated or
    invalid when their lifetime expires.
    
    PR:             289177
    Reported by:    Dmitry Nexus 
    Reviewed by:    zlei
    Submitted by:   Marek Zarychta
    Differential Revision:  https://reviews.freebsd.org/D52323
    
    (cherry picked from commit 588a5fad3e8b98955b60707e3e92b8b43566e3f7)
---
 sys/netinet6/in6.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h
index b62da99f9293..04af972abf9f 100644
--- a/sys/netinet6/in6.h
+++ b/sys/netinet6/in6.h
@@ -360,11 +360,11 @@ extern const struct in6_addr in6addr_linklocal_allv2routers;
 
 #define IFA6_IS_DEPRECATED(a) \
 	((a)->ia6_lifetime.ia6t_pltime != ND6_INFINITE_LIFETIME && \
-	 (u_int32_t)((time_uptime - (a)->ia6_updatetime)) > \
+	 (u_int32_t)((time_uptime - (a)->ia6_updatetime)) >= \
 	 (a)->ia6_lifetime.ia6t_pltime)
 #define IFA6_IS_INVALID(a) \
 	((a)->ia6_lifetime.ia6t_vltime != ND6_INFINITE_LIFETIME && \
-	 (u_int32_t)((time_uptime - (a)->ia6_updatetime)) > \
+	 (u_int32_t)((time_uptime - (a)->ia6_updatetime)) >= \
 	 (a)->ia6_lifetime.ia6t_vltime)
 #endif /* _KERNEL */
 

From nobody Tue Sep 23 12:03:23 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJXW2Hx1z68Xgk;
	Tue, 23 Sep 2025 12:03:23 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJXW1fDpz3DNj;
	Tue, 23 Sep 2025 12:03:23 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629003;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=H9taNOr/3F5neouQBFfe/Lf7Nx5TFQnQwGGOby3w0fk=;
	b=ETU/lx0T/8jB83F7WpcRfytOrHNiDzD15UO5bTggxA23egmmDBZ80GyfwykpysuG0Rwk/j
	AapPAgDc4CbeebP9aaXJzdO9Qc9F3FWMKz0Iw53XLq3gyaOScL72NdSo17Q5nUE/p9fnAJ
	Z0+Cfkfn/X723kvWFIbZgMF0eBq9yyE0nTMe+ojh7bMtvsD4/yDYtinQHMWyerbqHConSc
	y2Cx6DQtpAqk5wyNKWmQEQj3skw6tt3rl4AAux0jtZeOJ4brgmGzP0UBoKX8X5zIAPDXlc
	iIanmH87pGgF/s7m/UAAclXNb4RBZwd+8nfUW6qInd8hSHls48PGasX3UldNcg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629003;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=H9taNOr/3F5neouQBFfe/Lf7Nx5TFQnQwGGOby3w0fk=;
	b=aCcJaaNeo0xh2i0qQbKBTtEvdw6q4GzJq54ZJdxaqYWmYKQoO4z2cmxeE1wwKSnPsa/bPm
	mxr6E3RIlkC08z9ChIf9baMSAnUMARjPXxTg22TpDZBbmDL4LILcXEH9cQ5lJ4PZgo6xKy
	jpgTyRoGhA/3VdwYOezfbUKuww6RJ1iMyQ1Jm3b+knvrPW3cUWKH3emB3ZXNCA837z9/N3
	2WpV8AncoYLxxMTFb5SXq08qtRL7+OoQa5gt4RiRbv4rM7qTQrVnNx1WIsOLobCJYtujbS
	Jya6bErDdXj4U02QOjSDsCFfKzckb58Bt3Wkin1nwNWgjXAA9k3k9UV7VhUhRQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629003; a=rsa-sha256; cv=none;
	b=EUJwzRGsejr+pyWWsiMzLbI6tfp2kfaCVFu2qtamoyUjG50NhZADG3V+v72cTskhUhYNhy
	8JwZoip1v/ut/S0Z2bdtH/n8QmFRPpoCXpcGNsJOKg0uzN3KnLOyxwb/ngmFaSiClEA7pq
	TmvxP6dqJqxVRcgyjOxOJg0yjCPjEn8cTuualigFTuj+gJ7Kj+XCMNsp6UfFk1nQtfTUxr
	WeHAuNNE+qor7EzTDE8NZZvMYpQyRFGa6xwQ33nMf9m1sLCTpbow7vpc0OvoQee9vZ7SlY
	t5NCR2/GSNekfTuo0Q/PgrjENqeoAOobjgIZO9H8LqQb4BYWTVFdMUUdKljCDA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJXW0zG3zlfN;
	Tue, 23 Sep 2025 12:03:23 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3N76008121;
	Tue, 23 Sep 2025 12:03:23 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3NmH008118;
	Tue, 23 Sep 2025 12:03:23 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:23 GMT
Message-Id: <202509231203.58NC3NmH008118@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: f049b71c24c7 - stable/15 - libc: compat.h: Remove a
  superfluous blank line at end
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: f049b71c24c70e5edcb4c3a58c38c895926a590a
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit f049b71c24c70e5edcb4c3a58c38c895926a590a
Author:     Olivier Certner 
AuthorDate: 2025-09-15 16:54:23 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:35 +0000

    libc: compat.h: Remove a superfluous blank line at end
    
    No functional change (intended).
    
    MFC after:      5 days
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit 580d2d429598e6eb3549f9ea7490d10e19904f7c)
---
 lib/libc/include/compat.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/libc/include/compat.h b/lib/libc/include/compat.h
index 97f22607ddd7..630ffe7daae3 100644
--- a/lib/libc/include/compat.h
+++ b/lib/libc/include/compat.h
@@ -80,4 +80,3 @@ __sym_compat(setgroups, freebsd14_setgroups, FBSD_1.0);
 #undef __weak_reference
 
 #endif	/* __LIBC_COMPAT_H__ */
-

From nobody Tue Sep 23 12:03:24 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJXX3pGDz68Y94;
	Tue, 23 Sep 2025 12:03:24 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJXX2fRbz3DJY;
	Tue, 23 Sep 2025 12:03:24 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629004;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=FhR+5FqpwUT45CmOo1jifAhQKI1EwmCvgymk8qNHq2I=;
	b=QuJEqjcButo9Wl1jGRAgsw836I45E5hYY5+wigiJwcAEhaiNQkuO5m5sTDX4ZNJTaVyo+t
	hW3tPGiArx2XGkH+vfbb29uMiY6ateraG/MwzxjfsvgPU4ObCJhPbTct++aLTIvUzmC6Mh
	PA7JDKpyjies5t2smKG60JtQQW3M/onvMeGspUA6WhryYytI+zGbBwqqR2FKmPfKYzKO67
	OCPkN6tAm2F18aymA8nY4g9FdEl869SdW9pQend/1cx5NTO+SjgdqF2wyncdbJVOYHw8/J
	MxlZA9f/jPSc2KsqPXh5I4azVA6iKvTZmh+PJHRu6v+WsnM1kVmIQHrJPHkAbw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629004;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=FhR+5FqpwUT45CmOo1jifAhQKI1EwmCvgymk8qNHq2I=;
	b=FwZOhxNh1IMbZ13MFMmlF/TyYgl/ugoWfZ8gXd1Vsi+Er9bFoiaFUxnNkPvld5ty2yrudq
	jyr5zhKFasr4PgkWWmIRSvnaUMNNe06JPqnZ0gFXY50szRA1nNioJQK5hDBtUpQGqLh/Uo
	6PBrvXPKcuTtxe1EgMjShrOUhRPYceEJXiJz1iGF/bWxO+oYh/1cJfUis98VdCYtA9nNHL
	K3Ar2W3bW3cKajnUY6h0GZV1VFsyMY9daNRB+J64JmFCNN558lih3mJAgbERpIneYqZhUa
	r/h2UmLY4PiGaJMLhzsbbDxg5iDaVWmfJNEgs1KnVdZXR0QIPVQgjHpcnVsDag==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629004; a=rsa-sha256; cv=none;
	b=iqteYacvSsobaete/ZTZH7X07ZownO9uQ/D+zHEPq4Uo3atobdsn8UzltAc7uXMr54DmK8
	JqaQ0mivZPEFtW49tm5V4gGd+lPctLPMCw36pv5Vrh87Q5+pLV6b7EZmg8BsgCeGJsoQnX
	3jj8h8WBCScHcP6S+atTmT6eUAqtmij9OLwqrnsb/Y9oCNL3yHf4xlTqKKbE3QJBhdnGED
	qnPB69tbIE0Y8huuAuFJngNYFurTkhF5Yb+AdKP2TPnDl0QNyb/7P86Q/3rZPXc91sjByt
	TkePIKd5cldg81AN9BOiB/0dOo+ki7QRavtD/rRDmfB2Nibimz234xu7bBnV5w==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJXX2FjJzlw4;
	Tue, 23 Sep 2025 12:03:24 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3OVN008154;
	Tue, 23 Sep 2025 12:03:24 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3Ojt008151;
	Tue, 23 Sep 2025 12:03:24 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:24 GMT
Message-Id: <202509231203.58NC3Ojt008151@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: cd7ed5b7b605 - stable/15 - dtrace: Fix effective GID
  shown by 'curpsinfo'
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: cd7ed5b7b605249aef71ca6fea02dee0f6b0e82b
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit cd7ed5b7b605249aef71ca6fea02dee0f6b0e82b
Author:     Olivier Certner 
AuthorDate: 2025-08-28 13:46:18 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:40 +0000

    dtrace: Fix effective GID shown by 'curpsinfo'
    
    Reviewed by:    emaste
    Fixes:          be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]")
    MFC after:      5 days
    MFC to:         stable/15
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52274
    
    (cherry picked from commit e4cc7f9930573daeb7f1056d008e424aa4c3fd33)
---
 cddl/lib/libdtrace/psinfo.d | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cddl/lib/libdtrace/psinfo.d b/cddl/lib/libdtrace/psinfo.d
index c0cd5b121064..8dc27e812965 100644
--- a/cddl/lib/libdtrace/psinfo.d
+++ b/cddl/lib/libdtrace/psinfo.d
@@ -55,7 +55,7 @@ translator psinfo_t < struct proc *T > {
 	pr_uid = T->p_ucred->cr_ruid;
 	pr_euid = T->p_ucred->cr_uid;
 	pr_gid = T->p_ucred->cr_rgid;
-	pr_egid = T->p_ucred->cr_groups[0];
+	pr_egid = T->p_ucred->cr_gid;
 	pr_addr = 0;
 	pr_psargs = (T->p_args == 0) ? "" :
 	    memstr(T->p_args->ar_args, ' ', T->p_args->ar_length);

From nobody Tue Sep 23 12:03:25 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJXY6LJnz68XkM;
	Tue, 23 Sep 2025 12:03:25 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJXY36BFz3DTc;
	Tue, 23 Sep 2025 12:03:25 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629005;
	h=from:from:reply-to:subject:subject: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/ouskvizrLORKu9SaEU2eoLkEWi5bL2CvWGRLlmZSU=;
	b=ZYSQ7ownFJVxLzteVrURSAtzFni0KryXTmJ06KWt1hvKF78TSMZD6viAGk68I7HBLByXv1
	djfj02G0vnPAlR4jAk/rpOnGNqvEwtSlcGDipY+cWhXKj2V6wrtsZxNDZDWnh1hsoDQtHM
	XJLPDs032fNr9Pg/UG0u719cROtDKrcyMJGHl2/LyhXyYIXvR4oK5L39gbeBcLh/f+HKNU
	lyNtS1W+3NmkbtymfVEq9dSE2DIGsuKB2WGRJxRdCndgNY3a4S/b/qpf6ljfTTIy8f6eFe
	Y0hNzfEZGvP08c+ENCuGqGkNBz7diPxPjQ+ULkEb4nWv7A/nc9AZn9lDRshcOw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629005;
	h=from:from:reply-to:subject:subject: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/ouskvizrLORKu9SaEU2eoLkEWi5bL2CvWGRLlmZSU=;
	b=UPUlHwxuLhuG+qJaxK1WHzTqe3nSN1FwjVnbTj1/zXXacq7Uer6JCfoGmnvqYts/OI7xQP
	rKrMc3L0OozN6lbq9APnjUUgWVkYaRA4xPHDe1ZskDeqHmIT3JIvA8EJCg0HlTYL+WZdpC
	RpwoqbLbgsdhPVdD/ose//mYLhOUpPW0Q9wBfRLVCUS4QaE+wwI3QaE5vyFZrDH3vgZDXC
	FCznoeJCzyUKXYE3CDYpxEdQiJJDx0PILjB3JFU7PGycOvQgDmRiHc0C68/d9SXWLcLxEz
	WI/etVfBI/CDJCZFrvQ1jskFUBAJuIaaZ/gy5l060/Bz0Z7c/aWsgfBJGv9Hhg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629005; a=rsa-sha256; cv=none;
	b=fo6WweIQHMRAmQSrJYyYLgypckOYkF5kfWnUD7OtcJmFooM16STvRHXH6hV9ujj2cnZFhP
	hjGMXwkQz/fGygpjdPqnvHiQskpEof9+JLSW2skwMCj3StwqDzPRIqr7yzwcOorSJlUfWO
	AcZevfAGIb34LrqkqnAk2ECbFfco0iYclx3QKoOldKJZYIYbcu2fxhU+JGXc9ydyrNkOFO
	/Tbc4nwxlv8L4sr/aBeLAAJKLj7jnqw4fSJE9IQYdaVhfhayObeHFYMWIZCyJumwDbQ0VV
	XAi1bKZOqwyjlXYEBlY2+sLUVEEUQjRQLTBB0hIV9MkNeYvqXs3VJ2IXrQweqg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJXY2TzWzlcg;
	Tue, 23 Sep 2025 12:03:25 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3PqU008193;
	Tue, 23 Sep 2025 12:03:25 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3PLk008190;
	Tue, 23 Sep 2025 12:03:25 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:25 GMT
Message-Id: <202509231203.58NC3PLk008190@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: d36c8416e7ed - stable/15 - libprocstat:
  procstat_getgroups_kvm(): Output again the effective GID
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: d36c8416e7ed6d02fd85dada19b40defc2a0f9f1
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit d36c8416e7ed6d02fd85dada19b40defc2a0f9f1
Author:     Olivier Certner 
AuthorDate: 2025-08-28 14:49:07 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:40 +0000

    libprocstat: procstat_getgroups_kvm(): Output again the effective GID
    
    In particular, fixes 'procstat -s -M' (for processes with more than 16
    groups).
    
    Reviewed by:    kib
    Fixes:          be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]")
    MFC after:      5 days
    MFC to:         stable/15
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52275
    
    (cherry picked from commit 11cbb7d122ac0219c214ad52c4d6f7cbb9d60ac1)
---
 lib/libprocstat/libprocstat.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c
index 1651cbc6820f..df77cabcd36b 100644
--- a/lib/libprocstat/libprocstat.c
+++ b/lib/libprocstat/libprocstat.c
@@ -1973,6 +1973,7 @@ procstat_getgroups_kvm(kvm_t *kd, struct kinfo_proc *kp, unsigned int *cntp)
 	struct ucred ucred;
 	gid_t *groups;
 	size_t len;
+	unsigned int ngroups;
 
 	assert(kd != NULL);
 	assert(kp != NULL);
@@ -1990,19 +1991,22 @@ procstat_getgroups_kvm(kvm_t *kd, struct kinfo_proc *kp, unsigned int *cntp)
 		    proc.p_ucred, kp->ki_pid);
 		return (NULL);
 	}
-	len = ucred.cr_ngroups * sizeof(gid_t);
+	ngroups = 1 + ucred.cr_ngroups;
+	len = ngroups * sizeof(gid_t);
 	groups = malloc(len);
 	if (groups == NULL) {
 		warn("malloc(%zu)", len);
 		return (NULL);
 	}
-	if (!kvm_read_all(kd, (unsigned long)ucred.cr_groups, groups, len)) {
+	groups[0] = ucred.cr_gid;
+	if (!kvm_read_all(kd, (unsigned long)ucred.cr_groups, groups + 1,
+	    len - sizeof(gid_t))) {
 		warnx("can't read groups at %p for pid %d",
 		    ucred.cr_groups, kp->ki_pid);
 		free(groups);
 		return (NULL);
 	}
-	*cntp = ucred.cr_ngroups;
+	*cntp = ngroups;
 	return (groups);
 }
 

From nobody Tue Sep 23 12:03:27 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJXc2mBcz68Y9C;
	Tue, 23 Sep 2025 12:03:28 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJXb4rl0z3Dd0;
	Tue, 23 Sep 2025 12:03:27 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629007;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=+1GWqzi125gLd0cfRkLLk0ZYU+SArOO6Gy4F7qkZYg8=;
	b=taHP89G9aJ8KxTz4Dav2OxBbY0W0EQArGHieMT2VkEKFkeptP9zC0Jb9tFRSzWjT+Se8to
	SINhj/t/0F+1lG3YBMkKMhJcBzC4qUPNFNOSC5/4eSwYlWkt/lzniSDQPFxfsEE79CLAPz
	dwHTzSbRoHB6OjmxZpoPh1xqlv1Vr4cbPVl5vEkT1Chu2WmVbMaQGLZaNY5YJnK+++DUGm
	48nmvNvQyTo0lx3aSFXM9Ph+vAbFx0MDHr0bdWWPtX1wl7qscsx3oocw929j6duV2WcL5O
	Kvk6MWe53MndNHDiPo1Xq3UfasD1WZeX6SKVsaHRj49fmpJktn+d+Rb1KejVmg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629007;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=+1GWqzi125gLd0cfRkLLk0ZYU+SArOO6Gy4F7qkZYg8=;
	b=FmUrj67D9+YSX8LcN6Wftqub0s7q1v0SU9e7VaI2zZA9rXi+6Ja5HeY+V4R7VEl/G7Xa+t
	XS8XPlrUG5atSHZTCJ4ak24zhuZqnfd5oYFR4P1qLjnq886RlSIODenfSrv5bkZ4RKIpeL
	5DRhW148bEXoCRtEqPhzK+FgE2LLB3NJvCoUtuoT95oNqVaBIwoPZv5KvHmmRJpk/olv4A
	pv4cJOkQfXV/5GQuyNttfp1DubTxWXCyoCGMfw7ftf95q8rA57sHfGIjvvKVFNibe7hjI0
	T1USPS+5lM44M6qfxgC8yofDOlfGqBEDGJzR64VA6J/kkef+yNNQg/TKJvpclw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629007; a=rsa-sha256; cv=none;
	b=nuuYLv/wvtpzmCT2bgEz+2E42rSh8VXR7umv11+jkxwD7Ngy1bGeya8N4mdp/T6a8Pblje
	hoWMkQPGqi6yMqwSUnhs+2/SltLvOGf2WKT4WdHgLolZMI7uJ5GKOqRRw4zXoSaJhyxqeS
	PxsWOMO/v/D7wY7NwJ5NegkVjHz/fSnnNQXDYBi17OkCacGKkhHCmWfDi6XDpTz/8zJr6E
	zWTWDEaWnKGgE1hwwRfM5ekq8/VRKIxMQTsPLQQM1amgCLpEtougmQLzPBKDFWPk0OSZOz
	5PB49bzQvdjT5uEj/+fx+Wa9BIk+FN+5yjagbEnYcisd94eFkk07M1v9C6Ux9Q==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJXb4QNCzllS;
	Tue, 23 Sep 2025 12:03:27 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3RVw008260;
	Tue, 23 Sep 2025 12:03:27 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3RQf008257;
	Tue, 23 Sep 2025 12:03:27 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:27 GMT
Message-Id: <202509231203.58NC3RQf008257@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: 97e7c06af75e - stable/15 - fuse: Fix GID when sending
  FUSE_INTERRUPT to a FUSE daemon
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: 97e7c06af75ef7899b925027ee779c9ee50de208
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit 97e7c06af75ef7899b925027ee779c9ee50de208
Author:     Olivier Certner 
AuthorDate: 2025-08-26 12:39:16 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:41 +0000

    fuse: Fix GID when sending FUSE_INTERRUPT to a FUSE daemon
    
    Due to the partial-only changes of commit 46c07316f906 ("kern: adopt the
    cr_gid macro for cr_groups[0] more widely"), subsequent commit
    be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]")
    caused a mismatch between filling cr_groups[0] in 'reused_creds' in
    fuse_interrupt_send() and reading 'cr_gid' from it in
    fuse_setup_ihead(), with the consequence that the kernel would send
    a FUSE_INTERRUPT message to the FUSE deamon with an uninitialized GID in
    its header (which, besides being wrong, would disclose 4 bytes from its
    stack).
    
    Fixes:          be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]")
    MFC after:      5 days
    MFC to:         stable/15
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52255
    
    (cherry picked from commit d22592cd6fd2d39432add376dad460a66488a846)
---
 sys/fs/fuse/fuse_ipc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sys/fs/fuse/fuse_ipc.c b/sys/fs/fuse/fuse_ipc.c
index a751c09159ff..7f754ab7f1d4 100644
--- a/sys/fs/fuse/fuse_ipc.c
+++ b/sys/fs/fuse/fuse_ipc.c
@@ -193,7 +193,6 @@ fuse_interrupt_send(struct fuse_ticket *otick, int err)
 	struct fuse_data *data = otick->tk_data;
 	struct fuse_ticket *tick, *xtick;
 	struct ucred reused_creds;
-	gid_t reused_groups[1];
 
 	if (otick->irq_unique == 0) {
 		/* 
@@ -237,8 +236,7 @@ fuse_interrupt_send(struct fuse_ticket *otick, int err)
 		 */
 		ftick_hdr = fticket_in_header(otick);
 		reused_creds.cr_uid = ftick_hdr->uid;
-		reused_groups[0] = ftick_hdr->gid;
-		reused_creds.cr_groups = reused_groups;
+		reused_creds.cr_gid = ftick_hdr->gid;
 		fdisp_init(&fdi, sizeof(*fii));
 		fdisp_make_pid(&fdi, FUSE_INTERRUPT, data, ftick_hdr->nodeid,
 			ftick_hdr->pid, &reused_creds);

From nobody Tue Sep 23 12:03:26 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJXb13mVz68Y40;
	Tue, 23 Sep 2025 12:03:27 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJXZ4kG4z3DBF;
	Tue, 23 Sep 2025 12:03:26 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629006;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=HtXp5C0vOAJt1yCbyDDzm4yOClsO7kpMekRkogbzto4=;
	b=sF8nWO5DsfcPN1xw8qN18wikWe8ZDi4uZ/FAOuKrz08GsNOQ4cBtc4lH4rjrSCVsMDHk2l
	dZ4AhzhLYWepOI14KMAfVf/seeBqxj28/eVGR9rx766wwsfmRJj76uRRrTMFd5Mq2gVVgb
	Vnym3pkOQgeyHmSgPEfnxYH4qoYuLYSjzQCTKyhgx8r9o9vDOwVWREMEZklb01tq0MQvL/
	2zWFLuv+CBWmgnEfrrZOnwUxWx+WIIfmDo2aAtE0KQGT/lnPm4Wcr8d3my2oR97uXSg8L2
	AN7THDOwasWONdsl9QFVKALyIsn3H5YBDkSkvSUc1J8I2IZ57b2s7Ex3gm6JIg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629006;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=HtXp5C0vOAJt1yCbyDDzm4yOClsO7kpMekRkogbzto4=;
	b=VXhlumbKqruEren9PLjSLd3/w3/dqEcPSX8W4F1vPYqPSx+IGg7xdXm2ZFMuPt4FR3wncH
	0TOAvkIx+8dkQqHNEEHtfpWpFf5UkfzwlVauxRSq966vrK+RFYre1F4R+lDBGtt8skTrOE
	PXiK6VKfBTsVzf9k13YW+VeFbfQgZcReuk/6emayEGChkoW7nzyqO2sdzw2C+Us9xCJJ7B
	10G0RB1slyNd0IoF+y0m555xLScXPxYrhuFlt7KpN16Ud4lK6tECdarbqzI23qgTDuuRJk
	2SbPDLUf1+omHBQsuGoODm/uBS4nTTvTh4CSO1EBrvH6eyqSmxJ0neysk0EczQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629006; a=rsa-sha256; cv=none;
	b=OptGIubvr3FuMf5aOuXRvYD1NWfFPdQXPhBzSjiJr9rj3++pihtvQ0wTy3gg68bCZ1vjsj
	lPDYCiCc4aiYzBGf5geRSE/VWcGVynUFV/ch62vfccMJVeHnPJ1Ms4lJVDQzyfwcVEESdD
	0GMPOxc+6ORK+g60pjsSLNzQp1wLFUP18qiAgLf0vdatKznABodgm9A28/cGfiyybgtAYk
	lIiDtoB1odFmLEDvhhi9fLMW7yMIp4uTDi9NqrMDI+E+dM2iu5CTTCSAevWgKWIxXVxM0a
	LxHzUfuJZrvH59de7Bb6h5Ua+MrgzCjRoJ0Bii6q6jskIkht9PJAxnbG5XXADw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJXZ3lJdzlqc;
	Tue, 23 Sep 2025 12:03:26 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3Q8p008227;
	Tue, 23 Sep 2025 12:03:26 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3QRE008224;
	Tue, 23 Sep 2025 12:03:26 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:26 GMT
Message-Id: <202509231203.58NC3QRE008224@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: 052d8f6acf46 - stable/15 - unix: SCM_CREDS: Restore
  passing the effective GID
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: 052d8f6acf46843bd672f44ff2a09497408eed57
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit 052d8f6acf46843bd672f44ff2a09497408eed57
Author:     Olivier Certner 
AuthorDate: 2025-08-26 17:01:03 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:40 +0000

    unix: SCM_CREDS: Restore passing the effective GID
    
    cmcred_groups[0] in 'struct cmsgcred' must be the effective GID.
    
    Note that the code in unp_addsockcred() filling up 'struct
    sockcred'/'struct sockcred2' (LOCAL_CREDS/LOCAL_CREDS_PERSISTENT
    options) was in fact "wrong" before 'cr_gid' was moved out of
    cr_groups[], in the sense that it would transmit the effective GID
    twice, both separately as 'sc_egid' and as the first element of
    'sc_groups'.  It is now exact, so is left unchanged, which causes
    a difference in output (the effective GID is no more in 'sc_groups',
    unless it is also a supplementary group) that is unlikely to affect
    applications in practice.
    
    Reviewed by:    glebius
    Fixes:          be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]")
    MFC after:      5 days
    MFC to:         stable/15
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52262
    
    (cherry picked from commit c5e920e49c0cf068da3962688cc60ab514ea1252)
---
 sys/kern/uipc_usrreq.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index 6138e543fae7..340d84666459 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -3667,11 +3667,14 @@ unp_internalize(struct mbuf *control, struct mchain *mc, struct thread *td)
 			cmcred->cmcred_uid = td->td_ucred->cr_ruid;
 			cmcred->cmcred_gid = td->td_ucred->cr_rgid;
 			cmcred->cmcred_euid = td->td_ucred->cr_uid;
-			cmcred->cmcred_ngroups = MIN(td->td_ucred->cr_ngroups,
+			_Static_assert(CMGROUP_MAX >= 1,
+			    "Room needed for the effective GID.");
+			cmcred->cmcred_ngroups = MIN(td->td_ucred->cr_ngroups + 1,
 			    CMGROUP_MAX);
-			for (i = 0; i < cmcred->cmcred_ngroups; i++)
+			cmcred->cmcred_groups[0] = td->td_ucred->cr_gid;
+			for (i = 1; i < cmcred->cmcred_ngroups; i++)
 				cmcred->cmcred_groups[i] =
-				    td->td_ucred->cr_groups[i];
+				    td->td_ucred->cr_groups[i - 1];
 			break;
 
 		case SCM_RIGHTS:

From nobody Tue Sep 23 12:03:29 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJXf2vn5z68Xgm;
	Tue, 23 Sep 2025 12:03:30 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJXd6zzjz3DPy;
	Tue, 23 Sep 2025 12:03:29 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629010;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=KRGEzeVUj1Fz1Pyw77HeAlBA93SMS6J8KQ3rVN5f9ms=;
	b=G4t74vCvRAxld5u3sT4yJr2K3jfoxFmtudQOBISS2eGe0ec7JfC9K1C2LboL3R/MKCjoGv
	iMTHwawMe5NXuFlglgyLnitdAqYxSwQl/rnqNElklZwQtYGJoakz9Or62E5FlAiALwB/Ud
	xF6Ym+jjnHYuPUIz2+5LQ1fes7hW9ofJsO3Qty7BMiIDrg8X9GlTPRNP7vPQ4f5G7IN2f+
	sWAkuHJdpdrNsZlgzfuNQx7n42OMyCmW+Rd4/pP3IbqCXX9zeFi1cE3OKCEws1j/LCD8Vx
	rKeAhlGSTatNIgoF2YTkqlQgOXApG7KjsTTC7ELJ9SurkdUZVINu8fQrMufxew==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629010;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=KRGEzeVUj1Fz1Pyw77HeAlBA93SMS6J8KQ3rVN5f9ms=;
	b=KdDf6BYJOXQ6Aig3ad6nTGFPdU3xxNDfDdEWVQrC82+mpZeDV7pIsg80IPTH1DwIKJP2Mp
	nO95By5zNMHGsky0tjkUW9jg2rgRoB+0iElAxYF+6s8SWGu3MeOPt+x5T74jJ05mGEUtqs
	HrqSsokp499P3efpGG00Q922oINBnRhsU4bhuRBk2ImdwbSZxQR7tyOZ0p+eA6JzSFVzUt
	wImsvdEiUpQ2+hANBhLT8FmnCryUGkeKv3SsuI2VFphtHTMSOA3Xio7nZswL1a6CmoJnjc
	qpwJkYGnHOQLN6ksrAfr+ttPVpy+Y1c7PmWBgjO4ZJ6mJF9tJFwRpIkcKqa/+A==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629010; a=rsa-sha256; cv=none;
	b=FJED473ZfA26zuuzZXqej2RYrk/cbCsj9z3/m4J8TfHUVaFWZs5UiOWvwsPA1xkVCut6XL
	FgWM2SGt+cHCywS+ODgjY2l1aNnQbTZyz/45xwWeK5uYbXa+PBQR+AtA9uHEesUW5YRV67
	SYHyF1UXNxpMDvD1TPc2Vs2ZgHdu5B6bDMsx2I5biSTkC+GkjqAJt+acfswtdCJfNcc88s
	O5Oah/gDfpuONRbxxsTYNX4r9MoXkSkFbSGlrHRdF7lhila4bXnx6XhxW9Lux0n6gW3Jh/
	lNNa3ci81HDthadVQtINWKunnUUpRSKnHrNhPaWYcxi/9v2JmTXwYNk3sPpKIw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJXd6bCJzllV;
	Tue, 23 Sep 2025 12:03:29 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3Trl008329;
	Tue, 23 Sep 2025 12:03:29 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3T6w008326;
	Tue, 23 Sep 2025 12:03:29 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:29 GMT
Message-Id: <202509231203.58NC3T6w008326@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: 8cda100def08 - stable/15 - cred: 'kern.ngroups'
  tunable: Rework the comment on the initial value
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: 8cda100def084709cd567b3fcd42325af40094d6
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit 8cda100def084709cd567b3fcd42325af40094d6
Author:     Olivier Certner 
AuthorDate: 2025-08-27 13:50:59 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:41 +0000

    cred: 'kern.ngroups' tunable: Rework the comment on the initial value
    
    Remove the parts about the effective GID being stored as the first
    element of the groups array, as this is generally not the case now after
    commit be1f7435ef21 ("kern: start tracking cr_gid outside of
    cr_groups[]") (some credentials export structures still have the old
    layout, and need to do the 'ngroups_max + 1' computation, but given the
    computation needed to obtain a size in bytes, this detail is not really
    important here).
    
    Remove the part about 32-bit machines, avoiding another modification
    when support for them is removed.
    
    No functional change.
    
    MFC after:      5 days
    MFC to:         stable/15
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52265
    
    (cherry picked from commit a61e7b5c98f840b4a7777d718218d0f63569c52a)
---
 sys/kern/subr_param.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c
index 471640c290a7..a67e5fa6cbff 100644
--- a/sys/kern/subr_param.c
+++ b/sys/kern/subr_param.c
@@ -235,14 +235,11 @@ init_param1(void)
 	 * specification for , paragraph "Runtime Increasable
 	 * Values").
 	 *
-	 * On the other hand, INT_MAX would result in an overflow for the common
-	 * 'ngroups_max + 1' computation (to obtain the size of the internal
-	 * groups array, its first element being reserved for the effective
-	 * GID).  Also, the number of allocated bytes for the group array must
-	 * not overflow on 32-bit machines.  For all these reasons, we limit the
-	 * number of supplementary groups to some very high number that we
-	 * expect will never be reached in all practical uses and ensures we
-	 * avoid the problems just exposed, even if 'gid_t' was to be enlarged
+	 * On the other hand, a too high value would result in an overflow when
+	 * computing the number of bytes to allocate for the groups array.  We
+	 * thus limit the number of supplementary groups to some very high
+	 * number that we expect will never be reached in all practical uses,
+	 * avoiding the problem just exposed even if 'gid_t' were to be enlarged
 	 * by a magnitude.
 	 */
 	ngroups_max = NGROUPS_MAX;

From nobody Tue Sep 23 12:03:28 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJXd17svz68Y6v;
	Tue, 23 Sep 2025 12:03:29 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJXc6Ypcz3DVT;
	Tue, 23 Sep 2025 12:03:28 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629008;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=qnTgPN7iGgfec+9d036ZN6iK12g0E0MacDBfgDyY6RY=;
	b=KSq5nB9DJkmnfMr1nGdeDoBI50f/S0cKgUKVFtbO3Ba/jLWd99W9+HQrOH4wMrR/OQGdmp
	+Ii0mRxg92JuSKp2LxubkulJc4lBLgQ0WrRNZwGncUXEvbPQr0AkZdiVYV2g/FntqIAT1S
	s9CnD2dVSlKp/EGimN2+Ih98ByQpCNb3uG45KS64NV6MlN/OFbUHykBftAQnxrz3nE8FZ/
	tNLrVhDWLxPwHVB5B9O5wONbz8sqV1u865KubRE7enqbvTAFz0+gYVSs3mYJ131k/8S0+W
	vvvFhsLx6uvXQGqUyGq/Mq7E7yOUPleWVYwD0qIR3gK7Az+1VNaCbojDZJgOKA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629008;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=qnTgPN7iGgfec+9d036ZN6iK12g0E0MacDBfgDyY6RY=;
	b=HgBcIT9nncFPbkjbXQ+fGf+LBUzMNdLmihH1lTz0P80+SlEAvdW1jMoJ9ICaFIyzCy3KR7
	abFgpKlIzYmgIK3PxDfP+pbQU7bvur5OXL7auIkO/GKOC2Qvu5T+cQZ1GfYWMZ5w/ggAJG
	HDk1qNLfCEAfc/mCzw/hdIw6Eqf5nLsVEeFXBZG5Ix6K0wPPpxuDikfv1qRWIY/w2gmqaZ
	wTQgvmEo/hm2zysTI5JJaVG8XB+JnV6RJqOE5LLQXGfXKan4aJmWg8PxjtNGD6WekMLtbp
	eNcbAJALJyXBmz4/03vuKXBXvsFAU0s7Fm2odLoC8cRkk4Z+4bm14EgNDsxnlA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629008; a=rsa-sha256; cv=none;
	b=ACWKWWQJYT5ElUhJvMcyYmFxK53T40Qs8nhR1bFT68Dhn4jMaahgmGYyx8pYlHVZbovKAb
	LoRh6w4B/a6f4H2zHmRU2W7o/tJv88QJSfK3z12nO2yPAj0LyIdQ9mT00EsEOrO3N9Xpjj
	07Kf30TBEKgo2TwWwZ3E4YZtp2/vq4XUJe33PbC8nicapsFn4zRaptX6d1QQVy6UfI1MtG
	9/1dO748cnMVUWWs1fAe69JKerDdVEDui0OPX6hJiN9950i/Xqqh1mVDdg2cYlDzD4PKF0
	KSLGMkR2aFUgxrvcoGusjKDB9KPl3xpg6rpsaQAIIOxg5x5n2P1HR9kDd1GeGA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJXc5fWjzllT;
	Tue, 23 Sep 2025 12:03:28 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3SKd008296;
	Tue, 23 Sep 2025 12:03:28 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3SMg008293;
	Tue, 23 Sep 2025 12:03:28 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:28 GMT
Message-Id: <202509231203.58NC3SMg008293@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: 5e4493dca3eb - stable/15 - nfsd: nfsd_excred(): Remove
  an obsolete comment
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: 5e4493dca3ebee9cf627acd1ea5682cc704526ec
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit 5e4493dca3ebee9cf627acd1ea5682cc704526ec
Author:     Olivier Certner 
AuthorDate: 2025-08-27 13:40:42 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:41 +0000

    nfsd: nfsd_excred(): Remove an obsolete comment
    
    This comment has been obsoleted by commit be1f7435ef21 ("kern: start
    tracking cr_gid outside of cr_groups[].").
    
    No functional change.
    
    MFC after:      5 days
    MFC to:         stable/15
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52264
    
    (cherry picked from commit 5fa6ca8b8affc8d948687c4ede7aeed297ae2dc0)
---
 sys/fs/nfsserver/nfs_nfsdport.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c
index 7040c4afb797..5ba86314ead1 100644
--- a/sys/fs/nfsserver/nfs_nfsdport.c
+++ b/sys/fs/nfsserver/nfs_nfsdport.c
@@ -3478,11 +3478,6 @@ nfsd_excred(struct nfsrv_descript *nd, struct nfsexstuff *exp,
 		     (nd->nd_flag & ND_AUTHNONE) != 0) {
 			nd->nd_cred->cr_uid = credanon->cr_uid;
 			nd->nd_cred->cr_gid = credanon->cr_gid;
-			/*
-			 * 'credanon' is already a 'struct ucred' that was built
-			 * internally with calls to crsetgroups_and_egid(), so
-			 * we don't need a fallback here.
-			 */
 			crsetgroups(nd->nd_cred, credanon->cr_ngroups,
 			    credanon->cr_groups);
 		} else if ((nd->nd_flag & ND_GSS) == 0) {

From nobody Tue Sep 23 12:03:30 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJXg3LyGz68Xgn;
	Tue, 23 Sep 2025 12:03:31 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJXg0stBz3DYR;
	Tue, 23 Sep 2025 12:03:31 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629011;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=JVXUnFe1KIX8qNk8bgZTbWWWdc3GO2r6CXfjR8t3k04=;
	b=y3tBezGIIS5xTW7w+meCh7Bz5WeurHl2w+/xf6l+C6joo1eehHt1mGd8dSEzJEsPzRgqoD
	0/nftvUcQWUQpUJJdUxlpEwHp7rULOLNkptcrO1PaPO/15KR+0oKO+pCLzg+0deEOK3mEJ
	39lSLWHCuIILnOcrWmm2hYRmBE4ssLboQlP4+R5khEHETI+zRRJB/Sz/luIbIdrQ/KAkYc
	Dyq95QuV5FURKm/LpMmLJ5/zRPC0Zj7yXGHwnZVRccaYbBgFB0l8nWTChW/EGOKyhQIWU6
	Kw+Nh7tgzWH9lFlGzzs97OTTqcrWkZWlbgO6Ql36iMIwSC4lsGldZqgEoRudiA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629011;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=JVXUnFe1KIX8qNk8bgZTbWWWdc3GO2r6CXfjR8t3k04=;
	b=Cfen4OOwDVdPRXeVLPITmSauNfk0dggq1kaJ6Bbj6f48OJJQtApjmTWD5mBCrCw9poZSJq
	lJ3b5HSfFzGRm3UXB0CQRX4MWfyvvyIcHumlwxxRlYBBpbXx1lwXi9pdeG8eASvjltH50C
	ZjtsrXfRiLdJKqDgCzIbV01SiHieMcNQFN93KTZzquypdRr/Z+USmw7T3V38efMPEIifBw
	oSJvNB87d0S3vrg0RUFIkKDzmav6rf/n22fzuLGHCSOR9lym4JdBQp7yefUiv25yyZpQhR
	IjqqrhENm6B4Fzkz5NTgyfs06I5pwpvDY3d/GTyJILU7wd8hIyTdflmhxVGC5g==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629011; a=rsa-sha256; cv=none;
	b=IYm5Zpb0CX9LsQWwCkpToqzwuA/mIAGiseg0LP40EJkQUNKHQHUZEplEnFXAtsssc90gQv
	e3cvGfhVSc8Nx26XC5egz2t1lau7dl4vg1HcxF1fSUJhagoIdsMWVn+1hP6ZAuKA4SIqxX
	IQL2WgQZDGiUDLGPCQmBuozVYwRO3zUGV8y66iPFL561giFNRGFxEmL6tALNuKIkyxkdQj
	iCte7B0wKJwBuU09fsCaXS+Z81sfpY3B7COE2iggoAeQ11i9LB1lISyEFBpPgieWfCwnVe
	FIFaavR0BNEMIYH4IFPd5KZ52OjEYoFEv67YCNtYAJ2Oj1WbT2EEgobPLJHE7g==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJXg0TKvzlch;
	Tue, 23 Sep 2025 12:03:31 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3UNq008362;
	Tue, 23 Sep 2025 12:03:30 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3U5M008359;
	Tue, 23 Sep 2025 12:03:30 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:30 GMT
Message-Id: <202509231203.58NC3U5M008359@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: 9466d35acc01 - stable/15 - cred: Update some comments
  after 'cr_gid' is no more cr_groups[0]
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: 9466d35acc010d445438b1a4b5343f1276d3112f
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit 9466d35acc010d445438b1a4b5343f1276d3112f
Author:     Olivier Certner 
AuthorDate: 2025-08-27 14:07:03 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:41 +0000

    cred: Update some comments after 'cr_gid' is no more cr_groups[0]
    
    While here, fix style of some already-updated comments.
    
    Fixes:          be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]")
    MFC after:      5 days
    MFC to:         stable/15
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52266
    
    (cherry picked from commit 9397b2ef741c57c8b2f0fdf796cc86267ecf2213)
---
 sys/kern/kern_prot.c | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 0ca42d640767..3333a168a754 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -1803,12 +1803,6 @@ groupmember(gid_t gid, const struct ucred *cred)
 bool
 realgroupmember(gid_t gid, const struct ucred *cred)
 {
-	/*
-	 * Although the equality test on 'cr_rgid' below doesn't access
-	 * 'cr_groups', we check for the latter's length here as we assume that,
-	 * if 'cr_ngroups' is 0, the passed 'struct ucred' is invalid, and
-	 * 'cr_rgid' may not have been filled.
-	 */
 	groups_check_positive_len(cred->cr_ngroups);
 
 	if (gid == cred->cr_rgid)
@@ -2921,8 +2915,8 @@ crextend(struct ucred *cr, int n)
  * Normalizes a set of groups to be applied to a 'struct ucred'.
  *
  * Normalization ensures that the supplementary groups are sorted in ascending
- * order and do not contain duplicates.  This allows group_is_supplementary
- * to do a binary search.
+ * order and do not contain duplicates.  This allows group_is_supplementary() to
+ * do a binary search.
  */
 static void
 groups_normalize(int *ngrp, gid_t *groups)
@@ -2985,9 +2979,9 @@ crsetgroups_internal(struct ucred *cr, int ngrp, const gid_t *groups)
  * Copy groups in to a credential after expanding it if required.
  *
  * May sleep in order to allocate memory (except if, e.g., crextend() was called
- * before with 'ngrp' or greater).  Truncates the list to ngroups_max if
+ * before with 'ngrp' or greater).  Truncates the list to 'ngroups_max' if
  * it is too large.  Array 'groups' doesn't need to be sorted.  'ngrp' must be
- * strictly positive.
+ * positive.
  */
 void
 crsetgroups(struct ucred *cr, int ngrp, const gid_t *groups)
@@ -3018,8 +3012,8 @@ crsetgroups(struct ucred *cr, int ngrp, const gid_t *groups)
  * Same as crsetgroups() but sets the effective GID as well.
  *
  * This function ensures that an effective GID is always present in credentials.
- * An empty array will only set the effective GID to the default_egid, while a
- * non-empty array will peel off groups[0] to set as the effective GID and use
+ * An empty array will only set the effective GID to 'default_egid', while
+ * a non-empty array will peel off groups[0] to set as the effective GID and use
  * the remainder, if any, as supplementary groups.
  */
 void

From nobody Tue Sep 23 12:03:32 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJXh4Db5z68Y49;
	Tue, 23 Sep 2025 12:03:32 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJXh1xhFz3DQS;
	Tue, 23 Sep 2025 12:03:32 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629012;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=mGk3oM4OECgWxDicijiwdvKWXsLobtFJCd5iMbrSBuI=;
	b=Chn075VmHWJnhRG/+SImEA4JjIBSkcQri5qmsOc2FPttLpfHpDtJNwMNasMFxMYcxCXLZM
	2dUfIDkVedfwKKuqYvmbT5jsMB6GWnahrHYATvB0FlFI7XClHPlUA7L28r+EiQzI5IdoQQ
	YOqiYGgMCnW7MDxbomAdcahhk+dC1Ev/yjgAtBzYWe0mLnqVCUEDRccW1ENhGlUJVBu7+f
	VnOyXlIFutMgPIiQ3Rs47ivKWGUEOfLe/9XURErjifHSUYSY5lOcEmdbl8cZe2e/+DAo0z
	1xu9U1A+BkEfxxmcwnFnT7WtYE5EQOTPiWfYhc2xGrAUCsaKryufOh4ObANprw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629012;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=mGk3oM4OECgWxDicijiwdvKWXsLobtFJCd5iMbrSBuI=;
	b=UOkeVpmTUz3MYJvEt4xaguOY5VjKd/7LcqJbMAGVKYQXlfqXe/hPmHwK9xOnSrk9Pk1VKu
	mLsHr/G901RVauuVt7PMzfCsiUGSUaP7Jbztj1dCikPvlY4vGvkxUO2NLE1DFrJYdOsf2d
	QhqXF4+J4p1oWcuITHVTYpaBWOCpETK+bkWFlsiH+I87mzh2Zx5Og/xPlwbnKliz0TJbqw
	vpZc3uQD8bzFVjPMs8wHqKu9KXHHkTDip3OMROPOXtuvyyyw2GTCqKZzr4fHuxkeYRM4Od
	Sdk8TkH68LVzYjdYYZ1M5BUazXZZXCGwirCwysjXFjUMkKQK8YkPWH3Ski/1/g==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629012; a=rsa-sha256; cv=none;
	b=dLBA/1DsQFCoyLskcaFfJkEyolkWJY5rRdp1UdEcUdAGx1FJaG2mH/pelJeLakr/emuLrV
	7GlAWul3MXdTx24IsQ7tXvbecy7TuJpp+VNR0KHgdqSKYngvakoBxcrg1k6BdPOCUYovIy
	kwxLyrgJAkfacosz40jX8ualc3UMkTQbeKLI+QIquwRpLAsGkgJcZOsSjuRHEXCbfXEkGh
	RVnIkqE0WnYZXC85PsUcZE73ny2rM903kSJh7dKLMxwTGmWGqKH1rlV2AE9SUC6m4jcjzO
	e7NhrFS/z91ZqIKf7TNqE+73lyA9wzmesPlh8V7GlaGbBvQ7EaA3Wa4PPGrlEg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJXh1Xt6zlXc;
	Tue, 23 Sep 2025 12:03:32 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3WYr008402;
	Tue, 23 Sep 2025 12:03:32 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3Wf6008399;
	Tue, 23 Sep 2025 12:03:32 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:32 GMT
Message-Id: <202509231203.58NC3Wf6008399@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: f9b269731c13 - stable/15 - cred: Remove obsolete
  comment after getgroups() not returning the eGID
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: f9b269731c13a1aaa5233aeb03f0db2cf5ba346c
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit f9b269731c13a1aaa5233aeb03f0db2cf5ba346c
Author:     Olivier Certner 
AuthorDate: 2025-08-29 16:35:56 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:42 +0000

    cred: Remove obsolete comment after getgroups() not returning the eGID
    
    No functional change.
    
    Fixes:          9da2fe96ff2e ("kern: fix setgroups(2) and getgroups(2) to match other platforms")
    MFC after:      5 days
    MFC to:         stable/15
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52267
    
    (cherry picked from commit 30193fce433cdad465904b6efe3814bf234ea74e)
---
 sys/kern/kern_prot.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 3333a168a754..591994e92e7d 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -291,11 +291,6 @@ sys_getgid(struct thread *td, struct getgid_args *uap)
 	return (0);
 }
 
-/*
- * Get effective group ID.  The "egid" is groups[0], and could be obtained
- * via getgroups.  This syscall exists because it is somewhat painful to do
- * correctly in a library function.
- */
 #ifndef _SYS_SYSPROTO_H_
 struct getegid_args {
         int     dummy;

From nobody Tue Sep 23 12:03:33 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJXj5mQxz68Y70;
	Tue, 23 Sep 2025 12:03:33 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJXj2hFmz3DWl;
	Tue, 23 Sep 2025 12:03:33 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629013;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=DpWan4OpGGz/VodipW9Vd5ywxBmCkmLDwElUEE+YMM8=;
	b=LT5J/clBCEchBSKWu2uovzRs5W2pve/RjSMllE1Fgl8trRkkk+wFrMRpz7EMc9y8YICR1s
	ZbeDcjEXKaZZc8ok5DuRYlKxWuAyypIvd4ueHiZh/Wxh6PyUHgHUZGiyLrpWk/lR8+KbZI
	ZdZ49ynHuYnEwAxP2VT2Aq4RWOQewT2QO7kVO1Dp6TyUbrQUMilVCpDG02q3+LF6FpoXVl
	mNSFdm4syVcu/SD1K7WWHCUBOpHnArpYmt8B/7z/xXhrYWDIxSqejKPR57LG2r98vaCARF
	iUhfmVmnfHqdKh6Mf2rEH0yhad41dLEreVrPdNw7xZz+hrU1/Y/Z16LzIN1zlQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629013;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=DpWan4OpGGz/VodipW9Vd5ywxBmCkmLDwElUEE+YMM8=;
	b=DxQCJrUKVBYkmvS8X7G3UYVBjAzXu5nENdUmdz2g4VgFMzG1ykDitAOHHLCujFEx24qR5M
	Lf0dhxQbFjP526+utJOR/wzp8moYNWcF4epyFGTPFv6+9hdbcDN9iWxDBNd9JPdM0nON1l
	6QF9l5ygg6qdl7/fPMk6ftonaAYprjKhklFuqzIOxw/LimlnE23rbTdJ63JQKazJXWupI8
	LqdFyzh481x51sGRX2LrJyc1DYStgQP74D7mIbtlHtoyzzpOjQrOSmHXBRXJTXRrklhB9d
	najbjumuRmOleYBVHvxNh3p0aVMPS0ARAWUxiIJqsEL1lwQ07ue9n/faz8ALLg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629013; a=rsa-sha256; cv=none;
	b=lB5qICZOXCz7EgSnLbWTYAhGHevNjef9GAk+tc/NWuwoI7ZXaBnHQFT80BGxi71Y6Bi+bz
	TB2oIDh6ru2mCBTOlo+SZDJRCS2HidxTY7w7hT59OztMLj6IrZr5FnnMPzXgw9/ZGOu3pS
	bEY+k2hgZoJjZ7own8qyYFVCDMsoOuS67uwULfcVO2hwruggn3tK3fDlS+6+YXa0p4KkNV
	ccM2Wb/e7JAoW+yWAe8Rq7pleAXnYww7gB1p8197b2YHX4MPXZRwm6YHat12Sm9wNoPsYJ
	o1p+NE4AZUTwLOiyMCgTOz4AXARrnUSWtEWfFwsU2tGEYfw+6P0ne/BVUom6yQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJXj2HfHzlw5;
	Tue, 23 Sep 2025 12:03:33 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3XT7008436;
	Tue, 23 Sep 2025 12:03:33 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3XcG008433;
	Tue, 23 Sep 2025 12:03:33 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:33 GMT
Message-Id: <202509231203.58NC3XcG008433@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: 0d836d126129 - stable/15 - cred: Restore proper
  checking of effective groups in some security policies
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: 0d836d126129dad5c29acf920d5d820520d4476e
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit 0d836d126129dad5c29acf920d5d820520d4476e
Author:     Olivier Certner 
AuthorDate: 2025-08-27 14:28:15 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:42 +0000

    cred: Restore proper checking of effective groups in some security policies
    
    The removal of 'cr_gid' from cr_groups[] as cr_groups[0] made
    cr_canseeothergids() skip considering the subject's first supplementary
    group, causing the 'security.bsd.see_other_gids' policy to be too
    restrictive, and cr_xids_subset() miss a check on the effective GID,
    relaxing the "can debug" and "can export KTLS keys" checks.
    
    Fix these policies.
    
    Fixes:          be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]")
    MFC after:      5 days
    MFC to:         stable/15
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52268
    
    (cherry picked from commit fa1cbb02d12055db0584882d586658be643f0949)
---
 sys/kern/kern_prot.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 591994e92e7d..6485254d300d 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -1889,7 +1889,7 @@ cr_canseeothergids(struct ucred *u1, struct ucred *u2)
 		if (realgroupmember(u1->cr_rgid, u2))
 			return (0);
 
-		for (int i = 1; i < u1->cr_ngroups; i++)
+		for (int i = 0; i < u1->cr_ngroups; i++)
 			if (realgroupmember(u1->cr_groups[i], u2))
 				return (0);
 
@@ -2265,6 +2265,7 @@ cr_xids_subset(struct ucred *active_cred, struct ucred *obj_cred)
 		}
 	}
 	grpsubset = grpsubset &&
+	    groupmember(obj_cred->cr_gid, active_cred) &&
 	    groupmember(obj_cred->cr_rgid, active_cred) &&
 	    groupmember(obj_cred->cr_svgid, active_cred);
 

From nobody Tue Sep 23 12:03:34 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJXk68Hpz68XkQ;
	Tue, 23 Sep 2025 12:03:34 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJXk418pz3DfQ;
	Tue, 23 Sep 2025 12:03:34 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629014;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=iuF/J9CNbfetdYpKWtuCvqFLK0/yCmA1X+9Xy0FSr8s=;
	b=fbMBO8uFSDQ/aLIzerkOgv0ozjN2kiittg+oQHQ60RLt2DedaQBQqZ6Hn8FVuRxu2fLB+/
	lFtyaugrJe+zBIER718sCpWPGw/DsIgNwSo+HD0QsHKKK3vo8GeOzpmg4dLypFLzrenZji
	NECq2eIRyOlFqaP2stLgGXgN9m4w2nm13/IF8nzZbBQGy4B/96FcWIk+5+WvtjnLLyLBiy
	DbrDZPZFiSbiudE6xDnhscCKg+kcfOFkXQ1Elc5w8C2ksnRtgYD6uDA+AzujGyxHJYE1T8
	B7sj/D+J55OIJEOXkLS3Z1e+vEzfjUk0/9o2mOTXpsY/6u07WOMS0Pkz4KyzCw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629014;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=iuF/J9CNbfetdYpKWtuCvqFLK0/yCmA1X+9Xy0FSr8s=;
	b=J3f8Ee9fOEZUvq7BxIVDv9RpN705agZAYm5qITW8xSPi2QI6udiIUOAV70ll0BkW4na6mS
	6b3OybPT8P8/ExO6xGhgaDj+TWsFn0LUBiMkWkFePYfrtQPMNkoY5dO11fgqPPekypG6Ba
	dW0/7A0uP1sE1Np9GqkplQwtIjiYKj5gIobem2v+x0IVbHpwZvGOXJ/VYhxsVwd70AiaO/
	tsInK73cQbmCoqgonAhWA1QfE5/ER/T0826YWXp8aZd+6ZW+NC8AQfEozmru8HkaO5A0zW
	Vw6CRdURPy1rsIIFOurQL70eYkb4QPN2KDAnJo3g+x82Jgv72t2gcNRxPYu97A==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629014; a=rsa-sha256; cv=none;
	b=wp/S/HFuOM9i0JVc6pkTHiq883GkiI0pviSrWcLKyKQ+kOXPZlHEQlAOmLv8qCmfeua4d+
	p4oTZ/2rpMnWhI7oa+2OQ/Z6FCC4divngi1B1WZFQiM8gS5e707ozzdf4hwurFynbbfuiX
	yMErDRW2/ie1r8ObTaTmYVn88BZIeeMUyE7DYhEVnyP9tvNK7ABiOi4abVgJR/naHxBlUv
	o+9KUlAQDIhCOV9gLbbSAs6j+IfiwpqO8xejLq1hRPMm6chV9lcp89lgAs361bL5iBgemm
	vT3o7YCxEZ4pRTtlAOzuG4CqhpYgfVd4o2jPYKS9lrtdzbkR7jt/Mze3LG6sCQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJXk3Qb0zlqd;
	Tue, 23 Sep 2025 12:03:34 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3Ytl008470;
	Tue, 23 Sep 2025 12:03:34 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3YHg008467;
	Tue, 23 Sep 2025 12:03:34 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:34 GMT
Message-Id: <202509231203.58NC3YHg008467@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: ee8c31c6dae4 - stable/15 - cred: 'struct ucred':
  Rework comment on 'cr_gid'/cr_groups[]
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: ee8c31c6dae4069cb4f2f29bd23c6692882ca652
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit ee8c31c6dae4069cb4f2f29bd23c6692882ca652
Author:     Olivier Certner 
AuthorDate: 2025-08-27 14:33:24 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:42 +0000

    cred: 'struct ucred': Rework comment on 'cr_gid'/cr_groups[]
    
    Make it more straightforward for consumers.  Also, recommend using
    cr_sgroups[] for supplementary groups, as this can generally alleviate
    index problems and will help us spot and change consumers if/when
    'struct ucred' is evolved incompatibly (and cr_sgroups[] suppressed).
    
    MFC after:      5 days
    MFC to:         stable/15
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52269
    
    (cherry picked from commit 0abeb8d8d8df1842b0c2d2276c958b0150579a1c)
---
 sys/sys/ucred.h | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h
index 9c1d8545af34..254f58841993 100644
--- a/sys/sys/ucred.h
+++ b/sys/sys/ucred.h
@@ -112,15 +112,21 @@ struct xucred {
 	short	cr_ngroups;		/* number of groups (incl. cr_gid). */
 	union {
 		/*
-		 * Special little hack to avoid needing a cr_gid macro, which
-		 * would cause problems if one were to use it with struct ucred
-		 * which also has a cr_groups member.
+		 * The effective GID has been the first element of cr_groups[]
+		 * for historical reasons.  It should be accessed using the
+		 * 'cr_gid' identifier.  Supplementary groups should be accessed
+		 * using cr_sgroups[].  Note that 'cr_ngroups' currently
+		 * includes the effective GID.
+		 *
+		 * XXXOC: On the next API change (requires versioning), please
+		 * replace this union with a true unaliased field 'cr_gid' and
+		 * make sure that cr_groups[]/'cr_ngroups' only account for
+		 * supplementary groups.
 		 */
 		struct {
 			gid_t	cr_gid;		/* effective group id */
 			gid_t	cr_sgroups[XU_NGROUPS - 1];
 		};
-
 		gid_t	cr_groups[XU_NGROUPS];	/* groups */
 	};
 	union {

From nobody Tue Sep 23 12:03:35 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJXm00BFz68YRd;
	Tue, 23 Sep 2025 12:03:35 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJXl4smZz3DcM;
	Tue, 23 Sep 2025 12:03:35 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629015;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=FunnI5c/70deib9K1jRO98qE/2+nGXzMvQp9LmtJGoo=;
	b=jDElbGZzFxQfBE03gRUj1lp+0WifT8ZjYhDmmyG8WhpT4zpOyKmyD/ijp8t7GPAQkXJZRW
	hyliChHWSgcJ4HpMZu+un+ug6PAyKV9nFHMZkUmBi3bV5S2KNk550Wmbtu33+QYr1T9gj2
	L/qgK+Br7VVhk410PCWid+r/j76zSEfpVwBjZ37eDuHwM83/EuQTku2LGsMtxZae7U6X6X
	xAAXKAwpa51VsdCegyNSO1dh8SEvj7Bhv1K977pmNrXbqUpAxdZ4tW6KXQaVsbUqmH1kKS
	ZTyrrRGiDJ2FLBI6EwBzAXhKOugZsU34FEoe8mFpFmxB6trd2upx0pdOZCMaAA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629015;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=FunnI5c/70deib9K1jRO98qE/2+nGXzMvQp9LmtJGoo=;
	b=pcZj3b23yHNjy0gn9tc3P9DGeEURy7DvNPThjekVCZnSYZbnCgwhC3W/6XpQwgCX16Vf8v
	BMaSAuIn/OMRMDOz5umdMoQDicUGhA8VCqJKfA9dj+7MnUmGQ+9iDEqotz8Y9DDJuvULPG
	etkbIgMLx552P7ewZWRgOjEnw7D7UbLZqo2x8q7y+NzA+mPuy5zVTu+aad0dprbQXdZcRW
	05aRoRwW2bbCWCE41+837fTxA6qM1oB4Y33s5gvhYgLbnsQPocsBMr0kN1frv9qvYdnCzq
	yVg0//bteVomyXKWdRWeltKJ6LYFqdTTlPilRlpaed2feDpk1FONOJxro/48HQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629015; a=rsa-sha256; cv=none;
	b=r11C3iXkmX80+NLAJUG+9vSF7rhYhigCluF/zgIjKtbjd3bL8XWbHvMUmhkH5oq2qANPTB
	rfW2RY6M3zMXcmhF9u2kOngZbh8GQBE8Y2AYXty0SVMgZUO4Ly92PmdCjVHwMN0d4ptgtQ
	2/RmlqlaDK4dWHXw3dntRHD1fxfkgORbjTBhLXPKXvPFzydg7CvY6wz6SJoogkEW4C8bZ9
	GAN9VvANumy34vD816tNo9nl3NHqVaqO/K7ftdIPz75U5tCKzK/GA0bhmpRypeHnlfg4sa
	fdI6JDybNf9KUOQ/ku4JllMmvRCcT9RdohAtMr6nNEVUXh9437QkbTBKZe6ZNA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJXl4NNczlRb;
	Tue, 23 Sep 2025 12:03:35 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3ZnS008508;
	Tue, 23 Sep 2025 12:03:35 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3ZAm008505;
	Tue, 23 Sep 2025 12:03:35 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:35 GMT
Message-Id: <202509231203.58NC3ZAm008505@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: a482c6975867 - stable/15 - MAC/bsdextended: Restore
  matching subjects' effective GID
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: a482c69758671233b5a18d85d3f816face6f8868
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit a482c69758671233b5a18d85d3f816face6f8868
Author:     Olivier Certner 
AuthorDate: 2025-08-27 14:56:21 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:43 +0000

    MAC/bsdextended: Restore matching subjects' effective GID
    
    Fixes:          be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]")
    MFC after:      5 days
    MFC to:         stable/15
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52270
    
    (cherry picked from commit ab7186a486347216fde099498471cf847828565c)
---
 sys/security/mac_bsdextended/mac_bsdextended.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sys/security/mac_bsdextended/mac_bsdextended.c b/sys/security/mac_bsdextended/mac_bsdextended.c
index 8a6549214380..bf95c008e2f2 100644
--- a/sys/security/mac_bsdextended/mac_bsdextended.c
+++ b/sys/security/mac_bsdextended/mac_bsdextended.c
@@ -246,7 +246,9 @@ ugidfw_rulecheck(struct mac_bsdextended_rule *rule,
 	}
 
 	if (rule->mbr_subject.mbs_flags & MBS_GID_DEFINED) {
-		match = ((cred->cr_rgid <= rule->mbr_subject.mbs_gid_max &&
+		match = ((cred->cr_gid <= rule->mbr_subject.mbs_gid_max &&
+		    cred->cr_gid >= rule->mbr_subject.mbs_gid_min) ||
+		    (cred->cr_rgid <= rule->mbr_subject.mbs_gid_max &&
 		    cred->cr_rgid >= rule->mbr_subject.mbs_gid_min) ||
 		    (cred->cr_svgid <= rule->mbr_subject.mbs_gid_max &&
 		    cred->cr_svgid >= rule->mbr_subject.mbs_gid_min));

From nobody Tue Sep 23 12:03:36 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJXn3Zk1z68Y9V;
	Tue, 23 Sep 2025 12:03:37 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJXm5z74z3Dqf;
	Tue, 23 Sep 2025 12:03:36 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629016;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=4sn2c0dcKHNL/S+plvcX+ux7XXQF6tjGpQJJAXIaUtA=;
	b=JTu7KNGLPJPS2OsDiQZ2HKjkTcUAfNGGSdswYKiuMUy47NXruHFn8eFh4Up/wapzhhibdH
	TrpAzqz9kaX4nxOxcPl1CEdy7EHvAgbRtxoLj0+e8PsRTFk7/L5I/qO+H2uH70YGANB/Tl
	8HzxFSptpULZgpwI5ZgLssF45JJQ7NdnsnfFIbRNm4TrXHd3OH1THjcyPGwfxDfemGFT+X
	TUgZIUdyA1Xzfmnl5mA42yTcZcnEnZp3sNDxJ3jTet9ZuSbTV1ZWo6aiBGGt2F0Q3fer5n
	4+kBFb1hZPhQ0hpz5+LWb9Crgsy6s2LCaK8HQFYFWzBtiV+vzJY0UlndHirV0g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629016;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=4sn2c0dcKHNL/S+plvcX+ux7XXQF6tjGpQJJAXIaUtA=;
	b=NTlkoMNlVRRxCDIPhLxBt8hZLpGKZioSrCyQoP8YOOeuNVe8Pt3NBYcZMsdGW9JrTd7XKN
	F30gY2ypsD+Rb0lmednHniRt/juCcVqCwfdhamBef/6j9A5strXzMTJgWvf7bRF7NjrCLh
	eQUdp2JpaJ9gO/yxq6qbPFq7B1Iw1HwxHtjYfooeph8zzVhWunAcCbPMq5gSq8yPa4OWpG
	nsfuqTq8VNxgzMAT5WWvQdAKwYWa8DDF6c4U55AT6e7tCIuX9Dm09KenuiXFl/HRCjMmxo
	nLcJFHtC2CIXSG/YAW9iNP6i+t79IDmxoOPAtaDbtWofZOCOQPHZw99yJKXCBA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629016; a=rsa-sha256; cv=none;
	b=bIKTeGNXSawN9Rq3FhUhIc57IAB991EzIFDz6MWvbmXt3g9rb0x5mv7Zs3vH3SFDdi7x1F
	08zwuWcjYEKR0S7Tm9/wkHd7ZVh1ukjpZ1G6JSnMj0Qq6JS70vFTm9xwd2qTc+VIh9/0sc
	euH5ZtTOafpHlRzKPm3e7MFkrYg41WH7O87P0S3PBZNB+IztkJ2OMekrEl9zMFYtq9OGBG
	8WJznBt/MGcoXSOqNVleVthYVCVG2i93v9fPtCI6kXT/H04nVPBzluCyyzwFMfwBt8xYar
	RUC3qWjBHN3COyX0bPtfwEuvPcOhwkS+HEqMqQCJ/iISk1TmJ6WQwVCunkmdPg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJXm5L4gzlw6;
	Tue, 23 Sep 2025 12:03:36 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3aMj008545;
	Tue, 23 Sep 2025 12:03:36 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3aX7008542;
	Tue, 23 Sep 2025 12:03:36 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:36 GMT
Message-Id: <202509231203.58NC3aX7008542@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: dd5c76309ad9 - stable/15 - MAC/do: Restore matching
  the first supplementary group
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: dd5c76309ad98c9b058a79f6b674c5dfc44631c1
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit dd5c76309ad98c9b058a79f6b674c5dfc44631c1
Author:     Olivier Certner 
AuthorDate: 2025-08-27 15:22:26 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:43 +0000

    MAC/do: Restore matching the first supplementary group
    
    As 'cr_gid' was in fact stored in cr_groups[0],
    rule_grant_supplementary_groups() would loop only on further elements of
    cr_groups[].  Now that cr_groups[0] is not 'cr_gid' anymore, but some
    supplementary group, take it into account.
    
    Fixes:          be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]")
    MFC after:      5 days
    MFC to:         stable/15
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52271
    
    (cherry picked from commit d39756f23fe223d14ff00b1392ba39e94d5eadbc)
---
 sys/security/mac_do/mac_do.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c
index 7a5ac2e01f75..6f3e63d06198 100644
--- a/sys/security/mac_do/mac_do.c
+++ b/sys/security/mac_do/mac_do.c
@@ -1650,7 +1650,7 @@ rule_grant_supplementary_groups(const struct rule *const rule,
 	const bool current_has_supp = (gid_flags & MDF_CURRENT) != 0 &&
 	    (gid_flags & MDF_SUPP_MASK) != 0;
 	id_nb_t rule_idx = 0;
-	int old_idx = 1, new_idx = 1;
+	int old_idx = 0, new_idx = 0;
 
 	if ((gid_flags & MDF_ANY_SUPP) != 0 &&
 	    (gid_flags & MDF_MAY_REJ_SUPP) == 0)

From nobody Tue Sep 23 12:03:37 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJXp5BZfz68Xh6;
	Tue, 23 Sep 2025 12:03:38 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJXn6vMqz3Dkr;
	Tue, 23 Sep 2025 12:03:37 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629018;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=zQbtyMelWPOYHcqTfnB6hxFO2xY1Z2hPmyCsXStjHcE=;
	b=fv8+rCqGcx1vy0eRWFbtf7iC69QH+5CzjIRG1roVmeHqGwvMN3bseckkNas8cnas9be37R
	aelcLAQt+CV9jQ1TKkSQNQPsw+QvOaDWyO3DF+sm1XtyO5hdyEGPSRRjVFyNGHJdNgVdfc
	xJke5E+3PC83xJbXK3cJRUb/NPQxNsZUUv+83KvHKcG1AbARN7MBHQKhDLOgVCDEoA5dXM
	iVgv7fB0Q4G/kM9nfHgOwR36CUft5N5xzn4L5tr/jNu2sLn2aCDkMHev0EpLFmU/f9nE/e
	TdI/8G/wserT9qXvfhjQ133VAgvIIa09AxevQnQsOisA+h0i55qDE/5kWqYlrw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629018;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=zQbtyMelWPOYHcqTfnB6hxFO2xY1Z2hPmyCsXStjHcE=;
	b=bYT54zHCzM7ENJMIz/Fur4ZVJG0g9Z4vt9WdlPEfdYaPzUantjllaw4zYVS8ngg36f5a9v
	3I2EJVFcZVDu0zvu9TphC6WVboFzZHtM3QxNu8Dwq18giOLcORHrQz+XcwSz/aqciOUcI/
	/H3s9Cbt56JECInZeOhp+jjgml3P+R8OVVs46GxNUJ7mqB/xOC2EteewUtjHPMGQS/nqrg
	OpS1XrIstA9bJt49BefluqcIHXfIieLfTkqTOs6l0HhyArFVHuJ3aInERdUZln+AbsksaW
	FLjVVw0lKRsNzxQYdXGE28I9BtyqMmLnAiYMCYTFIQJFmRXPJXnpfch6rd4DSA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629018; a=rsa-sha256; cv=none;
	b=FloNLRe9beFIESZg3YQi/ufutPWafjhbxSirG5LQXhSVKE+7cuZ5ehapxKS9+rzaQjV1QU
	GfR9ZNziSw9J1pQo80p/WL47Loyeh4RW49lcHFvxis1EWPjaHixPtYb2tlBl8VgwNs3STX
	Kxf5Hl9O3iaigsIWWzwI0yVUre4ELXugScIJxSTxUw7LK18iareP0ey+F5OhvTMNaTLb1D
	m+0I0vMhDYwfEjzbB+liye4JTImTOda0RYM1s6+OSolpwpD6xgMNig97Wmi8aTwa/tWw9l
	TduOy+zi7ss8dAdKeLa618lY630npb1a9LKzG/pzeFEmfNkPvRnocCTEa4Nx1g==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJXn6QqRzlxG;
	Tue, 23 Sep 2025 12:03:37 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3bS7008585;
	Tue, 23 Sep 2025 12:03:37 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3bHs008582;
	Tue, 23 Sep 2025 12:03:37 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:37 GMT
Message-Id: <202509231203.58NC3bHs008582@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: 7bab0263aafe - stable/15 - cr_canseeothergids(): Make
  the logic easier to grasp
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: 7bab0263aafef686e8ca22e28bb0604cf9372f5d
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit 7bab0263aafef686e8ca22e28bb0604cf9372f5d
Author:     Olivier Certner 
AuthorDate: 2025-08-27 16:53:14 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:43 +0000

    cr_canseeothergids(): Make the logic easier to grasp
    
    Invert the initial test on whether the policy is in force so that, if
    there are no restrictions, the function bails out early, allowing to
    de-indent the rest of the code and have it finish with a non-zero (deny)
    'return'.
    
    No functional change (intended).
    
    MFC after:      5 days
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52272
    
    (cherry picked from commit f75d0dc533923345c653dcdcd5ebd1e53377a7c5)
---
 sys/kern/kern_prot.c | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 6485254d300d..a4c5bcc52529 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -1885,19 +1885,22 @@ SYSCTL_INT(_security_bsd, OID_AUTO, see_other_gids, CTLFLAG_RW,
 static int
 cr_canseeothergids(struct ucred *u1, struct ucred *u2)
 {
-	if (!see_other_gids) {
-		if (realgroupmember(u1->cr_rgid, u2))
-			return (0);
+	if (see_other_gids)
+		return (0);
 
-		for (int i = 0; i < u1->cr_ngroups; i++)
-			if (realgroupmember(u1->cr_groups[i], u2))
-				return (0);
+	/* Restriction in force. */
 
-		if (priv_check_cred(u1, PRIV_SEEOTHERGIDS) != 0)
-			return (ESRCH);
-	}
+	if (realgroupmember(u1->cr_rgid, u2))
+		return (0);
 
-	return (0);
+	for (int i = 0; i < u1->cr_ngroups; i++)
+		if (realgroupmember(u1->cr_groups[i], u2))
+			return (0);
+
+	if (priv_check_cred(u1, PRIV_SEEOTHERGIDS) == 0)
+		return (0);
+
+	return (ESRCH);
 }
 
 /*

From nobody Tue Sep 23 12:03:38 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJXq5d8bz68Y9b;
	Tue, 23 Sep 2025 12:03:39 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJXq2QpHz3Dl7;
	Tue, 23 Sep 2025 12:03:39 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629019;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=KuQMJj9Mq/KZ8wozsD8MFUp4NZPNBqa6kaGl7Ojau9w=;
	b=tc7k4k+EF8UJpLO6/9LtXl+tNyRR02F4h3n/Zpo2szJ+UToyvUQy7aESsiTGLMhf/3h8gF
	ceOxnGeyX939hqkG1oui+Fu0NZ+WRJTWs9eEN7xJiup6Rbofzu/Ka7/y+4SWtvfXe82iwW
	92NsFxSUf6K2b+CqXpyEjSrnW5bzx94k+arOCgDsJCFBZc/R0LzOpG813riKBk3qz/Mb/c
	8qUW7oq9LYliyIfWNEv6IUZgy6q0febd99ix5HzyRBLKZvn7R5lBgrUl2G9UHwPehM+XaQ
	8QcnYQHO+XaFJ/GjDJJeS86SAiwi8k4ZPBTYuFvc0oUpVvOZ85UzYpbJ/TN1bA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629019;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=KuQMJj9Mq/KZ8wozsD8MFUp4NZPNBqa6kaGl7Ojau9w=;
	b=v88Z6rEqax4uCIIJo6cROXgHnsMRi7/JstY2uXAOKBv6Trsg1MwRDP+i9AnxkMllwHkcq4
	yt1DPYROWu2uJRPRIg/tyfktvvPE8NYLoEOj+sPC83YJwPATreIQ0CU5R7L1Q6kjiG6Rkk
	AS9hoL4CUqwrfnVz1OKqPTppkuDcXoAXuq5nETWPa+lR6dDQ8of3Vmg02XPIvY1IiVjTkt
	XY8R4ZR6uUPgpefmVsxbJyEROZFy30BYKjFsVvm4P5mcWkPvIX+dh9VTINBiZbu0ZeG8aH
	qPgLNfa0t23wlWxAHoqkHtg6PIxB4PvDXa10frd1O1Hlxrrjo+p7vWEvHgRivQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629019; a=rsa-sha256; cv=none;
	b=Un2phaWSMxJi4DIFivMxPcUjf5/LEpqRPhX39LOBy61VlRvt0td6JMy0a2E7sn5GT91YqL
	j9ycg72jqqCe/G8eDMet88XAFBGyHcxOGEapgqqecO22i6AVAHpoRH5eiMVyiZM5TtEkZh
	mnQgtIpZg7YAOkA5QBrn4rTk2QsrYDB3noxwWrhubk5ZobdPE/W7Qn37s3PaoHGVCxSUn2
	pC4lx5MDTFDk7Xn7lenaUcUnv2Duw1L0h22HjDqyFRYlI53RxqU6MeJnOsa1yJYh5FV88k
	2dLZG75mpJwdNmvzgmNQalAktYJdJGoPPHXO8GZyahvLQbUDWuiu68xCqAt0dw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJXq00pXzlqf;
	Tue, 23 Sep 2025 12:03:39 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3ci3008619;
	Tue, 23 Sep 2025 12:03:38 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3cXV008616;
	Tue, 23 Sep 2025 12:03:38 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:38 GMT
Message-Id: <202509231203.58NC3cXV008616@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: 8013a7137d3a - stable/15 - linux: Simplify further
  getgroups() after 'cr_gid' not in cr_groups[]
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: 8013a7137d3ac5d6f0f3386fe8531594bcb067be
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit 8013a7137d3ac5d6f0f3386fe8531594bcb067be
Author:     Olivier Certner 
AuthorDate: 2025-08-28 15:29:33 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:44 +0000

    linux: Simplify further getgroups() after 'cr_gid' not in cr_groups[]
    
    No functional change (intended).
    
    While here, fix/improve style a bit and in setgroups().
    
    MFC after:      5 days
    MFC to:         stable/15
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52276
    
    (cherry picked from commit a207833f4fed5431cac853c082fa34dc8f33cba6)
---
 sys/compat/linux/linux_misc.c  | 36 ++++++++++++++++--------------------
 sys/compat/linux/linux_uid16.c | 36 ++++++++++++++++--------------------
 2 files changed, 32 insertions(+), 40 deletions(-)

diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index 5e32353c6b8e..755eae057406 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -1028,18 +1028,19 @@ linux_nice(struct thread *td, struct linux_nice_args *args)
 int
 linux_setgroups(struct thread *td, struct linux_setgroups_args *args)
 {
+	const int ngrp = args->gidsetsize;
 	struct ucred *newcred, *oldcred;
 	l_gid_t *linux_gidset;
-	int ngrp, error;
+	int error;
 	struct proc *p;
 
-	ngrp = args->gidsetsize;
 	if (ngrp < 0 || ngrp >= ngroups_max)
 		return (EINVAL);
 	linux_gidset = malloc(ngrp * sizeof(*linux_gidset), M_LINUX, M_WAITOK);
 	error = copyin(args->grouplist, linux_gidset, ngrp * sizeof(l_gid_t));
 	if (error)
 		goto out;
+
 	newcred = crget();
 	crextend(newcred, ngrp);
 	p = td->td_proc;
@@ -1071,34 +1072,29 @@ out:
 int
 linux_getgroups(struct thread *td, struct linux_getgroups_args *args)
 {
-	struct ucred *cred;
+	const struct ucred *const cred = td->td_ucred;
 	l_gid_t *linux_gidset;
-	gid_t *bsd_gidset;
-	int bsd_gidsetsz, ngrp, error;
+	int ngrp, error;
 
-	cred = td->td_ucred;
-	bsd_gidset = cred->cr_groups;
-	bsd_gidsetsz = cred->cr_ngroups;
+	ngrp = args->gidsetsize;
 
-	if ((ngrp = args->gidsetsize) == 0) {
-		td->td_retval[0] = bsd_gidsetsz;
+	if (ngrp == 0) {
+		td->td_retval[0] = cred->cr_ngroups;
 		return (0);
 	}
-
-	if (ngrp < bsd_gidsetsz)
+	if (ngrp < cred->cr_ngroups)
 		return (EINVAL);
 
-	ngrp = 0;
-	linux_gidset = malloc(bsd_gidsetsz * sizeof(*linux_gidset),
-	    M_LINUX, M_WAITOK);
-	while (ngrp < bsd_gidsetsz) {
-		linux_gidset[ngrp] = bsd_gidset[ngrp];
-		ngrp++;
-	}
+	ngrp = cred->cr_ngroups;
+
+	linux_gidset = malloc(ngrp * sizeof(*linux_gidset), M_LINUX, M_WAITOK);
+	for (int i = 0; i < ngrp; ++i)
+		linux_gidset[i] = cred->cr_groups[i];
 
 	error = copyout(linux_gidset, args->grouplist, ngrp * sizeof(l_gid_t));
 	free(linux_gidset, M_LINUX);
-	if (error)
+
+	if (error != 0)
 		return (error);
 
 	td->td_retval[0] = ngrp;
diff --git a/sys/compat/linux/linux_uid16.c b/sys/compat/linux/linux_uid16.c
index 1d9a19916412..07430f5b399b 100644
--- a/sys/compat/linux/linux_uid16.c
+++ b/sys/compat/linux/linux_uid16.c
@@ -85,12 +85,12 @@ linux_lchown16(struct thread *td, struct linux_lchown16_args *args)
 int
 linux_setgroups16(struct thread *td, struct linux_setgroups16_args *args)
 {
+	const int ngrp = args->gidsetsize;
 	struct ucred *newcred, *oldcred;
 	l_gid16_t *linux_gidset;
-	int ngrp, error;
+	int error;
 	struct proc *p;
 
-	ngrp = args->gidsetsize;
 	if (ngrp < 0 || ngrp >= ngroups_max)
 		return (EINVAL);
 	linux_gidset = malloc(ngrp * sizeof(*linux_gidset), M_LINUX, M_WAITOK);
@@ -100,6 +100,7 @@ linux_setgroups16(struct thread *td, struct linux_setgroups16_args *args)
 		free(linux_gidset, M_LINUX);
 		return (error);
 	}
+
 	newcred = crget();
 	p = td->td_proc;
 	PROC_LOCK(p);
@@ -133,34 +134,29 @@ out:
 int
 linux_getgroups16(struct thread *td, struct linux_getgroups16_args *args)
 {
-	struct ucred *cred;
+	const struct ucred *const cred = td->td_ucred;
 	l_gid16_t *linux_gidset;
-	gid_t *bsd_gidset;
-	int bsd_gidsetsz, ngrp, error;
+	int ngrp, error;
 
-	cred = td->td_ucred;
-	bsd_gidset = cred->cr_groups;
-	bsd_gidsetsz = cred->cr_ngroups;
+	ngrp = args->gidsetsize;
 
-	if ((ngrp = args->gidsetsize) == 0) {
-		td->td_retval[0] = bsd_gidsetsz;
+	if (ngrp == 0) {
+		td->td_retval[0] = cred->cr_ngroups;
 		return (0);
 	}
-
-	if (ngrp < bsd_gidsetsz)
+	if (ngrp < cred->cr_ngroups)
 		return (EINVAL);
 
-	ngrp = 0;
-	linux_gidset = malloc(bsd_gidsetsz * sizeof(*linux_gidset),
-	    M_LINUX, M_WAITOK);
-	while (ngrp < bsd_gidsetsz) {
-		linux_gidset[ngrp] = bsd_gidset[ngrp];
-		ngrp++;
-	}
+	ngrp = cred->cr_ngroups;
+
+	linux_gidset = malloc(ngrp * sizeof(*linux_gidset), M_LINUX, M_WAITOK);
+	for (int i = 0; i < ngrp; ++i)
+		linux_gidset[i] = cred->cr_groups[i];
 
 	error = copyout(linux_gidset, args->gidset, ngrp * sizeof(l_gid16_t));
 	free(linux_gidset, M_LINUX);
-	if (error) {
+
+	if (error != 0) {
 		LIN_SDT_PROBE1(uid16, linux_getgroups16, copyout_error, error);
 		return (error);
 	}

From nobody Tue Sep 23 12:03:40 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJXs4w7Cz68YCL;
	Tue, 23 Sep 2025 12:03:41 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJXr15wGz3DgQ;
	Tue, 23 Sep 2025 12:03:40 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629020;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=j1TFitXj2BaCiUe+U/39eth1EbtJwIYY6fzS7Ec/m6o=;
	b=FkAxeD+zyiAzBHcQcjEVtSmE5sGoE5+XW5wvHIrrdOPflLdtRuJ5ye/dakwYE2NknA4LSK
	3UsDLbFlpxMS0LtDtZ47gH+aw5Up4k/lz1YFKTe8g4fuyQU7ONusC66VDthnwYBnq7PMJ+
	AednXpR+px8znXkQrq9MB0bp5+1sZmxrcnCgSZ1mtQKbegAZfKMqea4RTdMYDfSGCx2mFE
	Ne03OQSoPsf5QE8zNSh0e0IntPWCeTVAu4JgT7gJ7n/ZSROFUfgU56ZrgXVKdN3y51YQ7T
	Erh/tlIeegP4pmsG5PhtCqZ91cO7QuNv8XF8570NwXdo4ktxnJdC5iU1cT0GgQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629020;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=j1TFitXj2BaCiUe+U/39eth1EbtJwIYY6fzS7Ec/m6o=;
	b=SLUcTcdad/2VsTbWB9LSOvMGCbQRkVvDeF+cBhbdInuA8nf021TL5pjjMP/S96BRM6AL28
	J8GkSJBzd373Sx7zJHg+CqVRq4ogofG/UVhnP45stvRHuMn+E06dS8Mi6U9pg4TqhfpDwN
	8A4M1/EqbA5X3IHCpx9713EFrnF9W6AZdnTqdeYqFiP91VezlWlV2EeZX9wMXmuGepa8r2
	GqLs+UHyy022aewCiSB3Ky3pc1o1nfrwfbSJIEYXuwpZmWYYUW38i3SQUmuQE0f46C4p/T
	oqvVzOBa21G/STtR/Ln5GcCamNlAcDqrzxL8Unly9lh1V9FfPHUygIUBe81G3Q==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629020; a=rsa-sha256; cv=none;
	b=Y1rZ5mp5bn0MdSgMKEOAGx6/37D+KrtjSYGqS3ZQ00pHxh0UbRp5sHf8E2wfz5tPUEw0NR
	Wzs9oy/vDBaTGM8pPjH960pOQsC6vSay7gEBa7HkOADWv4ikYkeWjeB09RpJnT1jeSKI1K
	HU1aGuDsT8T2VlalUC0hIW4gvBdds+Du8vcLw6q6pcp2CXsxKZYHpgs9O59kMfAETLs8R4
	jzpSfu1vwhmey4QmfZglFQZ3myvPttnvaglUVJF0PCIbr5XZ84A7/aq4jHva3sLnOa8jm7
	pJddM0Kd/Wn18dOTivbs0UVE+yCYwBdC4vRz1KyoiwXp2In3X57SadihH6ok1Q==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJXr0hxNzlcj;
	Tue, 23 Sep 2025 12:03:40 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3egm008653;
	Tue, 23 Sep 2025 12:03:40 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3ebk008650;
	Tue, 23 Sep 2025 12:03:40 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:40 GMT
Message-Id: <202509231203.58NC3ebk008650@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: 469c3a4139fe - stable/15 - linux: setgroups(): Fix
  the group number's upper limit
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: 469c3a4139fe85b092734b0af9dbc167a8ebbf1e
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit 469c3a4139fe85b092734b0af9dbc167a8ebbf1e
Author:     Olivier Certner 
AuthorDate: 2025-08-28 16:58:53 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:44 +0000

    linux: setgroups(): Fix the group number's upper limit
    
    'ngroups_max' is the maximum number of supplementary groups the system
    will accept, and this has not changed.
    
    Fixes:          9da2fe96ff2e ("kern: fix setgroups(2) and getgroups(2) to match other platforms")
    MFC after:      5 days
    MFC to:         stable/15
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52277
    
    (cherry picked from commit bbdea7c9f4aeae26b35f842382df0203fcda24a5)
---
 sys/compat/linux/linux_misc.c  | 2 +-
 sys/compat/linux/linux_uid16.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index 755eae057406..fb86de6e7302 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -1034,7 +1034,7 @@ linux_setgroups(struct thread *td, struct linux_setgroups_args *args)
 	int error;
 	struct proc *p;
 
-	if (ngrp < 0 || ngrp >= ngroups_max)
+	if (ngrp < 0 || ngrp > ngroups_max)
 		return (EINVAL);
 	linux_gidset = malloc(ngrp * sizeof(*linux_gidset), M_LINUX, M_WAITOK);
 	error = copyin(args->grouplist, linux_gidset, ngrp * sizeof(l_gid_t));
diff --git a/sys/compat/linux/linux_uid16.c b/sys/compat/linux/linux_uid16.c
index 07430f5b399b..dd681f971746 100644
--- a/sys/compat/linux/linux_uid16.c
+++ b/sys/compat/linux/linux_uid16.c
@@ -91,7 +91,7 @@ linux_setgroups16(struct thread *td, struct linux_setgroups16_args *args)
 	int error;
 	struct proc *p;
 
-	if (ngrp < 0 || ngrp >= ngroups_max)
+	if (ngrp < 0 || ngrp > ngroups_max)
 		return (EINVAL);
 	linux_gidset = malloc(ngrp * sizeof(*linux_gidset), M_LINUX, M_WAITOK);
 	error = copyin(args->gidset, linux_gidset, ngrp * sizeof(l_gid16_t));

From nobody Tue Sep 23 12:03:41 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJXt1gjCz68YPK;
	Tue, 23 Sep 2025 12:03:42 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJXs4ZbXz3F2J;
	Tue, 23 Sep 2025 12:03:41 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629021;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=R0ummlf0Ur3IwgrYA+SFXfq1/Jp4UFc8I5Oid7n21B8=;
	b=Zm/Qto/zOf57IV26FFBNrjc3kokV82O8NxxYuFIa/C+ioSMaoGHut0ZTu32MKwaEo76Tf/
	zgEBVbXJa+/WhAXye/6yU/MhmspYQiP/OihOiC60fD+OsSYo/Feko5uJzQWw+xAQ+jbXRT
	xSVrLGJ+/sVQTZWfpcxNXwkD2xKt5WjLsZLEaq8akwJpEn9Oze8vGEieR4QacAwKscvixC
	yzXLq1l+JanTuNaqPCa7fgxJWtJXzPnSmWKD3B0MEmH8U4jTY1ADp/asS/GhbZfow/Nf7r
	ddq4mI91Tgkt8RcTAqXuNnysTv+Su/etkMBzvQezh37ijQ34u4kKb5qxp7TlXA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629021;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=R0ummlf0Ur3IwgrYA+SFXfq1/Jp4UFc8I5Oid7n21B8=;
	b=LRRsygxumMWMFDld4Llu8ERYyiDIHJghW9Bqzkz59Kle69Oqg/E14w/SAlruB5bvCP4SGg
	fU7ES81MRcGVqpmWBjvj7qI4iHRR3JlGxePQGm28eSYbhjsx3/WBRFgl1U5+mLgTeDfwU+
	K3s5szR/pg5nUJ/bIwcSrnwnD31LLuRGPqB2/MdX6CV19WLw1PYcY14LnyiHKUmXuMi/1X
	Vgsv/72w8HCxHZ1HdjsrhWV0YKS/rUKkaG00q4cjOkdYb3Dh+foUtXvBAw6M6JweuUlQsb
	qFlFIeqO2257mkkzVFJKomckiDLC+E3CvSs6FWwVQpTIQMRjlVVtSeV6lwzLPQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629021; a=rsa-sha256; cv=none;
	b=MkE8Y1mMOoZL6OJV9O4lFLnf2pDp6D6CIf/mR5c3NFSpqSSJDWGan0qKXkBwkVGoli159e
	+NByEFPAWlOuxsb/dfSfrJqv3THnQkRFrCA0DVeXLMYrXsW7bpdwyqQGi9aY4/TIf9H9DI
	HAV2lvwPJKulXzEAHXqjZ+vYD36NcO2g8YDrCeflWjekq0XhcDvS7l9sZssl+4ZBAZdSOp
	OvQF/Qic9sEzR5n31LFR7in5FIpzMh7NgFe/nE2II+7gmD9s7b0X/L0ueoCcBBZwLewIx1
	nmhNFOfSPh6/gkG5tpVw1NEdDMCCqXBYOcpeLKbtqs2f1lpHotu0ZzmtqoclSg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJXs1w3DzlfQ;
	Tue, 23 Sep 2025 12:03:41 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3fli008687;
	Tue, 23 Sep 2025 12:03:41 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3fqC008684;
	Tue, 23 Sep 2025 12:03:41 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:41 GMT
Message-Id: <202509231203.58NC3fqC008684@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: fa96d3e64efc - stable/15 - linux: setgroups(): Avoid
  allocation under the process lock
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: fa96d3e64efc8f789524f3871bc4e68f61d3d213
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit fa96d3e64efc8f789524f3871bc4e68f61d3d213
Author:     Olivier Certner 
AuthorDate: 2025-08-28 15:47:38 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:44 +0000

    linux: setgroups(): Avoid allocation under the process lock
    
    This was missed in commit 838d9858251e ("Rework the credential code to
    support larger values of NGROUPS (...)").
    
    No functional change (intended).
    
    MFC after:      5 days
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52278
    
    (cherry picked from commit b7a87d7c0dd19016e82f5d33f2c5ec90479c31fe)
---
 sys/compat/linux/linux_misc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index fb86de6e7302..0925ffb64480 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -1045,8 +1045,7 @@ linux_setgroups(struct thread *td, struct linux_setgroups_args *args)
 	crextend(newcred, ngrp);
 	p = td->td_proc;
 	PROC_LOCK(p);
-	oldcred = p->p_ucred;
-	crcopy(newcred, oldcred);
+	oldcred = crcopysafe(p, newcred);
 
 	if ((error = priv_check_cred(oldcred, PRIV_CRED_SETGROUPS)) != 0) {
 		PROC_UNLOCK(p);

From nobody Tue Sep 23 12:03:43 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJXv6ypvz68XhC;
	Tue, 23 Sep 2025 12:03:43 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJXv3nFjz3F2h;
	Tue, 23 Sep 2025 12:03:43 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629023;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=nGlmNKGxSD273gTD2TuGOUIq9HoruRMTtGqxR9kfMOQ=;
	b=kyHH2WBEW8QzosZ2CHxN9tfaL5P9fTdueI0T2g6bS3yPALYPzhTsyYjnKJ/XnNYoDzdmEi
	TR0xjN/ibkVryHiYA30lnosDKkfhsRvQu4kXTL/TF7YMW4MkxEIxMgiKU1Psagr5vCjy0P
	vLZeOLxQrImynUt2v1GHv6nFyhPuxzpQHBQrD55DYTA1L5rJDi1t3rYDxcizfMpbSJGl7I
	49t342QAEYOdHXOJVHZvIkW+EewJjKjPrdWO/FsPXyPOJSEa+kR8Zr8gWSAMiWrRf5V/Tm
	LeiUErbRkpJRPgCuLIN1lYbyCYCo19MNxXgsuuRivaY+C9ckF2qiXK0goE7qCw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629023;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=nGlmNKGxSD273gTD2TuGOUIq9HoruRMTtGqxR9kfMOQ=;
	b=L4V4eeJ99Ynap+EACWkx3GEjBqHsMJdAHaWYEEpmLlHe9zaA0R7SUt+/12i9C0wgBYKzoZ
	Ko2MQl/dP8+rtE5VS1PeEs7Ndz2nA77v63Q9nk1gZ7mdcYh5BV868j+yFhYUA4PuccCupT
	+EEJoy29jyhFL/NEjLjzR7byrmrGpmTyTCGBngJDA8BqzrV22g6TMOj0rKGH1M1XXSHyR4
	ErCizvMCKjzamGh3tgood6yNOTYoW+L85xTqATe01TAphURiA/qcRkO7S71S2SAn3qIqww
	s89msU2laBHVxDxrFzrHVmRivnXYEX09RknUXtDAtAiAcJNa6S3kxWWV0qYTUg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629023; a=rsa-sha256; cv=none;
	b=mDLTuVt8UqEQ7QlKr8CIx5sK7oOoEKxUcbaSQtQZpye/PYpEifHEgG/gTnDagJIs/6vL5C
	iQ7Zx9hBGdW4nxt9qnVhLlfObNYGwGlgEM2QdRw27yJmfCHUCyKMNo+Tfg+HO5Jt9RprO4
	cGH3Fq8/Jktto71qHPAjWcWrwp4LvxDE0hV1SXK4LpM+6d6NWEQtqBblJqJ/Ht27spkc0a
	O/GYFjYgMLuAXH7gvSi1M/s1RQed2ahgQSiO2DQUu3QNwOwE1QfEyGdo9BLWfhaJL5nyP9
	3SuFGGVV4ocTzVf4KUsMYLDoROFcG+f++HVFtF6vGD+m4XKr2JSWeEN2mShxDA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJXv36B9zlfR;
	Tue, 23 Sep 2025 12:03:43 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3hAe008758;
	Tue, 23 Sep 2025 12:03:43 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3hHG008755;
	Tue, 23 Sep 2025 12:03:43 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:43 GMT
Message-Id: <202509231203.58NC3hHG008755@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: 5eaee33a2a70 - stable/15 - linux: getsockopt():
  Simplify exporting groups a bit
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: 5eaee33a2a701ef86026338fbfa9dda4634e3b2c
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit 5eaee33a2a701ef86026338fbfa9dda4634e3b2c
Author:     Olivier Certner 
AuthorDate: 2025-08-29 08:26:59 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:45 +0000

    linux: getsockopt(): Simplify exporting groups a bit
    
    No functional change (intended).
    
    Go through conversion to a 'l_gid_t' before copying out in order to cope
    with differing group types (except for not representable values, of
    course).  This is what is done, e.g., for getgroups() in 'linux_misc.c'.
    As Linux's group type is the same as ours on all architectures, we could
    as well just stop bothering and copy out our memory representation,
    eliminating the loop here.  Whatever the choice, though, it has to be
    consistent here and there.
    
    Introduce 'out' of type 'l_gid_t' to avoid performing "by hand" array
    arithmetics when copying out.
    
    MFC after:      5 days
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52280
    
    (cherry picked from commit 10b789d7e14862c77f77f07e8af84d73d73012c6)
---
 sys/compat/linux/linux_socket.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c
index 539d153431c4..0e07b0a60ced 100644
--- a/sys/compat/linux/linux_socket.c
+++ b/sys/compat/linux/linux_socket.c
@@ -2179,6 +2179,7 @@ static int
 linux_getsockopt_so_peergroups(struct thread *td,
     struct linux_getsockopt_args *args)
 {
+	l_gid_t *out = PTRIN(args->optval);
 	struct xucred xu;
 	socklen_t xulen, len;
 	int error, i;
@@ -2197,13 +2198,12 @@ linux_getsockopt_so_peergroups(struct thread *td,
 		return (error);
 	}
 
-	/*
-	 * "- 1" to skip the primary group.
-	 */
+	/* "- 1" to skip the primary group. */
 	for (i = 0; i < xu.cr_ngroups - 1; i++) {
-		error = copyout(xu.cr_groups + i + 1,
-		    (void *)(args->optval + i * sizeof(l_gid_t)),
-		    sizeof(l_gid_t));
+		/* Copy to cope with a possible type discrepancy. */
+		const l_gid_t g = xu.cr_groups[i + 1];
+
+		error = copyout(&g, out + i, sizeof(l_gid_t));
 		if (error != 0)
 			return (error);
 	}

From nobody Tue Sep 23 12:03:42 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJXt6H4Nz68YPL;
	Tue, 23 Sep 2025 12:03:42 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJXt3Kznz3Dpb;
	Tue, 23 Sep 2025 12:03:42 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629022;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=k5Xj+xRRVnUyizMajGa7/HakLaDNA60/fWk7JEB9swE=;
	b=KwLrGYxdMmrIkz849IneF/28jMgfSjC13zcHpmxBuS1kVzC7hUuDCIVhZqLCVxxlwXryag
	ZiM5s8cobsUiYzqPaBEOe5r2c9L2BFwfMFj8XmiWApt64xPsz0LHiOJt8+ClWO1xeOklzQ
	ZTtMjBtIRfJm2+DpLALtEZe8+hgFaoiH5aEGdu3mWAI2HpcRyKWFGhOloetXJJVvka1EkH
	KLElY74BTnlgtLZyXaG5Tde7YYHUbAPvao7Ab4X4pPdEyTqUeILyNiQ1Zc+Y9ZnT1xkiTv
	PbFGBkMUvakzO+q9xt/rbTkRVLPYc92o8lGvmDSifK+NLlzWwvROZtVP5WYiBg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629022;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=k5Xj+xRRVnUyizMajGa7/HakLaDNA60/fWk7JEB9swE=;
	b=hxZ/m07JeHUvDppTXfQSU769mNVLgsdJV+yRqxFn86ORve8yOKwWFW+aGDLkmS/kyGsKRn
	Mv7YH+KSB0WpnhbuDKR+b/BeRE/Hl8b76axvILXSWhG00/AnsvF7N5iGfGQHPY/Qsn7ooi
	2YUX5MDkYczXYV3oi6aOg3bHo+sJoKHmc1pssDR3eXM/M7UTG2hbzvefOTfiicgverOqi0
	Dz43f7pqSVWpBLWwKkAvuZMe6NLJjGE6lc5jEt+/c4PCARSmjiyTQFOF1fGwyVIP4EHXTB
	ldYH/IlxdyE73jzIbLmc04mUpa86VnrDGIhwFo2Z5HvHWxGagXbABwN96Q0QnQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629022; a=rsa-sha256; cv=none;
	b=HaP2RcuktBLHu4TIMmT5ELnlzD4xg29koxeQiBkjsRTVjc2TlSVbGYQzZ8r8pnLMsoSH38
	b8nH7cNR9ntOkVKQRiqBeUD4J/4EP6Nu3em+kOfSQIL17hhq6RAyht+hgUchLeTOP5R1nR
	DUujc9VKTX8qxqDVlxAJ456UmiqGvtOQtiMfv5cXiIMEoFGgrqm4I8c3KkXBo2aBzS8Ku1
	MBzipj8OSYXOevJGRLM7SM4AurHLXn/AExjpQxFIniCWbi5cdHZQUld5iNeTjOSk7AesyT
	WM+J5pIJzq6f54OIeG++JLIcn6EwvAtpFvEawW7jLa/jbxmmzWr5CJUFM2tSLg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJXt2r0Nzlqg;
	Tue, 23 Sep 2025 12:03:42 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3giG008721;
	Tue, 23 Sep 2025 12:03:42 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3gEg008718;
	Tue, 23 Sep 2025 12:03:42 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:42 GMT
Message-Id: <202509231203.58NC3gEg008718@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: db27bce904be - stable/15 - linux: setgroups16():
  Pre-extend the groups array
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: db27bce904befe71052372545e6e111075dcc801
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit db27bce904befe71052372545e6e111075dcc801
Author:     Olivier Certner 
AuthorDate: 2025-08-28 16:27:30 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:45 +0000

    linux: setgroups16(): Pre-extend the groups array
    
    For the size we know we will need in the end.
    
    No functional change (intended).
    
    MFC after:      5 days
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52279
    
    (cherry picked from commit b1326edddb302a28fc9418ab60df6210513cc07c)
---
 sys/compat/linux/linux_uid16.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/compat/linux/linux_uid16.c b/sys/compat/linux/linux_uid16.c
index dd681f971746..8ac093e004d0 100644
--- a/sys/compat/linux/linux_uid16.c
+++ b/sys/compat/linux/linux_uid16.c
@@ -102,6 +102,7 @@ linux_setgroups16(struct thread *td, struct linux_setgroups16_args *args)
 	}
 
 	newcred = crget();
+	crextend(newcred, ngrp);
 	p = td->td_proc;
 	PROC_LOCK(p);
 	oldcred = crcopysafe(p, newcred);

From nobody Tue Sep 23 12:03:44 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJXx1jQLz68Y7P;
	Tue, 23 Sep 2025 12:03:45 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJXw4vgyz3DvF;
	Tue, 23 Sep 2025 12:03:44 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629024;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Un32KL3VP9hOGu6W6ZqDhypdtt/Aj3yVvh2/FkQU/LQ=;
	b=FWjOXLQcATW8WF+WxHZ+iCNTpeFFwvzgBvsbpoK9pj5O1bcfIyWPQZ1oFyzWiravt1S+KG
	k36sn5oOJpoP0CTe6YkAeW8FznXPEmXk0isRP26k3u3b73NImgM0183yTIG9PdhOhwIvom
	s0X4fMaIkJ/x0NZWr7BUUQtiruyOxdl7ev0gWtFVEbGvr8G4opdqe2TQcT4QCRdPPG0hIN
	aGAlJm6Bk/cjozXMOG9pSotdOFVdIV8qhzF4ctxKfSC4rEh59bu31Ajx202f8c26F7J/9f
	+KqQm6f8H1Eini3PoCbWSM6Iktj6RKGUCQJGa0yOf5VuXtVjO+Zpdo/TDnklWg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629024;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Un32KL3VP9hOGu6W6ZqDhypdtt/Aj3yVvh2/FkQU/LQ=;
	b=roB4d67VewHf6qg2V8oV9iPcX6WPLMxGCYyzCalCl9YyjFmLH6dOdAsbeAWlejNMxO7Eem
	Zf+Ab4Hr0Epd7MPoIG3v6i6Kor1cgx80hgfYcuLWsQ6Z9F5P8WEyEGw3HU48I79Mmd+Hjo
	yAhQeI9koUF23H/JMHSljYU7vG4JvSlzid6NK9r1rqIzIRiwFL3eUK9liXUoPShSY9NIjU
	5oTDDcSewIWS+oV0G5hIOJRzr0skbJrlaRiiTlkIik8CfK3E+Rnm+68hBmK9qQ0pQKJoKr
	GCjo4x9A03hFpDZqr/iHAKNnBKYStbvECxio6OFf6eiQR7sSMm9vS5oZUZMZ9A==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629024; a=rsa-sha256; cv=none;
	b=D90bJHuUSIiA51Zxq65UqyxnZwyHEa2xQkE9+ghlG8S7Vuacd/WNc67a+/SfNl9WTqqXJp
	axGxgzcm2EYOoJuyUhKbEwwDpeWTaDSeyPrUWYAtjciOGxTfWkwf6Mz+2SKNtbd5SQ2awj
	gGayVC5r87NMDkT2+EzmvUJkKeIBGtjpuhDUlRauMN/06WMXp5Up9aSx9xnF4DbvsYX05G
	IQsxBkN/hmIiu8qiCz23Xm2gv4UeWNAT0QcFBB+8dyjZGK/+fn/HFNK9/w5T8KqEHLeft8
	GxOyE2mSdYHGiZUe/QzBU/sNh1vyxVep7Lm3c/Jz0ScKxgpXY2q0nLQlsJM3iQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJXw4Nh2zlqh;
	Tue, 23 Sep 2025 12:03:44 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3ioq008805;
	Tue, 23 Sep 2025 12:03:44 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3iR5008802;
	Tue, 23 Sep 2025 12:03:44 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:44 GMT
Message-Id: <202509231203.58NC3iR5008802@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: bef5c3713c90 - stable/15 - hastd: Remove some now
  useless assertion
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: bef5c3713c9020e8ce177a6ab279a254426501bd
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit bef5c3713c9020e8ce177a6ab279a254426501bd
Author:     Olivier Certner 
AuthorDate: 2025-08-29 08:21:38 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:45 +0000

    hastd: Remove some now useless assertion
    
    It is in fact redundant with the previous one, as the set of
    supplementary groups is expected to be empty.
    
    MFC after:      5 days
    MFC to:         stable/15
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52281
    
    (cherry picked from commit 59049f4b47ea8924ffae7c3c7b9e8c00a79285e0)
---
 sbin/hastd/subr.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sbin/hastd/subr.c b/sbin/hastd/subr.c
index add1280e960b..084ea50dae7c 100644
--- a/sbin/hastd/subr.c
+++ b/sbin/hastd/subr.c
@@ -156,7 +156,6 @@ drop_privs(const struct hast_resource *res)
 	struct passwd *pw;
 	uid_t ruid, euid, suid;
 	gid_t rgid, egid, sgid;
-	gid_t gidset[1];
 	bool capsicum, jailed;
 
 	/*
@@ -285,7 +284,6 @@ drop_privs(const struct hast_resource *res)
 	PJDLOG_VERIFY(egid == pw->pw_gid);
 	PJDLOG_VERIFY(sgid == pw->pw_gid);
 	PJDLOG_VERIFY(getgroups(0, NULL) == 0);
-	PJDLOG_VERIFY(getgroups(1, gidset) == 0);
 
 	pjdlog_debug(1,
 	    "Privileges successfully dropped using %s%s+setgid+setuid.",

From nobody Tue Sep 23 12:03:45 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJXy0J5kz68XhG;
	Tue, 23 Sep 2025 12:03:46 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJXx5Vkzz3Djx;
	Tue, 23 Sep 2025 12:03:45 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629025;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=yCBhpkwzosFYUc+FlzjFgevlnftS2ypqCcvLrjcjfZc=;
	b=c+ml+3pMhOhAlDsk6f2v/6Y1GAVV8NI8XkFVpz71/tUCfYAmhVc7YmhDOfs5TwlOFG7+U7
	x05eCGwhOpVRkaJ8kBAl8OGpwv67o0Vs9xDM1ZxYf12A+lOu/DDVZuzmPW339Qvb/kqtlL
	xVumc5iRFoCXDoEFfedpgxsMScM0USQ/wClcuTLWrmfD9eePQq9o08KCcWSu256UOGnvx1
	DpE9Vqj0F0EjRcNoOng5BAGVHACNzaNMyVW+jwmT0RXb8yfwss23Q/SvB3UWPnT7mVLVW+
	+8Ra/IDgrZHy2Nru5ncrVXzU1S5hro0SS/DF83mbedOnou3h1aqB44P0XOt/gw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629025;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=yCBhpkwzosFYUc+FlzjFgevlnftS2ypqCcvLrjcjfZc=;
	b=dO6tT2INMojERsrUHyNloLuKEvAFoQffUUh0gjZSqkdPjzwqWn5vZSoRcMYT7mqW5xVgHC
	MdCid2RJyyzA6XkC/eKDnXTFoj7NzC479O2bn9iHfa4u4YZxENBkIm2U0DI+oT3+HOZhDa
	8QpqrOwYeRK06nbVS7Lqui8GAkZVHECv0RSgVjeWQ9rEe+2sBny+MWZ09GD0VEPoTacMID
	2eCBzVin8wrPH4/8yLQCNP/CmUC1M4s81UWURrKNLSElNZXSOE5cTYGbioLO2lmq6u78TH
	8ZzdkOJazZ0MQ+NqXO4hi/Sb/t2rufgR9CzuLu7cmf3qpI0rCRFifxEeHevOvg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629025; a=rsa-sha256; cv=none;
	b=DDeJVSRJd0plbDKTuimvFuRVSG8tHC121km9Kmkzp2/eFvvc+F7lUVzA/G4x+8/mSJzHVk
	tWQJACpoxF10wIsCHJ8Thc5ajwk52zC9hXFWvHqEgYJ1y/DvlcHfjCpRikMlw3tUioAM1J
	y/wbVtRTV9Cwma5ZsDQVqzy5hCJJuJX/ap7tdQBnAVx0KfX2OMxDM4oe1zO56SsiriazxQ
	7UIp3fs2SOXd5gYX2iKGDEl1DbnubSyFpe6rowz8+4LGGLLk7fKSjXqaLKMDYcQODSw6qj
	QSumSbTjn1zCOySrT62uLCtXyVigRhM/4zD/vPCanTVQeDaNr6RteoEPa6DH3w==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJXx562FzllW;
	Tue, 23 Sep 2025 12:03:45 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3jOf008842;
	Tue, 23 Sep 2025 12:03:45 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3jXT008838;
	Tue, 23 Sep 2025 12:03:45 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:45 GMT
Message-Id: <202509231203.58NC3jXT008838@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: bea59ce7c96a - stable/15 - syscalls: Old
  setgroups(2)/getgroups(2): Remove superfluous STD type
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: bea59ce7c96ad3e7d84aa384fb08cda55c508907
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit bea59ce7c96ad3e7d84aa384fb08cda55c508907
Author:     Olivier Certner 
AuthorDate: 2025-09-12 12:27:43 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:46 +0000

    syscalls: Old setgroups(2)/getgroups(2): Remove superfluous STD type
    
    An examination of the scripts under 'sys/tools/syscalls' indicates that
    keeping STD as a type in the presence of COMPATxx does not make any
    difference, and regenerating system call files with STD removed does
    indeed not show any difference.  Moreover, this practice is inconsistent
    with the rest of the file.
    
    Thus, remove the superfluous STD type for the two above-mentioned system
    calls.  While here, re-order the remaining types for getgroups() to be
    consistent with other such occurences (COMPATxx before CAPENABLED).
    
    Reviewed by:    kevans, emaste
    MFC after:      5 days
    MFC to:         stable/15
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52499
    
    (cherry picked from commit 696cfb27ca4e60ebd49c45355a8a9c4945f84f98)
---
 sys/kern/syscalls.master | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
index 911f9093824b..967af1f5313c 100644
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -552,13 +552,13 @@
 		    _Out_writes_bytes_(len/PAGE_SIZE) char *vec
 		);
 	}
-79	AUE_GETGROUPS	STD|CAPENABLED|COMPAT14 {
+79	AUE_GETGROUPS	COMPAT14|CAPENABLED {
 		int getgroups(
 		    int gidsetsize,
 		    _Out_writes_opt_(gidsetsize) gid_t *gidset
 		);
 	}
-80	AUE_SETGROUPS	STD|COMPAT14 {
+80	AUE_SETGROUPS	COMPAT14 {
 		int setgroups(
 		    int gidsetsize,
 		    _In_reads_(gidsetsize) const gid_t *gidset

From nobody Tue Sep 23 12:03:46 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJXz46JPz68YS3;
	Tue, 23 Sep 2025 12:03:47 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJXy6M9Yz3F18;
	Tue, 23 Sep 2025 12:03:46 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629026;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=gIqSm+g+tMV7X5/Htnpt4bxTQpPK60yWkWATyFChbaU=;
	b=y3Gykqm7IQOfUuo/gjE15A/OYySvchHloOe2fKsVbrxYwCA/buD4xC+blsMLB/MJMiapd2
	2Ky1fi6zZNoZQ0gVe1aJhp7oMcyQPY9qSON1YuEtMBwZY6RXmxC3B/aoESADT1xbuYI3mW
	m0xiFGLFRdvwyNHoQuDpDcpw51ClkKYzOHU+uMc/MgO/Iq8UqtfM2lhQ80eFxoYFIZnS4+
	B5ldALUEndxYS4KEu4CctEYRwhGSFaWTXtViM2E9Jq6eXU08fpxuNakFHpYZu5YjmbhaFG
	AySXYygdV9EoQPqBHlIv8AuN6LJydx2RS8QRQ9XoPJBV7tvHle4/L7rRbh2sHw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629026;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=gIqSm+g+tMV7X5/Htnpt4bxTQpPK60yWkWATyFChbaU=;
	b=rPxPsiXMt90PHhtzSoyxKvgRZlrgWNwqCkgUqeyKa5koaqJWPmL4EfGZk8nlxxLvkR2+dk
	6wVP/3N0YQA541l//zCKX1n9glgwIe3WqC4R0CqXv3XNjWEyux/U2s+phmTPqW6pdcmk+1
	0m7bYEgiAExE5HoTyWqAqbekCNCimXvaJra0/7QEFix5vWzTz3M8W7gFAi3xFt6Tj/QM13
	IDFYz6z++Y5WwQKMa5PrkUxsRB8LX7l50N5jyvooSLnzfmAn3vqCF6fcs4NvmkUVP3Df2a
	rwbmwfUOmJhhtvcTRGECDlqlPN9uZidH1AF9GUgn9wMku5dt4mhStjF+sAoQ1w==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629026; a=rsa-sha256; cv=none;
	b=NDzAsJY/Yh3w3S0TdJydMyX06WB7jHkXyp9LBYLFjb2IyN8lXwmLJ4fSW0KYQSUDucTe7/
	UtwLvo+AeDXr9mmcBPwg2c1DA+qXPkeZFYe+Lkoe9nbt0ppRSRdg5/8nPV1AhlpQON98ny
	GRrjiQ34RzHYuf7ct9+Vc+GgmWBpL88Me5GIzDcxF9Ei3Iwk9y9ONmeK7pUYFektjsLjal
	KqASKAd676Kwa+79i1NoRpqOINMLe+gadnvv2jNSUZc4VsalGfR0xf/l19b51OGocaLQFn
	E2R2ki4uNfmsfrlKPHt33JNG0521x34icrgDCSVuclwKRhVTvGosuabLFs34tQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJXy5pm0zllX;
	Tue, 23 Sep 2025 12:03:46 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3k5D008875;
	Tue, 23 Sep 2025 12:03:46 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3kAF008872;
	Tue, 23 Sep 2025 12:03:46 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:46 GMT
Message-Id: <202509231203.58NC3kAF008872@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: fda64d005e4e - stable/15 - initgroups(3): Fix return
  value on allocation failure
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: fda64d005e4e9d06166d38fc5e0a26c7d03e61be
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit fda64d005e4e9d06166d38fc5e0a26c7d03e61be
Author:     Olivier Certner 
AuthorDate: 2025-09-16 15:52:20 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:46 +0000

    initgroups(3): Fix return value on allocation failure
    
    We must not return ENOMEM, but rather -1 with 'errno' set to ENOMEM, as
    described in the manual page and as other implementations are doing.
    A malloc() failure actually already sets ENOMEM for us.  Add comments
    indicating which function set 'errno' each time we return.
    
    While here, improve style and remove useless headers.
    
    Reviewed by:    kib, emaste
    Fixes:          54404cfb13d4 ("In preparation for raising NGROUPS and NGROUPS_MAX, ...")
    MFC after:      5 days
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52580
    
    (cherry picked from commit 0b018cfd81d8fdd64af3fe94c6989a82c0d3afa9)
---
 lib/libc/gen/initgroups.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/lib/libc/gen/initgroups.c b/lib/libc/gen/initgroups.c
index b6697dd7ed8f..55f17a94fa8e 100644
--- a/lib/libc/gen/initgroups.c
+++ b/lib/libc/gen/initgroups.c
@@ -31,11 +31,7 @@
 
 #include 
 
-#include "namespace.h"
-#include 
-#include "un-namespace.h"
 #include 
-#include 
 #include 
 #include 
 
@@ -51,12 +47,13 @@ initgroups(const char *uname, gid_t agroup)
 	 * setgroups to fail and set errno.
 	 */
 	ngroups_max = sysconf(_SC_NGROUPS_MAX) + 2;
-	if ((groups = malloc(sizeof(*groups) * ngroups_max)) == NULL)
-		return (ENOMEM);
+	groups = malloc(sizeof(*groups) * ngroups_max);
+	if (groups == NULL)
+		return (-1); /* malloc() set 'errno'. */
 
 	ngroups = (int)ngroups_max;
 	getgrouplist(uname, agroup, groups, &ngroups);
 	ret = setgroups(ngroups, groups);
 	free(groups);
-	return (ret);
+	return (ret); /* setgroups() set 'errno'. */
 }

From nobody Tue Sep 23 12:03:47 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJY11DNtz68Y7S;
	Tue, 23 Sep 2025 12:03:49 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJXz6YKxz3F1T;
	Tue, 23 Sep 2025 12:03:47 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629028;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=98GS8PAFbMwLQOOrSRS1GmgQdvqqcvNBEndotei4iqo=;
	b=b61XuHRFIceVKgVviq6xt5RhQWuyisVqFy2PqHgPsKy5VQqkVI9qLPVHeWjlmKK4+yBrGu
	LCraB9ifled+DvCBpGQNmIFIem8geMv0axB1UY3KHOhvEUMJrxw7NBd8A5Iyy7I15Xjlg4
	cm7+hEXaUVVTl0+cetS7dHqR8dR14g5j82S5eiWDfPl7nlHJXNVhtVxOshx49EkSbbowt2
	Sm4Be0wvd8NCGmTDTTnyQ8OAIVEUfx8eu55CTtLzFc0K7mCBP4hk56uq+z8AiGmVNkoTYH
	3rvDPsEpEqBwwc8kRVekDTUyy+QvVYVccVcU99GVyFKyZGAZHXPywBHx2bkfPw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629028;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=98GS8PAFbMwLQOOrSRS1GmgQdvqqcvNBEndotei4iqo=;
	b=ZurxV134T9bcEyK3WFQwbhw/f7ghMRY7HKIjKltpNpfw788fl22Pmu13E9rHss5h5mLdDy
	K1d+0+Ld9IwgTj1c5bnb125ZobTIlVkyAfhfiUh8c0uQM1SOOnxJy7/Nx7lqgzuGpSUP8W
	radsDYc9LtG58u2J0+26Qiyr4TDM/seHiYoV1tCbl44I17rE8EdSA4e0CFjFc4rov8MKIi
	o0b/c2/biU9Ow8SeuSjhdCw6LeKxkpivJtjVQIV/gk0kg9ux5eAiCpITCzxV9IzMQr4uze
	JShLNGeaKPpo+cYwrEN3m7ufQ2ahycn2xWcskTMqtr1yXeprDq9+AwtQGzN+Kw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629028; a=rsa-sha256; cv=none;
	b=hSLGTmwXgiSG3ZuvkoqRKkLVdHEDTf6CCG98kaoLpJXbdG0tOwObftoTAIrmojGSs+Hn2v
	ru9hg/iI2kVNYgBD/PuBKyjpjyQnEtoQfn2vZstN3SFBHx70Er44ilN/vVGR2JaE3uHFNF
	mhXBjOCVhfd/Q0jjFDwi5PmnNW1u2sLntKgswyUQ59UeiGbUcDUqOn9y4e7cZazxhdXASd
	M1wJR3VO1YzbbQPFLxUq4TAgmRg97pEwYoAPXoS7OlysGJWA60SM7+mEsRsWqoIpYdYTak
	RUnE8CZbmOhbLg42ByEykiMxmHfAw4J9Q97aHtMfAH7p6xra3Wm0cumiEtCw8A==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJXz66xxzllY;
	Tue, 23 Sep 2025 12:03:47 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3lYA008908;
	Tue, 23 Sep 2025 12:03:47 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3lOg008905;
	Tue, 23 Sep 2025 12:03:47 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:47 GMT
Message-Id: <202509231203.58NC3lOg008905@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: 8878569103a3 - stable/15 - initgroups(3): Add a
  pre-FreeBSD-15-compatible version
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: 8878569103a382aa2c7142c203285a50484fe298
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit 8878569103a382aa2c7142c203285a50484fe298
Author:     Olivier Certner 
AuthorDate: 2025-08-29 14:19:33 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:46 +0000

    initgroups(3): Add a pre-FreeBSD-15-compatible version
    
    After commit 9da2fe96ff2e ("kern: fix setgroups(2) and getgroups(2) to
    match other platforms"), initgroups() does not set the effective GID
    anymore and uses all passed groups as the supplementary group list.
    This effectively breaks backwards compatibility with programs/libraries
    compiled on a FreeBSD 14 or earlier system.
    
    Restore compatibility by creating a new version of the 'initgroups'
    symbol that designates the current implementation and providing
    a pre-FreeBSD-15-compatible version under the symbol's previously
    exported version.  The new version calls the new setgroups(2) system
    call, while the compatible one calls the original one (called
    freebsd14_setgroups()).
    
    Update the manual page with some history and comparison with other
    current open-source systems.  Add a "SECURITY CONSIDERATIONS" section
    highlighting some security properties of this approach and the reasons
    we adopt it.  While here, revamp the manual page, in particular to use
    the exact POSIX terminology where possible.
    
    Note for MFC to stable/14: Only the manual page update is to be MFCed,
    and the text changed to reflect the old behavior and inform readers of
    the new upcoming behavior in 15.
    
    Reviewed by:    kib
    Fixes:          9da2fe96ff2e ("kern: fix setgroups(2) and getgroups(2) to match other platforms")
    MFC after:      5 days
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52282
    
    (cherry picked from commit 9dc1ac8691966480ff8bd9c37dd405b981b41dd5)
---
 lib/libc/gen/Symbol.map   |   2 +-
 lib/libc/gen/gen-compat.h |   2 +
 lib/libc/gen/initgroups.3 | 101 +++++++++++++++++++++++++++++++++++++++-------
 lib/libc/gen/initgroups.c |  44 +++++++++++++++-----
 4 files changed, 124 insertions(+), 25 deletions(-)

diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map
index 26f638568efc..494b65bc5cc1 100644
--- a/lib/libc/gen/Symbol.map
+++ b/lib/libc/gen/Symbol.map
@@ -193,7 +193,6 @@ FBSD_1.0 {
 	__isinff;
 	__isinfl;
 	isatty;
-	initgroups;
 	jrand48;
 	lcong48;
 	ldexp;
@@ -462,6 +461,7 @@ FBSD_1.8 {
 	fdscandir_b;
 	fts_open_b;
 	glob_b;
+	initgroups;
 	inotify_add_watch;
 	inotify_init;
 	inotify_init1;
diff --git a/lib/libc/gen/gen-compat.h b/lib/libc/gen/gen-compat.h
index 08e80ede6b6e..dac8f54b45a2 100644
--- a/lib/libc/gen/gen-compat.h
+++ b/lib/libc/gen/gen-compat.h
@@ -52,4 +52,6 @@ int	freebsd11_getmntinfo(struct freebsd11_statfs **, int);
 char	*freebsd11_devname(__uint32_t dev, __mode_t type);
 char	*freebsd11_devname_r(__uint32_t dev, __mode_t type, char *buf, int len);
 
+int	freebsd14_setgroups(int gidsize, const __gid_t *gidset);
+
 #endif /* _GEN_COMPAT_H_ */
diff --git a/lib/libc/gen/initgroups.3 b/lib/libc/gen/initgroups.3
index 03bd07494fc9..4f538fb180ec 100644
--- a/lib/libc/gen/initgroups.3
+++ b/lib/libc/gen/initgroups.3
@@ -1,5 +1,13 @@
+.\"-
+.\" SPDX-License-Identifier: BSD-3-Clause
+.\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
+.\" Copyright (c) 2025 The FreeBSD Foundation
+.\"
+.\" Portions of this documentation were written by Olivier Certner
+.\"  at Kumacom SARL 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
@@ -25,12 +33,12 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd October 26, 2014
+.Dd September 17, 2025
 .Dt INITGROUPS 3
 .Os
 .Sh NAME
 .Nm initgroups
-.Nd initialize group access list
+.Nd initialize supplementary groups as per the group database
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
@@ -40,19 +48,18 @@
 .Sh DESCRIPTION
 The
 .Fn initgroups
-function
-uses the
-.Xr getgrouplist 3
-function to calculate the group access list for the user
-specified in
+function initializes the current process' supplementary groups as prescribed by
+its arguments and the system's group database.
+.Pp
+It first uses the
+.Fn getgrouplist
+function to compute a list of groups containing the passed
+.Fa basegid ,
+which typically is the user's initial numerical group ID from the password
+database, and the supplementary groups in the group database for the user named
 .Fa name .
-This group list is then setup for the current process using
-.Xr setgroups 2 .
-The
-.Fa basegid
-is automatically included in the groups list.
-Typically this value is given as
-the group number from the password file.
+It then installs this list as the current process' supplementary groups using
+.Fn setgroups .
 .Sh RETURN VALUES
 .Rv -std initgroups
 .Sh ERRORS
@@ -60,7 +67,7 @@ The
 .Fn initgroups
 function may fail and set
 .Va errno
-for any of the errors specified for the library function
+to any of the errors specified for the library function
 .Xr setgroups 2 .
 It may also return:
 .Bl -tag -width Er
@@ -77,3 +84,67 @@ The
 .Fn initgroups
 function appeared in
 .Bx 4.2 .
+.Pp
+The
+.Fn initgroups
+function changed semantics in
+.Fx 15 ,
+following that of
+.Xr setgroups 2
+in the same release.
+Before that, it would also set the effective group ID to
+.Fa basegid ,
+and would not include the latter in the supplementary groups except before
+.Fx 8 .
+Its current behavior in these respects is known to be compatible with that of
+the following systems up to the specified versions that are current at time of
+this writing:
+.Bl -dash -width "-" -compact
+.It
+Linux (up to 6.6) with the GNU libc (up to 2.42)
+.It
+.Nx 1.1 and greater (up to 10)
+.It
+.Ox (up to 7.7)
+.It
+Systems based on illumos (up to August 2025 sources)
+.El
+.Sh SECURITY CONSIDERATIONS
+As
+.Fa basegid
+is typically the user's initial numerical group ID, to which the current
+process' effective group ID is generally initialized, processes using functions
+to change their effective group ID
+.Pq via Xr setgid 2 or similar
+or that are spawned from executables with the set-group-ID mode bit set will not
+be able to relinquish the access rights deriving from being a member of
+.Fa basegid ,
+as these functions do not change the supplementary groups.
+.Pp
+This behavior is generally desirable in order to paper over the difference of
+treatment between the effective group and supplementary ones in this situation,
+as they are all in the end indiscriminately used in traditional UNIX
+discretionary access checks.
+It blends well with the practice of allocating each user its own private group,
+as processes launched from a set-group-ID executable keep the same user and
+consistently stay also in the same user's group.
+Finally, it was also chosen for compatibility with other systems
+.Po
+see the
+.Sx HISTORY
+section
+.Pc .
+.Pp
+This convention of including
+.Fa basegid
+in the supplementary groups is however only enforced by the
+.Fn initgroups
+function, and not by the
+.Xr setgroups 2
+system call, so applications expressly wanting to include in the supplementary
+groups only those specified by the group database can themselves call
+.Fn getgrouplist
+and then
+.Fn setgroups
+on the result with the first element skipped
+.Pq see Xr getgrouplist 3 .
diff --git a/lib/libc/gen/initgroups.c b/lib/libc/gen/initgroups.c
index 55f17a94fa8e..a1a7d92250e2 100644
--- a/lib/libc/gen/initgroups.c
+++ b/lib/libc/gen/initgroups.c
@@ -3,6 +3,11 @@
  *
  * Copyright (c) 1983, 1993
  *	The Regents of the University of California.  All rights reserved.
+ * Copyright (c) 2025 The FreeBSD Foundation
+ *
+ * Portions of this software were developed by Olivier Certner
+ *  at Kumacom SARL 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
@@ -29,22 +34,28 @@
  * SUCH DAMAGE.
  */
 
-#include 
+/* For __sym_compat(). */
+#include 
 
 #include 
 #include 
 #include 
 
-int
-initgroups(const char *uname, gid_t agroup)
+/* For freebsd14_setgroups(). */
+#include "gen-compat.h"
+
+static int
+initgroups_impl(const char *uname, gid_t agroup,
+    int (*setgroups)(int, const gid_t *))
 {
-	int ngroups, ret;
-	long ngroups_max;
 	gid_t *groups;
+	long ngroups_max;
+	int ngroups, ret;
 
 	/*
-	 * Provide space for one group more than possible to allow
-	 * setgroups to fail and set errno.
+	 * Provide space for one group more than possible to allow setgroups()
+	 * to fail and set 'errno' in case we get back more than {NGROUPS_MAX} +
+	 * 1 groups.
 	 */
 	ngroups_max = sysconf(_SC_NGROUPS_MAX) + 2;
 	groups = malloc(sizeof(*groups) * ngroups_max);
@@ -52,8 +63,23 @@ initgroups(const char *uname, gid_t agroup)
 		return (-1); /* malloc() set 'errno'. */
 
 	ngroups = (int)ngroups_max;
-	getgrouplist(uname, agroup, groups, &ngroups);
-	ret = setgroups(ngroups, groups);
+	(void)getgrouplist(uname, agroup, groups, &ngroups);
+	ret = (*setgroups)(ngroups, groups);
+
 	free(groups);
 	return (ret); /* setgroups() set 'errno'. */
 }
+
+int
+initgroups(const char *uname, gid_t agroup)
+{
+	return (initgroups_impl(uname, agroup, setgroups));
+}
+
+int
+freebsd14_initgroups(const char *uname, gid_t agroup)
+{
+	return (initgroups_impl(uname, agroup, freebsd14_setgroups));
+}
+
+__sym_compat(initgroups, freebsd14_initgroups, FBSD_1.0);

From nobody Tue Sep 23 12:03:48 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJY14GyHz68YSC;
	Tue, 23 Sep 2025 12:03:49 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJY10LdDz3FDM;
	Tue, 23 Sep 2025 12:03:49 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629029;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Xr5Ht6ftMyF0Zc4FqxZSVsd7CbOX7AK2yEyQxC6P2gk=;
	b=uthIyWjyul+CvKOT40RV5doWxQNZSgXkNKrsO3eInR7bseJCHd30ouuaAEVqH/0tKLBFZg
	yFkboTMkfkyTIL3wb6o5JRAmdSJp2mngPxZXl7xZvJqS5qiy7ZSJKM1Dkq2N1YhDEB3YCb
	5/jbVn5oSgzO66vyxDRSYwbzVTytvN1kM9CXDDh7BispMk1uCU+iC8buha1yUAvzbEPrl5
	ijhiBrudOro5sQ5aKW8A4XAfjoh/iBxPIzbisC/L2GjHwzGTKDNtYScxu7GjqMYj2e9qWS
	GWRjuhquyjWj0ZeRZk/iHrpyFrOCyGOH77eZNNjJXzgTVPrh2JrGlufTZ9p76w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629029;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Xr5Ht6ftMyF0Zc4FqxZSVsd7CbOX7AK2yEyQxC6P2gk=;
	b=ifbHgZK9qv/OnLbc5gEquYU7coFsMNaQhyfcc2wuOhEjsbvhXrLjvIMIAyoQTtwwmGY5HF
	VDpfvP7C1Tgks8a7Siu1crXc1/mmwXnqJvLaXBqIQdTFmRkrRfFCFvAZywKglbtCrxAM8P
	CF6bl0POBXfwPaZyQV6FS+1G5hm+UoUJ5LP0i+UlkIX6WIKX/4ea2i3gTgGfiAnaSchWB+
	LdLa18X274beIbbsbSbGInn9qd0V7g5fSdQIOBoEmdY5qHaHSv6X5D8IrRMnD4D31ADwBL
	GdHL4Usb934buSBUZd5o8zbGcRjWLSf4/X/sn7HSzHvU/8GOmOMVU8+fXfTE6g==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629029; a=rsa-sha256; cv=none;
	b=yKvxmRs3FNhMN/54qck7q4QDoIWvliv4J9adi4tHZRONs2CKHUsnLGsqiGtfmWWwi2UheE
	9WVFzms2y23+m0hq5wZxInitY7nZ1i5Ba4gzTIx8nL3rbDr4NvERiEhz3cQnNRzsb209dl
	JUDP3ad7fXdHTQLIyLRDvelYt08OT796NSlOW80Q6yR8L9lMNW6Mq2bQCNjLVLpiiJN4eS
	AfBlUdlv278C57IsYgIqrSR5f9O39XxoDQ7JubWmpbFajz88tjMuBEae2yoOKejaEsn8B9
	EQbsAsvcLUvVy5qWus4UK0JNmUHUlgyP3FYVNK1KJqgj2PY4NgFmAZqX7zlHgQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJY06yxwzlXd;
	Tue, 23 Sep 2025 12:03:48 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3mcx008943;
	Tue, 23 Sep 2025 12:03:48 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3m8W008940;
	Tue, 23 Sep 2025 12:03:48 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:48 GMT
Message-Id: <202509231203.58NC3m8W008940@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: d0aa1b863d7b - stable/15 - getgrouplist.3: Rework,
  use more appropriate terminology
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: d0aa1b863d7be92d2c86f292f7b32f55240becf4
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit d0aa1b863d7be92d2c86f292f7b32f55240becf4
Author:     Olivier Certner 
AuthorDate: 2025-08-29 14:53:52 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:46 +0000

    getgrouplist.3: Rework, use more appropriate terminology
    
    Bring up to date with NSS by substituting "file" with "database".
    
    Describe more precisely which database is accessed, i.e., only the group
    database, which value should be used and where it lands in the result.
    
    Prefer a terminology referring to POSIX terms, i.e., use "effective
    group list" instead of "group access list".
    
    Reviewed by:    gbe
    MFC after:      5 days
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52283
    
    (cherry picked from commit 9294eb44eecb71f573f29ff84ce1bd3aa93c077c)
---
 lib/libc/gen/getgrouplist.3 | 29 +++++++++++++++++++----------
 1 file changed, 19 insertions(+), 10 deletions(-)

diff --git a/lib/libc/gen/getgrouplist.3 b/lib/libc/gen/getgrouplist.3
index e9a980f99751..e3939fc2481a 100644
--- a/lib/libc/gen/getgrouplist.3
+++ b/lib/libc/gen/getgrouplist.3
@@ -1,5 +1,13 @@
+.\"-
+.\" SPDX-License-Identifier: BSD-3-Clause
+.\"
 .\" Copyright (c) 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
+.\" Copyright (c) 2025 The FreeBSD Foundation
+.\"
+.\" Portions of this documentation were written by Olivier Certner
+.\"  at Kumacom SARL 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
@@ -25,12 +33,12 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd October 26, 2014
+.Dd August 29, 2025
 .Dt GETGROUPLIST 3
 .Os
 .Sh NAME
 .Nm getgrouplist
-.Nd calculate group access list
+.Nd produce a user's effective group list
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
@@ -40,16 +48,16 @@
 .Sh DESCRIPTION
 The
 .Fn getgrouplist
-function reads through the group file and calculates
-the group access list for the user specified in
-.Fa name .
-The
+function reads through the group database to retrieve the supplementary groups
+for the user specified in
+.Fa name ,
+and returns the effective group list, whose first group is the value of
+.Fa basegid
+and the others are the retrieved supplementary groups.
 .Fa basegid
-is automatically included in the groups list.
-Typically this value is given as
-the group number from the password file.
+typically is the user's group number from the password database.
 .Pp
-The resulting group list is returned in the array pointed to by
+The effective group list is returned in the array pointed to by
 .Fa groups .
 The caller specifies the size of the
 .Fa groups
@@ -70,6 +78,7 @@ Here, the group array will be filled with as many groups as will fit.
 group membership list
 .El
 .Sh SEE ALSO
+.Xr setcred 2 ,
 .Xr setgroups 2 ,
 .Xr initgroups 3
 .Sh HISTORY

From nobody Tue Sep 23 12:03:51 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJY35Vq1z68YPX;
	Tue, 23 Sep 2025 12:03:51 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJY31WMNz3FHN;
	Tue, 23 Sep 2025 12:03:51 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629031;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=ckUVKmEvJxhrXQPjJGajP5GY2lAzmHecUbvDKKEInqQ=;
	b=AVSAaSjMjlXcavdak7kCrJeE4F+eg5MO4qXejqBVrJdMBbWa7Tuf1nNFbMM/P3z2B7uOmL
	tPIhtQr8SE+7ngiBWOkQXQMzC/GPKdWHcmI2/KIgxAKs6ic1CwQ7icFs+CWeXY42rfNUrF
	DGnjmI0SQbfD/PazAlgWCLa5CV4y+HEmmIdHemEImjafWxEiff8YEJRWbrt38Lp/K2WX6T
	+qtNf2plEohvpFar18G+VhkZMCQfcsxKHZlyPEwz13c234bPSWslcohcu0Jm1zEj7KhuWC
	SA6p66mU7blLldzSw8dFN++P1VMJs4yw2Zc/ENukNGzXjAVZ3ortotqsRlm1Sg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629031;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=ckUVKmEvJxhrXQPjJGajP5GY2lAzmHecUbvDKKEInqQ=;
	b=RNIYp60SGcgVEsXuOYIDQBXV29BQ2SIG1lRNAyHfC+Wgn5h/1mw+wBQXMcj9GhyvcqBSja
	4kzYuZJ2XfuNW4imyl9/Ni93i1gC/uuKKtOJbPVqKCpvTndh7DQUb4pD+q2iRs984xH3HH
	wXWgdpXQqV5N9LJFxmfuZz+4m7mD3JvubgFF9gbXm4DcUeyQ603l4Q7F61sPfkyXoTMFd9
	mO7PAOz6vNsCk7OtI4ADBB8SA9P3bts09eXlxDrWOzoVLCQiB50iUglu4Yt+1gA+CcaY67
	ZJxMRAX+Gc/pnAAZftrf7c9FobbJBOfFAjBgANSJB3CaVkpEzWXxOwT70pBGrg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629031; a=rsa-sha256; cv=none;
	b=UF5H3yVNIfUZ4hKB/9Neg2ivgNgPhEEIDAMDjXQ/MaaCOTXo8F0CV9swydVYFg0tLCwHZz
	jr48Q+L162HS4xSsc3YDqkcDvfb7ERxxOPIEN8/wTQ8bfOWAqd2Jq8/xJW9TDXQATkFzfE
	clGZQKik6SBV1gHPR55WU7iP9x1+HmW+tL3TQLjD9bTMJMaiXn18672zU6yNDcoTKghOg2
	J2k5C71pKMA1M3G4kFh2X8WS/L/cPRrmWLDN/H+ewq93JWX9jk8X6WDWqynfM8uVctY/3z
	AvJpMLVqVE9vz1BDqbcb/xweJd2OPGxK+g4NlywCorMzy1qTPIF2LbPxR0jkJw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJY312HSzlqj;
	Tue, 23 Sep 2025 12:03:51 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3pKx009017;
	Tue, 23 Sep 2025 12:03:51 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3poW009012;
	Tue, 23 Sep 2025 12:03:51 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:51 GMT
Message-Id: <202509231203.58NC3poW009012@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: af6ac3228415 - stable/15 - setcred.2: Remove now
  obsolete mention of setgroups(2)'s different behavior
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: af6ac322841586aedfe3f89462ae89685e1dea2f
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit af6ac322841586aedfe3f89462ae89685e1dea2f
Author:     Olivier Certner 
AuthorDate: 2025-08-29 15:12:59 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:47 +0000

    setcred.2: Remove now obsolete mention of setgroups(2)'s different behavior
    
    Reviewed by:    gbe
    Fixes:          9da2fe96ff2e ("kern: fix setgroups(2) and getgroups(2) to match other platforms")
    MFC after:      5 days
    MFC to:         stable/15
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52285
    
    (cherry picked from commit 66b54c48b2ae1c1759134cad5daa6fc27b679918)
---
 lib/libsys/setcred.2 | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/lib/libsys/setcred.2 b/lib/libsys/setcred.2
index 86f61ddfdb30..f5d1f15b631b 100644
--- a/lib/libsys/setcred.2
+++ b/lib/libsys/setcred.2
@@ -6,7 +6,7 @@
 .\" This documentation was written by Olivier Certner 
 .\" at Kumacom SARL under sponsorship from the FreeBSD Foundation.
 .\"
-.Dd December 19, 2024
+.Dd August 29, 2025
 .Dt SETCRED 2
 .Os
 .Sh NAME
@@ -119,11 +119,6 @@ It must be less than or equal to
 An array of IDs to set the supplementary groups to, if flag
 .Dv SETCREDF_SUPP_GROUPS
 is specified.
-Note that all groups in this array will be set as supplementary groups only, in
-contrast to
-.Xr setgroups 2
-which treats the first element specially as the new effective group, not adding
-it to supplementary groups.
 .It Fa sc_label
 A pointer to a valid MAC label structure, e.g., built with the
 .Xr mac_from_text 3

From nobody Tue Sep 23 12:03:49 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJY30dt9z68Xky;
	Tue, 23 Sep 2025 12:03:51 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJY21Pr1z3FBP;
	Tue, 23 Sep 2025 12:03:50 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629030;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=RZ2hcbanRvBjrG8DHfyVOhx2jikytvLoEKScYpmA/Iw=;
	b=QVQTMUp9TFi2wJ4R3f/LRZozMgpm8MMEJGLBg0iGor4WWsZcp7XVFnz9GjCsobiyti4ymD
	XY6baDBvhgM3J6XbvSPM/yEKUsYh7+gUtdmZIwBzGSiaLG+sEoId1GHT1pw9ZhQzKQ5e8p
	XFowlxDQr2ulHfGYPWn5dU5JbxwQ9viQUE6kXtzViyqOnAD9lXKsESscNKPz3uIl86/J+m
	o2dBz8X1uf/pkIUEaerFmlr40xFM7uOLyZp36U4WqZBqpZpJz74b7vR74d7FVg+YjxGeFo
	Lo3traqmMGUj0EO091+MnEDJKOvhsFv2tctVK9cPaRxSkVzbyMB33TDhEU8wCQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629030;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=RZ2hcbanRvBjrG8DHfyVOhx2jikytvLoEKScYpmA/Iw=;
	b=SPAt139eS6k1gQt23/BjABKgvJn6eGUHKcqsFPUXrt8ozijPIPz8mh2OGSCERdYiujwfdV
	oEovuY9tr3I4tdGMPBhySo6JWmkwRjV2SKQE8BjMT8GPmNDdx4Fg5wJ4eg4KZLEzDHMcMa
	WlToIhGQDGjsTYXjcGI39DbIe4BqsTQG+qi2ENRy96/Wuc/Px2SecgfhjN3PPoOdoVGsCC
	k1b6DhIjQ3ZSk3MOxYripcvXF6MK1WQgyPNKqgZlnBxtuGb1DS3cPrROL1BRyLDzsU+WIN
	BIMDeZDiPducvOiscFSBJH2b076ulKojg2zJpOpMjOiwsUnefVBMpqz8vLMamA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629030; a=rsa-sha256; cv=none;
	b=CUft4tBxhLufNWK8gkJIcxFNBa2oXAKWXuhpV1RWT/fJfFtXtvnUCH5KUmA6cqflSn5N05
	Efa310wEt0C0WxiUigp6BLHiY3jNTQW573Kb0gVi07VAiuLQqYUoRbPkaEFGv2HQq7IOQn
	LYwWueYPzfzv8ukwq3/0nl8F6tJbFWhz3S8v6Dv02XAY23Iceuo7dm8AzYNiwejcHWSKUz
	APLZUHAdaLtoF7iS2b37qiTz5qPeEzkes4IM3O7x/iSsxW5+3yXyZz4wqCNVc+zxwWOHlV
	eTilgbEdua6JksqkW/Q65iq/e69+t+3tWvdy7aEaNbaF+2MelBr1G7hHBvoLYA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJY20RXYzlw7;
	Tue, 23 Sep 2025 12:03:50 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3nXC008981;
	Tue, 23 Sep 2025 12:03:49 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3npR008978;
	Tue, 23 Sep 2025 12:03:49 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:49 GMT
Message-Id: <202509231203.58NC3npR008978@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: 7132fb5edbc9 - stable/15 - setgroups.2: Add SECURITY
  CONSIDERATIONS, fix the groups limit, rework
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: 7132fb5edbc935b28229d3115e8185d8b4abbf1a
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit 7132fb5edbc935b28229d3115e8185d8b4abbf1a
Author:     Olivier Certner 
AuthorDate: 2025-08-29 15:10:22 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:47 +0000

    setgroups.2: Add SECURITY CONSIDERATIONS, fix the groups limit, rework
    
    Add a new SECURITY CONSIDERATIONS section describing in details what the
    new behavior is after commit 9da2fe96ff2e ("kern: fix setgroups(2) and
    getgroups(2) to match other platforms"), what setgroups(2) does not
    do anymore, and how programs using it are affected.
    
    Fix the groups limit after commit 9da2fe96ff2e ("kern: fix setgroups(2)
    and getgroups(2) to match other platforms").
    
    Prefer a terminology referring to POSIX terms, i.e., use "effective
    group list" instead of "group access list".
    
    While here, fix some style.
    
    Note for MFC to stable/14: The content will have to be revised as the
    new behavior is not in place.  The latter should still be mentioned as
    upcoming in 15.
    
    Fixes:          9da2fe96ff2e ("kern: fix setgroups(2) and getgroups(2) to match other platforms")
    MFC after:      5 days
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52284
    
    (cherry picked from commit 6d22cd6b5f8b5604f1fe9e70930b1506f990e31e)
---
 lib/libsys/setgroups.2 | 99 ++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 83 insertions(+), 16 deletions(-)

diff --git a/lib/libsys/setgroups.2 b/lib/libsys/setgroups.2
index 451f63ba1266..0ec99507cfb0 100644
--- a/lib/libsys/setgroups.2
+++ b/lib/libsys/setgroups.2
@@ -1,5 +1,13 @@
+.\"-
+.\" SPDX-License-Identifier: BSD-3-Clause
+.\"
 .\" Copyright (c) 1983, 1991, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
+.\" Copyright (c) 2025 The FreeBSD Foundation
+.\"
+.\" Portions of this documentation were written by Olivier Certner
+.\"  at Kumacom SARL 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
@@ -25,12 +33,12 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd August 1, 2025
+.Dd September 17, 2025
 .Dt SETGROUPS 2
 .Os
 .Sh NAME
 .Nm setgroups
-.Nd set group access list
+.Nd set the calling process' supplementary groups
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
@@ -41,21 +49,21 @@
 .Sh DESCRIPTION
 The
 .Fn setgroups
-system call
-sets the supplementary group list of the current user process
-according to the array
-.Fa gidset .
+system call sets the calling process' supplementary groups according to the
+.Fa gidset
+array.
 The
 .Fa ngroups
-argument
-indicates the number of entries in the array and must be no
-more than
+argument indicates the number of entries in the array and must be no more than
 .Dv {NGROUPS_MAX} .
+.Pp
 The
 .Fa ngroups
-argument may be set to 0 to clear the supplementary group list.
+argument may be set to zero to clear all supplementary groups, in which case
+.Fa gidset
+is ignored.
 .Pp
-Only the super-user may set a new supplementary group list.
+Only the super-user may install a new supplementary groups set.
 .Sh RETURN VALUES
 .Rv -std setgroups
 .Sh ERRORS
@@ -69,16 +77,16 @@ The caller is not the super-user.
 The number specified in the
 .Fa ngroups
 argument is larger than the
-.Dv {NGROUPS_MAX}+1
+.Dv {NGROUPS_MAX}
 limit.
 .It Bq Er EFAULT
-The address specified for
+Part of the groups array starting at
 .Fa gidset
-is outside the process
-address space.
+is outside the process address space.
 .El
 .Sh SEE ALSO
 .Xr getgroups 2 ,
+.Xr setcred 2 ,
 .Xr initgroups 3
 .Sh HISTORY
 The
@@ -92,4 +100,63 @@ the
 .Fn setgroups
 system call would set the effective group ID for the process to the first
 element of
-.Fa gidset .
+.Fa gidset ,
+and only the other elements as supplementary groups.
+Despite treating the first element as the effective group ID to set, it accepted
+an empty
+.Fa gidset
+.Po
+.Fa ngroups
+being zero
+.Pc
+as a stance requiring to drop all supplementary groups, leaving the effective
+group ID unchanged.
+.Sh SECURITY CONSIDERATIONS
+The
+.Fn setgroups
+system call sets the process' supplementary groups to those contained in the
+.Fa gidset
+array.
+In particular, as evoked in
+.Sx HISTORY ,
+it does not anymore treat the first element of
+.Fa gidset
+separately.
+Formerly, it would set it as the effective group ID while only the others were
+used as supplementary groups.
+.Pp
+Programs solely relying on
+.Fn setgroups
+to change the effective group ID must be modified, e.g., to also call
+.Xr setegid 2
+or to instead use
+.Xr setcred 2 ,
+else they will unwillingly keep their effective group ID.
+.Pp
+Programs using
+.Fn setgroups
+with the effective group ID as the first element of array
+.Fa gidset
+and not duplicating it in the rest of the array, which includes those using
+.Fn initgroups ,
+now insert this group ID in the supplementary groups set.
+This is in general desirable, as explained in the
+.Xr initgroups 3
+manual page, and has the consequence that subsequent process' effective group
+ID's changes do not remove membership of the original effective group ID, since
+these changes do not affect the supplementary groups.
+Applications that expressly do not want that must be modified to stop passing
+the effective group ID as the first element to
+.Fn setgroups .
+.Pp
+To clear all the calling process' supplementary groups, always use the statement
+.Bd -literal -offset indent
+setgroups(0, NULL);
+.Ed
+.Pp
+which works also on older FreeBSD version
+.Po
+see the
+.Sx HISTORY
+section
+.Pc .

From nobody Tue Sep 23 12:03:52 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJY50W4Qz68YTg;
	Tue, 23 Sep 2025 12:03:53 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJY42B1zz3FBp;
	Tue, 23 Sep 2025 12:03:52 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629032;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=zcL5hGc0yqs3SAAaj5MNJibLQexcaQN0F7pNfna0vS0=;
	b=AA0QvY2+Sl7AVplD5xp3lm+w8Z8xRnbGCl4QWCIbDrNl8jmD9mx3hmBSI+BosRXzo+TFd4
	zoGt66ipgZyeaZkqgfc/Z3fsNn9R4NuCC7PCjs5qFxyCEHB20lbUteXcinDih/XJn23VEw
	cBFiXTzZr77lYzgn+Ojhf0nivF9YqbDzN/v93TpRtrrJevm919+qss05wqkpu08zhwK7CY
	nHVfIBw24Ot59RpM6+5y7Djwp/fJ1Vj7QVywIZLcRFAqX1+oH8Wq4BL+pNBKpwoosrq4On
	+iS6nk2tOhz50hupboI6Z6mcU0+66T5nhIhIkjX1O6pUNx008v3SLDuCqBUUXg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629032;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=zcL5hGc0yqs3SAAaj5MNJibLQexcaQN0F7pNfna0vS0=;
	b=blRABvqPUg1DCgGvccisnkFwnkg5pCN+ae6fdAE9FGALvtBWB45xLkLISYPLs0u4941MgV
	XLTcaTD8uwSZmkwHad3AMNEzZpNU95qL4ovCYqqoQSF29bdH8zsP+5jQytx4XBPl1nOZDT
	X4nJt+dtOMTmnLf2gVbGm8rIuvHB6R/AvOrW1WHW82Im0sAlOuGFfgWk7X7rC24lbXR3bL
	MMTORkYioA0LqQVDuQY+KKUaR2oqib/NADbIWM+gLtu+9Uz3VU2r8RIwFtfUOgQdVQls/V
	M7HiHfoMBQDiBhsXFwk519JpTp1fLwGiN88v4817L8L8ufQglXvswYSPSNkNkA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629032; a=rsa-sha256; cv=none;
	b=pt91UzV0W4NSOYPagZuhxP7tr4sAFRHuX66XvK97+BSox3Noq3w6JoK+0mekxg1jlkmNco
	m7MfSAHEQTN7TL3Y6rbY+QdNwNdcCIRjiJGXGoTAVqmy6YukzT9Hj3Yt9NEH0FNOVAvg8R
	gQdH9usghh+A7n4gG1cqRbkH3j2eXOti3VlfOCYh+u8KAVlE920gNx4YLg6izxieG/OpZX
	gZPZCPzAUj747jS2nUC+xlJmTH2Xn/d8QqJ45aaK/n8jMGMEY2VtkTGlsDzHDpzzOHvryl
	/I9Nimb251YGRE1IDrJKGETGNNMJtbsfp9c/aZBPR4tzNjkfwsnN55sAQ2I/Cw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJY41mlGzllZ;
	Tue, 23 Sep 2025 12:03:52 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3q1G009055;
	Tue, 23 Sep 2025 12:03:52 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3qGP009052;
	Tue, 23 Sep 2025 12:03:52 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:52 GMT
Message-Id: <202509231203.58NC3qGP009052@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: 2932e6f59bff - stable/15 - getgroups.2: Clarify,
  mention ascending order, add SECURITY CONSIDERATIONS
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: 2932e6f59bff7cc7d87d88b07bf6e26d3631bbdb
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit 2932e6f59bff7cc7d87d88b07bf6e26d3631bbdb
Author:     Olivier Certner 
AuthorDate: 2025-08-29 22:43:10 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:48 +0000

    getgroups.2: Clarify, mention ascending order, add SECURITY CONSIDERATIONS
    
    Clarify and be more precise about the behavior of getgroups(2), in
    particular with respect to 'gidsetlen'.
    
    Prefer a terminology referring to POSIX terms, i.e., use "supplementary
    groups" instead of "group access list".
    
    Say that getgroups(2) reports the supplementary groups in strictly
    ascending order and returns the cardinal of the set they form (and
    mention this has been the case since FreeBSD 14.3).
    
    Add a new SECURITY CONSIDERATIONS section contrasting the new behavior
    after commit 9da2fe96ff2e ("kern: fix setgroups(2) and getgroups(2) to
    match other platforms") with the historical one.
    
    While here, fix some style.
    
    Note for MFC to stable/14: The content will have to be revised as the
    new behavior is not in place.  The latter should be mentioned as
    upcoming in 15.
    
    Reviewed by:    gbe (older version)
    MFC after:      5 days
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52286
    
    (cherry picked from commit 4be38acc826f260e4c7d3ebbb9de534db449782e)
---
 lib/libsys/getgroups.2 | 94 +++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 70 insertions(+), 24 deletions(-)

diff --git a/lib/libsys/getgroups.2 b/lib/libsys/getgroups.2
index 37c8fbad7215..4881a65d532e 100644
--- a/lib/libsys/getgroups.2
+++ b/lib/libsys/getgroups.2
@@ -1,5 +1,13 @@
+.\"-
+.\" SPDX-License-Identifier: BSD-3-Clause
+.\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
+.\" Copyright (c) 2025 The FreeBSD Foundation
+.\"
+.\" Portions of this documentation were written by Olivier Certner
+.\"  at Kumacom SARL 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
@@ -25,12 +33,12 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd August 1, 2025
+.Dd September 17, 2025
 .Dt GETGROUPS 2
 .Os
 .Sh NAME
 .Nm getgroups
-.Nd get group access list
+.Nd get the calling process' supplementary groups
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
@@ -40,36 +48,39 @@
 .Sh DESCRIPTION
 The
 .Fn getgroups
-system call
-gets the current supplementary groups of the user process and stores it in the
-array
-.Fa gidset .
-The
+system call gets the calling process' supplementary groups and stores them in
+the
+.Fa gidset
+array in strictly ascending order.
+The value of
 .Fa gidsetlen
-argument
-indicates the number of entries that may be placed in
+indicates the maximum number of entries that may be placed in
 .Fa gidset .
-The
-.Fn getgroups
-system call
-returns the actual number of groups returned in
-.Fa gidset .
-As many as {NGROUPS_MAX} values may be returned.
+.Pp
 If
 .Fa gidsetlen
 is zero,
 .Fn getgroups
-returns the number of supplementary group IDs associated with
-the calling process without modifying the array pointed to by
+returns the cardinal of the calling process' supplementary groups set and
+ignores argument
 .Fa gidset .
 .Pp
+No more than
+.Dv {NGROUPS_MAX}
+values may ever be returned.
 The value of
 .Dv {NGROUPS_MAX}
 should be obtained using
 .Xr sysconf 3
 to avoid hard-coding it into the executable.
 .Sh RETURN VALUES
-A successful call returns the number of groups in the group set.
+On success, the
+.Fn getgroups
+system call returns the cardinal of the supplementary groups set.
+It always succeeds if argument
+.Fa gidsetlen
+is zero.
+.Pp
 A value of -1 indicates that an error occurred, and the error
 code is stored in the global variable
 .Va errno .
@@ -81,12 +92,12 @@ are:
 .It Bq Er EINVAL
 The argument
 .Fa gidsetlen
-is smaller than the number of groups in the group set.
+is smaller than the number of supplementary groups
+.Pq but not zero .
 .It Bq Er EFAULT
-The argument
+An invalid address was encountered while reading from the
 .Fa gidset
-specifies
-an invalid address.
+array.
 .El
 .Sh SEE ALSO
 .Xr setgroups 2 ,
@@ -96,16 +107,51 @@ an invalid address.
 The
 .Fn getgroups
 system call conforms to
-.St -p1003.1-2008 .
+.St -p1003.1-2008
+with the additional properties that supplementary groups are reported in
+strictly ascending order and the returned size coincides with the cardinal of
+the set.
 .Sh HISTORY
 The
 .Fn getgroups
 system call appeared in
 .Bx 4.2 .
 .Pp
+Since
+.Fx 14.3 ,
+the
+.Fn getgroups
+system call has treated the supplementary groups as a set, reporting them in
+strictly ascending order and returning the cardinal of the set.
+.Pp
 Before
 .Fx 15.0 ,
 the
 .Fn getgroups
-system call always returned the effective group ID for the process as the first
+system call would additionally return the effective group ID as the first
 element of the array, before the supplementary groups.
+.Sh SECURITY CONSIDERATIONS
+The
+.Fn getgroups
+system call gets the supplementary groups set in the
+.Fa gidset
+array.
+In particular, as evoked in
+.Sx HISTORY ,
+it does not anymore retrieve the effective GID in the first slot of
+.Fa gidset .
+Programs should not make any assumption about which group is placed in the first
+slot of
+.Fa gidset
+other than it being the supplementary group with smallest GID.
+.Pp
+The effective GID is present in the supplementary groups set if and only if it
+was explicitly set as a supplementary group.
+The function
+.Fn initgroups
+enforces that, while the
+.Fn setgroups
+system call does not.
+Please consult the
+.Xr initgroups 3
+manual page for the rationale.

From nobody Tue Sep 23 12:03:53 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJY60Klvz68YPY;
	Tue, 23 Sep 2025 12:03:54 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJY53g55z3FNP;
	Tue, 23 Sep 2025 12:03:53 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629033;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=8QzOTAtArS1Q4qCsQau08ei2xQs5Mohwa4MVeC5WFUc=;
	b=JjGgXLqHvkIY2XI55KRRqr39IHyevgipqfiW4ihyhN5hlki6dBp1YbVH7/Bzxyi/VnyRU3
	tSPBtrC9S5W+CSGZ4FyoI1rtuzSVzg2UJVvIlW46Nxl8W+emUWB82Mg7TxU3KWH/yaEQ54
	qSaGg4osOFwNKSWuVAdQJx/2uN7lJ7EwFNouulfmO30wc/Qo29Ofy1pji/wqFFxwjVReHx
	l1Y2YJ7CW1Qab/g+/osFaePHo3+M4EIkhtacP0uZ2BG0JcDmsuU60sZU46mwoO1KHuTjep
	1qUrnV9HTWTWBimdquT8KWHO1NqBCkv4ZCl7aCzSCirVvwQiV+lhNdrqSA0xtQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629033;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=8QzOTAtArS1Q4qCsQau08ei2xQs5Mohwa4MVeC5WFUc=;
	b=FzIY3cTUXpbfgTx748f30JrE1Pp3zep0rJJBTW/qo2qtiXAC4QrhkiuIQ4/WrlfkoYvmOI
	GwGujNVtiQDOouFCD/KKBEe9V1nMEbIon1dCDf5uoCp9P/gHx3tmlS2zH5qtD1PCPqTbFl
	qSNsIticfxpCoQLa2plo/vCkFJ5iEdf8g//X+pmCtZ0+nJqdTP7u9ooC4WkNEtwSRXq7PF
	R5diZtbSqUVTaLAkp9/C9ikCYB14NzFD5q0K7Uc8Ln5NlFG7Vv3hOPktRkXJco9JXeNY9G
	MUixlc5S1JHIR42k5iIZq10sjIYROHKqdEIyYjzHW74SB9Yz/8w6rGoJLNJxOA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629033; a=rsa-sha256; cv=none;
	b=sOYZalmzkqJ9tFfE4EBnKl1n9m+GAd8xbI5LiQTNhOgqyQ1Epa2dfVg7akgZSjxtYEiISY
	SMNASMRCn8+a7FlynhLaho9lKq5c/fKQqltXcUGuad7DOP1JRqLiam9BGY9LEGUqrEnG1G
	6ee+/rkyNSuwEIcQh7WE/+bxFcTBu2IwYXMpXnWedLC3ToZw4UKZwkvCd6AI5JpK4MUpZ+
	GZ8Ob00CMoUettx4KKQzEiVeqg528WMl4Zr6ECr6CH0T1QARW7JFfV9WINiyQ4pUHsKX2G
	JWj+fHoQRnF0aIzDVlHfvjbZYhMsUKVp1XOFwpUJ1XO6dhXl9+u5HBBr9iuwPA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJY52gtDzlxH;
	Tue, 23 Sep 2025 12:03:53 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3rni009090;
	Tue, 23 Sep 2025 12:03:53 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3rW0009087;
	Tue, 23 Sep 2025 12:03:53 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:53 GMT
Message-Id: <202509231203.58NC3rW0009087@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: dc18b884d53b - stable/15 - group.5: Add a reference
  to setcred(2)
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: dc18b884d53b50ea6d4e433ee3cec734c285a4fd
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit dc18b884d53b50ea6d4e433ee3cec734c285a4fd
Author:     Olivier Certner 
AuthorDate: 2025-08-29 15:13:17 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:48 +0000

    group.5: Add a reference to setcred(2)
    
    Reviewed by:    gbe
    MFC after:      5 days
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52287
    
    (cherry picked from commit 313d769e995c4fa4c5e3ae2470af16a8fbeaa3c1)
---
 share/man/man5/group.5 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/share/man/man5/group.5 b/share/man/man5/group.5
index 044164a3c955..8f7c59c59d52 100644
--- a/share/man/man5/group.5
+++ b/share/man/man5/group.5
@@ -25,7 +25,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd February 8, 2013
+.Dd August 29, 2025
 .Dt GROUP 5
 .Os
 .Sh NAME
@@ -145,6 +145,7 @@ may still have this limit.
 .Sh SEE ALSO
 .Xr newgrp 1 ,
 .Xr passwd 1 ,
+.Xr setcred 2 ,
 .Xr setgroups 2 ,
 .Xr crypt 3 ,
 .Xr getgrent 3 ,

From nobody Tue Sep 23 12:03:54 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJY70Rvwz68Y7f;
	Tue, 23 Sep 2025 12:03:55 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJY63pHXz3FCC;
	Tue, 23 Sep 2025 12:03:54 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629034;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=v2Wkvl5Cc0VmMSczeH1WsRkeafo4yLtiDY+XunmK1Ro=;
	b=N6B03dX2zuDT2kUZnyOB/43qvMzg5XAIKBcXjfHf3tsSumPMYi7h+2VLymF5S6sW1RvzBI
	blsLz+4LRf4LxpCqnTyRiI4xJIyxW//KH2v/fzQIyeh1cc8F/wl+g19oZtcRiKjpKaHV3W
	5xuynNvikPK7sI7mVXPp351xjDrDHbEEsOUmVSZH5gKahDTtVhz13WeCQzsVLTa5NBe7Da
	Hgto14Mj3gs60kC41/Asni3i/ahngWaSKDi03fz9DMsVKqvmakFken18Oz+6lFf5B5FdZF
	z6jNlNhQDwSgONwUdYSTGLHjk5qacCnSs6SVUfAxteyGVP2cO5dgW6rJpxDtUQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629034;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=v2Wkvl5Cc0VmMSczeH1WsRkeafo4yLtiDY+XunmK1Ro=;
	b=BQRIezNM5QoxAJkaGJz4cXIG9Lpt7gPyHn7cnEd5ZTQmAajwvQgW+qEMuf/mvxq8NKjdDi
	Nz9kZMNcDkc+Dm4v7em54yxqZjDf9m8RGTKle4Db+J4sCJSZmGqN/Ofe1Wudcj080lRlPN
	DSuVUxv0TtZkbOGSairmtqUKNLV1jLbEvRgjtslklGEVyWVWE/wh8SsvktxHDmBTbWID4h
	DGRpOv5zXb+9B0sjWVZR0SUD4+2bCp+abYixjLb+c4MWRK3MPV0YvKxECAO4uxMKaww9gQ
	BP9hHnyr8fUgFsc7Js+9A7Y1SQNr4eOklZaLRHO8aHUz6JBMDaOvHie7iOnp2g==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629034; a=rsa-sha256; cv=none;
	b=VCW11bUNHKQr3NdYX7j1eua47646BqhyBFbT6NTK49twM+2IiZveYo9U+7ws4L70tBNOwC
	S0eN5gk12WWI7005qjTnwi5qNJVROrVyT5Fdhhyt+dmUCIf7+0Fy0ZMKElWY+jHq8kTH8C
	RxFf4OxDxNUWIFugc7meLqvJXIxCas1Ury7WBFbjFZZI8WtHBGvK9JssFnhzxaLEvfrL3h
	V7nkyTyLZI7ttFnwT4RF0U+Wa0wsSy79f+TRdO+8scAaSv1iyCkX/VDuXJqwTPsDmCuHKq
	nYItRnDXcHqo8nXuTFYXJPwIKbGSiDwCWywbgN7It2r5DP0siBy7B6IQUaULNA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJY63NVhzlXf;
	Tue, 23 Sep 2025 12:03:54 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3sWu009125;
	Tue, 23 Sep 2025 12:03:54 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3sLF009122;
	Tue, 23 Sep 2025 12:03:54 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:54 GMT
Message-Id: <202509231203.58NC3sLF009122@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: bc71d7400e11 - stable/15 - ucred.9: crsetgroups_and_egid():
  Clarify differences with crsetgroups()
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: bc71d7400e111f5c53a1c6bccbc5083a7e7a597c
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit bc71d7400e111f5c53a1c6bccbc5083a7e7a597c
Author:     Olivier Certner 
AuthorDate: 2025-08-29 15:17:36 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:48 +0000

    ucred.9: crsetgroups_and_egid(): Clarify differences with crsetgroups()
    
    MFC after:      5 days
    MFC to:         stable/15
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52288
    
    (cherry picked from commit 6b26d0a335b6222744e2778753086e16389b6029)
---
 share/man/man9/ucred.9 | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)

diff --git a/share/man/man9/ucred.9 b/share/man/man9/ucred.9
index 38759bddb5b0..453df386ff18 100644
--- a/share/man/man9/ucred.9
+++ b/share/man/man9/ucred.9
@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 .\" DAMAGE.
 .\"
-.Dd July 29, 2025
+.Dd August 29, 2025
 .Dt UCRED 9
 .Os
 .Sh NAME
@@ -113,28 +113,26 @@ The actual copying is performed by
 .Pp
 The
 .Fn crsetgroups
-and
-.Fn crsetgroups_and_egid
-functions set the
+function sets the
 .Va cr_groups
 and
 .Va cr_ngroups
-variables and allocates space as needed.
-They also truncate the group list to the current maximum number of
-groups.
-No other mechanism should be used to modify the
-.Va cr_groups
-array.
-Note that
+variables representing the supplementary groups, allocating space as needed.
+It also truncates the group list to the current maximum number of groups.
+The
 .Fn crsetgroups_and_egid
-will interpret the first element of
+function is similar, but interprets separately the first group of
 .Va groups
-as the new effective GID and the rest of the array as the supplementary groups,
-and
+as the effective GID to set, only setting the subsequent groups as supplementary
+ones.
+It will use
 .Va default_egid
-will be used as the new effective GID only if
+as the new effective GID if
 .Va groups
 is empty.
+No other mechanism should be used to modify the
+.Va cr_groups
+array.
 .Pp
 The
 .Fn cru2x

From nobody Tue Sep 23 12:03:55 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJY827Vlz68YTl;
	Tue, 23 Sep 2025 12:03:56 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJY75Fmmz3FWx;
	Tue, 23 Sep 2025 12:03:55 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629035;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=oAnlJRqrOi7rE6EStSjz6BJVgl+btzlCLBSU69uZ5fY=;
	b=SdQ08qAbTSXznrGiy3S/31bA3on0m19WmcO4GC27+Kj/G40Y8HMEEQ+MmK6o9fn2hWaDHe
	v6Sv7f7/QV0BQUabRo5sfAjEJ8/GNaDzj97WXz0CfGwa25uJ9Pom8NiQsMTguZsb07F7w/
	ogNp1JA9mDrwxlbexq9/LVm09gjQwSr/iDfGGieVqwwfJnEjbD1EUkNWA4cL0XbVnQuF6L
	v3Qgd8y9Grav34GI0xYc8J7wQU30w6iVRKBLmYIJ3SxD0I7LngYnLvuk94ChYpf/hgBmh5
	ZLTgZ/4RbpNvkGl9xCaS/gc9Z5XyvMqaGy++OlF+5eEgV+4PC7nzDQrwHqX+BQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629035;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=oAnlJRqrOi7rE6EStSjz6BJVgl+btzlCLBSU69uZ5fY=;
	b=dI/I9Tam2PaNhYI8WhvR6wYkS5ZcrcXPoDIlS7Mgv/gBvnOU3BcmHzhP0k6AOVrEedWp4j
	jRQ38+XK+35rSAE9+neDAC/H160ZdUM4yO2nEfnIpOmb6qIiqMOCZAQj7gCqgK6orVmIkz
	mmlNtxlVIX5jHBZd3MuOh+siGMTGPN9rlo5XdLKDU+ThoS6xON2bIVJ0M6zgVxh7rJnQQ7
	NM9v9NSnWDxuSToko7DLI/vbMn9va/H7B62OJElESgShqgkWu4KcvZk+jO1JkLu32r0B8f
	jjMYT/tHiFIl0ROGl6UksagCdrirgOmjrkVMPI9/iU7HqcaCvqw9PIJkr3NGEQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629035; a=rsa-sha256; cv=none;
	b=Pzk9P9kUTw2p8RPTyfUXgQwyiDW+fYlDvYrEJoZCtK21yOp/kpUf6XCA9PP7B72yPSW2le
	NFteiLYv5vJ19ZRA6tDpiCSm8bw0c/0uOGsC6TIG005JRkY2lwXF0jNT3kjO+d5eU11p6F
	v7im1+0KSLHNoS7447tLoDS82kzo3NpUuQyP8/f8IPjAGyLu8vMNWfhv/rjOEIlM/mhkI/
	gM6rWFAvN9aEXBHcUZCOlWogDQ9wnvY/17xazhO6Hc1AD+PW0LrIJ7qAocymns6vdenDv2
	gs8HzlUng7sjqj6PoY4eihtEqGrvGxzFiSjxmqVGzEPHxNi70PR0OA6w7MX7Qw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJY74ZM3zlck;
	Tue, 23 Sep 2025 12:03:55 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3tYF009166;
	Tue, 23 Sep 2025 12:03:55 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3tN0009163;
	Tue, 23 Sep 2025 12:03:55 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:55 GMT
Message-Id: <202509231203.58NC3tN0009163@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: b0395b44974b - stable/15 - tools/regression/priv:
  Don't call setgroups() with the effective GID
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: b0395b44974b9b7b7d3c1ef4aea0394478bec1f9
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit b0395b44974b9b7b7d3c1ef4aea0394478bec1f9
Author:     Olivier Certner 
AuthorDate: 2025-08-29 17:00:07 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:49 +0000

    tools/regression/priv: Don't call setgroups() with the effective GID
    
    The 'setgroups(0, NULL);' stance works the same on all versions of
    FreeBSD, getting rid of all supplementary groups.  The replaced code
    would force the effective GID to also be a supplementary group.
    
    Fixes:          9da2fe96ff2e ("kern: fix setgroups(2) and getgroups(2) to match other platforms")
    MFC after:      5 days
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52289
    
    (cherry picked from commit ff7252cdafbd9dab104a5e7b33b8bb84117a8789)
---
 tools/regression/priv/main.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tools/regression/priv/main.c b/tools/regression/priv/main.c
index dbcb5759f6b9..979e6ed65284 100644
--- a/tools/regression/priv/main.c
+++ b/tools/regression/priv/main.c
@@ -423,12 +423,10 @@ setup_file(const char *test, char *fpathp, uid_t uid, gid_t gid, mode_t mode)
 static void
 set_creds(const char *test, uid_t uid, gid_t gid)
 {
-	gid_t gids[1] = { gid };
-
 	if (setgid(gid) < 0)
 		err(-1, "test %s: setegid(%d)", test, gid);
-	if (setgroups(sizeof(gids)/sizeof(gid_t), gids) < 0)
-		err(-1, "test %s: setgroups(%d)", test, gid);
+	if (setgroups(0, NULL) < 0)
+		err(-1, "test %s: setgroups(NULL)", test);
 	if (setuid(uid) < 0)
 		err(-1, "test %s: seteuid(%d)", test, uid);
 }

From nobody Tue Sep 23 12:03:56 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWJY931LZz68YTq;
	Tue, 23 Sep 2025 12:03:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWJY86320z3FXG;
	Tue, 23 Sep 2025 12:03:56 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758629036;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=j6pIHqE0LoBrY+FVXvANU+DTVnUQtHP0wQ0zihEOMe8=;
	b=kg7+lAXfA5ceXxosqPUEtZBpycfymxfOw7/KT0FpXVnCu6jGWvwz4Mz0xiBDbCJdYC/21A
	tYidUERQhfZL5hfQSQaUDeUcfBfvFq0XGoq9XK9qPo2dSNcwwGzjdalc4Axxj9ictYrAOp
	nSXBR/sgDQF6nNQGcUtZt99bzLNV303u0mwjyoiMxk37TqH2/SxPQi2GHFajc38FGRO+7C
	ON+c3m6O/PWUYposfElVM3uBqXwZjWhuOwQKEzgerQU3w5Zd/sxRa2a7n/G50Bu10bwT8U
	WtwoKhMjFj4orVd6/vTeeHhN76dk96/8YDPMMN/Vb9uhOUhOUo/HnZ8DAljIuQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758629036;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=j6pIHqE0LoBrY+FVXvANU+DTVnUQtHP0wQ0zihEOMe8=;
	b=RdmxVzf8ZpxOonXOrjgaGDQgFydW4oM5+/SWd+iz7gJdASEINOXv04zZU/L4WbTIrl9B6p
	8CzXEnVKs1CxKyv2dsl+Eg+gAgPdnFwrvR7ifJXomg0hRTrwujrFWlqIYdTlZlrmo4Xssw
	LNrcnVSQyPitGG+C1QPR7b1VamzcohzdroWOVJSIoSfCxOzkURa2vSrODXlKBxmvGYwy5P
	Jx7my89W9E/pmAvYxzJTz1jw+eSA8dQyKaKsqgtPVQsi03J82LqcPblnvGRywfaHwHJLIz
	P5+DpiBC3PgZiq84iJFBXJHPBqYExJ7VD+3WbT4ozICrznbfY4DrggqBKfONKg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758629036; a=rsa-sha256; cv=none;
	b=dd9yd+XUkrWdJ47vu2xZ5xodk0U9U2DRcSuYctlMDbgjUNwYGVd3v5/5UL9Vc57/DessCN
	0H9Bnpi2IGDbiKf/hx34sNytZq5ssGHIwmDQ1j91EvbOIigCKPDESmxUHEuMWUda+h2TUd
	g3eMTv9I/J2abVbGcjlR+SwXVNquWupOIW9WUMQ/Ji6vUiZvACuoAxHLir59sbOfKsY8du
	dZmMhCL1ko20udXwZiTzSWSmu4V8a041yyxeQKsrUujMQSpD6N8kNMtM7OtwlOItb+jCqQ
	+3lJLmPkpcKbwCSvEGqt52NXMtimaUlL/OfT3/2gNQJvEqsnOjpYASWBjIA1lQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWJY85YpkzlXg;
	Tue, 23 Sep 2025 12:03:56 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NC3uSQ009201;
	Tue, 23 Sep 2025 12:03:56 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NC3uL7009198;
	Tue, 23 Sep 2025 12:03:56 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:03:56 GMT
Message-Id: <202509231203.58NC3uL7009198@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: 0479fdf7f715 - stable/15 - stress2: Fix removal of
  supplementary groups
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: 0479fdf7f7156a482aecccc965eeeb5db94a26a2
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit 0479fdf7f7156a482aecccc965eeeb5db94a26a2
Author:     Olivier Certner 
AuthorDate: 2025-08-29 17:01:27 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 12:02:49 +0000

    stress2: Fix removal of supplementary groups
    
    To this end, call setgroups(0, NULL) instead of passing the effective
    GID.  This stance is fully compatible with older versions of FreeBSD.
    
    Fixes:          9da2fe96ff2e ("kern: fix setgroups(2) and getgroups(2) to match other platforms")
    MFC after:      5 days
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52290
    
    (cherry picked from commit de4832289625f3c1cea4200d8eb7b4c753b90648)
---
 tools/test/stress2/misc/fdatasync.sh  | 2 +-
 tools/test/stress2/misc/fdatasync2.sh | 2 +-
 tools/test/stress2/misc/fifo2.sh      | 2 +-
 tools/test/stress2/misc/ftruncate.sh  | 2 +-
 tools/test/stress2/misc/ftruncate2.sh | 2 +-
 tools/test/stress2/misc/kevent7.sh    | 2 +-
 tools/test/stress2/misc/killpg.sh     | 2 +-
 tools/test/stress2/misc/killpg2.sh    | 2 +-
 tools/test/stress2/misc/killpg3.sh    | 2 +-
 tools/test/stress2/misc/maxproc.sh    | 2 +-
 tools/test/stress2/misc/mlockall3.sh  | 2 +-
 tools/test/stress2/misc/mlockall7.sh  | 2 +-
 tools/test/stress2/misc/mountu.sh     | 2 +-
 tools/test/stress2/misc/msync.sh      | 2 +-
 tools/test/stress2/misc/pread.sh      | 2 +-
 tools/test/stress2/misc/sched.sh      | 2 +-
 tools/test/stress2/misc/sigreturn3.sh | 2 +-
 tools/test/stress2/misc/sigreturn4.sh | 2 +-
 tools/test/stress2/misc/syscall4.sh   | 2 +-
 tools/test/stress2/misc/tmpfs16.sh    | 2 +-
 20 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/tools/test/stress2/misc/fdatasync.sh b/tools/test/stress2/misc/fdatasync.sh
index f17e2826ad94..9abd31e5bd94 100755
--- a/tools/test/stress2/misc/fdatasync.sh
+++ b/tools/test/stress2/misc/fdatasync.sh
@@ -178,7 +178,7 @@ main(int argc, char **argv)
 
 	if ((pw = getpwnam("nobody")) == NULL)
 		err(1, "failed to resolve nobody");
-	if (setgroups(1, &pw->pw_gid) ||
+	if (setgroups(0, NULL) ||
 	    setegid(pw->pw_gid) || setgid(pw->pw_gid) ||
 	    seteuid(pw->pw_uid) || setuid(pw->pw_uid))
 		err(1, "Can't drop privileges to \"nobody\"");
diff --git a/tools/test/stress2/misc/fdatasync2.sh b/tools/test/stress2/misc/fdatasync2.sh
index 6011eba53698..42ade0cedbd3 100755
--- a/tools/test/stress2/misc/fdatasync2.sh
+++ b/tools/test/stress2/misc/fdatasync2.sh
@@ -177,7 +177,7 @@ main(int argc, char **argv)
 
 	if ((pw = getpwnam("nobody")) == NULL)
 		err(1, "failed to resolve nobody");
-	if (setgroups(1, &pw->pw_gid) ||
+	if (setgroups(0, NULL) ||
 	    setegid(pw->pw_gid) || setgid(pw->pw_gid) ||
 	    seteuid(pw->pw_uid) || setuid(pw->pw_uid))
 		err(1, "Can't drop privileges to \"nobody\"");
diff --git a/tools/test/stress2/misc/fifo2.sh b/tools/test/stress2/misc/fifo2.sh
index 4a7b986931d9..e84506cbfb01 100755
--- a/tools/test/stress2/misc/fifo2.sh
+++ b/tools/test/stress2/misc/fifo2.sh
@@ -167,7 +167,7 @@ main(void)
 	if ((pw = getpwnam("nobody")) == NULL)
 		err(1, "no such user: nobody");
 
-	if (setgroups(1, &pw->pw_gid) ||
+	if (setgroups(0, NULL) ||
 	    setegid(pw->pw_gid) || setgid(pw->pw_gid) ||
 	    seteuid(pw->pw_uid) || setuid(pw->pw_uid))
 		err(1, "Can't drop privileges to \"nobody\"");
diff --git a/tools/test/stress2/misc/ftruncate.sh b/tools/test/stress2/misc/ftruncate.sh
index ddec85b6745a..f9aa1869756f 100755
--- a/tools/test/stress2/misc/ftruncate.sh
+++ b/tools/test/stress2/misc/ftruncate.sh
@@ -170,7 +170,7 @@ main(int argc, char **argv)
 
 	if ((pw = getpwnam("nobody")) == NULL)
 		err(1, "failed to resolve nobody");
-	if (setgroups(1, &pw->pw_gid) ||
+	if (setgroups(0, NULL) ||
 	    setegid(pw->pw_gid) || setgid(pw->pw_gid) ||
 	    seteuid(pw->pw_uid) || setuid(pw->pw_uid))
 		err(1, "Can't drop privileges to \"nobody\"");
diff --git a/tools/test/stress2/misc/ftruncate2.sh b/tools/test/stress2/misc/ftruncate2.sh
index 35db3a4c5f8d..94d9b6ca810f 100755
--- a/tools/test/stress2/misc/ftruncate2.sh
+++ b/tools/test/stress2/misc/ftruncate2.sh
@@ -185,7 +185,7 @@ main(int argc, char **argv)
 
 	if ((pw = getpwnam("nobody")) == NULL)
 		err(1, "failed to resolve nobody");
-	if (setgroups(1, &pw->pw_gid) ||
+	if (setgroups(0, NULL) ||
 	    setegid(pw->pw_gid) || setgid(pw->pw_gid) ||
 	    seteuid(pw->pw_uid) || setuid(pw->pw_uid))
 		err(1, "Can't drop privileges to \"nobody\"");
diff --git a/tools/test/stress2/misc/kevent7.sh b/tools/test/stress2/misc/kevent7.sh
index 8b58c35551f7..4c7718c6ae5f 100755
--- a/tools/test/stress2/misc/kevent7.sh
+++ b/tools/test/stress2/misc/kevent7.sh
@@ -236,7 +236,7 @@ main(void)
 	if ((pw = getpwnam("nobody")) == NULL)
 		err(1, "no such user: nobody");
 
-	if (setgroups(1, &pw->pw_gid) ||
+	if (setgroups(0, NULL) ||
 	    setegid(pw->pw_gid) || setgid(pw->pw_gid) ||
 	    seteuid(pw->pw_uid) || setuid(pw->pw_uid))
 		err(1, "Can't drop privileges to \"nobody\"");
diff --git a/tools/test/stress2/misc/killpg.sh b/tools/test/stress2/misc/killpg.sh
index c6af55a3d593..ea99f5e0d0fd 100755
--- a/tools/test/stress2/misc/killpg.sh
+++ b/tools/test/stress2/misc/killpg.sh
@@ -113,7 +113,7 @@ killer(void)
 	if ((pw = getpwnam("nobody")) == NULL)
 		err(1, "no such user: nobody");
 
-	if (setgroups(1, &pw->pw_gid) ||
+	if (setgroups(0, NULL) ||
 	    setegid(pw->pw_gid) || setgid(pw->pw_gid) ||
 	    seteuid(pw->pw_uid) || setuid(pw->pw_uid))
 		err(1, "Can't drop privileges to \"nobody\"");
diff --git a/tools/test/stress2/misc/killpg2.sh b/tools/test/stress2/misc/killpg2.sh
index 5e986f059637..cf186d686dfd 100755
--- a/tools/test/stress2/misc/killpg2.sh
+++ b/tools/test/stress2/misc/killpg2.sh
@@ -77,7 +77,7 @@ looper(void)
 	if ((pw = getpwnam("TUSER")) == NULL)
 		err(1, "no such user: TUSER");
 
-	if (setgroups(1, &pw->pw_gid) ||
+	if (setgroups(0, NULL) ||
 	    setegid(pw->pw_gid) || setgid(pw->pw_gid) ||
 	    seteuid(pw->pw_uid) || setuid(pw->pw_uid))
 		err(1, "Can't drop privileges to \"TUSER\"");
diff --git a/tools/test/stress2/misc/killpg3.sh b/tools/test/stress2/misc/killpg3.sh
index 304b3e320f2f..4fcb4fa7a643 100755
--- a/tools/test/stress2/misc/killpg3.sh
+++ b/tools/test/stress2/misc/killpg3.sh
@@ -109,7 +109,7 @@ looper(void)
 	if ((pw = getpwnam("TUSER")) == NULL)
 		err(1, "no such user: TUSER");
 
-	if (setgroups(1, &pw->pw_gid) ||
+	if (setgroups(0, NULL) ||
 	    setegid(pw->pw_gid) || setgid(pw->pw_gid) ||
 	    seteuid(pw->pw_uid) || setuid(pw->pw_uid))
 		err(1, "Can't drop privileges to \"TUSER\"");
diff --git a/tools/test/stress2/misc/maxproc.sh b/tools/test/stress2/misc/maxproc.sh
index c425c307e06b..52282f56769f 100755
--- a/tools/test/stress2/misc/maxproc.sh
+++ b/tools/test/stress2/misc/maxproc.sh
@@ -103,7 +103,7 @@ t1(int priv)
 			err(1, "no such user: nobody");
 
 		if (priv == 0) {
-			if (setgroups(1, &pw->pw_gid) ||
+			if (setgroups(0, NULL) ||
 			    setegid(pw->pw_gid) || setgid(pw->pw_gid) ||
 			    seteuid(pw->pw_uid) || setuid(pw->pw_uid))
 				err(1, "Can't drop privileges to \"nobody\"");
diff --git a/tools/test/stress2/misc/mlockall3.sh b/tools/test/stress2/misc/mlockall3.sh
index 0ff1e24eaa7f..aa53e75166a5 100755
--- a/tools/test/stress2/misc/mlockall3.sh
+++ b/tools/test/stress2/misc/mlockall3.sh
@@ -130,7 +130,7 @@ main(void)
 	if ((pw = getpwnam("nobody")) == NULL)
 		err(1, "no such user: nobody");
 
-	if (setgroups(1, &pw->pw_gid) ||
+	if (setgroups(0, NULL) ||
 	    setegid(pw->pw_gid) || setgid(pw->pw_gid) ||
 	    seteuid(pw->pw_uid) || setuid(pw->pw_uid))
 		err(1, "Can't drop privileges to \"nobody\"");
diff --git a/tools/test/stress2/misc/mlockall7.sh b/tools/test/stress2/misc/mlockall7.sh
index 987e312f19e7..5a927043cb56 100755
--- a/tools/test/stress2/misc/mlockall7.sh
+++ b/tools/test/stress2/misc/mlockall7.sh
@@ -179,7 +179,7 @@ testing(unsigned long maxl)
 	maxlock = maxl;
 	if ((pw = getpwnam("nobody")) == NULL)
 		err(1, "failed to resolve nobody");
-	if (setgroups(1, &pw->pw_gid) ||
+	if (setgroups(0, NULL) ||
 	    setegid(pw->pw_gid) || setgid(pw->pw_gid) ||
 	    seteuid(pw->pw_uid) || setuid(pw->pw_uid))
 		err(1, "Can't drop privileges to \"nobody\"");
diff --git a/tools/test/stress2/misc/mountu.sh b/tools/test/stress2/misc/mountu.sh
index abd3c744d160..95043e634ef1 100755
--- a/tools/test/stress2/misc/mountu.sh
+++ b/tools/test/stress2/misc/mountu.sh
@@ -241,7 +241,7 @@ main(int argc __unused, char **argv)
 	if ((pw = getpwnam("nobody")) == NULL)
 		err(1, "no such user: nobody");
 
-	if (setgroups(1, &pw->pw_gid) ||
+	if (setgroups(0, NULL) ||
 	    setegid(pw->pw_gid) || setgid(pw->pw_gid) ||
 	    seteuid(pw->pw_uid) || setuid(pw->pw_uid))
 		err(1, "Can't drop privileges to \"nobody\"");
diff --git a/tools/test/stress2/misc/msync.sh b/tools/test/stress2/misc/msync.sh
index 326c7e723774..df05875afb45 100755
--- a/tools/test/stress2/misc/msync.sh
+++ b/tools/test/stress2/misc/msync.sh
@@ -166,7 +166,7 @@ main(void)
 	if ((pw = getpwnam("nobody")) == NULL)
 		err(1, "no such user: nobody");
 
-	if (setgroups(1, &pw->pw_gid) ||
+	if (setgroups(0, NULL) ||
 	    setegid(pw->pw_gid) || setgid(pw->pw_gid) ||
 	    seteuid(pw->pw_uid) || setuid(pw->pw_uid))
 		err(1, "Can't drop privileges to \"nobody\"");
diff --git a/tools/test/stress2/misc/pread.sh b/tools/test/stress2/misc/pread.sh
index 24ee2efb696a..985d3f643df1 100755
--- a/tools/test/stress2/misc/pread.sh
+++ b/tools/test/stress2/misc/pread.sh
@@ -170,7 +170,7 @@ main(int argc __unused, char **argv)
         if ((pw = getpwnam("nobody")) == NULL)
                 err(1, "no such user: nobody");
 
-        if (setgroups(1, &pw->pw_gid) ||
+        if (setgroups(0, NULL) ||
             setegid(pw->pw_gid) || setgid(pw->pw_gid) ||
             seteuid(pw->pw_uid) || setuid(pw->pw_uid))
                 err(1, "Can't drop privileges to \"nobody\"");
diff --git a/tools/test/stress2/misc/sched.sh b/tools/test/stress2/misc/sched.sh
index 1a1db70eb38a..8b33d7b16094 100755
--- a/tools/test/stress2/misc/sched.sh
+++ b/tools/test/stress2/misc/sched.sh
@@ -107,7 +107,7 @@ work(void)
 
 	if ((pw = getpwnam("nobody")) == NULL)
 		err(1, "no such user: nobody");
-	if (setgroups(1, &pw->pw_gid) ||
+	if (setgroups(0, NULL) ||
 	    setegid(pw->pw_gid) || setgid(pw->pw_gid) ||
 	    seteuid(pw->pw_uid) || setuid(pw->pw_uid))
 		err(1, "Can't drop privileges to \"nobody\"");
diff --git a/tools/test/stress2/misc/sigreturn3.sh b/tools/test/stress2/misc/sigreturn3.sh
index 271ade287e9a..0c6ea400711b 100755
--- a/tools/test/stress2/misc/sigreturn3.sh
+++ b/tools/test/stress2/misc/sigreturn3.sh
@@ -121,7 +121,7 @@ main(int argc, char **argv)
 		fprintf(stderr, "Running syscall4 as root for %s.\n",
 				argv[1]);
 	else {
-		if (setgroups(1, &pw->pw_gid) ||
+		if (setgroups(0, NULL) ||
 		    setegid(pw->pw_gid) || setgid(pw->pw_gid) ||
 		    seteuid(pw->pw_uid) || setuid(pw->pw_uid))
 			err(1, "Can't drop privileges to \"nobody\"");
diff --git a/tools/test/stress2/misc/sigreturn4.sh b/tools/test/stress2/misc/sigreturn4.sh
index 9e2a6a32715c..e37e17ad627a 100755
--- a/tools/test/stress2/misc/sigreturn4.sh
+++ b/tools/test/stress2/misc/sigreturn4.sh
@@ -147,7 +147,7 @@ main(int argc, char **argv)
 		fprintf(stderr, "Running sigreturn4 as root for %s.\n",
 				argv[1]);
 	else {
-		if (setgroups(1, &pw->pw_gid) ||
+		if (setgroups(0, NULL) ||
 		    setegid(pw->pw_gid) || setgid(pw->pw_gid) ||
 		    seteuid(pw->pw_uid) || setuid(pw->pw_uid))
 			err(1, "Can't drop privileges to \"nobody\"");
diff --git a/tools/test/stress2/misc/syscall4.sh b/tools/test/stress2/misc/syscall4.sh
index 3937d45c0303..92150c782ac1 100755
--- a/tools/test/stress2/misc/syscall4.sh
+++ b/tools/test/stress2/misc/syscall4.sh
@@ -318,7 +318,7 @@ main(int argc, char **argv)
 		fprintf(stderr, "Running syscall4 as root for %s.\n",
 				argv[1]);
 	else {
-		if (setgroups(1, &pw->pw_gid) ||
+		if (setgroups(0, NULL) ||
 		    setegid(pw->pw_gid) || setgid(pw->pw_gid) ||
 		    seteuid(pw->pw_uid) || setuid(pw->pw_uid))
 			err(1, "Can't drop privileges to \"nobody\"");
diff --git a/tools/test/stress2/misc/tmpfs16.sh b/tools/test/stress2/misc/tmpfs16.sh
index 8cc3c3596a4e..683817ce6497 100755
--- a/tools/test/stress2/misc/tmpfs16.sh
+++ b/tools/test/stress2/misc/tmpfs16.sh
@@ -181,7 +181,7 @@ main(int argc, char **argv)
 
 	if ((pw = getpwnam("nobody")) == NULL)
 		err(1, "failed to resolve nobody");
-	if (setgroups(1, &pw->pw_gid) ||
+	if (setgroups(0, NULL) ||
 	    setegid(pw->pw_gid) || setgid(pw->pw_gid) ||
 	    seteuid(pw->pw_uid) || setuid(pw->pw_uid))
 		err(1, "Can't drop privileges to \"nobody\"");

From nobody Tue Sep 23 12:57:53 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWKlQ0vhpz68cSg;
	Tue, 23 Sep 2025 12:57:54 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWKlP73nZz3TP0;
	Tue, 23 Sep 2025 12:57:53 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758632274;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=4gSEvhwDGXp46RBumc/3S+UuB1eJUol6K1x6w2UjdAY=;
	b=gy8alBteX4VLciEcHfM1GSFU09zsSbOpDsLMMJHSLVNNlgndUhR8G8omj4IdgpqSE00yRU
	YkeUN3FN99wRHqf6SHiAIR56Pku3fxQ950WLB7o54TQGPcDz88xl+A5UT7uFy4G9kEOvaO
	9prcQsDoUxVeWnZVG9QQNAEYf2LMe2KItKW2S+Ex0ZbRyD1vD8aEwTg/aYFq8YMTemunVP
	vdyGyqCRel4NhlBDPyw98DCoQXwTXN/hpcep+CQedNJFTmJscaHty0xF7Qj+lqoruZW3AV
	Yr1KtasnrJfnCG33meP7sEf3UaUioQYnLuBb9D1+v2rCC7s2Km9qxNjxquARpg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758632274;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=4gSEvhwDGXp46RBumc/3S+UuB1eJUol6K1x6w2UjdAY=;
	b=wRqMg7bIJLBJDh31EqDxv/5zpqZwXbvC41tE4OdnErCc3vLq/z1iKR3KLgl08nHMrLccMW
	p/K63LxuMpGpjm0KpmV5YKVSCcTele2YhJ0yNDMHRLBZJ7mlNs2FJd6VwD3RvKaQOhp/So
	GkvlL7XezULLyBjYxsSbpF1+7JdtvW5yXSnasqgUApeDxuFJH2BLnmZv1HNWpIAFMgnJBl
	/+NlwcXze9SaugWZGOnxVHcaAbuHc4eweYqdhZbEqfA5L1X4Oj7zynVCFCR2R3/79jU81h
	U7WERscVWv3qGeXa+bjfAmicHOBwlm2enm+DtV9LZqJNtnrLDBbGZAzck8n27w==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758632274; a=rsa-sha256; cv=none;
	b=LXq6ox+klWVcRCDFLxOB4Pa0ayM3jDl/wbdu8+jbus7vu+udCxP9ERNlTdVjjtlZkqo7kO
	Px8W9d6JK3yXrtMkOf0rzMQo3uQl6gUKb7yWejpYnZlaGxAiipRTnk4T2BDT2l696C2FXN
	Jop0LC97rcwncv16N/fgfxx6kYkXdNRQ9Wb0apO9lA3O9lbmdCDH80XF68Wu0w5l0eJ1aH
	1A1mr6JkIjbKeCPhmG3ZHCfQH36/Dptkx6WUo+1CLXqxEbkYjG5e05shDgejeV+FsRFB/N
	jROGtJ9g3hYCp4OcPiFzFY7kRsmZvoesmnLtTt9PaH3d649j27xvVZGwiGa6OQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWKlP6fFZzmvW;
	Tue, 23 Sep 2025 12:57:53 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NCvrNX003941;
	Tue, 23 Sep 2025 12:57:53 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NCvrGA003938;
	Tue, 23 Sep 2025 12:57:53 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:57:53 GMT
Message-Id: <202509231257.58NCvrGA003938@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= 
Subject: git: fd017bf5ef37 - stable/15 - man: Fix usage message
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: des
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: fd017bf5ef37e8e6cccc9e887d4fcc4c594b0602
Auto-Submitted: auto-generated

The branch stable/15 has been updated by des:

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

commit fd017bf5ef37e8e6cccc9e887d4fcc4c594b0602
Author:     Dag-Erling Smørgrav 
AuthorDate: 2025-09-08 13:26:43 +0000
Commit:     Dag-Erling Smørgrav 
CommitDate: 2025-09-23 12:57:29 +0000

    man: Fix usage message
    
    PR:             289245
    Fixes:          14b61b2e9317 ("man: Add -l option")
    (cherry picked from commit dc38cf116c820df0be341ec5e359de0012b2d58a)
---
 usr.bin/man/man.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh
index 53961ae4997e..920223ce3c27 100755
--- a/usr.bin/man/man.sh
+++ b/usr.bin/man/man.sh
@@ -766,7 +766,7 @@ man_setup_locale() {
 # Display usage for the man utility.
 man_usage() {
 	echo 'Usage:'
-	echo ' man [-adho] [-t | -w] [-M manpath] [-P pager] [-S mansect]'
+	echo ' man [-adhlo] [-t | -w] [-M manpath] [-P pager] [-S mansect]'
 	echo '     [-m arch[:machine]] [-p [eprtv]] [mansect] page [...]'
 	echo ' man -K | -f | -k expression [...] -- Search manual pages'
 

From nobody Tue Sep 23 12:57:54 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWKlR0hyWz68c81;
	Tue, 23 Sep 2025 12:57:55 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWKlR0TW4z3TLq;
	Tue, 23 Sep 2025 12: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=1758632275;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=pHlz+bX8coYjFegeeEHhEa2K2FKYFpWEU+iXs4yIbr0=;
	b=Ytl78MGa7Nshv34/F2/JLXHtO/ys6c0hTFa9Re6HJJ1b2kBiJl5ElRvfHlZfGiPP1pw75B
	BTGjvOuZ4rIve0bJajQSBgeUYmqESqzertG3KG5dPGV3Osob8SAoSUz0inJ/oFeiV+XFSg
	crZp/32pvx8RrK/2py93HQyUNuk4MhBRQm4ADjy94YWMdExh9DowX/sW4YofggiG/8YMz5
	3/tSeUD8CqFCYdWKCdLWl7ktE2dsG1mzjJdYUEnMvyRLS5qpkE57Ko6XuXQF7EyZkXc/D/
	a/2qcSd4wEX8SkQF34SFDSLjerfK1qBQbfRzvkRC7kUdAZvkF/Apfry2CypfrQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758632275;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=pHlz+bX8coYjFegeeEHhEa2K2FKYFpWEU+iXs4yIbr0=;
	b=XgpwdIUqh0QI/ecYzWQnuyo2LOwErZtTY22wmKTkCZBJNo4UnwGvEYq8aXYgnwD1WzDnSz
	qx4vg+T8uzyOq2+4X8qb3tIRakg5XtE6h7jsEKgJIjhKmB9EPdjWazpI81aDc6g/AGnZ7N
	imy89oDj1oOIJMEgC/uilWdvJOxEcs6+CLZ1qKfl3cHPIhEiNTR1NbnIIMrV+qpLpNOv+y
	4W+yA1xwX51l4zYaF96xspPGDHFbXd8YbnDNm8JIRWDXDexi5gPfFTF3ChMrdpMvsRwgfk
	qrPmmtVtV6tsDMmR6So9WXP1LwQZjIIEcYn0HoSUmpAMYX+BTbBLFpibSmjADg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758632275; a=rsa-sha256; cv=none;
	b=B0GePrEynECJOyj6dMyF+Tq/Ky5eXRz3w0su9Yl0Izy/grc6kZfdI5neoExkNutlSC/SK1
	oHuHd3cuXnIJ5gAk12itHXBOhifxqGUGtBT0vPXCqGwvib590ECAyLzaAhkEJCo5/B6oMr
	KPQjJV1aBi3p3KvMN5UVaJvIbIfFNvIFuRpeGnQkow8Yp8z7+A6/THrzRWsnfpX+TP5lgb
	PO9EofLPcauWmUONh+3ICjDjvugLT7ersUe8HKoVa3HT2qmAI7NHy9jPfdJMwJzILGsQXC
	B2rlz2qYieH/gJSCKiE9mG8OOL8+or9k5IwGJUsLFzfSHadlFZyoMjIFCvwxhA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWKlR04qgzmvX;
	Tue, 23 Sep 2025 12:57:55 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NCvsqA003983;
	Tue, 23 Sep 2025 12:57:54 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NCvseU003980;
	Tue, 23 Sep 2025 12:57:54 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:57:54 GMT
Message-Id: <202509231257.58NCvseU003980@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= 
Subject: git: 898d513ab1c5 - stable/15 - tools: Drop cryptotest
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: des
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 898d513ab1c53b07a3b19738df332b7da51b95d1
Auto-Submitted: auto-generated

The branch stable/15 has been updated by des:

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

commit 898d513ab1c53b07a3b19738df332b7da51b95d1
Author:     Dag-Erling Smørgrav 
AuthorDate: 2025-09-12 15:29:40 +0000
Commit:     Dag-Erling Smørgrav 
CommitDate: 2025-09-23 12:57:30 +0000

    tools: Drop cryptotest
    
    This has been supplanted by cryptocheck and has bitrotted to the point
    where it no longer builds.
    
    PR:             289325
    Reviewed by:    jhb
    Differential Revision:  https://reviews.freebsd.org/D52399
    
    (cherry picked from commit 4c6cf6107b824f7ba4a3fe66db8e0a36c8dd8b04)
---
 tools/tools/crypto/Makefile     |   5 +-
 tools/tools/crypto/cryptorun.sh |  31 --
 tools/tools/crypto/cryptotest.c | 658 ----------------------------------------
 3 files changed, 1 insertion(+), 693 deletions(-)

diff --git a/tools/tools/crypto/Makefile b/tools/tools/crypto/Makefile
index d1aa55526248..5186a0d697e6 100644
--- a/tools/tools/crypto/Makefile
+++ b/tools/tools/crypto/Makefile
@@ -25,8 +25,7 @@
 # SUCH DAMAGE.
 #
 
-PROGS=	cryptocheck cryptotest cryptostats \
-	hifnstats ipsecstats safestats
+PROGS=	cryptocheck cryptostats hifnstats ipsecstats safestats
 MAN=
 BINDIR?=	/usr/local/bin
 
@@ -38,6 +37,4 @@ LIBADD.cryptocheck+=	crypto util
 # safestats: statistics kept by the SafeNet driver
 # ipsecstats: print statistics kept by fast ipsec
 
-CLEANFILES+=	core a.out
-
 .include 
diff --git a/tools/tools/crypto/cryptorun.sh b/tools/tools/crypto/cryptorun.sh
deleted file mode 100755
index 8761b16c4d96..000000000000
--- a/tools/tools/crypto/cryptorun.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-#
-# A simple test runner for cryptotest
-#
-# Althought cryptotest itself has a -z mode to test all algorithms at
-# a variety of sizes, this script allows us to be more selective.
-# Threads and buffer sizes move in powers of two from 1, for threads,
-# and 256 for buffer sizes.
-#
-# e.g.  cryptorun.sh aes 4 512
-#
-# Test aes with 1, 2 and 4 processes, and at sizes of 256 and 512 bytes.
-#
-#
-
-threads=1
-size=256
-iterations=1000000
-crypto="/tank/users/gnn/Repos/svn/FreeBSD.HEAD/tools/tools/crypto/cryptotest"
-max_threads=$2
-max_size=$3 
-
-while [ "$threads" -le "$max_threads" ]; do
-	echo "Testing with $threads processes."
-	while [ "$size" -le "$max_size" ]; do
-		$crypto -t $threads -a $1 $iterations $size
-		size=$(($size * 2))
-	done
-	size=256
-	threads=$(($threads * 2))
-done
diff --git a/tools/tools/crypto/cryptotest.c b/tools/tools/crypto/cryptotest.c
deleted file mode 100644
index 7845c3994d0c..000000000000
--- a/tools/tools/crypto/cryptotest.c
+++ /dev/null
@@ -1,658 +0,0 @@
-/*-
- * Copyright (c) 2004 Sam Leffler, Errno Consulting
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
- *    redistribution must be conditioned upon including a substantially
- *    similar Disclaimer requirement for further binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * NO WARRANTY
- * 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 NONINFRINGEMENT, MERCHANTIBILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
- */
-
-/*
- * Simple tool for testing hardware/system crypto support.
- *
- * cryptotest [-czsbv] [-a algorithm] [count] [size ...]
- *
- * Run count iterations of a crypt+decrypt or mac operation on a buffer of
- * size bytes.  A random key and iv are used.  Options:
- *	-c	check the results
- *	-d dev	pin work on device dev
- *	-z	run all available algorithms on a variety of buffer sizes
- *	-v	be verbose
- *	-b	mark operations for batching
- *	-p	profile kernel crypto operations (must be root)
- *	-t n	fork n threads and run tests concurrently
- * Known algorithms are:
- *	null	null cbc
- *	des	des cbc
- *	3des	3des cbc
- *	blf	blowfish cbc
- *	cast	cast cbc
- *	skj	skipjack cbc
- *	aes	rijndael/aes 128-bit cbc
- *	aes192	rijndael/aes 192-bit cbc
- *	aes256	rijndael/aes 256-bit cbc
- *	chacha20 Chacha20 stream cipher
- *	blake2b	Blake2b
- *	blake2s	Blake2s
- *	md5	md5 hmac
- *	sha1	sha1 hmac
- *	sha256	256-bit sha2 hmac
- *	sha384	384-bit sha2 hmac
- *	sha512	512--bit sha2 hmac
- *
- * For a test of how fast a crypto card is, use something like:
- *	cryptotest -z 1024
- * This will run a series of tests using the available crypto/cipher
- * algorithms over a variety of buffer sizes.  The 1024 says to do 1024
- * iterations.  Extra arguments can be used to specify one or more buffer
- * sizes to use in doing tests.
- *
- * To fork multiple processes all doing the same work, specify -t X on the
- * command line to get X "threads" running simultaneously.  No effort is made
- * to synchronize the threads or otherwise maximize load.
- *
- * If the kernel crypto code is built with CRYPTO_TIMING and you run as root,
- * then you can specify the -p option to get a "profile" of the time spent
- * processing crypto operations.  At present this data is only meaningful for
- * symmetric operations.  To get meaningful numbers you must run on an idle
- * machine.
- *
- * Expect ~400 Mb/s for a Broadcom 582x for 8K buffers on a reasonable CPU
- * (64-bit PCI helps).  Hifn 7811 parts top out at ~110 Mb/s.
- */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-
-#define	CHUNK	64	/* how much to display */
-#define	streq(a,b)	(strcasecmp(a,b) == 0)
-
-void	hexdump(char *, int);
-
-int	verbose = 0;
-int	opflags = 0;
-int	verify = 0;
-int	crid = CRYPTO_FLAG_HARDWARE;
-
-struct alg {
-	const char* name;
-	int	ishash;
-	int	blocksize;
-	int	minkeylen;
-	int	maxkeylen;
-	int	code;
-} algorithms[] = {
-#ifdef CRYPTO_NULL_CBC
-	{ "null",	0,	8,	1,	256,	CRYPTO_NULL_CBC },
-#endif
-	{ "des",	0,	8,	8,	8,	CRYPTO_DES_CBC },
-	{ "3des",	0,	8,	24,	24,	CRYPTO_3DES_CBC },
-	{ "blf",	0,	8,	5,	56,	CRYPTO_BLF_CBC },
-	{ "cast",	0,	8,	5,	16,	CRYPTO_CAST_CBC },
-	{ "skj",	0,	8,	10,	10,	CRYPTO_SKIPJACK_CBC },
-	{ "rij",	0,	16,	16,	16,	CRYPTO_RIJNDAEL128_CBC},
-	{ "aes",	0,	16,	16,	16,	CRYPTO_AES_CBC},
-	{ "aes192",	0,	16,	24,	24,	CRYPTO_AES_CBC},
-	{ "aes256",	0,	16,	32,	32,	CRYPTO_AES_CBC},
-	{ "chacha20",	0,	1,	32,	32,	CRYPTO_CHACHA20},
-	{ "blake2b",	1,	128,	64,	64,	CRYPTO_BLAKE2B },
-	{ "blake2s",	1,	64,	32,	32,	CRYPTO_BLAKE2S },
-	{ "md5",	1,	8,	16,	16,	CRYPTO_MD5_HMAC },
-	{ "sha1",	1,	8,	20,	20,	CRYPTO_SHA1_HMAC },
-	{ "sha256",	1,	8,	32,	32,	CRYPTO_SHA2_256_HMAC },
-	{ "sha384",	1,	8,	48,	48,	CRYPTO_SHA2_384_HMAC },
-	{ "sha512",	1,	8,	64,	64,	CRYPTO_SHA2_512_HMAC },
-};
-
-void
-usage(const char* cmd)
-{
-	printf("usage: %s [-czsbv] [-d dev] [-a algorithm] [count] [size ...]\n",
-		cmd);
-	printf("where algorithm is one of:\n");
-	printf("    null des 3des (default) blowfish cast skipjack rij\n");
-	printf("    aes aes192 aes256 chacha20 md5 sha1 sha256 sha384 sha512\n");
-	printf("    blake2b blake2s\n");
-	printf(" or an encryption algorithm concatented with authentication\n");
-	printf(" algorithm with '+' in the middle, e.g., aes+sha1.\n");
-	printf("count is the number of encrypt/decrypt ops to do\n");
-	printf("size is the number of bytes of text to encrypt+decrypt\n");
-	printf("\n");
-	printf("-c check the results (slows timing)\n");
-	printf("-d use specific device, specify 'soft' for testing software implementations\n");
-	printf("\tNOTE: to use software you must set:\n\t sysctl kern.cryptodevallowsoft=1\n");
-	printf("-z run all available algorithms on a variety of sizes\n");
-	printf("-v be verbose\n");
-	printf("-b mark operations for batching\n");
-	printf("-p profile kernel crypto operation (must be root)\n");
-	printf("-t n for n threads and run tests concurrently\n");
-	exit(-1);
-}
-
-struct alg*
-getalgbycode(int cipher)
-{
-	int i;
-
-	for (i = 0; i < nitems(algorithms); i++)
-		if (cipher == algorithms[i].code)
-			return &algorithms[i];
-	return NULL;
-}
-
-struct alg*
-getalgbyname(const char* name)
-{
-	int i;
-
-	for (i = 0; i < nitems(algorithms); i++)
-		if (streq(name, algorithms[i].name))
-			return &algorithms[i];
-	return NULL;
-}
-
-int
-devcrypto(void)
-{
-	int fd = -1;
-
-	if (fd < 0) {
-		fd = open(_PATH_DEV "crypto", O_RDWR, 0);
-		if (fd < 0)
-			err(1, _PATH_DEV "crypto");
-		if (fcntl(fd, F_SETFD, 1) == -1)
-			err(1, "fcntl(F_SETFD) (devcrypto)");
-	}
-	return fd;
-}
-
-int
-crlookup(const char *devname)
-{
-	struct crypt_find_op find;
-
-	if (strncmp(devname, "soft", 4) == 0)
-		return CRYPTO_FLAG_SOFTWARE;
-
-	find.crid = -1;
-	strlcpy(find.name, devname, sizeof(find.name));
-	if (ioctl(devcrypto(), CIOCFINDDEV, &find) == -1)
-		err(1, "ioctl(CIOCFINDDEV)");
-	return find.crid;
-}
-
-const char *
-crfind(int crid)
-{
-	static struct crypt_find_op find;
-
-	bzero(&find, sizeof(find));
-	find.crid = crid;
-	if (ioctl(devcrypto(), CIOCFINDDEV, &find) == -1)
-		err(1, "ioctl(CIOCFINDDEV): crid %d", crid);
-	return find.name;
-}
-
-char
-rdigit(void)
-{
-	const char a[] = {
-		0x10,0x54,0x11,0x48,0x45,0x12,0x4f,0x13,0x49,0x53,0x14,0x41,
-		0x15,0x16,0x4e,0x55,0x54,0x17,0x18,0x4a,0x4f,0x42,0x19,0x01
-	};
-	return 0x20+a[random()%nitems(a)];
-}
-
-void
-runtest(struct alg *ealg, struct alg *alg, int count, int size, u_long cmd, struct timeval *tv)
-{
-	int i, fd = devcrypto();
-	struct timeval start, stop, dt;
-	char *cleartext, *ciphertext, *originaltext, *key;
-	struct session2_op sop;
-	struct crypt_op cop;
-	char iv[EALG_MAX_BLOCK_LEN];
-	char digest[512/8];
-
-	/* Canonicalize 'ealg' to crypt alg and 'alg' to authentication alg. */
-	if (ealg == NULL && !alg->ishash) {
-		ealg = alg;
-		alg = NULL;
-	}
-
-	bzero(&sop, sizeof(sop));
-	if (ealg != NULL) {
-		sop.keylen = (ealg->minkeylen + ealg->maxkeylen)/2;
-		key = (char *) malloc(sop.keylen);
-		if (key == NULL)
-			err(1, "malloc (key)");
-		for (i = 0; i < sop.keylen; i++)
-			key[i] = rdigit();
-		sop.key = key;
-		sop.cipher = ealg->code;
-	}
-	if (alg != NULL) {
-		sop.mackeylen = (alg->minkeylen + alg->maxkeylen)/2;
-		key = (char *) malloc(sop.mackeylen);
-		if (key == NULL)
-			err(1, "malloc (mac)");
-		for (i = 0; i < sop.mackeylen; i++)
-			key[i] = rdigit();
-		sop.mackey = key;
-		sop.mac = alg->code;
-	}
-
-	sop.crid = crid;
-	if (ioctl(fd, cmd, &sop) < 0) {
-		if (cmd == CIOCGSESSION || cmd == CIOCGSESSION2) {
-			close(fd);
-			if (verbose) {
-				printf("cipher %s%s%s", ealg? ealg->name : "",
-				    (ealg && alg) ? "+" : "",
-				    alg? alg->name : "");
-
-				if (alg->ishash)
-					printf(" mackeylen %u\n", sop.mackeylen);
-				else
-					printf(" keylen %u\n", sop.keylen);
-				perror("CIOCGSESSION");
-			}
-			/* hardware doesn't support algorithm; skip it */
-			return;
-		}
-		printf("cipher %s%s%s keylen %u mackeylen %u\n",
-		    ealg? ealg->name : "", (ealg && alg) ? "+" : "",
-		    alg? alg->name : "", sop.keylen, sop.mackeylen);
-		err(1, "CIOCGSESSION");
-	}
-
-	originaltext = malloc(3*size);
-	if (originaltext == NULL)
-		err(1, "malloc (text)");
-	cleartext = originaltext+size;
-	ciphertext = cleartext+size;
-	for (i = 0; i < size; i++)
-		cleartext[i] = rdigit();
-	memcpy(originaltext, cleartext, size);
-	for (i = 0; i < nitems(iv); i++)
-		iv[i] = rdigit();
-
-	if (verbose) {
-		printf("session = 0x%x\n", sop.ses);
-		printf("device = %s\n", crfind(sop.crid));
-		printf("count = %d, size = %d\n", count, size);
-		if (ealg) {
-			printf("iv:");
-			hexdump(iv, sizeof iv);
-		}
-		printf("cleartext:");
-		hexdump(cleartext, MIN(size, CHUNK));
-	}
-
-	gettimeofday(&start, NULL);
-	if (ealg) {
-		for (i = 0; i < count; i++) {
-			cop.ses = sop.ses;
-			cop.op = COP_ENCRYPT;
-			cop.flags = opflags | COP_F_CIPHER_FIRST;
-			cop.len = size;
-			cop.src = cleartext;
-			cop.dst = ciphertext;
-			if (alg)
-				cop.mac = digest;
-			else
-				cop.mac = 0;
-			cop.iv = iv;
-
-			if (ioctl(fd, CIOCCRYPT, &cop) < 0)
-				err(1, "ioctl(CIOCCRYPT)");
-
-			if (verify && bcmp(ciphertext, cleartext, size) == 0) {
-				printf("cipher text unchanged:");
-				hexdump(ciphertext, size);
-			}
-
-			memset(cleartext, 'x', MIN(size, CHUNK));
-			cop.ses = sop.ses;
-			cop.op = COP_DECRYPT;
-			cop.flags = opflags;
-			cop.len = size;
-			cop.src = ciphertext;
-			cop.dst = cleartext;
-			if (alg)
-				cop.mac = digest;
-			else
-				cop.mac = 0;
-			cop.iv = iv;
-
-			if (ioctl(fd, CIOCCRYPT, &cop) < 0)
-				err(1, "ioctl(CIOCCRYPT)");
-
-			if (verify && bcmp(cleartext, originaltext, size) != 0) {
-				printf("decrypt mismatch:\n");
-				printf("original:");
-				hexdump(originaltext, size);
-				printf("cleartext:");
-				hexdump(cleartext, size);
-			}
-		}
-	} else {
-		for (i = 0; i < count; i++) {
-			cop.ses = sop.ses;
-			cop.op = 0;
-			cop.flags = opflags;
-			cop.len = size;
-			cop.src = cleartext;
-			cop.dst = 0;
-			cop.mac = ciphertext;
-			cop.iv = 0;
-
-			if (ioctl(fd, CIOCCRYPT, &cop) < 0)
-				err(1, "ioctl(CIOCCRYPT)");
-		}
-	}
-	gettimeofday(&stop, NULL);
- 
-	if (ioctl(fd, CIOCFSESSION, &sop.ses) < 0)
-		perror("ioctl(CIOCFSESSION)");
-
-	if (verbose) {
-		printf("cleartext:");
-		hexdump(cleartext, MIN(size, CHUNK));
-	}
-	timersub(&stop, &start, tv);
-
-	free(originaltext);
-
-	close(fd);
-}
-
-#ifdef __FreeBSD__
-void
-resetstats()
-{
-	struct cryptostats stats;
-	size_t slen;
-
-	slen = sizeof (stats);
-	if (sysctlbyname("kern.crypto_stats", &stats, &slen, NULL, 0) < 0) {
-		perror("kern.crypto_stats");
-		return;
-	}
-	bzero(&stats.cs_invoke, sizeof (stats.cs_invoke));
-	bzero(&stats.cs_done, sizeof (stats.cs_done));
-	bzero(&stats.cs_cb, sizeof (stats.cs_cb));
-	bzero(&stats.cs_finis, sizeof (stats.cs_finis));
-	stats.cs_invoke.min.tv_sec = 10000;
-	stats.cs_done.min.tv_sec = 10000;
-	stats.cs_cb.min.tv_sec = 10000;
-	stats.cs_finis.min.tv_sec = 10000;
-	if (sysctlbyname("kern.crypto_stats", NULL, NULL, &stats, sizeof (stats)) < 0)
-		perror("kern.cryptostats");
-}
-
-void
-printt(const char* tag, struct cryptotstat *ts)
-{
-	uint64_t avg, min, max;
-
-	if (ts->count == 0)
-		return;
-	avg = (1000000000LL*ts->acc.tv_sec + ts->acc.tv_nsec) / ts->count;
-	min = 1000000000LL*ts->min.tv_sec + ts->min.tv_nsec;
-	max = 1000000000LL*ts->max.tv_sec + ts->max.tv_nsec;
-	printf("%16.16s: avg %6llu ns : min %6llu ns : max %7llu ns [%u samps]\n",
-		tag, avg, min, max, ts->count);
-}
-#endif
-
-void
-runtests(struct alg *ealg, struct alg *alg, int count, int size, u_long cmd, int threads, int profile)
-{
-	int i, status;
-	double t;
-	void *region;
-	struct timeval *tvp;
-	struct timeval total;
-	int otiming;
-
-	if (size % alg->blocksize || (ealg && size % ealg->blocksize)) {
-		if (verbose)
-			printf("skipping blocksize %u 'cuz not a multiple of "
-				"%s blocksize %u (or %s blocksize %u)\n",
-				size, alg->name, alg->blocksize,
-				ealg ?  ealg->name : "n/a",
-				ealg ? ealg->blocksize : 0);
-		return;
-	}
-
-	region = mmap(NULL, threads * sizeof (struct timeval),
-			PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED, -1, 0);
-	if (region == MAP_FAILED) {
-		perror("mmap");
-		return;
-	}
-	tvp = (struct timeval *) region;
-#ifdef __FreeBSD__
-	if (profile) {
-		size_t tlen = sizeof (otiming);
-		int timing = 1;
-
-		resetstats();
-		if (sysctlbyname("debug.crypto_timing", &otiming, &tlen,
-				&timing, sizeof (timing)) < 0)
-			perror("debug.crypto_timing");
-	}
-#endif
-
-	if (threads > 1) {
-		for (i = 0; i < threads; i++)
-			if (fork() == 0) {
-				cpuset_t mask;
-				CPU_ZERO(&mask);
-				CPU_SET(i, &mask);
-				cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID,
-				    -1, sizeof(mask), &mask);
-				runtest(ealg, alg, count, size, cmd, &tvp[i]);
-				exit(0);
-			}
-		while (waitpid(WAIT_MYPGRP, &status, 0) != -1)
-			;
-	} else
-		runtest(ealg, alg, count, size, cmd, tvp);
-
-	t = 0;
-	for (i = 0; i < threads; i++)
-		t += (((double)tvp[i].tv_sec * 1000000 + tvp[i].tv_usec) / 1000000);
-	if (t) {
-		int nops = alg->ishash ? count : 2*count;
-
-		nops *= threads;
-		printf("%8.3lf sec, %7d %6s%s%6s crypts, %7d bytes, %8.0lf byte/sec, %7.1lf Mb/sec\n",
-		    t, nops, alg->name, ealg? "+" : "", ealg? ealg->name : "",
-		    size, (double)nops*size / t,
-		    (double)nops*size / t * 8 / 1024 / 1024);
-	}
-#ifdef __FreeBSD__
-	if (profile) {
-		struct cryptostats stats;
-		size_t slen = sizeof (stats);
-
-		if (sysctlbyname("debug.crypto_timing", NULL, NULL,
-				&otiming, sizeof (otiming)) < 0)
-			perror("debug.crypto_timing");
-		if (sysctlbyname("kern.crypto_stats", &stats, &slen, NULL, 0) < 0)
-			perror("kern.cryptostats");
-		if (stats.cs_invoke.count) {
-			printt("dispatch->invoke", &stats.cs_invoke);
-			printt("invoke->done", &stats.cs_done);
-			printt("done->cb", &stats.cs_cb);
-			printt("cb->finis", &stats.cs_finis);
-		}
-	}
-#endif
-	fflush(stdout);
-}
-
-int
-main(int argc, char **argv)
-{
-	struct alg *alg = NULL, *ealg = NULL;
-	char *tmp;
-	int count = 1;
-	int sizes[128], nsizes = 0;
-	u_long cmd = CIOCGSESSION2;
-	int testall = 0;
-	int maxthreads = 1;
-	int profile = 0;
-	int i, ch;
-
-	while ((ch = getopt(argc, argv, "cpzsva:bd:t:")) != -1) {
-		switch (ch) {
-#ifdef CIOCGSSESSION
-		case 's':
-			cmd = CIOCGSSESSION;
-			break;
-#endif
-		case 'v':
-			verbose++;
-			break;
-		case 'a':
-			tmp = strchr(optarg, '+');
-			if (tmp != NULL) {
-				*tmp = '\0';
-				ealg = getalgbyname(optarg);
-				if (ealg == NULL || ealg->ishash)
-					usage(argv[0]);
-				optarg = tmp + 1;
-			}
-
-			alg = getalgbyname(optarg);
-			if (alg == NULL) {
-				if (streq(optarg, "rijndael"))
-					alg = getalgbyname("aes");
-				else
-					usage(argv[0]);
-			} else if (ealg != NULL && !alg->ishash)
-				usage(argv[0]);
-			break;
-		case 'd':
-			crid = crlookup(optarg);
-			break;
-		case 't':
-			maxthreads = atoi(optarg);
-			break;
-		case 'z':
-			testall = 1;
-			break;
-		case 'p':
-			profile = 1;
-			break;
-		case 'b':
-			opflags |= COP_F_BATCH;
-			break;
-		case 'c':
-			verify = 1;
-			break;
-		default:
-			usage(argv[0]);
-		}
-	}
-	argc -= optind, argv += optind;
-	if (argc > 0)
-		count = atoi(argv[0]);
-	while (argc > 1) {
-		int s = atoi(argv[1]);
-		if (nsizes < nitems(sizes)) {
-			sizes[nsizes++] = s;
-		} else {
-			printf("Too many sizes, ignoring %u\n", s);
-		}
-		argc--, argv++;
-	}
-	if (maxthreads > CPU_SETSIZE)
-		errx(EX_USAGE, "Too many threads, %d, choose fewer.", maxthreads);
-	
-	if (nsizes == 0) {
-		if (alg)
-			sizes[nsizes++] = alg->blocksize;
-		else
-			sizes[nsizes++] = 8;
-		if (testall) {
-			while (sizes[nsizes-1] < 8*1024) {
-				sizes[nsizes] = sizes[nsizes-1]<<1;
-				nsizes++;
-			}
-		}
-	}
-
-	if (testall) {
-		for (i = 0; i < nitems(algorithms); i++) {
-			int j;
-			alg = &algorithms[i];
-			for (j = 0; j < nsizes; j++)
-				runtests(ealg, alg, count, sizes[j], cmd, maxthreads, profile);
-		}
-	} else {
-		if (alg == NULL)
-			alg = getalgbycode(CRYPTO_3DES_CBC);
-		for (i = 0; i < nsizes; i++)
-			runtests(ealg, alg, count, sizes[i], cmd, maxthreads, profile);
-	}
-
-	return (0);
-}
-
-void
-hexdump(char *p, int n)
-{
-	int i, off;
-
-	for (off = 0; n > 0; off += 16, n -= 16) {
-		printf("%s%04x:", off == 0 ? "\n" : "", off);
-		i = (n >= 16 ? 16 : n);
-		do {
-			printf(" %02x", *p++ & 0xff);
-		} while (--i);
-		printf("\n");
-	}
-}

From nobody Tue Sep 23 12:57:55 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWKlS2K9Mz68c5c;
	Tue, 23 Sep 2025 12: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
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWKlS196vz3TLy;
	Tue, 23 Sep 2025 12:57:56 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758632276;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=aikxmT7E2XhZCmGYM7Kg5vVHvz5aobmecjtsg/hor84=;
	b=vNS6ka8kV8HYD0V1qc36tfY19Rf/KyGpZLPyUC56EiPduq0tXqEFNiW6GLTDDmWlMLbmFq
	K5KkGC0blKJGW2Lr63QTJho07Ge9XxKjewx1bz6zYyks3G2wRJOjTKTyhOBGbkfMzFiIR1
	URiUZTz35Q23mincbVoL0ROK6Gq2MliTAaT59zNUHlikgOWYuSUjoorLv2O9Duw+K+8Za2
	9F65Zsfla3w+JQsWmRQTVMvvuWVrKbi5BB96/g6K6oK9orRMBk8eFVt0vv9twiTB4NnoJu
	gXSrakEvS+nnHQiXBF5Ca9/T9OWny5gw9yzZ4IPokfeTJv1yvzGL8WqtdqKo3A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758632276;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=aikxmT7E2XhZCmGYM7Kg5vVHvz5aobmecjtsg/hor84=;
	b=bqYGM3xrSbD07Wj3z4HpR8yMd/uPYl7PkbZ0QQgBTg5EVQpcJDvqNNoUQLnYuvS684S0UH
	1vmhfr8bu86pEdzBqhxPBA+sfwCePCSo1mdjyojfTPCCoK/iudlIrtubaoeciDND0mA4ks
	6totvtEicBbT24Ot3KQ8vt5dU/HRXLDeLn6Ri8g+kivDmUiI3X9LUvjDWbJHOI1SZnhXXn
	7RP0m/K667oLRPIo6mZva8i76fo+8RySLmljO1nkffpc16hB5nB6XUIa8h73TPtsgBBaPN
	Ta899v13qzl9wGC520uUFtFJYih2Th5eXSeHwfrtG+ORODWwY1+TutxQmrGcww==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758632276; a=rsa-sha256; cv=none;
	b=NSwAah1Esn7AFs1qsfOeon8+1TJyhqPV349LiaOIvyyCaZEeJ8E2IlcEXj1yHTPJNo8a8i
	wIhLaJOiDV3mEp4OPWPsdZjphDrNlV7CsXh4/S/1OWbx3EoWZE2/jc1Ncr+X1c1JuywMHW
	BTom8pzLn+2yZvEJA88QGEpo9cHUeIBtYgNkXJVdQUCt2DzO0W+3HIQLpJXMvRJG7wfUQv
	XZ1V7UjphG++zQdrKXQtEmF8KyLI41IaehECj5W8Y9YSw91ahzL+dp/hgOaRUmX1ikuu7o
	nu+Iyr0fvuSDuyQ17z3RGxFd0lhURsT3ZjQ75TvbnONiEKjuU1WjQcLDYhHuvQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWKlS0dp7zn7g;
	Tue, 23 Sep 2025 12:57:56 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NCvtv7004021;
	Tue, 23 Sep 2025 12:57:55 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NCvtIu004018;
	Tue, 23 Sep 2025 12:57:55 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:57:55 GMT
Message-Id: <202509231257.58NCvtIu004018@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= 
Subject: git: 697d7905aba9 - stable/15 - stat: Add option to list
  holes
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: des
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 697d7905aba98c7e76ccbb9fffea173379f11296
Auto-Submitted: auto-generated

The branch stable/15 has been updated by des:

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

commit 697d7905aba98c7e76ccbb9fffea173379f11296
Author:     Dag-Erling Smørgrav 
AuthorDate: 2025-09-16 13:37:57 +0000
Commit:     Dag-Erling Smørgrav 
CommitDate: 2025-09-23 12:57:30 +0000

    stat: Add option to list holes
    
    Add a new -h option that causes stat to print a list of holes for each
    file argument.
    
    Sponsored by:   Klara, Inc.
    Reviewed by:    markj
    Differential Revision:  https://reviews.freebsd.org/D52481
    
    (cherry picked from commit 1a7a067da456f8962ef87bfdf75c94cd12988615)
---
 usr.bin/stat/stat.1             |  45 +++++++++-
 usr.bin/stat/stat.c             | 176 ++++++++++++++++++++++++++++++----------
 usr.bin/stat/tests/stat_test.sh |  72 ++++++++++++++++
 3 files changed, 250 insertions(+), 43 deletions(-)

diff --git a/usr.bin/stat/stat.1 b/usr.bin/stat/stat.1
index 2996781fafa6..55e64de0767e 100644
--- a/usr.bin/stat/stat.1
+++ b/usr.bin/stat/stat.1
@@ -6,6 +6,8 @@
 .\" This code is derived from software contributed to The NetBSD Foundation
 .\" by Andrew Brown and Jan Schaumann.
 .\"
+.\" Copyright (c) 2025 Klara, Inc.
+.\"
 .\" Redistribution and use in source and binary forms, with or without
 .\" modification, are permitted provided that the following conditions
 .\" are met:
@@ -27,7 +29,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd June 22, 2017
+.Dd September 9, 2025
 .Dt STAT 1
 .Os
 .Sh NAME
@@ -36,7 +38,7 @@
 .Nd display file status
 .Sh SYNOPSIS
 .Nm
-.Op Fl FHLnq
+.Op Fl FHhLnq
 .Op Fl f Ar format | Fl l | r | s | x
 .Op Fl t Ar timefmt
 .Op Ar
@@ -129,6 +131,45 @@ and use
 instead of
 .Xr lstat 2 .
 This requires root privileges.
+.It Fl h
+For each file argument, print a line consisting of a comma-separated
+list of holes, a space, and the file name.
+Each hole is reported as its starting offset as a decimal number
+followed by a hyphen and the ending offset (one less than the starting
+offset of the data region that follows the hole) as a decimal number.
+If the file ends in a hole, the ending offset of the final hole will
+be one less than the size of the file.
+Otherwise, the final entry in the list (indeed, the only entry in the
+list, if the file is not sparse), is a single decimal number
+corresponding to the size of the file, representing the virtual hole
+at the end of the file.
+.Pp
+If the argument is a directory, instead of a list of holes, a single
+number is printed, corresponding to the minimum hole size for that
+directory as reported by
+.Xr pathconf 2 ,
+followed by a space and the directory name.
+.Pp
+Please note that the only way to retrieve information about the holes
+in a file is to open it and walk the list of holes and data regions
+using
+.Xr lseek 2 .
+If the file is being modified by another process at the same time as
+.Nm
+is inspecting it, the result may be inconsistent.
+.Pp
+This option cannot be combined with the
+.Fl F ,
+.Fl f ,
+.Fl H ,
+.Fl L ,
+.Fl l ,
+.Fl r ,
+.Fl s ,
+.Fl t ,
+or
+.Fl x
+options.
 .It Fl L
 Use
 .Xr stat 2
diff --git a/usr.bin/stat/stat.c b/usr.bin/stat/stat.c
index 1fd8288728c1..0ed5d3ae5b53 100644
--- a/usr.bin/stat/stat.c
+++ b/usr.bin/stat/stat.c
@@ -7,6 +7,8 @@
  * This code is derived from software contributed to The NetBSD Foundation
  * by Andrew Brown.
  *
+ * Copyright (c) 2025 Klara, Inc.
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -47,18 +49,19 @@ __RCSID("$NetBSD: stat.c,v 1.33 2011/01/15 22:54:10 njoly Exp $"
 #endif /* HAVE_CONFIG_H */
 
 #include 
-#include 
 #include 
 #include 
 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -178,22 +181,24 @@ __RCSID("$NetBSD: stat.c,v 1.33 2011/01/15 22:54:10 njoly Exp $"
 #define SHOW_filename	'N'
 #define SHOW_sizerdev	'Z'
 
-void	usage(const char *);
-void	output(const struct stat *, const char *,
-	    const char *, int, int);
-int	format1(const struct stat *,	/* stat info */
+static void	 usage(const char *);
+static void	 output(const struct stat *, const char *, const char *, int);
+static int	 format1(const struct stat *,	/* stat info */
 	    const char *,		/* the file name */
 	    const char *, int,		/* the format string itself */
 	    char *, size_t,		/* a place to put the output */
 	    int, int, int, int,		/* the parsed format */
 	    int, int);
-int	hex2byte(const char [2]);
+static int	 hex2byte(const char [2]);
 #if HAVE_STRUCT_STAT_ST_FLAGS
-char   *xfflagstostr(unsigned long);
+static char	*xfflagstostr(unsigned long);
 #endif
+static int	 fdlistholes(int, const char *);
+static int	 listholes(const char *);
 
 static const char *timefmt;
 static int linkfail;
+static bool nonl;
 
 #define addchar(s, c, nl) \
 	do { \
@@ -205,20 +210,22 @@ int
 main(int argc, char *argv[])
 {
 	struct stat st;
-	int ch, rc, errs, am_readlink;
-	int lsF, fmtchar, usestat, nfs_handle, fn, nonl, quiet;
-	const char *statfmt, *options, *synopsis;
 	char dname[sizeof _PATH_DEV + SPECNAMELEN] = _PATH_DEV;
-	fhandle_t fhnd;
+	const char *statfmt, *options, *synopsis;
 	const char *file;
+	fhandle_t fhnd;
+	int ch, rc, errs, am_readlink, fn, fmtchar;
+	bool lsF, holes, usestat, nfs_handle, quiet;
 
 	am_readlink = 0;
-	lsF = 0;
+	errs = 0;
+	lsF = false;
 	fmtchar = '\0';
-	usestat = 0;
-	nfs_handle = 0;
-	nonl = 0;
-	quiet = 0;
+	holes = false;
+	usestat = false;
+	nfs_handle = false;
+	nonl = false;
+	quiet = false;
 	linkfail = 0;
 	statfmt = NULL;
 	timefmt = NULL;
@@ -231,28 +238,35 @@ main(int argc, char *argv[])
 		fmtchar = 'f';
 		quiet = 1;
 	} else {
-		options = "f:FHlLnqrst:x";
-		synopsis = "[-FLnq] [-f format | -l | -r | -s | -x] "
+		options = "Ff:HhLlnqrst:x";
+		synopsis = "[-FHhLnq] [-f format | -l | -r | -s | -x] "
 		    "[-t timefmt] [file|handle ...]";
 	}
 
 	while ((ch = getopt(argc, argv, options)) != -1)
 		switch (ch) {
 		case 'F':
-			lsF = 1;
+			lsF = true;
 			break;
                 case 'H':
-			nfs_handle = 1;
+			nfs_handle = true;
+			break;
+		case 'h':
+			holes = true;
 			break;
 		case 'L':
-			usestat = 1;
+			usestat = true;
 			break;
 		case 'n':
-			nonl = 1;
+			nonl = true;
+			break;
+		case 't':
+			timefmt = optarg;
 			break;
 		case 'q':
-			quiet = 1;
+			quiet = true;
 			break;
+		/* remaining cases are purposefully out of order */
 		case 'f':
 			if (am_readlink) {
 				statfmt = "%R";
@@ -269,9 +283,6 @@ main(int argc, char *argv[])
 				    fmtchar, ch);
 			fmtchar = ch;
 			break;
-		case 't':
-			timefmt = optarg;
-			break;
 		default:
 			usage(synopsis);
 		}
@@ -280,6 +291,28 @@ main(int argc, char *argv[])
 	argv += optind;
 	fn = 1;
 
+	if (holes) {
+		if (fmtchar || lsF || nfs_handle || usestat || timefmt)
+			usage(synopsis);
+		if (argc > 0) {
+			while (argc-- > 0) {
+				if (listholes(*argv) != 0) {
+					if (!quiet)
+						warn("%s", *argv);
+					errs++;
+				}
+				argv++;
+			}
+		} else {
+			if (fdlistholes(STDIN_FILENO, "stdin") != 0) {
+				if (!quiet)
+					warn("stdin");
+				errs++;
+			}
+		}
+		exit(errs ? 1 : 0);
+	}
+
 	if (fmtchar == '\0') {
 		if (lsF)
 			fmtchar = 'l';
@@ -318,7 +351,6 @@ main(int argc, char *argv[])
 	if (timefmt == NULL)
 		timefmt = TIME_FORMAT;
 
-	errs = 0;
 	do {
 		if (argc == 0) {
 			if (fdevname_r(STDIN_FILENO, dname +
@@ -361,8 +393,7 @@ main(int argc, char *argv[])
 				    errno == ENOENT &&
 				    (rc = lstat(file, &st)) == -1)
 					errno = ENOENT;
-			}
-			else
+			} else
 				rc = lstat(file, &st);
 		}
 
@@ -371,9 +402,8 @@ main(int argc, char *argv[])
 			linkfail = 1;
 			if (!quiet)
 				warn("%s", file);
-		}
-		else
-			output(&st, file, statfmt, fn, nonl);
+		} else
+			output(&st, file, statfmt, fn);
 
 		argv++;
 		argc--;
@@ -387,7 +417,7 @@ main(int argc, char *argv[])
 /*
  * fflagstostr() wrapper that leaks only once
  */
-char *
+static char *
 xfflagstostr(unsigned long fflags)
 {
 	static char *str = NULL;
@@ -402,10 +432,9 @@ xfflagstostr(unsigned long fflags)
 }
 #endif /* HAVE_STRUCT_STAT_ST_FLAGS */
 
-void
+static void
 usage(const char *synopsis)
 {
-
 	(void)fprintf(stderr, "usage: %s %s\n", getprogname(), synopsis);
 	exit(1);
 }
@@ -413,9 +442,8 @@ usage(const char *synopsis)
 /* 
  * Parses a format string.
  */
-void
-output(const struct stat *st, const char *file,
-    const char *statfmt, int fn, int nonl)
+static void
+output(const struct stat *st, const char *file, const char *statfmt, int fn)
 {
 	int flags, size, prec, ofmt, hilo, what;
 	char buf[PATH_MAX + 4 + 1];
@@ -606,7 +634,7 @@ output(const struct stat *st, const char *file,
 /*
  * Arranges output according to a single parsed format substring.
  */
-int
+static int
 format1(const struct stat *st,
     const char *file,
     const char *fmt, int flen,
@@ -1073,7 +1101,7 @@ format1(const struct stat *st,
 	(void)strcat(lfmt, "ll");
 	switch (ofmt) {
 	case FMTF_DECIMAL:	(void)strcat(lfmt, "d");	break;
-	case FMTF_OCTAL:		(void)strcat(lfmt, "o");	break;
+	case FMTF_OCTAL:	(void)strcat(lfmt, "o");	break;
 	case FMTF_UNSIGNED:	(void)strcat(lfmt, "u");	break;
 	case FMTF_HEX:		(void)strcat(lfmt, "x");	break;
 	}
@@ -1083,9 +1111,75 @@ format1(const struct stat *st,
 
 
 #define hex2nibble(c) (c <= '9' ? c - '0' : toupper(c) - 'A' + 10)
-int
+static int
 hex2byte(const char c[2]) {
 	if (!(ishexnumber(c[0]) && ishexnumber(c[1])))
 		return -1;
 	return (hex2nibble(c[0]) << 4) + hex2nibble(c[1]);
 }
+
+static int
+fdlistholes(int fd, const char *fn)
+{
+	struct stat sb;
+	off_t pos = 0, off;
+	long l;
+
+	if (fstat(fd, &sb) < 0)
+		return (-1);
+	if (S_ISDIR(sb.st_mode)) {
+		if ((l = fpathconf(fd, _PC_MIN_HOLE_SIZE)) < 0)
+			return (-1);
+		printf("%ld", l);
+	} else if (!S_ISREG(sb.st_mode)) {
+		errno = ESPIPE;
+		return (-1);
+	} else {
+		for (;;) {
+			if ((off = lseek(fd, pos, SEEK_HOLE)) < 0) {
+				if (errno != ENXIO)
+					return (-1);
+				/*
+				 * This can only happen if the file was
+				 * truncated while we were scanning it, or
+				 * on the initial seek if the file is
+				 * empty.  Report the virtual hole at the
+				 * end of the file at this position.
+				 */
+				off = pos;
+			}
+			printf("%jd", (intmax_t)off);
+			pos = off;
+			if ((off = lseek(fd, pos, SEEK_DATA)) < 0) {
+				if (errno != ENXIO)
+					return (-1);
+				/*
+				 * There are no more data regions in the
+				 * file, or it got truncated.  However, we
+				 * may not be at the end yet.
+				 */
+				if ((off = lseek(fd, 0, SEEK_END)) > pos)
+					printf("-%jd", (intmax_t)off - 1);
+				break;
+			}
+			printf("-%jd,", (intmax_t)off - 1);
+			pos = off;
+		}
+	}
+	printf(" %s", fn);
+	if (!nonl)
+		printf("\n");
+	return (0);
+}
+
+static int
+listholes(const char *fn)
+{
+	int fd, ret;
+
+	if ((fd = open(fn, O_RDONLY)) < 0)
+		return (-1);
+	ret = fdlistholes(fd, fn);
+	close(fd);
+	return (ret);
+}
diff --git a/usr.bin/stat/tests/stat_test.sh b/usr.bin/stat/tests/stat_test.sh
index e75fd0c56490..afe698575034 100755
--- a/usr.bin/stat/tests/stat_test.sh
+++ b/usr.bin/stat/tests/stat_test.sh
@@ -1,6 +1,7 @@
 #
 # Copyright (c) 2017 Dell EMC
 # All rights reserved.
+# Copyright (c) 2025 Klara, Inc.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -45,6 +46,76 @@ F_flag_body()
 	atf_check -o match:'.* f\|' stat -Fn f
 }
 
+atf_test_case h_flag cleanup
+h_flag_head()
+{
+	atf_set "descr" "Verify the output format for -h"
+	atf_set "require.user" "root"
+}
+h_flag_body()
+{
+	# POSIX defines a hole as “[a] contiguous region of bytes
+	# within a file, all having the value of zero” and requires
+	# that “all seekable files shall have a virtual hole starting
+	# at the current size of the file” but says “it is up to the
+	# implementation to define when sparse files can be created
+	# and with what granularity for the size of holes”.  It also
+	# defines a sparse file as “[a] file that contains more holes
+	# than just the virtual hole at the end of the file”.  That's
+	# pretty much the extent of its discussion of holes, apart
+	# from the description of SEEK_HOLE and SEEK_DATA in the lseek
+	# manual page.  In other words, there is no portable way to
+	# reliably create a hole in a file on any given file system.
+	#
+	# On FreeBSD, this test is likely to run on either tmpfs, ufs
+	# (ffs2), or zfs.  Of those three, only tmpfs has predictable
+	# semantics and supports all possible configurations (the
+	# minimum hole size on zfs is variable for small files, and
+	# ufs will not allow a file to end in a hole).
+	atf_check mkdir mnt
+	atf_check mount -t tmpfs tmpfs mnt
+	cd mnt
+
+	# For a directory, prints the minimum hole size, which on
+	# tmpfs is the system page size.
+	ps=$(sysctl -n hw.pagesize)
+	atf_check -o inline:"$((ps)) .\n" stat -h .
+	atf_check -o inline:"$((ps)) ." stat -hn .
+
+	# For a file, prints a list of holes.
+	atf_check truncate -s 0 foo
+	atf_check -o inline:"0 foo" \
+	    stat -hn foo
+	atf_check truncate -s "$((ps))" foo
+	atf_check -o inline:"0-$((ps-1)) foo" \
+	    stat -hn foo
+	atf_check dd status=none if=/COPYRIGHT of=foo \
+	    oseek="$((ps))" bs=1 count=1
+	atf_check -o inline:"0-$((ps-1)),$((ps+1)) foo" \
+	    stat -hn foo
+	atf_check truncate -s "$((ps*3))" foo
+	atf_check -o inline:"0-$((ps-1)),$((ps*2))-$((ps*3-1)) foo" \
+	    stat -hn foo
+
+	# Test multiple files.
+	atf_check dd status=none if=/COPYRIGHT of=bar
+	sz=$(stat -f%z bar)
+	atf_check -o inline:"0-$((ps-1)),$((ps*2))-$((ps*3-1)) foo
+$((sz)) bar
+" \
+	    stat -h foo bar
+
+	# For a device, fail.
+	atf_check -s exit:1 -e match:"/dev/null: Illegal seek" \
+	    stat -h /dev/null
+}
+h_flag_cleanup()
+{
+	if [ -d mnt ]; then
+		umount mnt || true
+	fi
+}
+
 atf_test_case l_flag
 l_flag_head()
 {
@@ -233,6 +304,7 @@ atf_init_test_cases()
 {
 	atf_add_test_case F_flag
 	#atf_add_test_case H_flag
+	atf_add_test_case h_flag
 	#atf_add_test_case L_flag
 	#atf_add_test_case f_flag
 	atf_add_test_case l_flag

From nobody Tue Sep 23 12:57:57 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWKlT3Vxrz68cQb;
	Tue, 23 Sep 2025 12:57:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWKlT26fRz3TMD;
	Tue, 23 Sep 2025 12:57:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758632277;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=wMnj8DJ09nXoNWfjh4ffZtY4JcNzqno00u4bHLtMdeo=;
	b=Zhy/g3XZhW9rq7pd/alWOBiF8xj1nYrFJSERIROZeAKko9zP/4jN1W0cVJSqTTkeWygukc
	SplRamrmyVdPclIDiGJ72RSxR5C1fvcgp4mY4t+z8G1uRCYygc9mcu+27zwy4i2ffp+OKu
	FwowA6WBcDiZNuzMXQ/Y/N9hAm+8Xbzwz0MrSWP4f0HwKVffhvpRqkJBbcQFh0KFZJcuds
	jKEVvYpkMnU7kFjDEDdxaoHh4I56bGhcOpRgTubpzyZNn4urexKKS3QjiuQzus/b4l0KAS
	a7AJbJT0GgCw7+ztq3p7jNGx5R7X42xy+JcBTPct38m1QMucF1bvkhtySvLVjA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758632277;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=wMnj8DJ09nXoNWfjh4ffZtY4JcNzqno00u4bHLtMdeo=;
	b=BJqXTgA/r/Uw4IsZ8RjGD0K9bVl4cHXtRyU3qTUeC93HEjWojo36UQdbmZn6SoYQcRVDLx
	KKHY7L8tKgoCBXfwP/jZVgWmiDCidqvXGRvANPCXqZ+g30Af+dZEvSuwID64qUmdNxTRlq
	HaSwTgiHZ5NGPtLb7sxJu3/79qTWdKoB+6eoQ6VCr8yvyQmzmhLFFZDrJ17TtGARLsIjDR
	e85x2YzMF8f2Z+POTUxBLQil5LFyGcKQ6wBUBhqNkM6bNZTVbenUoqIv4f7LrN4II0hCBL
	l+HrdkhNB2ThKLgtKibl74blwZJHloYkSddDCVtpd0pLAosJaIKEmPH5CI+udg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758632277; a=rsa-sha256; cv=none;
	b=USInMrREumRyWZ838sIBmRIqVhaQBOHrTnNSg/XB4LsQe5lx3RNxj8pdp77dexN1/zNAsH
	qn76jBZnEYO9tZJ1U/f3wkbScjoLhsd+qKfVKBFVfLpEOfwSDKGIKug5hw8UfijSDmkem3
	Zk67nyqSgzS+DHWsA+vde87+97N4St8fzhoy06JLoQMG2/XydnKkrgoh2IHZweYjr9Ibha
	MpTMKgb26U4GcYvjWSm2pC/4RWBJb+zV6nZZNiSLtnrJ8CNZFqYYJajkB2LRHxsILo6y20
	sY1d0v8D8n0FQOGtqNW1a0pBTkEx+YjdVcvta0c1D0OBITNLlOAkJITwu7Ascw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWKlT1hT3zn6l;
	Tue, 23 Sep 2025 12:57:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NCvv7a004063;
	Tue, 23 Sep 2025 12:57:57 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NCvv20004060;
	Tue, 23 Sep 2025 12:57:57 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:57:57 GMT
Message-Id: <202509231257.58NCvv20004060@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= 
Subject: git: 519a1c971e67 - stable/15 - cp: Drop test helper
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: des
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 519a1c971e67f3937dfc8744afaf082b7221caca
Auto-Submitted: auto-generated

The branch stable/15 has been updated by des:

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

commit 519a1c971e67f3937dfc8744afaf082b7221caca
Author:     Dag-Erling Smørgrav 
AuthorDate: 2025-09-16 13:38:03 +0000
Commit:     Dag-Erling Smørgrav 
CommitDate: 2025-09-23 12:57:30 +0000

    cp: Drop test helper
    
    Now that stat(1) can report whether a file is sparse, we no longer need
    a helper program for our tests.
    
    Sponsored by:   Klara, Inc.
    Reviewed by:    markj
    Differential Revision:  https://reviews.freebsd.org/D52482
    
    (cherry picked from commit 9b8224b950fb74c8674d257a5a4795baa759c35b)
---
 ObsoleteFiles.inc       |  3 ++
 bin/cp/tests/Makefile   |  2 --
 bin/cp/tests/cp_test.sh |  2 +-
 bin/cp/tests/sparse.c   | 73 -------------------------------------------------
 4 files changed, 4 insertions(+), 76 deletions(-)

diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
index 02a727d631bd..ae83035b5de5 100644
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -51,6 +51,9 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20250911: This tool is no longer needed
+OLD_FILES+=usr/tests/bin/cp/sparse
+
 # 20250826: Remove a misspelled manual
 OLD_FILES+=usr/share/man/man3/sysdecode_syscallnames.3.gz
 
diff --git a/bin/cp/tests/Makefile b/bin/cp/tests/Makefile
index 3fa9ae8f0685..a1917ada8fbf 100644
--- a/bin/cp/tests/Makefile
+++ b/bin/cp/tests/Makefile
@@ -1,7 +1,5 @@
 PACKAGE=	tests
 
 ATF_TESTS_SH=	cp_test
-PROGS+=		sparse
-BINDIR=		${TESTSDIR}
 
 .include 
diff --git a/bin/cp/tests/cp_test.sh b/bin/cp/tests/cp_test.sh
index 999993bfad67..fdf50d042f0b 100755
--- a/bin/cp/tests/cp_test.sh
+++ b/bin/cp/tests/cp_test.sh
@@ -384,7 +384,7 @@ samefile_body()
 
 file_is_sparse()
 {
-	atf_check ${0%/*}/sparse "$1"
+	atf_check -o match:"^[0-9]+-[0-9]" stat -h "$1"
 }
 
 files_are_equal()
diff --git a/bin/cp/tests/sparse.c b/bin/cp/tests/sparse.c
deleted file mode 100644
index 78957581a56c..000000000000
--- a/bin/cp/tests/sparse.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*-
- * Copyright (c) 2023 Klara, Inc.
- *
- * SPDX-License-Identifier: BSD-2-Clause
- */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-static bool verbose;
-
-/*
- * Returns true if the file named by its argument is sparse, i.e. if
- * seeking to SEEK_HOLE returns a different value than seeking to
- * SEEK_END.
- */
-static bool
-sparse(const char *filename)
-{
-	off_t hole, end;
-	int fd;
-
-	if ((fd = open(filename, O_RDONLY)) < 0 ||
-	    (hole = lseek(fd, 0, SEEK_HOLE)) < 0 ||
-	    (end = lseek(fd, 0, SEEK_END)) < 0)
-		err(1, "%s", filename);
-	close(fd);
-	if (end > hole) {
-		if (verbose)
-			printf("%s: hole at %zu\n", filename, (size_t)hole);
-		return (true);
-	}
-	return (false);
-}
-
-static void
-usage(void)
-{
-
-	fprintf(stderr, "usage: sparse [-v] file [...]\n");
-	exit(EX_USAGE);
-}
-
-int
-main(int argc, char *argv[])
-{
-	int opt, rv;
-
-	while ((opt = getopt(argc, argv, "v")) != -1) {
-		switch (opt) {
-		case 'v':
-			verbose = true;
-			break;
-		default:
-			usage();
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (argc == 0)
-		usage();
-	rv = EXIT_SUCCESS;
-	while (argc-- > 0)
-		if (!sparse(*argv++))
-			rv = EXIT_FAILURE;
-	exit(rv);
-}

From nobody Tue Sep 23 12:57:59 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWKlW5y20z68cSk;
	Tue, 23 Sep 2025 12:57:59 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWKlW5jfwz3TVy;
	Tue, 23 Sep 2025 12:57:59 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758632279;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=uUpA51erUjKVIIHojG22DbZtTWPFl6EQMKytDYb7/kQ=;
	b=CoquzS4Aun1JlhtAMP/qiqfNRS59R/srUPJ/84UIFJdIrMfdbsD+yQO7pDZ3EzAoKWYv1e
	QE+7VC0uvJNcFrNED2XDiNbobbNzq8APWlIKQ3GTZmQxi/yyWadChcxPVpqKuAQqre+e+6
	qrAFedEQBpzrn3pRFAkEDePio9U0nUJEbasjzVxbCBbJQ14/53Y44F2v2MN8onEpTg+oz0
	Xr2goyQGqItcZebratPYuZG9euvKAuDigHtVbrZ+c8mw/FQDLwtqKFLBmoBPBlEcAVpwrl
	60irgHTcv6pClsJkvMFmxDBueTuGPeNmGrKG3fGNONCpfN9MVPh0qXecCQAgzw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758632279;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=uUpA51erUjKVIIHojG22DbZtTWPFl6EQMKytDYb7/kQ=;
	b=HdsY7kiQ9SZsCTFzs9cByuTuGbIrm6Mrq5/GdAjFNt2+WgCsuMc5NLnOXGiu3vCmMrK6up
	6acyCKFLSsGvJv6mD/yVlXjeC/UYhWIYOpIKdZ5FOq8jspv5wJVliHkiK20dicnoIRDHo7
	2Qz0/opoYZ2X26YegzmqhEDHgquLDxqoO+3KGlTmtUOeyRBVdo4v/3NWxtPDn6O4T//9Cb
	PZkBTMw55GpJjFhWIGGk/ltj9pTMqm1qrXCXwdzXk9kX4e09JEgq0rEmDl5K+uP7CXJLqD
	UM3+LxzVmw5U4LNz5NAy9aNaYs/Hib/Qs/g84RIjLZGv0m5TEycoqveDcDDBcQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758632279; a=rsa-sha256; cv=none;
	b=bUrfaGspwacX3DM6qDMocvtszd7psOemc8tW9QVjCw5gsT9QaD5ABrs2sgsnyAzs5lU7JK
	Ajy71Rbp5pUsuD7auNADxVnZ+BwO13vHZ+YKaSDAcF67sUiWyutcum9PdVDq0xV3WJ3S9c
	zeyGh72kqRED3ELzUpRrvS03xDSVTsToxCbQuVon1GfIlGod0BQ6R4Uid45REOHw1559/4
	K3a8gk1gwzWEYOuDFx1OPtQRZkq6fTEnPPKOWsim2baKsZdXz8kH5b6pC+vA+Nq3eGYE4P
	/hl/DKbEkCSNEb27zrx6woD9rm0Va66Pct7/NTP7xu/+llGOPPtoo2MaCI7JPw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWKlW5G22zmvY;
	Tue, 23 Sep 2025 12:57:59 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NCvxpr004239;
	Tue, 23 Sep 2025 12:57:59 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NCvxBG004235;
	Tue, 23 Sep 2025 12:57:59 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:57:59 GMT
Message-Id: <202509231257.58NCvxBG004235@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= 
Subject: git: af3e311a2734 - stable/14 - atf, kyua: Implement
  require.kmods.
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: des
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: af3e311a27341a567624dbae3ad84b65ec066858
Auto-Submitted: auto-generated

The branch stable/14 has been updated by des:

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

commit af3e311a27341a567624dbae3ad84b65ec066858
Author:     Dag-Erling Smørgrav 
AuthorDate: 2025-05-31 12:27:30 +0000
Commit:     Dag-Erling Smørgrav 
CommitDate: 2025-09-23 12:57:35 +0000

    atf, kyua: Implement require.kmods.
    
    This adds a metadata variable, require.kmods, and corresponding functions
    or methods in C, C++, and shell, which allow a test to specify that it
    requires particular kernel modules to run.  If the kernel modules are not
    present, the test is skipped.  One might want to consider a kyua option
    which makes it attempt to load the modules instead.
    
    Differential Revision:  https://reviews.freebsd.org/D47470
    
    (cherry picked from commit 83a1ee578c9d1ab7013e997289c7cd470c0e6902)
---
 contrib/atf/atf-c++/atf-c++.3        | 10 +++++-
 contrib/atf/atf-c++/tests.cpp        |  7 +++++
 contrib/atf/atf-c++/tests.hpp        |  1 +
 contrib/atf/atf-c/atf-c.3            | 14 ++++++++-
 contrib/atf/atf-c/tc.c               | 61 ++++++++++++++++++++++++++++++++++++
 contrib/atf/atf-c/tc.h               |  3 ++
 contrib/atf/atf-sh/atf-sh.3          | 13 +++++++-
 contrib/atf/atf-sh/libatf-sh.subr    | 12 +++++++
 contrib/atf/doc/atf-test-case.4      | 10 +++++-
 contrib/kyua/engine/atf_list.cpp     |  4 +++
 contrib/kyua/engine/requirements.cpp | 30 ++++++++++++++++++
 contrib/kyua/model/metadata.cpp      | 22 +++++++++++++
 contrib/kyua/model/metadata.hpp      |  6 ++++
 lib/atf/libatf-c/Makefile            |  2 ++
 libexec/atf/atf-sh/Makefile          |  1 +
 tests/sys/fs/tarfs/tarfs_test.sh     | 18 ++++++++++-
 tests/sys/net/if_wg.sh               | 15 +++------
 usr.bin/kyua/Makefile                |  2 +-
 18 files changed, 214 insertions(+), 17 deletions(-)

diff --git a/contrib/atf/atf-c++/atf-c++.3 b/contrib/atf/atf-c++/atf-c++.3
index fead776755af..bb83e6214622 100644
--- a/contrib/atf/atf-c++/atf-c++.3
+++ b/contrib/atf/atf-c++/atf-c++.3
@@ -22,7 +22,7 @@
 .\" 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 6, 2017
+.Dd May 11, 2025
 .Dt ATF-C++ 3
 .Os
 .Sh NAME
@@ -277,6 +277,14 @@ It is possible to get the path to the test case's source directory from any
 of its three components by querying the
 .Sq srcdir
 configuration variable.
+.Ss Requiring kernel modules
+Aside from the
+.Va require.kmods
+meta-data variable available in the header only, one can also check for
+additional kernel modules in the test case's body by using the
+.Fn require_kmod
+function, which takes the name of a single module.
+If it is not found, the test case will be automatically skipped.
 .Ss Requiring programs
 Aside from the
 .Va require.progs
diff --git a/contrib/atf/atf-c++/tests.cpp b/contrib/atf/atf-c++/tests.cpp
index ede9609e32d6..a9f5d4a5fe2c 100644
--- a/contrib/atf/atf-c++/tests.cpp
+++ b/contrib/atf/atf-c++/tests.cpp
@@ -318,6 +318,13 @@ impl::tc::cleanup(void)
 {
 }
 
+void
+impl::tc::require_kmod(const std::string& kmod)
+    const
+{
+    atf_tc_require_kmod(kmod.c_str());
+}
+
 void
 impl::tc::require_prog(const std::string& prog)
     const
diff --git a/contrib/atf/atf-c++/tests.hpp b/contrib/atf/atf-c++/tests.hpp
index a03cc852dcf8..8fdf15a9f05d 100644
--- a/contrib/atf/atf-c++/tests.hpp
+++ b/contrib/atf/atf-c++/tests.hpp
@@ -80,6 +80,7 @@ protected:
     virtual void body(void) const = 0;
     virtual void cleanup(void) const;
 
+    void require_kmod(const std::string&) const;
     void require_prog(const std::string&) const;
 
     friend struct tc_impl;
diff --git a/contrib/atf/atf-c/atf-c.3 b/contrib/atf/atf-c/atf-c.3
index c38e068bb380..6369cb5697f8 100644
--- a/contrib/atf/atf-c/atf-c.3
+++ b/contrib/atf/atf-c/atf-c.3
@@ -22,7 +22,7 @@
 .\" 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 February 23, 2021
+.Dd May 11, 2025
 .Dt ATF-C 3
 .Os
 .Sh NAME
@@ -77,6 +77,8 @@
 .Nm atf_tc_fail ,
 .Nm atf_tc_fail_nonfatal ,
 .Nm atf_tc_pass ,
+.Nm atf_tc_require_kmod ,
+.Nm atf_tc_require_prog ,
 .Nm atf_tc_skip ,
 .Nm atf_utils_cat_file ,
 .Nm atf_utils_compare_file ,
@@ -145,6 +147,8 @@
 .Fn atf_tc_fail "reason"
 .Fn atf_tc_fail_nonfatal "reason"
 .Fn atf_tc_pass
+.Fn atf_tc_require_kmod "kmod"
+.Fn atf_tc_require_prog "prog"
 .Fn atf_tc_skip "reason"
 .Ft void
 .Fo atf_utils_cat_file
@@ -362,6 +366,14 @@ It is possible to get the path to the test case's source directory from any
 of its three components by querying the
 .Sq srcdir
 configuration variable.
+.Ss Requiring kernel modules
+Aside from the
+.Va require.kmods
+meta-data variable available in the header only, one can also check for
+additional kernel modules in the test case's body by using the
+.Fn atf_tc_require_kmod
+function, which takes the name of a single kernel module.
+If it is not found, the test case will be automatically skipped.
 .Ss Requiring programs
 Aside from the
 .Va require.progs
diff --git a/contrib/atf/atf-c/tc.c b/contrib/atf/atf-c/tc.c
index 84a8beb4fa13..1cef6adbd82d 100644
--- a/contrib/atf/atf-c/tc.c
+++ b/contrib/atf/atf-c/tc.c
@@ -26,6 +26,10 @@
 #include "atf-c/tc.h"
 
 #include 
+#ifdef __FreeBSD__
+#include 
+#include 
+#endif
 #include 
 #include 
 
@@ -103,6 +107,9 @@ static void format_reason_fmt(atf_dynstr_t *, const char *, const size_t,
 static void errno_test(struct context *, const char *, const size_t,
                        const int, const char *, const bool,
                        void (*)(struct context *, atf_dynstr_t *));
+#ifdef __FreeBSD__
+static atf_error_t check_kmod(struct context *, const char *);
+#endif
 static atf_error_t check_prog_in_dir(const char *, void *);
 static atf_error_t check_prog(struct context *, const char *);
 
@@ -460,6 +467,39 @@ errno_test(struct context *ctx, const char *file, const size_t line,
     }
 }
 
+#ifdef __FreeBSD__
+static atf_error_t
+check_kmod(struct context *ctx, const char *kmod)
+{
+    struct kld_file_stat fstat = { .version = sizeof(fstat) };
+    struct module_stat mstat = { .version = sizeof(mstat) };
+    atf_dynstr_t reason;
+    size_t len = strlen(kmod);
+    int fid, mid;
+
+    for (fid = kldnext(0); fid > 0; fid = kldnext(fid)) {
+	if (kldstat(fid, &fstat) != 0)
+	    continue;
+	if (strcmp(fstat.name, kmod) == 0)
+	    goto done;
+	if (strncmp(fstat.name, kmod, len) == 0 &&
+	    strcmp(fstat.name + len, ".ko") == 0)
+	    goto done;
+	for (mid = kldfirstmod(fid); mid > 0; mid = modfnext(mid)) {
+	    if (modstat(mid, &mstat) != 0)
+		continue;
+	    if (strcmp(mstat.name, kmod) == 0)
+		goto done;
+	}
+    }
+    format_reason_fmt(&reason, NULL, 0, "The required kmod %s "
+	"is not loaded", kmod);
+    fail_requirement(ctx, &reason);
+done:
+    return atf_no_error();
+}
+#endif
+
 struct prog_found_pair {
     const char *prog;
     bool found;
@@ -829,6 +869,9 @@ static void _atf_tc_fail_check(struct context *, const char *, const size_t,
 static void _atf_tc_fail_requirement(struct context *, const char *,
     const size_t, const char *, va_list) ATF_DEFS_ATTRIBUTE_NORETURN;
 static void _atf_tc_pass(struct context *) ATF_DEFS_ATTRIBUTE_NORETURN;
+#ifdef __FreeBSD__
+static void _atf_tc_require_kmod(struct context *, const char *);
+#endif
 static void _atf_tc_require_prog(struct context *, const char *);
 static void _atf_tc_skip(struct context *, const char *, va_list)
     ATF_DEFS_ATTRIBUTE_NORETURN;
@@ -908,6 +951,14 @@ _atf_tc_pass(struct context *ctx)
     UNREACHABLE;
 }
 
+#ifdef __FreeBSD__
+static void
+_atf_tc_require_kmod(struct context *ctx, const char *kmod)
+{
+    check_fatal_error(check_kmod(ctx, kmod));
+}
+#endif
+
 static void
 _atf_tc_require_prog(struct context *ctx, const char *prog)
 {
@@ -1154,6 +1205,16 @@ atf_tc_pass(void)
     _atf_tc_pass(&Current);
 }
 
+#ifdef __FreeBSD__
+void
+atf_tc_require_kmod(const char *kmod)
+{
+    PRE(Current.tc != NULL);
+
+    _atf_tc_require_kmod(&Current, kmod);
+}
+#endif
+
 void
 atf_tc_require_prog(const char *prog)
 {
diff --git a/contrib/atf/atf-c/tc.h b/contrib/atf/atf-c/tc.h
index 3fb695562ac8..5109102750c7 100644
--- a/contrib/atf/atf-c/tc.h
+++ b/contrib/atf/atf-c/tc.h
@@ -106,6 +106,9 @@ void atf_tc_fail_nonfatal(const char *, ...)
     ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(1, 2);
 void atf_tc_pass(void)
     ATF_DEFS_ATTRIBUTE_NORETURN;
+#ifdef __FreeBSD__
+void atf_tc_require_kmod(const char *);
+#endif
 void atf_tc_require_prog(const char *);
 void atf_tc_skip(const char *, ...)
     ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(1, 2)
diff --git a/contrib/atf/atf-sh/atf-sh.3 b/contrib/atf/atf-sh/atf-sh.3
index c3080c296826..5e53ceb45a06 100644
--- a/contrib/atf/atf-sh/atf-sh.3
+++ b/contrib/atf/atf-sh/atf-sh.3
@@ -22,7 +22,7 @@
 .\" 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 January 27, 2021
+.Dd May 11, 2025
 .Dt ATF-SH 3
 .Os
 .Sh NAME
@@ -43,6 +43,7 @@
 .Nm atf_get_srcdir ,
 .Nm atf_init_test_cases ,
 .Nm atf_pass ,
+.Nm atf_require_kmod ,
 .Nm atf_require_prog ,
 .Nm atf_set ,
 .Nm atf_skip ,
@@ -90,6 +91,8 @@
 .Nm atf_init_test_cases
 .Qq name
 .Nm atf_pass
+.Nm atf_require_kmod
+.Qq kmod_name
 .Nm atf_require_prog
 .Qq prog_name
 .Nm atf_set
@@ -205,6 +208,14 @@ function.
 It is interesting to note that this can be used inside
 .Nm atf_init_test_cases
 to silently include additional helper files from the source directory.
+.Ss Requiring kernel modules
+Aside from the
+.Va require.kmods
+meta-data variable available in the header only, one can also check for
+additional kernel modules in the test case's body by using the
+.Nm atf_require_kmod
+function, which takes the name of a single kernel module.
+If it is not found, the test case will be automatically skipped.
 .Ss Requiring programs
 Aside from the
 .Va require.progs
diff --git a/contrib/atf/atf-sh/libatf-sh.subr b/contrib/atf/atf-sh/libatf-sh.subr
index a2478b6a9be1..f1fd18de0a95 100644
--- a/contrib/atf/atf-sh/libatf-sh.subr
+++ b/contrib/atf/atf-sh/libatf-sh.subr
@@ -353,6 +353,18 @@ atf_require_prog()
     esac
 }
 
+#
+# atf_require_kmod kmod
+#
+#   Checks that the given kmod is loaded.  If it is not, automatically
+#   skips the test case with an appropriate message.
+#
+atf_require_kmod()
+{
+    kldstat -q "${1}" || \
+        atf_skip "The required kmod ${1} is not loaded"
+}
+
 #
 # atf_set varname val1 [.. valN]
 #
diff --git a/contrib/atf/doc/atf-test-case.4 b/contrib/atf/doc/atf-test-case.4
index 46690bdcb0ef..020d7035d198 100644
--- a/contrib/atf/doc/atf-test-case.4
+++ b/contrib/atf/doc/atf-test-case.4
@@ -22,7 +22,7 @@
 .\" 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 6, 2017
+.Dd May 11, 2025
 .Dt ATF-TEST-CASE 4
 .Os
 .Sh NAME
@@ -223,6 +223,14 @@ The value can have a size suffix such as
 or
 .Sq T
 to make the amount of bytes easier to type and read.
+.It require.kmods
+Type: textual.
+Optional.
+.Pp
+A whitespace separated list of kernel modules that must be present to
+execute the test case.
+If any of the required kernel modules is not found, the test case is
+.Em skipped .
 .It require.progs
 Type: textual.
 Optional.
diff --git a/contrib/kyua/engine/atf_list.cpp b/contrib/kyua/engine/atf_list.cpp
index f6ec20d7709a..e0c4170605d1 100644
--- a/contrib/kyua/engine/atf_list.cpp
+++ b/contrib/kyua/engine/atf_list.cpp
@@ -133,6 +133,10 @@ engine::parse_atf_metadata(const model::properties_map& props)
                 mdbuilder.set_string("required_disk_space", value);
             } else if (name == "require.files") {
                 mdbuilder.set_string("required_files", value);
+#ifdef __FreeBSD__
+            } else if (name == "require.kmods") {
+                mdbuilder.set_string("required_kmods", value);
+#endif
             } else if (name == "require.machine") {
                 mdbuilder.set_string("allowed_platforms", value);
             } else if (name == "require.memory") {
diff --git a/contrib/kyua/engine/requirements.cpp b/contrib/kyua/engine/requirements.cpp
index a6a4cae7511c..dff43e531a57 100644
--- a/contrib/kyua/engine/requirements.cpp
+++ b/contrib/kyua/engine/requirements.cpp
@@ -41,6 +41,10 @@
 #include "utils/sanity.hpp"
 #include "utils/units.hpp"
 
+#ifdef __FreeBSD__
+#include 
+#endif
+
 namespace config = utils::config;
 namespace fs = utils::fs;
 namespace passwd = utils::passwd;
@@ -220,6 +224,26 @@ check_required_programs(const model::paths_set& required_programs)
 }
 
 
+#ifdef __FreeBSD__
+/// Checks if all required kmods are loaded.
+///
+/// \param required_programs Set of kmods.
+///
+/// \return Empty if the required kmods are all loaded or an error
+/// message otherwise.
+static std::string
+check_required_kmods(const model::strings_set& required_kmods)
+{
+    for (model::strings_set::const_iterator iter = required_kmods.begin();
+         iter != required_kmods.end(); iter++) {
+        if (!kld_isloaded((*iter).c_str()))
+            return F("Required kmod '%s' not loaded") % *iter;
+    }
+    return "";
+}
+#endif
+
+
 /// Checks if the current system has the specified amount of memory.
 ///
 /// \param required_memory Amount of required physical memory, or zero if not
@@ -312,6 +336,12 @@ engine::check_reqs(const model::metadata& md, const config::tree& cfg,
     if (!reason.empty())
         return reason;
 
+#ifdef __FreeBSD__
+    reason = check_required_kmods(md.required_kmods());
+    if (!reason.empty())
+        return reason;
+#endif
+
     reason = check_required_memory(md.required_memory());
     if (!reason.empty())
         return reason;
diff --git a/contrib/kyua/model/metadata.cpp b/contrib/kyua/model/metadata.cpp
index 26b7f7322c6e..1f17b9ce4624 100644
--- a/contrib/kyua/model/metadata.cpp
+++ b/contrib/kyua/model/metadata.cpp
@@ -256,6 +256,9 @@ init_tree(config::tree& tree)
     tree.define< bytes_node >("required_disk_space");
     tree.define< paths_set_node >("required_files");
     tree.define< bytes_node >("required_memory");
+#ifdef __FreeBSD__
+    tree.define< config::strings_set_node >("required_kmods");
+#endif
     tree.define< paths_set_node >("required_programs");
     tree.define< user_node >("required_user");
     tree.define< delta_node >("timeout");
@@ -282,6 +285,9 @@ set_defaults(config::tree& tree)
     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));
+#ifdef __FreeBSD__
+    tree.set< config::strings_set_node >("required_kmods", model::strings_set());
+#endif
     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
@@ -597,6 +603,22 @@ model::metadata::required_memory(void) const
 }
 
 
+#ifdef __FreeBSD__
+/// Returns the list of kmods needed by the test.
+///
+/// \return Set of strings.
+const model::strings_set&
+model::metadata::required_kmods(void) const
+{
+    if (_pimpl->props.is_set("required_kmods")) {
+        return _pimpl->props.lookup< config::strings_set_node >("required_kmods");
+    } else {
+	return get_defaults().lookup< config::strings_set_node >("required_kmods");
+    }
+}
+#endif
+
+
 /// Returns the list of programs needed by the test.
 ///
 /// \return Set of paths.
diff --git a/contrib/kyua/model/metadata.hpp b/contrib/kyua/model/metadata.hpp
index 83bc5348774a..698613eba869 100644
--- a/contrib/kyua/model/metadata.hpp
+++ b/contrib/kyua/model/metadata.hpp
@@ -76,6 +76,9 @@ public:
     const utils::units::bytes& required_disk_space(void) const;
     const paths_set& required_files(void) const;
     const utils::units::bytes& required_memory(void) const;
+#ifdef __FreeBSD__
+    const strings_set& required_kmods(void) const;
+#endif
     const paths_set& required_programs(void) const;
     const std::string& required_user(void) const;
     const utils::datetime::delta& timeout(void) const;
@@ -121,6 +124,9 @@ public:
     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&);
+#ifdef __FreeBSD__
+    metadata_builder& set_required_kmods(const strings_set&);
+#endif
     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/lib/atf/libatf-c/Makefile b/lib/atf/libatf-c/Makefile
index 9fd36dc913f3..4cfee2ed824f 100644
--- a/lib/atf/libatf-c/Makefile
+++ b/lib/atf/libatf-c/Makefile
@@ -119,6 +119,8 @@ MLINKS+=	atf-c.3 ATF_CHECK.3 \
 		atf-c.3 atf_tc_fail.3 \
 		atf-c.3 atf_tc_fail_nonfatal.3 \
 		atf-c.3 atf_tc_pass.3 \
+		atf-c.3 atf_tc_require_kmod.3 \
+		atf-c.3 atf_tc_require_prog.3 \
 		atf-c.3 atf_tc_skip.3 \
 		atf-c.3 atf_utils_cat_file.3 \
 		atf-c.3 atf_utils_compare_file.3 \
diff --git a/libexec/atf/atf-sh/Makefile b/libexec/atf/atf-sh/Makefile
index 3c06afa446c4..7253fc2d2b12 100644
--- a/libexec/atf/atf-sh/Makefile
+++ b/libexec/atf/atf-sh/Makefile
@@ -54,6 +54,7 @@ MLINKS+=	\
 		atf-sh.3 atf_get_srcdir.3 \
 		atf-sh.3 atf_init_test_cases.3 \
 		atf-sh.3 atf_pass.3 \
+		atf-sh.3 atf_require_kmod.3 \
 		atf-sh.3 atf_require_prog.3 \
 		atf-sh.3 atf_set.3 \
 		atf-sh.3 atf_skip.3 \
diff --git a/tests/sys/fs/tarfs/tarfs_test.sh b/tests/sys/fs/tarfs/tarfs_test.sh
index f1322033fbad..20baadfea5c5 100644
--- a/tests/sys/fs/tarfs/tarfs_test.sh
+++ b/tests/sys/fs/tarfs/tarfs_test.sh
@@ -48,7 +48,6 @@ tarsum() {
 }
 
 tarfs_setup() {
-	kldload -n tarfs || atf_skip "This test requires tarfs and could not load it"
 	mkdir "${mnt}"
 }
 
@@ -60,6 +59,7 @@ atf_test_case tarfs_basic cleanup
 tarfs_basic_head() {
 	atf_set "descr" "Basic function test"
 	atf_set "require.user" "root"
+	atf_set "require.kmods" "tarfs"
 }
 tarfs_basic_body() {
 	tarfs_setup
@@ -87,6 +87,7 @@ atf_test_case tarfs_basic_gnu cleanup
 tarfs_basic_gnu_head() {
 	atf_set "descr" "Basic function test using GNU tar"
 	atf_set "require.user" "root"
+	atf_set "require.kmods" "tarfs"
 	atf_set "require.progs" "gtar"
 }
 tarfs_basic_gnu_body() {
@@ -101,6 +102,7 @@ atf_test_case tarfs_notdir_device cleanup
 tarfs_notdir_device_head() {
 	atf_set "descr" "Regression test for PR 269519 and 269561"
 	atf_set "require.user" "root"
+	atf_set "require.kmods" "tarfs"
 }
 tarfs_notdir_device_body() {
 	tarfs_setup
@@ -121,6 +123,7 @@ atf_test_case tarfs_notdir_device_gnu cleanup
 tarfs_notdir_device_gnu_head() {
 	atf_set "descr" "Regression test for PR 269519 and 269561 using GNU tar"
 	atf_set "require.user" "root"
+	atf_set "require.kmods" "tarfs"
 	atf_set "require.progs" "gtar"
 }
 tarfs_notdir_device_gnu_body() {
@@ -135,6 +138,7 @@ atf_test_case tarfs_notdir_dot cleanup
 tarfs_notdir_dot_head() {
 	atf_set "descr" "Regression test for PR 269519 and 269561"
 	atf_set "require.user" "root"
+	atf_set "require.kmods" "tarfs"
 }
 tarfs_notdir_dot_body() {
 	tarfs_setup
@@ -155,6 +159,7 @@ atf_test_case tarfs_notdir_dot_gnu cleanup
 tarfs_notdir_dot_gnu_head() {
 	atf_set "descr" "Regression test for PR 269519 and 269561 using GNU tar"
 	atf_set "require.user" "root"
+	atf_set "require.kmods" "tarfs"
 	atf_set "require.progs" "gtar"
 }
 tarfs_notdir_dot_gnu_body() {
@@ -169,6 +174,7 @@ atf_test_case tarfs_notdir_dotdot cleanup
 tarfs_notdir_dotdot_head() {
 	atf_set "descr" "Regression test for PR 269519 and 269561"
 	atf_set "require.user" "root"
+	atf_set "require.kmods" "tarfs"
 }
 tarfs_notdir_dotdot_body() {
 	tarfs_setup
@@ -189,6 +195,7 @@ atf_test_case tarfs_notdir_dotdot_gnu cleanup
 tarfs_notdir_dotdot_gnu_head() {
 	atf_set "descr" "Regression test for PR 269519 and 269561 using GNU tar"
 	atf_set "require.user" "root"
+	atf_set "require.kmods" "tarfs"
 	atf_set "require.progs" "gtar"
 }
 tarfs_notdir_dotdot_gnu_body() {
@@ -203,6 +210,7 @@ atf_test_case tarfs_notdir_file cleanup
 tarfs_notdir_file_head() {
 	atf_set "descr" "Regression test for PR 269519 and 269561"
 	atf_set "require.user" "root"
+	atf_set "require.kmods" "tarfs"
 }
 tarfs_notdir_file_body() {
 	tarfs_setup
@@ -223,6 +231,7 @@ atf_test_case tarfs_notdir_file_gnu cleanup
 tarfs_notdir_file_gnu_head() {
 	atf_set "descr" "Regression test for PR 269519 and 269561 using GNU tar"
 	atf_set "require.user" "root"
+	atf_set "require.kmods" "tarfs"
 	atf_set "require.progs" "gtar"
 }
 tarfs_notdir_file_gnu_body() {
@@ -237,6 +246,7 @@ atf_test_case tarfs_emptylink cleanup
 tarfs_emptylink_head() {
 	atf_set "descr" "Regression test for PR 277360: empty link target"
 	atf_set "require.user" "root"
+	atf_set "require.kmods" "tarfs"
 }
 tarfs_emptylink_body() {
 	tarfs_setup
@@ -256,6 +266,7 @@ atf_test_case tarfs_linktodir cleanup
 tarfs_linktodir_head() {
 	atf_set "descr" "Regression test for PR 277360: link to directory"
 	atf_set "require.user" "root"
+	atf_set "require.kmods" "tarfs"
 }
 tarfs_linktodir_body() {
 	tarfs_setup
@@ -276,6 +287,7 @@ atf_test_case tarfs_linktononexistent cleanup
 tarfs_linktononexistent_head() {
 	atf_set "descr" "Regression test for PR 277360: link to nonexistent target"
 	atf_set "require.user" "root"
+	atf_set "require.kmods" "tarfs"
 }
 tarfs_linktononexistent_body() {
 	tarfs_setup
@@ -293,6 +305,7 @@ atf_test_case tarfs_checksum cleanup
 tarfs_checksum_head() {
 	atf_set "descr" "Verify that the checksum covers header padding"
 	atf_set "require.user" "root"
+	atf_set "require.kmods" "tarfs"
 }
 tarfs_checksum_body() {
 	tarfs_setup
@@ -313,6 +326,7 @@ atf_test_case tarfs_long_names cleanup
 tarfs_long_names_head() {
 	atf_set "descr" "Verify that tarfs supports long file names"
 	atf_set "require.user" "root"
+	atf_set "require.kmods" "tarfs"
 }
 tarfs_long_names_body() {
 	tarfs_setup
@@ -337,6 +351,7 @@ atf_test_case tarfs_long_paths cleanup
 tarfs_long_paths_head() {
 	atf_set "descr" "Verify that tarfs supports long paths"
 	atf_set "require.user" "root"
+	atf_set "require.kmods" "tarfs"
 }
 tarfs_long_paths_body() {
 	tarfs_setup
@@ -361,6 +376,7 @@ atf_test_case tarfs_git_archive cleanup
 tarfs_git_archive_head() {
 	atf_set "descr" "Verify that tarfs supports archives created by git"
 	atf_set "require.user" "root"
+	atf_set "require.kmods" "tarfs"
 	atf_set "require.progs" "git"
 }
 tarfs_git_archive_body() {
diff --git a/tests/sys/net/if_wg.sh b/tests/sys/net/if_wg.sh
index aaeec4b95964..1f51d86c8efa 100644
--- a/tests/sys/net/if_wg.sh
+++ b/tests/sys/net/if_wg.sh
@@ -34,6 +34,7 @@ wg_basic_head()
 {
 	atf_set descr 'Create a wg(4) tunnel over an epair and pass traffic between jails'
 	atf_set require.user root
+	atf_set require.kmods if_wg
 }
 
 wg_basic_body()
@@ -41,8 +42,6 @@ wg_basic_body()
 	local epair pri1 pri2 pub1 pub2 wg1 wg2
         local endpoint1 endpoint2 tunnel1 tunnel2
 
-	kldload -n if_wg || atf_skip "This test requires if_wg and could not load it"
-
 	pri1=$(wg genkey)
 	pri2=$(wg genkey)
 
@@ -175,6 +174,7 @@ wg_basic_netmap_head()
 {
 	atf_set descr 'Create a wg(4) tunnel over an epair and pass traffic between jails with netmap'
 	atf_set require.user root
+	atf_set require.kmods if_wg netmap
 }
 
 wg_basic_netmap_body()
@@ -183,9 +183,6 @@ wg_basic_netmap_body()
         local endpoint1 endpoint2 tunnel1 tunnel2 tunnel3 tunnel4
 	local pid status
 
-	kldload -n if_wg || atf_skip "This test requires if_wg and could not load it"
-	kldload -n netmap || atf_skip "This test requires netmap and could not load it"
-
 	pri1=$(wg genkey)
 	pri2=$(wg genkey)
 
@@ -268,6 +265,7 @@ wg_key_peerdev_shared_head()
 {
 	atf_set descr 'Create a wg(4) interface with a shared pubkey between device and a peer'
 	atf_set require.user root
+	atf_set require.kmods if_wg
 }
 
 wg_key_peerdev_shared_body()
@@ -275,8 +273,6 @@ wg_key_peerdev_shared_body()
 	local epair pri1 pub1 wg1
         local endpoint1 tunnel1
 
-	kldload -n if_wg || atf_skip "This test requires if_wg and could not load it"
-
 	pri1=$(wg genkey)
 
 	endpoint1=192.168.2.1
@@ -316,8 +312,6 @@ wg_key_peerdev_makeshared_body()
 	local epair pri1 pub1 pri2 wg1 wg2
         local endpoint1 tunnel1
 
-	kldload -n if_wg || atf_skip "This test requires if_wg and could not load it"
-
 	pri1=$(wg genkey)
 	pri2=$(wg genkey)
 
@@ -361,6 +355,7 @@ wg_vnet_parent_routing_head()
 {
 	atf_set descr 'Create a wg(4) tunnel without epairs and pass traffic between jails'
 	atf_set require.user root
+	atf_set require.kmods if_wg
 }
 
 wg_vnet_parent_routing_body()
@@ -368,8 +363,6 @@ wg_vnet_parent_routing_body()
 	local pri1 pri2 pub1 pub2 wg1 wg2
         local tunnel1 tunnel2
 
-	kldload -n if_wg
-
 	pri1=$(wg genkey)
 	pri2=$(wg genkey)
 
diff --git a/usr.bin/kyua/Makefile b/usr.bin/kyua/Makefile
index 990a65f2ce56..6db9da94e69c 100644
--- a/usr.bin/kyua/Makefile
+++ b/usr.bin/kyua/Makefile
@@ -14,7 +14,7 @@ KYUA_SRCDIR=	${SRCTOP}/contrib/kyua
 PACKAGE=	tests
 PROG_CXX=	kyua
 SRCS=		main.cpp
-LIBADD=		lutok sqlite3
+LIBADD=		lutok sqlite3 util
 
 MAN=		kyua-about.1 \
 		kyua-config.1 \

From nobody Tue Sep 23 12:58:00 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWKlY0X0Dz68cSm;
	Tue, 23 Sep 2025 12:58:01 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWKlX6m13z3TgC;
	Tue, 23 Sep 2025 12:58:00 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758632280;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=s5Vz1a7jedNukW028qetGwdGdOE0tgEZdVp8OaBV4XA=;
	b=mg3+Ce9lCqUN/q5Yw0kzJkv9E5jIVJiN4GbpEiDHvj80P7i2MfPoDQY7k0AMtlqX4s6p7g
	79USUAumurOldLLjnUdPa3jm0yxgmRWGC/taA4MVszmNbMaUJYJDTJWOOjVeL/vwndYQCc
	aDyo0jk12541ISDpVsQiGRBQsTCUXGcno+0zHw4og5C2nyJALkt+oHDWlhTpiNNOOIkDJG
	ucL11kESEdXtthhI/fI6dkp4KhdLTL7Rz3pOK5IAGJ3s+xm/p2avfmP2mLIIPzhgUeVORS
	+6i4TKHcp6MVD01/gc1KgJyzbHZUi1GkarruZfv6WhgXdNM5zXvVrh7iMo0XIA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758632280;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=s5Vz1a7jedNukW028qetGwdGdOE0tgEZdVp8OaBV4XA=;
	b=AqBeMkBn45y7XPSVlWYnFPrCS6qoXTyezgr37ufurMmC35D2izPKvKqLJ8lqKRke3erpBO
	vpRytA/6pnwSXoaWWmRD07zb/v3XXATIM8VXkqe3an17EN9RaSgvX1beKkhb9j1sIrty6Q
	C94sVKBBceyykMDE8LSodaOBIPL8Xp8Qn7lbTJw4t8sPCm2KYB1XxXhX7OUmiOmYNejJ3f
	HnCy00uKaXoFoOKYkQ82h+9J/oPf3Mb3MxkxrLfb8zRrVY8ATNcJgCEYIkF7OhOAM3ykXI
	WBx5G7VtaQZhhY65XaJEeojKbWanfVCpHr0DNDTyArEQPLLLfA/FuY6wU7TrGQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758632280; a=rsa-sha256; cv=none;
	b=WgaOW5sHYcInhHOimV6HdURnkGwoSEXpF59qFrzqBiGnD0QSWPmf2r/c9iB2OmTZ8LeKPn
	yOBm06hSIcwKyXdQhiJu9joWYTIqJf1PBI7GlXu+oLDsnWoWN6wTYxmD7UNdcixOkrAVu7
	Hq49+NRl5NA+RCKcshWcgpHJjjkE3lNaaC1r7AVaUch1/ukz1+qW9rfrFy2CmTzI0LboHl
	DX1baJ/dStB+1N/g1cGQ16cNM9Kn4Gg5uDsYiREtYejj354Bcb7jk8Hu4KWQVGCcwEeZaG
	LbC9yrC2XiVDd8lo658tzJT/ysxlVFNEO4tvtsfDDVih+UnaPouVFxVpwBSV1Q==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWKlX6D30zn9q;
	Tue, 23 Sep 2025 12:58:00 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NCw0VU004282;
	Tue, 23 Sep 2025 12:58:00 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NCw0ug004279;
	Tue, 23 Sep 2025 12:58:00 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:58:00 GMT
Message-Id: <202509231258.58NCw0ug004279@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= 
Subject: git: 13cf806828e2 - stable/14 - atf-c(3): fill in prototypes
  for functions
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: des
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 13cf806828e27753c76479337ef138762ae8ae89
Auto-Submitted: auto-generated

The branch stable/14 has been updated by des:

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

commit 13cf806828e27753c76479337ef138762ae8ae89
Author:     Enji Cooper 
AuthorDate: 2025-06-07 03:13:31 +0000
Commit:     Dag-Erling Smørgrav 
CommitDate: 2025-09-23 12:57:35 +0000

    atf-c(3): fill in prototypes for functions
    
    This change fills in prototypes for functions exposed by atf-c(3) to aid
    the programmer with using the APIs with the library.
    
    MFC after:      2 weeks
    Differential Revision: https://reviews.freebsd.org/D50734
    
    (cherry picked from commit a14573de29deda5b86b4458901aa5a0a9bf84375)
---
 contrib/atf/atf-c/atf-c.3 | 111 ++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 92 insertions(+), 19 deletions(-)

diff --git a/contrib/atf/atf-c/atf-c.3 b/contrib/atf/atf-c/atf-c.3
index 6369cb5697f8..287ebd41a033 100644
--- a/contrib/atf/atf-c/atf-c.3
+++ b/contrib/atf/atf-c/atf-c.3
@@ -131,25 +131,98 @@
 .Fn ATF_TC_WITHOUT_HEAD "name"
 .Fn ATF_TP_ADD_TC "tp_name" "tc_name"
 .Fn ATF_TP_ADD_TCS "tp_name"
-.Fn atf_tc_get_config_var "tc" "varname"
-.Fn atf_tc_get_config_var_wd "tc" "variable_name" "default_value"
-.Fn atf_tc_get_config_var_as_bool "tc" "variable_name"
-.Fn atf_tc_get_config_var_as_bool_wd "tc" "variable_name" "default_value"
-.Fn atf_tc_get_config_var_as_long "tc" "variable_name"
-.Fn atf_tc_get_config_var_as_long_wd "tc" "variable_name" "default_value"
-.Fn atf_no_error
-.Fn atf_tc_expect_death "reason" "..."
-.Fn atf_tc_expect_exit "exitcode" "reason" "..."
-.Fn atf_tc_expect_fail "reason" "..."
-.Fn atf_tc_expect_pass
-.Fn atf_tc_expect_signal "signo" "reason" "..."
-.Fn atf_tc_expect_timeout "reason" "..."
-.Fn atf_tc_fail "reason"
-.Fn atf_tc_fail_nonfatal "reason"
-.Fn atf_tc_pass
-.Fn atf_tc_require_kmod "kmod"
-.Fn atf_tc_require_prog "prog"
-.Fn atf_tc_skip "reason"
+.Ft const char*
+.Fo atf_tc_get_config_var
+.Fa "const atf_tc_t *tc"
+.Fa "const char *name"
+.Fc
+.Ft const char*
+.Fo atf_tc_get_config_var_wd
+.Fa "const atf_tc_t *tc"
+.Fa "const char *name"
+.Fa "const char *defval"
+.Fc
+.Ft bool
+.Fo atf_tc_get_config_var_as_bool
+.Fa "const atf_tc_t *tc"
+.Fa "const char *name"
+.Fc
+.Ft bool
+.Fo atf_tc_get_config_var_as_bool_wd
+.Fa "const atf_tc_t *tc"
+.Fa "const char *name"
+.Fa "const bool defval"
+.Fc
+.Ft long
+.Fo atf_tc_get_config_var_as_long
+.Fa "const atf_tc_t *tc"
+.Fa "const char *name"
+.Fc
+.Ft long
+.Fo atf_tc_get_config_var_as_long_wd
+.Fa "const atf_tc_t *tc"
+.Fa "const char *name"
+.Fa "const long defval"
+.Fc
+.Ft void
+.Fo atf_no_error
+.Fa "void"
+.Fc
+.Ft void
+.Fo atf_tc_expect_death
+.Fa "const char *reason"
+.Fa "..."
+.Fc
+.Ft void
+.Fo atf_tc_expect_exit
+.Fa "const int exitcode"
+.Fa "const char *reason"
+.Fa "..."
+.Fc
+.Ft void
+.Fo atf_tc_expect_fail
+.Fa "const char *reason"
+.Fa "..."
+.Fc
+.Ft void
+.Fo atf_tc_expect_pass
+.Fa "void"
+.Fc
+.Ft void
+.Fo atf_tc_expect_signal
+.Fa "const int signo"
+.Fa "const char *reason"
+.Fa "..."
+.Fc
+.Ft void
+.Fo atf_tc_expect_timeout
+.Fa "const char *reason"
+.Fa "..."
+.Fc
+.Ft void
+.Fo atf_tc_fail
+.Fa "const char *reason"
+.Fc
+.Ft void
+.Fo atf_tc_fail_nonfatal
+.Fa "const char *reason"
+.Fc
+.Ft void
+.Fo atf_tc_pass
+.Fa "void"
+.Fc
+.Ft void
+.Fo atf_tc_require_kmod
+.Fa "const char *kmod"
+.Fc
+.Ft void
+.Fo atf_tc_require_prog
+.Fa "const char *prog"
+.Fc
+.Ft void
+.Fo atf_tc_skip
+.Fa "const char *reason"
+.Fc
 .Ft void
 .Fo atf_utils_cat_file
 .Fa "const char *file"

From nobody Tue Sep 23 12:58:01 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWKlZ5ynjz68cVK;
	Tue, 23 Sep 2025 12:58:02 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWKlZ1W70z3Tk1;
	Tue, 23 Sep 2025 12:58:02 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758632282;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=VcYmLOXFVKkYFF/AQjn38UrSKXrtRmDsPlLXJ2YOIf8=;
	b=NAxtJsOX7W6RGUyL9OO4PCRqpqM7hve1yXQwwVaDU73l6iU3lkRQCq1Y+IGa+HpNNVXd22
	XR3rqpEORGoHoceiSaYwE47kBPB0Jh/egFaHjQkTBm7ldnOdk3u4zxSKJjVjzviYOiUZ8u
	sCaiFPGihR8UD+vwGekTWmk0VjCSq2Y3rpVrQO5h1DIyknGSp23FpwQZlOUGXWd8d18dsh
	lGYYURrnmfOhZLmrBb1I9qEvZAM3KfIlNXGmfHUxIxGpML4k6C98saAy2n6PKIe8oekHJE
	4roYw5lS3W96Qc3uNagRc7idVOt2laJUI8Ls2o/sEpOqrhiC91xJHINENTkSEA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758632282;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=VcYmLOXFVKkYFF/AQjn38UrSKXrtRmDsPlLXJ2YOIf8=;
	b=Nw5XqQJVEPvEZBc2eVd5ph999SvccnM5cOe1Lub4X2Hp99OV/UPJKGYjP1kPGnyG7ehxQJ
	uC9NPalOU9vC6GL/v3BkZfwz55lQtdMne+ghWH5VvjOo7p7P0t5O9IXtdEt7ak234jZELM
	RbxSMY5NF64CC7oqP2EI5fTNdd4KqB4uQwWQ7ZJtmrrCGpvWsSs4A3qVjdXJ4EPHfXXs3A
	4Xl2yadd6FoHI/siHlnLIJSlf3QKVJfz01YDWZFRbI3+uhezbNU4qyQnkPQcB+wVkxzIqk
	tulX5wf9hQ3LKkYYsboTklyQIpZustQVZ4L4Pk01dwK12mbDGhfyBqfuDUshBA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758632282; a=rsa-sha256; cv=none;
	b=gjGYkHtOy4S8D9zQi4uPQ3+00fxDfcbGpghumcnGlpT5SrSdbuPVAswSHg1L2Hz01lEvJ8
	5XruqdBj5hz2WhsyZY2CVnugHvB3weEdyGQkxke5k2izbl/cPlEBe1GCclzhPjNt+YObJ/
	K9RKJAWqmV+sIwW0BQdkbCNUKbiug6SMkpzFC1G3Ic3eo6goSEBQ2Ysn9Ms6ZELdAo0hRt
	qLhPuESNnZRh/jGOV4oCF+jOoIlLP17YPlrw9e3ojxkLTOV/FyEGwk2NeegJbrM0tN8SPf
	m6iXmlZNaIEzU+nRJ+9rQZNGxKmzbv8QKj9Y+HAAATC2csDNhMDzFmZyQEbsxw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWKlY6dMTzm7y;
	Tue, 23 Sep 2025 12:58:01 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NCw1La004319;
	Tue, 23 Sep 2025 12:58:01 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NCw1Pn004316;
	Tue, 23 Sep 2025 12:58:01 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 12:58:01 GMT
Message-Id: <202509231258.58NCw1Pn004316@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= 
Subject: git: d1e926d8985f - stable/14 - kyua: Improve required_kmods
  metadata
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: des
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: d1e926d8985f17e07f121b278a2e340ce237e18b
Auto-Submitted: auto-generated

The branch stable/14 has been updated by des:

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

commit d1e926d8985f17e07f121b278a2e340ce237e18b
Author:     Igor Ostapenko 
AuthorDate: 2025-08-16 23:04:15 +0000
Commit:     Dag-Erling Smørgrav 
CommitDate: 2025-09-23 12:57:36 +0000

    kyua: Improve required_kmods metadata
    
    - Make it platform agnostic
    - Separate FreeBSD related code
    - Fix tests
    - Make it report all non-loaded modules instead of the first occurrence
      only
    - Update kyuafile.5 man page
    
    Reviewed by:    ngie
    MFC after:      2 weeks
    Pull Request:   https://github.com/freebsd/kyua/pull/270
    
    (cherry picked from commit 939fec44a79323ba06cf0ad60d4b69300a8abbc6)
---
 contrib/kyua/doc/kyuafile.5.in                    | 10 ++++
 contrib/kyua/drivers/report_junit_test.cpp        |  3 ++
 contrib/kyua/engine/atf_list.cpp                  |  2 -
 contrib/kyua/engine/requirements.cpp              | 57 +++++++++++------------
 contrib/kyua/engine/requirements.hpp              | 26 +++++++++++
 contrib/kyua/integration/cmd_report_junit_test.sh |  4 ++
 contrib/kyua/integration/cmd_report_test.sh       |  1 +
 contrib/kyua/model/metadata.cpp                   | 16 +++----
 contrib/kyua/model/metadata.hpp                   |  4 --
 contrib/kyua/model/metadata_test.cpp              |  6 ++-
 contrib/kyua/model/test_case_test.cpp             |  2 +-
 contrib/kyua/model/test_program_test.cpp          |  8 ++--
 contrib/kyua/os/freebsd/main.cpp                  | 11 +++++
 contrib/kyua/os/freebsd/reqs_checker_kmods.cpp    | 50 ++++++++++++++++++++
 contrib/kyua/os/freebsd/reqs_checker_kmods.hpp    | 54 +++++++++++++++++++++
 usr.bin/kyua/Makefile                             |  3 +-
 16 files changed, 203 insertions(+), 54 deletions(-)

diff --git a/contrib/kyua/doc/kyuafile.5.in b/contrib/kyua/doc/kyuafile.5.in
index ae1e4fe40e32..43f00816d407 100644
--- a/contrib/kyua/doc/kyuafile.5.in
+++ b/contrib/kyua/doc/kyuafile.5.in
@@ -290,6 +290,16 @@ it can run.
 .Pp
 ATF:
 .Va require.files
+.It Va required_kmods
+Whitespace-separated list of kernel module names that the test requires to
+be loaded before it can run.
+This requirement checking is platform-dependent.
+It is ignored for a non-supported platform.
+Supported platforms:
+.Fx .
+.Pp
+ATF:
+.Va require.kmods
 .It Va required_memory
 Amount of physical memory that the test needs to run successfully.
 .Pp
diff --git a/contrib/kyua/drivers/report_junit_test.cpp b/contrib/kyua/drivers/report_junit_test.cpp
index 0f009c6befd3..1c0929c0fef2 100644
--- a/contrib/kyua/drivers/report_junit_test.cpp
+++ b/contrib/kyua/drivers/report_junit_test.cpp
@@ -70,6 +70,7 @@ static const char* const default_metadata =
     "required_configs is empty\n"
     "required_disk_space = 0\n"
     "required_files is empty\n"
+    "required_kmods is empty\n"
     "required_memory = 0\n"
     "required_programs is empty\n"
     "required_user is empty\n"
@@ -89,6 +90,7 @@ static const char* const overriden_metadata =
     "required_configs is empty\n"
     "required_disk_space = 0\n"
     "required_files is empty\n"
+    "required_kmods is empty\n"
     "required_memory = 0\n"
     "required_programs is empty\n"
     "required_user is empty\n"
@@ -228,6 +230,7 @@ ATF_TEST_CASE_BODY(junit_metadata__overrides)
         + "required_configs = config1\n"
         + "required_disk_space = 456\n"
         + "required_files = file1\n"
+        + "required_kmods is empty\n"
         + "required_memory = 123\n"
         + "required_programs = prog1\n"
         + "required_user = root\n"
diff --git a/contrib/kyua/engine/atf_list.cpp b/contrib/kyua/engine/atf_list.cpp
index e0c4170605d1..5c74a80be913 100644
--- a/contrib/kyua/engine/atf_list.cpp
+++ b/contrib/kyua/engine/atf_list.cpp
@@ -133,10 +133,8 @@ engine::parse_atf_metadata(const model::properties_map& props)
                 mdbuilder.set_string("required_disk_space", value);
             } else if (name == "require.files") {
                 mdbuilder.set_string("required_files", value);
-#ifdef __FreeBSD__
             } else if (name == "require.kmods") {
                 mdbuilder.set_string("required_kmods", value);
-#endif
             } else if (name == "require.machine") {
                 mdbuilder.set_string("allowed_platforms", value);
             } else if (name == "require.memory") {
diff --git a/contrib/kyua/engine/requirements.cpp b/contrib/kyua/engine/requirements.cpp
index dff43e531a57..d5838b83f33a 100644
--- a/contrib/kyua/engine/requirements.cpp
+++ b/contrib/kyua/engine/requirements.cpp
@@ -41,10 +41,6 @@
 #include "utils/sanity.hpp"
 #include "utils/units.hpp"
 
-#ifdef __FreeBSD__
-#include 
-#endif
-
 namespace config = utils::config;
 namespace fs = utils::fs;
 namespace passwd = utils::passwd;
@@ -224,26 +220,6 @@ check_required_programs(const model::paths_set& required_programs)
 }
 
 
-#ifdef __FreeBSD__
-/// Checks if all required kmods are loaded.
-///
-/// \param required_programs Set of kmods.
-///
-/// \return Empty if the required kmods are all loaded or an error
-/// message otherwise.
-static std::string
-check_required_kmods(const model::strings_set& required_kmods)
-{
-    for (model::strings_set::const_iterator iter = required_kmods.begin();
-         iter != required_kmods.end(); iter++) {
-        if (!kld_isloaded((*iter).c_str()))
-            return F("Required kmod '%s' not loaded") % *iter;
-    }
-    return "";
-}
-#endif
-
-
 /// Checks if the current system has the specified amount of memory.
 ///
 /// \param required_memory Amount of required physical memory, or zero if not
@@ -289,9 +265,29 @@ check_required_disk_space(const units::bytes& required_disk_space,
 }
 
 
+/// List of registered extra requirement checkers.
+///
+/// Use register_reqs_checker() to add an entry to this global list.
+static std::vector< std::shared_ptr< engine::reqs_checker > > _reqs_checkers;
+
+
 }  // anonymous namespace
 
 
+const std::vector< std::shared_ptr< engine::reqs_checker > >
+engine::reqs_checkers()
+{
+    return _reqs_checkers;
+}
+
+void
+engine::register_reqs_checker(
+    const std::shared_ptr< engine::reqs_checker > checker)
+{
+    _reqs_checkers.push_back(checker);
+}
+
+
 /// Checks if all the requirements specified by the test case are met.
 ///
 /// \param md The test metadata.
@@ -336,12 +332,6 @@ engine::check_reqs(const model::metadata& md, const config::tree& cfg,
     if (!reason.empty())
         return reason;
 
-#ifdef __FreeBSD__
-    reason = check_required_kmods(md.required_kmods());
-    if (!reason.empty())
-        return reason;
-#endif
-
     reason = check_required_memory(md.required_memory());
     if (!reason.empty())
         return reason;
@@ -351,6 +341,13 @@ engine::check_reqs(const model::metadata& md, const config::tree& cfg,
     if (!reason.empty())
         return reason;
 
+    // Iterate over extra checkers registered.
+    for (auto& checker : engine::reqs_checkers()) {
+        reason = checker->exec(md, cfg, test_suite, work_directory);
+        if (!reason.empty())
+            return reason;
+    }
+
     INV(reason.empty());
     return reason;
 }
diff --git a/contrib/kyua/engine/requirements.hpp b/contrib/kyua/engine/requirements.hpp
index a36a938b3034..92e80c5122aa 100644
--- a/contrib/kyua/engine/requirements.hpp
+++ b/contrib/kyua/engine/requirements.hpp
@@ -44,6 +44,32 @@ namespace engine {
 std::string check_reqs(const model::metadata&, const utils::config::tree&,
                        const std::string&, const utils::fs::path&);
 
+/// Abstract interface of a requirement checker.
+class reqs_checker {
+public:
+    /// Constructor.
+    reqs_checker() {}
+
+    /// Destructor.
+    virtual ~reqs_checker() {}
+
+    /// Run the checker.
+    virtual std::string exec(const model::metadata&,
+                             const utils::config::tree&,
+                             const std::string&,
+                             const utils::fs::path&) const = 0;
+};
+
+/// Register an extra requirement checker.
+///
+/// \param checker A requirement checker.
+void register_reqs_checker(const std::shared_ptr< reqs_checker > checker);
+
+/// Returns the list of registered extra requirement checkers.
+///
+/// \return A vector of pointers to extra requirement checkers.
+const std::vector< std::shared_ptr< reqs_checker > > reqs_checkers();
+
 
 }  // namespace engine
 
diff --git a/contrib/kyua/integration/cmd_report_junit_test.sh b/contrib/kyua/integration/cmd_report_junit_test.sh
index d86228acf7e5..49b8c5790167 100755
--- a/contrib/kyua/integration/cmd_report_junit_test.sh
+++ b/contrib/kyua/integration/cmd_report_junit_test.sh
@@ -104,6 +104,7 @@ is_exclusive = false
 required_configs is empty
 required_disk_space = 0
 required_files is empty
+required_kmods is empty
 required_memory = 0
 required_programs is empty
 required_user is empty
@@ -144,6 +145,7 @@ is_exclusive = false
 required_configs is empty
 required_disk_space = 0
 required_files is empty
+required_kmods is empty
 required_memory = 0
 required_programs is empty
 required_user is empty
@@ -222,6 +224,7 @@ is_exclusive = false
 required_configs is empty
 required_disk_space = 0
 required_files is empty
+required_kmods is empty
 required_memory = 0
 required_programs is empty
 required_user is empty
@@ -262,6 +265,7 @@ is_exclusive = false
 required_configs is empty
 required_disk_space = 0
 required_files is empty
+required_kmods is empty
 required_memory = 0
 required_programs is empty
 required_user is empty
diff --git a/contrib/kyua/integration/cmd_report_test.sh b/contrib/kyua/integration/cmd_report_test.sh
index 8b2b97f9cb4a..1fc1932d3c47 100755
--- a/contrib/kyua/integration/cmd_report_test.sh
+++ b/contrib/kyua/integration/cmd_report_test.sh
@@ -258,6 +258,7 @@ Metadata:
     required_configs is empty
     required_disk_space = 0
     required_files is empty
+    required_kmods is empty
     required_memory = 0
     required_programs is empty
     required_user is empty
diff --git a/contrib/kyua/model/metadata.cpp b/contrib/kyua/model/metadata.cpp
index 1f17b9ce4624..09a521a76cec 100644
--- a/contrib/kyua/model/metadata.cpp
+++ b/contrib/kyua/model/metadata.cpp
@@ -256,9 +256,7 @@ init_tree(config::tree& tree)
     tree.define< bytes_node >("required_disk_space");
     tree.define< paths_set_node >("required_files");
     tree.define< bytes_node >("required_memory");
-#ifdef __FreeBSD__
     tree.define< config::strings_set_node >("required_kmods");
-#endif
     tree.define< paths_set_node >("required_programs");
     tree.define< user_node >("required_user");
     tree.define< delta_node >("timeout");
@@ -285,9 +283,7 @@ set_defaults(config::tree& tree)
     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));
-#ifdef __FreeBSD__
     tree.set< config::strings_set_node >("required_kmods", model::strings_set());
-#endif
     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
@@ -603,20 +599,20 @@ model::metadata::required_memory(void) const
 }
 
 
-#ifdef __FreeBSD__
-/// Returns the list of kmods needed by the test.
+/// Returns the list of kernel modules needed by the test.
 ///
-/// \return Set of strings.
+/// \return Set of kernel module names.
 const model::strings_set&
 model::metadata::required_kmods(void) const
 {
     if (_pimpl->props.is_set("required_kmods")) {
-        return _pimpl->props.lookup< config::strings_set_node >("required_kmods");
+        return _pimpl->props.lookup< config::strings_set_node >(
+            "required_kmods");
     } else {
-	return get_defaults().lookup< config::strings_set_node >("required_kmods");
+        return get_defaults().lookup< config::strings_set_node >(
+            "required_kmods");
     }
 }
-#endif
 
 
 /// Returns the list of programs needed by the test.
diff --git a/contrib/kyua/model/metadata.hpp b/contrib/kyua/model/metadata.hpp
index 698613eba869..681f4a79f76c 100644
--- a/contrib/kyua/model/metadata.hpp
+++ b/contrib/kyua/model/metadata.hpp
@@ -76,9 +76,7 @@ public:
     const utils::units::bytes& required_disk_space(void) const;
     const paths_set& required_files(void) const;
     const utils::units::bytes& required_memory(void) const;
-#ifdef __FreeBSD__
     const strings_set& required_kmods(void) const;
-#endif
     const paths_set& required_programs(void) const;
     const std::string& required_user(void) const;
     const utils::datetime::delta& timeout(void) const;
@@ -124,9 +122,7 @@ public:
     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&);
-#ifdef __FreeBSD__
     metadata_builder& set_required_kmods(const strings_set&);
-#endif
     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/model/metadata_test.cpp b/contrib/kyua/model/metadata_test.cpp
index b4c3dff5b029..bdb1d3655c33 100644
--- a/contrib/kyua/model/metadata_test.cpp
+++ b/contrib/kyua/model/metadata_test.cpp
@@ -57,6 +57,7 @@ ATF_TEST_CASE_BODY(defaults)
     ATF_REQUIRE(md.required_configs().empty());
     ATF_REQUIRE_EQ(units::bytes(0), md.required_disk_space());
     ATF_REQUIRE(md.required_files().empty());
+    ATF_REQUIRE(md.required_kmods().empty());
     ATF_REQUIRE_EQ(units::bytes(0), md.required_memory());
     ATF_REQUIRE(md.required_programs().empty());
     ATF_REQUIRE(md.required_user().empty());
@@ -322,6 +323,7 @@ ATF_TEST_CASE_BODY(to_properties)
     props["required_configs"] = "";
     props["required_disk_space"] = "0";
     props["required_files"] = "bar foo";
+    props["required_kmods"] = "";
     props["required_memory"] = "1.00K";
     props["required_programs"] = "";
     props["required_user"] = "";
@@ -412,7 +414,7 @@ ATF_TEST_CASE_BODY(output__defaults)
                    "has_cleanup='false', is_exclusive='false', "
                    "required_configs='', "
                    "required_disk_space='0', required_files='', "
-                   "required_memory='0', "
+                   "required_kmods='', required_memory='0', "
                    "required_programs='', required_user='', timeout='300'}",
                    str.str());
 }
@@ -435,7 +437,7 @@ ATF_TEST_CASE_BODY(output__some_values)
         "has_cleanup='false', is_exclusive='true', "
         "required_configs='', "
         "required_disk_space='0', required_files='bar foo', "
-        "required_memory='1.00K', "
+        "required_kmods='', required_memory='1.00K', "
         "required_programs='', required_user='', timeout='300'}",
         str.str());
 }
diff --git a/contrib/kyua/model/test_case_test.cpp b/contrib/kyua/model/test_case_test.cpp
index 1e2597d1501e..29df7ee35863 100644
--- a/contrib/kyua/model/test_case_test.cpp
+++ b/contrib/kyua/model/test_case_test.cpp
@@ -204,7 +204,7 @@ ATF_TEST_CASE_BODY(test_case__output)
         "has_cleanup='false', "
         "is_exclusive='false', "
         "required_configs='', required_disk_space='0', required_files='', "
-        "required_memory='0', "
+        "required_kmods='', required_memory='0', "
         "required_programs='', required_user='', timeout='300'}}",
         str.str());
 }
diff --git a/contrib/kyua/model/test_program_test.cpp b/contrib/kyua/model/test_program_test.cpp
index ddfbc430387c..f7a84d770fc0 100644
--- a/contrib/kyua/model/test_program_test.cpp
+++ b/contrib/kyua/model/test_program_test.cpp
@@ -547,7 +547,7 @@ check_output__no_test_cases(void)
         "description='', execenv='', execenv_jail_params='', "
         "has_cleanup='false', is_exclusive='false', "
         "required_configs='', required_disk_space='0', required_files='', "
-        "required_memory='0', "
+        "required_kmods='', required_memory='0', "
         "required_programs='', required_user='', timeout='300'}, "
         "test_cases=map()}",
         str.str());
@@ -597,7 +597,7 @@ check_output__some_test_cases(void)
         "description='', execenv='', execenv_jail_params='', "
         "has_cleanup='false', is_exclusive='false', "
         "required_configs='', required_disk_space='0', required_files='', "
-        "required_memory='0', "
+        "required_kmods='', required_memory='0', "
         "required_programs='', required_user='', timeout='300'}, "
         "test_cases=map("
         "another-name=test_case{name='another-name', "
@@ -605,14 +605,14 @@ check_output__some_test_cases(void)
         "description='', execenv='', execenv_jail_params='', "
         "has_cleanup='false', is_exclusive='false', "
         "required_configs='', required_disk_space='0', required_files='', "
-        "required_memory='0', "
+        "required_kmods='', required_memory='0', "
         "required_programs='', required_user='', timeout='300'}}, "
         "the-name=test_case{name='the-name', "
         "metadata=metadata{allowed_architectures='a', allowed_platforms='foo', "
         "custom.bar='baz', description='', execenv='', execenv_jail_params='', "
         "has_cleanup='false', is_exclusive='false', "
         "required_configs='', required_disk_space='0', required_files='', "
-        "required_memory='0', "
+        "required_kmods='', required_memory='0', "
         "required_programs='', required_user='', timeout='300'}})}",
         str.str());
 }
diff --git a/contrib/kyua/os/freebsd/main.cpp b/contrib/kyua/os/freebsd/main.cpp
index 13e5dcf0e023..700284b64b78 100644
--- a/contrib/kyua/os/freebsd/main.cpp
+++ b/contrib/kyua/os/freebsd/main.cpp
@@ -31,6 +31,9 @@
 #include "engine/execenv/execenv.hpp"
 #include "os/freebsd/execenv_jail_manager.hpp"
 
+#include "engine/requirements.hpp"
+#include "os/freebsd/reqs_checker_kmods.hpp"
+
 namespace execenv = engine::execenv;
 
 /// FreeBSD related features initialization.
@@ -50,5 +53,13 @@ freebsd::main(const int, const char* const* const)
         std::shared_ptr< execenv::manager >(new freebsd::execenv_jail_manager())
     );
 
+#ifdef __FreeBSD__
+    engine::register_reqs_checker(
+        std::shared_ptr< engine::reqs_checker >(
+            new freebsd::reqs_checker_kmods()
+        )
+    );
+#endif
+
     return 0;
 }
diff --git a/contrib/kyua/os/freebsd/reqs_checker_kmods.cpp b/contrib/kyua/os/freebsd/reqs_checker_kmods.cpp
new file mode 100644
index 000000000000..3ae3446a7815
--- /dev/null
+++ b/contrib/kyua/os/freebsd/reqs_checker_kmods.cpp
@@ -0,0 +1,50 @@
+// 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.
+
+#include "os/freebsd/reqs_checker_kmods.hpp"
+
+#include "model/metadata.hpp"
+
+extern "C" {
+#include "libutil.h"
+}
+
+std::string
+freebsd::reqs_checker_kmods::exec(const model::metadata& md,
+                                  const utils::config::tree&,
+                                  const std::string&,
+                                  const utils::fs::path&) const
+{
+    std::string reason = "";
+    for (auto& kmod : md.required_kmods())
+        if (!::kld_isloaded((kmod).c_str()))
+            reason += " " + kmod;
+    if (!reason.empty())
+        reason = "Required kmods are not loaded:" + reason + ".";
+    return reason;
+}
diff --git a/contrib/kyua/os/freebsd/reqs_checker_kmods.hpp b/contrib/kyua/os/freebsd/reqs_checker_kmods.hpp
new file mode 100644
index 000000000000..8c7c69e35d07
--- /dev/null
+++ b/contrib/kyua/os/freebsd/reqs_checker_kmods.hpp
@@ -0,0 +1,54 @@
+// 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 os/freebsd/reqs_checker_kmods.hpp
+/// FreeBSD kernel module requirement checker.
+
+#if !defined(FREEBSD_REQS_CHECKER_KMODS)
+#define FREEBSD_REQS_CHECKER_KMODS
+
+#include "engine/requirements.hpp"
+#include "model/metadata_fwd.hpp"
+#include "utils/config/tree_fwd.hpp"
+#include "utils/fs/path_fwd.hpp"
+
+namespace freebsd {
+
+
+class reqs_checker_kmods : public engine::reqs_checker {
+public:
+    std::string exec(const model::metadata&,
+                     const utils::config::tree&,
+                     const std::string&,
+                     const utils::fs::path&) const;
+};
+
+
+}  // namespace freebsd
+
+#endif  // !defined(FREEBSD_REQS_CHECKER_KMODS)
diff --git a/usr.bin/kyua/Makefile b/usr.bin/kyua/Makefile
index 6db9da94e69c..d1cb2a51f667 100644
--- a/usr.bin/kyua/Makefile
+++ b/usr.bin/kyua/Makefile
@@ -133,7 +133,8 @@ SRCS+=	engine/atf.cpp			\
 	engine/execenv/execenv_host.cpp
 
 SRCS+=	os/freebsd/execenv_jail_manager.cpp	\
-	os/freebsd/main.cpp
+	os/freebsd/main.cpp			\
+	os/freebsd/reqs_checker_kmods.cpp
 
 SRCS+=	store/dbtypes.cpp		\
 	store/exceptions.cpp		\

From nobody Tue Sep 23 13:06:56 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWKxs285Wz68crZ;
	Tue, 23 Sep 2025 13:06:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWKxs1R5rz3Y6B;
	Tue, 23 Sep 2025 13:06:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758632817;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=umIBYdVJSQskwiHlJBNXSjh9fjBW6rq+LfpnpkPK/aw=;
	b=YE0G1gA3UAgI6F+od8wypG7QQhbFb7b5ma7cEtvqVUzbSmjO/6D6DJ1A6CRAwSz8roGyf1
	Oga9PcNok44cxZrwD24i17dILt/kL+j2MZowqYBn1bzKpqYCwpUp6okHhhodB+SGJ9ZHEd
	mzdFRa6hs2gvGMLohstmIimoVWkVQ+Z4D9pYQeHn8mrxOw7yLElpIWp89Cic9IUsjjcpB/
	fXoWh1X/AHu0hYGySElpfXsobFDsbs4x45ytLMe5GDvd6xnAWqBR1iwCkBzZdfGTZyxwwi
	7ZuMZOOwKSDk4kpOsp5J/YZ/X/5Ras6b+VqCyQgQOPiUeerJJK8VfdlzuxlbKg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758632817;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=umIBYdVJSQskwiHlJBNXSjh9fjBW6rq+LfpnpkPK/aw=;
	b=DJtrb/P6UCAyQpnjIcs7Jem2PHHaad2HDKP4s8itf/aGjHwRz1b88TXiSrMEVjgsNa8458
	3VBL7YbYve82hmSGni86WhxohnniuPK6RlkhTvwP5cyCHxVui9cA58usOMy6DWPNz0USMT
	Rl5vHyMsM7cwZdwXKFYWQglGL9kaj+BQVlhoOf8BRxCtjsRDfu3biDj5NfOGwKaE5cFI3R
	EARyMTTeH6rrV2Giu4bPlFd24kd8g7kHrsbH5t7O4d7Sp0Om/u0KD1CVxQeDpHZBjCXhUn
	bKSwAxxPmKq7nsJsAecJ16r/yZtJdirEvYTFmVEKmdcmspoqq2SsY6er8NFcpg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758632817; a=rsa-sha256; cv=none;
	b=ORSW+wpAIVWWQB9XUssq+7RJmzrabXAUYX3w5LtOT9NQG2k5LYjY2yEpKS5Lq+HLphyUPa
	i5ZuBJt2XsFOofNpIefvskf4GY3JsfFrR5spYOxih3Gzu8bhAYWXL4gAxwDl1M/sXNrYo4
	WzXrzN/6omz3dq+s0qf6mBK3qK/esvibHqVm1qS55NLnzZVvTSYluDkRup0V7K1D+MmLyU
	vtjFco0JDPnbv82OOMNABaRjCkHzZaniNa00+OyqGmcUmI+zMdpwRjy1euNpBEe3+oMeas
	WI3lubps+pIJwXN9PSTYvxKTk4C0GurTMYZI6+7axBd61HOdCfL9myabS79urQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWKxs0XqQznBh;
	Tue, 23 Sep 2025 13:06:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58ND6uSX024252;
	Tue, 23 Sep 2025 13:06:56 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58ND6uij024249;
	Tue, 23 Sep 2025 13:06:56 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 13:06:56 GMT
Message-Id: <202509231306.58ND6uij024249@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= 
Subject: git: d13a8d09338d - stable/14 - man: Fix usage message
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: des
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: d13a8d09338d1825a3ae16e8e50f4686e88acbc4
Auto-Submitted: auto-generated

The branch stable/14 has been updated by des:

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

commit d13a8d09338d1825a3ae16e8e50f4686e88acbc4
Author:     Dag-Erling Smørgrav 
AuthorDate: 2025-09-08 13:26:43 +0000
Commit:     Dag-Erling Smørgrav 
CommitDate: 2025-09-23 13:06:37 +0000

    man: Fix usage message
    
    PR:             289245
    Fixes:          14b61b2e9317 ("man: Add -l option")
    (cherry picked from commit dc38cf116c820df0be341ec5e359de0012b2d58a)
---
 usr.bin/man/man.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh
index fe9c388c0df8..8c734a4c47a1 100755
--- a/usr.bin/man/man.sh
+++ b/usr.bin/man/man.sh
@@ -751,7 +751,7 @@ man_setup_locale() {
 # Display usage for the man utility.
 man_usage() {
 	echo 'Usage:'
-	echo ' man [-adho] [-t | -w] [-M manpath] [-P pager] [-S mansect]'
+	echo ' man [-adhlo] [-t | -w] [-M manpath] [-P pager] [-S mansect]'
 	echo '     [-m arch[:machine]] [-p [eprtv]] [mansect] page [...]'
 	echo ' man -K | -f | -k expression [...] -- Search manual pages'
 

From nobody Tue Sep 23 13:07:02 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWKxy6K7Bz68cmH;
	Tue, 23 Sep 2025 13:07:02 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWKxy5VpLz3YR4;
	Tue, 23 Sep 2025 13:07:02 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758632822;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Px5H+vjX6PWQTCPudOWrkKgEklIvhppWCZ0rhkj3OsI=;
	b=xFHAOXaT6hGB1PErFI1oV+L+WJYg3WNvHdiwHe1yTg7wt3YyDY5R3X/VmjLnMj2DVKQizH
	zQqCNe2AcRq1dyOnmesjjAUzB8hSXrRp+C2sgvD0jS2utgXA+LOiGKgfXnABxOd3vZ3BdA
	m/9YMASJw84ZfDa536A+1ucZ8uWFyzOOBCiPLdlIXbHDN66jJL8HyZq0w07VO0H6L4cHYw
	TYZDTLDB9KencliL3j/6Ze2MWKG2gnnBtJSXPK3x8SWLs6/WhBh/uWReTOrvpnR1ImyjPj
	13nZm4sTPf1xi+SCcNdt1j9WAlIn4oJXF9NkwcFq8btpLpHoQ6ALZ9vozvCH4Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758632822;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Px5H+vjX6PWQTCPudOWrkKgEklIvhppWCZ0rhkj3OsI=;
	b=miZ4PQSC2M5twIdYBgWDdhlh2kCeuK14LQdfA05vNFDogn0rNkthjnVlCOKNFf7sMdWu7p
	szd9JqdbC5ZmPj8C4gbABVSGAqMFYAH4fnyrkWuqXHemFFpePb2NN3cynFB8mZqu9/zlp+
	DWMQfbzTLWbckk8VMfvUzMXas9z1rJAF7utXiRtTwoDQUd9IQWI4xGRUHUuZcZ2Uju+SJ3
	J+erwP4NUFp+xIBtTyEYTPzx6JjK2xALjXkwDkzbI1Z+xbOJihj3fpLtF/c0ySwtblMgeu
	9ZCASVEq7/aul8f/E2jXF75GZlCotR936RIqHzr1UADITo2O98NuGqvDXQzaQw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758632822; a=rsa-sha256; cv=none;
	b=q2KnjrwdzErgEJEliX1pDQrP9IW0+6Zz7qJwi3W6klIStRoiYn0RBmqTQ2Qo0RGacKp1oO
	jCCo96SjMPR/JF1ePpS0IiR/c48Tyo3zywXb7eFgsvoqBsYk7QAx/DdWrv2mcOa1gCiw0B
	49aBUEmgh1Kuzz2yUnB7SQI4DSF7DvEATgmd1JOuoH0IpBtSJLYPXzlTd3+hSXjC0KBCzO
	97Ab52G2yTYX6TURFBGtU600oMGac9MwvXicEP1s0cNtIcxXgNNR1vZ1vRYA2iCxqXkPiW
	Mq8eTsDWYAIQLr4iHdAll0P8ftizLbUSBLTP1MwcAtrxc13tBQXWW0ZlFeCh6w==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWKxy4rBhznQt;
	Tue, 23 Sep 2025 13:07:02 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58ND72LQ024422;
	Tue, 23 Sep 2025 13:07:02 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58ND72hk024419;
	Tue, 23 Sep 2025 13:07:02 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 13:07:02 GMT
Message-Id: <202509231307.58ND72hk024419@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= 
Subject: git: 0416dd2d0330 - stable/13 - man: Fix usage message
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: des
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/13
X-Git-Reftype: branch
X-Git-Commit: 0416dd2d0330a451d2d558785deb84f0b5c36b40
Auto-Submitted: auto-generated

The branch stable/13 has been updated by des:

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

commit 0416dd2d0330a451d2d558785deb84f0b5c36b40
Author:     Dag-Erling Smørgrav 
AuthorDate: 2025-09-08 13:26:43 +0000
Commit:     Dag-Erling Smørgrav 
CommitDate: 2025-09-23 13:06:14 +0000

    man: Fix usage message
    
    PR:             289245
    Fixes:          14b61b2e9317 ("man: Add -l option")
    (cherry picked from commit dc38cf116c820df0be341ec5e359de0012b2d58a)
---
 usr.bin/man/man.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh
index 6bb260117078..91796b8e53b7 100755
--- a/usr.bin/man/man.sh
+++ b/usr.bin/man/man.sh
@@ -739,7 +739,7 @@ man_setup_locale() {
 # Display usage for the man utility.
 man_usage() {
 	echo 'Usage:'
-	echo ' man [-adho] [-t | -w] [-M manpath] [-P pager] [-S mansect]'
+	echo ' man [-adhlo] [-t | -w] [-M manpath] [-P pager] [-S mansect]'
 	echo '     [-m arch[:machine]] [-p [eprtv]] [mansect] page [...]'
 	echo ' man -f page [...] -- Emulates whatis(1)'
 	echo ' man -k page [...] -- Emulates apropos(1)'

From nobody Tue Sep 23 13:08:35 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWKzl5GCYz68dDX;
	Tue, 23 Sep 2025 13:08:35 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWKzl4jBQz3Yp2;
	Tue, 23 Sep 2025 13:08:35 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758632915;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Afg6D03DvCtEZYVtepby/oQzyNeBJ9HLr0CHw3pAIlA=;
	b=FANY/r5s+O1x60wC6UfRLm+YC8vgwKMIegvkTpp1dnJk2DYbDInHAa/uXg76Z77cHRRvZM
	V4FOIEvTyd0zAVpLiFJTMGEylbjApD4wMU8SAmchuiQkUnBucfnhjsH8K99jv5lnA5VwkI
	MuN3efdNxpLswAsKVUom1kdYhrMQaZcQ5N3HUYJbbJiIdqIsXP0WLyzMaqCNJNZ/metzKN
	YjhjxziE389cUnSOMl1XflUd4Qbw3+G6LlTLArpT8JYMe4SSxbtOubj/hLcJIvnRbHfRsF
	E6Zvt5cAaJprhG901c4DQlKgFpNYqAWlIONPM62uLyBoWFUF5jDMaBpg9wiziQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758632915;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Afg6D03DvCtEZYVtepby/oQzyNeBJ9HLr0CHw3pAIlA=;
	b=MyTULJ31z/B7UsgqV7ZHd2+xzLWFX1GVhhVzNQJBXg0DZ9uBxWHOysF+MzVihUqMqw+LIm
	zGFXm0fSOKBlPd+05hS2ObIpGqKDesoJrk1luj2/bxSIcjsErqXQUpOH4q6gigOTiPklPg
	ONqwUXrYy8brAKilMMHukaE5me4hzj7eXj+JEPkTwcfNV1jlkqbLfMfjT52eskeN4jk0wV
	LsavMQveaynKpjzZC+AoUCU9LYxYo1VKfidkuEctzq/BV2klfGZ6+VBYZOj2Um6bZbwFyO
	0TlPbv6tq23fPP9RcNvrZfAJ/rxUAExvDGkEMX6u+Nv6FieHmf68h1UYfAvnSw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758632915; a=rsa-sha256; cv=none;
	b=MVHaHRv0Pan39ZWDyKRMXwp6P2zJaFC730UTlamBNU7fPaIJdjGZveO9+tSElNWgxORMDb
	f/tyzBNI/XnXdySMKCsNmkn8qluZMWOQi3OUOlqmp29YhRE0GCRw0akFdr2I8Oaffhmywz
	qDIksUfksAiED2xoSH19zvzgOvxrU6QU5pRSGWtFlvyR+2Uyr6j3HvVh1Ch1MGTOoKs5xL
	Q/fKZhe0bAizCJAALNFEUG+/BD4aO2CDqep1SlkHMN2vb+2LZNEhN9uCA/TGiPdQbbRB7i
	aHpVc+RKMusZzaO+UiZSabe9fNmgpLeHvdB2APwTYVGejE88VUwZ41GSBPAMWg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWKzl4CGxznBp;
	Tue, 23 Sep 2025 13:08:35 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58ND8Zxo024982;
	Tue, 23 Sep 2025 13:08:35 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58ND8ZHu024979;
	Tue, 23 Sep 2025 13:08:35 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 13:08:35 GMT
Message-Id: <202509231308.58ND8ZHu024979@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: b1c96e54b906 - stable/15 - ipfw: Teach ipfw that
  EtherIP is an upper layer protocol
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: b1c96e54b906d0cdea0b5a9c74cc295803dfe50e
Auto-Submitted: auto-generated

The branch stable/15 has been updated by zlei:

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

commit b1c96e54b906d0cdea0b5a9c74cc295803dfe50e
Author:     Zhenlei Huang 
AuthorDate: 2025-09-16 15:58:24 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-23 13:07:33 +0000

    ipfw: Teach ipfw that EtherIP is an upper layer protocol
    
    so that we do not discard EtherIP packets ( over IPv6 network ) when
    net.inet6.ip6.fw.deny_unknown_exthdrs is set to 1 ( which is the default
    value ).
    
    PR:             227450
    Reviewed by:    ae, #network
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D52566
    
    (cherry picked from commit 0418e6690e91aa6c38dd9af9da43c4c5a9dc1cd2)
---
 sys/netpfil/ipfw/ip_fw2.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sys/netpfil/ipfw/ip_fw2.c b/sys/netpfil/ipfw/ip_fw2.c
index 3f810533b7fc..b59d8d08bf80 100644
--- a/sys/netpfil/ipfw/ip_fw2.c
+++ b/sys/netpfil/ipfw/ip_fw2.c
@@ -67,6 +67,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -1757,6 +1758,12 @@ do {								\
 				PULLUP_TO(hlen, ulp, struct ip);
 				break;
 
+			case IPPROTO_ETHERIP:	/* RFC 3378 */
+				PULLUP_LEN(hlen, ulp,
+				    sizeof(struct etherip_header) +
+				    sizeof(struct ether_header));
+				break;
+
 			case IPPROTO_PFSYNC:
 				PULLUP_TO(hlen, ulp, struct pfsync_header);
 				break;

From nobody Tue Sep 23 14:05:04 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWMDw4rhZz68hTT;
	Tue, 23 Sep 2025 14:05:04 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWMDw45Plz3fv9;
	Tue, 23 Sep 2025 14:05:04 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758636304;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=UweiGn47pMPwjfENyvvnSXpU4Sr+zEueUSDMWqIs+F0=;
	b=NjLL+gQnDBICLvUlKOzrthJoeV8Z0Yg5P7zIx49g/z+iRZU4hvnf9HoIbPQPItokx1ipva
	CoWrcus3x1sOiE64q1dAKfReMtoKulqd2T35OHH4kkYsjpxqHBef1KVArNymsAyqaYwUWC
	bdZLx0/p54Qhucbw0HM36IrsD2t1DD5B0MeMyMIyMhX7cGyadOC4HowjfuraAx4aHGPn6i
	kUx88NdRnKDULifXC4PJwN10aHEE2whzkMAqGGhH1A2fG+JHv/SjbaIcmwc6DV1jv2m5dT
	eiHumjCDpdSQXeO8gWDceja/J///MNgE3FC6oXYXj1z1g2U1jNGVtOkQc62ESQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758636304;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=UweiGn47pMPwjfENyvvnSXpU4Sr+zEueUSDMWqIs+F0=;
	b=mdm/+sMqeme/r9B51XUNOxU2VhF6UBUOIZvKPfzkV9N1rf5c1uZgi6cqOqSQVWilqwProH
	fIyFF3d0VTazG83XSFXN2VxZ12UQQwklA5dRXOzbPjRXoh3Qbdsy35PdxT9zVcCVwWTzto
	KJpgGF858exe7UrC/LF1B/fNd2Dv4rEkQQn/ZR4JwNC0NgJSPClvR5WoruFGAa5ZzVii8W
	HY7QjpAO9uvxk1jQe5HDLUfUpfOqsH5U8Y6RPNhYzDnI418G+uzhE87KJcvfiUb9WFQq43
	wEqWOndjbJlc6/wSH/ZGX290oyzT87CFdBaRdnZRrdq0NGQUY2Ivkv7jZWRdew==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758636304; a=rsa-sha256; cv=none;
	b=Qvpqan1xwMfEYWt+15U2jmicYSaBXorCLtCvKD6yddfEPo2+YAkV3Awg2xm51YzAXriMd1
	9hs46TG0bktFgGTFo+XpapVrxT8C/5/UVKWqjt5w975Z4SnOObFirr2Z5YdSQxA2otXyC1
	k+NS7TAuwjUcA278Xpr0+c2IpIDENyPcAUaSAnVdycUxPPQ9t2UiKARGaZCK8UhO7xmw8Z
	Mt2tPNNoTBpbkhCs6rbX2f5ciP/Z6XcKSG512mFK2TFOvLYmUmw+YFj01o1batYY4rJHEv
	ZqPfbxlUHiKnwmBJ2Bi4ZXzsnTe2kUCo+f53QAaF3b+JXfzJ36VvDiWJMS+Mkg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWMDw3P4JzpgR;
	Tue, 23 Sep 2025 14:05:04 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NE54pm036472;
	Tue, 23 Sep 2025 14:05:04 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NE54al036469;
	Tue, 23 Sep 2025 14:05:04 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 14:05:04 GMT
Message-Id: <202509231405.58NE54al036469@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Corvin =?utf-8?Q?K=C3=B6hne?= 
Subject: git: 5a8172dd6389 - stable/15 - bhyve: assign a valid
  INTPIN to NVIDIA GPUs
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: corvink
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 5a8172dd6389c1e647ae2fdb9c3534cab3933f86
Auto-Submitted: auto-generated

The branch stable/15 has been updated by corvink:

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

commit 5a8172dd6389c1e647ae2fdb9c3534cab3933f86
Author:     Corvin Köhne 
AuthorDate: 2022-03-17 12:11:14 +0000
Commit:     Corvin Köhne 
CommitDate: 2025-09-23 13:52:51 +0000

    bhyve: assign a valid INTPIN to NVIDIA GPUs
    
    When passing an NVIDIA GPU to a Linux VM, the GPU driver refuses to work and
    complains about a missing IRQ:
    
    [ 77.208984] NVRM: Can't find an IRQ for your NVIDIA card!
    [ 77.212697] NVRM: Please check your BIOS settings.
    [ 77.212699] NVRM: [Plug & Play OS] should be set to NO
    [ 77.212700] NVRM: [Assign IRQ to VGA] should be set to YES
    [ 77.212702] nvidia: probe of 0000:00:07.0 failed with error -1
    
    By setting a valid INTPIN in the PCI config space those error messages
    disappear. Additionally, tools like nvidia-smi are able to detect the GPU and
    the GPU driver seems to work properly.
    
    Note that bhyve still doesn't support legacy interrupts. So, the guest
    shouldn't try to use it even though we're assigning an INTPIN.
    
    Reviewed by:            jhb
    Tested by:              chuck
    MFC after:              1 week
    Sponsored by:           Beckhoff Automation GmbH & Co. KG
    Differential Revision:  https://reviews.freebsd.org/D51892
    
    (cherry picked from commit effcd0ded0ef1c92bef29c1e9bbf517c97bb45b8)
---
 usr.sbin/bhyve/amd64/Makefile.inc    |  1 +
 usr.sbin/bhyve/pci_passthru_quirks.c | 48 ++++++++++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+)

diff --git a/usr.sbin/bhyve/amd64/Makefile.inc b/usr.sbin/bhyve/amd64/Makefile.inc
index 92e53433ff01..50a011ed4bfd 100644
--- a/usr.sbin/bhyve/amd64/Makefile.inc
+++ b/usr.sbin/bhyve/amd64/Makefile.inc
@@ -13,6 +13,7 @@ SRCS+=	\
 	pci_gvt-d.c	\
 	pci_lpc.c	\
 	pci_passthru.c	\
+	pci_passthru_quirks.c	\
 	pctestdev.c	\
 	pm.c		\
 	post.c		\
diff --git a/usr.sbin/bhyve/pci_passthru_quirks.c b/usr.sbin/bhyve/pci_passthru_quirks.c
new file mode 100644
index 000000000000..5ba0e674f311
--- /dev/null
+++ b/usr.sbin/bhyve/pci_passthru_quirks.c
@@ -0,0 +1,48 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2025 Beckhoff Automation GmbH & Co. KG
+ * Author: Corvin Köhne 
+ */
+
+#include 
+
+#include 
+
+#include "pci_passthru.h"
+
+#define PCI_VENDOR_NVIDIA 0x10DE
+
+static int
+nvidia_gpu_probe(struct pci_devinst *const pi)
+{
+	struct passthru_softc *sc;
+	uint16_t vendor;
+	uint8_t class;
+
+	sc = pi->pi_arg;
+
+	vendor = pci_host_read_config(passthru_get_sel(sc), PCIR_VENDOR, 0x02);
+	if (vendor != PCI_VENDOR_NVIDIA)
+		return (ENXIO);
+
+	class = pci_host_read_config(passthru_get_sel(sc), PCIR_CLASS, 0x01);
+	if (class != PCIC_DISPLAY)
+		return (ENXIO);
+
+	return (0);
+}
+
+static int
+nvidia_gpu_init(struct pci_devinst *const pi, nvlist_t *const nvl __unused)
+{
+	pci_set_cfgdata8(pi, PCIR_INTPIN, 1);
+
+	return (0);
+}
+
+static struct passthru_dev nvidia_gpu = {
+	.probe = nvidia_gpu_probe,
+	.init = nvidia_gpu_init,
+};
+PASSTHRU_DEV_SET(nvidia_gpu);

From nobody Tue Sep 23 14:28:10 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWMlb0d7dz68jZg;
	Tue, 23 Sep 2025 14:28:11 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWMlZ6zvhz3kps;
	Tue, 23 Sep 2025 14:28:10 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758637691;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=9AFqnoD/XJzHzuJbDUWnflanL3ln8w8/aYRdG5Phwko=;
	b=G9YLKdCKS50IiIyZMmSNP+oAOG4UP+ZzpDaY9k+9pTfbtxGLR4Yrcc/WW3RSUF505IMY7m
	IQHmQINr1vdRDRAmlide4RiaeI+qvPXSdTYLBsntlLkjsP/3S7wwVotS2o72+Bd50aJDck
	8xJKXBcjwu2kalM7p3Pa4+0X/hjhJA6Lgq12tmM2R3Uf5LVuGUl2FgShLNGmOTFyAzOAym
	B3bGaTglPp4SNrjVsmU3yFCjjL355LitFTiuxWONcNIGPs3jQIwhHKVjHxRosc1N6e0TJi
	OwCeHvMrU7iGOzIZjuRj5CgsJGI/88PJSZHj91kpWtTeBjj8tw/1tTXyMocfDw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758637691;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=9AFqnoD/XJzHzuJbDUWnflanL3ln8w8/aYRdG5Phwko=;
	b=yq2s+B3qbXvqW6qfvkIjLdtn33cFn+hdNvp7uVwjf5iBlNZnKUMAP8aeK3qXJERoj/3hii
	ymF5zMOdHPVB0bgzRaYrYvGinnS19TUUcwzYQV1mCGEvQpgzuxqVOfX0W8RgAJl2LlBz1w
	IFnO7SXRm/zkECZqUZcqmnWmPdb04wy350yNk5V2UD0ngI/GHBENhHlXyvATh5HQ09cf0P
	u5IaZzBjwz1KqwipU9sqX3q2lnuVHT9clEhmsDRsbf1w52QC5KBEmOFPamrrHxjzeIFsdw
	Yol1DogGZzY0F0P+3scrT9cW/mWCWtTY8JjZkRm6A6NwcD3/53g9B+x3sthofQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758637691; a=rsa-sha256; cv=none;
	b=Fg+y7LHwK5L0Ph84g0wJzqwzz2zo99MxZhHeQeFfEmpoeFMG6xg540LFkTU22Y3O7eaTyL
	214kHQ3WSOV94IM5bVxRIV/eDw6552eYlXDGSCsFq7iEj+6tSQKJ/vTdtkEtuX/JXPZ/Il
	in1YLY79awumWcey71kjzZHL4jZ0TGS8GdMu1Ms4K2DRDiaLZlGyMLcXFoVL5bCTdg5z4t
	yNaJw9uc5/DBtIPpqJ11WqUXvyB2XjpGv6BW/MBMAcUCx6a0PfcPrt3ft1ETqZGxMXI3ex
	icUAxy/xivbC7+w8SLuCC0fEYHyTOo07GH0ZI6hkQ6/vrPETdat5dGrmSbtJfQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWMlZ6ZsFzqNv;
	Tue, 23 Sep 2025 14:28:10 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NESAB4074394;
	Tue, 23 Sep 2025 14:28:10 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NESAnB074391;
	Tue, 23 Sep 2025 14:28:10 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 14:28:10 GMT
Message-Id: <202509231428.58NESAnB074391@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Corvin =?utf-8?Q?K=C3=B6hne?= 
Subject: git: d0efd64479ed - stable/14 - bhyve: assign a valid
  INTPIN to NVIDIA GPUs
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: corvink
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: d0efd64479ed55c74bfa55c1ed23c13d732ee27a
Auto-Submitted: auto-generated

The branch stable/14 has been updated by corvink:

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

commit d0efd64479ed55c74bfa55c1ed23c13d732ee27a
Author:     Corvin Köhne 
AuthorDate: 2022-03-17 12:11:14 +0000
Commit:     Corvin Köhne 
CommitDate: 2025-09-23 14:13:34 +0000

    bhyve: assign a valid INTPIN to NVIDIA GPUs
    
    When passing an NVIDIA GPU to a Linux VM, the GPU driver refuses to work and
    complains about a missing IRQ:
    
    [ 77.208984] NVRM: Can't find an IRQ for your NVIDIA card!
    [ 77.212697] NVRM: Please check your BIOS settings.
    [ 77.212699] NVRM: [Plug & Play OS] should be set to NO
    [ 77.212700] NVRM: [Assign IRQ to VGA] should be set to YES
    [ 77.212702] nvidia: probe of 0000:00:07.0 failed with error -1
    
    By setting a valid INTPIN in the PCI config space those error messages
    disappear. Additionally, tools like nvidia-smi are able to detect the GPU and
    the GPU driver seems to work properly.
    
    Note that bhyve still doesn't support legacy interrupts. So, the guest
    shouldn't try to use it even though we're assigning an INTPIN.
    
    Reviewed by:            jhb
    Tested by:              chuck
    MFC after:              1 week
    Sponsored by:           Beckhoff Automation GmbH & Co. KG
    Differential Revision:  https://reviews.freebsd.org/D51892
    
    (cherry picked from commit effcd0ded0ef1c92bef29c1e9bbf517c97bb45b8)
---
 usr.sbin/bhyve/Makefile              |  1 +
 usr.sbin/bhyve/pci_passthru_quirks.c | 48 ++++++++++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+)

diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile
index f4dae2f09904..edc556ee373f 100644
--- a/usr.sbin/bhyve/Makefile
+++ b/usr.sbin/bhyve/Makefile
@@ -41,6 +41,7 @@ SRCS=	\
 	pci_hostbridge.c	\
 	pci_nvme.c		\
 	pci_passthru.c		\
+	pci_passthru_quirks.c	\
 	pci_virtio_9p.c		\
 	pci_virtio_block.c	\
 	pci_virtio_console.c	\
diff --git a/usr.sbin/bhyve/pci_passthru_quirks.c b/usr.sbin/bhyve/pci_passthru_quirks.c
new file mode 100644
index 000000000000..5ba0e674f311
--- /dev/null
+++ b/usr.sbin/bhyve/pci_passthru_quirks.c
@@ -0,0 +1,48 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2025 Beckhoff Automation GmbH & Co. KG
+ * Author: Corvin Köhne 
+ */
+
+#include 
+
+#include 
+
+#include "pci_passthru.h"
+
+#define PCI_VENDOR_NVIDIA 0x10DE
+
+static int
+nvidia_gpu_probe(struct pci_devinst *const pi)
+{
+	struct passthru_softc *sc;
+	uint16_t vendor;
+	uint8_t class;
+
+	sc = pi->pi_arg;
+
+	vendor = pci_host_read_config(passthru_get_sel(sc), PCIR_VENDOR, 0x02);
+	if (vendor != PCI_VENDOR_NVIDIA)
+		return (ENXIO);
+
+	class = pci_host_read_config(passthru_get_sel(sc), PCIR_CLASS, 0x01);
+	if (class != PCIC_DISPLAY)
+		return (ENXIO);
+
+	return (0);
+}
+
+static int
+nvidia_gpu_init(struct pci_devinst *const pi, nvlist_t *const nvl __unused)
+{
+	pci_set_cfgdata8(pi, PCIR_INTPIN, 1);
+
+	return (0);
+}
+
+static struct passthru_dev nvidia_gpu = {
+	.probe = nvidia_gpu_probe,
+	.init = nvidia_gpu_init,
+};
+PASSTHRU_DEV_SET(nvidia_gpu);

From nobody Tue Sep 23 15:24:18 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWP0V1XcJz68mLV;
	Tue, 23 Sep 2025 15:24:26 +0000 (UTC)
	(envelope-from kevans@FreeBSD.org)
Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "smtp.freebsd.org", Issuer "R13" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWP0V0wRbz3qJx;
	Tue, 23 Sep 2025 15:24:26 +0000 (UTC)
	(envelope-from kevans@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758641066;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=Pmf67PNJUVC5Ti1RWoBGc8rZeGMR3zxFzjYe7sdOvBM=;
	b=v61a5ff88iCCWi27o+KA78Jap7hkAbMN8268JoBGhnDLQ+R+VKbU9HHcksZ50s7jKeWJRO
	Sm8QcGeABoZdt2UT2Q4Ygs8P8mnJuGhCAN2jquCP76XIXF157ZQ/fOmursMawDAylM1/ab
	W4Ph5bVNWUIptU+oXIW708t1BDlJGxa5+qin1/5wwEyxP7Kp7ZxKRcT7GOhl40p05raUn6
	mPpcCnK9Vqu4RwXNS+pgRkU9OR+yj5tr8iInlOm4r1c7FrTtxvVb2YFlo5byIffTX0miLA
	ZXpD53BxtTe4npdKOh2lCUj+Wxo5kZ6bGnI+Eanumfm83wprxuwuh3MlAVREbg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758641066;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=Pmf67PNJUVC5Ti1RWoBGc8rZeGMR3zxFzjYe7sdOvBM=;
	b=Tqbf4CsA4TzaA6ZGDBkuHNGP2I6DirbLvHVFqZO0bTgh9k4jVm2kYp4tJc0837lTy4VevQ
	cX02/cqSGQSSxBzhhkvWJ0QsKFWfVLqNV4WJsaOtQM7/UXVA0ySsVRB5qoH03mP8pnicUC
	sklXfSREwF+T+euYsc6s5Ju1bF8M1akBXlpBmyiNuNppi4uOxqlWGFbudjbnyQ1KFFk2eE
	2Ml5nG44ZEEX2hXLfONGUvMBkgQnTJ3JeoXUrVUgako+rad8DbJWPhCZeAI3ZAiA52dATn
	yNu15XM3E1A7c7SEZ18AE56KYtpTfpnZ8rlOo+7EIcLbmzzp4SJJIhQjuivZaw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758641066; a=rsa-sha256; cv=none;
	b=MIzt8vJ1tgIs7oQM7zx/P7dMuaWOMWNhJtvB4cLgd9ZHAcU2QHnu2eYmhNrmQ9YzsnBG/K
	ck7fNu86Qq3EjSHCOifNEPOhBwgE2aKV+5yvtGZ+GRarRGcLYfQ8AJ72kwpgeaGCxhsPGY
	MYZ26qiEqQW5M5FqVHSRUvjJbV2+pQ9iglF5jMcz29owalLTZeefRfKMDu8fdsG2jYWZ8E
	SrX4mS3YtPHNqYr2eN0DiuLQqwWosUsew/51QTf8tt67qCYkjLiKujRTjMMBR7nUe+Pka0
	iqDAbCnaGY00yMSkBwmxRZmeY1hvs+arMq+yu7GiTK7sgbUm+63bxGP3nqm/5w==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from [10.9.4.95] (unknown [209.182.120.176])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	(Authenticated sender: kevans/mail)
	by smtp.freebsd.org (Postfix) with ESMTPSA id 4cWP0T00lrz1Qhf;
	Tue, 23 Sep 2025 15:24:24 +0000 (UTC)
	(envelope-from kevans@FreeBSD.org)
Message-ID: <8f835667-5d3c-4972-a6ee-0a2d4f20269e@FreeBSD.org>
Date: Tue, 23 Sep 2025 10:24:18 -0500
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: git: 8878569103a3 - stable/15 - initgroups(3): Add a
 pre-FreeBSD-15-compatible version
To: Olivier Certner , src-committers@FreeBSD.org,
 dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
References: <202509231203.58NC3lOg008905@gitrepo.freebsd.org>
Content-Language: en-US
From: Kyle Evans 
In-Reply-To: <202509231203.58NC3lOg008905@gitrepo.freebsd.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

On 9/23/25 07:03, Olivier Certner wrote:
> The branch stable/15 has been updated by olce:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=8878569103a382aa2c7142c203285a50484fe298
> 
> commit 8878569103a382aa2c7142c203285a50484fe298
> Author:     Olivier Certner 
> AuthorDate: 2025-08-29 14:19:33 +0000
> Commit:     Olivier Certner 
> CommitDate: 2025-09-23 12:02:46 +0000
> 
>      initgroups(3): Add a pre-FreeBSD-15-compatible version
>      
>      After commit 9da2fe96ff2e ("kern: fix setgroups(2) and getgroups(2) to
>      match other platforms"), initgroups() does not set the effective GID
>      anymore and uses all passed groups as the supplementary group list.
>      This effectively breaks backwards compatibility with programs/libraries
>      compiled on a FreeBSD 14 or earlier system.
>      
>      Restore compatibility by creating a new version of the 'initgroups'
>      symbol that designates the current implementation and providing
>      a pre-FreeBSD-15-compatible version under the symbol's previously
>      exported version.  The new version calls the new setgroups(2) system
>      call, while the compatible one calls the original one (called
>      freebsd14_setgroups()).
>      
>      Update the manual page with some history and comparison with other
>      current open-source systems.  Add a "SECURITY CONSIDERATIONS" section
>      highlighting some security properties of this approach and the reasons
>      we adopt it.  While here, revamp the manual page, in particular to use
>      the exact POSIX terminology where possible.
>      
>      Note for MFC to stable/14: Only the manual page update is to be MFCed,
>      and the text changed to reflect the old behavior and inform readers of
>      the new upcoming behavior in 15.
>      
>      Reviewed by:    kib
>      Fixes:          9da2fe96ff2e ("kern: fix setgroups(2) and getgroups(2) to match other platforms")
>      MFC after:      5 days
>      Sponsored by:   The FreeBSD Foundation
>      Differential Revision:  https://reviews.freebsd.org/D52282
>      
>      (cherry picked from commit 9dc1ac8691966480ff8bd9c37dd405b981b41dd5)

This one should not have been MFC'd without the follow-up that fixes initgroups@FBSD_1.0,
please back it out or MFC the fix ASAP- it doesn't make any sense to leave stable/15 broken
like this when we knew there was a problem.

Thanks,

Kyle Evans


> ---
>   lib/libc/gen/Symbol.map   |   2 +-
>   lib/libc/gen/gen-compat.h |   2 +
>   lib/libc/gen/initgroups.3 | 101 +++++++++++++++++++++++++++++++++++++++-------
>   lib/libc/gen/initgroups.c |  44 +++++++++++++++-----
>   4 files changed, 124 insertions(+), 25 deletions(-)
> 
> diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map
> index 26f638568efc..494b65bc5cc1 100644
> --- a/lib/libc/gen/Symbol.map
> +++ b/lib/libc/gen/Symbol.map
> @@ -193,7 +193,6 @@ FBSD_1.0 {
>   	__isinff;
>   	__isinfl;
>   	isatty;
> -	initgroups;
>   	jrand48;
>   	lcong48;
>   	ldexp;
> @@ -462,6 +461,7 @@ FBSD_1.8 {
>   	fdscandir_b;
>   	fts_open_b;
>   	glob_b;
> +	initgroups;
>   	inotify_add_watch;
>   	inotify_init;
>   	inotify_init1;
> diff --git a/lib/libc/gen/gen-compat.h b/lib/libc/gen/gen-compat.h
> index 08e80ede6b6e..dac8f54b45a2 100644
> --- a/lib/libc/gen/gen-compat.h
> +++ b/lib/libc/gen/gen-compat.h
> @@ -52,4 +52,6 @@ int	freebsd11_getmntinfo(struct freebsd11_statfs **, int);
>   char	*freebsd11_devname(__uint32_t dev, __mode_t type);
>   char	*freebsd11_devname_r(__uint32_t dev, __mode_t type, char *buf, int len);
>   
> +int	freebsd14_setgroups(int gidsize, const __gid_t *gidset);
> +
>   #endif /* _GEN_COMPAT_H_ */
> diff --git a/lib/libc/gen/initgroups.3 b/lib/libc/gen/initgroups.3
> index 03bd07494fc9..4f538fb180ec 100644
> --- a/lib/libc/gen/initgroups.3
> +++ b/lib/libc/gen/initgroups.3
> @@ -1,5 +1,13 @@
> +.\"-
> +.\" SPDX-License-Identifier: BSD-3-Clause
> +.\"
>   .\" Copyright (c) 1983, 1991, 1993
>   .\"	The Regents of the University of California.  All rights reserved.
> +.\" Copyright (c) 2025 The FreeBSD Foundation
> +.\"
> +.\" Portions of this documentation were written by Olivier Certner
> +.\"  at Kumacom SARL 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
> @@ -25,12 +33,12 @@
>   .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
>   .\" SUCH DAMAGE.
>   .\"
> -.Dd October 26, 2014
> +.Dd September 17, 2025
>   .Dt INITGROUPS 3
>   .Os
>   .Sh NAME
>   .Nm initgroups
> -.Nd initialize group access list
> +.Nd initialize supplementary groups as per the group database
>   .Sh LIBRARY
>   .Lb libc
>   .Sh SYNOPSIS
> @@ -40,19 +48,18 @@
>   .Sh DESCRIPTION
>   The
>   .Fn initgroups
> -function
> -uses the
> -.Xr getgrouplist 3
> -function to calculate the group access list for the user
> -specified in
> +function initializes the current process' supplementary groups as prescribed by
> +its arguments and the system's group database.
> +.Pp
> +It first uses the
> +.Fn getgrouplist
> +function to compute a list of groups containing the passed
> +.Fa basegid ,
> +which typically is the user's initial numerical group ID from the password
> +database, and the supplementary groups in the group database for the user named
>   .Fa name .
> -This group list is then setup for the current process using
> -.Xr setgroups 2 .
> -The
> -.Fa basegid
> -is automatically included in the groups list.
> -Typically this value is given as
> -the group number from the password file.
> +It then installs this list as the current process' supplementary groups using
> +.Fn setgroups .
>   .Sh RETURN VALUES
>   .Rv -std initgroups
>   .Sh ERRORS
> @@ -60,7 +67,7 @@ The
>   .Fn initgroups
>   function may fail and set
>   .Va errno
> -for any of the errors specified for the library function
> +to any of the errors specified for the library function
>   .Xr setgroups 2 .
>   It may also return:
>   .Bl -tag -width Er
> @@ -77,3 +84,67 @@ The
>   .Fn initgroups
>   function appeared in
>   .Bx 4.2 .
> +.Pp
> +The
> +.Fn initgroups
> +function changed semantics in
> +.Fx 15 ,
> +following that of
> +.Xr setgroups 2
> +in the same release.
> +Before that, it would also set the effective group ID to
> +.Fa basegid ,
> +and would not include the latter in the supplementary groups except before
> +.Fx 8 .
> +Its current behavior in these respects is known to be compatible with that of
> +the following systems up to the specified versions that are current at time of
> +this writing:
> +.Bl -dash -width "-" -compact
> +.It
> +Linux (up to 6.6) with the GNU libc (up to 2.42)
> +.It
> +.Nx 1.1 and greater (up to 10)
> +.It
> +.Ox (up to 7.7)
> +.It
> +Systems based on illumos (up to August 2025 sources)
> +.El
> +.Sh SECURITY CONSIDERATIONS
> +As
> +.Fa basegid
> +is typically the user's initial numerical group ID, to which the current
> +process' effective group ID is generally initialized, processes using functions
> +to change their effective group ID
> +.Pq via Xr setgid 2 or similar
> +or that are spawned from executables with the set-group-ID mode bit set will not
> +be able to relinquish the access rights deriving from being a member of
> +.Fa basegid ,
> +as these functions do not change the supplementary groups.
> +.Pp
> +This behavior is generally desirable in order to paper over the difference of
> +treatment between the effective group and supplementary ones in this situation,
> +as they are all in the end indiscriminately used in traditional UNIX
> +discretionary access checks.
> +It blends well with the practice of allocating each user its own private group,
> +as processes launched from a set-group-ID executable keep the same user and
> +consistently stay also in the same user's group.
> +Finally, it was also chosen for compatibility with other systems
> +.Po
> +see the
> +.Sx HISTORY
> +section
> +.Pc .
> +.Pp
> +This convention of including
> +.Fa basegid
> +in the supplementary groups is however only enforced by the
> +.Fn initgroups
> +function, and not by the
> +.Xr setgroups 2
> +system call, so applications expressly wanting to include in the supplementary
> +groups only those specified by the group database can themselves call
> +.Fn getgrouplist
> +and then
> +.Fn setgroups
> +on the result with the first element skipped
> +.Pq see Xr getgrouplist 3 .
> diff --git a/lib/libc/gen/initgroups.c b/lib/libc/gen/initgroups.c
> index 55f17a94fa8e..a1a7d92250e2 100644
> --- a/lib/libc/gen/initgroups.c
> +++ b/lib/libc/gen/initgroups.c
> @@ -3,6 +3,11 @@
>    *
>    * Copyright (c) 1983, 1993
>    *	The Regents of the University of California.  All rights reserved.
> + * Copyright (c) 2025 The FreeBSD Foundation
> + *
> + * Portions of this software were developed by Olivier Certner
> + *  at Kumacom SARL 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
> @@ -29,22 +34,28 @@
>    * SUCH DAMAGE.
>    */
>   
> -#include 
> +/* For __sym_compat(). */
> +#include 
>   
>   #include 
>   #include 
>   #include 
>   
> -int
> -initgroups(const char *uname, gid_t agroup)
> +/* For freebsd14_setgroups(). */
> +#include "gen-compat.h"
> +
> +static int
> +initgroups_impl(const char *uname, gid_t agroup,
> +    int (*setgroups)(int, const gid_t *))
>   {
> -	int ngroups, ret;
> -	long ngroups_max;
>   	gid_t *groups;
> +	long ngroups_max;
> +	int ngroups, ret;
>   
>   	/*
> -	 * Provide space for one group more than possible to allow
> -	 * setgroups to fail and set errno.
> +	 * Provide space for one group more than possible to allow setgroups()
> +	 * to fail and set 'errno' in case we get back more than {NGROUPS_MAX} +
> +	 * 1 groups.
>   	 */
>   	ngroups_max = sysconf(_SC_NGROUPS_MAX) + 2;
>   	groups = malloc(sizeof(*groups) * ngroups_max);
> @@ -52,8 +63,23 @@ initgroups(const char *uname, gid_t agroup)
>   		return (-1); /* malloc() set 'errno'. */
>   
>   	ngroups = (int)ngroups_max;
> -	getgrouplist(uname, agroup, groups, &ngroups);
> -	ret = setgroups(ngroups, groups);
> +	(void)getgrouplist(uname, agroup, groups, &ngroups);
> +	ret = (*setgroups)(ngroups, groups);
> +
>   	free(groups);
>   	return (ret); /* setgroups() set 'errno'. */
>   }
> +
> +int
> +initgroups(const char *uname, gid_t agroup)
> +{
> +	return (initgroups_impl(uname, agroup, setgroups));
> +}
> +
> +int
> +freebsd14_initgroups(const char *uname, gid_t agroup)
> +{
> +	return (initgroups_impl(uname, agroup, freebsd14_setgroups));
> +}
> +
> +__sym_compat(initgroups, freebsd14_initgroups, FBSD_1.0);


From nobody Tue Sep 23 15:34:27 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWPDC3Jcqz68mwX;
	Tue, 23 Sep 2025 15:34:35 +0000 (UTC)
	(envelope-from olce@freebsd.org)
Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "smtp.freebsd.org", Issuer "R13" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWPDC2jFJz3rqm;
	Tue, 23 Sep 2025 15:34:35 +0000 (UTC)
	(envelope-from olce@freebsd.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758641675;
	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=AoLaPh7G0UQaZ1rG8Uz5EXJNdYCtAOBydT8I9HgI7tc=;
	b=k8MQtnbVF3J9ZTVsHao9cyDUkUUR+kVFsSGDEUtIaxM52LsnNlGTEYCRtXqP7DNVv7SRIg
	21WpHGykx8rWGN7BnPlV+RVmcWRGtX76V1iKXuVKVsx4txFBEh/+NcMtIAvql5t92SE/iC
	W95zdPhDL3vzFNQxN8DnJsA2VO3Y/MW30fRt37U3flS4SFfuP8AWlIK0a2HEwERRN5RA/m
	LbNjbWaX6aPX7+xRxZaNol/lTQy7MTxT1R7IaTJATBz9qrTAj0NObu9XjgEtkFkWyBhykJ
	6ZoETFAIgXtH63DlJsaMO2eWr/J9jm/tyvYDNx1cy6/cn6KRJ/jzjKBkJk08Nw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758641675;
	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=AoLaPh7G0UQaZ1rG8Uz5EXJNdYCtAOBydT8I9HgI7tc=;
	b=R1h4PJ+QuOt3fxMCokixelN9QVUshRxel/KirsiZJObPaEiiMVT1vSO+bcIS7LXcD1uBS2
	OU11ZmvXw+z8RXh1s62oZrLasnNgxoZRDHh12RhbadOE1SX5fm4B3yMMYqJEEcIO2xeVF7
	/kFGcYSIGXpu+ZRhqtxjGA5leD0lvUGc1L8HUNUtSfAef924zFnSvrDt9d34QMQFfFYN1O
	YldVqsIoFUaJHazD/TPmZbRsp7cbvpMjj8MPrsx4vLTyDpnDVBDqQjl5UfZJqjx5OQ2Dhv
	DbYCnzjJcPkCSwZwSZVj7UDD0tFht47dLyBz6Ep2SPelLyYmo7/xsPNeWRUdVA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758641675; a=rsa-sha256; cv=none;
	b=QD4311ft5JW5fQIjiLnnwA0wg/69Po+F49YaxFNvYuNvT7nKzfTcLFUkR1ZfvjneXphPN3
	f+Ma2YW9mFGPApetiL8B+uKpFfF7va6hoYWa8by6LrlK0LMB5tBr1mu4YhE6WfZ9UxFPYe
	svIlFeFUddG8ydDWhlRhPefb8qUm6MX+NkoIjPCzo4b9o+V4WGhLHVnhyZjPk+AZ5fKBol
	kia0xG/05RetERnkF69+VXBuo4ry4PCYfKX/6bNx48hBZ3E1lC+Nr9bIGaDOnLoGYnX5zN
	Ioni+RltfGPV7gf2T1iAa8my0S+YLe0DklfF2R/C2X++Ea9qmpcOQphOEvJvZQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from francois.localnet (92-184-100-103.mobile.fr.orangecustomers.net [92.184.100.103])
	(using TLSv1.3 with cipher TLS_AES_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: olce/mail)
	by smtp.freebsd.org (Postfix) with ESMTPSA id 4cWPDB4D0Jz1R3F;
	Tue, 23 Sep 2025 15:34:34 +0000 (UTC)
	(envelope-from olce@freebsd.org)
From: Olivier Certner 
To: Kyle Evans 
Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org,
 dev-commits-src-branches@freebsd.org
Subject:
 Re: git: 8878569103a3 - stable/15 - initgroups(3): Add a
 pre-FreeBSD-15-compatible version
Date: Tue, 23 Sep 2025 17:34:27 +0200
Message-ID: <3078913.slGk94SIus@francois>
Organization: FreeBSD
In-Reply-To: <8f835667-5d3c-4972-a6ee-0a2d4f20269e@FreeBSD.org>
References:
 <202509231203.58NC3lOg008905@gitrepo.freebsd.org>
 <8f835667-5d3c-4972-a6ee-0a2d4f20269e@FreeBSD.org>
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart3131195.hHqAuc6tWs";
 micalg="pgp-sha384"; protocol="application/pgp-signature"

--nextPart3131195.hHqAuc6tWs
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="utf-8"; protected-headers="v1"
From: Olivier Certner 
To: Kyle Evans 
Date: Tue, 23 Sep 2025 17:34:27 +0200
Message-ID: <3078913.slGk94SIus@francois>
Organization: FreeBSD
In-Reply-To: <8f835667-5d3c-4972-a6ee-0a2d4f20269e@FreeBSD.org>
MIME-Version: 1.0

> This one should not have been MFC'd without the follow-up that fixes initgroups@FBSD_1.0,
> please back it out or MFC the fix ASAP- it doesn't make any sense to leave stable/15 broken
> like this when we knew there was a problem.

I forgot to MFC the follow-up, will do it shortly.

Thanks.

-- 
Olivier Certner
--nextPart3131195.hHqAuc6tWs
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.
Content-Transfer-Encoding: 7Bit

-----BEGIN PGP SIGNATURE-----

iQIzBAABCQAdFiEEmNCxHjkosai0LYIujKEwQJceJicFAmjSvgMACgkQjKEwQJce
JicIEQ//fcJWSfGg8jQBYPJtIiQTFzn8NRi1UNLwlio7Nkd5peZqJ/h6WkyCTf1j
v4JO8J00EqvS1OfqmnKwV2aIV6isq08Ns6oSjNHWVTLEI8aWMvb8b0TkU46v3OGv
ClYgGoef1TUtvucnPNGphUlrbTO2EchPDhe3TlT6SzDJFlxe9GWGf/yWn0GkQTNX
4S4qXmAiVMsJodxq/WowZnmGP3hx/oERbSiYxFCjuLzBn9EXXUmnz7kAfGv5ugeS
NQQioVldpFxsaYIJWqCOOHekZ/2/eh8NhGefsckKcLvOp+APbuwQaCX66JOb5J4O
hdamigWpggSEHSZY92DSmovGe5l6eXYOYlS3D6FG4h6qhkuShwXqU+OUA4NK1XU5
wEL0lKXpuQDy32cvzaD/4yFAZ0bvwbMEwiBwjIlMF8Bv8OmFEgrIjlcCoK7r3TnN
VtHoiRvgUL9/TsoZFbQpODpvUHLAEtPwUfCyBXhUzubJslPpDYw0qcCcX6wpwXYq
4YLi4r04xu0GOJuO8ycRRiDI+kF4Zd2F89sykF1p+vNEvdGqfQymKJHzLVqRKjYZ
Vwg3lufSrQIVqA+GRX3s9nj00+Nxg+PP4r0+4ggY1jxBn4JP9PIiA6wDfeE/UisU
mlKDOzGYJ5IEHl9XEtUfpkNMZYo6AXbN069P0hQ3TNgVxJsmB38=
=IgH1
-----END PGP SIGNATURE-----

--nextPart3131195.hHqAuc6tWs--




From nobody Tue Sep 23 15:51:08 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWPbK1czfz68np6;
	Tue, 23 Sep 2025 15:51:09 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWPbK0cJBz3tdy;
	Tue, 23 Sep 2025 15:51:09 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758642669;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=9R0JWt1J98n5ZhanZDhTnde92YOoAhtUHhKlbGM8rls=;
	b=k9z6/YsqmCRR9t/QNN3Lgjep/nKiP/zMCy/wbu7MpsGTWWWSqOjCDAg2z75YdMQrlNX025
	y/RHz7WSdMlaFSJ4RIBEHyUGjxlzyS4lcENYGm7PYuo+KAyOhlRIexXXBovldw4X7/SzzN
	RGQfMY11gK/1hDa/knaF7wQgHOgwpJbYvRR+5FFcvRFm0n69PnX2OblWV0/44E0DXOVDcZ
	gaP00hbC5PApf9d4AFVk6UZnKfF6ghpgiLsDyRuSX5dgQzIfdQB4YjvBzIz+cN7pauTu9E
	1kvsqwcFRck/fgjG3Y+tdfR9ZEyblKHP8erWGRycwQmeECG3/EIoaUPDWxjAkQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758642669;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=9R0JWt1J98n5ZhanZDhTnde92YOoAhtUHhKlbGM8rls=;
	b=ykbRf/EfX5C9mlDGzusajMxCQ40uTVahf5B6wgOm6E2yc/QMdD9CMNHJd9xhC3Vb09OWA8
	TwjfHO18LxrezEoGt9Qt5QOehvOircdFxksHpQQZwOhcB0pjemiq6YlqluNLI/YOnucm5O
	QyMmC1qpr0SKLGWIHHFDKfvObhmDTJmh4joa7HEx6lb/zQHmUg4CuuaJ8usmWX5+fy5skJ
	/h+mD75kqCQ5BhUJA60F1D4dtybCQl2Rou6FpkKlUDk9XZNdqWKnM70HFhGMLDISNKSf5r
	8/+B3GQoS5St/icEpwVGqugl8eOfMWvrDGOLDEN0IlWx0OhqCZsG/SK/f62RoA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758642669; a=rsa-sha256; cv=none;
	b=Dq8iNgQM0M7y/FQ37X9Tg+LJx77wCNm52kFGKWEUONhpWKHv/ebFqvTecimXxj/BF7JDAV
	M+cpqO12M+b89gBdHxupTu6RnC8kLUPQIWp/JnJSOltCvhQ4kjMIzzSWSUi3VaEVF9VG8K
	pd+MQxXhFnF0aDzD3Xp25bzuia7voFaDTNRLxN3k0+2upPPONPqe2HU38FnE/YNVvfu+9W
	NJDWGWkPj8wF4So67jLPKnix8Mcoz0vaNMxLyIDfPvSWtIqrJVhWGCgTYcxM0IHeqvQmhd
	8ZV4vbaDA42XVwxtJXunKAWuAgHQhMZkCAGMYjj+yYYYkRu1dQo8TCeHD9LJvQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWPbK04HtzsX4;
	Tue, 23 Sep 2025 15:51:09 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NFp8Dx034409;
	Tue, 23 Sep 2025 15:51:08 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NFp8Ut034406;
	Tue, 23 Sep 2025 15:51:08 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 15:51:08 GMT
Message-Id: <202509231551.58NFp8Ut034406@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Olivier Certner 
Subject: git: cb72d028438f - stable/15 - libc: properly reference
  setgroups@FBSD_1.0 in initgroups@FBSD_1.0
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/stable/15
X-Git-Reftype: branch
X-Git-Commit: cb72d028438fe7e9c0ac76fe7da996b88fef6ed1
Auto-Submitted: auto-generated

The branch stable/15 has been updated by olce:

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

commit cb72d028438fe7e9c0ac76fe7da996b88fef6ed1
Author:     Konstantin Belousov 
AuthorDate: 2025-09-20 23:50:47 +0000
Commit:     Olivier Certner 
CommitDate: 2025-09-23 15:50:33 +0000

    libc: properly reference setgroups@FBSD_1.0 in initgroups@FBSD_1.0
    
    by forwarding the reference to libsys syscall symbol, for the libc.so
    case.
    
    Reviewed and tested by: kevans
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D52672
    
    (cherry picked from commit f72908c94df9a256422790d4e2a60c9c33a35f2d)
---
 lib/libc/gen/gen-compat.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/libc/gen/gen-compat.h b/lib/libc/gen/gen-compat.h
index dac8f54b45a2..74678301af6f 100644
--- a/lib/libc/gen/gen-compat.h
+++ b/lib/libc/gen/gen-compat.h
@@ -52,6 +52,12 @@ int	freebsd11_getmntinfo(struct freebsd11_statfs **, int);
 char	*freebsd11_devname(__uint32_t dev, __mode_t type);
 char	*freebsd11_devname_r(__uint32_t dev, __mode_t type, char *buf, int len);
 
-int	freebsd14_setgroups(int gidsize, const __gid_t *gidset);
+#define	F14SG	int freebsd14_setgroups(int gidsize, const __gid_t *gidset)
+#ifdef PIC
+static F14SG __attribute__((__weakref__("setgroups@FBSD_1.0")));
+#else
+F14SG;
+#endif
+#undef F14SG
 
 #endif /* _GEN_COMPAT_H_ */

From nobody Tue Sep 23 15:55:46 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWPhm209Mz68nyB;
	Tue, 23 Sep 2025 15:55:52 +0000 (UTC)
	(envelope-from kevans@FreeBSD.org)
Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "smtp.freebsd.org", Issuer "R13" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWPhm1GMPz3vll;
	Tue, 23 Sep 2025 15:55:52 +0000 (UTC)
	(envelope-from kevans@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758642952;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=59lbwcwcXLt3DOneaADSzHmWtw4AoB4qcBzc/gQWTeo=;
	b=QkO7hHqLraW4XeTQUSB/BaEH1Nw16b/08EY325Tf0082Hzi7p441tzzO2dwvcu/dshwmod
	w6RH7YCaOHIyf/QyjqwbHq/iMVjsBZyCUedIlhwbmdI0/yiuVEnvuLDDYQZ4WHglUlXpnj
	3TQa3vzGtiShhSR6QSQG15YJ9+P7ML98JXLQE6+oWJ84oox+UiXflzB71QTD+3Ky/6BUVO
	D94jg1igfBPApEDoAlj3E4Fzz6nTqXEAMTxyiXxAQNi4ul+1I0rFns/3tBzwih+dzOmDqh
	iqFb8Npw3qFpTcsViQg9NNdn4oTTNYHmADkQ31JmSJeMTlZ6k77JsFumpHKV+Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758642952;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=59lbwcwcXLt3DOneaADSzHmWtw4AoB4qcBzc/gQWTeo=;
	b=KSC9W1lQhIwVTpOmvL5idu1Q+9Nu/9eTLphJ3uoh3xtjXUq+fq9dEC3HW4Oqj0x3QpwC/5
	eqNuJXayAIudpihNBYcdUGZxj1iLBqb/FnwCUa/31t9sk92Lxyey4r3hQnUvAL2UV78+5I
	jn90GUY+l1wphvWJpWLjkhDRdGMpNR4Qp8l0GvV93a0BISKFP3O0uCkE7wmu1zbJkbVrR1
	xq6in/U03C0yGzwfID8n6+iPWPziKD+vYM8GhEycragrxzPf/ZsVJdgNv8YwgWHA8SDqPV
	a1U491Qf3+2mvBjPxdfaJ3sDdlQne86poR7qMiPTy9p0dpOg4T8XuLpAEgE5/A==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758642952; a=rsa-sha256; cv=none;
	b=X7aygmUmOJHwn55A822aD4NOrb8nbcFH1jTKvCmACCx5JeV3L5H4J0yx4jdwLIwVBM2U1D
	6JzLDrzzmmOFpoIMe4njsRlTuPE/CFgGWcvsDvrEUuyWR+Zjs21AoeA3yQYJSXTen7vrWG
	ZiluEzt6VT/3ck9oz4UWHf6VwTIEn2Cb8b9/2z5ia6XQJlJ92SBrXKIeBuj7QrdTNm7Vpq
	Rj2WNHpymqwmRcg/2P/56hi4Ko/p3hHNayRPYUsc4EzAYuB0uJ0KWbxaj7AW8w3WCI7S5E
	Uwf+B8uliJWzyuW48trWbNihLB/rVfl4uN73o7kVEtA59i2zkVCI9NLsvwTNyQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from [10.9.4.95] (unknown [209.182.120.176])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(Client did not present a certificate)
	(Authenticated sender: kevans/mail)
	by smtp.freebsd.org (Postfix) with ESMTPSA id 4cWPhl5Kz0z1QQD;
	Tue, 23 Sep 2025 15:55:51 +0000 (UTC)
	(envelope-from kevans@FreeBSD.org)
Message-ID: <1d72da0e-0ded-42d6-a823-60f6ddbc65d1@FreeBSD.org>
Date: Tue, 23 Sep 2025 10:55:46 -0500
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: git: 8878569103a3 - stable/15 - initgroups(3): Add a
 pre-FreeBSD-15-compatible version
To: Olivier Certner 
Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org,
 dev-commits-src-branches@freebsd.org
References: <202509231203.58NC3lOg008905@gitrepo.freebsd.org>
 <8f835667-5d3c-4972-a6ee-0a2d4f20269e@FreeBSD.org>
 <3078913.slGk94SIus@francois>
Content-Language: en-US
From: Kyle Evans 
In-Reply-To: <3078913.slGk94SIus@francois>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

On 9/23/25 10:34, Olivier Certner wrote:
>> This one should not have been MFC'd without the follow-up that fixes initgroups@FBSD_1.0,
>> please back it out or MFC the fix ASAP- it doesn't make any sense to leave stable/15 broken
>> like this when we knew there was a problem.
> 
> I forgot to MFC the follow-up, will do it shortly.
> 
> Thanks.
> 

Thanks!

From nobody Tue Sep 23 17:18:45 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWRXQ0x4gz68tw6;
	Tue, 23 Sep 2025 17: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
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWRXQ0MtKz3Cm4;
	Tue, 23 Sep 2025 17: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=1758647926;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=h4WYfqd5HNUnkAo2NTKdYuVgrZoHGjuhxPYEKp0+Vvc=;
	b=EBu782JT2dyKEbXcBtkn6MXrgnUhwE89U8GE5z54cQqQYXT7fty0A1ZjUueDBrV3b3WbTY
	bCGvHOKMIExZrYmr89vNhp3ybMaFf8gI3va8iPVUqI5lgiejKVbNtH/rcGzDpdOvP7oFaG
	CeqzJtWqDf5TYZ0y9pBAZX4xwZfDnTWaMjjSb+uVZi7mFvOD1HvHa+3HpsL98hhZmaq7/Q
	UoMRP0J2URrDj4i8ac2IHiqFBnr9ES7IwR0bDJ0UEfYHzhHZGZHPqkn/eW6KlEUT34D+gS
	6tB0x+RobTJOjYx5qUZcqg5kXI0jEgVHJLQejllH582veib3lna1kY8s5go9vQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758647926;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=h4WYfqd5HNUnkAo2NTKdYuVgrZoHGjuhxPYEKp0+Vvc=;
	b=PpOS2BuTDr7QLV4IM40fTT0n+Gp83oOciZ+z4h5Zl4cj9WESV4uNI1/ZuQJkuNceRf+Odc
	n/Qykmg9dLo+9TkI19Y610lWTgW6qA+NTHZlZ0k7uz1xmyHRmRVYG4HxluqOlXhVT9sm5I
	7ZLsA8lQ9M/SSG7D0O+6vCu5D0IHA2eA6RkqRKuVHZL6BdBZp22gUWRdtd0s0BdFp6aXE3
	nYlnsvfLNOYvLzmPfWwmmt17vHMXWDEHhzqbDVvt3pfaeUtH8SSKpoiyfK9rAzc++ZqMeJ
	vu6ljxs7+8dYvmsDEBS/4gUnW9KFxsNhGewibZr+7KzbOHzIwqeAh7og8/Eg+w==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758647926; a=rsa-sha256; cv=none;
	b=OaH0ZrOPndN4d7k5djbxJw/7QW7Ymr+obxMNDxfbtJkq3y7RxziHNX2ynkt+f6ajMtJpzT
	Xg+fsQojzvpllthL46xwcrgCy9enowvmTyU1lTiiYFLU4y6WJlhjME9aSaW4hxlthPxUTG
	lk+p2vlhHc2Na7oIpjWayxLeY9TNK46+zHSnEjUgaye2Ga8YVt2qL1D/XozXKCEPW76PfZ
	VORrSl3oUl9a9aJg8MPOkgEUXYubJYnHWzYthJUyyqoZ7DsNrtK4MlnkRNnB76H3ehJ+8y
	RFPoUDIvBG2l7jMQQOGEPvZobaOmUtxiIa67cJlhbMfwKdijraYMpUsOr1tjLA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWRXP6n3Bzvb3;
	Tue, 23 Sep 2025 17:18:45 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NHIjAL095737;
	Tue, 23 Sep 2025 17:18:45 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NHIjYw095734;
	Tue, 23 Sep 2025 17:18:45 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 17:18:45 GMT
Message-Id: <202509231718.58NHIjYw095734@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: ShengYi Hung 
Subject: git: c4f9b0df3fa7 - stable/15 - snd_hda: Add patch for
  Framework 16 AMD Ryzen AI 300 Series
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: aokblast
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: c4f9b0df3fa70f5a0414dde1518f764399ac5229
Auto-Submitted: auto-generated

The branch stable/15 has been updated by aokblast:

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

commit c4f9b0df3fa70f5a0414dde1518f764399ac5229
Author:     ShengYi Hung 
AuthorDate: 2025-09-08 11:15:14 +0000
Commit:     ShengYi Hung 
CommitDate: 2023-01-01 23:29:21 +0000

    snd_hda: Add patch for Framework 16 AMD Ryzen AI 300 Series
    
    The new Framework 16 with ALC285 exhibits the same issue as the previous
    model. Therefore, we apply the same fix to the new model.
    
    Reviewed by:    emaste, Daniel Schaefer 
    Approved by:    lwhsu (mentor)
    Sponsored by:   The FreeBSD Foundation
    Sponsored by:   Framework Computer Inc
    Differential Revision: https://reviews.freebsd.org/D52423
    
    (cherry picked from commit 7f81b2519aebcf90d7e027122ca99b628ca81ed9)
---
 sys/dev/sound/pci/hda/hdaa_patches.c | 6 ++++--
 sys/dev/sound/pci/hda/hdac.h         | 1 +
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/sys/dev/sound/pci/hda/hdaa_patches.c b/sys/dev/sound/pci/hda/hdaa_patches.c
index 8967cb49125c..91bb244578c7 100644
--- a/sys/dev/sound/pci/hda/hdaa_patches.c
+++ b/sys/dev/sound/pci/hda/hdaa_patches.c
@@ -362,8 +362,10 @@ hdac_pin_patch(struct hdaa_widget *w)
 			patch_str = "as=3 seq=15 color=Black loc=Left";
 			break;
 		}
-	} else if (id == HDA_CODEC_ALC295 &&
-	    subid == FRAMEWORK_LAPTOP_0005_SUBVENDOR) {
+	} else if ((id == HDA_CODEC_ALC295 &&
+	    subid == FRAMEWORK_LAPTOP_0005_SUBVENDOR) ||
+	    (id == HDA_CODEC_ALC285 &&
+	    subid == FRAMEWORK_LAPTOP_000D_SUBVENDOR)) {
 		switch (nid) {
 		case 20:
 			/*
diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h
index 223434a214b1..ff3a1d0dcfb5 100644
--- a/sys/dev/sound/pci/hda/hdac.h
+++ b/sys/dev/sound/pci/hda/hdac.h
@@ -535,6 +535,7 @@
 #define FRAMEWORK_LAPTOP_0003_SUBVENDOR HDA_MODEL_CONSTRUCT(FRAMEWORK, 0x0003)
 #define FRAMEWORK_LAPTOP_0005_SUBVENDOR HDA_MODEL_CONSTRUCT(FRAMEWORK, 0x0005)
 #define FRAMEWORK_LAPTOP_0006_SUBVENDOR HDA_MODEL_CONSTRUCT(FRAMEWORK, 0x0006)
+#define FRAMEWORK_LAPTOP_000D_SUBVENDOR HDA_MODEL_CONSTRUCT(FRAMEWORK, 0x000d)
 
 /* All codecs you can eat... */
 #define HDA_CODEC_CONSTRUCT(vendor, id) \

From nobody Tue Sep 23 17:18:46 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWRXR2tDnz68thS;
	Tue, 23 Sep 2025 17: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
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWRXR0mYKz3Cm5;
	Tue, 23 Sep 2025 17: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=1758647927;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=kFr9VsygDwB/MD3qSFTAU7j4EFaFf19qQ24ShmwHvOw=;
	b=nBcB5lshcMnIV+te47GQWAf7tWKluuL79EkaunnBB+LWJKH0ISga9gicVXVTz1XlWjEpiO
	VMG0XPR4owOwzk0yPJ6/Kg3tT18Cl/eEXy2WZ/vNH/sr6DgMrrfmFMhjP+HBjV4B7EFHSf
	s1dAX8NGpus9iTG6S33oBxgyrw77b03yhdxa7vKQduf7df5Wf9p5ji2nr+MVJmVArqFJKC
	eik41/PR+zb6uy887gX0q0pyCQ06sJc/4vC4ejv0vZqfbMnS76Rrb9wzfHC9KAWFphZaxW
	loxl/UdELmrvTsHOwg9Fjv8P01lyOm7oPjdpKOTpKM2WUaQ8hG8GQVhquNvIwQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758647927;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=kFr9VsygDwB/MD3qSFTAU7j4EFaFf19qQ24ShmwHvOw=;
	b=mjstuo45fd09GFwAySur5UXoT7hDbEGl6HxhL1rO39gVN6Yy1Q5TXGbDYiLAMXhLb91vG9
	0IuJGVhGiuPxy+LmFR6m1gDU115JeTMYq612eG2q4sA3E5U0J1JHL8Bt7h0Y63IXFtXJ0B
	rSxWJ/4/Is+A0xnXHOHz4BMfEWa08W3gom7Ki5bwtZkGCdnwgygKQLZ4NDdPbSzVfWONcK
	9GsQw7l9iJKadTTgNiWUoAVYmSYFxp4LjDqZ5p9pQ7Y6cipFg1uVWicibaSep/nroVuo+g
	/5LXkizbjbRRKmrWAFFqH96c8FolHOn9XaVQLZiPDx0oF+NOlPZ+vh38Ujwa9w==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758647927; a=rsa-sha256; cv=none;
	b=XuRC0wbuWzYV/5v+p/56kt+65myWruqPzmDKwSWkJwkQv2NTWm3FOytvzh7oMLv1HQjDm3
	XqTxmRBmykgO6Fs7RxhVJZKZ2xUbnXBdZIJWaQKYB+iDcUv4ey4kb/XpH0JiF5iF9k2/lm
	GgfD0RKbMLtoOxFR2z4vyOpNzdiK4y7U0+/hBmOoD+vpvG+R/CHPhRy1hZC3ZhnI8MIzgY
	0jKu5I/ZlQTsRu77LxGnkNgNm/7g8PSM7f0K48i2+omChxdudK/iNV5lThVYfYe9em3Se6
	dmteoONCHzyalwXzoU3AP69h8fJFEP7Qx2EJrDUecA5iFM01rOfF0tPxtHQl5Q==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWRXR0LFZzvdB;
	Tue, 23 Sep 2025 17:18:47 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NHIkZR095771;
	Tue, 23 Sep 2025 17:18:46 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NHIkAL095768;
	Tue, 23 Sep 2025 17:18:46 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 17:18:46 GMT
Message-Id: <202509231718.58NHIkAL095768@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: ShengYi Hung 
Subject: git: 60b0c7e66fee - stable/15 - ichwd: address unused
  function warning by marking as __unused
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: aokblast
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 60b0c7e66fee4b205583dfb62b02e257c0214084
Auto-Submitted: auto-generated

The branch stable/15 has been updated by aokblast:

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

commit 60b0c7e66fee4b205583dfb62b02e257c0214084
Author:     ShengYi Hung 
AuthorDate: 2025-09-10 16:33:33 +0000
Commit:     ShengYi Hung 
CommitDate: 2023-01-01 23:29:28 +0000

    ichwd: address unused function warning by marking as __unused
    
    Reported by:    markj, bz
    Approved by:    markj (mentor)
    Fixes:  2b74ff5fceb6 ("ichwd: introduce i6300esbwd watch dog driver")
    Differential Revision: https://reviews.freebsd.org/D52476
    
    (cherry picked from commit 3449a3abab892a0a1124ee4edbc10d6d28b87af3)
---
 sys/dev/ichwd/i6300esbwd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/ichwd/i6300esbwd.c b/sys/dev/ichwd/i6300esbwd.c
index d95aeb53c3f5..03d504a350aa 100644
--- a/sys/dev/ichwd/i6300esbwd.c
+++ b/sys/dev/ichwd/i6300esbwd.c
@@ -45,7 +45,7 @@ static const struct i6300esbwd_pci_id {
 	{ DEVICEID_6300ESB_2, "6300ESB Watchdog Timer" },
 };
 
-static uint16_t
+static uint16_t __unused
 i6300esbwd_cfg_read(struct i6300esbwd_softc *sc)
 {
 	return (pci_read_config(sc->dev, WDT_CONFIG_REG, 2));

From nobody Tue Sep 23 18:05:56 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWSZr428Lz67jD3;
	Tue, 23 Sep 2025 18:05:56 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWSZr3NN8z3Hwt;
	Tue, 23 Sep 2025 18:05:56 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758650756;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Gy2WPAeOPQLktxKfAlf6MPcz4QaqeZB6KcHXLvXb2k4=;
	b=RT9bOoTMjVOP54uzW4O6KRwgz+oOxe9ZHnYiHspiFL5uun6X5Sebymjxu8qJQ5o6qvRVYR
	GLvcRBK1gh0pijwTVU75muEj52oWX6x17NA4vLPBa0E7HyAx6pg4ltNsHHdrxFhlbsEY88
	/L7irJl0+Sa7TTbn5vJpl/4JTQ4+xGFK4R+foZl2qxxaguIUsMQ7PtTQ5lvlcra5G20o0U
	L8RuXeI/Kqg2zjvcyxxLkAM9BmioXiI7ogDJo4nZ+20NHebRCCbS8a826aM6MkwR1S2Cbw
	TlR93V1Jp/4ltftCPtJck9ssI6kGUjvTKZTXLiE68yGBPdJLpOgdJpyc2U4fGA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758650756;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Gy2WPAeOPQLktxKfAlf6MPcz4QaqeZB6KcHXLvXb2k4=;
	b=I49ML14Z6gj91ncV0UjIDhdH72o+uz1Mp3yozdPYNNPnJHCheM37+XISKqkkKYUpjWH5YX
	nceUXl4zmF6JVQK9Q12rev/klaDQoJBSunx88pE/xy4tYet3Xbc8T3BPXFqu9SPvrQ0P+z
	0O9TxuMe0PWLNN5kqwmL8iMuXEnZQw+BmQHy8ItuNY3jLvPVqwZQ7MW4fWhNG7UdnUmwv4
	SJxjpDdet4JjvGiBj/i64sJ1R3+rKsy9JI8GKkZFkkWfCUIV66jIKYlcaxDnZK3at1C+0P
	1rz8m/iP9AEWhceGuYnenKBleKm24+IcAzUppEspSRzsmYhNcW6wW+Mk7gxZqw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758650756; a=rsa-sha256; cv=none;
	b=jlLTYl2Wv9NwY3xWUnPFJk8UPNcXJiD7TPaJsJN2Q5UuwbAxnfwwm7gcx1iODBVUbZuXPf
	WzeeCfqcWQyzRelMi6Hm1thFUcj1jYWqMjhDDmgep/fGJuKvsgsaUP/aGauV9F8nB9mzLu
	/prFkxSbZrU+YfEF6Im+CD6PwkbsZ6YPY11Gbsx6u9APnFAXZutoeljeSBDZ+1VOWQggNW
	z/h+loJX0BWYwSW4HU0kMTul1cr3edeiJAP0zomgoiXRAXnILXGeyHJEK7yJF7wplkEGVS
	kOGOy2xzWo3xfF/wvaxAiZsuwVz9mGX/jv78iJg/Y21shVQaqm1zd7Qj54Vf7g==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWSZr2h1wzwjd;
	Tue, 23 Sep 2025 18:05:56 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NI5uKS089899;
	Tue, 23 Sep 2025 18:05:56 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NI5uNJ089896;
	Tue, 23 Sep 2025 18:05:56 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 18:05:56 GMT
Message-Id: <202509231805.58NI5uNJ089896@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Alexander Ziaee 
Subject: git: f3fa449dc88a - stable/15 - vnet.9: Rename vnet.9/vimage.9
  to VNET.9/VIMAGE.9
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ziaee
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: f3fa449dc88ae3a3190273b8b651af571ff07244
Auto-Submitted: auto-generated

The branch stable/15 has been updated by ziaee:

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

commit f3fa449dc88ae3a3190273b8b651af571ff07244
Author:     Quentin Thébault 
AuthorDate: 2025-09-16 02:38:18 +0000
Commit:     Alexander Ziaee 
CommitDate: 2025-09-23 18:02:14 +0000

    vnet.9: Rename vnet.9/vimage.9 to VNET.9/VIMAGE.9
    
    Fix crossreferences to VNET(9) by correcting it's capitalization.
    
    MFC after:      3 days
    Reviewed by:    enji, ziaee
    Closes:         https://github.com/freebsd/freebsd-src/pull/1848
    
    (cherry picked from commit 3049b2f5115b3b4aed202274e866f360fa2560d1)
---
 contrib/kyua/doc/kyuafile.5.in    | 2 +-
 share/man/man9/Makefile           | 4 ++--
 share/man/man9/{vnet.9 => VNET.9} | 0
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/contrib/kyua/doc/kyuafile.5.in b/contrib/kyua/doc/kyuafile.5.in
index 43f00816d407..a9106e95d790 100644
--- a/contrib/kyua/doc/kyuafile.5.in
+++ b/contrib/kyua/doc/kyuafile.5.in
@@ -485,7 +485,7 @@ plain_test_program{name='the_test',
 .Ss FreeBSD jail execution environment
 The following example configures the test to be run within a temporary jail
 with
-.Xr vnet 9
+.Xr VNET 9
 support and the permission to create raw sockets:
 .Bd -literal -offset indent
 syntax(2)
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile
index 30f41073bcbf..fe764e7c4ed7 100644
--- a/share/man/man9/Makefile
+++ b/share/man/man9/Makefile
@@ -417,7 +417,7 @@ MAN=	accept_filter.9 \
 	vn_deallocate.9 \
 	vn_fullpath.9 \
 	vn_isdisk.9 \
-	vnet.9 \
+	VNET.9 \
 	vnode.9 \
 	vnode_pager_setsize.9 \
 	vnode_pager_purge_range.9 \
@@ -2474,7 +2474,7 @@ MLINKS+=VOP_OPENCLOSE.9 VOP_CLOSE.9 \
 MLINKS+=VOP_RDWR.9 VOP_READ.9 \
 	VOP_RDWR.9 VOP_WRITE.9
 MLINKS+=VOP_REMOVE.9 VOP_RMDIR.9
-MLINKS+=vnet.9 vimage.9
+MLINKS+=VNET.9 VIMAGE.9
 MLINKS+=vref.9 VREF.9 \
 	vref.9 vrefl.9
 MLINKS+=vrele.9 vput.9 \
diff --git a/share/man/man9/vnet.9 b/share/man/man9/VNET.9
similarity index 100%
rename from share/man/man9/vnet.9
rename to share/man/man9/VNET.9

From nobody Tue Sep 23 18:05:57 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWSZs4vmRz67jD4;
	Tue, 23 Sep 2025 18:05:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWSZs355Lz3HX1;
	Tue, 23 Sep 2025 18:05:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758650757;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=H0a9BvqP8Va7hn5NAG6/Ly32QkuXguFoDIzSTvCRC4Q=;
	b=iahV4iOhEaUl6+lOADLwCFua8MkliD+pxuYFwokds62GiXkuIJzD+1wIETP6bJ83pGaLzf
	iWxpSvJ0jtJ0Mt+9MInNGT6NxqbMDulPOIzvJT3c0maMOZxef11GtBBzQgG+zNS6GTl94X
	eFM97aZqJx1qAlNvpbiNpqUgvfGvRiDwXycE1v7iKMwHZrJLeoaauH+EGhg6/z4MUow5d3
	hofdt5MIzbuwCeKawVlouIsfILykmhsdrxuVvi/qKmG0isWNTEo39CPeAEqf/s+bz++pX1
	1GZ+HwHJ3X3pULWoiTivyYK9zrIjyW+pta9xES69CbqYDorc4oaFm1QcA7d9RQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758650757;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=H0a9BvqP8Va7hn5NAG6/Ly32QkuXguFoDIzSTvCRC4Q=;
	b=Y/OCDRpKsl+2dOZyvpzW947myt8SVShRMmrBN+H86TuQEhSgnPcwdX7pT16iTGqBkekxw1
	lTcd1Xg5kIMrnfRjhmOahguOjsm6SBmA+7RvWtc5rEI+oftBEYGBDQl/BL4wM+SNx+UdAR
	WmEpHncbHNJBaKkcHqXSuJ5yInsSRckzq7hJ5RzrAe7osXX1UzGZinY+j0kLz3jvT2sMU7
	xHlj8Afs7eKZBuBiLZIvQ6/sBniCIis6JlOfTVqeAeZNtcOhdIdkIX08cQxWVEt044G0Yr
	NliYuWPIn5eKX4asZL4Ttdp+O1/4rmc7KHHoyBHFzQOyLm7qd/U+AxQJSFAEQQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758650757; a=rsa-sha256; cv=none;
	b=KTtpbbCBnLU5rucN/X/j8B3S6U+iy4uC97hYhUQG6DjqDJxxKxeUsg12g0rU721onF3piw
	C2VXXBjfLlviTIytySjTFvStDKxFVu+dj+FffvVmNZ7/oBm31fCjrcdpvjglbqdREudIDT
	3+DE9CEQRqL6X6o7p08BirSQhUlcNGfqEL+D+zlLhN8To01tnn9A8hwRncHVUSxvIbHCgM
	g1TbGTviQfGUh9pDMZhDmJ//YTQfblh7ru29SSDFcw2h0LkspbfXvdC8XPDou8loenOdaS
	l9QW4CxFfDSH8zdF5IPJRXXZrV9xFs+WoNKQbIMQEApiVCVd1utRlxKxKkVlgQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWSZs2g50zwm2;
	Tue, 23 Sep 2025 18:05:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NI5vcj089934;
	Tue, 23 Sep 2025 18:05:57 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NI5vsi089931;
	Tue, 23 Sep 2025 18:05:57 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 18:05:57 GMT
Message-Id: <202509231805.58NI5vsi089931@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Alexander Ziaee 
Subject: git: c0f829e0f479 - stable/15 - ObsoleteFiles: Remove the
  miscapitalized vnet.9
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ziaee
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: c0f829e0f479874702054674a53b632c5212eb25
Auto-Submitted: auto-generated

The branch stable/15 has been updated by ziaee:

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

commit c0f829e0f479874702054674a53b632c5212eb25
Author:     Alexander Ziaee 
AuthorDate: 2025-09-17 15:54:13 +0000
Commit:     Alexander Ziaee 
CommitDate: 2025-09-23 18:02:17 +0000

    ObsoleteFiles: Remove the miscapitalized vnet.9
    
    MFC after:      3 days
    Fixes:          3049b2f5115b (vnet.9: Rename vnet.9/vimage.9)
    
    (cherry picked from commit 08d41d8803d9dd49b709518e8f2ce292b59e9828)
---
 ObsoleteFiles.inc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
index ae83035b5de5..76e2027d9af2 100644
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -51,6 +51,9 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20250917: Remove a miscapitalized manual
+OLD_FILES+=usr/share/man/man9/vnet.9.gz
+
 # 20250911: This tool is no longer needed
 OLD_FILES+=usr/tests/bin/cp/sparse
 

From nobody Tue Sep 23 18:05:58 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWSZv2wR9z67jJ7;
	Tue, 23 Sep 2025 18:05:59 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWSZt63b0z3Hx3;
	Tue, 23 Sep 2025 18:05:58 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758650758;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=SjFhWwQrNQrYiWcLewPi3vBrNlmGRNPbsDrXkJzX+U8=;
	b=dmaIdKC0V7mt2Vu/ghn4HEdjCQMDLHsvvH5UG61NP9nS6F7ZEzam5RQBjNmlMj8U8sYbCU
	PoiflzR+hvxSXBL+cmAQos8URxQwsDoDbF0h7ofW+db6zFT9/sGUvXP0vsRhuxlxAZCcIQ
	RSNUJ3gcM+XUivvFiJxiRtm/NhcEIwz5QZYaiR2ORuIE/L7OoSN6okDqzqGs48psjxN5wX
	z69ykw1T7JqQ9nqDCQs0ceb74AiCevee5qK3fAIWt55yUTXtl6ao+Vcmq/gcNASPZm6V43
	t4KW80lvNSEJOu+Vwkmf5kzjK5MrYhVCsjKJiPpTyRy8THoyMP+eyMAf0jvAFQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758650758;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=SjFhWwQrNQrYiWcLewPi3vBrNlmGRNPbsDrXkJzX+U8=;
	b=iLJuIeGTTipuECireZ47bJtTsWTi79ug1BCE1azIUo4duVb+osxsaC+wuurvz1fnOkSgcm
	/dpfoOF7X1Nn5RoNbeaOHZ4PSbEr0EBChmf0j3X7b1E3824JLaCZGKp3bX8T6yWl35BWbT
	fDy1hG/Is45W9eTdiNL3cToVSe+xojjyZAc4qdzpXwpCz5DWKcoxMcvEj+mH5wtUV0aogK
	U1Zo2A8hbTLp0OYsxOUMBzRtW9rtgZr8FHvibm2RIVrz/CCB4vToyrSTDZLWnTaZZlwAPU
	AFqzfxk/mN4dpuCiGACHKXNe3YmKX8HLnTXat/m9qekKmZqxK7sSdagk7szP1g==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758650758; a=rsa-sha256; cv=none;
	b=E6ciu+sJ98zlNUXtW4RTtGJab5AGRz/H/GUrI1BzxaOQst1QaCE/a/k+x79GySgEWwU59c
	1iirtZAmejzGUqgtkn52HwEDhQpDVLpU0lwI33lo0AL91R+n+mIHncjYD8U2iH+lFcQnn5
	diZPSqZ98mbAh3KTdmSsp0ivmyfnMuWJbbVsgdScu6s9e86n8nGhSfRk6K4u+cyh0oyPON
	+VINGfqBc9+MzPmTTtHkVLRDNkJ4irG81WZ7HUiEVaUSsqe3uhzlIKqsVzRtBK514hj0YK
	d3tLqdIZ20pVLX09+nScNLazxNwt3su/nGspmbyMGgnggZh+3SzVqJLJUldzPw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWSZt3hNszwhg;
	Tue, 23 Sep 2025 18:05:58 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NI5wSN089972;
	Tue, 23 Sep 2025 18:05:58 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NI5wVS089969;
	Tue, 23 Sep 2025 18:05:58 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 18:05:58 GMT
Message-Id: <202509231805.58NI5wVS089969@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Alexander Ziaee 
Subject: git: 66c3e6d2cad5 - stable/15 - ObsoleteFiles: Remove the
  miscapitalized vimage.9
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ziaee
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 66c3e6d2cad5efd5e7b93b2f3c4b9dec3512de7a
Auto-Submitted: auto-generated

The branch stable/15 has been updated by ziaee:

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

commit 66c3e6d2cad5efd5e7b93b2f3c4b9dec3512de7a
Author:     Alexander Ziaee 
AuthorDate: 2025-09-18 16:22:56 +0000
Commit:     Alexander Ziaee 
CommitDate: 2025-09-23 18:02:18 +0000

    ObsoleteFiles: Remove the miscapitalized vimage.9
    
    MFC after:      3 days
    Fixes: 08d41d8803d9 (ObsoleteFiles: Remove the miscapitalized vnet.9)
    Fixes: 3049b2f5115b (vnet.9: Rename vnet.9/vimage.9 to VNET.9/VIMAGE.9)
    
    (cherry picked from commit 8f7a4d7949d83c13a7451cba7626950d182dfc5d)
---
 ObsoleteFiles.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
index 76e2027d9af2..d3b1a0239e3f 100644
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -53,6 +53,7 @@
 
 # 20250917: Remove a miscapitalized manual
 OLD_FILES+=usr/share/man/man9/vnet.9.gz
+OLD_FILES+=usr/share/man/man9/vimage.9.gz
 
 # 20250911: This tool is no longer needed
 OLD_FILES+=usr/tests/bin/cp/sparse

From nobody Tue Sep 23 18:05:59 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWSZw2HlJz67jbG;
	Tue, 23 Sep 2025 18:06:00 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWSZv5X6mz3J2p;
	Tue, 23 Sep 2025 18:05:59 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758650759;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=1YV5/JHMr9u2FAAiaJTCLugcwBTn72pskE250F82lWA=;
	b=ANFazuYymnp+keKb0Jy79NN+FN2Cz50kaEoUJHNar/IitU6Ab00omasbz9WuIgCHjMx1Pv
	n8Jp+emEkyPJz4WVzWwh4McoWfnMddZSv6po2l5pMgGOW3yVnO2pAVforYVj5e/OEf7AOu
	7r1F/5yP6wyWzxSBDU9/n5epOwuf3DlXKtFgX/LDgnA06yq6t3U0ZHFB1EQ5qitOR4RA70
	1H/qoQiDjW8/XlIWXE8BhVJ68wwB8M6NMQiMguQkKn0FipN0Kl1qauOPS/t0+Dc/g7FYjs
	355SjU2cMzy8dkvX+G/LgIl63RaBPyMK+NwN72YkRmemDoflmii4tzY7v1u8VQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758650759;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=1YV5/JHMr9u2FAAiaJTCLugcwBTn72pskE250F82lWA=;
	b=b1kvD0mKU1bbxiGC0yWwG0V8bMXHrTdNgoR966AeMZHjlQ/t+88F+b4OCqdh8hotdONH/7
	JIc7j2P5lt+e0zVG6nzyis5Kx9SqCjJ5WhDpbiu9DuMyTibsYatlXrmabwBUApL7tGTkCF
	YpApQjcxzEKtc+y9M1yz6vxeOB+hEMJQ3PSHFIPEykc4ccgqOW9UlGgx4Eltl5/EQAZ4nl
	LeZI3Mv1d2/bBfhKMYxoBAXWGpNgr4CvPdF8M3LgTCdJpvPDsCpFRRF03WdmEgvgrMebc0
	s9ZQsgGQyXDpEy6OqAKNJ1CL/OCFu3WVgugxXYDgv3/gQl8qTO+oqD/uo+ftpQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758650759; a=rsa-sha256; cv=none;
	b=ifpCei4nkXWd5AFiJyRvIRYK9xHVnl74i96AyC1EYLJpLYjUkTaT0Ia0GYu0YW6Aq6xA2q
	gVPMgaaOSQgqfy4nyHrrVoMynhfCBl0oXFqRCob/dpncD2PydBkkFNsuA6f/tmZJ6z0fFY
	DWeuA6BZ0YO3Os4dzLS9YepbaBPiNZPMYoIx/5gtjP3dl//5rp6vc0LdNdA+3m6cBCFOVl
	33LpK9VOQftRkcWwCSnQtD9VUTR7bPhAA8OcXFYs6z/YYgMXyiXPQtU7O4hGN3A4BZWxSF
	ZA4zizXlo+rD8CcYL84BhHJ1Jj+OPY7PcKI/03EJ9pomIlWMdQ139S0/MUFz+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])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWSZv50gtzwR3;
	Tue, 23 Sep 2025 18:05:59 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NI5xoL090007;
	Tue, 23 Sep 2025 18:05:59 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NI5xWw090004;
	Tue, 23 Sep 2025 18:05:59 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 18:05:59 GMT
Message-Id: <202509231805.58NI5xWw090004@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Alexander Ziaee 
Subject: git: 6abce6f7b8de - stable/15 - stand/man: Fix mdoc typos
  for emails, tag spdx
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ziaee
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 6abce6f7b8de60d549b131af427507a0c80255b3
Auto-Submitted: auto-generated

The branch stable/15 has been updated by ziaee:

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

commit 6abce6f7b8de60d549b131af427507a0c80255b3
Author:     Alexander Ziaee 
AuthorDate: 2025-09-18 17:12:19 +0000
Commit:     Alexander Ziaee 
CommitDate: 2025-09-23 18:02:18 +0000

    stand/man: Fix mdoc typos for emails, tag spdx
    
    MFC after:      3 days
    
    (cherry picked from commit a37825313f624121c6f07bc03f9cf655c300885b)
---
 stand/man/boot1.efi.8   | 2 ++
 stand/man/loader.8      | 9 ++++++---
 stand/man/loader_4th.8  | 7 +++++--
 stand/man/loader_lua.8  | 3 +++
 stand/man/loader_simp.8 | 5 ++++-
 5 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/stand/man/boot1.efi.8 b/stand/man/boot1.efi.8
index b6135f8e0e12..2c882a595592 100644
--- a/stand/man/boot1.efi.8
+++ b/stand/man/boot1.efi.8
@@ -1,4 +1,6 @@
 .\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
 .\" Copyright (c) 2020 Netflix, Inc
 .\"
 .\" Redistribution and use in source and binary forms, with or without
diff --git a/stand/man/loader.8 b/stand/man/loader.8
index 4fc3bbb7cff0..234eabd571e0 100644
--- a/stand/man/loader.8
+++ b/stand/man/loader.8
@@ -1,3 +1,6 @@
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
 .\" Copyright (c) 1999 Daniel C. Sobral
 .\" All rights reserved.
 .\" Copyright (c) 2021 Warner Losh 
@@ -115,11 +118,11 @@ scripting language changed to Lua by default in
 The
 .Nm
 was written by
-.An Michael Smith Aq msmith@FreeBSD.org .
+.An Michael Smith Aq Mt msmith@FreeBSD.org .
 .Pp
 FICL was written by
-.An John Sadler Aq john_sadler@alum.mit.edu .
+.An John Sadler Aq Mt john_sadler@alum.mit.edu .
 .Pp
-.An Warner Losh Aq imp@FreeBSD.org
+.An Warner Losh Aq Mt imp@FreeBSD.org
 integrated Lua into the tree based on initial work done by Pedro Souza
 for the 2014 Google Summer of Code.
diff --git a/stand/man/loader_4th.8 b/stand/man/loader_4th.8
index 9e87326f893b..21e907bd8630 100644
--- a/stand/man/loader_4th.8
+++ b/stand/man/loader_4th.8
@@ -1,3 +1,6 @@
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
 .\" Copyright (c) 1999 Daniel C. Sobral
 .\" All rights reserved.
 .\"
@@ -576,8 +579,8 @@ first appeared in
 The
 .Nm
 was written by
-.An Michael Smith Aq msmith@FreeBSD.org .
+.An Michael Smith Aq Mt msmith@FreeBSD.org .
 .Pp
 .Tn FICL
 was written by
-.An John Sadler Aq john_sadler@alum.mit.edu .
+.An John Sadler Aq Mt john_sadler@alum.mit.edu .
diff --git a/stand/man/loader_lua.8 b/stand/man/loader_lua.8
index 0aa467237266..c60de9417abc 100644
--- a/stand/man/loader_lua.8
+++ b/stand/man/loader_lua.8
@@ -1,3 +1,6 @@
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
 .\" Copyright (c) 1999 Daniel C. Sobral
 .\" All rights reserved.
 .\"
diff --git a/stand/man/loader_simp.8 b/stand/man/loader_simp.8
index cdacd823b1a5..683ca8b2da5d 100644
--- a/stand/man/loader_simp.8
+++ b/stand/man/loader_simp.8
@@ -1,3 +1,6 @@
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
 .\" Copyright (c) 1999 Daniel C. Sobral
 .\" All rights reserved.
 .\"
@@ -755,4 +758,4 @@ first appeared in
 The
 .Nm
 was written by
-.An Michael Smith Aq msmith@FreeBSD.org .
+.An Michael Smith Aq Mt msmith@FreeBSD.org .

From nobody Tue Sep 23 18:06:00 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWSZx0Klxz67jFg;
	Tue, 23 Sep 2025 18:06:01 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWSZw6HTsz3Hcl;
	Tue, 23 Sep 2025 18:06:00 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758650760;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Fw3SrabhD3hQ+T24InfHK2bFYavnwSMOaU1zUieFCuk=;
	b=A0AaHfstzZne+Uo2L2rZNy/BBQ23Bc7B46mgyrQaXaBC4ARrzhQDMlkGfLogbSMkXcjue9
	YZEQ/fIQfJVlfJa3VG0cQuWDN/kKuCH6nVYA10TSAXou19fVcFGJ7hIHx7gNvd0VCCx6fW
	7gf8ibPA+OOg9gs8sBaqSRTEJvoXBSpKHuh97J30XobkSHQvqSvKJtKFXx33Nf5qjMXcTe
	qHqwTKDUvKekXXxrg6Y8LA0pFLvL73CTGwTxkE1B/CQy86C6buxtl/88zRSYcKDWYf/nk2
	e1BsNczy95jpzBUN50n7BDG1njVkfv7hhrHLaATPzwG+gdQOmVv/JvmXVkFWKw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758650760;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Fw3SrabhD3hQ+T24InfHK2bFYavnwSMOaU1zUieFCuk=;
	b=SIwnYnH1U25yYdHKOuTpXLqytv1aw3kbS2934Hmgr1UM1dFdVeBplmIwUs4fVGLAFkyhIj
	xNWED8Yi17IQRhtEAFTlKe8f3qM/0juPixdYvb9EeGg0cRjlkeizoXGZJhy4Gn3dPIXdZm
	G/FT7pmCkfv2NshKHPbuPzA6xRIkCXvXZoBKuAOqgt3wyQGaKT8/GquKG3wzZJbh3jnYWe
	sbuku5HmfTU+U10QbOslJ45f3hSt1EANk20W7GNh3+lLUwOJ5Rj3wcmQlLqqMOhKvY0tbQ
	kyB2Gfn08JGdP/GvoVgS/a50dWB64y5Gt8ViKGDjJuPQOcqLGfZJZoZzJqR5fQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758650760; a=rsa-sha256; cv=none;
	b=gAFDvXeEkooFfJRzXJuhExLC7+WzCbV+wlq+E696qlTe9fppBjWW3199GdF/Jg6waNZbAC
	zNSoCdBVFO76IDRHV0QBfmWr/s4yGTId4kte+ha39enoMbvZdw17Iuh/Cj9R60Rt18Ylui
	cbhHaVGHDv8yEDcSTT+ojYsWVMUAhp38m1xsJ7Rb8Ddj50gNkQxYmttjBW9Ys+aI0ijTRl
	RTJGpLeT1zvfZMwG9ByeTjItSzd80JMPTPas5V08nzjj9o41XNQrz3svxNhjxj8jg9BSHO
	EZhQoVDy8tKKs9dw/XzZBpkT/wkQHW+dySpNThEn7grfJwuydYXSw6TMrouWjg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWSZw5dfZzwxt;
	Tue, 23 Sep 2025 18:06:00 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NI60ap090053;
	Tue, 23 Sep 2025 18:06:00 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NI60Kn090050;
	Tue, 23 Sep 2025 18:06:00 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 18:06:00 GMT
Message-Id: <202509231806.58NI60Kn090050@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Alexander Ziaee 
Subject: git: 63f76d75eeed - stable/15 - cdceem.4: Clean description
  for apropos, tag spdx
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ziaee
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 63f76d75eeede3178e9f7c8fcfd5a00113af1fdd
Auto-Submitted: auto-generated

The branch stable/15 has been updated by ziaee:

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

commit 63f76d75eeede3178e9f7c8fcfd5a00113af1fdd
Author:     Alexander Ziaee 
AuthorDate: 2025-09-18 20:14:30 +0000
Commit:     Alexander Ziaee 
CommitDate: 2025-09-23 18:02:18 +0000

    cdceem.4: Clean description for apropos, tag spdx
    
    CDCEEM is already defined in the document name, no need to list it in
    parentheticals a second time in the document description. This brings
    the apropos listing down to one line on the one true standard console.
    
    MFC after:      3 days
    
    (cherry picked from commit 89bc43a1ea9b23cac9cb94f0b684d5655c9a90e4)
---
 share/man/man4/cdceem.4 | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/share/man/man4/cdceem.4 b/share/man/man4/cdceem.4
index 6d8caf53cc02..c2a282027241 100644
--- a/share/man/man4/cdceem.4
+++ b/share/man/man4/cdceem.4
@@ -1,3 +1,6 @@
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
 .\" Copyright (c) 2019 Edward Tomasz Napierala 
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -20,12 +23,12 @@
 .\" 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 November 7, 2019
+.Dd September 18, 2025
 .Dt CDCEEM 4
 .Os
 .Sh NAME
 .Nm cdceem
-.Nd "USB Communication Device Class Ethernet Emulation Model (CDC EEM) driver"
+.Nd USB Communication Device Class Ethernet Emulation Model driver
 .Sh SYNOPSIS
 To compile this driver into the kernel,
 place the following lines in your

From nobody Tue Sep 23 21:39:23 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWYK80LSlz67ysX;
	Tue, 23 Sep 2025 21:39:24 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWYK76kHmz3lVT;
	Tue, 23 Sep 2025 21:39:23 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758663564;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=47FoaFoJT34si0eYiMkygv+0PBmnrvOzjRK3VX55GbU=;
	b=QV3t4AVDYd2AxwFksWR5h9/2jbfuKCpBZqFdOJ3STWXH9Gh0SbTN4UxAjyxD0ZWR5UoWA2
	lb99GI31fBo95Z96NeSxLG36uelwwHhP9xH6G5ZFPy/VPznUmKenKDcPQJqAe2MZ2t9jCI
	bAoxMMTbLJ8as8D4YVy+ai7a34OSv3dHasJ4dgeucaQQ3zrg1DqtvxoY5YFzptm4JnupCi
	e7VvdgzI+mynfahU1JKlyNLCnoE5e470R2jrfBJIXnoBQTulwLS6/+rPuXS51jBSnKpGD8
	/HIPyYqGLI1nfomygPUzKN9Di07g+WoA/ofA1Ftt5wHg3Dr/5jORzdCzQ2kubQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758663564;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=47FoaFoJT34si0eYiMkygv+0PBmnrvOzjRK3VX55GbU=;
	b=x0x5Z5Jx9KnidhdHm9KL1eGYbCGwup8b1OZOve1oZ56ZudfOcDZ6s8rGTBm+rmimOb4f27
	LBphnF/j88qch0TdJIv0Nf4t9lCF7HFSW5TKzD5tUgPTxcjxsZOjYuVnBs6ucihJEY18qj
	Nl6gaky4QhkRwDylo53NFHodDrQTp9i8wal1xnh+WhZzf3cd3v3Klv8NWK7CFr8MAc5mrG
	+Ennh3cNOQ8ZTyl0eOclHqVDRiyISRtgngzVfCKvq+nc0jlWKavPxTgBhkWPicU+0CRIn8
	LVanPyYgWHrrBP1KfncIOYpPkuEsV6ySFifUd8dDbTp29vwnyPUPC+sPwmkHCw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758663564; a=rsa-sha256; cv=none;
	b=DrK18D/zRXgm6FeKLl6ttBiSllMGywF0ezonnHHfyS3jul3MQVytLXZfPb8goka+I8jMIv
	VfXuDj6uIYeQlKxCDRIkSzq5oaJn/uOuTmHdcZAkrG6pfeHyaEB3X6qwcCZhbVzkrknHxc
	9ORtgPfGlxS31iBtiVUiwEsU877r7S+tnsYsDY22kl9UF/Lznu1PDlkz116tcvZe2TfVJl
	i0vpj4XGfivbsRlZ/nvlzWN31jNQ+UHdtxN5Ux2bS86kZtfJCil/AbO0aWFBuJ68zqFkk9
	FeTVIggU62hI0hPgwEk/74PnzRRTAl4IhcbzIKXoFVa/FWkjeVT+QEVNBAtu3Q==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWYK76GyKz13KL;
	Tue, 23 Sep 2025 21:39:23 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NLdNea086599;
	Tue, 23 Sep 2025 21:39:23 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NLdNww086596;
	Tue, 23 Sep 2025 21:39:23 GMT
	(envelope-from git)
Date: Tue, 23 Sep 2025 21:39:23 GMT
Message-Id: <202509232139.58NLdNww086596@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Jilles Tjoelker 
Subject: git: ca771d7ae527 - stable/15 - init: Use root's home
  directory in single-user mode
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: jilles
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: ca771d7ae527f4d3dcff20cd38c5be594d3a5730
Auto-Submitted: auto-generated

The branch stable/15 has been updated by jilles:

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

commit ca771d7ae527f4d3dcff20cd38c5be594d3a5730
Author:     Jilles Tjoelker 
AuthorDate: 2025-09-14 21:53:34 +0000
Commit:     Jilles Tjoelker 
CommitDate: 2025-09-23 21:38:07 +0000

    init: Use root's home directory in single-user mode
    
    When starting single-user mode, use the home directory from user root as
    current directory and for the HOME environment variable. If the
    directory does not exist, set HOME=/.
    
    Also adjust /root/.profile to stop setting HOME, since it should always
    have been set now.
    
    This is intended to keep shell startup files working in single-user mode
    after /.profile has been removed.
    
    Reviewed by:    emaste, ivy, kevans
    Relnotes:       yes
    Differential Revision:  https://reviews.freebsd.org/D52527
    
    (cherry picked from commit 779812d66989a9c3aaed09e4573400fc137f92b0)
---
 bin/sh/dot.profile |  2 --
 sbin/init/init.c   | 14 +++++++++++---
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/bin/sh/dot.profile b/bin/sh/dot.profile
index d27a2ae2fdbe..cba9bcf18ad9 100644
--- a/bin/sh/dot.profile
+++ b/bin/sh/dot.profile
@@ -1,6 +1,4 @@
 #
-HOME=/root
-export HOME
 PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:~/bin
 export PATH
 TERM=${TERM:-xterm}
diff --git a/sbin/init/init.c b/sbin/init/init.c
index b345c8fa219a..d28501053c7f 100644
--- a/sbin/init/init.c
+++ b/sbin/init/init.c
@@ -851,9 +851,9 @@ single_user(void)
 	const char *shell;
 	char *argv[2];
 	struct timeval tv, tn;
+	struct passwd *pp;
 #ifdef SECURE
 	struct ttyent *typ;
-	struct passwd *pp;
 	static const char banner[] =
 		"Enter root password, or ^D to go multi-user\n";
 	char *clear, *password;
@@ -885,6 +885,7 @@ single_user(void)
 		 */
 		open_console();
 
+		pp = getpwnam("root");
 #ifdef SECURE
 		/*
 		 * Check the root password.
@@ -892,7 +893,6 @@ single_user(void)
 		 * it's the only tty that can be 'off' and 'secure'.
 		 */
 		typ = getttynam("console");
-		pp = getpwnam("root");
 		if (typ && (typ->ty_status & TTY_SECURE) == 0 &&
 		    pp && *pp->pw_passwd) {
 			write_stderr(banner);
@@ -909,7 +909,6 @@ single_user(void)
 			}
 		}
 		endttyent();
-		endpwent();
 #endif /* SECURE */
 
 #ifdef DEBUGSHELL
@@ -930,6 +929,15 @@ single_user(void)
 		}
 #endif /* DEBUGSHELL */
 
+		if (pp != NULL && pp->pw_dir != NULL && *pp->pw_dir != '\0' &&
+		    chdir(pp->pw_dir) == 0) {
+			setenv("HOME", pp->pw_dir, 1);
+		} else {
+			chdir("/");
+			setenv("HOME", "/", 1);
+		}
+		endpwent();
+
 		/*
 		 * Unblock signals.
 		 * We catch all the interesting ones,

From nobody Wed Sep 24 04:40:07 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWkfb4HHMz68T0G;
	Wed, 24 Sep 2025 04:40:07 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWkfb3f1tz3QhG;
	Wed, 24 Sep 2025 04:40:07 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758688807;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=cZgkWqL0dBvqDxTUXDSWhBcCCNRw9rPu+P5cjp1UQOE=;
	b=qTrHKtj3Evl7NnHbFN0jouJbIF1V1yo+fCnkUw6DlX1k78pL69I6ZeUfI9YfyCPx81/aih
	SvRgccwLuw3Qam34TRq5H3ARZpSHdfAEeO0gwHTEEO/KHXjQT83LIdExgCjeQw94+khBRX
	nFYFN2HYCzj+dzrWpEpsqNNX/bWBcZkRN8NevZGP60wfADE7uc2ykIIE4yFMGxOt5on1Z3
	ZocHQFQ8mZzkHQti0NLUzBa3jAIBnqowTdTdpW4mxrRsJUN7YQMQlCmY5MU2PtUeUJaime
	lCG9DeDUDc7yz3KxbsxgrzbicQgqV0e4KRvlLQhkGNyjwEo+bHHyKS6KMHW+wA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758688807;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=cZgkWqL0dBvqDxTUXDSWhBcCCNRw9rPu+P5cjp1UQOE=;
	b=q5uZFPIaBQsQ2DuMtarKd8akNWcb3jGi4uX55Nc8plnaaCFR+Q9EtKfvpUgh3ZKxq3LLXF
	ItYVMLUx/9Jxg6XQiKLc/gmhcoNo0FvRCdByKUr1voKVd8xTFEklRGWhqDdODza1b9QcFq
	vA0FtHS4CRxh2SsgOmhdKN7ejZ9YzM1aM2588Lbh1g+0VFm5tyDJ0o9i7I973N70/6OVRe
	CrppFQ/b4SJns7cStleMI93lBJ9fOEB1NZoXuKV3YpXgmBJdpyzomoTejO2zcKrE4jN/VN
	CL3YtwRZ33WRHTtqO3PlOaPvALp2AyUXZXvCDxkUzXVyFa93VHo+knrBLz9/SQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758688807; a=rsa-sha256; cv=none;
	b=ZXG+2ezmXprH4k1wc5HCPuNlGMFmIidjULmucraPTBXZv6u2LnuGcJSD6kRGFc7LvzxoFO
	/GPvd6l8AkExPofEDUr4WS1aCQ8CGEHgCtt4HMTr8EkKznR6egoZbKY0ljzc/3CJBu/SI+
	BHiqZGwSDqCKYyaMaxs7GCnvgg/a43lg6mTnbazTVCu9W6uV35bls86aJ9hFMXdgxBKkNU
	uKx68qFr1uDdfCl2g0EFx2FM70KL+A7Eons4rs4yfSwBV2mN0DijuEbkBTOi5smhE1z1AO
	98msPjxxIpC41UWPgjAxiX7APqDEdc862OXdxhVR6S0KrH9wOWraTEnEQXwvEw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWkfb37BNz1q9;
	Wed, 24 Sep 2025 04:40:07 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58O4e7oY077723;
	Wed, 24 Sep 2025 04:40:07 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58O4e7I3077718;
	Wed, 24 Sep 2025 04:40:07 GMT
	(envelope-from git)
Date: Wed, 24 Sep 2025 04:40:07 GMT
Message-Id: <202509240440.58O4e7I3077718@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Enji Cooper 
Subject: git: 4b286fc6d5f1 - stable/14 - OSSL_HTTP_get(): Reset
  redirection_url in each iteration
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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: 4b286fc6d5f1762a17180ab86b5cf7debf78d020
Auto-Submitted: auto-generated

The branch stable/14 has been updated by ngie:

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

commit 4b286fc6d5f1762a17180ab86b5cf7debf78d020
Author:     Enji Cooper 
AuthorDate: 2025-05-28 02:34:44 +0000
Commit:     Enji Cooper 
CommitDate: 2025-09-24 04:39:03 +0000

    OSSL_HTTP_get(): Reset redirection_url in each iteration
    
    Also remove some dead assignments.
    
    Obtained from:  openssl (e78c8b791c0e03e750ef7196bc7bfee8e5bd00a0)
    
    MFC after:      2 weeks
    Requested by:   Phillip Sabatino
    Sponsored by:   Dell, Inc.
    
    (cherry picked from commit 18378ef11a0a5a8fb6c62761b1a20c23c12a4aa6)
---
 crypto/openssl/crypto/http/http_client.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/crypto/openssl/crypto/http/http_client.c b/crypto/openssl/crypto/http/http_client.c
index c86db4405b8f..4652269b9ada 100644
--- a/crypto/openssl/crypto/http/http_client.c
+++ b/crypto/openssl/crypto/http/http_client.c
@@ -1138,13 +1138,12 @@ BIO *OSSL_HTTP_get(const char *url, const char *proxy, const char *no_proxy,
                    const char *expected_ct, int expect_asn1,
                    size_t max_resp_len, int timeout)
 {
-    char *current_url, *redirection_url = NULL;
+    char *current_url;
     int n_redirs = 0;
     char *host;
     char *port;
     char *path;
     int use_ssl;
-    OSSL_HTTP_REQ_CTX *rctx = NULL;
     BIO *resp = NULL;
     time_t max_time = timeout > 0 ? time(NULL) + timeout : 0;
 
@@ -1156,6 +1155,9 @@ BIO *OSSL_HTTP_get(const char *url, const char *proxy, const char *no_proxy,
         return NULL;
 
     for (;;) {
+        char *redirection_url;
+        OSSL_HTTP_REQ_CTX *rctx;
+
         if (!OSSL_HTTP_parse_url(current_url, &use_ssl, NULL /* user */, &host,
                                  &port, NULL /* port_num */, &path, NULL, NULL))
             break;
@@ -1164,6 +1166,7 @@ BIO *OSSL_HTTP_get(const char *url, const char *proxy, const char *no_proxy,
                               use_ssl, bio, rbio, bio_update_fn, arg,
                               buf_size, timeout);
     new_rpath:
+        redirection_url = NULL;
         if (rctx != NULL) {
             if (!OSSL_HTTP_set1_request(rctx, path, headers,
                                         NULL /* content_type */,
@@ -1173,9 +1176,9 @@ BIO *OSSL_HTTP_get(const char *url, const char *proxy, const char *no_proxy,
                                         0 /* no keep_alive */)) {
                 OSSL_HTTP_REQ_CTX_free(rctx);
                 rctx = NULL;
-           } else {
+            } else {
                 resp = OSSL_HTTP_exchange(rctx, &redirection_url);
-           }
+            }
         }
         OPENSSL_free(path);
         if (resp == NULL && redirection_url != NULL) {
@@ -1190,7 +1193,6 @@ BIO *OSSL_HTTP_get(const char *url, const char *proxy, const char *no_proxy,
                         OPENSSL_free(host);
                         OPENSSL_free(port);
                         (void)OSSL_HTTP_close(rctx, 1);
-                        rctx = NULL;
                         BIO_free(resp);
                         OPENSSL_free(current_url);
                         return NULL;
@@ -1200,7 +1202,6 @@ BIO *OSSL_HTTP_get(const char *url, const char *proxy, const char *no_proxy,
                 OPENSSL_free(host);
                 OPENSSL_free(port);
                 (void)OSSL_HTTP_close(rctx, 1);
-                rctx = NULL;
                 continue;
             }
             /* if redirection not allowed, ignore it */
@@ -1210,7 +1211,6 @@ BIO *OSSL_HTTP_get(const char *url, const char *proxy, const char *no_proxy,
         OPENSSL_free(port);
         if (!OSSL_HTTP_close(rctx, resp != NULL)) {
             BIO_free(resp);
-            rctx = NULL;
             resp = NULL;
         }
         break;

From nobody Wed Sep 24 04:40:38 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWkgC0Mv7z68T98;
	Wed, 24 Sep 2025 04:40:39 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWkgB6vDJz3R5f;
	Wed, 24 Sep 2025 04:40:38 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758688839;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=AWQTGYx7ayZmCpmvmbCxww4/RN9jp6/XRkyyg0UMVL8=;
	b=UrGlK9o1oEomZgG5ycR946/Bfs2kiGRp7396Lh0Xc7gZICD1E9qWKyZvTApu7NfD62Xli6
	qQahBfpl++2/kPApzfiq/EQxLTB1PwDNiMIQUKBxdHm1Csr39UkueahAXBAbGBQVKGChbL
	VZf1TPdHetb7J5jGOy3H9suy95Exfrs+rEi83N8g5xe2nwg1rv+1CLRaWEw56FlW4WV63R
	TGobo/9EfbtWwb4V68+Q+RpzClCazQU9ThZUca3z1METVpHY+5al4m0VtedxJki9jIsXlh
	yn0kxykjaaHrDI1OiWz0EHNywnGuPNWWZKQsjcdijy38MOxKSWBAW/8vL3GqFA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758688839;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=AWQTGYx7ayZmCpmvmbCxww4/RN9jp6/XRkyyg0UMVL8=;
	b=m0FI1kPBtfX8bnWKvvPPKU8YnfbEtFEjyNMxbRyYk6PtnAG0YL2VgZin6bD78i05Bbw8sO
	LHTwGLUs+zDhmK/EY11TyiS/m3PBOYvmWWXYGbLNep1+q9y8JwF6+1H/ksOfmPsqk/6i+O
	a5lMXGqJKG/zyvlrZMXaa921FBj2ttVDP20QERUJ+Y4v9/uEHL4CD5OgvYJLh38PgWcM3e
	SblHgXM8MZnoRAe0rlsIl+Mhy8o7a9hCfCinuBQHtlbVdraKk+8h+GZ7c/nJ+YtKsHC7Se
	sJEQ9Y7NfO+GleoQBDjJu0IS+tNySAAwAVyqCkrFtbOg6Hdb9K5pPI6sHfV1WQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758688839; a=rsa-sha256; cv=none;
	b=CRSpWmyWtTpOwKZRbEEo1uw3mg8fYejsvrHRzDiW8oNX1x15qScESdZwBMueTK9mo/dQaO
	GLwbmDELhcEvKr1KOVJanaHQorjCLNSKe1ajwmJfSVI+4bLd7T8/o1hQIXKwww02MMHEem
	2rl/KwKE1Wotpw+eaK+cyRmlNYtwMBN+TeuMv64Xj6sv34hllUYQl4WLcRwPIMDDf3NsdG
	nW+6AkNe5ec6kAoo93ukzpZh7Jcn8pZdWYFUnJmhwyyrCA/HgdqrH0CfPgyD9L73eMlDDm
	eTl6IiSpUCap9N3+mfjCb6Ib7SHGp/jgL4Y9il6W6c707LMttRM0jKRd6ofeSQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWkgB6Mg9z1nV;
	Wed, 24 Sep 2025 04:40:38 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58O4ec3Q084620;
	Wed, 24 Sep 2025 04:40:38 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58O4ecSE084617;
	Wed, 24 Sep 2025 04:40:38 GMT
	(envelope-from git)
Date: Wed, 24 Sep 2025 04:40:38 GMT
Message-Id: <202509240440.58O4ecSE084617@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Enji Cooper 
Subject: git: fcc00aaba41c - stable/14 - Makefile.inc1: garbage
  collect unused variable: install-info
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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: fcc00aaba41cd28606eb166ee281cd57bd2ce0b8
Auto-Submitted: auto-generated

The branch stable/14 has been updated by ngie:

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

commit fcc00aaba41cd28606eb166ee281cd57bd2ce0b8
Author:     Enji Cooper 
AuthorDate: 2025-08-19 01:06:41 +0000
Commit:     Enji Cooper 
CommitDate: 2025-09-24 04:40:21 +0000

    Makefile.inc1: garbage collect unused variable: install-info
    
    The variable's definition was removed with texinfo in
    2d2813618c3818d7d41a7ced1fca4a1a01d3591d, but the reference to the
    variable was left behind.
    
    This is effectively a no-op cleanup.
    
    MFC after:      3 days
    
    (cherry picked from commit de3e5dbea171f576e9e6d89ea5238ea3c9c8b26a)
---
 Makefile.inc1 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile.inc1 b/Makefile.inc1
index 57306e3b65e7..84fe2a2eceaf 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -1380,7 +1380,7 @@ _sysctl=sysctl
 .endif
 
 ITOOLS=	[ awk cap_mkdb cat chflags chmod chown cmp cp \
-	date echo egrep find grep id install ${_install-info} \
+	date echo egrep find grep id install \
 	ln make mkdir mtree mv pwd_mkdb \
 	rm sed services_mkdb sh sort strip ${_sysctl} test time true uname wc
 

From nobody Wed Sep 24 04:43:20 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWkkK09D6z68TMN;
	Wed, 24 Sep 2025 04:43:21 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWkkJ6gCfz3RVB;
	Wed, 24 Sep 2025 04:43:20 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758689000;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=tqEbz0TVk0/bz9RgAm46tBkNxQrlhSYHjRmk7Avoz1k=;
	b=tPd4WiibDHPKlJ1cte0YippW+9MHrczKwtpLIuMlhooBdgMgwMC9fjTv49wzRPvjGu8LxI
	iYGFhaE52MqCaQlgqc5+tHK7hg7he4g+JIaNW00PrAcGNJIucXRLCt9vxBX6I+ZTO8byHy
	3b7nj2iO032DSD48Koxa91cXdZM8gfEy2N/I3I/h7j5InF2l6WVua0DaoK9GPn5/pKe1Ez
	QmFqcTbRKoHBl7teqASAjR1lPEhrKSbqub0GJ+RqSEjIUT93m6Ovkbm2x9NZu7vw4cPE6B
	rLq91OHyOM3wzgBFBRweOrLt/cOt/lB3xFYV3Z+fwGuJgMOtx1uiKZ3bn4vj0w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758689000;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=tqEbz0TVk0/bz9RgAm46tBkNxQrlhSYHjRmk7Avoz1k=;
	b=p6ytQ9YN3Bgi+ppjX2EwN0RnWiHdWm0YoeMHW1Zi2eqkJok/J2EjxTkf+rs5jQ5GhRY22G
	tqUgGpCfP1bZk67aBB3Y0hSRJLIDzhtQhRp+wiw6JChbfNunyX+0jjQLfRM8cxESUr7zc5
	/Ut9/vNZscYg6tMwqeq50rPwjtosBlgl5NDFjZQVmG7Zdp6TIBXPBOrwqcL2kAKzg1H/fX
	d2QVxVm2inNZqYJNUn9bvjrn2mKpmDeq6zix8RnOYG7Hz+fKnaVeLXIRlvhmFk7oCK8pLR
	uJqKjZSKv0bxHHINPEgi+xr41pXkjedVFUr7CpfGxSuxgIxNYZR5ptNZqyCplQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758689000; a=rsa-sha256; cv=none;
	b=nzGa169c9pH3EVspZJbHA/RxyA/7Z/OoJZYAtrtNbptnQKDIl/2Kktn/SnKgFxCxlDajAf
	zh2aKpBFAtU1eUuBppIZmM6rlNPihdllCvPtlx4gHopR69VrRvBS9U6R8XKWNKs2ZplThR
	bsnsZi2MojBA7W/LBe6tzkq/w1RokbJtRkvuP98LfuaIxFhfx2j18nbp+Ed70b0ZlvKD6q
	VSP9inCwPEh+HZfE8IFnELSvBDWFb1kzDnfZBWFncdX/lEBRWR4MjskpqHA8g9MLhyjmti
	eP/DH/xFA0RivYWSWjYabv0wvoi5u//fLVilbiVdoMYvvMre6esVYO1oY0dmZw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWkkJ69ZGz2Dy;
	Wed, 24 Sep 2025 04:43:20 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58O4hKBA091528;
	Wed, 24 Sep 2025 04:43:20 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58O4hKmF091525;
	Wed, 24 Sep 2025 04:43:20 GMT
	(envelope-from git)
Date: Wed, 24 Sep 2025 04:43:20 GMT
Message-Id: <202509240443.58O4hKmF091525@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Enji Cooper 
Subject: git: 9620fa7091a2 - stable/14 - aio_*(2): mention ENOSYS
  under ERRORS
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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: 9620fa7091a27f4c903aaee7d119a1f2d52926fa
Auto-Submitted: auto-generated

The branch stable/14 has been updated by ngie:

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

commit 9620fa7091a27f4c903aaee7d119a1f2d52926fa
Author:     Enji Cooper 
AuthorDate: 2025-03-25 21:57:52 +0000
Commit:     Enji Cooper 
CommitDate: 2025-09-24 04:42:51 +0000

    aio_*(2): mention ENOSYS under ERRORS
    
    ENOSYS can occur if aio(4) is not loaded in the kernel. Document this
    behavior so consumers on FreeBSD can better understand that this is a
    possible scenario.
    
    Clean up the manpages slightly while here:
    - Sort `ERRORS` by errno(3).
    - Use `.Fx` instead of `FreeBSD`.
    
    MFC after:      2 weeks
    Reviewed by:    ziaee
    PR:             190942
    Differential Revision: https://reviews.freebsd.org/D49502
    
    (cherry picked from commit d97e44784bb5a510b7af7593c86cfbcff73855c4)
---
 lib/libc/sys/aio_cancel.2       |  7 +++++++
 lib/libc/sys/aio_error.2        |  7 +++++++
 lib/libc/sys/aio_fsync.2        |  7 +++++++
 lib/libc/sys/aio_mlock.2        |  7 +++++++
 lib/libc/sys/aio_read.2         | 11 ++++++++++-
 lib/libc/sys/aio_return.2       |  7 +++++++
 lib/libc/sys/aio_suspend.2      |  7 +++++++
 lib/libc/sys/aio_waitcomplete.2 | 11 +++++++++--
 lib/libc/sys/aio_write.2        | 11 ++++++++++-
 9 files changed, 71 insertions(+), 4 deletions(-)

diff --git a/lib/libc/sys/aio_cancel.2 b/lib/libc/sys/aio_cancel.2
index 42d074054716..928a8b325e5f 100644
--- a/lib/libc/sys/aio_cancel.2
+++ b/lib/libc/sys/aio_cancel.2
@@ -80,6 +80,13 @@ The
 .Fa fildes
 argument
 is an invalid file descriptor.
+.It Bq Er ENOSYS
+The
+.Fn aio_cancel
+system call is not supported.
+This can occur if
+.Xr aio 4
+support is not present.
 .El
 .Sh SEE ALSO
 .Xr aio_error 2 ,
diff --git a/lib/libc/sys/aio_error.2 b/lib/libc/sys/aio_error.2
index 69eb7cd90ee2..2579d2f33052 100644
--- a/lib/libc/sys/aio_error.2
+++ b/lib/libc/sys/aio_error.2
@@ -72,6 +72,13 @@ The
 .Fa iocb
 argument
 does not reference an outstanding asynchronous I/O request.
+.It Bq Er ENOSYS
+The
+.Fn aio_error
+system call is not supported.
+This can occur if
+.Xr aio 4
+support is not present.
 .El
 .Sh SEE ALSO
 .Xr aio_cancel 2 ,
diff --git a/lib/libc/sys/aio_fsync.2 b/lib/libc/sys/aio_fsync.2
index 46fc5d95bcfd..0b863773eaf2 100644
--- a/lib/libc/sys/aio_fsync.2
+++ b/lib/libc/sys/aio_fsync.2
@@ -136,6 +136,13 @@ argument
 is not a valid descriptor.
 .It Bq Er EINVAL
 This implementation does not support synchronized I/O for this file.
+.It Bq Er ENOSYS
+The
+.Fn aio_fsync
+system call is not supported.
+This can occur if
+.Xr aio 4
+support is not present.
 .El
 .Pp
 If the request is successfully enqueued, but subsequently cancelled
diff --git a/lib/libc/sys/aio_mlock.2 b/lib/libc/sys/aio_mlock.2
index 02d54304c631..f89ad10936aa 100644
--- a/lib/libc/sys/aio_mlock.2
+++ b/lib/libc/sys/aio_mlock.2
@@ -98,6 +98,13 @@ The request was not queued because of system resource limitations.
 The asynchronous notification method in
 .Fa iocb->aio_sigevent.sigev_notify
 is invalid or not supported.
+.It Bq Er ENOSYS
+The
+.Fn aio_mlock
+system call is not supported.
+This can occur if
+.Xr aio 4
+support is not present.
 .El
 .Pp
 If the request is successfully enqueued, but subsequently cancelled
diff --git a/lib/libc/sys/aio_read.2 b/lib/libc/sys/aio_read.2
index 3a9601754c06..811d0b234168 100644
--- a/lib/libc/sys/aio_read.2
+++ b/lib/libc/sys/aio_read.2
@@ -173,6 +173,13 @@ points outside the process's allocated address space.
 The asynchronous notification method in
 .Fa iocb->aio_sigevent.sigev_notify
 is invalid or not supported.
+.It Bq Er ENOSYS
+The
+.Fn aio_read
+system call is not supported.
+This can occur if
+.Xr aio 4
+support is not present.
 .It Bq Er EOPNOTSUPP
 Asynchronous read operations on the file descriptor
 .Fa iocb->aio_fildes
@@ -263,7 +270,9 @@ The
 .Fn aio_read2
 and
 .Fn aio_readv
-system calls are FreeBSD extensions,
+system calls are
+.Fx
+extensions,
 and should not be used in portable code.
 .Sh HISTORY
 The
diff --git a/lib/libc/sys/aio_return.2 b/lib/libc/sys/aio_return.2
index 499b85ef20d8..49e1abf201ec 100644
--- a/lib/libc/sys/aio_return.2
+++ b/lib/libc/sys/aio_return.2
@@ -79,6 +79,13 @@ The I/O operation was submitted with
 and the value of the
 .Fa aio_lio_opcode
 is invalid.
+.It Bq Er ENOSYS
+The
+.Fn aio_return
+system call is not supported.
+This can occur if
+.Xr aio 4
+support is not present.
 .El
 .Sh SEE ALSO
 .Xr aio_cancel 2 ,
diff --git a/lib/libc/sys/aio_suspend.2 b/lib/libc/sys/aio_suspend.2
index c46b0292c34e..ebc3c15d059f 100644
--- a/lib/libc/sys/aio_suspend.2
+++ b/lib/libc/sys/aio_suspend.2
@@ -89,6 +89,13 @@ contains more asynchronous I/O requests than the
 variable, or at least one of the requests is not valid.
 .It Bq Er EINTR
 the suspend was interrupted by a signal.
+.It Bq Er ENOSYS
+The
+.Fn aio_suspend
+system call is not supported.
+This can occur if
+.Xr aio 4
+support is not present.
 .El
 .Sh SEE ALSO
 .Xr aio_cancel 2 ,
diff --git a/lib/libc/sys/aio_waitcomplete.2 b/lib/libc/sys/aio_waitcomplete.2
index 1f20eca942ab..0a38155d7c75 100644
--- a/lib/libc/sys/aio_waitcomplete.2
+++ b/lib/libc/sys/aio_waitcomplete.2
@@ -91,8 +91,6 @@ The
 .Fn aio_waitcomplete
 system call fails if:
 .Bl -tag -width Er
-.It Bq Er EINVAL
-The specified time limit is invalid.
 .It Bq Er EAGAIN
 The process has not yet called
 .Fn aio_read
@@ -101,6 +99,15 @@ or
 .It Bq Er EINTR
 A signal was delivered before the timeout expired and before any
 asynchronous I/O requests completed.
+.It Bq Er EINVAL
+The specified time limit is invalid.
+.It Bq Er ENOSYS
+The
+.Fn aio_waitcomplete
+system call is not supported.
+This can occur if
+.Xr aio 4
+support is not present.
 .It Bq Er EWOULDBLOCK
 .It Bq Er EINPROGRESS
 The specified time limit expired before any asynchronous I/O requests
diff --git a/lib/libc/sys/aio_write.2 b/lib/libc/sys/aio_write.2
index f59406b8ab36..a7108a87e378 100644
--- a/lib/libc/sys/aio_write.2
+++ b/lib/libc/sys/aio_write.2
@@ -182,6 +182,13 @@ points outside the process's allocated address space.
 The asynchronous notification method in
 .Fa iocb->aio_sigevent.sigev_notify
 is invalid or not supported.
+.It Bq Er ENOSYS
+The
+.Fn aio_write
+system call is not supported.
+This can occur if
+.Xr aio 4
+support is not present.
 .It Bq Er EOPNOTSUPP
 Asynchronous write operations on the file descriptor
 .Fa iocb->aio_fildes
@@ -265,7 +272,9 @@ The
 .Fn aio_write2
 and
 .Fn aio_writev
-system calls are FreeBSD extensions,
+system calls are
+.Fx
+extensions,
 and should not be used in portable code.
 .Sh HISTORY
 The

From nobody Wed Sep 24 04:43:21 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWkkL1dypz68SJF;
	Wed, 24 Sep 2025 04:43:22 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWkkL0Twlz3RxX;
	Wed, 24 Sep 2025 04:43:22 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758689002;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=1WEQTC3dIIKdRbY8wt9/yPa2DyNQY7L2jGHiWq3Q/js=;
	b=BDLzZKoIpBxJLsVKJxEtKYMhCY+lQ0uh0C6TxBjpB014TZSdeHFiG4dN3raDgF8pRWKS6J
	W54zHnKFuXA2XMshL/kspEpAMU+LBabxevSDnQDFlfx/x8ffn3TNRPqhW0zVbmWGFbVnM1
	EQkyCJ8JMfH7wBWefJwSwOw1VGR8r4Ww1tFUbNG/qbzlKwVvhNjxlhjj+nF++BU1k2kNDU
	h+EOJ4scTN2uxdrW45f2hv3hV/Z4R/3JZkOs3sOfrFT7sexmleaS6eQFdjA7SqywWlvwxL
	Z91tSg8wLIMqf09LIFhQI8I7NhNQye+V/kS4GF80ZhZynfqdMkujmNsG7l12iA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758689002;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=1WEQTC3dIIKdRbY8wt9/yPa2DyNQY7L2jGHiWq3Q/js=;
	b=h3bScMiUzPFR+HQHNB7eBMXNizNMXsT2WFJoN0ovEhdyDFeZn5xggWUYx7XuJ/GDHYTwBA
	RsHNs3/xPo3+Zz0ZAXV+w37aQsgn07HyXvmzzsGV9+GPN2U+RaOt3AHmiyFXe6imgQJj1b
	cUIlUMuUfaXTQVkW4gRQm1RczrnGQU3YhxGcK6QB8ZbnsLgoNgpz3n+0kr09nK3nshCTtP
	fT/B1smhQ3CCPdf2/nQtI8hgoOJocayXuk5Ey15xNA9YPutK9Ve0/EUzIfyU92A0dAdgh5
	hXPfNFkSqHCl27JMguPwxXWUt6ZOWwekD6VuTAH3HDtiXK8STFwTp0TK0bFwiw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758689002; a=rsa-sha256; cv=none;
	b=aEGAHbnmFsC+UlPruAFp8BmGBenCBj9IJekfcLF0NwSRfcjr5kWtsbuS18PLflg3qS3bwi
	j+y5n1D1KSTUoHL2SD7BX4v0owSf1s6uC5mkwWHMy3dtWw1xjAwiK7yTzZCELiADQ9jtQH
	4wi7tBMa0gTjCfO5h43LdTSb3TH0GSHGaFXo90OCguEnzmMFXtccgnuFzFkdV1ig+8uFgL
	crwI6ZMtORgjBrAUrK6+hpwrVIgE698bwpC4SOcVNQ+9nzbELXR+4AsoKF9WeRL3YpEKL8
	ndlXTm+8wXl1sdBrD3EmQfuZQqMKC6p/eROSL/NeEDYQ69zM2wk7G/vQ1NqeMw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWkkL02S3z1qv;
	Wed, 24 Sep 2025 04:43:22 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58O4hLDb091561;
	Wed, 24 Sep 2025 04:43:21 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58O4hLZk091558;
	Wed, 24 Sep 2025 04:43:21 GMT
	(envelope-from git)
Date: Wed, 24 Sep 2025 04:43:21 GMT
Message-Id: <202509240443.58O4hLZk091558@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Enji Cooper 
Subject: git: e4b1597b428c - stable/14 - Remove mentions of ENOSYS
  added in d97e44784bb5
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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: e4b1597b428c8cfa555c7f0753f3b5f073169fcf
Auto-Submitted: auto-generated

The branch stable/14 has been updated by ngie:

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

commit e4b1597b428c8cfa555c7f0753f3b5f073169fcf
Author:     Enji Cooper 
AuthorDate: 2025-03-27 19:26:59 +0000
Commit:     Enji Cooper 
CommitDate: 2025-09-24 04:42:51 +0000

    Remove mentions of ENOSYS added in d97e44784bb5
    
    aio(4) is a hard requirement in the kernel as of f3215338ef82. The
    scenario that the patch was submitted for is no longer possible.
    
    This isn't a straight up revert since the previous change also addressed
    some minor issues.
    
    PR:             190942
    Reported by:    asomers
    MFC after:      2 weeks
    MFC with:       d97e44784bb5
    Fixes:          d97e44784bb5 ("aio_*(2): mention ENOSYS under ERRORS")
    Differential Revision: https://reviews.freebsd.org/D49541
    
    (cherry picked from commit e24279e0f9e28ba0c1920cb539fc357568790c0a)
---
 lib/libc/sys/aio_cancel.2       | 7 -------
 lib/libc/sys/aio_error.2        | 7 -------
 lib/libc/sys/aio_fsync.2        | 7 -------
 lib/libc/sys/aio_mlock.2        | 7 -------
 lib/libc/sys/aio_read.2         | 7 -------
 lib/libc/sys/aio_return.2       | 7 -------
 lib/libc/sys/aio_suspend.2      | 7 -------
 lib/libc/sys/aio_waitcomplete.2 | 7 -------
 lib/libc/sys/aio_write.2        | 7 -------
 9 files changed, 63 deletions(-)

diff --git a/lib/libc/sys/aio_cancel.2 b/lib/libc/sys/aio_cancel.2
index 928a8b325e5f..42d074054716 100644
--- a/lib/libc/sys/aio_cancel.2
+++ b/lib/libc/sys/aio_cancel.2
@@ -80,13 +80,6 @@ The
 .Fa fildes
 argument
 is an invalid file descriptor.
-.It Bq Er ENOSYS
-The
-.Fn aio_cancel
-system call is not supported.
-This can occur if
-.Xr aio 4
-support is not present.
 .El
 .Sh SEE ALSO
 .Xr aio_error 2 ,
diff --git a/lib/libc/sys/aio_error.2 b/lib/libc/sys/aio_error.2
index 2579d2f33052..69eb7cd90ee2 100644
--- a/lib/libc/sys/aio_error.2
+++ b/lib/libc/sys/aio_error.2
@@ -72,13 +72,6 @@ The
 .Fa iocb
 argument
 does not reference an outstanding asynchronous I/O request.
-.It Bq Er ENOSYS
-The
-.Fn aio_error
-system call is not supported.
-This can occur if
-.Xr aio 4
-support is not present.
 .El
 .Sh SEE ALSO
 .Xr aio_cancel 2 ,
diff --git a/lib/libc/sys/aio_fsync.2 b/lib/libc/sys/aio_fsync.2
index 0b863773eaf2..46fc5d95bcfd 100644
--- a/lib/libc/sys/aio_fsync.2
+++ b/lib/libc/sys/aio_fsync.2
@@ -136,13 +136,6 @@ argument
 is not a valid descriptor.
 .It Bq Er EINVAL
 This implementation does not support synchronized I/O for this file.
-.It Bq Er ENOSYS
-The
-.Fn aio_fsync
-system call is not supported.
-This can occur if
-.Xr aio 4
-support is not present.
 .El
 .Pp
 If the request is successfully enqueued, but subsequently cancelled
diff --git a/lib/libc/sys/aio_mlock.2 b/lib/libc/sys/aio_mlock.2
index f89ad10936aa..02d54304c631 100644
--- a/lib/libc/sys/aio_mlock.2
+++ b/lib/libc/sys/aio_mlock.2
@@ -98,13 +98,6 @@ The request was not queued because of system resource limitations.
 The asynchronous notification method in
 .Fa iocb->aio_sigevent.sigev_notify
 is invalid or not supported.
-.It Bq Er ENOSYS
-The
-.Fn aio_mlock
-system call is not supported.
-This can occur if
-.Xr aio 4
-support is not present.
 .El
 .Pp
 If the request is successfully enqueued, but subsequently cancelled
diff --git a/lib/libc/sys/aio_read.2 b/lib/libc/sys/aio_read.2
index 811d0b234168..f7d8cdfd71b1 100644
--- a/lib/libc/sys/aio_read.2
+++ b/lib/libc/sys/aio_read.2
@@ -173,13 +173,6 @@ points outside the process's allocated address space.
 The asynchronous notification method in
 .Fa iocb->aio_sigevent.sigev_notify
 is invalid or not supported.
-.It Bq Er ENOSYS
-The
-.Fn aio_read
-system call is not supported.
-This can occur if
-.Xr aio 4
-support is not present.
 .It Bq Er EOPNOTSUPP
 Asynchronous read operations on the file descriptor
 .Fa iocb->aio_fildes
diff --git a/lib/libc/sys/aio_return.2 b/lib/libc/sys/aio_return.2
index 49e1abf201ec..499b85ef20d8 100644
--- a/lib/libc/sys/aio_return.2
+++ b/lib/libc/sys/aio_return.2
@@ -79,13 +79,6 @@ The I/O operation was submitted with
 and the value of the
 .Fa aio_lio_opcode
 is invalid.
-.It Bq Er ENOSYS
-The
-.Fn aio_return
-system call is not supported.
-This can occur if
-.Xr aio 4
-support is not present.
 .El
 .Sh SEE ALSO
 .Xr aio_cancel 2 ,
diff --git a/lib/libc/sys/aio_suspend.2 b/lib/libc/sys/aio_suspend.2
index ebc3c15d059f..c46b0292c34e 100644
--- a/lib/libc/sys/aio_suspend.2
+++ b/lib/libc/sys/aio_suspend.2
@@ -89,13 +89,6 @@ contains more asynchronous I/O requests than the
 variable, or at least one of the requests is not valid.
 .It Bq Er EINTR
 the suspend was interrupted by a signal.
-.It Bq Er ENOSYS
-The
-.Fn aio_suspend
-system call is not supported.
-This can occur if
-.Xr aio 4
-support is not present.
 .El
 .Sh SEE ALSO
 .Xr aio_cancel 2 ,
diff --git a/lib/libc/sys/aio_waitcomplete.2 b/lib/libc/sys/aio_waitcomplete.2
index 0a38155d7c75..f14e05abaaf0 100644
--- a/lib/libc/sys/aio_waitcomplete.2
+++ b/lib/libc/sys/aio_waitcomplete.2
@@ -101,13 +101,6 @@ A signal was delivered before the timeout expired and before any
 asynchronous I/O requests completed.
 .It Bq Er EINVAL
 The specified time limit is invalid.
-.It Bq Er ENOSYS
-The
-.Fn aio_waitcomplete
-system call is not supported.
-This can occur if
-.Xr aio 4
-support is not present.
 .It Bq Er EWOULDBLOCK
 .It Bq Er EINPROGRESS
 The specified time limit expired before any asynchronous I/O requests
diff --git a/lib/libc/sys/aio_write.2 b/lib/libc/sys/aio_write.2
index a7108a87e378..875b24fa160a 100644
--- a/lib/libc/sys/aio_write.2
+++ b/lib/libc/sys/aio_write.2
@@ -182,13 +182,6 @@ points outside the process's allocated address space.
 The asynchronous notification method in
 .Fa iocb->aio_sigevent.sigev_notify
 is invalid or not supported.
-.It Bq Er ENOSYS
-The
-.Fn aio_write
-system call is not supported.
-This can occur if
-.Xr aio 4
-support is not present.
 .It Bq Er EOPNOTSUPP
 Asynchronous write operations on the file descriptor
 .Fa iocb->aio_fildes

From nobody Wed Sep 24 04:43:47 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWkkq5Ksbz68TVV;
	Wed, 24 Sep 2025 04:43:47 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWkkq4mtyz3SGV;
	Wed, 24 Sep 2025 04:43:47 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758689027;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=KXRxx+BC/SWU2dnhf7RpDz3xZH95l5sjqJOukNkQeCs=;
	b=QV/WdqSH42BOM3r5iz32p0M/g8K2lIoF/hncWlTTcoSa6jzn88lHAphDwBDz7C/DIvJFW3
	jp5gg+JYNp7PoH/HvEFQAZlHEgD0d8pXDmwFCmrFTFmMDmMKOuukXpPsWcY8R4loj5MQ5o
	P+NJiIYAb9WYHEUDadmonXn0TSo9+enEANa20ZDcm0gJU1KbQ86r90luv9BHCTFFJcPVVO
	2C5KY2nBMKNcQp3ViKXA8iyyKHkV1vdHfGq5ccb8WYM6ru+QDsSpGKQ2mlDu4UbGEq8OPG
	NpF17GPwldxf4mc8ciJ7f877Wb7CE2Xo1OSX0aqo8FwCV//t4mVKJK9j4b5gHQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758689027;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=KXRxx+BC/SWU2dnhf7RpDz3xZH95l5sjqJOukNkQeCs=;
	b=hw5CDDgJtFtpvAKIBLbN+ECyHq3bx3sV9E2LtpS7RE9+GKxnkc9cJXGKdx4h5hp9bVuGlm
	3+w9MBTzLFWxaaMaN2VQQgLXSoZMV6ivaB+vT/bv2/zJiWVJPoH5sa7xCwakNV+OIs4Yf2
	N1Je7LYtmCURuXqhC7wm9PCW68zRVd3tUrB6pL9XTv1vCgE7+ogkwdDu7/9ocJ1c4WdRyR
	27L1v89r/cwYBtN4nqnn47gMns0BrCBpPLX6re4s0NOiSn5cWDfBhKF11CV+5D/N3mlTP6
	2nGbftaybHjFMhgPLp0gDZ1osQdD5bBL67I/hp6zDos9otVIn8DdbEibw/YLtA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758689027; a=rsa-sha256; cv=none;
	b=Il/QZ+79Joxadds96AcRYyiypdxZxVX9p83hUGewF9SWKTihD8OhturPhlDNjFSfgY+UTG
	tWTwrT4F4mjw5K2ivm1dGJwu4Esi44cbDHh7mX3c5a2IOFzRkVrQa9Lg2IV1RzZ4MWouZE
	c7GiFBcPFHeNPLsBsDqDRE5bPaU0bjZ3837453CSfpJzbGogzXg3jyQZJylCHo4SO0DMKN
	MQu3gVWSA8IDpcLxcNypKnGMqa8uza7BRpZtkr+w1BwESqTGa9vSN21i8o4UqTiZYDme1l
	O6psIYLFgp1I52vz6cYiCWFx0BVQ+hnFKnmqoROjw/e0QMFBdWz2EHCi2gVgzA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWkkq4N5gz2F0;
	Wed, 24 Sep 2025 04:43:47 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58O4hl0B091825;
	Wed, 24 Sep 2025 04:43:47 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58O4hlJB091822;
	Wed, 24 Sep 2025 04:43:47 GMT
	(envelope-from git)
Date: Wed, 24 Sep 2025 04:43:47 GMT
Message-Id: <202509240443.58O4hlJB091822@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Enji Cooper 
Subject: git: 9f94939b73f5 - stable/14 - Bump .Dd for recently
  changed aio_*(2) manpages
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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: 9f94939b73f56fa7f7e53acbd260cad3cfcf91ef
Auto-Submitted: auto-generated

The branch stable/14 has been updated by ngie:

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

commit 9f94939b73f56fa7f7e53acbd260cad3cfcf91ef
Author:     Enji Cooper 
AuthorDate: 2025-03-28 02:43:26 +0000
Commit:     Enji Cooper 
CommitDate: 2025-09-24 04:43:41 +0000

    Bump .Dd for recently changed aio_*(2) manpages
    
    The ones that were effectively unchanged from
    d97e44784bb5a^..e24279e0f9e did not have `.Dd` bumped. Only
    the ones that had a net content change between those
    revisions.
    
    MFC after:      2 weeks
    MFC with:       d97e44784bb5a e24279e0f9e
    
    (cherry picked from commit 1b37af092211f9947d9f089f452232b791b9eafc)
---
 lib/libc/sys/aio_read.2         | 2 +-
 lib/libc/sys/aio_waitcomplete.2 | 2 +-
 lib/libc/sys/aio_write.2        | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/libc/sys/aio_read.2 b/lib/libc/sys/aio_read.2
index f7d8cdfd71b1..45779fff94c4 100644
--- a/lib/libc/sys/aio_read.2
+++ b/lib/libc/sys/aio_read.2
@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd February 1, 2024
+.Dd March 27, 2025
 .Dt AIO_READ 2
 .Os
 .Sh NAME
diff --git a/lib/libc/sys/aio_waitcomplete.2 b/lib/libc/sys/aio_waitcomplete.2
index f14e05abaaf0..e7f993e0b796 100644
--- a/lib/libc/sys/aio_waitcomplete.2
+++ b/lib/libc/sys/aio_waitcomplete.2
@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd March 21, 2016
+.Dd March 27, 2025
 .Dt AIO_WAITCOMPLETE 2
 .Os
 .Sh NAME
diff --git a/lib/libc/sys/aio_write.2 b/lib/libc/sys/aio_write.2
index 875b24fa160a..107e347ac335 100644
--- a/lib/libc/sys/aio_write.2
+++ b/lib/libc/sys/aio_write.2
@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd February 1, 2024
+.Dd March 27, 2025
 .Dt AIO_WRITE 2
 .Os
 .Sh NAME

From nobody Wed Sep 24 04:49:34 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWksV3wcLz68TQy;
	Wed, 24 Sep 2025 04:49:34 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWksV351Tz3T5L;
	Wed, 24 Sep 2025 04:49:34 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758689374;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=t40GR1DCbulGOs7eyPqMcA98oXVRNHQpwp+wiYlRrDQ=;
	b=n76CGpePj9hXfy/vSbKHlI1n2ERTQb9gzbrcJ0UWCCG9US09rdW3XHOuV2U5gZPHQo2mQS
	7JIJQQHcoMXUTpdIuf72jNLLkb9ThVc8Mqf67J/jsYD6CVRMZfaqqJivpjB+nqyByFU7a7
	f2XTUgB5vr+WPL8Jp4XUjSwnK64LlqEjL7fFen0rOyGH0sho9gl0EbbiNtNYFPd+ArST0F
	oAlsDCYNXAhjZw0sueVPc9s8I5yP23B8ney9pP5vmc9t44/uWuTKmVKaCcyDZp18b/s3aY
	mi1OsGnfx2Uv/j0NK5wkHDOdpZC5kdyFNPG46yf0ycaNiqfnP5KA9HwUyefXCg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758689374;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=t40GR1DCbulGOs7eyPqMcA98oXVRNHQpwp+wiYlRrDQ=;
	b=UY6jNr5DvTWV8U+KgitWfxr0RXjNDFjfu9uTpHSGL2lBEH+6pUvK1VAq58M3tRa9T1zJGf
	vR1LI8kmetOXxL8g8B0Z5ZSMjZP7dQcvaNfoRAn29wNXadi6zX+hCHvAwD6ZW4FMAL9Q28
	CC9noxTd7jIPaJOZeL/JuJrfUIrlkaFo26geKT/JppH9of35Y+8zqj20AIvxih6uYnIkN1
	QZgUwBJ38Erpq9YG0CgJMIZhzLkgKaDm/cnw1FJOMKRI1qtuNSz2L1QbfnJjul3FWFr3c0
	/p1USWbKGl2D5AW8msDkeFIPgAauc76bbsWFYH0CwABrAcNZhTboI9XRSsJPCg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758689374; a=rsa-sha256; cv=none;
	b=MJCQxW18JZDPa34PF5ie0fGZvuWHK2wSGmhQz/GQADdh1CQrKCwS9SCZmCynfc1bP2TPTA
	8YTOjTReSFXLUews5FE+tCceiUP6ZzYuDgSUZSHzBdJwXt0HlQJZo27svLLeUt4q1q5I4W
	ZIcto32nZtxaDcju3sWpSJ8cXMEUa19j+lUwwm97qC94NbeOylos7MNCId6gFWrOR8PsXH
	6Nuie0/WgRRYRl/b7oXORWOOvqNcI2yJomeacGuMTSVai1MWZ1ZgxNoeURsKE94V5sMzEU
	gr8C/QfB6yuf5buznsRjwhB14P3ifGOW+VQv/lnJyOSc/a9HCOjTd2m3S0AtlA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWksV2gmjz2Lv;
	Wed, 24 Sep 2025 04:49:34 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58O4nYwr093621;
	Wed, 24 Sep 2025 04:49:34 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58O4nYK8093618;
	Wed, 24 Sep 2025 04:49:34 GMT
	(envelope-from git)
Date: Wed, 24 Sep 2025 04:49:34 GMT
Message-Id: <202509240449.58O4nYK8093618@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Enji Cooper 
Subject: git: 6ff0347e8f0f - stable/13 - Unbreak usr.bin/dc with
  OpenSSL 3
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/13
X-Git-Reftype: branch
X-Git-Commit: 6ff0347e8f0f64a3dade6e522d565b5f73edfbef
Auto-Submitted: auto-generated

The branch stable/13 has been updated by ngie:

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

commit 6ff0347e8f0f64a3dade6e522d565b5f73edfbef
Author:     Enji Cooper 
AuthorDate: 2023-08-11 03:36:48 +0000
Commit:     Enji Cooper 
CommitDate: 2025-09-24 04:49:26 +0000

    Unbreak usr.bin/dc with OpenSSL 3
    
    OpenSSL's BN_zero API has had a void return value since 1.1.x: chase the
    change to unbreak the build on OpenSSL 3.x with MK_GH_BC == no.
    
    MFC after:      2 weeks
    Reviewed by:    emaste, kevans
    Differential Revision:  https://reviews.freebsd.org/D41410
    
    (cherry picked from commit c45e66dca3e4f3073132b6f3e94623c2314f679c)
---
 usr.bin/dc/bcode.c | 6 +++---
 usr.bin/dc/inout.c | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/usr.bin/dc/bcode.c b/usr.bin/dc/bcode.c
index 37fc5a7b32fc..0e34f0399035 100644
--- a/usr.bin/dc/bcode.c
+++ b/usr.bin/dc/bcode.c
@@ -376,7 +376,7 @@ split_number(const struct number *n, BIGNUM *i, BIGNUM *f)
 	bn_checkp(BN_copy(i, n->number));
 
 	if (n->scale == 0 && f != NULL)
-		bn_check(BN_zero(f));
+		BN_zero(f);
 	else if (n->scale < sizeof(factors)/sizeof(factors[0])) {
 		rem = BN_div_word(i, factors[n->scale]);
 		if (f != NULL)
@@ -809,7 +809,7 @@ load(void)
 		v = stack_tos(&bmachine.reg[idx]);
 		if (v == NULL) {
 			n = new_number();
-			bn_check(BN_zero(n->number));
+			BN_zero(n->number);
 			push_number(n);
 		} else
 			push(stack_dup_value(v, ©));
@@ -894,7 +894,7 @@ load_array(void)
 			v = frame_retrieve(stack, idx);
 			if (v == NULL || v->type == BCODE_NONE) {
 				n = new_number();
-				bn_check(BN_zero(n->number));
+				BN_zero(n->number);
 				push_number(n);
 			}
 			else
diff --git a/usr.bin/dc/inout.c b/usr.bin/dc/inout.c
index 20eeb5961683..a91531b2c769 100644
--- a/usr.bin/dc/inout.c
+++ b/usr.bin/dc/inout.c
@@ -190,7 +190,7 @@ readnumber(struct source *src, u_int base, u_int bscale)
 	bool dot = false, sign = false;
 
 	n = new_number();
-	bn_check(BN_zero(n->number));
+	BN_zero(n->number);
 
 	while ((ch = (*src->vtable->readchar)(src)) != EOF) {
 
@@ -228,8 +228,8 @@ readnumber(struct source *src, u_int base, u_int bscale)
 		base_n = BN_new();
 		exponent = BN_new();
 		divisor = new_number();
-		bn_check(BN_zero(base_n));
-		bn_check(BN_zero(exponent));
+		BN_zero(base_n);
+		BN_zero(exponent);
 
 		bn_check(BN_add_word(base_n, base));
 		bn_check(BN_add_word(exponent, iscale));

From nobody Wed Sep 24 05:35:13 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWlt95H3sz68Wmg;
	Wed, 24 Sep 2025 05:35:13 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWlt94R9hz3WF6;
	Wed, 24 Sep 2025 05:35:13 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758692113;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=E+OM8+FtImdWBumcaYE0+HETqg4Fxz5f85D7htGLrOE=;
	b=k+mwAkVh9RFuklto/+BVwsOA/Dnwt2zScSrA7gcyZLR4xEfYUqX2jJRZ7l12XPc6q5iSmT
	IIQ5WD1wkeN/3PYvbhbPlxytzDEbkbCMhykRhWGIh0xjra8WYNVgUTOM74bfjR0wNmKSQQ
	FMUEmIs3jG5W7IcS6jgAYV1YwfL6SyPBBy5Z+iUn6zVJdQq1XclN2995xL+4ZmD5fxEiSG
	wqfOeUg0TVeKNWSHYIZNixs9hjPyhqFZHLF0qhXP0Z24i4962sZmUvF95rdkYMIlyszzHU
	gmdrkEWQ1EQfkZENL0JBGgJ6/DfH3yclBI76rCc6d0iCPh2qibpmD3+gZr+1UA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758692113;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=E+OM8+FtImdWBumcaYE0+HETqg4Fxz5f85D7htGLrOE=;
	b=U3zMbIeZG7pg6o4PVBjOhhplYNO2+46JJ2uDa5jFC8nJXMHkwzFoGpt2S0SjkgWs+hBQfR
	3IN2KDSoJP4Xo0dF878xSm9Xhhz2SaJDS4glSyQZEYMfMGEy3jq7oeXjpxfWOS1VhDYeb4
	+6rG/JvkOyCDwIx4AX3o2RqeIrJpzahLElm9qWIckLgSjQdCEKozvRPC6EdA4O6HuMtath
	fc7h9jbhrXAOPtctajVKIB7JL82xqhvEeNS5063c5e0J9lzKGC5t44p8tTUJw9+dLQC5E3
	S9uk3et/PSO6Ow9EUY2mZ9Fn3S6kEwkBfAI2K29XSGcAC0CspBOQIWJbtYjrBQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758692113; a=rsa-sha256; cv=none;
	b=H4Oo9h5x+42Bv87H2lLLGU1DltxMPLl7OzVreIC9tVw3ULGU6F/m+joIyPr3PtDK2YLad4
	j30pgH0xWeT94fmBa7yimnS2v1TkbfNbz1A+23z1poCCLpI9uUnkXy5eUMg8hqmA8B+kaK
	y7jhEgls5wC/5G6IXSIfpg0Ju8pny/5Z0xV7NBPTsSuQ29+PaSlaXPh659CzA9Wu+n6Gse
	Avv8hoqeT1iVsf6UoGmLbIOgx8GqCywZgrzakGpIDD8O6MJzLi39upRLnl/3O11rFld6kU
	KNqXGXy9+X4v5q0kZUbahDhssLHU4CWH4LjkJrI3HpxXFyXaNdeNRvaapO6a+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])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWlt93qqBz3Rk;
	Wed, 24 Sep 2025 05:35:13 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58O5ZDnR086295;
	Wed, 24 Sep 2025 05:35:13 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58O5ZD9V086292;
	Wed, 24 Sep 2025 05:35:13 GMT
	(envelope-from git)
Date: Wed, 24 Sep 2025 05:35:13 GMT
Message-Id: <202509240535.58O5ZD9V086292@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Enji Cooper 
Subject: git: ebb9f371b4a3 - stable/13 - Add simple factor/primes
  regression tests
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/13
X-Git-Reftype: branch
X-Git-Commit: ebb9f371b4a3b1218cd11b247e8d641eda923b2e
Auto-Submitted: auto-generated

The branch stable/13 has been updated by ngie:

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

commit ebb9f371b4a3b1218cd11b247e8d641eda923b2e
Author:     Enji Cooper 
AuthorDate: 2023-05-27 04:51:24 +0000
Commit:     Enji Cooper 
CommitDate: 2025-09-24 05:33:18 +0000

    Add simple factor/primes regression tests
    
    This will help ensure that the change following this
    one to support OpenSSL 3 is sane.
    
    MFC after:      1 week
    Reviewed by:    emaste
    Differential Revision:  https://reviews.freebsd.org/D40297
    
    (cherry picked from commit c60be9ea6b1ecef6e77096601660f9573ec59a26)
---
 etc/mtree/BSD.tests.dist             |  2 +
 usr.bin/factor/Makefile              |  3 ++
 usr.bin/factor/tests/Makefile        |  4 ++
 usr.bin/factor/tests/factor_tests.sh | 85 ++++++++++++++++++++++++++++++++++++
 usr.bin/factor/tests/primes_tests.sh | 75 +++++++++++++++++++++++++++++++
 5 files changed, 169 insertions(+)

diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist
index fa5c9e910049..bbd0862c226b 100644
--- a/etc/mtree/BSD.tests.dist
+++ b/etc/mtree/BSD.tests.dist
@@ -1035,6 +1035,8 @@
         ..
         env
         ..
+        factor
+        ..
         file2c
         ..
         file
diff --git a/usr.bin/factor/Makefile b/usr.bin/factor/Makefile
index fa36aaeef8b3..e2bb64b78a4e 100644
--- a/usr.bin/factor/Makefile
+++ b/usr.bin/factor/Makefile
@@ -15,4 +15,7 @@ MAN=	factor.6
 MLINKS+=factor.6 primes.6
 .PATH:	${SRCTOP}/usr.bin/primes
 
+HAS_TESTS=
+SUBDIR.${MK_TESTS}+=	tests
+
 .include 
diff --git a/usr.bin/factor/tests/Makefile b/usr.bin/factor/tests/Makefile
new file mode 100644
index 000000000000..f9b13443ae92
--- /dev/null
+++ b/usr.bin/factor/tests/Makefile
@@ -0,0 +1,4 @@
+ATF_TESTS_SH+=	factor_tests
+ATF_TESTS_SH+=	primes_tests
+
+.include 
diff --git a/usr.bin/factor/tests/factor_tests.sh b/usr.bin/factor/tests/factor_tests.sh
new file mode 100755
index 000000000000..0d9156673582
--- /dev/null
+++ b/usr.bin/factor/tests/factor_tests.sh
@@ -0,0 +1,85 @@
+#
+# SPDX-License-Identifier: BSD-2-Clause
+#
+# Copyright 2023 (C) Enji Cooper
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+
+atf_test_case float_non_prime
+float_non_prime_head()
+{
+	atf_set "descr" "Test with a float non-prime number"
+}
+float_non_prime_body()
+{
+	atf_check -o inline:"1: 1\n" factor 1.44
+}
+
+atf_test_case float_prime
+float_prime_head()
+{
+	atf_set "descr" "Test with a float prime number"
+}
+float_prime_body()
+{
+	pi="3.141592653589793238462643383279502884197"
+	atf_check -o inline:"3: 3\n" factor $pi
+}
+
+atf_test_case int_non_prime
+int_non_prime_head()
+{
+	atf_set "descr" "Test with an integral prime number"
+}
+int_non_prime_body()
+{
+	atf_check -o inline:"8: 2 2 2\n" factor 8
+}
+
+atf_test_case int_prime
+int_prime_head()
+{
+	atf_set "descr" "Test with an integral prime number"
+}
+int_prime_body()
+{
+	atf_check -o inline:"31: 31\n" factor 31
+}
+
+atf_test_case negative_numbers_not_allowed
+negative_numbers_not_allowed_head()
+{
+	atf_set "descr" "Verify that negative numbers are not allowed."
+}
+negative_numbers_not_allowed_body()
+{
+	atf_check -s not-exit:0 -e inline:"factor: negative numbers aren't permitted.\n" factor -- -4
+}
+
+atf_init_test_cases()
+{
+	atf_add_test_case float_non_prime
+	atf_add_test_case float_prime
+	atf_add_test_case int_non_prime
+	atf_add_test_case int_prime
+	atf_add_test_case negative_numbers_not_allowed
+}
diff --git a/usr.bin/factor/tests/primes_tests.sh b/usr.bin/factor/tests/primes_tests.sh
new file mode 100755
index 000000000000..2b00e9ba34c8
--- /dev/null
+++ b/usr.bin/factor/tests/primes_tests.sh
@@ -0,0 +1,75 @@
+#
+# SPDX-License-Identifier: BSD-2-Clause
+#
+# Copyright 2023 (C) Enji Cooper
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+
+atf_test_case invalid_range
+invalid_range_head()
+{
+	atf_set "descr" "Verify that invalid ranges are not allowed."
+}
+invalid_range_body()
+{
+	atf_check -s not-exit:0 -e inline:"primes: start value must be less than stop value.\n" primes -- 2 1
+}
+
+atf_test_case negative_numbers_not_allowed
+negative_numbers_not_allowed_head()
+{
+	atf_set "descr" "Verify that negative numbers are not allowed."
+}
+negative_numbers_not_allowed_body()
+{
+	atf_check -s not-exit:0 -e inline:"primes: negative numbers aren't permitted.\n" primes -- -1 0
+}
+
+atf_test_case no_primes_between_between_20_and_22
+no_primes_between_between_20_and_22_head()
+{
+	atf_set "descr" "Show that no primes exist between [20, 22]."
+}
+
+no_primes_between_between_20_and_22_body()
+{
+	atf_check primes 20 22
+}
+
+atf_test_case primes_in_20_to_50_range
+primes_in_20_to_50_range_head()
+{
+	atf_set "descr" "Find all primes between [20, 50]."
+}
+
+primes_in_20_to_50_range_body()
+{
+	atf_check -o inline:"23\n29\n31\n37\n41\n43\n47\n" primes 20 50
+}
+
+atf_init_test_cases()
+{
+	atf_add_test_case invalid_range
+	atf_add_test_case negative_numbers_not_allowed
+	atf_add_test_case no_primes_between_between_20_and_22
+	atf_add_test_case primes_in_20_to_50_range
+}

From nobody Wed Sep 24 07:43:51 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWpkb4GN8z68fk2;
	Wed, 24 Sep 2025 07:43:51 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWpkb37PNz3k2f;
	Wed, 24 Sep 2025 07:43:51 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758699831;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=jtZPJtnzaFaJ1zwHBCoJ1IWcS7qxj/1MUikoHoSF1po=;
	b=MG0uTv/mT0J9kbQoP7SHU+1w6msmNVJap71O3Rdl9yahVqjBoFRaC7ntHhQRh04AEPYt8j
	+1zdH0PSdAclbPjQcQi0mQU9jR5remQwT7uirJZGBOb1QBDlH+N3ZaG3TmLyvfmkoRplwi
	7iA6GIvCF9SzUZLdMcrmftWcic8oEdNJMdTz6H0wlzpLOIfXFN8coMvDyVNCsycfHaBkcF
	4QpmIivtu7fMRP+pUO+eSulL9mBVMhumlkuGAisalrb9s5gcbvePae34m/pxajQ22EeHu6
	az5CuEtT6ka3RgAtw9PxiocIIQXF3KtnNLZWtTkz0IHSQ4ZiGf4uou3h5a48Dw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758699831;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=jtZPJtnzaFaJ1zwHBCoJ1IWcS7qxj/1MUikoHoSF1po=;
	b=K/HHkxrT0/D7Mi+oKLNPgiTp5fyFNDl1frdoaIOJ/puJDGMLXxYyjEsc0aotXPbeW5niwp
	3WEaDZF6D3C7f3IH66DNyFE9IaJtbUxwhavQI29gl/7GigrKYeWTT5eh24GoUTfZi3nCaD
	xcop1gY9yEKapEbRci4GEZmeGaznEIDv9PBp6ARmGR4HkxSoAZy0YdUozTxVurMWzYVEgh
	25bx5OEdGdzGz4GRdcSKeOpEDdF2BdLbKRVYlnwZcl4xtnn7te4sMeduteOsnUDpW5k9SZ
	Z7vYC79FNEYKx+fiOG8F3grnn0tVj/5v7nzQUk0EETq5edmwvG7vVZ7LX3SUqQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758699831; a=rsa-sha256; cv=none;
	b=iFRdk/94DkzFVVX/2pTjj28zIue2Sfy5b4ItFTkn66H9PzAjZ84uUNwRv3uhyDZzrxXgsU
	D5Yzuc792U9g3SxSdJbezHFSusH2LQjMVqQIc+G07/QvWhhZRopWkQZTdmVBOud9+x4ZtV
	GIr4FXKq2TZunbaLghODUkRU3P6t9ggJ4/zU/9le7yXomwu8fNdw8wY6aP8FecBAwIPagn
	qmLsxXH+LnEkP2NUwgCCxyYkYe5C002lwqnPpmuB4ggSGiUHy5vuD0PVy/E+cmyEWix+no
	Gmq/lEB1GUstnOClr5ijsB46Jaom80CDFPkaU2MGfH7VHe+5JR5tDJNheI1rAw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWpkb2hZ9z6tR;
	Wed, 24 Sep 2025 07:43:51 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58O7hpaB029283;
	Wed, 24 Sep 2025 07:43:51 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58O7hpl9029280;
	Wed, 24 Sep 2025 07:43:51 GMT
	(envelope-from git)
Date: Wed, 24 Sep 2025 07:43:51 GMT
Message-Id: <202509240743.58O7hpl9029280@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Vladimir Kondratyev 
Subject: git: 1bc5c9a23225 - stable/15 - rc.d/moused: Fix misplaced
  `basename`
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: wulf
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 1bc5c9a2322569ae62c2f428353128c25da4af14
Auto-Submitted: auto-generated

The branch stable/15 has been updated by wulf:

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

commit 1bc5c9a2322569ae62c2f428353128c25da4af14
Author:     Vladimir Kondratyev 
AuthorDate: 2025-09-23 08:33:03 +0000
Commit:     Vladimir Kondratyev 
CommitDate: 2025-09-24 07:42:04 +0000

    rc.d/moused: Fix misplaced `basename`
    
    This fixes "usage: basename string [suffix]" message.
    
    Reported by:    cy
    MFC after:      1 day
    
    (cherry picked from commit f586fc0cf8ff54393a3db565437788a12bdc6e99)
---
 libexec/rc/rc.d/moused | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libexec/rc/rc.d/moused b/libexec/rc/rc.d/moused
index 35a26bd57275..e267ae5b3cd8 100755
--- a/libexec/rc/rc.d/moused
+++ b/libexec/rc/rc.d/moused
@@ -46,8 +46,8 @@ moused_start()
 	# the moused_port variable, which if not defined sets it to the
 	# passed in device name.
 	#
-	ms=`basename $1`
-	if [ -n "$ms" ]; then
+	if [ -n "$1" ]; then
+		ms=`basename $1`
 		eval myflags=\${moused_${ms}_flags-$moused_flags}
 		eval myport=\${moused_${ms}_port-/dev/$1}
 		eval mytype=\${moused_${ms}_type-$moused_type}

From nobody Wed Sep 24 13:30:28 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWyQX52HLz67qy7;
	Wed, 24 Sep 2025 13:30:28 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWyQX2W5Yz3ZCx;
	Wed, 24 Sep 2025 13:30:28 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758720628;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=GHAPma70mjSokVJ4LpcdMPVIWRDd3+MJ/AiUhYtJWkA=;
	b=QsoA4wV1qg27S85l8xlPxWMerL1VJnk6p9og3U1kg/OMr8cksa7SPS1Qjc5KmFn9LT5Q39
	DhpTiWRhLuShdIoje+e6sCKWNzwaAfTQJCPT+/SdnvC8rJ4+6Eham5TEtJ7lzBV8+q4vA5
	nX8ZWtfeAx8+NhR2aiHveYB8/zRacNTqZNOrtVyPyIgiIrKofnRb2pZGJc43MTh6YBEAaK
	gbEpnlvhSRvXOeUWPV7mTo0ufYG2ys9LKhGQB+fQ8pBWOohEPVJSpaA9x7CE3vBg40bap5
	dRwmyqSjyrqrNLO+Ye/xxdFGyjt9wSVztk47rlm4vh1On6aipvy/AJNoZhdIWQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758720628;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=GHAPma70mjSokVJ4LpcdMPVIWRDd3+MJ/AiUhYtJWkA=;
	b=vjPGbjO8RwRiwmskR1r4AU/BMeOsTtlh12xliJHHYQkLihwOGsF5TFCxzkPRv2NkWjlJ5b
	KdhTKAyavdKA/5HPR7yMdTvVBiL6QJQyej5L3bUQnu9FCnHjCkPBzyep9ZMCVsf9MBGhjl
	ZmUye7cXNGsBI8pQscLufJTCIm0Tv4cRB7lpLAZwBkdIHq9KNVzwgT7QcPAkamPVWQdegZ
	zcJYBx1hL08XDSPnQLw4YME+Zio9WsAnHyNKxBjv9201fqmS/gJWsblDIAiYpcoIMLa2FI
	H+qaCwlpuwKUL8+AfSuPH3bu1WVMMgjGlVxJkHuLiBkS4OoxL31WH4urwXgnnw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758720628; a=rsa-sha256; cv=none;
	b=tEKWksbyVAf/WLjUut4Ye4du0nZtq4lfPveXEaISOVxgXgIo7hJKkUDz70DnYBMGBNbSST
	Qp3oZEkqnPVIMX0My4hc7fSGLI3WlZANE1hVRX84VBxLDKcRFVHHqcrsEMHENn5lzPEF5E
	DEu6wHqZ7wIB3ROYTQMarlrXfrxTWbFk+d9rbuvkEAZsjIPNp+vo3CuLL2+OF4BPv7SENJ
	6wOYy3SLfbZ3/H7iwM9xx2n+ufok8AI3dj2NAhcXk49bP6WHcdxqhSE26V9qABBDDK4gp4
	fEqe9zHrDejNdo5817nkbWdBT0Tskeky5SuU9U+H2Qr4A/4FVLWVvs3PG8OXrw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWyQX24J2zZb3;
	Wed, 24 Sep 2025 13:30:28 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58ODUSYk081912;
	Wed, 24 Sep 2025 13:30:28 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58ODUSr6081909;
	Wed, 24 Sep 2025 13:30:28 GMT
	(envelope-from git)
Date: Wed, 24 Sep 2025 13:30:28 GMT
Message-Id: <202509241330.58ODUSr6081909@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: 5f472754ba6f - stable/15 - ifconfig: Fix the display
  of the IFCAP_MEXTPG capability without netlink
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 5f472754ba6f9cc95607956c6e2ad6483c9dd157
Auto-Submitted: auto-generated

The branch stable/15 has been updated by zlei:

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

commit 5f472754ba6f9cc95607956c6e2ad6483c9dd157
Author:     Zhenlei Huang 
AuthorDate: 2025-09-19 19:18:27 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-24 13:29:24 +0000

    ifconfig: Fix the display of the IFCAP_MEXTPG capability without netlink
    
    Historically this capability is IFCAP_NOMAP but it was renamed to
    IFCAP_MEXTPG. Catch up with the change 3f43ada98c89.
    
    PR:             289545
    Fixes:          3f43ada98c89 Catch up with 6edfd179c86: mechanically rename IFCAP_NOMAP to IFCAP_MEXTPG
    MFC after:      3 days
    
    (cherry picked from commit 5017fdb728811fd3e15d7151524378f49a49aee1)
---
 sbin/ifconfig/ifconfig.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index c323a26ec1a8..41d2f4603983 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1665,7 +1665,7 @@ static const char *IFCAPBITS[] = {
 	[22] = "TXCSUM_IPV6",
 	[24] = "TXRTLMT",
 	[25] = "HWRXTSTMP",
-	[26] = "NOMAP",
+	[26] = "MEXTPG",
 	[27] = "TXTLS4",
 	[28] = "TXTLS6",
 	[29] = "VXLAN_HWCSUM",

From nobody Wed Sep 24 13:30:29 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWyQY5zJ7z67rSW;
	Wed, 24 Sep 2025 13:30:29 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWyQY3PHmz3Z9R;
	Wed, 24 Sep 2025 13:30:29 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758720629;
	h=from:from:reply-to:subject:subject: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/MoWSRMPCyCIWwGlYLVM0tGDNRPU+1/PYNxFrnotSQ=;
	b=dW6KuS8XUAl6DY8onnPI0jl12DrWsIuuLNWGCjGEYdEyFpkqxRi7reuVaLqS8e3Q+Iim5D
	Mmpf3JGsxzeui3YDI/DUciWGx/7vQeE9DwJ0NhC1CHlP3UNZkt/sVIpUWdzBnWbM4Oopyk
	2zFJwu0kEw2J4E62hkF7aQmbNHracRdheOaLUdRGCuwCB97rIcZLJBsrY3jo/VgLTJaFiZ
	pZoH9WSVJJXkpRZrXSFKBHipnO/2NH/5SSsIWSMvi7oOn4+xlmiRlPzn4JH6XUwCQNa+e/
	xhZyop5bhLiPoIi2EM6kcRwW0hAXJLCTrqFmA899v1mxN+VvuKjHAu7p3GElsg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758720629;
	h=from:from:reply-to:subject:subject: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/MoWSRMPCyCIWwGlYLVM0tGDNRPU+1/PYNxFrnotSQ=;
	b=DC582gTYF2pZNv4S/hq0QVVhr5pONF+5GbjV6N+KE9+JkJWlhGNtPqaRbqne0e4Q1tDsdK
	5C2fNbO7D56n93x4oOVKEJYcG3f3IcYy76jfVPAun6CmbKwb6T4m8BSsyncBNNo/GRMbk5
	FCXOdO84GyiJ82YqAcPQz3NkAFE+9pGZAdQo7oMVqsrt5HSI9c8uPENQ/MVVYjtB3djj6S
	sj/ryipuQ7as0FYCEbE/9mSD2+KcGMqDZfTvA/fyIk5sDK7SFyO/EkAwuZZNmzxNNZcIDx
	iiu8dOKC47I94hSOAyZp/roXZXJRi3gdwaWKC5Pp63zXo9K3a+HYeeMUzs3CCQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758720629; a=rsa-sha256; cv=none;
	b=V4ztM3KoJHxLXUkKQFFGVdPIPJhduJWW64plUYcpA1zSbBBYgAFzAy6HiTGWXlF0XfU15m
	gSPcJ2r+qHVJXcyhOYMSr84/r1A6W7/Mx/FwYGTMNeFvhOtDTxUE6mlY4hGoTm3BD2LLW3
	n6dKRclA7qybwq90+UFngH5YCkmGKFxQVcVtForZ9B1d71M9gwloq3zuTGBoPf7GtN9Hm3
	+vGFs2ImBhuNcUlitHHpnO7s1ZpA++ZxJDOahBaxR5ZdTCce4kv6Zr/DvNiszlaKcsFHBE
	NBtwxa2YFVPupSRnO6NmbxbzAOICpOfxis3sHgSHsBZZxV9wYIE5bUYGBeef6Q==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWyQY2zbMzZbQ;
	Wed, 24 Sep 2025 13:30:29 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58ODUTmf081952;
	Wed, 24 Sep 2025 13:30:29 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58ODUT7i081949;
	Wed, 24 Sep 2025 13:30:29 GMT
	(envelope-from git)
Date: Wed, 24 Sep 2025 13:30:29 GMT
Message-Id: <202509241330.58ODUT7i081949@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: 6bcce275a5a9 - stable/15 - ifconfig: Display the
  IFCAP_HWSTATS capability without netlink
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 6bcce275a5a9e10f8e5b990f8cfa2166aa49875a
Auto-Submitted: auto-generated

The branch stable/15 has been updated by zlei:

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

commit 6bcce275a5a9e10f8e5b990f8cfa2166aa49875a
Author:     Zhenlei Huang 
AuthorDate: 2025-09-21 16:47:45 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-24 13:29:24 +0000

    ifconfig: Display the IFCAP_HWSTATS capability without netlink
    
    This follows the commit 4cdc1f5421c5, which introduces the IFCAP_HWSTATS
    capability.
    
    Fixes:  4cdc1f5421c5 There are some high performance NICs that count statistics in hardware
    MFC after:      3 days
    
    (cherry picked from commit 595acb29a35f36a4fc08b89d3a476f16c1d108b4)
---
 sbin/ifconfig/ifconfig.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 41d2f4603983..9aeb4a09ef49 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1663,6 +1663,7 @@ static const char *IFCAPBITS[] = {
 	[20] = "NETMAP",
 	[21] = "RXCSUM_IPV6",
 	[22] = "TXCSUM_IPV6",
+	[23] = "HWSTATS",
 	[24] = "TXRTLMT",
 	[25] = "HWRXTSTMP",
 	[26] = "MEXTPG",

From nobody Wed Sep 24 13:41:04 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWyfn1GbZz67rTr;
	Wed, 24 Sep 2025 13:41:05 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cWyfm5VyCz3c9x;
	Wed, 24 Sep 2025 13:41:04 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758721264;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Kh6zyctfv/hjx4GPfuVQhPF8MusDb8rtGRHrhCLU+YA=;
	b=yowjlTIASywivIkJe6voTyx8dQVFyLvTOf6x46uLSXwr+4aL6pSbaoRvB8C9rPGrKhQaxa
	sWXbya/UEytirCZgXWTSNPhDE0GdPFFuubVG+xZ+WyBMgt1zVWtbzuwfrJY9EYufDuhOws
	EW788DaTIy9W18w1LjThz8MGhLLXC7ngIMF5j18+KcJ9OyGTxD2Ss3BaHLZOacHytBACAw
	GECrNZGyB7h/aEsSoUeTGTAcTv61Jj5YgYcE8OZR56mj715ul/h/0dXYzV7k2auoE215SK
	5XFsB9FqG5TkJ80mxYLiMczPDuL3NWWm47jnxZ4yirYAVxwfjDQmuVsDhCJ1oA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758721264;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Kh6zyctfv/hjx4GPfuVQhPF8MusDb8rtGRHrhCLU+YA=;
	b=vPIyBiEz7us5HAyRqincCJZsJaFLGoGFd16NnQVNf1XfkEhQ2QQPFTW4tC3g0O69Df7IJ8
	bNubK7FP2r+NuYidkQ1spxEf/XcX57RRSPpmmedwjq0PmEuW5tL9hDfhkJVy45HuOMVCw6
	OSK4gqcL9aIGMeJR3t2QsPl+DW9LfxEj62EMWvMpJVehfgPvtX6zpV5gMRqoJ+MsrYRrNr
	HZ+epotvFOtcF5WvgzdidNlqyHirToxe+mPPjsgmLuBUhb036RPyzBwnrrxZhMcYw+I5FW
	7IaIeZ7a3ifLw7TAFqUVIl/Dzl2bEEtA3cytCZ8QZJyNO0bhHjtQ0vv4wOAPxg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758721264; a=rsa-sha256; cv=none;
	b=aB2wIDykcnr7wR9tzsTFQA1+wveWUNTXebMkQEPPXJs+Av4ZY/rwjTSS7SQltAMmUFYeOF
	89DUVNWCH0j5oFQyEsZ2hEkmh7gNfeRwljzuDFpDz/X0t7JmAJO/lJO5DcITlNCNYQ5MBK
	KJAQOddYqVdowrn+VJPQM1h9/l55MS1ag3JlG8PcB+TorMOBRXxKyxq8yICy8M2gjnhX/Q
	x8UYAykv1qRW2jOyEiBY1RNOsM+M6o/oNoqLLnsKpd5D40hbU/WLQxqQCmztt37ICNbNr1
	qUkfBK2rlXqmXRZkOgmmbJnms6JUPA37N5I42t512VyJuMNfgtElPCmeI9bRMQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWyfm4xq7zZHj;
	Wed, 24 Sep 2025 13:41:04 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58ODf4EI005208;
	Wed, 24 Sep 2025 13:41:04 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58ODf4kT005204;
	Wed, 24 Sep 2025 13:41:04 GMT
	(envelope-from git)
Date: Wed, 24 Sep 2025 13:41:04 GMT
Message-Id: <202509241341.58ODf4kT005204@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Kristof Provost 
Subject: git: e70a2bcdc4f7 - stable/15 - pf: fix rules_counter:keepcounters
  test
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: kp
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: e70a2bcdc4f7a3492cfe7064c2fe7398a628da52
Auto-Submitted: auto-generated

The branch stable/15 has been updated by kp:

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

commit e70a2bcdc4f7a3492cfe7064c2fe7398a628da52
Author:     Kristof Provost 
AuthorDate: 2025-09-17 08:12:11 +0000
Commit:     Kristof Provost 
CommitDate: 2025-09-24 13:32:11 +0000

    pf: fix rules_counter:keepcounters test
    
    The previous pf_krule_global leak fix was a bit too aggressive and cleaned up
    the inactive tree pointer before we needed it to preserve counters. Only clean
    up anchors that are entirely unused. Clean up pf_main_ruleset on pf shutdown.
    
    PR:             289299
    MFC after:      1 week
    Fixes:          275ff85b25 ("pf: fix struct pf_krule_global leak")
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
    
    (cherry picked from commit e63534edbcd050215bc109cd89a31ba30c5ea850)
---
 sys/netpfil/pf/pf_ioctl.c   |  5 +++++
 sys/netpfil/pf/pf_ruleset.c | 12 ++++++------
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c
index 06c40a03f575..c7aa3e1822e7 100644
--- a/sys/netpfil/pf/pf_ioctl.c
+++ b/sys/netpfil/pf/pf_ioctl.c
@@ -6547,6 +6547,11 @@ shutdown_pf(void)
 
 		pf_kill_srcnodes(NULL);
 
+		for (int i = 0; i < PF_RULESET_MAX; i++) {
+			pf_rule_tree_free(pf_main_ruleset.rules[i].active.tree);
+			pf_rule_tree_free(pf_main_ruleset.rules[i].inactive.tree);
+		}
+
 		/* status does not use malloced mem so no need to cleanup */
 		/* fingerprints and interfaces have their own cleanup code */
 	} while(0);
diff --git a/sys/netpfil/pf/pf_ruleset.c b/sys/netpfil/pf/pf_ruleset.c
index 1711e690f6bb..4e16eaa76f9d 100644
--- a/sys/netpfil/pf/pf_ruleset.c
+++ b/sys/netpfil/pf/pf_ruleset.c
@@ -336,12 +336,6 @@ pf_remove_if_empty_kruleset(struct pf_kruleset *ruleset)
 	int			 i;
 
 	while (ruleset != NULL) {
-		for (int i = 0; i < PF_RULESET_MAX; i++) {
-			pf_rule_tree_free(ruleset->rules[i].active.tree);
-			ruleset->rules[i].active.tree = NULL;
-			pf_rule_tree_free(ruleset->rules[i].inactive.tree);
-			ruleset->rules[i].inactive.tree = NULL;
-		}
 		if (ruleset == &pf_main_ruleset ||
 		    !RB_EMPTY(&ruleset->anchor->children) ||
 		    ruleset->anchor->refcnt > 0 || ruleset->tables > 0 ||
@@ -352,6 +346,12 @@ pf_remove_if_empty_kruleset(struct pf_kruleset *ruleset)
 			    !TAILQ_EMPTY(ruleset->rules[i].inactive.ptr) ||
 			    ruleset->rules[i].inactive.open)
 				return;
+		for (int i = 0; i < PF_RULESET_MAX; i++) {
+			pf_rule_tree_free(ruleset->rules[i].active.tree);
+			ruleset->rules[i].active.tree = NULL;
+			pf_rule_tree_free(ruleset->rules[i].inactive.tree);
+			ruleset->rules[i].inactive.tree = NULL;
+		}
 		RB_REMOVE(pf_kanchor_global, &V_pf_anchors, ruleset->anchor);
 		if ((parent = ruleset->anchor->parent) != NULL)
 			RB_REMOVE(pf_kanchor_node, &parent->children,

From nobody Wed Sep 24 19:38:07 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cX6Zl6D4kz68LBd;
	Wed, 24 Sep 2025 19:38:07 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cX6Zl5xdDz4HQV;
	Wed, 24 Sep 2025 19:38:07 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758742687;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=b0/rkU/pxBfIZQLWCNCHblnih7rYzAoaGz47dQz1Iao=;
	b=C56AHj/rENPeaxDAdEFthkUIflGfwun8km78S+73ioBaZZmwIOGBSiuw/HX5FvxClYgyBw
	gcidFeLVWNljDHhS0E7j/jweGgxpxi8+6XuPwn7TaTlig8WCIAAUG8W5/bcxBomruenFWm
	gbeK8730KOrhJjZHSjAtgWYq5z4AXi8ohOKp5mer51jKD08v9sf6tHw01WllbKjWDgskqS
	Sqn09POljh/++OqfUvhGphn7AlHgiDB9unLbHJcWUFUEF0VOiu09cAqmth/bqaTULNGVKR
	siFHYsQqlF9p7spaSbY0dL/3MH8B3fT13NjUvQ0p32CnSM30qCuJCcK+qNheIQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758742687;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=b0/rkU/pxBfIZQLWCNCHblnih7rYzAoaGz47dQz1Iao=;
	b=Q4n9KpTG+CLbG7jVFpKMV4N7Wge0QdnEJGnmfCOPsSmuae5v7KbvezBQM5OJ18A7r6en13
	SMhDKT3qtGNxxNwmOjAzrv+uZZszxZSaYN7wcUqKUBKng2J7MeyxMuHomnvHqpweWT1qRh
	2fJlawxLiSDbpMFeYvCpqmL8R9i7aBmxtUbL9LS4a3nmNMKtdrzn+xvHXIGl+oSnBrDcdx
	baOAceQs5/NQ7OzEJh6010xlKXfSgivcgBp2WOklTpl0aeEvy2HOSVRbLCQGJJ/N7aJDbI
	iww0Ju38QFSe30Wz92/0O4d94tBSF2OMwY68gcsYaXMubrVSYgJP4Cy7p1a5QQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758742687; a=rsa-sha256; cv=none;
	b=c8nw88VgCyIYskpJ8hp9vgw1vPmLBsBA/yPqahR4CokKwV7GitR3udT8C8RjHIxbgoe4WL
	6JFrdaLrGSdqd/pkXlCgrhRZW0X2LljZ9mkzSIrZDf/bv5wKHroGxdJNx7EwP+OYJNn4uv
	MhPnNEOdm2XbNl5+7HGIXMTb1N+caVfh8ekYRXYFucrXRXSCQTDkWYccHjdDpsLHEYT+9r
	zAunXFDgM6PLKv3nNUh4ag4CWeUpqOknJ9Z0kkY/P6GSseiWk4Harshjs0s4URS7ReMMIC
	u7CyPJGVmRWLaN2dxsvJJyakj7d6pQRUbOAxz5GGmNh+c4TiBvU9wk0LYHWBbw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cX6Zl5FGHzm1l;
	Wed, 24 Sep 2025 19:38:07 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58OJc7ml068905;
	Wed, 24 Sep 2025 19:38:07 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58OJc7ZM068902;
	Wed, 24 Sep 2025 19:38:07 GMT
	(envelope-from git)
Date: Wed, 24 Sep 2025 19:38:07 GMT
Message-Id: <202509241938.58OJc7ZM068902@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Cy Schubert 
Subject: git: cc785755e600 - stable/15 - krb5: Remove tests
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: cy
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: cc785755e600cb906185c78e71bb069af65071a1
Auto-Submitted: auto-generated

The branch stable/15 has been updated by cy:

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

commit cc785755e600cb906185c78e71bb069af65071a1
Author:     Cy Schubert 
AuthorDate: 2025-09-22 15:06:41 +0000
Commit:     Cy Schubert 
CommitDate: 2025-09-24 18:09:00 +0000

    krb5: Remove tests
    
    Tests contains a file that contains spaces in it. This causes the
    freebsd-update build scripts some issues. As we don't need the tests
    directory let's simply remove it.
    
    (cherry picked from commit 3e13aae0d1f1a28352d52e41d6ef8f02efd9150e)
---
 crypto/krb5/src/tests/Makefile.in                  |  203 ---
 crypto/krb5/src/tests/adata.c                      |  381 -----
 crypto/krb5/src/tests/asn.1/Makefile.in            |   98 --
 crypto/krb5/src/tests/asn.1/README                 |   28 -
 crypto/krb5/src/tests/asn.1/cammac.asn1            |   30 -
 crypto/krb5/src/tests/asn.1/debug.h                |   46 -
 crypto/krb5/src/tests/asn.1/deps                   |   75 -
 crypto/krb5/src/tests/asn.1/krb5.asn1              |  392 -----
 crypto/krb5/src/tests/asn.1/krb5_decode_leak.c     |  676 --------
 crypto/krb5/src/tests/asn.1/krb5_decode_test.c     | 1315 --------------
 crypto/krb5/src/tests/asn.1/krb5_encode_test.c     |  850 ---------
 crypto/krb5/src/tests/asn.1/ktest.c                | 1796 --------------------
 crypto/krb5/src/tests/asn.1/ktest.h                |  210 ---
 crypto/krb5/src/tests/asn.1/ktest_equal.c          | 1054 ------------
 crypto/krb5/src/tests/asn.1/ktest_equal.h          |  154 --
 crypto/krb5/src/tests/asn.1/ldap_encode.out        |    1 -
 crypto/krb5/src/tests/asn.1/ldap_trval.out         |   30 -
 crypto/krb5/src/tests/asn.1/make-vectors.c         |  333 ----
 crypto/krb5/src/tests/asn.1/otp.asn1               |  109 --
 crypto/krb5/src/tests/asn.1/pkinit-agility.asn1    |   99 --
 crypto/krb5/src/tests/asn.1/pkinit.asn1            |  253 ---
 crypto/krb5/src/tests/asn.1/pkinit_encode.out      |    8 -
 crypto/krb5/src/tests/asn.1/pkinit_trval.out       |   97 --
 crypto/krb5/src/tests/asn.1/pkix.asn1              |  654 -------
 crypto/krb5/src/tests/asn.1/reference_encode.out   |   78 -
 crypto/krb5/src/tests/asn.1/spake.asn1             |   44 -
 crypto/krb5/src/tests/asn.1/t_trval.c              |  105 --
 crypto/krb5/src/tests/asn.1/trval.c                |  742 --------
 crypto/krb5/src/tests/asn.1/trval_reference.out    | 1584 -----------------
 crypto/krb5/src/tests/asn.1/utility.c              |  142 --
 crypto/krb5/src/tests/asn.1/utility.h              |   57 -
 crypto/krb5/src/tests/au_dict.json                 |   64 -
 crypto/krb5/src/tests/conccache.c                  |  190 ---
 crypto/krb5/src/tests/create/Makefile.in           |   17 -
 crypto/krb5/src/tests/create/deps                  |   14 -
 crypto/krb5/src/tests/create/kdb5_mkdums.c         |  398 -----
 crypto/krb5/src/tests/deps                         |  181 --
 crypto/krb5/src/tests/dumpfiles/dump               |   11 -
 crypto/krb5/src/tests/dumpfiles/dump.16            |    7 -
 crypto/krb5/src/tests/dumpfiles/dump.b7            |   11 -
 crypto/krb5/src/tests/dumpfiles/dump.ov            |    9 -
 crypto/krb5/src/tests/dumpfiles/dump.r13           |   11 -
 crypto/krb5/src/tests/dumpfiles/dump.r18           |   11 -
 crypto/krb5/src/tests/etinfo.c                     |  172 --
 crypto/krb5/src/tests/forward.c                    |   93 -
 crypto/krb5/src/tests/fuzzing/Makefile.in          |  138 --
 crypto/krb5/src/tests/fuzzing/README               |   26 -
 crypto/krb5/src/tests/fuzzing/deps                 |  222 ---
 crypto/krb5/src/tests/fuzzing/fuzz_aes.c           |  104 --
 .../tests/fuzzing/fuzz_aes_seed_corpus/input.bin   |    1 -
 crypto/krb5/src/tests/fuzzing/fuzz_asn.c           |  188 --
 .../decode_authenticator_3.bin                     |  Bin 165 -> 0 bytes
 .../decode_authenticator_4.bin                     |  Bin 168 -> 0 bytes
 .../decode_authenticator_6.bin                     |    2 -
 .../decode_enc_tkt_part_30.bin                     |  Bin 167 -> 0 bytes
 .../decode_encryption_key_15.bin                   |    2 -
 .../decode_encryption_key_21.bin                   |    2 -
 .../decode_encryption_key_22.bin                   |  Bin 20 -> 0 bytes
 .../decode_encryption_key_24.bin                   |    2 -
 .../decode_fail_encryption_key_16.bin              |  Bin 21 -> 0 bytes
 .../fuzz_asn_seed_corpus/encode_auth_pack_80.bin   |    4 -
 .../fuzz_asn_seed_corpus/encode_cammac_68.bin      |    1 -
 .../fuzz_asn_seed_corpus/encode_cammac_69.bin      |    3 -
 .../fuzz_asn_seed_corpus/encode_enc_data_47.bin    |  Bin 40 -> 0 bytes
 .../encode_kdc_dh_key_info_81.bin                  |  Bin 39 -> 0 bytes
 .../encode_kkdcp_message_67.bin                    |  Bin 512 -> 0 bytes
 .../encode_krb5_ad_kdcissued_54.bin                |    1 -
 .../encode_krb5_ap_rep_enc_part_16.bin             |    1 -
 .../fuzz_asn_seed_corpus/encode_krb5_ap_req_14.bin |  Bin 53 -> 0 bytes
 .../fuzz_asn_seed_corpus/encode_krb5_as_rep_10.bin |  Bin 197 -> 0 bytes
 .../fuzz_asn_seed_corpus/encode_krb5_as_req_19.bin |  Bin 107 -> 0 bytes
 .../encode_krb5_authdata_36.bin                    |    1 -
 .../encode_krb5_authenticator_2.bin                |    1 -
 .../fuzz_asn_seed_corpus/encode_krb5_cred_31.bin   |  Bin 249 -> 0 bytes
 .../encode_krb5_enc_cred_part_32.bin               |  Bin 551 -> 0 bytes
 .../encode_krb5_enc_cred_part_33.bin               |  Bin 274 -> 0 bytes
 .../encode_krb5_enc_kdc_rep_part_8.bin             |  Bin 181 -> 0 bytes
 .../encode_krb5_enc_priv_part_29.bin               |  Bin 81 -> 0 bytes
 .../encode_krb5_enc_priv_part_30.bin               |  Bin 33 -> 0 bytes
 .../encode_krb5_enc_tkt_part_5.bin                 |  Bin 280 -> 0 bytes
 .../encode_krb5_enc_tkt_part_7.bin                 |  Bin 274 -> 0 bytes
 .../fuzz_asn_seed_corpus/encode_krb5_error_34.bin  |    3 -
 .../fuzz_asn_seed_corpus/encode_krb5_error_35.bin  |    1 -
 .../encode_krb5_etype_info2_43.bin                 |  Bin 83 -> 0 bytes
 .../encode_krb5_etype_info2_44.bin                 |  Bin 34 -> 0 bytes
 .../encode_krb5_etype_info_40.bin                  |  Bin 53 -> 0 bytes
 .../encode_krb5_etype_info_41.bin                  |  Bin 24 -> 0 bytes
 .../encode_krb5_fast_response_57.bin               |    2 -
 .../encode_krb5_iakerb_finished_56.bin             |    1 -
 .../encode_krb5_iakerb_header_55.bin               |    3 -
 .../encode_krb5_kdc_req_body_24.bin                |  Bin 258 -> 0 bytes
 .../encode_krb5_tgs_rep_13.bin                     |  Bin 160 -> 0 bytes
 .../encode_krb5_tgs_req_23.bin                     |  Bin 426 -> 0 bytes
 .../encode_otp_tokeninfo_61.bin                    |  Bin 116 -> 0 bytes
 .../encode_pa_enc_ts (no usec)_45.bin              |    1 -
 .../fuzz_asn_seed_corpus/encode_pa_for_user_53.bin |    2 -
 .../encode_pa_fx_fast_reply_59.bin                 |  Bin 43 -> 0 bytes
 .../encode_pa_otp_challenge_63.bin                 |  Bin 168 -> 0 bytes
 .../fuzz_asn_seed_corpus/encode_pa_otp_req_64.bin  |  Bin 46 -> 0 bytes
 .../fuzz_asn_seed_corpus/encode_pa_otp_req_65.bin  |  Bin 188 -> 0 bytes
 .../encode_pa_pk_as_rep_78.bin                     |    3 -
 .../encode_pa_pk_as_rep_79.bin                     |    1 -
 .../encode_pa_s4u_x509_user_54.bin                 |  Bin 106 -> 0 bytes
 .../fuzz_asn_seed_corpus/encode_pa_spake_73.bin    |    2 -
 .../fuzz_asn_seed_corpus/encode_pa_spake_74.bin    |    1 -
 .../fuzz_asn_seed_corpus/encode_pa_spake_75.bin    |  Bin 54 -> 0 bytes
 .../fuzz_asn_seed_corpus/encode_pa_spake_76.bin    |  Bin 39 -> 0 bytes
 .../encode_padata_sequence_38.bin                  |  Bin 2 -> 0 bytes
 .../fuzz_asn_seed_corpus/encode_priv_28.bin        |  Bin 53 -> 0 bytes
 .../encode_reply_key_pack_82.bin                   |    2 -
 .../fuzz_asn_seed_corpus/encode_safe_26.bin        |  Bin 112 -> 0 bytes
 .../fuzz_asn_seed_corpus/encode_safe_27.bin        |  Bin 64 -> 0 bytes
 .../encode_sam_challenge_2_49.bin                  |    1 -
 .../encode_sam_challenge_2_body_50.bin             |  Bin 102 -> 0 bytes
 .../encode_sam_response_2_51.bin                   |  Bin 68 -> 0 bytes
 .../encode_secure_cookie_70.bin                    |    1 -
 .../encode_sp80056a_other_info_83.bin              |    2 -
 .../encode_spake_factor_71.bin                     |    1 -
 .../fuzz_asn_seed_corpus/encode_tgs_rep_11.bin     |  Bin 237 -> 0 bytes
 .../fuzz_asn_seed_corpus/encode_tgs_rep_12.bin     |  Bin 197 -> 0 bytes
 .../fuzz_asn_seed_corpus/encode_tgs_req_20.bin     |  Bin 488 -> 0 bytes
 .../fuzz_asn_seed_corpus/encode_tgs_req_21.bin     |  Bin 280 -> 0 bytes
 .../fuzz_asn_seed_corpus/encode_ticket_3.bin       |  Bin 94 -> 0 bytes
 crypto/krb5/src/tests/fuzzing/fuzz_attrset.c       |   68 -
 .../fuzzing/fuzz_attrset_seed_corpus/t_attrset.bin |    2 -
 crypto/krb5/src/tests/fuzzing/fuzz_chpw.c          |   65 -
 .../fuzz_chpw_seed_corpus/result_ad_age.bin        |  Bin 30 -> 0 bytes
 .../fuzz_chpw_seed_corpus/result_ad_all.bin        |  Bin 30 -> 0 bytes
 .../fuzz_chpw_seed_corpus/result_ad_complex.bin    |  Bin 30 -> 0 bytes
 .../fuzz_chpw_seed_corpus/result_ad_history.bin    |  Bin 30 -> 0 bytes
 .../fuzz_chpw_seed_corpus/result_ad_length.bin     |  Bin 30 -> 0 bytes
 .../fuzz_chpw_seed_corpus/result_invalid_utf8.bin  |  Bin 19 -> 0 bytes
 .../fuzzing/fuzz_chpw_seed_corpus/result_utf8.bin  |    1 -
 crypto/krb5/src/tests/fuzzing/fuzz_crypto.c        |  171 --
 .../fuzzing/fuzz_crypto_seed_corpus/input.bin      |    1 -
 crypto/krb5/src/tests/fuzzing/fuzz_des.c           |  109 --
 .../tests/fuzzing/fuzz_des_seed_corpus/input.bin   |    1 -
 crypto/krb5/src/tests/fuzzing/fuzz_gss.c           |   73 -
 .../fuzz_gss_seed_corpus/establish_contexts_ex.bin |  Bin 469 -> 0 bytes
 .../gss_accept_sec_context_kerberos.bin            |  Bin 599 -> 0 bytes
 .../gss_accept_sec_context_spnego.bin              |  Bin 664 -> 0 bytes
 .../fuzzing/fuzz_gss_seed_corpus/realm_query.bin   |  Bin 18 -> 0 bytes
 .../fuzz_gss_seed_corpus/start_accept_context.bin  |  Bin 212 -> 0 bytes
 crypto/krb5/src/tests/fuzzing/fuzz_json.c          |   74 -
 .../fuzzing/fuzz_json_seed_corpus/seed_1.json      |    1 -
 .../fuzzing/fuzz_json_seed_corpus/seed_2.json      |    1 -
 .../fuzzing/fuzz_json_seed_corpus/seed_3.json      |    1 -
 crypto/krb5/src/tests/fuzzing/fuzz_kdc.c           |   72 -
 .../tests/fuzzing/fuzz_kdc_seed_corpus/input.bin   |    1 -
 crypto/krb5/src/tests/fuzzing/fuzz_krad.c          |   93 -
 .../fuzzing/fuzz_krad_seed_corpus/do_auth_1.bin    |  Bin 20 -> 0 bytes
 crypto/krb5/src/tests/fuzzing/fuzz_krb.c           |  170 --
 crypto/krb5/src/tests/fuzzing/fuzz_krb5_ticket.c   |   85 -
 .../fuzzing/fuzz_krb5_ticket_seed_corpus/gcred.bin |  Bin 470 -> 0 bytes
 .../fuzz_krb5_ticket_seed_corpus/s4u2proxy.bin     |  Bin 505 -> 0 bytes
 .../tests/fuzzing/fuzz_krb_seed_corpus/deltat.bin  |    1 -
 .../fuzzing/fuzz_krb_seed_corpus/enctype_1.bin     |    1 -
 .../fuzzing/fuzz_krb_seed_corpus/enctype_2.bin     |    1 -
 .../fuzzing/fuzz_krb_seed_corpus/enctype_3.bin     |    1 -
 .../fuzzing/fuzz_krb_seed_corpus/enctype_4.bin     |    1 -
 .../fuzzing/fuzz_krb_seed_corpus/enctype_5.bin     |    1 -
 .../fuzzing/fuzz_krb_seed_corpus/enctype_6.bin     |    1 -
 .../fuzzing/fuzz_krb_seed_corpus/enctype_7.bin     |    1 -
 .../fuzz_krb_seed_corpus/host_string_11.bin        |    1 -
 .../fuzz_krb_seed_corpus/host_string_12.bin        |    1 -
 .../fuzzing/fuzz_krb_seed_corpus/host_string_2.bin |    1 -
 .../fuzzing/fuzz_krb_seed_corpus/host_string_4.bin |    1 -
 .../fuzzing/fuzz_krb_seed_corpus/host_string_5.bin |    1 -
 .../fuzzing/fuzz_krb_seed_corpus/host_string_8.bin |    1 -
 .../fuzzing/fuzz_krb_seed_corpus/host_string_9.bin |    1 -
 .../fuzzing/fuzz_krb_seed_corpus/parse_name.bin    |    1 -
 .../fuzz_krb_seed_corpus/principal_425_name.bin    |    1 -
 crypto/krb5/src/tests/fuzzing/fuzz_marshal_cred.c  |   69 -
 .../cred_1_input_1.bin                             |  Bin 165 -> 0 bytes
 .../cred_1_input_2.bin                             |  Bin 173 -> 0 bytes
 .../cred_1_input_4.bin                             |  Bin 173 -> 0 bytes
 .../cred_2_input_1.bin                             |  Bin 113 -> 0 bytes
 .../cred_2_input_2.bin                             |  Bin 121 -> 0 bytes
 .../cred_2_input_4.bin                             |  Bin 121 -> 0 bytes
 crypto/krb5/src/tests/fuzzing/fuzz_marshal_princ.c |   69 -
 .../princ_input_1.bin                              |  Bin 33 -> 0 bytes
 .../princ_input_2.bin                              |  Bin 37 -> 0 bytes
 .../princ_input_4.bin                              |  Bin 37 -> 0 bytes
 crypto/krb5/src/tests/fuzzing/fuzz_ndr.c           |   67 -
 .../fuzzing/fuzz_ndr_seed_corpus/s4u_di_double.bin |  Bin 264 -> 0 bytes
 .../fuzzing/fuzz_ndr_seed_corpus/s4u_di_long.bin   |  Bin 184 -> 0 bytes
 crypto/krb5/src/tests/fuzzing/fuzz_oid.c           |   65 -
 .../tests/fuzzing/fuzz_oid_seed_corpus/oid_19.bin  |    1 -
 .../tests/fuzzing/fuzz_oid_seed_corpus/oid_20.bin  |  Bin 2 -> 0 bytes
 .../tests/fuzzing/fuzz_oid_seed_corpus/oid_21.bin  |  Bin 3 -> 0 bytes
 .../tests/fuzzing/fuzz_oid_seed_corpus/oid_22.bin  |  Bin 2 -> 0 bytes
 .../tests/fuzzing/fuzz_oid_seed_corpus/oid_24.bin  |  Bin 4 -> 0 bytes
 .../tests/fuzzing/fuzz_oid_seed_corpus/oid_8.bin   |    1 -
 crypto/krb5/src/tests/fuzzing/fuzz_pac.c           |   93 -
 .../fuzz_pac_seed_corpus/s4u_pac_regular.bin       |  Bin 624 -> 0 bytes
 .../fuzzing/fuzz_pac_seed_corpus/saved_pac.bin     |  Bin 624 -> 0 bytes
 crypto/krb5/src/tests/fuzzing/fuzz_profile.c       |   87 -
 .../fuzzing/fuzz_profile_seed_corpus/final2.ini    |    5 -
 .../fuzzing/fuzz_profile_seed_corpus/final3.ini    |    6 -
 .../fuzzing/fuzz_profile_seed_corpus/final4.ini    |    6 -
 .../fuzzing/fuzz_profile_seed_corpus/final5.ini    |    5 -
 .../fuzzing/fuzz_profile_seed_corpus/modtest.conf  |    1 -
 .../fuzzing/fuzz_profile_seed_corpus/test3.ini     |    3 -
 .../fuzzing/fuzz_profile_seed_corpus/testinc.ini   |    6 -
 .../fuzzing/fuzz_profile_seed_corpus/testinc2.ini  |    2 -
 crypto/krb5/src/tests/fuzzing/fuzz_util.c          |  159 --
 .../tests/fuzzing/fuzz_util_seed_corpus/base64.txt |    1 -
 .../tests/fuzzing/fuzz_util_seed_corpus/hax.txt    |    1 -
 .../tests/fuzzing/fuzz_util_seed_corpus/host.txt   |    1 -
 .../tests/fuzzing/fuzz_util_seed_corpus/name.txt   |    1 -
 crypto/krb5/src/tests/fuzzing/oss-fuzz.sh          |   28 -
 crypto/krb5/src/tests/gcred.c                      |  124 --
 crypto/krb5/src/tests/gss-threads/Makefile.in      |   34 -
 crypto/krb5/src/tests/gss-threads/README           |  165 --
 crypto/krb5/src/tests/gss-threads/deps             |   15 -
 crypto/krb5/src/tests/gss-threads/gss-client.c     |  865 ----------
 crypto/krb5/src/tests/gss-threads/gss-misc.c       |  410 -----
 crypto/krb5/src/tests/gss-threads/gss-misc.h       |   51 -
 crypto/krb5/src/tests/gss-threads/gss-server.c     |  850 ---------
 crypto/krb5/src/tests/gssapi/Makefile.in           |  141 --
 crypto/krb5/src/tests/gssapi/ccinit.c              |   72 -
 crypto/krb5/src/tests/gssapi/ccrefresh.c           |   80 -
 crypto/krb5/src/tests/gssapi/common.c              |  282 ---
 crypto/krb5/src/tests/gssapi/common.h              |   90 -
 crypto/krb5/src/tests/gssapi/deps                  |  203 ---
 crypto/krb5/src/tests/gssapi/reload.c              |   83 -
 crypto/krb5/src/tests/gssapi/t_accname.c           |   93 -
 crypto/krb5/src/tests/gssapi/t_add_cred.c          |  137 --
 crypto/krb5/src/tests/gssapi/t_authind.py          |   51 -
 crypto/krb5/src/tests/gssapi/t_bindings.c          |  124 --
 crypto/krb5/src/tests/gssapi/t_bindings.py         |   61 -
 crypto/krb5/src/tests/gssapi/t_ccselect.c          |   90 -
 crypto/krb5/src/tests/gssapi/t_ccselect.py         |  164 --
 crypto/krb5/src/tests/gssapi/t_ciflags.c           |  120 --
 crypto/krb5/src/tests/gssapi/t_client_keytab.py    |  189 --
 crypto/krb5/src/tests/gssapi/t_context.c           |   60 -
 crypto/krb5/src/tests/gssapi/t_credstore.c         |  140 --
 crypto/krb5/src/tests/gssapi/t_credstore.py        |   97 --
 crypto/krb5/src/tests/gssapi/t_enctypes.c          |  205 ---
 crypto/krb5/src/tests/gssapi/t_enctypes.py         |  147 --
 crypto/krb5/src/tests/gssapi/t_err.c               |  126 --
 crypto/krb5/src/tests/gssapi/t_export_cred.c       |  115 --
 crypto/krb5/src/tests/gssapi/t_export_cred.py      |   50 -
 crypto/krb5/src/tests/gssapi/t_export_name.c       |  119 --
 crypto/krb5/src/tests/gssapi/t_gssapi.py           |  258 ---
 crypto/krb5/src/tests/gssapi/t_gssexts.c           |  247 ---
 crypto/krb5/src/tests/gssapi/t_iakerb.c            |   87 -
 crypto/krb5/src/tests/gssapi/t_imp_cred.c          |  101 --
 crypto/krb5/src/tests/gssapi/t_imp_name.c          |   94 -
 crypto/krb5/src/tests/gssapi/t_inq_cred.c          |  116 --
 crypto/krb5/src/tests/gssapi/t_inq_ctx.c           |  241 ---
 crypto/krb5/src/tests/gssapi/t_inq_mechs_name.c    |   64 -
 crypto/krb5/src/tests/gssapi/t_invalid.c           |  795 ---------
 crypto/krb5/src/tests/gssapi/t_iov.c               |  547 ------
 crypto/krb5/src/tests/gssapi/t_lifetime.c          |  140 --
 crypto/krb5/src/tests/gssapi/t_namingexts.c        |  227 ---
 crypto/krb5/src/tests/gssapi/t_negoex.py           |  149 --
 crypto/krb5/src/tests/gssapi/t_oid.c               |  224 ---
 crypto/krb5/src/tests/gssapi/t_pcontok.c           |  190 ---
 crypto/krb5/src/tests/gssapi/t_prf.c               |  190 ---
 crypto/krb5/src/tests/gssapi/t_s4u.c               |  334 ----
 crypto/krb5/src/tests/gssapi/t_s4u.py              |  403 -----
 crypto/krb5/src/tests/gssapi/t_s4u2proxy_krb5.c    |  164 --
 crypto/krb5/src/tests/gssapi/t_saslname.c          |  165 --
 crypto/krb5/src/tests/gssapi/t_spnego.c            |  314 ----
 crypto/krb5/src/tests/gssapi/t_srcattrs.c          |   63 -
 crypto/krb5/src/tests/gssapi/t_store_cred.c        |  114 --
 crypto/krb5/src/tests/gssapi/t_store_cred.py       |   80 -
 crypto/krb5/src/tests/hammer/Makefile.in           |   15 -
 crypto/krb5/src/tests/hammer/deps                  |   13 -
 crypto/krb5/src/tests/hammer/kdc5_hammer.c         |  494 ------
 crypto/krb5/src/tests/hammer/pp.c                  |   27 -
 crypto/krb5/src/tests/hist.c                       |  113 --
 crypto/krb5/src/tests/hooks.c                      |  253 ---
 crypto/krb5/src/tests/hrealm.c                     |   99 --
 crypto/krb5/src/tests/icinterleave.c               |  128 --
 crypto/krb5/src/tests/icred.c                      |  144 --
 crypto/krb5/src/tests/jsonwalker.py                |  105 --
 crypto/krb5/src/tests/kcmserver.py                 |  336 ----
 crypto/krb5/src/tests/kdbtest.c                    |  403 -----
 crypto/krb5/src/tests/localauth.c                  |   72 -
 crypto/krb5/src/tests/misc/Makefile.in             |   58 -
 crypto/krb5/src/tests/misc/deps                    |   44 -
 crypto/krb5/src/tests/misc/test_chpw_message.c     |  174 --
 crypto/krb5/src/tests/misc/test_cxx_gss.cpp        |   10 -
 crypto/krb5/src/tests/misc/test_cxx_k5int.cpp      |   20 -
 crypto/krb5/src/tests/misc/test_cxx_kadm5.cpp      |   15 -
 crypto/krb5/src/tests/misc/test_cxx_krb5.cpp       |   19 -
 crypto/krb5/src/tests/misc/test_cxx_rpc.cpp        |   14 -
 crypto/krb5/src/tests/misc/test_getpw.c            |   51 -
 crypto/krb5/src/tests/misc/test_getsockname.c      |  117 --
 crypto/krb5/src/tests/misc/test_nfold.c            |   66 -
 crypto/krb5/src/tests/pkinit-certs/ca.pem          |   29 -
 crypto/krb5/src/tests/pkinit-certs/eckey.pem       |    5 -
 crypto/krb5/src/tests/pkinit-certs/ecuser.pem      |   24 -
 crypto/krb5/src/tests/pkinit-certs/generic.p12     |  Bin 2560 -> 0 bytes
 crypto/krb5/src/tests/pkinit-certs/generic.pem     |   21 -
 crypto/krb5/src/tests/pkinit-certs/kdc.pem         |   29 -
 crypto/krb5/src/tests/pkinit-certs/make-certs.sh   |  179 --
 crypto/krb5/src/tests/pkinit-certs/privkey-enc.pem |   30 -
 crypto/krb5/src/tests/pkinit-certs/privkey.pem     |   28 -
 crypto/krb5/src/tests/pkinit-certs/user-enc.p12    |  Bin 2920 -> 0 bytes
 crypto/krb5/src/tests/pkinit-certs/user-upn.p12    |  Bin 2912 -> 0 bytes
 crypto/krb5/src/tests/pkinit-certs/user-upn.pem    |   28 -
 crypto/krb5/src/tests/pkinit-certs/user-upn2.p12   |  Bin 2896 -> 0 bytes
 crypto/krb5/src/tests/pkinit-certs/user-upn2.pem   |   28 -
 crypto/krb5/src/tests/pkinit-certs/user-upn3.p12   |  Bin 2912 -> 0 bytes
 crypto/krb5/src/tests/pkinit-certs/user-upn3.pem   |   28 -
 crypto/krb5/src/tests/pkinit-certs/user.p12        |  Bin 2920 -> 0 bytes
 crypto/krb5/src/tests/pkinit-certs/user.pem        |   28 -
 crypto/krb5/src/tests/plugorder.c                  |   96 --
 crypto/krb5/src/tests/proxy-certs/ca.pem           |   28 -
 crypto/krb5/src/tests/proxy-certs/make-certs.sh    |  124 --
 crypto/krb5/src/tests/proxy-certs/proxy-badsig.pem |   56 -
 crypto/krb5/src/tests/proxy-certs/proxy-ideal.pem  |   56 -
 .../krb5/src/tests/proxy-certs/proxy-no-match.pem  |   54 -
 crypto/krb5/src/tests/proxy-certs/proxy-san.pem    |   56 -
 .../krb5/src/tests/proxy-certs/proxy-subject.pem   |   54 -
 crypto/krb5/src/tests/rdreq.c                      |  118 --
 crypto/krb5/src/tests/replay.c                     |  172 --
 crypto/krb5/src/tests/responder.c                  |  431 -----
 crypto/krb5/src/tests/s2p.c                        |   81 -
 crypto/krb5/src/tests/s4u2proxy.c                  |  147 --
 crypto/krb5/src/tests/s4u2self.c                   |  128 --
 crypto/krb5/src/tests/shlib/Makefile.in            |   23 -
 crypto/krb5/src/tests/shlib/deps                   |    8 -
 crypto/krb5/src/tests/shlib/t_loader.c             |  374 ----
 crypto/krb5/src/tests/t_alias.py                   |  124 --
 crypto/krb5/src/tests/t_audit.py                   |   27 -
 crypto/krb5/src/tests/t_authdata.py                |  362 ----
 crypto/krb5/src/tests/t_bogus_kdc_req.py           |   42 -
 crypto/krb5/src/tests/t_ccache.py                  |  202 ---
 crypto/krb5/src/tests/t_certauth.py                |   65 -
 crypto/krb5/src/tests/t_changepw.py                |   70 -
 crypto/krb5/src/tests/t_crossrealm.py              |  192 ---
 crypto/krb5/src/tests/t_cve-2012-1014.py           |   29 -
 crypto/krb5/src/tests/t_cve-2012-1015.py           |   36 -
 crypto/krb5/src/tests/t_cve-2013-1416.py           |   13 -
 crypto/krb5/src/tests/t_cve-2013-1417.py           |   11 -
 crypto/krb5/src/tests/t_cve-2021-36222.py          |   46 -
 crypto/krb5/src/tests/t_dump.py                    |   94 -
 crypto/krb5/src/tests/t_errmsg.py                  |   27 -
 crypto/krb5/src/tests/t_etype_info.py              |   69 -
 crypto/krb5/src/tests/t_general.py                 |   74 -
 crypto/krb5/src/tests/t_hooks.py                   |    8 -
 crypto/krb5/src/tests/t_hostrealm.py               |  140 --
 crypto/krb5/src/tests/t_inetd.c                    |  128 --
 crypto/krb5/src/tests/t_iprop.py                   |  520 ------
 crypto/krb5/src/tests/t_kadm5_auth.py              |   80 -
 crypto/krb5/src/tests/t_kadm5_hook.py              |   15 -
 crypto/krb5/src/tests/t_kadmin.py                  |   66 -
 crypto/krb5/src/tests/t_kadmin_acl.py              |  450 -----
 crypto/krb5/src/tests/t_kadmin_parsing.py          |   82 -
 crypto/krb5/src/tests/t_kdb.py                     |  637 -------
 crypto/krb5/src/tests/t_kdb_locking.py             |   32 -
 crypto/krb5/src/tests/t_kdc_log.py                 |   21 -
 crypto/krb5/src/tests/t_kdcoptions.py              |  100 --
 crypto/krb5/src/tests/t_kdcpolicy.py               |   65 -
 crypto/krb5/src/tests/t_keydata.py                 |   49 -
 crypto/krb5/src/tests/t_keyrollover.py             |  100 --
 crypto/krb5/src/tests/t_keytab.py                  |  209 ---
 crypto/krb5/src/tests/t_kprop.py                   |  125 --
 crypto/krb5/src/tests/t_localauth.py               |  154 --
 crypto/krb5/src/tests/t_mkey.py                    |  344 ----
 crypto/krb5/src/tests/t_otp.py                     |  275 ---
 crypto/krb5/src/tests/t_pkinit.py                  |  469 -----
 crypto/krb5/src/tests/t_policy.py                  |  222 ---
 crypto/krb5/src/tests/t_preauth.py                 |  265 ---
 crypto/krb5/src/tests/t_princflags.py              |  138 --
 crypto/krb5/src/tests/t_proxy.py                   |  220 ---
 crypto/krb5/src/tests/t_pwqual.py                  |   78 -
 crypto/krb5/src/tests/t_rdreq.py                   |  138 --
 crypto/krb5/src/tests/t_referral.py                |  142 --
 crypto/krb5/src/tests/t_renew.py                   |  122 --
 crypto/krb5/src/tests/t_renprinc.py                |   45 -
 crypto/krb5/src/tests/t_replay.py                  |    6 -
 crypto/krb5/src/tests/t_salt.py                    |   55 -
 crypto/krb5/src/tests/t_sendto_kdc.py              |   45 -
 crypto/krb5/src/tests/t_sesskeynego.py             |   94 -
 crypto/krb5/src/tests/t_skew.py                    |   55 -
 crypto/krb5/src/tests/t_sn2princ.py                |  167 --
 crypto/krb5/src/tests/t_spake.py                   |  149 --
 crypto/krb5/src/tests/t_stringattr.py              |   41 -
 crypto/krb5/src/tests/t_tabdump.py                 |   86 -
 crypto/krb5/src/tests/t_u2u.py                     |   60 -
 crypto/krb5/src/tests/t_unlockiter.py              |   20 -
 crypto/krb5/src/tests/t_y2038.py                   |   79 -
 crypto/krb5/src/tests/threads/Makefile.in          |   40 -
 crypto/krb5/src/tests/threads/deps                 |   27 -
 crypto/krb5/src/tests/threads/gss-perf.c           |  455 -----
 crypto/krb5/src/tests/threads/init_ctx.c           |  273 ---
 crypto/krb5/src/tests/threads/prof1.c              |  105 --
 crypto/krb5/src/tests/threads/profread.c           |  287 ----
 crypto/krb5/src/tests/threads/t_rcache.c           |  260 ---
 crypto/krb5/src/tests/unlockiter.c                 |  276 ---
 crypto/krb5/src/tests/verify/Makefile.in           |   16 -
 crypto/krb5/src/tests/verify/deps                  |   14 -
 crypto/krb5/src/tests/verify/kdb5_verify.c         |  440 -----
 crypto/krb5/src/tests/verify/pkey.c                |   24 -
 399 files changed, 41351 deletions(-)

diff --git a/crypto/krb5/src/tests/Makefile.in b/crypto/krb5/src/tests/Makefile.in
deleted file mode 100644
index 41ac0d3b2a29..000000000000
--- a/crypto/krb5/src/tests/Makefile.in
+++ /dev/null
@@ -1,203 +0,0 @@
-mydir=tests
-BUILDTOP=$(REL)..
-SUBDIRS = asn.1 create hammer verify gssapi shlib gss-threads misc threads \
-	@fuzz_dir@
-
-RUN_DB_TEST = $(RUN_SETUP) KRB5_KDC_PROFILE=kdc.conf KRB5_CONFIG=krb5.conf \
-	GSS_MECH_CONFIG=mech.conf LC_ALL=C $(VALGRIND)
-
-OBJS= adata.o conccache.o etinfo.o forward.o gcred.o hist.o hooks.o hrealm.o \
-	icinterleave.o icred.o kdbtest.o localauth.o plugorder.o rdreq.o \
-	replay.o responder.o s2p.o s4u2self.o s4u2proxy.o t_inetd.o \
-	unlockiter.o
-EXTRADEPSRCS= adata.c conccache.c etinfo.c forward.c gcred.c hist.c hooks.c \
-	hrealm.c icinterleave.c icred.c kdbtest.c localauth.c plugorder.c \
-	rdreq.c replay.c responder.c s2p.c s4u2self.c s4u2proxy.c t_inetd.c \
-	unlockiter.c
-
-TEST_DB = ./testdb
-TEST_REALM = FOO.TEST.REALM
-TEST_MKEY = footes
-TEST_NUM = 65
-TEST_DEPTH = 5
-TEST_PREFIX = "foo bar"
-
-KADMIN_OPTS= -d $(TEST_DB) -r $(TEST_REALM) -P $(TEST_MKEY)
-KTEST_OPTS= $(KADMIN_OPTS) -p $(TEST_PREFIX) -n $(TEST_NUM) -D $(TEST_DEPTH)
-
-adata: adata.o $(KRB5_BASE_DEPLIBS)
-	$(CC_LINK) -o $@ adata.o $(KRB5_BASE_LIBS)
-
-conccache: conccache.o $(KRB5_BASE_DEPLIBS)
-	$(CC_LINK) -o $@ conccache.o $(KRB5_BASE_LIBS)
-
-etinfo: etinfo.o $(KRB5_BASE_DEPLIBS)
-	$(CC_LINK) -o $@ etinfo.o $(KRB5_BASE_LIBS)
-
-forward: forward.o $(KRB5_BASE_DEPLIBS)
-	$(CC_LINK) -o $@ forward.o $(KRB5_BASE_LIBS)
-
-gcred: gcred.o $(KRB5_BASE_DEPLIBS)
-	$(CC_LINK) -o $@ gcred.o $(KRB5_BASE_LIBS)
-
-hist: hist.o $(KDB5_DEPLIBS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS)
-	$(CC_LINK) -o $@ hist.o $(KDB5_LIBS) $(KADMSRV_LIBS) $(KRB5_BASE_LIBS)
-
-hooks: hooks.o $(KRB5_BASE_DEPLIBS)
-	$(CC_LINK) -o $@ hooks.o $(KRB5_BASE_LIBS)
-
-hrealm: hrealm.o $(KRB5_BASE_DEPLIBS)
-	$(CC_LINK) -o $@ hrealm.o $(KRB5_BASE_LIBS)
-
-icinterleave: icinterleave.o $(KRB5_BASE_DEPLIBS)
-	$(CC_LINK) -o $@ icinterleave.o $(KRB5_BASE_LIBS)
-
-icred: icred.o $(KRB5_BASE_DEPLIBS)
-	$(CC_LINK) -o $@ icred.o $(KRB5_BASE_LIBS)
-
-kdbtest: kdbtest.o $(KDB5_DEPLIBS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS)
-	$(CC_LINK) -o $@ kdbtest.o $(KDB5_LIBS) $(KADMSRV_LIBS) \
-		$(KRB5_BASE_LIBS)
-
-localauth: localauth.o $(KRB5_BASE_DEPLIBS)
-	$(CC_LINK) -o $@ localauth.o $(KRB5_BASE_LIBS)
-
-plugorder: plugorder.o $(KRB5_BASE_DEPLIBS)
-	$(CC_LINK) -o $@ plugorder.o $(KRB5_BASE_LIBS)
-
-rdreq: rdreq.o $(KRB5_BASE_DEPLIBS)
-	$(CC_LINK) -o $@ rdreq.o $(KRB5_BASE_LIBS)
-
-replay: replay.o $(KRB5_BASE_DEPLIBS)
-	$(CC_LINK) -o $@ replay.o $(KRB5_BASE_LIBS)
-
-responder: responder.o $(KRB5_BASE_DEPLIBS)
-	$(CC_LINK) -o $@ responder.o $(KRB5_BASE_LIBS)
-
-s2p: s2p.o $(KRB5_BASE_DEPLIBS)
-	$(CC_LINK) -o $@ s2p.o $(KRB5_BASE_LIBS)
-
-s4u2self: s4u2self.o $(KRB5_BASE_DEPLIBS)
-	$(CC_LINK) -o $@ s4u2self.o $(KRB5_BASE_LIBS)
-
-s4u2proxy: s4u2proxy.o $(KRB5_BASE_DEPLIBS)
-	$(CC_LINK) -o $@ s4u2proxy.o $(KRB5_BASE_LIBS)
-
-t_inetd: t_inetd.o $(KRB5_BASE_DEPLIBS)
-	$(CC_LINK) -o $@ t_inetd.o $(LIBS) $(KRB5_BASE_LIBS)
-
-unlockiter: unlockiter.o $(KDB5_DEPLIBS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS)
-	$(CC_LINK) -o $@ unlockiter.o $(KDB5_LIBS) $(KADMSRV_LIBS) \
-		$(KRB5_BASE_LIBS)
-
-all-unix: t_inetd
-
-check-unix: kdb_check
-
-kdc.conf: Makefile
-	rm -rf kdc.conf
-	@echo "[realms]" > kdc.conf
-	@echo "$(TEST_REALM) = {" >> kdc.conf
-	@echo "  key_stash_file = `pwd`/stash_file" >> kdc.conf
-	@echo "}" >> kdc.conf
-
-krb5.conf: Makefile
-	cat $(top_srcdir)/config-files/krb5.conf > krb5.new
-	echo "[dbmodules]" >> krb5.new
-	echo " db_module_dir = `pwd`/../plugins/kdb" >> krb5.new
-	mv krb5.new krb5.conf
-
-kdb_check: kdc.conf krb5.conf
-	$(RM) $(TEST_DB)*
-	$(RUN_DB_TEST) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) create -W
-	$(RUN_DB_TEST) ../tests/create/kdb5_mkdums $(KTEST_OPTS)
-	$(RUN_DB_TEST) ../tests/verify/kdb5_verify $(KTEST_OPTS)
-	$(RUN_DB_TEST) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) dump $(TEST_DB).dump
-	$(RUN_DB_TEST) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) destroy -f
-	@echo "====> NOTE!"
-	@echo "The following 'create' command is needed due to a change"
-	@echo "in functionality caused by DAL integration.  See ticket 3973."
-	@echo ====
-	$(RUN_DB_TEST) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) create -W
-	$(RUN_DB_TEST) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) load $(TEST_DB).dump
-	$(RUN_DB_TEST) ../tests/verify/kdb5_verify $(KTEST_OPTS)
-	$(RUN_DB_TEST) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) dump $(TEST_DB).dump2
-	sort $(TEST_DB).dump > $(TEST_DB).sort
-	sort $(TEST_DB).dump2 > $(TEST_DB).sort2
-	cmp $(TEST_DB).sort $(TEST_DB).sort2
-	$(RUN_DB_TEST) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) destroy -f
-	$(RM) $(TEST_DB)* stash_file
-
-check-pytests: adata conccache etinfo forward gcred hist hooks hrealm
-check-pytests: icinterleave icred kdbtest localauth plugorder rdreq replay
-check-pytests: responder s2p s4u2proxy unlockiter s4u2self
-	$(RUNPYTEST) $(srcdir)/t_general.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_hooks.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_dump.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_iprop.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_kprop.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_policy.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_changepw.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_pkinit.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_otp.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_spake.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_localauth.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_kadm5_hook.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_kadm5_auth.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_pwqual.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_hostrealm.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_kdb_locking.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_keyrollover.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_renew.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_renprinc.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_ccache.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_stringattr.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_sesskeynego.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_crossrealm.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_referral.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_skew.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_keytab.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_kadmin.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_kadmin_acl.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_kadmin_parsing.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_kdb.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_keydata.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_mkey.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_rdreq.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_sn2princ.py $(PYTESTFLAGS) $(OFFLINE)
-	$(RUNPYTEST) $(srcdir)/t_cve-2012-1014.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_cve-2012-1015.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_cve-2013-1416.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_cve-2013-1417.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_cve-2021-36222.py $(PYTESTFLAGS)
-	$(RM) au.log
-	$(RUNPYTEST) $(srcdir)/t_audit.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/jsonwalker.py -d $(srcdir)/au_dict.json \
-			-i au.log
-	$(RUNPYTEST) $(srcdir)/t_salt.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_etype_info.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_bogus_kdc_req.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_kdc_log.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_proxy.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_unlockiter.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_errmsg.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_authdata.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_preauth.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_princflags.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_tabdump.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_certauth.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_y2038.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_kdcpolicy.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_u2u.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_kdcoptions.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_replay.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_sendto_kdc.py $(PYTESTFLAGS)
-	$(RUNPYTEST) $(srcdir)/t_alias.py $(PYTESTFLAGS)
-
-clean:
-	$(RM) adata conccache etinfo forward gcred hist hooks hrealm
-	$(RM) icinterleave icred kdbtest localauth plugorder rdreq replay
-	$(RM) responder s2p s4u2proxy s4u2self t_inetd unlockiter
-	$(RM) krb5.conf kdc.conf
-	$(RM) -rf kdc_realm/sandbox ldap
-	$(RM) au.log
diff --git a/crypto/krb5/src/tests/adata.c b/crypto/krb5/src/tests/adata.c
deleted file mode 100644
index 58981c971142..000000000000
--- a/crypto/krb5/src/tests/adata.c
+++ /dev/null
@@ -1,381 +0,0 @@
-/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* tests/adata.c - Test harness for KDC authorization data */
-/*
- * Copyright (C) 2014 by the Massachusetts Institute of Technology.
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Usage: ./adata [-c ccname] [-p clientprinc] serviceprinc
- *            [ad-type ad-contents ...]
- *
- * This program acquires credentials for the specified service principal, using
- * the specified or default ccache, possibly including requested authdata.  The
- * resulting ticket is decrypted using the default keytab, and the authdata in
- * the ticket are displayed to stdout.
- *
- * In the requested authdata types, the type may be prefixed with '?' for an
- * AD-IF-RELEVANT container, '!' for an AD-MANDATORY-FOR-KDC container, or '^'
- * for an AD-KDC-ISSUED container checksummed with a random AES256 key.
- * Multiple prefixes may be specified for nested container.
- *
- * In the output, authdata containers will be flattened and displayed with the
- * above prefixes or '+' for an AD-CAMMAC container.  AD-KDC-ISSUED and
- * AD-CAMMAC containers will be verified with the appropriate key.  Nested
- * containers only display the prefix for the innermost container.
- */
-
-#include 
-#include 
-
-static krb5_context ctx;
-
-static void display_authdata_list(krb5_authdata **list,
-                                  krb5_enc_tkt_part *enc_tkt,
-                                  krb5_keyblock *tktkey, char prefix_byte,
-                                  krb5_boolean pac_ok);
-
-static void
-check(krb5_error_code code)
-{
-    const char *errmsg;
-
-    if (code) {
-        errmsg = krb5_get_error_message(ctx, code);
-        fprintf(stderr, "%s\n", errmsg);
-        krb5_free_error_message(ctx, errmsg);
-        exit(1);
-    }
-}
-
-static krb5_authdatatype
-get_type_for_prefix(int prefix_byte)
-{
-    if (prefix_byte == '?')
-        return KRB5_AUTHDATA_IF_RELEVANT;
-    if (prefix_byte == '!')
-        return KRB5_AUTHDATA_MANDATORY_FOR_KDC;
-    if (prefix_byte == '^')
-        return KRB5_AUTHDATA_KDC_ISSUED;
-    if (prefix_byte == '+')
-        return KRB5_AUTHDATA_CAMMAC;
-    abort();
-}
-
-static int
-get_prefix_byte(krb5_authdata *ad)
-{
-    if (ad->ad_type == KRB5_AUTHDATA_IF_RELEVANT)
-        return '?';
-    if (ad->ad_type == KRB5_AUTHDATA_MANDATORY_FOR_KDC)
-        return '!';
-    if (ad->ad_type == KRB5_AUTHDATA_KDC_ISSUED)
-        return '^';
-    if (ad->ad_type == KRB5_AUTHDATA_CAMMAC)
-        return '+';
-    abort();
-}
-
-/* Construct a container of type ad_type for the single authdata element
- * content.  For KDC-ISSUED containers, use a random checksum key. */
-static krb5_authdata *
-make_container(krb5_authdatatype ad_type, krb5_authdata *content)
-{
-    krb5_authdata *list[2], **enclist, *ad;
-    krb5_keyblock kb;
-
-    list[0] = content;
-    list[1] = NULL;
-
-    if (ad_type == KRB5_AUTHDATA_KDC_ISSUED) {
-        check(krb5_c_make_random_key(ctx, ENCTYPE_AES256_CTS_HMAC_SHA1_96,
-                                     &kb));
-        check(krb5_make_authdata_kdc_issued(ctx, &kb, NULL, list, &enclist));
-        krb5_free_keyblock_contents(ctx, &kb);
-    } else {
-        check(krb5_encode_authdata_container(ctx, ad_type, list, &enclist));
-    }
-
-    /* Grab the first element from the encoded list and free the array. */
-    ad = enclist[0];
-    free(enclist);
-    return ad;
-}
-
-/* Parse typestr and contents into an authdata element. */
-static krb5_authdata *
-make_authdata(const char *typestr, const char *contents)
-{
-    krb5_authdata *inner_ad, *ad;
-
-    if (*typestr == '?' || *typestr == '!' || *typestr == '^') {
-        inner_ad = make_authdata(typestr + 1, contents);
-        ad = make_container(get_type_for_prefix(*typestr), inner_ad);
-        free(inner_ad->contents);
-        free(inner_ad);
-        return ad;
-    }
-
-    ad = malloc(sizeof(*ad));
-    assert(ad != NULL);
-    ad->magic = KV5M_AUTHDATA;
-    ad->ad_type = atoi(typestr);
-    ad->length = strlen(contents);
-    ad->contents = (unsigned char *)strdup(contents);
-    assert(ad->contents != NULL);
-    return ad;
-}
-
-static krb5_authdata **
-get_container_contents(krb5_authdata *ad, krb5_keyblock *skey,
-                       krb5_keyblock *tktkey)
-{
-    krb5_authdata **inner_ad;
-
-    if (ad->ad_type == KRB5_AUTHDATA_KDC_ISSUED)
-        check(krb5_verify_authdata_kdc_issued(ctx, skey, ad, NULL, &inner_ad));
-    else if (ad->ad_type == KRB5_AUTHDATA_CAMMAC)
-        check(k5_unwrap_cammac_svc(ctx, ad, tktkey, &inner_ad));
-    else
-        check(krb5_decode_authdata_container(ctx, ad->ad_type, ad, &inner_ad));
-    return inner_ad;
-}
-
-static int
-compare_uint32(const void *p1, const void *p2)
-{
-    uint32_t t1 = *(uint32_t *)p1, t2 = *(uint32_t *)p2;
-
-    return (t1 > t2) ? 1 : (t1 == t2) ? 0 : -1;
-}
-
-static void
-display_pac(krb5_authdata *ad, krb5_enc_tkt_part *enc_tkt,
-            krb5_keyblock *tktkey)
-{
-    krb5_pac pac;
-    size_t tlen, i;
-    uint32_t *types;
-
-    assert(ad->ad_type == KRB5_AUTHDATA_WIN2K_PAC);
-    check(krb5_pac_parse(ctx, ad->contents, ad->length, &pac));
-
-    check(krb5_pac_verify(ctx, pac, enc_tkt->times.authtime, enc_tkt->client,
-                          tktkey, NULL));
-
-    check(krb5_pac_get_types(ctx, pac, &tlen, &types));
-    qsort(types, tlen, sizeof(*types), compare_uint32);
-
-    printf("[");
-    for (i = 0; i < tlen; i++) {
-        printf("%d", (int)types[i]);
-        if (i + 1 < tlen)
-            printf(", ");
-    }
-    printf("]");
-
-    free(types);
-    krb5_pac_free(ctx, pac);
-}
-
-/* Decode and display authentication indicator authdata. */
-static void
-display_auth_indicator(krb5_authdata *ad)
-{
-    krb5_data **strs = NULL, **p;
-
-    check(k5_authind_decode(ad, &strs));
-    assert(strs != NULL);
-
-    printf("[");
-    for (p = strs; *p != NULL; p++) {
-        printf("%.*s", (int)(*p)->length, (*p)->data);
-        if (*(p + 1) != NULL)
-            printf(", ");
-    }
-    printf("]");
-    k5_free_data_ptr_list(strs);
-}
-
-/* Display ad as either a hex dump or ASCII text. */
-static void
-display_binary_or_ascii(krb5_authdata *ad)
-{
-    krb5_boolean binary = FALSE;
-    unsigned char *p;
-
-    for (p = ad->contents; p < ad->contents + ad->length; p++) {
-        if (!isascii(*p) || !isprint(*p))
-            binary = TRUE;
-    }
-    if (binary) {
-        for (p = ad->contents; p < ad->contents + ad->length; p++)
-            printf("%02X", *p);
-    } else {
-        printf("%.*s", (int)ad->length, ad->contents);
-    }
-}
-
-/* Display the contents of an authdata element, prefixed by prefix_byte.  skey
- * must be the ticket session key. */
-static void
-display_authdata(krb5_authdata *ad, krb5_enc_tkt_part *enc_tkt,
-                 krb5_keyblock *tktkey, int prefix_byte, krb5_boolean pac_ok)
-{
-    krb5_authdata **inner_ad;
-
-    if (ad->ad_type == KRB5_AUTHDATA_IF_RELEVANT ||
-        ad->ad_type == KRB5_AUTHDATA_MANDATORY_FOR_KDC ||
-        ad->ad_type == KRB5_AUTHDATA_KDC_ISSUED ||
-        ad->ad_type == KRB5_AUTHDATA_CAMMAC) {
-        if (ad->ad_type != KRB5_AUTHDATA_IF_RELEVANT)
-            pac_ok = FALSE;
-        /* Decode and display the contents. */
-        inner_ad = get_container_contents(ad, enc_tkt->session, tktkey);
-        display_authdata_list(inner_ad, enc_tkt, tktkey, get_prefix_byte(ad),
-                              pac_ok);
-        krb5_free_authdata(ctx, inner_ad);
-        return;
-    }
-
-    assert(pac_ok || ad->ad_type != KRB5_AUTHDATA_WIN2K_PAC);
-
-    printf("%c", prefix_byte);
-    printf("%d: ", (int)ad->ad_type);
-
-    if (ad->ad_type == KRB5_AUTHDATA_WIN2K_PAC)
-        display_pac(ad, enc_tkt, tktkey);
-    else if (ad->ad_type == KRB5_AUTHDATA_AUTH_INDICATOR)
-        display_auth_indicator(ad);
-    else
-        display_binary_or_ascii(ad);
-    printf("\n");
-}
-
-static void
-display_authdata_list(krb5_authdata **list, krb5_enc_tkt_part *tkt_enc,
-                      krb5_keyblock *tktkey, char prefix_byte,
-                      krb5_boolean pac_ok)
-{
-    if (list == NULL)
-        return;
-    /* Only expect a PAC in the first element, if at all. */
-    for (; *list != NULL; list++) {
-        display_authdata(*list, tkt_enc, tktkey, prefix_byte, pac_ok);
-        pac_ok = FALSE;
-    }
-}
-
-int
-main(int argc, char **argv)
-{
-    const char *ccname = NULL, *clientname = NULL;
-    krb5_principal client, server;
-    krb5_ccache ccache;
-    krb5_keytab keytab;
-    krb5_creds in_creds, *creds;
-    krb5_ticket *ticket;
-    krb5_authdata **req_authdata = NULL, *ad;
-    krb5_keytab_entry ktent;
-    size_t count;
-    int c;
-
-    check(krb5_init_context(&ctx));
-
-    while ((c = getopt(argc, argv, "+c:p:")) != -1) {
-        switch (c) {
-        case 'c':
-            ccname = optarg;
-            break;
-        case 'p':
-            clientname = optarg;
-            break;
-        default:
-            abort();
-        }
-    }
-    argv += optind;
-    /* Parse arguments. */
-    assert(*argv != NULL);
-    check(krb5_parse_name(ctx, *argv++, &server));
-
-    count = 0;
-    for (; argv[0] != NULL && argv[1] != NULL; argv += 2) {
-        ad = make_authdata(argv[0], argv[1]);
-        req_authdata = realloc(req_authdata,
-                               (count + 2) * sizeof(*req_authdata));
-        assert(req_authdata != NULL);
-        req_authdata[count++] = ad;
-        req_authdata[count] = NULL;
-    }
-    assert(*argv == NULL);
-
-    if (ccname != NULL)
-        check(krb5_cc_resolve(ctx, ccname, &ccache));
-    else
-        check(krb5_cc_default(ctx, &ccache));
-
-    if (clientname != NULL)
-        check(krb5_parse_name(ctx, clientname, &client));
-    else
-        check(krb5_cc_get_principal(ctx, ccache, &client));
-
-    memset(&in_creds, 0, sizeof(in_creds));
-    in_creds.client = client;
-    in_creds.server = server;
-    in_creds.authdata = req_authdata;
-
-    check(krb5_get_credentials(ctx, KRB5_GC_NO_STORE, ccache, &in_creds,
*** 43068 LINES SKIPPED ***

From nobody Wed Sep 24 22:17:08 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXB6D30hSz68X3M;
	Wed, 24 Sep 2025 22:17:08 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cXB6D2HBwz3LX9;
	Wed, 24 Sep 2025 22:17:08 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758752228;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=k8Gr02X4WNgCSJfjCZs46FSA65BKW+qRxFSEKvOnzp0=;
	b=dTLPUjmJil5HgxcBmPLyo+OrHuaoW75ayWdJl9fVcaK54/ssd7KjEEwgGmnkl/35aFnJV4
	ASU4UA2qbdDu8zSZJVEDg7JJwHWK9gEMGP7SWUlwn9cGp7ryvrQTThJltnYBpoNZoWjhKq
	RZcMxpKt2eOqCGdmfT0x/bmHucQmWvoVAbN/nK9Ed1YVLZweh5+Oa5Eav8pBVAVUlmjd+h
	scx8BftvokQ4n+uBIXzngoQtHy4DiWeAq+FYMr4/1YvuAVOMAUU08As86KEGO+2vUgOY1K
	SJ5PoPNcbEQ4TtaQtIW584j3QtYNduuOgQ2ba7OAiVyWnL1Yj8sZnox3EA/rGw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758752228;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=k8Gr02X4WNgCSJfjCZs46FSA65BKW+qRxFSEKvOnzp0=;
	b=Pz5uwzUqHJJk3yTGtc3fl9bMnSm18Q53h5DrbkNI5zaicb+9YLW01WQ+4nRtW/B2tExOL3
	9U1932Zz7tKhosE+Q7UbHe851AkKy/tcICsC8UAFThnuDAYukfiJdfca8/fvZIZT+rJU4I
	egpXYH0ie0/V6BW906nkF6GQ5q8KnHAP4U5hAkSnW6o1TYqbEEibzqbbRCS8gvzL3cjxrw
	qgLgzH+ashmYkgMvC7iD+qmqpb7X60NiGyAeGBuxNtzDOUtgYPIkV6dGdSUPGpPG5D2ZR3
	jNbor39ZJbI3sTiWPmB454ybyBoxbmtFlrC0iNgFLXI7qy1KL/u8EG2P/B9iCQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758752228; a=rsa-sha256; cv=none;
	b=NvCib/ZnfIMqN7CWHhSWYb02ww/V9TG5XBpzjuf55J/BefLMDd9YRc+6+VW6XyxzQpax0t
	TY1uIsKTiSiut4RR4SHgfRjPZUXtEEfr06HzD+4n6KUXPX3anNj/17ALUtxtHqh3SoSMvs
	muzG1ZsPzwYCdKILIU2IsI5T5e0BJ85sujYDCTqZN3MhMG7+A2shzqn6OUpcazZxpEr5av
	49LHYI5cqpKZp5zelQ7ZDtOcZbU9tKlLToY7sGWCh41fLXwZoS+7ULYx6bmS4Aq3ZfG5gb
	ed/44q9H+YFRJ3z56K14EI03L2uleTK21s6FxVjQm8BtSABmrLsdma57f7nhRg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXB6D1L1dzqhh;
	Wed, 24 Sep 2025 22:17:08 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58OMH813070845;
	Wed, 24 Sep 2025 22:17:08 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58OMH88x070842;
	Wed, 24 Sep 2025 22:17:08 GMT
	(envelope-from git)
Date: Wed, 24 Sep 2025 22:17:08 GMT
Message-Id: <202509242217.58OMH88x070842@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Enji Cooper 
Subject: git: a694dad26ba5 - stable/13 - factor: support OpenSSL 3
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/13
X-Git-Reftype: branch
X-Git-Commit: a694dad26ba59b815ce22e0d1b82c94e0467126d
Auto-Submitted: auto-generated

The branch stable/13 has been updated by ngie:

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

commit a694dad26ba59b815ce22e0d1b82c94e0467126d
Author:     Enji Cooper 
AuthorDate: 2023-05-27 04:55:12 +0000
Commit:     Enji Cooper 
CommitDate: 2025-09-24 05:36:59 +0000

    factor: support OpenSSL 3
    
    This change ports the BN APIs to an OpenSSL 3 compatible set of APIs.
    
    This removes the need for requesting OpenSSL 1.1 compatible APIs.
    
    MFC after:      1 week
    Reviewed by:    emaste
    Differential Revision:  https://reviews.freebsd.org/D40298
    
    (cherry picked from commit 537cd766435c80e61e72bb9369f77aa9630a1537)
---
 usr.bin/factor/factor.c | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/usr.bin/factor/factor.c b/usr.bin/factor/factor.c
index 279028572fe3..523547086f6d 100644
--- a/usr.bin/factor/factor.c
+++ b/usr.bin/factor/factor.c
@@ -206,7 +206,11 @@ pr_fact(BIGNUM *val)
 			if (!BN_sqr(bnfact, bnfact, ctx))
 				errx(1, "error in BN_sqr()");
 			if (BN_cmp(bnfact, val) > 0 ||
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+			    BN_check_prime(val, NULL, NULL) == 1)
+#else
 			    BN_is_prime_ex(val, PRIME_CHECKS, NULL, NULL) == 1)
+#endif
 				pr_print(val);
 			else
 				pollard_pminus1(val);
@@ -279,7 +283,11 @@ newbase:
 			errx(1, "error in BN_gcd()");
 
 		if (!BN_is_one(x)) {
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+			if (BN_check_prime(x, NULL, NULL) == 1)
+#else
 			if (BN_is_prime_ex(x, PRIME_CHECKS, NULL, NULL) == 1)
+#endif
 				pr_print(x);
 			else
 				pollard_pminus1(x);
@@ -288,8 +296,13 @@ newbase:
 			BN_div(num, NULL, val, x, ctx);
 			if (BN_is_one(num))
 				return;
-			if (BN_is_prime_ex(num, PRIME_CHECKS, NULL,
-			    NULL) == 1) {
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+			if (BN_check_prime(num, NULL, NULL) == 1)
+#else
+			if (BN_is_prime_ex(num, PRIME_CHECKS, NULL, NULL)
+			    == 1)
+#endif
+			{
 				pr_print(num);
 				fflush(stdout);
 				return;

From nobody Wed Sep 24 22:17:09 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXB6F5Jt6z68X7d;
	Wed, 24 Sep 2025 22:17:09 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cXB6F2sV5z3LSM;
	Wed, 24 Sep 2025 22:17:09 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758752229;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=UjLV1xgPY+ml4tTycRZnJP+HnRI0VU7QxDsL07+qcaY=;
	b=DkJB9zfKWCUbkq6QHS4Ws+eOO8oSR4ZyN/0RkZP2ZNafrFGCbAYTHrQvmWP6gVMXT/aVGE
	LHgD1U+cKgCSx862vxvDsYCJvl3w4ESICcHMZLatrK16sfqaQP3D/4VpBaNuvoOIurE88d
	b0BKBi0OmCPvSNeEqStiNb4JYwXDaqJ9m90q9iRriixLhxbWwWkinPxos2esSZLUJ2nnyJ
	MrgDKqHxpzAQTt4w1fll/Hb1bHbaXvokyQIVND5c49CEaktnZFaXcYe5Jf7rgtHwFvfIef
	2I20u1PelukF9qs9r2FtiYO24HU1VyjB4dJPjndCVHnobc8acmybXLqR+FPUGA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758752229;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=UjLV1xgPY+ml4tTycRZnJP+HnRI0VU7QxDsL07+qcaY=;
	b=gGpae+SC6w3Y8qfctjogVSVM1qy03EXAq0V4T7srvQPobTp1z9zDWvDyesrYuTJAsrIA9Y
	04KyvBLao1HIL1pupLoxDZCqdU4kLxSGYk+aZ9WCaGS226V5JorUoWYRKA6Jq4VejcH2xX
	Iuypk1XOCZi0l/HSixwcM0+LV7UF3li0JdPp3m+DaeF+dlGcylX/EshWqenCAJJbSwz9r1
	ar7qfWpLVCvtunTZFwnGhKQqWiZsyduzjD7g5HJFhXnTwHQMzvsZCg08PP1Rm2bP85kJnj
	KbqQXRX7Nvd6iPRbr0Yu3QbFzHOCCIU/d9pSI0xvPxlcWhXHeiAloDq6EwXumA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758752229; a=rsa-sha256; cv=none;
	b=BTp4pFUI/uer7+77sI7IZwO1Xw9ddCjaBXnx/VUZmcrHLJuj4CskiQU9mUObaEcNVopvyq
	CN9cLANpcZsSgBy72EzzGiCSeVp0swNTgLXXyagl+plBvOOKaT9b264gyPrRnKEGlunqNr
	eXZcDvAQXKofQ/9z/qwCX2LX9h5E+djEqT66Z4GO6Z/vjKdgpkebmHc2ozjr8EUD7pgMXF
	/TgTENGJ8Z6mB9Z1/o0a4vq7s3UpV5df8lLCRWMI0ho/p3+UzJk0eT83lbIKkx0L0XdwB7
	URFQAZxtwZUKEg62rvP65jlZTkyh43dyBDmse3d4c1rvpTKp3V+VhGQXBNpk2g==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXB6F1zTvzr6l;
	Wed, 24 Sep 2025 22:17:09 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58OMH9TE070877;
	Wed, 24 Sep 2025 22:17:09 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58OMH9SI070874;
	Wed, 24 Sep 2025 22:17:09 GMT
	(envelope-from git)
Date: Wed, 24 Sep 2025 22:17:09 GMT
Message-Id: <202509242217.58OMH9SI070874@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Enji Cooper 
Subject: git: 8782ceb94273 - stable/13 - Reduce ifdef soup by adding
  pre-3.0 compat support
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/13
X-Git-Reftype: branch
X-Git-Commit: 8782ceb94273915fd726cd1a62d7cc080837d397
Auto-Submitted: auto-generated

The branch stable/13 has been updated by ngie:

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

commit 8782ceb94273915fd726cd1a62d7cc080837d397
Author:     Enji Cooper 
AuthorDate: 2023-05-27 21:07:45 +0000
Commit:     Enji Cooper 
CommitDate: 2025-09-24 05:36:59 +0000

    Reduce ifdef soup by adding pre-3.0 compat support
    
    This change creates a static inline function, BN_check_prime, for
    pre-3.0 use which is implemented with the previous (1.1) compatible call
    under the covers, `BN_is_prime_ex`.
    
    The `nchecks` parameter value is maintained, even though it has no
    noticable behavior change, given that the documentation clearly states
    that at least 64 or 128 rounds are executed on the backend, depending on
    how many bits there are in the given number being factored out.
    
    MFC after:      1 week
    Differential Revision:   https://reviews.freebsd.org/D40305
    
    (cherry picked from commit dcf5d5603b3af831002caa7b2f64aec8bda14071)
---
 usr.bin/factor/factor.c | 26 ++++++++++----------------
 1 file changed, 10 insertions(+), 16 deletions(-)

diff --git a/usr.bin/factor/factor.c b/usr.bin/factor/factor.c
index 523547086f6d..c183a6980edd 100644
--- a/usr.bin/factor/factor.c
+++ b/usr.bin/factor/factor.c
@@ -79,7 +79,15 @@ __RCSID("$NetBSD: factor.c,v 1.19 2009/08/12 05:54:31 dholland Exp $");
 
 #include 
 
-#define	PRIME_CHECKS	5
+#if OPENSSL_VERSION_NUMBER < 0x30000000L
+static inline int
+BN_check_prime(BN *p, BN_CTX *ctx, BN_GENCB *cb)
+{
+	const int nchecks = 5;
+
+	return BN_is_prime_ex(val, nchecks, ctx, cb);
+}
+#endif
 
 static void	pollard_pminus1(BIGNUM *); /* print factors for big numbers */
 
@@ -206,11 +214,7 @@ pr_fact(BIGNUM *val)
 			if (!BN_sqr(bnfact, bnfact, ctx))
 				errx(1, "error in BN_sqr()");
 			if (BN_cmp(bnfact, val) > 0 ||
-#if OPENSSL_VERSION_NUMBER >= 0x30000000L
 			    BN_check_prime(val, NULL, NULL) == 1)
-#else
-			    BN_is_prime_ex(val, PRIME_CHECKS, NULL, NULL) == 1)
-#endif
 				pr_print(val);
 			else
 				pollard_pminus1(val);
@@ -283,11 +287,7 @@ newbase:
 			errx(1, "error in BN_gcd()");
 
 		if (!BN_is_one(x)) {
-#if OPENSSL_VERSION_NUMBER >= 0x30000000L
 			if (BN_check_prime(x, NULL, NULL) == 1)
-#else
-			if (BN_is_prime_ex(x, PRIME_CHECKS, NULL, NULL) == 1)
-#endif
 				pr_print(x);
 			else
 				pollard_pminus1(x);
@@ -296,13 +296,7 @@ newbase:
 			BN_div(num, NULL, val, x, ctx);
 			if (BN_is_one(num))
 				return;
-#if OPENSSL_VERSION_NUMBER >= 0x30000000L
-			if (BN_check_prime(num, NULL, NULL) == 1)
-#else
-			if (BN_is_prime_ex(num, PRIME_CHECKS, NULL, NULL)
-			    == 1)
-#endif
-			{
+			if (BN_check_prime(num, NULL, NULL) == 1) {
 				pr_print(num);
 				fflush(stdout);
 				return;

From nobody Wed Sep 24 22:17:10 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXB6G6VHbz68X5n;
	Wed, 24 Sep 2025 22:17:10 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cXB6G3K3Gz3L9V;
	Wed, 24 Sep 2025 22:17:10 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758752230;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=MRWSDSqZVxWFMhm2LjCzPbLQpz61Dku9Ve4YCK8b8uk=;
	b=bDWTsQ2Ig2HmVkUMDM6rKYymyw7uu/tJCpLIX7Havh1tvCtKLF0DejD83ttVmMMy70RO5M
	tlx0pwkhsrefGVXOEvxIyW5lO7rfTaNm5uJWcj363BydnXiMauzn9pS6H+h4sQtFiKmEnL
	FdoxxfHvamhWVxotkEPWOyGOIyvLHSWYpEcqV/UG7LK0ce4FvOYgetGVycB99HTc4wX5XL
	wfqjKnx/LoFyyfXmv9N6FPMel+LU3NbEk+gDTqRnkpQeSBxQVRJ/SOSm//iYI62NQ1T8Hb
	6iJmSHOo9IGKzSOv9UysDS+dFBmSxykkQ4ipPjl/PUEgx1p6SoX74Z2JVtpPJg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758752230;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=MRWSDSqZVxWFMhm2LjCzPbLQpz61Dku9Ve4YCK8b8uk=;
	b=OhxSFkJaPWO5Eum1IQge6HO2nr7JnhYXOuqLfwhnUVhdEghbZCmXqPK6ZnGt2tBCPgSuLC
	9qtEfs0SjpcT2J92O24U+jVXmGp55aEQOA0eGLp34yuBhc0IDOeeO2ZRJd2mujxBZt+c8g
	Rx3aypg+c2HhxNmex0DEx/MgXiGLTKwO/cOC1PSAeJg86hHKHShSLz7mRr6O65VNnrCL7O
	kgSPlbCh4Chiz0ig/SJ9Zsz7Eto/F+KQMeECDIHWOIOoCLdgmYlFtAwrTeZ4fiKaaU/CeV
	Wac52Q4gcofoYHc/V1oflm3emCMR+DfXDdA7f1aSI3pFUADJdIogg56LlyKxuw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758752230; a=rsa-sha256; cv=none;
	b=KLO/+UrLNT6Kdb2sEN/oM3naFkDvybSvT/02ZzVe35hMv9i0jfBSwjYcii48AEFIk1Lmdf
	LYT4Mk5riiVivvhwksbfgoCXqEwdAM1+m7IwsNYIahA5j7gWodKPC6yugHjsMkK02oedHW
	VcpOaCR+4VXjUYXN0NJxGoP5FLJMw6hu7wLxKxxp0zgwTLU/EZ2sBEIsD+k+pvSrQreeor
	9vGrha6U5L9mziGS6gJCeXi17ryRLFhaHkbWhu2mJA/qB5FD1TU/CQYsXSE+ZpZG7ypEuT
	+S3rWLi7DnL72Wn4iahTS+I0ZFmf1iOXCp/KtU/7CpgOeX9gtGTqGlKXsj58hA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXB6G2wmRzr6m;
	Wed, 24 Sep 2025 22:17:10 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58OMHA5h070909;
	Wed, 24 Sep 2025 22:17:10 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58OMHAe1070906;
	Wed, 24 Sep 2025 22:17:10 GMT
	(envelope-from git)
Date: Wed, 24 Sep 2025 22:17:10 GMT
Message-Id: <202509242217.58OMHAe1070906@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Enji Cooper 
Subject: git: 08be83a3cb68 - stable/13 - Fix the build post-dcf5d5603b3af8
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
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/13
X-Git-Reftype: branch
X-Git-Commit: 08be83a3cb6802e27aa1f8aaf5f614b434f39737
Auto-Submitted: auto-generated

The branch stable/13 has been updated by ngie:

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

commit 08be83a3cb6802e27aa1f8aaf5f614b434f39737
Author:     Enji Cooper 
AuthorDate: 2023-05-28 02:16:39 +0000
Commit:     Enji Cooper 
CommitDate: 2025-09-24 05:36:59 +0000

    Fix the build post-dcf5d5603b3af8
    
    I didn't compile test the prior code before committing.
    
    MFC after:      1 week
    MFC with:       dcf5d5603b3af831002caa7b2f64aec8bda14071
    
    (cherry picked from commit 27234ad6999b760041fc53326268ac86e9fd2e80)
---
 usr.bin/factor/factor.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/usr.bin/factor/factor.c b/usr.bin/factor/factor.c
index c183a6980edd..53a369f10506 100644
--- a/usr.bin/factor/factor.c
+++ b/usr.bin/factor/factor.c
@@ -81,11 +81,11 @@ __RCSID("$NetBSD: factor.c,v 1.19 2009/08/12 05:54:31 dholland Exp $");
 
 #if OPENSSL_VERSION_NUMBER < 0x30000000L
 static inline int
-BN_check_prime(BN *p, BN_CTX *ctx, BN_GENCB *cb)
+BN_check_prime(BIGNUM *p, BN_CTX *ctx, BN_GENCB *cb)
 {
 	const int nchecks = 5;
 
-	return BN_is_prime_ex(val, nchecks, ctx, cb);
+	return BN_is_prime_ex(p, nchecks, ctx, cb);
 }
 #endif
 

From nobody Thu Sep 25 01:01:31 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXFlv5FPnz68kCm;
	Thu, 25 Sep 2025 01:01:31 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cXFlv4lcSz3b02;
	Thu, 25 Sep 2025 01:01:31 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758762091;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=rubzNNkA/awf3eS0v6g5G6T/joSA0+ZVu3qiTggqIMs=;
	b=ZThd8pFmvmiGcU2nPQAPL/DMDxyN8wLWoQq7ph/cP1Nz/tQvz2q4x5QP5szfLqgMXL2vji
	pDxjxwJf3h5fkHFk3ZEtv3FFI1WLpEL/GhpAX4zyE/eDhEFA4scrIB8ifpLB9U9nQAcEOw
	f3uDuIn07NPDR4tDz3Ghg2kaXR4jdDF2UgOpsoDzW1q1L4N2xhPaul8qqLqzoa3HjfjPRO
	yJ9MPOEdJhGUwZXF42OxYBGelfZCxP90n6GQ/0aeKIzA4vng5oT4VABruv6cQ/MxF1I1hT
	n3iB+qm97lsza7nT2+SBRUQeL/KGndvIv6me6PPirVu+5ibvFl0owpwPd9X9QA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758762091;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=rubzNNkA/awf3eS0v6g5G6T/joSA0+ZVu3qiTggqIMs=;
	b=YdJ8iPMOD9n11dihRV7PLOjflGzR55ewI13itniATCoAcM7FTiqLRiByeunH5Z3G1G9qaW
	vG0WvJqLQfI88rQvMtu7bxiH+H7DUMs00rxIqu7GoM3Ct5Azd3INRhgQ3Hqbr8ZvtJzg6U
	PkzuEb4pFglIpDhnYRT+ObmJdb0kGeIlPqfh2OVgONrpe3bhPn33LfUVyAR6eY7fhAt1zE
	cUFy3ReqaZ0d6kB0ZP785Ij+3+A1YJo4Krgeqi4RUUYg72W/363Kmswhqj6quc/pv6k+Ac
	g+wwh+2zgi7lFLGaJwC7mwwB66qi/SzIJm23/KetK6680oLXWIKh2lkglZxEfw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758762091; a=rsa-sha256; cv=none;
	b=oyZCDeLlIyl0EKMkuQDQNcMdJbON15fzaE9eqMdmKkG19mzKus15qBFF7GcMKrJA+SDidP
	34Dr1Iz+qNN5GQf8WnjqPaR7mEK2FmILIG3BGE9SfvJdPBQIorxmhhc+fJ/MJH9HBppuYd
	p67abBKcDuVDoDexEHX7kijl6EEQZYUnDZ2oLaRV0GDTbNjRNtJE520eMIcCfVCnBA0Wlh
	d13uelDGTPl5u+y4Ucu9bndbdA+5uNNptfe+N7UpYC2s7K/N3Z1sED2q1t2WSwemanpnuY
	a6s1LawzoGoy+kNWfDTKcADfVFr9PkHs3FXjQAtsaiVPbXoz3IE62YVLc2mzPg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXFlv4GV1zvQJ;
	Thu, 25 Sep 2025 01:01:31 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58P11VoY086633;
	Thu, 25 Sep 2025 01:01:31 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58P11VRG086630;
	Thu, 25 Sep 2025 01:01:31 GMT
	(envelope-from git)
Date: Thu, 25 Sep 2025 01:01:31 GMT
Message-Id: <202509250101.58P11VRG086630@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Lexi Winter 
Subject: git: 9b11dacb95d8 - stable/15 - packages: Move powerd to
  its own package
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ivy
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 9b11dacb95d8239320814e7d46234e8e9f66393e
Auto-Submitted: auto-generated

The branch stable/15 has been updated by ivy:

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

commit 9b11dacb95d8239320814e7d46234e8e9f66393e
Author:     Lexi Winter 
AuthorDate: 2025-09-23 21:05:05 +0000
Commit:     Lexi Winter 
CommitDate: 2025-09-25 01:00:40 +0000

    packages: Move powerd to its own package
    
    Nearly everyone wants powerd to manage CPU frequency scaling on real
    hardware, even if -utilities isn't installed.  Conversely, very small
    jails might want -utilities but don't need powerd.
    
    Move it to its own package and add it to the minimal set.
    
    MFC after:      1 day
    Reviewed by:    manu, imp
    Differential Revision:  https://reviews.freebsd.org/D52645
    
    (cherry picked from commit 5efd371bba1508ed94faed2afbd11936f5fe4dac)
---
 UPDATING                            |  7 +++++++
 libexec/rc/rc.d/Makefile            |  5 ++++-
 release/packages/ucl/powerd-all.ucl | 11 +++++++++++
 usr.sbin/powerd/Makefile            |  1 +
 4 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/UPDATING b/UPDATING
index c58e9afbbcca..52b7ebf4ad65 100644
--- a/UPDATING
+++ b/UPDATING
@@ -12,6 +12,13 @@ Items affecting the ports and packages system can be found in
 /usr/ports/UPDATING.  Please read that file before updating system packages
 and/or ports.
 
+20250924:
+	powerd has been moved to a new FreeBSD-powerd package.  If you have
+	FreeBSD-set-minimal installed, the new package will be installed
+	automatically, otherwise you may want to install it by hand.
+
+	This only affects pkgbase users.
+
 20250918:
 	The MANSPLITPKG knob has been turned off by default, so pkgbase builds
 	will no longer generate "-man" subpackages; instead the manpages will
diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile
index e5ee34e62185..d072039836d0 100644
--- a/libexec/rc/rc.d/Makefile
+++ b/libexec/rc/rc.d/Makefile
@@ -50,7 +50,6 @@ CONFS=	DAEMON \
 	${_nscd} \
 	${_opensm} \
 	os-release \
-	powerd \
 	pppoed \
 	pwcheck \
 	quota \
@@ -127,6 +126,10 @@ CONFGROUPS+=		NEWSYSLOG
 NEWSYSLOG=		newsyslog
 NEWSYSLOGPACKAGE=	newsyslog
 
+CONFGROUPS+=		POWERD
+POWERD=			powerd
+POWERDPACKAGE=		powerd
+
 CONFGROUPS+=		SYSLOGD
 SYSLOGD=		syslogd
 SYSLOGDPACKAGE=		syslogd
diff --git a/release/packages/ucl/powerd-all.ucl b/release/packages/ucl/powerd-all.ucl
new file mode 100644
index 000000000000..b6a2b3034f89
--- /dev/null
+++ b/release/packages/ucl/powerd-all.ucl
@@ -0,0 +1,11 @@
+comment = "System power control utility"
+
+desc = <
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Lexi Winter 
Subject: git: f100dddd8c51 - stable/15 - who: Move back to the
  utilities package
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ivy
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: f100dddd8c51e24497175f5026df8d28306017a1
Auto-Submitted: auto-generated

The branch stable/15 has been updated by ivy:

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

commit f100dddd8c51e24497175f5026df8d28306017a1
Author:     Lexi Winter 
AuthorDate: 2025-09-23 21:21:21 +0000
Commit:     Lexi Winter 
CommitDate: 2025-09-25 01:00:40 +0000

    who: Move back to the utilities package
    
    This was moved to -acct along with the rest of the accounting tools.
    While it does work with accounting data, it's also a core Unix tool
    that users would expect to be installed without having to install
    the whole accounting system.
    
    Move it back to -utilities, which is also where w(1) lives.
    
    MFC after:      1 day
    Reviewed by:    manu
    Differential Revision:  https://reviews.freebsd.org/D52653
    
    (cherry picked from commit ef4b08a7ed17b84b7d9c5b1dd4781bf4d90f90df)
---
 usr.bin/who/Makefile | 1 -
 1 file changed, 1 deletion(-)

diff --git a/usr.bin/who/Makefile b/usr.bin/who/Makefile
index 77626f51824a..c7c455d5261c 100644
--- a/usr.bin/who/Makefile
+++ b/usr.bin/who/Makefile
@@ -1,4 +1,3 @@
 PROG=	who
-PACKAGE=	acct
 
 .include 

From nobody Thu Sep 25 01:01:33 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXFly3bMtz68kLR;
	Thu, 25 Sep 2025 01:01:34 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cXFlx6d7nz3b7J;
	Thu, 25 Sep 2025 01:01:33 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758762093;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=KmA6epbNaPoza7EekaQ1yIQnCv9jw+fDTRt3xeTSdyQ=;
	b=q281pn5CdtrH/wHwYDw3icqKJp+clWoHCIDhqyU0485LP53TP2la0QXAPPHLHDNiVtA2q4
	P0Ve2mTv32eozK23inp//pF6FHNDeB5nmFkY9jB7cUeJ07eCtYxLlXHd9hFSCuyiOntWyL
	Vdekk7sGX93voffdTjrG0MSvMcSKYX4a9W3LxynGcNgeLJy715ce1wt2Cw+wYZu9oJTh+u
	wkCsEmAS5DiRYlU8OLiiJGuk3srQ4gjh4YhDyVu7UtIrabqgsqepyLd2TyvcoZrCkW3lEv
	ACIHi9S4yOVVB1hKWu2Zy1F0/hVB0VxgCt7OnJ7zPa7tz1NKhgWsrnb3rmloWg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758762093;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=KmA6epbNaPoza7EekaQ1yIQnCv9jw+fDTRt3xeTSdyQ=;
	b=s2kL2gDlWYGhwTXRNWiCXbClm141nxGblrPYtJimrNIDl8XpHxzI6pat59ECObe0/Hn2CE
	2gACL05QbcVuoehksnEP+ieSYH1m2mSNBBB89ZIrzJ87zLf1N1ql3zgY3onDvN+Z57J8bQ
	2uff8xcT9UcXj81RDddE9F3rWJ2GpyhMLAYlTBQPd8hn3eGfSDcj4uevOA/jYUGVdi3VIP
	69eqR7veHpkwhTKcKnzDLOP7b47wkJVX7KRW0MIqloYyTgvqzBU08P08nIKq6Ira0KqosD
	zwrMtBi17DTa5sU7S1HPc3nikO6rooWKdHYmUehOb32q+n+xnZE26Y7ofqGKhw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758762093; a=rsa-sha256; cv=none;
	b=jyMFsZMyN27oDGdzstv7ECzwdWtIft/MGty/ia6uq3Z43tfVzAIhcteevaa8qV5YlNjb5+
	envbVqgWaixw4u3knNc4vJXGP8/gDbgNUdXsDA+PRLX6ZWFejbwXUGEmCKQbUeZDBqm91F
	yL4q/TXkZZyoREtfxz33n37klo+v1p9SaTl1CIb07XpNN5EqN5KfVL8umkYbKSunS9+S/L
	ByolKBLyWSV/RW5pDKcTQ3XgQa7coauM/JMQ+BtEXQcb1fKAraNgvNQj/MLpdg3SbTSFUz
	QXKf/VW/d2lVsN3qXqMJ68yb6wxisDF0eP5z8XVSzaS5PJhNseSv3aELnfRhRA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXFlx6F10zw4Y;
	Thu, 25 Sep 2025 01:01:33 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58P11XhX086703;
	Thu, 25 Sep 2025 01:01:33 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58P11XMW086700;
	Thu, 25 Sep 2025 01:01:33 GMT
	(envelope-from git)
Date: Thu, 25 Sep 2025 01:01:33 GMT
Message-Id: <202509250101.58P11XMW086700@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Lexi Winter 
Subject: git: 846125d00353 - stable/15 - libpmc: Move libpmc and
  utils to a new pmc package
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ivy
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 846125d003534717be3fb8e076493e487237b394
Auto-Submitted: auto-generated

The branch stable/15 has been updated by ivy:

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

commit 846125d003534717be3fb8e076493e487237b394
Author:     Lexi Winter 
AuthorDate: 2025-09-23 21:30:49 +0000
Commit:     Lexi Winter 
CommitDate: 2025-09-25 01:00:40 +0000

    libpmc: Move libpmc and utils to a new pmc package
    
    Due to the size of libpmc.so.5, this reduces the size of the -utilities
    package by 10%.
    
    MFC after:      1 day
    Reviewed by:    manu, adrian, emaste
    Differential Revision:  https://reviews.freebsd.org/D52662
    
    (cherry picked from commit 67c3c3a274468d09925af3cf64da3f9cf878cc80)
---
 UPDATING                         |  6 +++++-
 lib/libpmc/Makefile              |  4 ++--
 release/packages/ucl/pmc-all.ucl | 12 ++++++++++++
 usr.sbin/pmc/Makefile            |  1 +
 usr.sbin/pmcannotate/Makefile    |  4 +---
 usr.sbin/pmccontrol/Makefile     |  4 +---
 usr.sbin/pmcstat/Makefile        |  4 +---
 usr.sbin/pmcstudy/Makefile       |  1 +
 8 files changed, 24 insertions(+), 12 deletions(-)

diff --git a/UPDATING b/UPDATING
index 52b7ebf4ad65..1b691f57d9a1 100644
--- a/UPDATING
+++ b/UPDATING
@@ -13,11 +13,15 @@ Items affecting the ports and packages system can be found in
 and/or ports.
 
 20250924:
+	Several changes which affect pkgbase users (only):
+
 	powerd has been moved to a new FreeBSD-powerd package.  If you have
 	FreeBSD-set-minimal installed, the new package will be installed
 	automatically, otherwise you may want to install it by hand.
 
-	This only affects pkgbase users.
+	libpmc and related utilities (/usr/sbin/pmc*) have moved to the new
+	FreeBSD-pmc package.  If you use these, you may want to install the
+	package.
 
 20250918:
 	The MANSPLITPKG knob has been turned off by default, so pkgbase builds
diff --git a/lib/libpmc/Makefile b/lib/libpmc/Makefile
index 8728b0c1c76d..590f719ebff4 100644
--- a/lib/libpmc/Makefile
+++ b/lib/libpmc/Makefile
@@ -1,5 +1,5 @@
-LIB_CXX= pmc
-
+PACKAGE=pmc
+LIB_CXX=pmc
 SRCS=	libpmc.c pmclog.c libpmc_pmu_util.c libpmc_json.cc
 INCS=	pmc.h pmclog.h pmcformat.h
 
diff --git a/release/packages/ucl/pmc-all.ucl b/release/packages/ucl/pmc-all.ucl
new file mode 100644
index 000000000000..5c8e44d264b2
--- /dev/null
+++ b/release/packages/ucl/pmc-all.ucl
@@ -0,0 +1,12 @@
+comment = "Support for hardware performance counters"
+
+desc = <
 
+PACKAGE=	pmc
 PROG_CXX=	pmc
 MAN=	
 CWARNFLAGS.gcc+= -Wno-redundant-decls
diff --git a/usr.sbin/pmcannotate/Makefile b/usr.sbin/pmcannotate/Makefile
index 8f408590a743..9c0eecbcafe3 100644
--- a/usr.sbin/pmcannotate/Makefile
+++ b/usr.sbin/pmcannotate/Makefile
@@ -1,6 +1,4 @@
-#
-#
-
+PACKAGE=pmc
 PROG=	pmcannotate
 MAN=	pmcannotate.8
 
diff --git a/usr.sbin/pmccontrol/Makefile b/usr.sbin/pmccontrol/Makefile
index de6224979a60..976ff05fb457 100644
--- a/usr.sbin/pmccontrol/Makefile
+++ b/usr.sbin/pmccontrol/Makefile
@@ -1,6 +1,4 @@
-#
-#
-
+PACKAGE=	pmc
 PROG_CXX=	pmccontrol
 MAN=	pmccontrol.8
 
diff --git a/usr.sbin/pmcstat/Makefile b/usr.sbin/pmcstat/Makefile
index 7e0c671e38ac..d09b05a445ec 100644
--- a/usr.sbin/pmcstat/Makefile
+++ b/usr.sbin/pmcstat/Makefile
@@ -1,6 +1,4 @@
-#
-#
-
+PACKAGE=	pmc
 PROG_CXX=	pmcstat
 MAN=	pmcstat.8
 
diff --git a/usr.sbin/pmcstudy/Makefile b/usr.sbin/pmcstudy/Makefile
index ca0efde8d61a..4e2355be3683 100644
--- a/usr.sbin/pmcstudy/Makefile
+++ b/usr.sbin/pmcstudy/Makefile
@@ -1,3 +1,4 @@
+PACKAGE=pmc
 PROG=	pmcstudy
 MAN=	pmcstudy.8
 SRCS= pmcstudy.c eval_expr.c

From nobody Thu Sep 25 01:01:34 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXFm012djz68kCv;
	Thu, 25 Sep 2025 01:01:36 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cXFlz10Hlz3b7S;
	Thu, 25 Sep 2025 01:01:35 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758762095;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=3N/N+vFUKRf+tONeUHsWOBacNfi1R2FlA5GYqJe/2go=;
	b=boOo2G7zD6FsxN7i236E21hb5tD8tw0hh7y/D5mZsVAXgoKEWkx6jUTzQbD2fGmOBxGIiV
	uu5cxnnUCUs76rJu+ZXb9fMRgx0thOaWGtdyZEdBmQNRJkVrSxOLRJiiB3QKePkpj+x85y
	0d/5desB0xFurMXi4QCKj5GDK2s1TqfY2dZ3R5JR/IKXW2z8EMw/6+KRCWGPPunu9KxNzY
	Lid5kgdGq9zXlwcx90zQ0cwAZBgA5UL827PrtF+4kNi5mMdQdcId/3ccdwVZFyXk+nBOPR
	0B0rEuxA7/QzQmaJ+d4oZ0iy13ikgTLH9h+A5sYO11ubvJKjDjh456zMIIqHdQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758762095;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=3N/N+vFUKRf+tONeUHsWOBacNfi1R2FlA5GYqJe/2go=;
	b=QKMepVi2YD+/+lPGL+Oiyt5L0uzDBzRc0yJ2plxYeGFFeQNVIGy0RV5mDuK1KeZpA4eRU3
	vF0yVa7z5ypmb2nIEHo98cWtFloK6+iHZs75Hd84fAujsYaCJN5e2/Rd0opNwvEVF1mAcX
	hj3JzP2ul9yw/rV9CzfSl0gQKcnoBA8enydUseupEzswNNwqn2AEg1Ubb5dQjBHKzgpL8H
	mjHX8rPApmPCG+I96+cRAEAllOIauKlkblzXkQ0apcNPZ1c+Rm1dZk5YheDdxM7a1Kmnk1
	Xml3h0QEpk6G20udCeXxo2lnlcLUcz0C2Houj18CI3dt+1+Jj99FN+vs8u3uAA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758762095; a=rsa-sha256; cv=none;
	b=PTbLSHpjRpkD5VQcxPCTC3B8dwih30zTampbjg7HtHpKWIDRsUHYxKbC4UpxdP7TTXrkBh
	1zBJW5Za9e/rUxs9dOK3cFUhveR0+TieHr79YllCQxWmAU9F7NXK8r4Sz8HvdenRBxhDCH
	w1OM2gdTQ/JvRB54LDXk0R3lBLTBDp410UZ/KWtxbIwZC8YCMktxknwWGp6ETkKVRAk/4M
	R0z9XNnHGO+IqMjhU4QTHRy+S2jcm42/zVYfxraWNl3ejwXf5SmjYPjXH6kuYZxhWsUQOx
	9gGNDswOyIfXB5GA51oKw/Ua3J43lhnDXR+zuH8KSPcwoRIFL+qMVfb90fPjsA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXFlz05HDzvr5;
	Thu, 25 Sep 2025 01:01:35 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58P11Yr8086737;
	Thu, 25 Sep 2025 01:01:34 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58P11YvG086734;
	Thu, 25 Sep 2025 01:01:34 GMT
	(envelope-from git)
Date: Thu, 25 Sep 2025 01:01:34 GMT
Message-Id: <202509250101.58P11YvG086734@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Lexi Winter 
Subject: git: 9f2493321188 - stable/15 - packages: Replace libbz2
  package with a bzip2 package
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ivy
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 9f2493321188f9a980fcbded1b03e58e43884afe
Auto-Submitted: auto-generated

The branch stable/15 has been updated by ivy:

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

commit 9f2493321188f9a980fcbded1b03e58e43884afe
Author:     Lexi Winter 
AuthorDate: 2025-09-23 21:37:06 +0000
Commit:     Lexi Winter 
CommitDate: 2025-09-25 01:00:40 +0000

    packages: Replace libbz2 package with a bzip2 package
    
    Currently libbz2 is in the libbz2 package, while bzip2 itself is in
    -utilities, which is inconsistent.  Move both the library and the
    utility to a new -bzip2 package, and use LIB_PACKAGE to create a
    separate -bzip2-lib package for runtime dependencies.
    
    Add the bzip2 package to the minimal set, and since newsyslogd uses
    bzip2 for logfile compression, add a dependency from there.
    
    MFC after:      1 day
    Reviewed by:    manu
    Differential Revision:  https://reviews.freebsd.org/D52663
    
    (cherry picked from commit 61ca69110f2676b7dd3c7ff8dea899615d341e1e)
---
 UPDATING                            |  5 +++++
 lib/libbz2/Makefile                 |  4 +++-
 release/packages/ucl/bzip2-all.ucl  | 12 ++++++++++++
 release/packages/ucl/libbz2-all.ucl |  5 -----
 release/packages/ucl/newsyslog.ucl  |  7 +++++++
 usr.bin/bzip2/Makefile              |  2 ++
 usr.bin/bzip2recover/Makefile       |  2 ++
 7 files changed, 31 insertions(+), 6 deletions(-)

diff --git a/UPDATING b/UPDATING
index 1b691f57d9a1..127540ebed39 100644
--- a/UPDATING
+++ b/UPDATING
@@ -23,6 +23,11 @@ and/or ports.
 	FreeBSD-pmc package.  If you use these, you may want to install the
 	package.
 
+	The libbz2 package has been renamed to bzip2, and /usr/bin/bzip2 has
+	been moved to the new package.  If you have set-minimal installed,
+	the new package will be added automatically, otherwise you may want
+	to manually install it.
+
 20250918:
 	The MANSPLITPKG knob has been turned off by default, so pkgbase builds
 	will no longer generate "-man" subpackages; instead the manpages will
diff --git a/lib/libbz2/Makefile b/lib/libbz2/Makefile
index f7ea21b1a085..d773f202dd67 100644
--- a/lib/libbz2/Makefile
+++ b/lib/libbz2/Makefile
@@ -1,4 +1,6 @@
-PACKAGE=	lib${LIB}
+PACKAGE=	bzip2
+LIB_PACKAGE=
+
 BZ2DIR=	${SRCTOP}/contrib/bzip2
 .PATH: ${BZ2DIR}
 
diff --git a/release/packages/ucl/bzip2-all.ucl b/release/packages/ucl/bzip2-all.ucl
new file mode 100644
index 000000000000..5bf1ef0c70fa
--- /dev/null
+++ b/release/packages/ucl/bzip2-all.ucl
@@ -0,0 +1,12 @@
+comment = "A block-sorting data compressor"
+
+desc = <
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Lexi Winter 
Subject: git: 20300ccbaf84 - stable/15 - packages: Add devd to the
  minimal-jail set
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ivy
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 20300ccbaf84afd303d5f288cb6282187c829959
Auto-Submitted: auto-generated

The branch stable/15 has been updated by ivy:

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

commit 20300ccbaf84afd303d5f288cb6282187c829959
Author:     Lexi Winter 
AuthorDate: 2025-09-23 21:56:21 +0000
Commit:     Lexi Winter 
CommitDate: 2025-09-25 01:00:40 +0000

    packages: Add devd to the minimal-jail set
    
    I didn't add this originally since many jails don't require devd, but
    it's very small (~90kB) and has no dependencies other than clibs and
    runtime, so we may as well include it for parity between minimal and
    minimal-jail.
    
    While here, improve the package description.
    
    Requested by:   imp
    MFC after:      1 day
    Differential Revision:  https://reviews.freebsd.org/D52679
    
    (cherry picked from commit ab50101456cded4c9d86065dd59d91c601445d91)
---
 release/packages/ucl/devd-all.ucl | 37 ++++++++++++++++++++++++++++++++++---
 1 file changed, 34 insertions(+), 3 deletions(-)

diff --git a/release/packages/ucl/devd-all.ucl b/release/packages/ucl/devd-all.ucl
index a78718955f24..573343aa758e 100644
--- a/release/packages/ucl/devd-all.ucl
+++ b/release/packages/ucl/devd-all.ucl
@@ -1,9 +1,40 @@
-comment = "Devd Utility and scripts"
+/*
+ * Copyright (c) 2002 M. Warner Losh 
+ *
+ * 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.
+ */
+
+comment = "Kernel event handling daemon"
 
 desc = <
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Lexi Winter 
Subject: git: 9bcc0094b5a4 - stable/15 - Makefile.inc1: Handle pkg
  development versions
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ivy
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 9bcc0094b5a4a1ca2c868e8f7f61a80a76fa320c
Auto-Submitted: auto-generated

The branch stable/15 has been updated by ivy:

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

commit 9bcc0094b5a4a1ca2c868e8f7f61a80a76fa320c
Author:     Lexi Winter 
AuthorDate: 2025-09-23 21:41:20 +0000
Commit:     Lexi Winter 
CommitDate: 2025-09-25 01:00:40 +0000

    Makefile.inc1: Handle pkg development versions
    
    Development versions of pkg have a version like "2.3.0-d8bbde1c3-dirty",
    which is not handled by PKG_BIN_VERSION, so PKG_EXT ends up being "tar"
    and this breaks update-packages.
    
    Fix the PKG_BIN_VERSION logic, and while here, remove backwards compat
    for pkg versions prior to 2.0, which no one should be using to build
    main or stable/15.  This means nothing is left to use PKG_BIN_VERSION,
    but continue to set it, since we might need it again in the future.
    
    MFC after:      1 day
    Reviewed by:    manu, kevans
    Differential Revision:  https://reviews.freebsd.org/D52666
    
    (cherry picked from commit f6d1cdabdd6fe5b26bda58348647d891ad138471)
---
 Makefile.inc1 | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/Makefile.inc1 b/Makefile.inc1
index 6744a25965c6..94c33ca791fd 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -2004,12 +2004,8 @@ _pkgbootstrap: .PHONY
 .endif
 
 PKG_BIN_VERSION!=${PKG_CMD} --version /dev/null |\
-    awk -F. '/^[0-9.]+$$/ {print $$1 * 10000 + $$2 * 100 + $$3}'
-.if ${PKG_BIN_VERSION} < 11700
-PKG_EXT=	${PKG_FORMAT}
-.else
+    awk -F. '/^[0-9.]+(-.*)?$$/ {print $$1 * 10000 + $$2 * 100 + $$3}'
 PKG_EXT=	pkg
-.endif
 
 .if !defined(PKG_VERSION_FROM) && make(real-update-packages) && \
     exists(${PKG_ABI_FILE}) && exists(${REPODIR}/${PKG_ABI}/latest)
@@ -2371,9 +2367,6 @@ sign-packages:	.PHONY
 
 real-sign-packages:	_pkgbootstrap .PHONY
 	printf "version = 2;\n" > ${WSTAGEDIR}/meta
-.if ${PKG_BIN_VERSION} < 11700
-	printf "packing_format = \"${PKG_FORMAT}\";\n" >> ${WSTAGEDIR}/meta
-.endif
 	@${PKG_CMD} -o ABI=${PKG_ABI} -o OSVERSION="${SRCRELDATE}" \
 		-o WORKERS_COUNT=${PKG_WORKERS_COUNT} repo \
 		-m ${WSTAGEDIR}/meta \

From nobody Thu Sep 25 01:01:38 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXFm31WDyz68kJc;
	Thu, 25 Sep 2025 01:01:39 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cXFm22bHPz3bQ4;
	Thu, 25 Sep 2025 01:01:38 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758762098;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=H0nii8D6C5tp2fnqmq7IKu18IVrIdLuKZniGkx2GwnA=;
	b=ZAzIT0pMkM9L5Zt2C4CJ1icvM3fRxACVNd2FQv49e5hnbpiDdZjQNrv+2hKRjJxRg+3J+/
	7c8FABOOncZmzGaJjK3rTP1/pFTDZA2n0wL5+7FuE7ZEu+ROn9Xd/vkvgrgoKuHaV5+bcC
	j+MqK40JhM8Ldcx1pRlFSKDj6CQAgvDiTQ5p3EwbHwVffqMuQhPM7ItbyJuNJ7WrfGyphD
	4zThFjcCWRhICV8BJFz6v4OsDYSGqG+BoWMmpDveFvrS+MsjnDp074e5XrLYKEN3hC4fbC
	m+DKCz/ezBVCBf7symxcqJKjCXlKpl3uB4LoBWVO4VXi/QhG5hhoHGKHbTtYsQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758762098;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=H0nii8D6C5tp2fnqmq7IKu18IVrIdLuKZniGkx2GwnA=;
	b=GhhtSPBmhJlvxD8aC/ZlUTMjbBkkgFh8BGb2s+908gOULIs/JfPf0koAekSfFrw+TsCM0R
	m0bsfTwuruF2yQh55lz/Zqq5i92dNRUJfIHbxXkYLwOaWod6SggU0vlEZ38Ep4zdMjzqdy
	ECj+74AT46S9lS+RWAtdD+nRRcZS6RFxaeIwMNLhBOfQ8uNUfCrx13u2JUzBPpqfisXMB3
	+SpmdyAfzwRAMGqzVi5M3oEvX1s6+jttLeoDOOH5UeBfXETswjkj3jUoaVPTc8hxJ4n/Me
	Fr3AiCsOOaMeJTWOMZcYPkwzMks7W5wh6NBWKJ1jvwp6CT58nLUHVuV5mE0ruw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758762098; a=rsa-sha256; cv=none;
	b=YljWWYcKvpcdEGvaYvSGZo1H5Y1G2QCAkvsbU6HwqwcB5slfzCX2HG6y5EK4oF94eFuSSV
	bds8rwSaTCV5+DUF6urNZjFIokdwvQ7pnOH8KTTPWO730lBvXipnTnx7f/krgNHNwyNIpH
	rHu4f9zr6t3e+1yKLusWaFkPTTDEcQFnCNWt1znNPNytocRQSWvGA6B+/TfaW9YJp2pZf+
	NZ3jIowg3tv5hEOzR4A1RnaVTmAU9qSYrBQSehsMzkcmoYF0s0LSzBziHU8uTsahWg4Cgs
	Pf8jLGSwMls0CnCuxjq0jLBMJvYy+GgAjapCmmvFz6S99OWGUyN8jkWwgsBhbw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXFm227drzvnp;
	Thu, 25 Sep 2025 01:01:38 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58P11cBT086858;
	Thu, 25 Sep 2025 01:01:38 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58P11cO7086854;
	Thu, 25 Sep 2025 01:01:38 GMT
	(envelope-from git)
Date: Thu, 25 Sep 2025 01:01:38 GMT
Message-Id: <202509250101.58P11cO7086854@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Lexi Winter 
Subject: git: c7a220005061 - stable/15 - man7: Move atf.7 and tests.7
  to the right package
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ivy
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: c7a220005061df82464471619505fe26c2f3cd04
Auto-Submitted: auto-generated

The branch stable/15 has been updated by ivy:

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

commit c7a220005061df82464471619505fe26c2f3cd04
Author:     Lexi Winter 
AuthorDate: 2025-09-23 21:57:10 +0000
Commit:     Lexi Winter 
CommitDate: 2025-09-25 01:00:40 +0000

    man7: Move atf.7 and tests.7 to the right package
    
    atf.7 should be in -atf, and tests.7 should be in -tests.
    
    MFC after:      1 day
    Differential Revision:  https://reviews.freebsd.org/D52661
    
    (cherry picked from commit 49e44e06d1ade850cff5e84bf8c5fc425e4411c8)
---
 share/man/man7/Makefile | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/share/man/man7/Makefile b/share/man/man7/Makefile
index 1e50242a1754..ef8a5a555a07 100644
--- a/share/man/man7/Makefile
+++ b/share/man/man7/Makefile
@@ -1,5 +1,7 @@
 .include 
 
+MANGROUPS=	MAN
+
 #MISSING: eqnchar.7 ms.7 term.7
 MAN=	arch.7 \
 	ascii.7 \
@@ -31,7 +33,6 @@ MAN=	arch.7 \
 	stats.7 \
 	stdint.7 \
 	sticky.7 \
-	tests.7 \
 	tracing.7 \
 	tuning.7
 
@@ -54,14 +55,21 @@ MLINKS+= networking.7 wifi.7
 .endif
 
 .if ${MK_TESTS} != "no"
-ATF=	${SRCTOP}/contrib/atf
-.PATH:	${ATF}/doc
-MAN+=	atf.7
+MANGROUPS+=	ATF TESTS
+
+TESTS=		tests.7
+TESTSPACKAGE=	tests
+
+ATF=		atf.7
+ATFPACKAGE=	atf
+
+ATFPATH=	${SRCTOP}/contrib/atf
+.PATH:	${ATFPATH}/doc
 
 CLEANFILES+= atf.7
 atf.7: atf.7.in
 	sed -e 's,__DOCDIR__,/usr/share/doc/atf,g' \
-	    <"${ATF}/doc/atf.7.in" >atf.7
+	    <"${ATFPATH}/doc/atf.7.in" >atf.7
 .endif
 
 .include 

From nobody Thu Sep 25 01:01:39 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXFm42NQ2z68kGT;
	Thu, 25 Sep 2025 01:01:40 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cXFm33MHPz3bZd;
	Thu, 25 Sep 2025 01:01:39 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758762099;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Sp1UJBnfjv2y5tC53HK5a4FACj8Ur/Xdl1xueNj+ePQ=;
	b=yu+4PrsQQYcCc7CQP7S80etk3QV8UDjAnUdmDJPpn29/kloO3E1W5W7eGIQGzocmljV8Gj
	JxJb/d+GNffxvqc/1iydQVj3028LcCEU77XJQ6dMTYOD7Rgu6OrCkaTM6owXWBWb9sTSic
	aFplqtwoFdMYclOydpzfwIxub8aapxGGdEMql4vsO8gfAF5UCKrTA6Ci3N6F4QF4BattMT
	aF76a63mdNg5z+TWoO49wx/J9tsnXClnse7xdhldPjJ3uHMvpRX1pPXAI1Ul/Qp1VVSQwY
	+kHrjxAzRcw7uoqy6xtj7C6qqgpqVxuf3i2y2rrMEKe/Ge6wbnNCfvLKBoIFnQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758762099;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Sp1UJBnfjv2y5tC53HK5a4FACj8Ur/Xdl1xueNj+ePQ=;
	b=v8pIazbnQtNVX/7xZQQz40AxcdfYdcpDjAuCg78rf+9f2vv/ALSiWw9zwTiPFNxQrrq1H/
	kzcasQYDjbvN6SAYgmz4PMP3IQZAuUEtqBEHq5ov0+vsSKLLdUozin1rKJ3XpWyGzqcPxs
	ZCaFbZ9ORsj5o0eWtmQswn7d5hvFe83yeTwu6lRQ5QIY6McDj+hOS1B8zG7ZqjkSzY7Rog
	sZGL5ILN2AbNHQfWaaJfQ/1benQSXMUWljACJboHBF5vKfjOTperhWRLbEkvnLJm/zr9LH
	tE61yoSZk17x2cQCWI5yZj/5nKbKF8sjwyxmivFvGEXtyj7JCHa6AprZjH1SOA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758762099; a=rsa-sha256; cv=none;
	b=ApOGtaGSBquSZrO07wmbepmRmC+8GOmAt2503V7NxtA+xO4GAYFQVW8LhuxL8Y7HkFPG95
	HvffIEToHoqKFOUqgzDi/6fZruIqvMlTVKaEjQOz+qp0xIgHwh38OdMbaf5Kkh7zSGKEom
	3S9IGDsUnHOM60NehIE3cHLCBfWi5+9e09WUo2L411LD0JjKs8QtxOGljlDwh5quoWyc5R
	kpJfMUhTYZOQZAhVR2s8B41hRb3k/T90JTCuDRhqFkmPuVHmc7KekD9ozSg30VAzmraZOq
	nCqyBAdyan+gG1hxkc8DxRHdnCOwuL+QU7V6NTRh9Sy1sCusAarShjyo2R427g==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXFm32qFGzvnq;
	Thu, 25 Sep 2025 01:01:39 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58P11d5G086892;
	Thu, 25 Sep 2025 01:01:39 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58P11dnm086889;
	Thu, 25 Sep 2025 01:01:39 GMT
	(envelope-from git)
Date: Thu, 25 Sep 2025 01:01:39 GMT
Message-Id: <202509250101.58P11dnm086889@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Lexi Winter 
Subject: git: 8bf853564dc6 - stable/15 - packages: Add a dependency
  from -rc to -runtime
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ivy
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 8bf853564dc6e9b175ed0110e3252d82518399f6
Auto-Submitted: auto-generated

The branch stable/15 has been updated by ivy:

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

commit 8bf853564dc6e9b175ed0110e3252d82518399f6
Author:     Lexi Winter 
AuthorDate: 2025-09-23 21:57:46 +0000
Commit:     Lexi Winter 
CommitDate: 2025-09-25 01:00:41 +0000

    packages: Add a dependency from -rc to -runtime
    
    rc(8), as well as rc scripts themselves, require /bin/sh and basic
    shell utilities to work.  Currently -rc has an implicit dependency
    on -runtime because of libutil, but this might change in the future
    if libutil were moved to a different package.  Add an explicit dep
    to ensure -runtime is installed.
    
    MFC after:      1 day
    Differential Revision:  https://reviews.freebsd.org/D52654
    
    (cherry picked from commit 9f8114a6d8cb781f155273ef173c29648a1013e6)
---
 release/packages/ucl/rc.ucl | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/release/packages/ucl/rc.ucl b/release/packages/ucl/rc.ucl
new file mode 100644
index 000000000000..1a734aaa187c
--- /dev/null
+++ b/release/packages/ucl/rc.ucl
@@ -0,0 +1,25 @@
+/*
+ * SPDX-License-Identifier: ISC
+ *
+ * Copyright (c) 2025 Lexi Winter 
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+deps {
+	"runtime": {
+		version = "${VERSION}"
+		origin = "base"
+	}
+}
+

From nobody Thu Sep 25 01:01:41 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXFm6394Cz68k3B;
	Thu, 25 Sep 2025 01:01:42 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cXFm54qlwz3bKh;
	Thu, 25 Sep 2025 01:01:41 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758762101;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=/8NtUy9lxSdRrnjE8v8/s0griAvrAqZ8TD6iS9FYKn4=;
	b=tpgitbz2ljIknmkXyrZ8KeBhGbUAO0BvtQueWAPROxKVcN6E1khpXAwC3fOjC9Zy5L3D68
	F4rK/gogv1+EUqUHxbpdNJB6tnEI+bzXIxLPgjSViJzdRJOYZIkHniqmjGKuR/yonVkbpx
	Qfd/WPo6/2Ldc3Kn8vTZ+wWpMSntDg04ewjWJBZxeSXvkVAkUDRvvViUWzDaZP3pNsrzcb
	U+/zsja06dk2BVA/yW/frVaqj3fYdnrW+X0UJelDJfwQ92ZhqyFxAUsJsEuQ8e8VIQBhHK
	112N5HqmbHuRd1FYYHTO6UzrFSAaV1en9IQHW6iovKJtPNSgIIKwBbFBtrCzsQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758762101;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=/8NtUy9lxSdRrnjE8v8/s0griAvrAqZ8TD6iS9FYKn4=;
	b=PSnUjxpWdEaawTXfLm0oDJOSRVvoFnKi0FCFD8vXE/UeI+e6D3JXQfoQ5fReenXQjcLUxu
	rYe6qJ/pbTXpUQCxC6rAz3gxXOBLZSE0FfgoWdK3Vf7cZcBarUvFhlrLXyqysApVbdm6nK
	iytPce8zeutUnZ7QRG8vQzY2zht4cBADToRWrHv4iSyhZflp+QnmmIpgxCHSSy3OKKCvDY
	4zeMSWnsq9xjn8soPp9hvr3uLsbFRlsuPTgYLSVBVWz+EQEq965O18BEj9qDpzTTtB7Snu
	p1eEzQc9WtT41H2w4aorFm9HXgb95ehbq39W+G5zY1OI4+C0uRE5CGr4UMNmBw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758762101; a=rsa-sha256; cv=none;
	b=MAo6buEXK+6XhWcDaFyuzVEJW6t6dTc7KMeOCWdo26GMc3TjbffeUrznzx9bSE6htz5cLJ
	xAWIMvH9x6dGlmH2tfTLEDCC7cK2OVp9coKXTAVWp5ATnGufQtbRsERuvS0YzG0lY5xS3h
	QmoaKhxkrcnJ3qNCufAl/ay7Ed5d42wwrJnoojCOPYUGaK2kr803rsF0/0oIMRTI/6Ma4n
	HkGRqEM21j7brs/XkZKFZrRFQ7xKXvfM6PtXIIJ+C58yeOtzLbX/gnNLujzxQs+ACeylOm
	jzAWrVDmsDbLtJJjSeC7Qf7qCdS84in2NIkfLQdi6BbxQqNBNVg2sHwX+RkZ1w==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXFm54LQfzw4c;
	Thu, 25 Sep 2025 01:01:41 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58P11fUB086960;
	Thu, 25 Sep 2025 01:01:41 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58P11fLJ086957;
	Thu, 25 Sep 2025 01:01:41 GMT
	(envelope-from git)
Date: Thu, 25 Sep 2025 01:01:41 GMT
Message-Id: <202509250101.58P11fLJ086957@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Lexi Winter 
Subject: git: 9e100a7f5631 - stable/15 - release: Fail the build
  if pkg can't be installed
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ivy
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 9e100a7f5631a7c20f17ca41c3343848e6f6ffbf
Auto-Submitted: auto-generated

The branch stable/15 has been updated by ivy:

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

commit 9e100a7f5631a7c20f17ca41c3343848e6f6ffbf
Author:     Lexi Winter 
AuthorDate: 2025-09-23 22:17:46 +0000
Commit:     Lexi Winter 
CommitDate: 2025-09-25 01:00:41 +0000

    release: Fail the build if pkg can't be installed
    
    If we can't install pkg(8) on the media, instead of ignoring the error,
    fail the build.  This avoids silently creating media which doesn't have
    pkg(8) on, and therefore can't be used for a pkgbase install.
    
    Installing pkg(8) can still be entirely disabled by setting NOPKG.
    
    MFC after:      1 day
    Reviewed by:    ifreund_freebsdfoundation.org, cperciva
    Differential Revision:  https://reviews.freebsd.org/D52635
    
    (cherry picked from commit 8654315ae8d368ce47232bde1f2593e256224e56)
---
 release/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/release/Makefile b/release/Makefile
index 35eae4083d14..13aaefd4db8d 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -238,7 +238,7 @@ disc1: ${PKGBASE_REPO}
 .endif
 .if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG))
 # Install packages onto release media.
-	${PKG_INSTALL} pkg || true
+	${PKG_INSTALL} pkg
 	${PKG_INSTALL} wifi-firmware-kmod-release || true
 	${PKG_CLEAN} || true
 .endif
@@ -278,7 +278,7 @@ bootonly:
 .endif
 .if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG))
 # Install packages onto release media.
-	${PKG_INSTALL} pkg || true
+	${PKG_INSTALL} pkg
 	${PKG_INSTALL} wifi-firmware-iwlwifi-kmod wifi-firmware-rtw88-kmod || true
 	${PKG_CLEAN} || true
 .endif
@@ -331,7 +331,7 @@ dvd: ${PKGBASE_REPO}
 .endif
 .if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG))
 # Install packages onto release media.
-	${PKG_INSTALL} pkg || true
+	${PKG_INSTALL} pkg
 	${PKG_INSTALL} wifi-firmware-kmod-release || true
 	${PKG_CLEAN} || true
 .endif

From nobody Thu Sep 25 01:01:40 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXFm52qd4z68k9q;
	Thu, 25 Sep 2025 01:01:41 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cXFm456xcz3bQV;
	Thu, 25 Sep 2025 01:01:40 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758762100;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=f1mzyyC+ZKWPwrhw/Yxs552gtHfe4tlqJKMEuWVscyE=;
	b=x3W2C9seckJzOdg0MU+k5WCgbnlQw2RdzXoHSgnHjC4sC9/uR3zB0w53ECvB+b4A2wGhlw
	dIxx26Rc3AUbije19rIOi447l7qkfXSdovtDdCzgOQTZ8kFZ9A2MUhb4SK3ULQdUgEQy2v
	cJRrQk1rUCRcGYRs8BFSt79MseZ86k9kaZuNTSojPO2PbnqSzKvkPMbLgPlXUMDi/JR8ZW
	3N3/+CvF0QKMrgg+kADmIQx8HQaQLN4d9Z8z6kKS07fPeuKBZr7Im7Huxmr1FGWADcBp7L
	3DpZe0xsMbr1+OjnD+xiMY+l9rsT6xSxFlwsMpHyLvAHVX1ZES31gd7huBkynQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758762100;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=f1mzyyC+ZKWPwrhw/Yxs552gtHfe4tlqJKMEuWVscyE=;
	b=VkLv3dKZpMmyOU/9PV3TiFz7O+vo4hncfmkdx+fyj8NjSl5ukjv+eidcdyEptHhxvwByj5
	GrldLicMpppFl4a0k0WafYmYGbOFKVmDinSHewXHMaPL5hgyEVyzbdxMLB7sN5rprAKp9Z
	fTG4eoiLDi66cLNzPEcxivtOtcLpNI5wWxpauhNlv6pbojdOpffhbFi62aFt8XeSBH9GPl
	jyrYrcu2xRHeBrzrUMTZeTsDfHoBeSbXax5adS+2G71wO4xe2elb9jfmVNeZKLEk39hziD
	xG8ktcMdWqT5SRcoonMSXXXgfikgO1HVh3wVBPy32IRzITSKfsV1as8nX6dx6g==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758762100; a=rsa-sha256; cv=none;
	b=m+gVmMKcn6hfTpmhRxIw/lBeYXTxe/FQAzGtAID2F2fleJ26tgRFeF5PFucM9F+ZdNXxqX
	opzLkcGwBP2CymYCI1x7PZ+s8aweKevXCQd1jQJRovVrOHcicQr8ZSwN9evuKaOiT6NUiy
	wW3rlkaPdHFX6hgIU4Zqz6jfLHDcT8+Rmk2HDwg4uYbDnr+6l77OM/lUVRQNtzlR87/LTj
	bx+FyDq4hhp/xQ7WbJBMICBVK4PwRDR320GpV37GR64ytR/eNhEUc3kk0kxgjD1dlQRIE7
	PuanCxjdQMGrc2XyvpKH4Z4bWOLUSMPj9oag0fJOko/eIArBS6724morgrP8cg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXFm43mMGzwCH;
	Thu, 25 Sep 2025 01:01:40 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58P11eho086926;
	Thu, 25 Sep 2025 01:01:40 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58P11e1g086923;
	Thu, 25 Sep 2025 01:01:40 GMT
	(envelope-from git)
Date: Thu, 25 Sep 2025 01:01:40 GMT
Message-Id: <202509250101.58P11e1g086923@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Lexi Winter 
Subject: git: 46a4ee6e6e67 - stable/15 - Makefile.inc1: Fix package-pkg
  with a non-default LOCALBASE
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ivy
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 46a4ee6e6e6770f2568a76a84464e5e97f45f2c4
Auto-Submitted: auto-generated

The branch stable/15 has been updated by ivy:

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

commit 46a4ee6e6e6770f2568a76a84464e5e97f45f2c4
Author:     Lexi Winter 
AuthorDate: 2025-09-23 22:15:35 +0000
Commit:     Lexi Winter 
CommitDate: 2025-09-25 01:00:41 +0000

    Makefile.inc1: Fix package-pkg with a non-default LOCALBASE
    
    package-pkg (via make-pkg-package.sh) passes CONFIGURE_ARGS to make when
    building ports-mgmt/pkg, which overrides the port's default configure
    args that are supposed to set --prefix.  This means that pkg is always
    built with the default prefix of /usr/local, which then fails when ports
    tries to package it from LOCALBASE.
    
    Work around this by explicitly adding --prefix to CONFIGURE_ARGS.
    
    MFC after:      1 day
    Reviewed by:    bapt
    Differential Revision:  https://reviews.freebsd.org/D52634
    
    (cherry picked from commit f259daa708f507d3ff450d2eb8c05065674339ec)
---
 Makefile.inc1                       | 2 +-
 release/scripts/make-pkg-package.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile.inc1 b/Makefile.inc1
index 94c33ca791fd..e98b5f233b51 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -2049,7 +2049,7 @@ package-pkg: _pkgbootstrap _repodir .PHONY
 	env ${WMAKEENV} SRCDIR=${.CURDIR} PORTSDIR=${PORTSDIR} REVISION=${_REVISION} \
 		PKG_CMD=${PKG_CMD} PKG_VERSION=${PKG_VERSION} REPODIR=${REPODIR} \
 		WSTAGEDIR=${WSTAGEDIR} \
-		OSVERSION="${SRCRELDATE}" \
+		OSVERSION="${SRCRELDATE}" LOCALBASE=${LOCALBASE} \
 		sh ${.CURDIR}/release/scripts/make-pkg-package.sh
 .endif
 .endif
diff --git a/release/scripts/make-pkg-package.sh b/release/scripts/make-pkg-package.sh
index ee75e7d68d14..a1e006bd6964 100755
--- a/release/scripts/make-pkg-package.sh
+++ b/release/scripts/make-pkg-package.sh
@@ -13,7 +13,7 @@ export DISTDIR=/tmp/distfiles
 export WRKDIR=$(make -C ${PORTSDIR}/ports-mgmt/pkg I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE=YES -V WRKDIR)
 
 make -C ${PORTSDIR}/ports-mgmt/pkg TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
-	CONFIGURE_ARGS="--host=$(uname -m)-portbld-freebsd${REVISION}" \
+	CONFIGURE_ARGS="--host=$(uname -m)-portbld-freebsd${REVISION} --prefix=${LOCALBASE}" \
 	I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE=YES \
 	BATCH=YES stage create-manifest
 

From nobody Thu Sep 25 01:01:42 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXFm722pHz68k5k;
	Thu, 25 Sep 2025 01:01:43 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cXFm65xFXz3bgQ;
	Thu, 25 Sep 2025 01:01:42 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758762102;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Q8y9flXTeYqZ+Ve1OUN5YmFFz7Ij01rw42BzyLJ0aVM=;
	b=LRHFjmaLYX+WlF9ExpjiJ6APW8bfJf5bTzEf7lN+tEnRWkCYa3K+OH5k3nEi5PH//zYfxG
	vdmYV4ND9r3Wfp6ujrrm1grA0P1xf9jLZ0/beqmx/nZLqbBegBPGg2mh/rLHOHkcT8govJ
	5KhwHT8VYWEmXyIgcSzQ+bv3buhm4gOJOew/8NemXn7N70So0gU4FRcMjY9x0NqLpWV1Yh
	lyPuG0YK62u8mdBineDm9gvyM1PYdBYXhOOFA9b15EYVMv+s4fxt+gB1ahEZv3bkrIlxis
	z8WoA2n7tL9ODwh7rUocaVlXt9ooQCsOKHWRSX/NHvemH8VTjBqXeUqE6nV2hg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758762102;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Q8y9flXTeYqZ+Ve1OUN5YmFFz7Ij01rw42BzyLJ0aVM=;
	b=pDIQBSCo9Koib6ICOI/iVzts51Lv4HeE5woAmCYXkKMC4UYiXM6JHXF7SbjXcvB9tmb0ZW
	c/MCMvcoJmikc/eoee9IwQwsjLrGJNqyurISsuAyylKa3f+mrbK2i1v1Qf4XY32qgRio1U
	XDxAV47MNxJLrp6/Qy3OGrEg/Nxnm0FdXqWatF16x98hmWmNZYrz0Jnjw3UhbvAMg3dTZU
	On6Nzpk3v0Ti0pNRZmDPaJfhSYJLDHKtBKagM9eASedKSyaVSi3JefLzVDDBnHCXCaBt+i
	ncWkHvMZuSlitxhKN7Vt44PMQHHE06edLUYViQkuCsLU+RRi76ieDaLsggs7Vg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758762102; a=rsa-sha256; cv=none;
	b=aHY6hBzj5x73pjMa2DI/RPKpob3jRQ+NB9VWJqOtnxhCTTz/8aRieSWiFaksLRnDC1i1Pz
	kbYgBQjpZxPO/7EhgjKhiHcIELFNvJ86xdU1PNAQ4unOujHEnLrnSadQP3tIJQT6DAZL5v
	nuA/fI/5QxAicvOVEOLr2/bpPmtWf9jrFkRkCFtYbeCmKf/5YKMdG113md3KjjPYdTcHRQ
	THhUeYK6SjXodPX8uhqF8//YSqMJSAHEu8swrr0m/XdwvcuCEyo0bKVEhipVG075X9eTfM
	KnxSgKfWj3B+IHB8dn1ERmJ+oQbEeRdldaDGWq2qUIXxDz/8/rnBFNIypnMV7g==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXFm65CxTzw4d;
	Thu, 25 Sep 2025 01:01:42 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58P11gIS086993;
	Thu, 25 Sep 2025 01:01:42 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58P11g7s086990;
	Thu, 25 Sep 2025 01:01:42 GMT
	(envelope-from git)
Date: Thu, 25 Sep 2025 01:01:42 GMT
Message-Id: <202509250101.58P11g7s086990@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Lexi Winter 
Subject: git: 3608d730ad33 - stable/15 - pkgbase-stage.lua: Add pkg
  package to the offline repo
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ivy
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 3608d730ad332817e735239ecd7e61b162148a33
Auto-Submitted: auto-generated

The branch stable/15 has been updated by ivy:

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

commit 3608d730ad332817e735239ecd7e61b162148a33
Author:     Lexi Winter 
AuthorDate: 2025-09-23 22:34:03 +0000
Commit:     Lexi Winter 
CommitDate: 2025-09-25 01:00:41 +0000

    pkgbase-stage.lua: Add pkg package to the offline repo
    
    We need a pkg package on the media so we can install it for offline
    installations; copy this package from the staging repository to the
    pkgbase offline repository on the media.
    
    MFC after:      1 day
    Reviewed by:    ifreund_freebsdfoundation.org, cperciva
    Differential Revision:  https://reviews.freebsd.org/D52636
    
    (cherry picked from commit 5bb96dab061af5f44e6090831f1b2724196828b8)
---
 release/scripts/pkgbase-stage.lua | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/release/scripts/pkgbase-stage.lua b/release/scripts/pkgbase-stage.lua
index 9e968fd150f8..94dec96673de 100755
--- a/release/scripts/pkgbase-stage.lua
+++ b/release/scripts/pkgbase-stage.lua
@@ -33,13 +33,17 @@ local function select_packages(pkg, media, all_libcompats)
 			components["kernel-dbg"] = package
 		elseif package:match("^FreeBSD%-kernel%-generic.*") then
 			components["kernel"] = package
+		elseif package == "pkg" then
+			components["pkg"] = package
 		end
 	end
 	assert(components["kernel"])
 	assert(components["base"])
+	assert(components["pkg"])
 
 	local selected = {}
 	if media == "disc" then
+		table.insert(selected, components["pkg"])
 		table.insert(selected, components["base"])
 		table.insert(selected, components["kernel"])
 		table.insert(selected, components["kernel-dbg"])
@@ -50,6 +54,7 @@ local function select_packages(pkg, media, all_libcompats)
 		end
 	else
 		assert(media == "dvd")
+		table.insert(selected, components["pkg"])
 		table.insert(selected, components["base"])
 		table.insert(selected, components["base-dbg"])
 		table.insert(selected, components["kernel"])

From nobody Thu Sep 25 01:01:43 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXFm83v4Fz68kP4;
	Thu, 25 Sep 2025 01:01:44 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cXFm76h6Tz3bSP;
	Thu, 25 Sep 2025 01:01:43 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758762103;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=r1VpuPF6lRfHx/SKVJXMnWIRoAUtnoU3/bfScjFRzSY=;
	b=WI/h/Mve1IIq83JL68hJqwXwk+IZaCnOONjHkjVandEK83feH7fdqK4wyidWwRZc+DuW4d
	1obc5aIncSUDfxT433JXuZ0XI3SU97YcQYknJ5nBe/2Pe8I9beLzy6kDmEyAbAdTdqNkjV
	ONlLMqvgv6LDRhfsRICyUOz6HO/nOpaZCcCBsRs+VA57v1ZKuvrGUpY88FjXudZcmhsVYo
	0292Klt8oTySGCynjmVb0zabJ6taedg5oyw4eN0h3BWhegD5wfLwDi5QJK9DJV3Sal/8Kl
	lT6jv4SFryqk7XhGmgReOA9tsH9VIunDBue9xwcdvo0QANLR/OEh5QV/kO0Zpg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758762103;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=r1VpuPF6lRfHx/SKVJXMnWIRoAUtnoU3/bfScjFRzSY=;
	b=Ix9tJB7+e2bbL0tc6aISagGckNhopBhLRWUb0hON9TgiGbGoYbF5hpmj6pTTX6P9AR+cR1
	aGzvWnJw2xMgxlSIEaqUusodJXOxZ51Nh1Cq+ubbZ6+NOA+Ho6ttgfb6Huawu5Kl7FvOjh
	Bx+dAZXTRFLZngknLn5JEcWWIEmx4BDqRYDdahpdBA/2+N0MlHevOGtdBwUgVhx2oo4cbp
	gaw6FRAZM/8/CJJsSEJx7LWwtNEZCbQiRaM7q4TyHAnqYptupVuE07EXM/KXduxTn9QyJr
	Ght53men2PQaK246LSIgfeBiqszJMKwZiChFwM0/93CQYqRaNcH+bYxMXi3Jtg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758762103; a=rsa-sha256; cv=none;
	b=EqvazRkw+qhwksP38Jinxt+3oaMPiSFkeCOea/oVZ5JegTlD6xGOdAQR8wZBW00+SM7i5G
	tozWdcM36p74PdTe4wEvBPacsZMNqVPNro1fYHdKnQlMr9zoCbQktftzGSrEDjN3woTHWK
	cXmtydU8jvU7c+LA2uvY9phHRX0Xmug6DKhynLgCc056QP55qKkadu2YN08YVwVVxhFii9
	NHL1xkuQirHOOCQF2LJAs1jII6anfPwHUbeW1goZhXgZgneGpxKVUmbVVZBeO4xDj89S/3
	FW5Sc9gvX46Nh5ZBuIQEem+ONBDkl2uob2Dij4n+eHqgmLh8BQti4oTybOl+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])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXFm7682xzvr7;
	Thu, 25 Sep 2025 01:01:43 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58P11hHK087032;
	Thu, 25 Sep 2025 01:01:43 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58P11hKO087029;
	Thu, 25 Sep 2025 01:01:43 GMT
	(envelope-from git)
Date: Thu, 25 Sep 2025 01:01:43 GMT
Message-Id: <202509250101.58P11hKO087029@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Lexi Winter 
Subject: git: d500f1f015e3 - stable/15 - release: Install pkg from
  the pkgbase repo
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ivy
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: d500f1f015e3157cd2fe501686fc4343df087613
Auto-Submitted: auto-generated

The branch stable/15 has been updated by ivy:

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

commit d500f1f015e3157cd2fe501686fc4343df087613
Author:     Lexi Winter 
AuthorDate: 2025-09-23 22:37:26 +0000
Commit:     Lexi Winter 
CommitDate: 2025-09-25 01:00:41 +0000

    release: Install pkg from the pkgbase repo
    
    If we're building pkgbase media, install the pkg package from the
    pkgbase repository we already created, not from pkg.freebsd.org.
    Aside from being more desirable, this also fixes make release for
    version/architecture combinations which are missing repository
    on pkg.f.o (which is nearly all of them at the time of writing).
    
    This doesn't yet work for bootonly, since we don't build the pkgbase
    repository there.  For now, restore the old behaviour of attempting
    to install pkg from pkg.freebsd.org for bootonly.
    
    MFC after:      1 day
    Reviewed by:    ifreund_freebsdfoundation.org, cperciva (previous version)
    Differential Revision:  https://reviews.freebsd.org/D52637
    
    (cherry picked from commit aba986215fc99d09655d4dcfc5e37f8b1ac83edf)
---
 release/Makefile | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/release/Makefile b/release/Makefile
index 13aaefd4db8d..73ab2b7cb250 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -79,11 +79,16 @@ VOLUME_LABEL=	${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET_ARCH}
 PKG_ENV+=	INSTALL_AS_USER=yes
 PKG_ENV+=	ASSUME_ALWAYS_YES=yes
 PKG_ARGS+=	-o METALOG=METALOG
-PKG_ARGS+=	-r ${.TARGET} -o REPOS_DIR=${.CURDIR}/pkg_repos
+PKG_ARGS+=	-r ${.TARGET}
+PKG_REPO_ARGS=	-o REPOS_DIR=${.CURDIR}/pkg_repos
+PKGBASE_REPO_ARGS=-o REPOS_DIR=${.OBJDIR}/pkgbase-repo-conf
 # Pass -f to make sure pkg writes to the METALOG even if the package
 # is already installed from a previous build
-PKG_INSTALL=	env ${PKG_ENV} ${PKG_CMD} ${PKG_ARGS} install -f
-PKG_CLEAN=	env ${PKG_ENV} ${PKG_CMD} ${PKG_ARGS} clean -a
+PKG_INSTALL=	env ${PKG_ENV} ${PKG_CMD} ${PKG_ARGS} ${PKG_REPO_ARGS} install -f
+PKG_CLEAN=	env ${PKG_ENV} ${PKG_CMD} ${PKG_ARGS} ${PKG_REPO_ARGS} clean -a
+# This installs from the pkgbase repo we created during build.
+PKGBASE_INSTALL=env ${PKG_ENV} ${PKG_CMD} ${PKG_ARGS} ${PKGBASE_REPO_ARGS} install -f
+PKGBASE_CLEAN=	env ${PKG_ENV} ${PKG_CMD} ${PKG_ARGS} ${PKGBASE_REPO_ARGS} clean -a
 .endif
 
 .if !defined(VOLUME_LABEL) || empty(VOLUME_LABEL)
@@ -238,7 +243,12 @@ disc1: ${PKGBASE_REPO}
 .endif
 .if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG))
 # Install packages onto release media.
+.if !defined(NOPKGBASE) || empty(NOPKGBASE)
+	${PKGBASE_INSTALL} pkg
+	${PKGBASE_CLEAN}
+.else
 	${PKG_INSTALL} pkg
+.endif
 	${PKG_INSTALL} wifi-firmware-kmod-release || true
 	${PKG_CLEAN} || true
 .endif
@@ -277,8 +287,7 @@ bootonly:
 	echo "./usr/freebsd-dist/MANIFEST type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
 .endif
 .if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG))
-# Install packages onto release media.
-	${PKG_INSTALL} pkg
+	${PKG_INSTALL} pkg || true
 	${PKG_INSTALL} wifi-firmware-iwlwifi-kmod wifi-firmware-rtw88-kmod || true
 	${PKG_CLEAN} || true
 .endif
@@ -331,7 +340,12 @@ dvd: ${PKGBASE_REPO}
 .endif
 .if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG))
 # Install packages onto release media.
+.if !defined(NOPKGBASE) || empty(NOPKGBASE)
+	${PKGBASE_INSTALL} pkg
+	${PKGBASE_CLEAN}
+.else
 	${PKG_INSTALL} pkg
+.endif
 	${PKG_INSTALL} wifi-firmware-kmod-release || true
 	${PKG_CLEAN} || true
 .endif

From nobody Thu Sep 25 01:01:45 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXFmC01yWz68kD2;
	Thu, 25 Sep 2025 01:01:47 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cXFmB1Q6bz3bdr;
	Thu, 25 Sep 2025 01: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=1758762106;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=wTe7L4dBxO8qc5DnzDj24pZ/VF4wMz0RFBU/qi67lNc=;
	b=TvWh24CLDLSxBtdloaaObRN2j4utK+vHeUPEAkasvdRK1TVPAc5IcW+mfC6GG8CKgszAWa
	DTDiFerKi1Vy0XXLRwHEDCWZFbtl5O9TY/Uicc5AbCTN778E6X3D31YQcxFqKT+GCmaJNy
	pGgi/AJG3WXRXTYr6SdtwEzPZh62nh/PHojDvHLTPB9AklTAYFydJq7IMOI5uPA+2QxIir
	YmA3uAb7GpZIJI4dZrCzTuXUv8DcS1B1ubqh4F/+9msdADKlQ7q/8hnzBI/D+8gd+HR/Rt
	nskLmIVYaCeHGQ9LhbBBEokYorcj9qt3aS5vP/62p+EMbuHbI45aCx3wH6K7Qg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758762106;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=wTe7L4dBxO8qc5DnzDj24pZ/VF4wMz0RFBU/qi67lNc=;
	b=bStSs38AdjF50/qfC9FmT7We8Z6I7C63kLa7vKG7JuwXj+X1YEAV9mD8MObs7FJVkHas5S
	uVgZHRZM9yLrHhuV7Kk/BiOkvFf2vJxmcjckEOcWQXhUnrfNJZid7P7QF4Acwswq1E69dR
	nKLeTrSC5Qnn2TefsczGNzcqcFcIGNHdOhUB26ZWgmrnnthOWfW8iatJJ7y3GI2u15jNTy
	5sUSH7RCcy9rRcnUcRq8N9nilR3X+s1CRfgb6OeOAALypArvfw9+Un8x+0z8DfZxA6rJsX
	UCS84th+OUWNGlGQBVPokNiJ6riJSqo9uXfOj2g3dCXYLdWOjIfj+P40yWFAzA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758762106; a=rsa-sha256; cv=none;
	b=IfCoMwbQrHABm4nY99zJmN+ErzE1B6PcgVYKorvphy+jujG/0Sf2ziw+2lFmEyPX4+N9L3
	Mbn8ArhRA523b6wOvwblxjK1DS75P4pCykrGm33jq0Hp3RJvTR8QpMfqpRzh2L4191L1Ht
	5/weR4I9azHKLPc0u/2q6WmTqFJ5nND3a6EcTCesMD7JgCXveqLMC2Q3DKmXxLDUhBEz12
	30iaMgcVzc9f6D5xscr4ph5GY41jIPW7CJmrS5+72INlS05tZY23oS73DdKMOlhS6m7aWd
	Ug+McP+ABSMnV3NEo30tfOfMuxFzFE0L2BZv7fvf9vQ5GCl7fEClcsRtVHIw5g==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXFmB0dhnzvQQ;
	Thu, 25 Sep 2025 01:01:46 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58P11jxt087099;
	Thu, 25 Sep 2025 01:01:45 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58P11jG9087096;
	Thu, 25 Sep 2025 01:01:45 GMT
	(envelope-from git)
Date: Thu, 25 Sep 2025 01:01:45 GMT
Message-Id: <202509250101.58P11jG9087096@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Lexi Winter 
Subject: git: 4bc068b0e20c - stable/15 - bsdinstall: Install pkg
  if it's available
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ivy
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 4bc068b0e20cf5d98438a431f0a8299c941f7c0f
Auto-Submitted: auto-generated

The branch stable/15 has been updated by ivy:

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

commit 4bc068b0e20cf5d98438a431f0a8299c941f7c0f
Author:     Lexi Winter 
AuthorDate: 2025-09-24 00:10:02 +0000
Commit:     Lexi Winter 
CommitDate: 2025-09-25 01:00:41 +0000

    bsdinstall: Install pkg if it's available
    
    Now that the pkg package is shipped on the pkgbase release media,
    install it by default for a pkgbase install if it's present.
    
    If it's not available (e.g., when running bsdinstall from a repository
    built from src alone, without ports), skip it and assume the user will
    install it another way.
    
    MFC after:      1 day
    Reviewed by:    ifreund_freebsdfoundation.org, cperciva
    Differential Revision:  https://reviews.freebsd.org/D52639
    
    (cherry picked from commit 4422265c67b8a4e19da08fdf5504a7b5e278f815)
---
 usr.sbin/bsdinstall/scripts/pkgbase.in | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/usr.sbin/bsdinstall/scripts/pkgbase.in b/usr.sbin/bsdinstall/scripts/pkgbase.in
index 3ba6a3474e0f..0b7554644028 100755
--- a/usr.sbin/bsdinstall/scripts/pkgbase.in
+++ b/usr.sbin/bsdinstall/scripts/pkgbase.in
@@ -103,7 +103,8 @@ local function select_components(components, options)
 	for component, _ in pairs(components) do
 		-- Decide which sets we want to offer to the user:
 		--
-		-- "minimal" is not offered since it's always included.
+		-- "minimal" is not offered since it's always included, as is
+		-- "pkg" if it's present.
 		--
 		-- "-dbg" sets are never offered, because those are handled
 		-- via the "debug" component.
@@ -113,7 +114,8 @@ local function select_components(components, options)
 		--
 		-- Sets whose name ends in "-jail" are intended for jails, and
 		-- are only offered if no_kernel is set.
-		if not component:match("^minimal") and
+		if component ~= "pkg" and
+		   not component:match("^minimal") and
 		   not component:match("%-dbg$") and
 		   not (component == "kernels") and
 		   not (not options.no_kernel and component:match("%-jail$")) then
@@ -161,6 +163,13 @@ local function select_components(components, options)
 	-- autoremove then trying to remove minimal.
 	local selected = {"minimal"}
 
+	-- If pkg is available, always install it so the user can manage the
+	-- installed system.  This is optional, because a repository built
+	-- from src alone won't have a pkg package.
+	if components["pkg"] then
+		table.insert(selected, "pkg")
+	end
+
 	if not options.no_kernel then
 		table.insert(selected, "kernel")
 	end
@@ -203,6 +212,9 @@ local function select_packages(pkg, options)
 			table.insert(components["kernel"], package)
 		elseif kernel_packages[package:match("(.*)%-dbg$")] then
 			table.insert(components["kernel-dbg"], package)
+		elseif package == "pkg" then
+			components["pkg"] = components["pkg"] or {}
+			table.insert(components["pkg"], package)
 		end
 	end
 

From nobody Thu Sep 25 01:01:44 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXFm94BVTz68kJw;
	Thu, 25 Sep 2025 01:01:45 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cXFm90XKSz3bdl;
	Thu, 25 Sep 2025 01:01:45 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758762105;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=cZRncJ6JRPDq0rcLViUn3DwzQHYHTURBZCTYqXQjhxk=;
	b=plgIr5nRWVOomFtekoAJacZKxpLs3Wm60piChFsYgyRd1x273oGpYCltzC8OInwl4j8BZc
	GsqTG6nJDWBoZ9l8B1Nu1sI+iJXg51xRDeEssWP520LK3WD2vmXKx5eMQnNSwJY+9yXjS3
	q6MCP+HTRDESF0s0mLgfvV4bG2lx4GY6D8CvSEb+cEOekWshMvWOJGPjFfkvDJff7vkS/U
	B83qwD3Imn+g4TXANl7Qw5dEo76+EmubJA5q4Tv+CN1p8F9ySB3jwM0nSkcw6zLeEwKb3s
	ADHG3rqwbFhikUWVq0tIFH0lK5l8A4MCWcJny5oH4ouGNh5Bz6E36LRm1th3NQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758762105;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=cZRncJ6JRPDq0rcLViUn3DwzQHYHTURBZCTYqXQjhxk=;
	b=AmEer6qr0nWvzGV5yaDt/gCbNTly+1OkQhN5UmWOINJ7FZT4C6e+pcGpxG92ffkZsZBai8
	+8pGhjS8ZwXQuz035TJgkSP5WBzXEeiAZmodkm0dMJkJo7dC5t6yYq6gU+rgur7T8+RY5J
	cytcY4roXxoLzXkI+0Fy3YOGgOpFoRS9hvKaPu7VDQTegOG6uA3bSamMT4Wgyy7I4/1ZUC
	Zsy8Ycqzo8fjVPlbfirfz/FpzetHay6frcopNeFtOF2jHchwMk+/MLxy51VhLgGNVcdeda
	AdsflkM4NuW1C/8xGlfQ0J2tj1DB4FLwVdMeDoilDTKL5kMtAXbtt/DdCqMdMQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758762105; a=rsa-sha256; cv=none;
	b=Y4bDqrzsIT2oLupoFZyXXuBhfPtSHcgw1sUveEcKC0m+D7xrBdhLmkGjh56TWNauDITpNl
	vUVgnZ7B1CITvka8o2Lx3f/UfE/ryP5062Igaiy138K/QBYh0OKJrWS5RH0ay5+5KUndqF
	h+K7Q/sM/pm86nEvvrPAOsEbjPk/9xd/xjTPSHhjVdt0he3M5jWSMoFwqBm+fSyFZqSn5W
	bps5VQyk9ofdcWgZ6jvCX7GCU9wRbuyh+Z4zzNsc7q+ep1eGzMz9c8QqUDBRmAmZ8yH3l5
	Lk6I7ynEMSkn6B8rnL4NIRwhHvXn318DwOIVAbhmqoSm9EuF9ISEWwTkOnQpLQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXFm901mMzwDY;
	Thu, 25 Sep 2025 01:01:45 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58P11iwp087065;
	Thu, 25 Sep 2025 01:01:44 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58P11iGV087062;
	Thu, 25 Sep 2025 01:01:44 GMT
	(envelope-from git)
Date: Thu, 25 Sep 2025 01:01:44 GMT
Message-Id: <202509250101.58P11iGV087062@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Lexi Winter 
Subject: git: b1187b5a1274 - stable/15 - release: Improve kernel
  package handling
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ivy
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: b1187b5a12747ec9c7d0052fa725b1e2a4668f90
Auto-Submitted: auto-generated

The branch stable/15 has been updated by ivy:

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

commit b1187b5a12747ec9c7d0052fa725b1e2a4668f90
Author:     Lexi Winter 
AuthorDate: 2025-09-23 23:06:30 +0000
Commit:     Lexi Winter 
CommitDate: 2025-09-25 01:00:41 +0000

    release: Improve kernel package handling
    
    Although support for PowerPC kernels (GENERIC64 and GENERIC64LE) was
    added to pkgbase-stage.lua, the equivalent support was missing from
    bsdinstall, so the installer would fail at runtime since it wouldn't
    find a kernel package.
    
    Improve the pkgbase-stage logic to have a specific list of kernels
    we want to support (which avoids breaking if multiple kernels are
    available), and use the same logic in both bsdinstall and pkgbase-stage.
    
    MFC after:      1 day
    Reviewed by:    cperciva
    Differential Revision:  https://reviews.freebsd.org/D52638
    
    (cherry picked from commit 3f5385beeacf49d0edb563ccc712841bcfd6b158)
---
 release/scripts/pkgbase-stage.lua      | 19 +++++++++++++------
 usr.sbin/bsdinstall/scripts/pkgbase.in | 23 ++++++++++++++---------
 2 files changed, 27 insertions(+), 15 deletions(-)

diff --git a/release/scripts/pkgbase-stage.lua b/release/scripts/pkgbase-stage.lua
index 94dec96673de..6845e0079b05 100755
--- a/release/scripts/pkgbase-stage.lua
+++ b/release/scripts/pkgbase-stage.lua
@@ -20,19 +20,26 @@ end
 
 -- Returns a list of packages to be included in the given media
 local function select_packages(pkg, media, all_libcompats)
+	-- Note: if you update this list, you must also update the list in
+	-- usr.sbin/bsdinstall/scripts/pkgbase.in.
+	local kernel_packages = {
+		-- Most architectures use this
+		["FreeBSD-kernel-generic"] = true,
+		-- PowerPC uses either of these, depending on platform
+		["FreeBSD-kernel-generic64"] = true,
+		["FreeBSD-kernel-generic64le"] = true,
+	}
+
 	local components = {}
 	local rquery = capture(pkg .. "rquery -U -r FreeBSD-base %n")
 	for package in rquery:gmatch("[^\n]+") do
 		local set = package:match("^FreeBSD%-set%-(.*)$")
 		if set then
 			components[set] = package
-		-- Kernels other than FreeBSD-kernel-generic are ignored
-		-- Note that on powerpc64 and powerpc64le the names are
-		-- slightly different.
-		elseif package:match("^FreeBSD%-kernel%-generic.*-dbg") then
-			components["kernel-dbg"] = package
-		elseif package:match("^FreeBSD%-kernel%-generic.*") then
+		elseif kernel_packages[package] then
 			components["kernel"] = package
+		elseif kernel_packages[package:match("(.*)%-dbg$")] then
+			components["kernel-dbg"] = package
 		elseif package == "pkg" then
 			components["pkg"] = package
 		end
diff --git a/usr.sbin/bsdinstall/scripts/pkgbase.in b/usr.sbin/bsdinstall/scripts/pkgbase.in
index c06a3f789791..3ba6a3474e0f 100755
--- a/usr.sbin/bsdinstall/scripts/pkgbase.in
+++ b/usr.sbin/bsdinstall/scripts/pkgbase.in
@@ -182,6 +182,16 @@ local function select_packages(pkg, options)
 		["debug"] = {},
 	}
 
+	-- Note: if you update this list, you must also update the list in
+	-- release/scripts/pkgbase-stage.lua.
+	local kernel_packages = {
+		-- Most architectures use this
+		["FreeBSD-kernel-generic"] = true,
+		-- PowerPC uses either of these, depending on platform
+		["FreeBSD-kernel-generic64"] = true,
+		["FreeBSD-kernel-generic64le"] = true,
+	}
+
 	local rquery = capture(pkg .. "rquery -U -r FreeBSD-base %n")
 	for package in rquery:gmatch("[^\n]+") do
 		local setname = package:match("^FreeBSD%-set%-(.+)$")
@@ -189,15 +199,10 @@ local function select_packages(pkg, options)
 		if setname then
 			components[setname] = components[setname] or {}
 			table.insert(components[setname], package)
-		elseif package:match("^FreeBSD%-kernel%-.*") and
-			package ~= "FreeBSD-kernel-man"
-		then
-			-- Kernels other than FreeBSD-kernel-generic are ignored
-			if package == "FreeBSD-kernel-generic" then
-				table.insert(components["kernel"], package)
-			elseif package == "FreeBSD-kernel-generic-dbg" then
-				table.insert(components["kernel-dbg"], package)
-			end
+		elseif kernel_packages[package] then
+			table.insert(components["kernel"], package)
+		elseif kernel_packages[package:match("(.*)%-dbg$")] then
+			table.insert(components["kernel-dbg"], package)
 		end
 	end
 

From nobody Thu Sep 25 01:01:47 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXFmC6BPHz68kGg;
	Thu, 25 Sep 2025 01:01:47 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cXFmC23ZQz3bkw;
	Thu, 25 Sep 2025 01:01:47 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758762107;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=sdq5f1zoEF2KJhrgdu97qDe4PswRYbejC6svM2hLlsE=;
	b=cCABYQxSmgEFiibp6oil8vmVz/gshq56rD0oXQ847SoEIa7qPXxpRnJ+0g68imguCNL7PB
	GG+wXcZyriuXmR/lrNEj7Xu7olxkzBYOzFOizsRA0l3TaJ0s1rQgdIm69W9NaByl68r4Lt
	dxgv9PDaDhxwZ+04a7u0jc2bU9MBrXDG7nBosIFw6Yl4p9qEfWJPKgaABkuo5sRhsHiEf/
	JGpxh/UI5hWux/OIWf1C7I1zOC0oKJh15sw+DQssA+D8WA5Cmcjfc5o6rFhsXKdCMlA1Jj
	ZPyfx76bS7Ra83n9INnPrrk83bjzFX/oLvqqcF4kuDnDHasPFvY6FqOe1l+ntA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758762107;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=sdq5f1zoEF2KJhrgdu97qDe4PswRYbejC6svM2hLlsE=;
	b=mlD5ESXfpFDjLa7JtvwlpGISaKYJDE2ef0P9pmFEWSRzzaEPjEsHC7lehXKEjVmNn69Vg9
	lTACvQYV+0EaFOSDZouD7RZGGcOdQ6Wdxer15vlkpPF3fKgsVHsJQnEMjmySIPkR42GGpY
	f1mDvwkloxbgG9ObRFKfvTlPHmr2k7T6mOlo3LVI+FIusud5thJyufnQa2FPi+l2rgmoIl
	fyYzCvXmNnlk6v0TY/ZYwdH80ulACsubcnxqFUN/6VwyERbMsTMJxbf1g/zzM4MlSFilAM
	y/l5stiOjuQkIHthURl/h4OOL6UNjgB/sg9UBwxg8GmW8hzkzfmuYlSuVSmJKw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758762107; a=rsa-sha256; cv=none;
	b=jy8kSA+9XZ5MXbT8eZG/uXY/9K20QieCpDRQrdKRVXyy5PgW2+MJ6v5ZUifsrooWB3jpvf
	zWwrnqR21v8HOUbcnGBUKT8KLqvKga14Fjb6D8aJ+H9TN0b9LsOnYDKf6TS0VCONU65GhC
	DAhaKUo6u9puoMYuFNQXws/b4B5nFKqQss607fhmMevewGAbI3RykF5r0pv3NfSJLIZWCB
	SjUnm8NMn/2WN2WOJFHPdMW+spdkl2hHlwfrJslOhyPDCNEcv8UnrZP7TKte6S8zNpc9iF
	0/+iFHWzZuHteuCqG1736eEBnCQQsNumgo7zrOkCW4+NTccFfPUX27YU3YqRyw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXFmC1KtbzwDZ;
	Thu, 25 Sep 2025 01:01:47 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58P11lEJ087132;
	Thu, 25 Sep 2025 01:01:47 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58P11l6J087129;
	Thu, 25 Sep 2025 01:01:47 GMT
	(envelope-from git)
Date: Thu, 25 Sep 2025 01:01:47 GMT
Message-Id: <202509250101.58P11l6J087129@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Lexi Winter 
Subject: git: 1dbe00f75091 - stable/15 - packages: Add some missing
  dependencies
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ivy
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 1dbe00f750915bedb686a9a00ab500db9ffaf376
Auto-Submitted: auto-generated

The branch stable/15 has been updated by ivy:

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

commit 1dbe00f750915bedb686a9a00ab500db9ffaf376
Author:     Lexi Winter 
AuthorDate: 2025-09-24 18:39:35 +0000
Commit:     Lexi Winter 
CommitDate: 2025-09-25 01:00:41 +0000

    packages: Add some missing dependencies
    
    * at requires cron, since atrun is started by cron and won't work
      without it, and also requires runtime because at runs jobs under
      /bin/sh.
    
    * bluetooth requires ppp for rfcomm_pppd (a very common use case).
    
    * bsdconfig and bsdinstall are written in shell script and therefore
      require /bin/sh.
    
    * devd requires /bin/sh to invoke its hooks.
    
    While here, document the policy for adding dependencies in the README.
    This will hopefully ensure we end up with consistent dependencies.
    
    MFC after:      1 day
    Reviewed by:    bapt
    Differential Revision:  https://reviews.freebsd.org/D52699
    
    (cherry picked from commit 014647a30ff4c76a99962ee6b079db0d9cdf5949)
---
 release/packages/ucl/README         | 29 +++++++++++++++++++++++++++++
 release/packages/ucl/at.ucl         | 33 +++++++++++++++++++++++++++++++++
 release/packages/ucl/bluetooth.ucl  | 28 ++++++++++++++++++++++++++++
 release/packages/ucl/bsdconfig.ucl  | 25 +++++++++++++++++++++++++
 release/packages/ucl/bsdinstall.ucl | 25 +++++++++++++++++++++++++
 release/packages/ucl/devd.ucl       | 25 +++++++++++++++++++++++++
 6 files changed, 165 insertions(+)

diff --git a/release/packages/ucl/README b/release/packages/ucl/README
index 85b6130c0488..6f1bdb065764 100644
--- a/release/packages/ucl/README
+++ b/release/packages/ucl/README
@@ -19,3 +19,32 @@ In general, dependencies and post-install scripts should be added in the
 package-specific manifests, while comment and description should be set
 in the "-all" manifest.
 
+Policies for package dependencies:
+
+* If a package requires a shared library from another package, do not add a
+  dependency, unless pkg(8) doesn't detect the dependency automatically for
+  some reason (which may happen if the library is loaded with dlopen() at
+  runtime).
+
+* If a package contains rc(8) scripts, do not add a dependency on "rc".
+  Installing "rc" is optional.
+
+* If a package contains hooks intended to be invoked from devd, do not add
+  a dependency on "devd".  Like rc, devd is optional.  The exception is if
+  the package doesn't work at all without devd, in which case a dependency
+  is warranted.
+
+* If a package contains cron(8) jobs in /etc/cron.d, do not a dependency
+  on "cron", unless the package doesn't work at all without cron.
+
+* If a package contains periodic(8) reports, do not add a dependency on
+  "periodic", unless the package only contains periodic reports.
+
+* If a package contains shell scripts, and the script is *not* one of the
+  previously mentioned examples (rc, devd, etc.), add a dependency on
+  "runtime" for /bin/sh.
+
+* Otherwise, if one component of a package requires another package to work,
+  add a dependency on the other package even if not everything in the package
+  requires that dependency.  Users expect that all of a package will work
+  after installing it.
diff --git a/release/packages/ucl/at.ucl b/release/packages/ucl/at.ucl
new file mode 100644
index 000000000000..25724adfd7af
--- /dev/null
+++ b/release/packages/ucl/at.ucl
@@ -0,0 +1,33 @@
+/*
+ * SPDX-License-Identifier: ISC
+ *
+ * Copyright (c) 2025 Lexi Winter 
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+deps {
+	# atrun relies on cron to work.
+	"cron" {
+		version = "${VERSION}"
+		origin = "base"
+	},
+
+	# at(1) passes the command to /bin/sh
+	"runtime" {
+		version = "${VERSION}"
+		origin = "base"
+	},
+}
+
+
diff --git a/release/packages/ucl/bluetooth.ucl b/release/packages/ucl/bluetooth.ucl
new file mode 100644
index 000000000000..c87d5e9c8420
--- /dev/null
+++ b/release/packages/ucl/bluetooth.ucl
@@ -0,0 +1,28 @@
+/*
+ * SPDX-License-Identifier: ISC
+ *
+ * Copyright (c) 2025 Lexi Winter 
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+deps {
+	# rfcomm_pppd(8) uses ppp(8)
+	"ppp" {
+		version = "${VERSION}"
+		origin = "base"
+	},
+}
+
+
+
diff --git a/release/packages/ucl/bsdconfig.ucl b/release/packages/ucl/bsdconfig.ucl
new file mode 100644
index 000000000000..752c352ae904
--- /dev/null
+++ b/release/packages/ucl/bsdconfig.ucl
@@ -0,0 +1,25 @@
+/*
+ * SPDX-License-Identifier: ISC
+ *
+ * Copyright (c) 2025 Lexi Winter 
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+deps {
+	# bsdconfig is written in shell script, so it needs /bin/sh
+	"runtime" {
+		version = "${VERSION}"
+		origin = "base"
+	},
+}
diff --git a/release/packages/ucl/bsdinstall.ucl b/release/packages/ucl/bsdinstall.ucl
new file mode 100644
index 000000000000..6e5cbce4e342
--- /dev/null
+++ b/release/packages/ucl/bsdinstall.ucl
@@ -0,0 +1,25 @@
+/*
+ * SPDX-License-Identifier: ISC
+ *
+ * Copyright (c) 2025 Lexi Winter 
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+deps {
+	# bsdinstall is written in shell script, so it needs /bin/sh
+	"runtime" {
+		version = "${VERSION}"
+		origin = "base"
+	},
+}
diff --git a/release/packages/ucl/devd.ucl b/release/packages/ucl/devd.ucl
new file mode 100644
index 000000000000..8d83ab9ee020
--- /dev/null
+++ b/release/packages/ucl/devd.ucl
@@ -0,0 +1,25 @@
+/*
+ * SPDX-License-Identifier: ISC
+ *
+ * Copyright (c) 2025 Lexi Winter 
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+deps {
+	# devd uses /bin/sh to invoke hooks.
+	"runtime" {
+		version = "${VERSION}"
+		origin = "base"
+	},
+}

From nobody Thu Sep 25 01:01:48 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXFmF0DWkz68kB3;
	Thu, 25 Sep 2025 01:01:49 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cXFmD35ptz3bcN;
	Thu, 25 Sep 2025 01: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=1758762108;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=vcBoBGv9+GU5SpGlBykjj9mcXPVs+qsnUXV+zwcHp3M=;
	b=ITLCZMlmt+uKQykCZhNvnNw90Ow3z33DC94uHs8kukcMgHgSwJtzUMOO09vRa+l23lw4S9
	JbeCEaUV7X/5As2Fa3oaoW5t00K2dQd5geSE3eeM9pwJ7VfbYcbRiA9TEnogG3NDVDnrf7
	ozL4Uruyfj320Fj32483J1pa2LcvdALXulj8f6JcrbO6ODyBE1Pacs/Jb3xmAEwjJGJWuU
	4RlrKpHvDNjQBYt7L20Btnf6xSLgIPPeeYCUKKU4PNEONX72Bkhz3UNnVqBqXPl3jE52bW
	UpQR/FQhu8TtTZr4F57rsiNhNgXlwgCCtTmYUh176jDWG27ezNLZ+Yly8tqWpg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758762108;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=vcBoBGv9+GU5SpGlBykjj9mcXPVs+qsnUXV+zwcHp3M=;
	b=rJ0i+U5pI8NmVkiwwQ06WtZIPatWitAxPrNZZcGVztT1S1V3GvF1szzSnDoPd6hgJLMGH+
	QsTirYbl0qgywwULOrbvTATVAPSHBYaMTj1NqhsyQ5+HrGLwQc55YiiD4vBLuGO4Ua9a1i
	GJp+M82g3CrSup1WJYCIruqkvkQQRYX2e+KFn3m5f/fx0zqgXVvCu2GWPqaou5rL327oNc
	6uTE9ScJsL4/NWPCKuY80y7SxZSjEZQMIcXPABKITfzIrtxgU0cYsSi3wIBnW1L/4vzSu2
	38LUhOOe9qM+efW7zbmdFsEVUXzUDSNKqZIG7tVoUNE152jIL79GGIs1kHTc0A==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758762108; a=rsa-sha256; cv=none;
	b=vbCwnaVZ/2/gKRxF61aLqk4f4NyD2fCzpQIl4xcNN0/NXHyouLNfa7q7luhnGq3uUnaf7g
	2XRD9Yhoi7iYKNodJhCxVw/Bzn9r/6FMkh90XMpYRWwej68b7e6YnnOyzXJYxbFZphtK+y
	1U19tChPXLaDuHAgBmDG8xhPOMvCHCmFNsViaN68J3QCIXCYElq0gwhA8KcuodDor1dp5U
	zmLqWFoye+hK6U/1J6XcSYU0QsxxJxAzcBR7947GwNd8oP+9XZVzuaXzZ9kIYyWjRogAj/
	V6XdgooYHdzobRu2mLrFOYidoUhDdVHAoZ9wkXzbnLD5oqf44kFUw5/yv7LkxA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXFmD2gkBzv9d;
	Thu, 25 Sep 2025 01:01:48 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58P11mZD087165;
	Thu, 25 Sep 2025 01:01:48 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58P11mJO087162;
	Thu, 25 Sep 2025 01:01:48 GMT
	(envelope-from git)
Date: Thu, 25 Sep 2025 01:01:48 GMT
Message-Id: <202509250101.58P11mJO087162@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Lexi Winter 
Subject: git: 93593875df8d - stable/15 - packages: Add descriptions
  for all packages
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: ivy
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 93593875df8d85f35150fc9056eab8a7f004b686
Auto-Submitted: auto-generated

The branch stable/15 has been updated by ivy:

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

commit 93593875df8d85f35150fc9056eab8a7f004b686
Author:     Lexi Winter 
AuthorDate: 2025-09-24 18:41:39 +0000
Commit:     Lexi Winter 
CommitDate: 2025-09-25 01:00:42 +0000

    packages: Add descriptions for all packages
    
    Provide at least a basic description of every package we build.
    Where possible, the description is taken from a relevant manpage;
    when there was no suitable text in the manpage, I wrote a new
    description.
    
    Since the UCL files now contain a significant amount of English
    prose which is almost certainly subject to copyright in at least
    some jurisdictions, add a copyright header to every file.  Where
    the text was taken from a manpage, the copyright and license are
    also taken from the manpage.  A few files don't have copyright
    headers added because the origin of the text is unclear, or because
    the files were written by someone else.
    
    While here, remove some orphaned UCL files for packages we no
    longer ship.
    
    MFC after:      1 day
    Reviewed by:    bapt
    Differential Revision:  https://reviews.freebsd.org/D52690
    
    (cherry picked from commit c7a4cdd09f462922510c24dc49010b1c603c3c1a)
---
 release/packages/ucl/acct-all.ucl             | 31 ++++++++++++++-
 release/packages/ucl/acpi-all.ucl             | 36 +++++++++++++++++-
 release/packages/ucl/amd-all.ucl              |  4 --
 release/packages/ucl/apm-all.ucl              | 29 +++++++++++++-
 release/packages/ucl/at-all.ucl               | 29 +++++++++++++-
 release/packages/ucl/atf-all.ucl              | 27 ++++++++++++++
 release/packages/ucl/audit-all.ucl            | 42 ++++++++++++++++++++-
 release/packages/ucl/autofs-all.ucl           | 29 +++++++++++++-
 release/packages/ucl/bhyve-all.ucl            | 42 ++++++++++++++++++++-
 release/packages/ucl/blocklist-all.ucl        | 28 +++++++++++++-
 release/packages/ucl/bluetooth-all.ucl        | 26 ++++++++++++-
 release/packages/ucl/bmake-all.ucl            | 18 +++++++++
 release/packages/ucl/bootloader-all.ucl       | 25 ++++++++++++-
 release/packages/ucl/bsdconfig-all.ucl        | 26 ++++++++++++-
 release/packages/ucl/bsdinstall-all.ucl       | 37 +++++++++++++++++-
 release/packages/ucl/bsnmp-all.ucl            | 42 ++++++++++++++++++++-
 release/packages/ucl/caroot-all.ucl           | 32 +++++++++++++++-
 release/packages/ucl/ccdconfig-all.ucl        | 19 ++++++++++
 release/packages/ucl/certctl-all.ucl          | 33 +++++++++++++++-
 release/packages/ucl/certctl.ucl              | 18 +++++++++
 release/packages/ucl/clang-all.ucl            | 27 +++++++++++++-
 release/packages/ucl/clibs-all.ucl            | 23 +++++++++++-
 release/packages/ucl/console-tools-all.ucl    | 31 ++++++++++++++-
 release/packages/ucl/cron-all.ucl             | 27 +++++++++++++-
 release/packages/ucl/csh-all.ucl              | 40 +++++++++++++++++++-
 release/packages/ucl/ctf-tools-all.ucl        | 34 ++++++++++++++++-
 release/packages/ucl/ctl-all.ucl              | 41 +++++++++++++++++++-
 release/packages/ucl/cxgbe-tools-all.ucl      | 27 +++++++++++++-
 release/packages/ucl/devmatch-all.ucl         | 18 +++++++++
 release/packages/ucl/dhclient-all.ucl         | 45 +++++++++++++++++++++-
 release/packages/ucl/dma-all.ucl              | 36 ++++++++++++++++++
 release/packages/ucl/docs-all.ucl             |  4 --
 release/packages/ucl/dtrace-all.ucl           | 29 +++++++++++++-
 release/packages/ucl/dwatch-all.ucl           | 37 +++++++++++++++++-
 release/packages/ucl/ee-all.ucl               | 25 ++++++++++++-
 release/packages/ucl/efi-tools-all.ucl        | 37 +++++++++++++++++-
 release/packages/ucl/examples-all.ucl         | 26 ++++++++++++-
 release/packages/ucl/fd-all.ucl               | 28 +++++++++++++-
 release/packages/ucl/fetch-all.ucl            | 27 +++++++++++++-
 release/packages/ucl/firmware-iwm-all.ucl     | 18 +++++++++
 release/packages/ucl/ftp-all.ucl              | 24 +++++++++++-
 release/packages/ucl/fwget-all.ucl            | 28 +++++++++++++-
 release/packages/ucl/games-all.ucl            | 26 ++++++++++++-
 release/packages/ucl/geom-all.ucl             | 18 +++++++++
 release/packages/ucl/ggate-all.ucl            | 32 +++++++++++++++-
 release/packages/ucl/gssd-all.ucl             | 19 ++++++++++
 release/packages/ucl/hast-all.ucl             | 23 +++++++++++-
 release/packages/ucl/hostapd-all.ucl          | 26 ++++++++++++-
 release/packages/ucl/hyperv-tools-all.ucl     | 18 +++++++++
 release/packages/ucl/inetd-all.ucl            | 18 +++++++++
 release/packages/ucl/ipf-all.ucl              | 23 ++++++++++++
 release/packages/ucl/ipfw-all.ucl             | 28 +++++++++++++-
 release/packages/ucl/iscsi-all.ucl            | 26 +++++++++++--
 release/packages/ucl/jail-all.ucl             | 32 +++++++++++++++-
 release/packages/ucl/kerberos-all.ucl         | 34 ++++++++++++++++-
 release/packages/ucl/kerberos-kdc-all.ucl     | 28 +++++++++++++-
 release/packages/ucl/kernel-man.ucl           | 18 +++++++++
 release/packages/ucl/kyua-all.ucl             | 34 +++++++++++++++++
 release/packages/ucl/lib9p-all.ucl            | 21 ++++++++++-
 release/packages/ucl/libarchive-all.ucl       | 34 ++++++++++++++++-
 release/packages/ucl/libbegemot-all.ucl       | 41 ++++++++++++++++++++
 release/packages/ucl/libblocksruntime-all.ucl | 23 +++++++++++-
 release/packages/ucl/libbsdstat-all.ucl       | 19 ++++++++++
 release/packages/ucl/libbsm-all.ucl           | 34 ++++++++++++++++-
 release/packages/ucl/libcasper-all.ucl        | 25 ++++++++++++-
 release/packages/ucl/libcompat-all.ucl        | 22 ++++++++++-
 release/packages/ucl/libcuse-all.ucl          | 30 +++++++++++++++
 release/packages/ucl/libdwarf-all.ucl         | 28 ++++++++++++++
 release/packages/ucl/libevent1-all.ucl        | 19 ++++++++++
 release/packages/ucl/libexecinfo-all.ucl      | 19 ++++++++++
 release/packages/ucl/libldns-all.ucl          | 26 +++++++++++--
 release/packages/ucl/liblzma-all.ucl          | 19 ++++++++++
 release/packages/ucl/libmagic-all.ucl         | 23 +++++++++++-
 release/packages/ucl/libpathconv-all.ucl      | 19 ++++++++++
 release/packages/ucl/librpcsec_gss-all.ucl    | 42 ++++++++++++++++++++-
 release/packages/ucl/librss-all.ucl           |  1 +
 release/packages/ucl/libsdp-all.ucl           | 19 ++++++++++
 release/packages/ucl/libsqlite3-all.ucl       | 19 ++++++++++
 release/packages/ucl/libstdbuf-all.ucl        | 35 +++++++++++++++--
 release/packages/ucl/libstdthreads-all.ucl    | 22 ++++++++++-
 release/packages/ucl/libthread_db-all.ucl     | 21 ++++++++++-
 release/packages/ucl/libucl-all.ucl           | 19 ++++++++++
 release/packages/ucl/libvgl-all.ucl           | 54 ++++++++++++++++++++++-----
 release/packages/ucl/libvmmapi-all.ucl        | 21 ++++++++++-
 release/packages/ucl/liby-all.ucl             | 25 +++++++++++--
 release/packages/ucl/libyaml-all.ucl          | 19 ++++++++++
 release/packages/ucl/lld-all.ucl              | 25 ++++++++++++-
 release/packages/ucl/lldb-all.ucl             | 19 ++++++++++
 release/packages/ucl/locales-all.ucl          | 22 ++++++++++-
 release/packages/ucl/lp-all.ucl               | 29 +++++++++++++-
 release/packages/ucl/mandoc-all.ucl           | 22 ++++++++++-
 release/packages/ucl/manuals-all.ucl          |  4 --
 release/packages/ucl/mlx-tools-all.ucl        | 35 ++++++++++++++++-
 release/packages/ucl/mtree-all.ucl            | 28 +++++++++++++-
 release/packages/ucl/natd-all.ucl             | 28 +++++++++++++-
 release/packages/ucl/netmap-all.ucl           | 29 +++++++++++++-
 release/packages/ucl/newsyslog-all.ucl        | 22 +++++++++++
 release/packages/ucl/nfs-all.ucl              | 34 ++++++++++++++++-
 release/packages/ucl/ntp-all.ucl              | 39 ++++++++++++++++++-
 release/packages/ucl/nuageinit-all.ucl        | 27 +++++++++++++-
 release/packages/ucl/nvme-tools-all.ucl       | 25 ++++++++++++-
 release/packages/ucl/openssl-all.ucl          | 37 +++++++++++++++++-
 release/packages/ucl/periodic-all.ucl         | 18 +++++++++
 release/packages/ucl/periodic.ucl             | 18 +++++++++
 release/packages/ucl/pf-all.ucl               | 30 +++++++++++++++
 release/packages/ucl/pkg-bootstrap-all.ucl    | 22 ++++++++++-
 release/packages/ucl/ppp-all.ucl              | 20 +++++++++-
 release/packages/ucl/quotacheck-all.ucl       | 35 +++++++++++++++++
 release/packages/ucl/rc-all.ucl               | 18 +++++++++
 release/packages/ucl/rcmds-all.ucl            | 19 ++++++++++
 release/packages/ucl/rcmds.ucl                | 18 +++++++++
 release/packages/ucl/rdma-all.ucl             | 25 ++++++++++++-
 release/packages/ucl/rescue-all.ucl           | 22 ++++++++++-
 release/packages/ucl/resolvconf-all.ucl       | 18 +++++++++
 release/packages/ucl/rip-all.ucl              | 21 ++++++++++-
 release/packages/ucl/runtime-all.ucl          | 18 +++++++++
 release/packages/ucl/sendmail-all.ucl         | 19 ++++++++++
 release/packages/ucl/sendmail.ucl             | 18 +++++++++
 release/packages/ucl/smbutils-all.ucl         | 28 +++++++++++++-
 release/packages/ucl/src-all.ucl              | 19 ++++++++++
 release/packages/ucl/src-sys-all.ucl          | 19 ++++++++++
 release/packages/ucl/ssh-all.ucl              | 36 +++++++++++++++++-
 release/packages/ucl/syscons-data-all.ucl     | 19 ++++++++++
 release/packages/ucl/syslogd-all.ucl          | 25 ++++++++++++-
 release/packages/ucl/tcpd-all.ucl             | 33 +++++++++++++++-
 release/packages/ucl/telnet-all.ucl           | 29 +++++++++++++-
 release/packages/ucl/tests-all.ucl            | 18 +++++++++
 release/packages/ucl/toolchain-all.ucl        | 21 ++++++++++-
 release/packages/ucl/ufs-all.ucl              | 35 ++++++++++++++++-
 release/packages/ucl/unbound-all.ucl          | 30 ++++++++++++++-
 release/packages/ucl/utilities-all.ucl        | 21 ++++++++++-
 release/packages/ucl/vi-all.ucl               | 18 +++++++++
 release/packages/ucl/vt-data-all.ucl          | 18 +++++++++
 release/packages/ucl/wpa-all.ucl              | 44 +++++++++++++++++++++-
 release/packages/ucl/yp-all.ucl               | 21 ++++++++++-
 release/packages/ucl/yp.ucl                   | 18 +++++++++
 release/packages/ucl/zfs-all.ucl              | 44 +++++++++++++++++++++-
 release/packages/ucl/zoneinfo-all.ucl         | 18 +++++++++
 138 files changed, 3403 insertions(+), 182 deletions(-)

diff --git a/release/packages/ucl/acct-all.ucl b/release/packages/ucl/acct-all.ucl
index ac4bd8868511..a96e3cc08471 100644
--- a/release/packages/ucl/acct-all.ucl
+++ b/release/packages/ucl/acct-all.ucl
@@ -1,4 +1,31 @@
-comment = "System Accounting Utilities"
+/*
+ * SPDX-License-Identifier: ISC
+ *
+ * Copyright (c) 2025 Lexi Winter 
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+comment = "System resource accounting"
+
 desc = <
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+comment = "Advanced Configuration and Power Interface (ACPI) utilities"
+
 desc = <
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+comment = "Intel / Microsoft APM BIOS utility"
+
 desc = <
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+comment = "Scheduled and batch command utilities"
+
 desc = <
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+comment = "File system automounter"
+
 desc = <
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+comment = "Network blocklist daemon"
+
 desc = <
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+comment = "Bluetooth support"
+
 desc = <
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
 comment = "Program maintenance utility"
 
 desc = <
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+comment = "System boot loader"
+
 desc = <
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
 comment = "System configuration utility"
+
 desc = < All rights reserved.
+ * Copyright (c) 2018 Roberto Fernandez Cueto 
+ * Copyright (c) 2024 The FreeBSD Foundation
+ *
+ * Portions of this documentation were written by Björn Zeeb
+ * 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 ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+comment = "System installer"
+
 desc = <
+ *
+ * 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.
+ */
+
+comment = "Simple and extensible SNMP daemon"
+
 desc = <
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+comment = "Mozilla Root Store trusted TLS certificates"
+
 desc = <
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
 comment = "Concatenated disk driver (ccd) configuration utility"
+
 desc = <
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted providing 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 ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+comment = "Tool for managing trusted and untrusted TLS certificates"
+
 desc = <
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
 deps {
 	"openssl": {
 		version = "${VERSION}"
diff --git a/release/packages/ucl/clang-all.ucl b/release/packages/ucl/clang-all.ucl
index e0fe8f35f40e..e0372940ed42 100644
--- a/release/packages/ucl/clang-all.ucl
+++ b/release/packages/ucl/clang-all.ucl
@@ -1,7 +1,30 @@
-comment = "Clang Utilities"
+/*
+ * SPDX-License-Identifier: ISC
+ *
+ * Copyright (c) 2025 Lexi Winter 
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+comment = "The Clang C, C++, and Objective-C compiler"
+
 desc = <
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+comment = "Core runtime libraries"
 
 desc = <
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
*** 3936 LINES SKIPPED ***

From nobody Thu Sep 25 07:11:25 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXPyk0225z681NG;
	Thu, 25 Sep 2025 07:11:26 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cXPyj6Q8Dz3RKJ;
	Thu, 25 Sep 2025 07:11:25 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758784285;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=hUVsJcEJann5a1YubCwZje1Tym1Vn8e5KB3RgrnyoWg=;
	b=pvQPEbLKFVDr6QlIZjWdHDojbqFoz+LrUupcZLkgHjvkV5e5BOEJAX5c2DPJPb60aDTojW
	lhpmjqjB1XuZo1hEWlo+OE4ruWb0sImdjTEm9d+67WXB+VCw60NzZh2OR5AyJQeNoeacOS
	4HG6+anzg4Wn6RvlU5PAPskyfY3BwDm+JAZzKiFYD9NvQ3FaxhbVRjMFUtTUQl2MyBWEvh
	NtxwFejjxf2VAByWNWrLJiQG687aiD9+doMdvY1nC/iOkHy6jhoDGdH/LsipLOqLTbVvSt
	9W7Y2EwQ9v7DZUjxK2ab1ZUyO3Tw2Ii0G+/P79octR5UUUxKxMltu47UY6Vwxw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758784285;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=hUVsJcEJann5a1YubCwZje1Tym1Vn8e5KB3RgrnyoWg=;
	b=C4x7LiXlOEHc+jb9OUxxZO7xqHpbRmymg0mjDXtNE/znu0Vx7Uy12QheydtwVUCS0cebby
	gV8PvTMA9EIckWnZ3KXn4EmVmizIKmQ+bl9JWbU4tsYkIgC7XsNMIKIxOlkc4IkEm57jz/
	EUZMvwnVRdjRYwd6QcZQ778bRh8r0kgrVIkvcae14Z/GPfv8w2SKFqO7zrjSPV7XjzRocD
	cu0lp4PYgzX+yJuqQrHmGpUGGI4/is7xS3YddHHF6xHBjiZhxiShYb4Q61bGS7KGH3N0M/
	ocSTBXZSuYaKM5yaUcPAjQQPvnGn2DQpHrpsdmPRRGhp9nq2move96pkMtS16g==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758784285; a=rsa-sha256; cv=none;
	b=bW8huTlwbDgahog4K2eR4eftBeeQZKmKanMT5ywQTAPrATDVDeG5xwOZ16WDxXkWOXFtta
	WkixFR0VYch8JhQOB0DKXCuehpQqwkHhl8UxxKyCCmY8LHyeFhI6uJ3GqH+lnMwKPUkE7q
	pgXyOvy0aoIVtSm6jT4vB/t6M6f5xQ/qToldiWyi2+NsfAsvlkeJqKQmCQ80nCGueJRJoq
	eylCNA/tdjveKxmVMRbC4Eev1DOVGK9DEXgb7ojF8OlKQO1QqmZYXRWz58EkhKibApng4a
	GBCywzVGZnN5Mevo/q7DNo/Oc6UqwgdB65P3KLk1cVJ528jmBHUlNGeJAGytZQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXPyj5zgxz16Vs;
	Thu, 25 Sep 2025 07:11:25 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58P7BPOs082208;
	Thu, 25 Sep 2025 07:11:25 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58P7BPX9082205;
	Thu, 25 Sep 2025 07:11:25 GMT
	(envelope-from git)
Date: Thu, 25 Sep 2025 07:11:25 GMT
Message-Id: <202509250711.58P7BPX9082205@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Ed Maste 
Subject: git: 093f3f26e951 - stable/15 - bsdinstall: fix
  vfs.zfs.vdev.min_auto_ashift oid
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: emaste
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 093f3f26e95198bf1db082763e915d7a53c6ba82
Auto-Submitted: auto-generated

The branch stable/15 has been updated by emaste:

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

commit 093f3f26e95198bf1db082763e915d7a53c6ba82
Author:     Siva Mahadevan 
AuthorDate: 2025-07-15 16:45:24 +0000
Commit:     Ed Maste 
CommitDate: 2025-09-25 07:10:42 +0000

    bsdinstall: fix vfs.zfs.vdev.min_auto_ashift oid
    
    Signed-off-by: Siva Mahadevan 
    PR: 266374
    Pull request: https://github.com/freebsd/freebsd-src/pull/1851
    Reviewed by: emaste
    Sponsored by: The FreeBSD Foundation
    
    (cherry picked from commit 87a7b35f04b60956e9aa192680ae80773ec38f14)
---
 usr.sbin/bsdinstall/scripts/zfsboot | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot
index aa05faa7d3dd..5fbf56ea59ac 100755
--- a/usr.sbin/bsdinstall/scripts/zfsboot
+++ b/usr.sbin/bsdinstall/scripts/zfsboot
@@ -69,7 +69,7 @@ f_include $BSDCFG_SHARE/variable.subr
 : ${ZFSBOOT_VDEV_TYPE:=stripe}
 
 #
-# Should we use sysctl(8) vfs.zfs.min_auto_ashift=12 to force 4K sectors?
+# Should we use sysctl(8) vfs.zfs.vdev.min_auto_ashift=12 to force 4K sectors?
 #
 : ${ZFSBOOT_FORCE_4K_SECTORS=1}
 
@@ -221,7 +221,7 @@ PRINTF_CONF="printf '%s=\"%%s\"\\\n' %s >> \"%s\""
 PRINTF_FSTAB='printf "$FSTAB_FMT" "%s" "%s" "%s" "%s" "%s" "%s" >> "%s"'
 SHELL_TRUNCATE=':> "%s"'
 SWAP_GMIRROR_LABEL='gmirror label swap %s'
-SYSCTL_ZFS_MIN_ASHIFT_12='sysctl vfs.zfs.min_auto_ashift=12'
+SYSCTL_ZFS_MIN_ASHIFT_12='sysctl vfs.zfs.vdev.min_auto_ashift=12'
 UMOUNT='umount "%s"'
 ZFS_CREATE_WITH_OPTIONS='zfs create %s "%s"'
 ZFS_MOUNT='zfs mount "%s"'
@@ -255,7 +255,7 @@ msg_encrypt_disks="Encrypt Disks?"
 msg_encrypt_disks_help="Use geli(8) to encrypt all data partitions"
 msg_error="Error"
 msg_force_4k_sectors="Force 4K Sectors?"
-msg_force_4k_sectors_help="Align partitions to 4K sector boundries and set vfs.zfs.min_auto_ashift=12"
+msg_force_4k_sectors_help="Align partitions to 4K sector boundries and set vfs.zfs.vdev.min_auto_ashift=12"
 msg_freebsd_installer="$OSNAME Installer"
 msg_geli_password="Enter a strong passphrase, used to protect your encryption keys. You will be required to enter this passphrase each time the system is booted"
 msg_geli_setup="Initializing encryption on selected disks,\n this will take several seconds per disk"
@@ -1099,7 +1099,7 @@ zfs_create_boot()
 	#
 	f_dprintf "$funcname: Preparing disk partitions for ZFS pool..."
 
-	# Force 4K sectors using vfs.zfs.min_auto_ashift=12
+	# Force 4K sectors using vfs.zfs.vdev.min_auto_ashift=12
 	if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; then
 		f_dprintf "$funcname: With 4K sectors..."
 		f_eval_catch $funcname sysctl "$SYSCTL_ZFS_MIN_ASHIFT_12" \
@@ -1382,7 +1382,7 @@ zfs_create_boot()
 
 	if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; then
 		f_eval_catch $funcname echo "$ECHO_APPEND" \
-	             'vfs.zfs.min_auto_ashift=12' \
+	             'vfs.zfs.vdev.min_auto_ashift=12' \
 	             $BSDINSTALL_TMPETC/sysctl.conf.zfs || return $FAILURE
 	fi
 

From nobody Thu Sep 25 07:27:31 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXQKJ1Kgtz6838T;
	Thu, 25 Sep 2025 07:27:32 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cXQKJ0kTjz3SRR;
	Thu, 25 Sep 2025 07:27:32 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758785252;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=MZ+ofQz1Eogr6vAYw9xjKEGU6Je1EjztGymxPjB2Zb8=;
	b=CRuq/2YzA6bKb5UnPiv6D7tjV9hzfzeoUmF/iixnruJxha+yW9moogreyFEMldDjxhrloJ
	zdvgZRhuafuadfiTtBOCy1W7V/mA2BrxcWiXUVjs10QRvOyGF7g9FgBy7EViPMKeeiaehR
	0bhkX8lcG0qixu4LxV/1FiUgUFYj+btjU8gPlSNhD2Z+0BbXaBca++TYoYMwbhFrzN7aUb
	pOipk7XyQuM+WzkcX/LmBvCZSegtoD0HlLwkFpo8jVFQ471YzoB1anNUSMgDyIUB5u0cz+
	FN8DxwFtvgjuzwsYYV7SfkoD63XS2p8UW0spIdDe+l+kxooSWNuGRywqWa1fPw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758785252;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=MZ+ofQz1Eogr6vAYw9xjKEGU6Je1EjztGymxPjB2Zb8=;
	b=sFtaLaEDw/rq5iP+bS/Tk8RYed2Y2hD+90e9B/6/SohIC1iRrlpvpvAfyh3iuiiaaCK1QM
	2XHyZLA3WzZkhIfl3CEK02yA6q/g0WYQlE/1r8K6A/ckERL8NfMarjLwNM2Kgb2sk0ov8l
	tXOrX8+gleM1BGEoAH9u8HR0zg+3v/h9XZhVIzQ5dtPiNGOZ+tBK6lKf893yjX674MfTAH
	9CL/MAKUBNwESgYvc71kAgQmEjigBTd6bTch6GesEiUsxfs5RU1wATXO1IxC/zUW95792p
	QoS1+qcT0th+KA2h2zWxwJ9gyxZDAU0r6MtNnJkyro+L8Y3GYxhggBP0gudxZQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758785252; a=rsa-sha256; cv=none;
	b=dhYSFbwoLebkJm8UPDlKlf84C0l0Af8wTo6j485bhdrB5LpmDtDbOtIIcYWYLuAuOeTQcb
	ALMWq/zAKY9XAiaCa9YSc2IVDxaPYjuxf1hcud3XFONnJPZC2ikhEsLn2QnlzBg4j3CZMf
	ywWrYBkJ1pB/imAkMbXkrurXo/tyOcECdoRtZVUsb/3Im9kYw2ToM94ziRTB3Szyi6hkhK
	s09QLlCCLS25LfIEZ87Ck2yovyKVU8EaoIOeeYt6yAEuRq4tEC9eQfiXB11YovzVQpKcXI
	BByKdO+ZgA/KLR5DXkiqEbh2i8F7ukgKvxkaIOCABBXqMOAXfI70jGponZlBog==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXQKH6rXMz16CV;
	Thu, 25 Sep 2025 07:27:31 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58P7RVMG006052;
	Thu, 25 Sep 2025 07:27:31 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58P7RVXF006049;
	Thu, 25 Sep 2025 07:27:31 GMT
	(envelope-from git)
Date: Thu, 25 Sep 2025 07:27:31 GMT
Message-Id: <202509250727.58P7RVXF006049@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Ed Maste 
Subject: git: 8f7dded41251 - stable/14 - bsdinstall: fix
  vfs.zfs.vdev.min_auto_ashift oid
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: emaste
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 8f7dded412516d35e538ed05524d2a14870e62b0
Auto-Submitted: auto-generated

The branch stable/14 has been updated by emaste:

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

commit 8f7dded412516d35e538ed05524d2a14870e62b0
Author:     Siva Mahadevan 
AuthorDate: 2025-07-15 16:45:24 +0000
Commit:     Ed Maste 
CommitDate: 2025-09-25 07:26:55 +0000

    bsdinstall: fix vfs.zfs.vdev.min_auto_ashift oid
    
    Signed-off-by: Siva Mahadevan 
    PR: 266374
    Pull request: https://github.com/freebsd/freebsd-src/pull/1851
    Reviewed by: emaste
    Sponsored by: The FreeBSD Foundation
    
    (cherry picked from commit 87a7b35f04b60956e9aa192680ae80773ec38f14)
    (cherry picked from commit 093f3f26e95198bf1db082763e915d7a53c6ba82)
---
 usr.sbin/bsdinstall/scripts/zfsboot | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot
index 8e3df4631abf..918e77db6a9d 100755
--- a/usr.sbin/bsdinstall/scripts/zfsboot
+++ b/usr.sbin/bsdinstall/scripts/zfsboot
@@ -69,7 +69,7 @@ f_include $BSDCFG_SHARE/variable.subr
 : ${ZFSBOOT_VDEV_TYPE:=stripe}
 
 #
-# Should we use sysctl(8) vfs.zfs.min_auto_ashift=12 to force 4K sectors?
+# Should we use sysctl(8) vfs.zfs.vdev.min_auto_ashift=12 to force 4K sectors?
 #
 : ${ZFSBOOT_FORCE_4K_SECTORS=1}
 
@@ -221,7 +221,7 @@ PRINTF_CONF="printf '%s=\"%%s\"\\\n' %s >> \"%s\""
 PRINTF_FSTAB='printf "$FSTAB_FMT" "%s" "%s" "%s" "%s" "%s" "%s" >> "%s"'
 SHELL_TRUNCATE=':> "%s"'
 SWAP_GMIRROR_LABEL='gmirror label swap %s'
-SYSCTL_ZFS_MIN_ASHIFT_12='sysctl vfs.zfs.min_auto_ashift=12'
+SYSCTL_ZFS_MIN_ASHIFT_12='sysctl vfs.zfs.vdev.min_auto_ashift=12'
 UMOUNT='umount "%s"'
 ZFS_CREATE_WITH_OPTIONS='zfs create %s "%s"'
 ZFS_MOUNT='zfs mount "%s"'
@@ -255,7 +255,7 @@ msg_encrypt_disks="Encrypt Disks?"
 msg_encrypt_disks_help="Use geli(8) to encrypt all data partitions"
 msg_error="Error"
 msg_force_4k_sectors="Force 4K Sectors?"
-msg_force_4k_sectors_help="Align partitions to 4K sector boundries and set vfs.zfs.min_auto_ashift=12"
+msg_force_4k_sectors_help="Align partitions to 4K sector boundries and set vfs.zfs.vdev.min_auto_ashift=12"
 msg_freebsd_installer="$OSNAME Installer"
 msg_geli_password="Enter a strong passphrase, used to protect your encryption keys. You will be required to enter this passphrase each time the system is booted"
 msg_geli_setup="Initializing encryption on selected disks,\n this will take several seconds per disk"
@@ -1099,7 +1099,7 @@ zfs_create_boot()
 	#
 	f_dprintf "$funcname: Preparing disk partitions for ZFS pool..."
 
-	# Force 4K sectors using vfs.zfs.min_auto_ashift=12
+	# Force 4K sectors using vfs.zfs.vdev.min_auto_ashift=12
 	if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; then
 		f_dprintf "$funcname: With 4K sectors..."
 		f_eval_catch $funcname sysctl "$SYSCTL_ZFS_MIN_ASHIFT_12" \
@@ -1382,7 +1382,7 @@ zfs_create_boot()
 
 	if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; then
 		f_eval_catch $funcname echo "$ECHO_APPEND" \
-	             'vfs.zfs.min_auto_ashift=12' \
+	             'vfs.zfs.vdev.min_auto_ashift=12' \
 	             $BSDINSTALL_TMPETC/sysctl.conf.zfs || return $FAILURE
 	fi
 

From nobody Thu Sep 25 14:42:02 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXbyf2SK2z68c3t;
	Thu, 25 Sep 2025 14:42:02 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cXbyf1WJrz3QL3;
	Thu, 25 Sep 2025 14:42:02 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758811322;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=oNOzuxLagEmG0EDTsBgxWLswm3CpteaDcnnHHzNvz4o=;
	b=DejYirgBx+MNga/zk8Xxe/PFSitfovzuz9tdqvqp6lMa+QdoGUi7exjekUAZcm51cA/3DQ
	mRc890iwpvw8Pbz2oQclMFeObFyOQ3IUyjUored8Bqh9eQoJ/dFGDSnncZ3Io9UMt5UQ+D
	Q7mXBbEgQDMiOPmy2iG8yFRvc7uvkkD2QHX3+QR5mYJuz15nkidQXO1g1J1LZOq+Pok7qW
	8sgaMpDLOu4SAt+pfjMwfvbXU+CrmJ7g/eaTAVxghK5c+s1Yd2wVN2EMyPdqRVGcXEmOOO
	UDomarKyqzeO5Kq/p8tjkbcWWXOurWBseumFiJBBY+TJyKLjZ14uBkTnXGiduw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758811322;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=oNOzuxLagEmG0EDTsBgxWLswm3CpteaDcnnHHzNvz4o=;
	b=iL1xQsP85EmAAjktzuUF7kPE0wCSeXMgZlIilnRstdOO/nCOmVSwzqQj0o/j6AfOrblzW6
	gnGUJf0JHn99of51RQHDLWkQD4P81EZKL/Vvg3Q5wsvEISIc5ruiLuny8QQLQAScDujdmB
	op84921XYQfSvkyc5vaz4hjNjGUAA0wFPRQVD0bpkcWXy+kVAGUnD93Tb2UccJYBcL67Bl
	doIz+ZOph/S0cTdgagevgSQTmV3ccGSRa4sqU4gOYqOMBHknfKyBtnMJCMHwgPeB0FtrCc
	O6HaFuE34MdwVvSCWJSDffBIGSVRgEeTbJf9D7nAwqrtePNeVyLs3S7UoY9EgQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758811322; a=rsa-sha256; cv=none;
	b=Fuy/zheP1K601zSdmT/q/wuWOTMwUjPAIa9NQCT5QHF3vUNCaDdiO9cLPJKMVgune+Pw8P
	yOl6mylEQw19RqXmV03CaOdcV1pE8cvMx4+iliGpRXMFLDXSGlfmR/mqF7y8yfgAp9Nuqa
	aFv4h+4deYamEYtbtM9z+N4nOM2+HNEMoypZ+PB9cRyPLrAduihoXP+qQnlt8SgOg6IraH
	1Kp3TCMMPBaAyV/LHVknI8d7N1Nm3FB0gej/y31AQLUvZcYLQ3lJcaZdj+JuqS7+3NlZLq
	nkE6vfJAL2qPBT43MOuvoT+itjgpFrB7iGIixV6n+PSb2G/J2a1b1kwYUmChNg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXbyf0vYcz1LJh;
	Thu, 25 Sep 2025 14:42:02 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PEg2HS031536;
	Thu, 25 Sep 2025 14:42:02 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PEg2OM031533;
	Thu, 25 Sep 2025 14:42:02 GMT
	(envelope-from git)
Date: Thu, 25 Sep 2025 14:42:02 GMT
Message-Id: <202509251442.58PEg2OM031533@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Ed Maste 
Subject: git: 7e42cedae894 - stable/13 - bsdinstall: fix
  vfs.zfs.vdev.min_auto_ashift oid
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: emaste
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/13
X-Git-Reftype: branch
X-Git-Commit: 7e42cedae894c8910d95cefa2490235628243b2c
Auto-Submitted: auto-generated

The branch stable/13 has been updated by emaste:

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

commit 7e42cedae894c8910d95cefa2490235628243b2c
Author:     Siva Mahadevan 
AuthorDate: 2025-07-15 16:45:24 +0000
Commit:     Ed Maste 
CommitDate: 2025-09-25 14:41:33 +0000

    bsdinstall: fix vfs.zfs.vdev.min_auto_ashift oid
    
    Signed-off-by: Siva Mahadevan 
    PR: 266374
    Pull request: https://github.com/freebsd/freebsd-src/pull/1851
    Reviewed by: emaste
    Sponsored by: The FreeBSD Foundation
    
    (cherry picked from commit 87a7b35f04b60956e9aa192680ae80773ec38f14)
    (cherry picked from commit 093f3f26e95198bf1db082763e915d7a53c6ba82)
    (cherry picked from commit 8f7dded412516d35e538ed05524d2a14870e62b0)
---
 usr.sbin/bsdinstall/scripts/zfsboot | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot
index aa0c2648911f..8eebc5367729 100755
--- a/usr.sbin/bsdinstall/scripts/zfsboot
+++ b/usr.sbin/bsdinstall/scripts/zfsboot
@@ -64,7 +64,7 @@ f_include $BSDCFG_SHARE/variable.subr
 : ${ZFSBOOT_VDEV_TYPE:=stripe}
 
 #
-# Should we use sysctl(8) vfs.zfs.min_auto_ashift=12 to force 4K sectors?
+# Should we use sysctl(8) vfs.zfs.vdev.min_auto_ashift=12 to force 4K sectors?
 #
 : ${ZFSBOOT_FORCE_4K_SECTORS=1}
 
@@ -216,7 +216,7 @@ PRINTF_CONF="printf '%s=\"%%s\"\\\n' %s >> \"%s\""
 PRINTF_FSTAB='printf "$FSTAB_FMT" "%s" "%s" "%s" "%s" "%s" "%s" >> "%s"'
 SHELL_TRUNCATE=':> "%s"'
 SWAP_GMIRROR_LABEL='gmirror label swap %s'
-SYSCTL_ZFS_MIN_ASHIFT_12='sysctl vfs.zfs.min_auto_ashift=12'
+SYSCTL_ZFS_MIN_ASHIFT_12='sysctl vfs.zfs.vdev.min_auto_ashift=12'
 UMOUNT='umount "%s"'
 ZFS_CREATE_WITH_OPTIONS='zfs create %s "%s"'
 ZFS_MOUNT='zfs mount "%s"'
@@ -250,7 +250,7 @@ msg_encrypt_disks="Encrypt Disks?"
 msg_encrypt_disks_help="Use geli(8) to encrypt all data partitions"
 msg_error="Error"
 msg_force_4k_sectors="Force 4K Sectors?"
-msg_force_4k_sectors_help="Align partitions to 4K sector boundries and set vfs.zfs.min_auto_ashift=12"
+msg_force_4k_sectors_help="Align partitions to 4K sector boundries and set vfs.zfs.vdev.min_auto_ashift=12"
 msg_freebsd_installer="FreeBSD Installer"
 msg_geli_password="Enter a strong passphrase, used to protect your encryption keys. You will be required to enter this passphrase each time the system is booted"
 msg_geli_setup="Initializing encryption on selected disks,\n this will take several seconds per disk"
@@ -1151,7 +1151,7 @@ zfs_create_boot()
 	#
 	f_dprintf "$funcname: Preparing disk partitions for ZFS pool..."
 
-	# Force 4K sectors using vfs.zfs.min_auto_ashift=12
+	# Force 4K sectors using vfs.zfs.vdev.min_auto_ashift=12
 	if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; then
 		f_dprintf "$funcname: With 4K sectors..."
 		f_eval_catch $funcname sysctl "$SYSCTL_ZFS_MIN_ASHIFT_12" \
@@ -1460,7 +1460,7 @@ zfs_create_boot()
 
 	if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; then
 		f_eval_catch $funcname echo "$ECHO_APPEND" \
-	             'vfs.zfs.min_auto_ashift=12' \
+	             'vfs.zfs.vdev.min_auto_ashift=12' \
 	             $BSDINSTALL_TMPETC/sysctl.conf.zfs || return $FAILURE
 	fi
 

From nobody Thu Sep 25 19:26:37 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXkH200Hgz68VM9;
	Thu, 25 Sep 2025 19:26:37 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cXkH15lNdz42kq;
	Thu, 25 Sep 2025 19:26:37 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758828397;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=dxAFcLvwAlBXOOmpQdIoYF+9kPiGN1+JM1nc9ZTcen4=;
	b=O829JxNYesC9pI12acv+hZeQE8MN/4o8AskBZs9AFya0i9Z84vbPwaQLO2aVVwjt/01l/M
	vjAqJlGDtxhFkbGhkzVzd+MMyXYKJK9n/dNVW9ooBb+WxpPecmIJqL46txnrPZ0dgICH31
	mVFWwHITUMdWLsRxM60ZhSKcZvWADpSCzbaWTVWHUaZHN+U6JKAZh9gFROSYI1ckn5s7J2
	Y6ScpmGkHsSMNd4SoS8UsfLzg2FnYMiurcRBTzlBxdFmwFZDcVUf5LCDtEKVc8OcB8qiz3
	cTQ2ttEiK7xgd33qbYe+3NtXIqxMdiJCaj0ZegWdNKCYW3LNzW558f/OjVbqbw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758828397;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=dxAFcLvwAlBXOOmpQdIoYF+9kPiGN1+JM1nc9ZTcen4=;
	b=vXv7phjW7o4iPJwyl6ws5su8YOswWV+MC0W6ZEJUJ/MBK0lV53ERNyZq1UhllP7YLEXF4Q
	Jd0wqZoF1O3IKh72IpwpC4NMQB76ebFM1w25tqIyR0RgSIdbe5TR2rpEWn4qeX3mOeS9U/
	9ftDKuuCC7QDSuuxScKBzETVe6uFXqsGn5xP4NCwLqXRXpwji/J/lEP4pQPhBlVgcb4+od
	ZWKYJjNZDHP/QECFIugpdDzmGMUXrEbhBEl2OXe+rIJ32FwqvRASLlHI3ANDhK4cs9Xtnh
	Noq9Mhzn8GXzrfi02g3WeKQWbnPJb86z4vj0/X8mOH/kLkuDA4ZBIqWXoKlc6A==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758828397; a=rsa-sha256; cv=none;
	b=oGXwRisQQCnUIhqZnpYwZnCPtAX4l1DSR25tFdfmxjuhlp/DvLvGhvIZm9oDJ7IC+t5quE
	IKo8HVf7e02xX1lsY23hhThbnJEqD+QPE5WiIPQP6Ia+eWG0uA/FJN5RkEt9AkFZ8KH3SE
	fCCpdgepV3CFqcY/Zddz/zg6mjuv30rNQNRzaPdcxp3p68btuV4lJuXU1FfyTBgDqoCYE8
	frCe4ol6haNJXmvO9GOm7RT4Gus1haVIh0W+eSu2OmEuAvZCQk8u4+BkPgSuULp1FXflwX
	CZ3YtNYtqrZIO987zo4/BNwD5HH33WJcVmaevv6G8wzReadU6xYBAqyt5Q/0DA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXkH14wjVzn3;
	Thu, 25 Sep 2025 19:26:37 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PJQbWl058861;
	Thu, 25 Sep 2025 19:26:37 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PJQbwb058858;
	Thu, 25 Sep 2025 19:26:37 GMT
	(envelope-from git)
Date: Thu, 25 Sep 2025 19:26:37 GMT
Message-Id: <202509251926.58PJQbwb058858@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Colin Percival 
Subject: git: 8134e7f4b406 - stable/15 - freebsd-update: Library
  ordering
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: cperciva
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 8134e7f4b406dadb784d85e2cf3f9f4b578c7619
Auto-Submitted: auto-generated

The branch stable/15 has been updated by cperciva:

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

commit 8134e7f4b406dadb784d85e2cf3f9f4b578c7619
Author:     Colin Percival 
AuthorDate: 2025-09-23 06:55:08 +0000
Commit:     Colin Percival 
CommitDate: 2025-09-25 19:25:55 +0000

    freebsd-update: Library ordering
    
    Upgrading from 14.x to 15.x with freebsd-update broke because libc
    depends on the new libsys library; freebsd-update installed the new
    libc before creating libsys, and every step after that failed because
    all the tools (including gunzip and install) are dynamically linked
    and need a working libc.
    
    Enforce ordering when installing shared objects: First libsys, then
    libc, then libthr, and then all the rest of the shared object files.
    
    This is a candidate for an Errata Notice since the issue this fixes
    breaks upgrades.
    
    PR:             289769
    Reported by:    Graham Perrin
    Reviewed by:    kib
    MFC after:      3 days
    Sponsored by:   https://www.patreon.com/cperciva
    Differential Revision:  https://reviews.freebsd.org/D52688
    
    (cherry picked from commit 7ece602e00e85195fc426a2401c49921cd39735e)
---
 usr.sbin/freebsd-update/freebsd-update.sh | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh
index 81040431ea79..7815502dba39 100644
--- a/usr.sbin/freebsd-update/freebsd-update.sh
+++ b/usr.sbin/freebsd-update/freebsd-update.sh
@@ -3111,10 +3111,28 @@ Kernel updates have been installed.  Please reboot and run
 		    grep -E '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' > INDEX-NEW
 		install_from_index INDEX-NEW || return 1
 
-		# Install new shared libraries next
+		# Next, in order, libsys, libc, and libthr.
 		grep -vE '^/boot/' $1/INDEX-NEW |
 		    grep -vE '^[^|]+\|d\|' |
 		    grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' |
+		    grep -E '^[^|]*/lib/libsys\.so\.[0-9]+\|' > INDEX-NEW
+		install_from_index INDEX-NEW || return 1
+		grep -vE '^/boot/' $1/INDEX-NEW |
+		    grep -vE '^[^|]+\|d\|' |
+		    grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' |
+		    grep -E '^[^|]*/lib/libc\.so\.[0-9]+\|' > INDEX-NEW
+		install_from_index INDEX-NEW || return 1
+		grep -vE '^/boot/' $1/INDEX-NEW |
+		    grep -vE '^[^|]+\|d\|' |
+		    grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' |
+		    grep -E '^[^|]*/lib/libthr\.so\.[0-9]+\|' > INDEX-NEW
+		install_from_index INDEX-NEW || return 1
+
+		# Install the rest of the shared libraries next
+		grep -vE '^/boot/' $1/INDEX-NEW |
+		    grep -vE '^[^|]+\|d\|' |
+		    grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' |
+		    grep -vE '^[^|]*/lib/(libsys|libc|libthr)\.so\.[0-9]+\|' |
 		    grep -E '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-NEW
 		install_from_index INDEX-NEW || return 1
 

From nobody Thu Sep 25 19:27:06 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXkHZ720mz68Trd;
	Thu, 25 Sep 2025 19:27:06 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cXkHZ4tPwz43X4;
	Thu, 25 Sep 2025 19:27:06 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758828426;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=uw4mPz/rsLI4Li+nZb2MiuOCX3mWs1E08WEMjx/VzpI=;
	b=RH9MW99sm5D9UGw8mkT65thXD8QP9nOeyTD66vJmEagfSaZMBCEiZHJn/k/jtIn8KgOEtu
	hpz0XoJRGYM6AbRC8gb6z37AANJFjy9fHI/6WNWM4vvl1zYWKoyhjQif1q5ckPD3nuKCPb
	RkvpU70gKOIlVJyxeySp5qVq7OrUVI7hpI3eZaMynBwVqAOcRgfltMd1iqSTX2x83mdWNM
	6PHmtNwN4ehhUwIVb+mUlH/ZOG5zFnGqU0+90oX6y4zetzE77FwvY/YLhoPN+Ubk+QISYu
	wGdR4lgJrSQot6m1FXAR8o+5kmDPQFkWyNTajKB2Si1PKrwQYFWIaP7SvOUbgQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758828426;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=uw4mPz/rsLI4Li+nZb2MiuOCX3mWs1E08WEMjx/VzpI=;
	b=nR0F4d2GAgk2cblf5myRX1ry9kyIAxeKI6gu0MQGCsApP3aa6eO1QtTDbOEgM3Qru9cfaw
	AqxhFL37nL/p0E/Ad+3ELP9w9QvZyF5RLMJiKbO+hzbeBWSShINujNKV3ku4PxjTphgzY7
	+Kw8YlOL4yRBJuCvDRmdWLdHxhqC1q7ctvPLQN3u0v8oWsn3CshhsaQmH/SqBxy3nubUfa
	9WsT+ahh5mlfMNwzSSCfuv17lA0JWm7kediSoPlUPOYYcOb4brwimT6lbTcvOHS8WdogeY
	gCZzs5TauERLwCRcNt3iF8TD38fiqtlQ1qag2722jZrnvRuxC+KmlY4kzW/nbg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758828426; a=rsa-sha256; cv=none;
	b=bInHnzYTaK2tcDoqZ5hIH7jZcdYJOXgULkbtxggQvcK6AEavtZ72J99++sQJFbGXV7fGAo
	fAWGchjJ5z5QA2WhPi076nAXRtoBZz7tH4r48jnXDNPhkcXKmClGEHJL701ZxnQZbJlIiJ
	FRiRgWgn1YcvbpkRV9PKMdk7NcPKI0qDf5QTgDuJ6+SnTlagScpONLHPecFbMg0L4wWaqs
	DXL+uUReUO6vb300OrVvA1+hxVeGZaBxeKc9lt1zdW0AzGxfzShrfPDaNXIJoKhLPQ7Xvv
	fphsHk7Re6gSbBM6bRn/rVboZiMQBGCpSmFC0+Z6MacvGVnnEp5rNeHRbxkgDA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXkHZ49JQzqH;
	Thu, 25 Sep 2025 19:27:06 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PJR6PR059128;
	Thu, 25 Sep 2025 19:27:06 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PJR6Iu059125;
	Thu, 25 Sep 2025 19:27:06 GMT
	(envelope-from git)
Date: Thu, 25 Sep 2025 19:27:06 GMT
Message-Id: <202509251927.58PJR6Iu059125@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Colin Percival 
Subject: git: e26928669f39 - stable/14 - freebsd-update: Library
  ordering
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: cperciva
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: e26928669f39c8683aea74040b9e2472e944c43a
Auto-Submitted: auto-generated

The branch stable/14 has been updated by cperciva:

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

commit e26928669f39c8683aea74040b9e2472e944c43a
Author:     Colin Percival 
AuthorDate: 2025-09-23 06:55:08 +0000
Commit:     Colin Percival 
CommitDate: 2025-09-25 19:26:58 +0000

    freebsd-update: Library ordering
    
    Upgrading from 14.x to 15.x with freebsd-update broke because libc
    depends on the new libsys library; freebsd-update installed the new
    libc before creating libsys, and every step after that failed because
    all the tools (including gunzip and install) are dynamically linked
    and need a working libc.
    
    Enforce ordering when installing shared objects: First libsys, then
    libc, then libthr, and then all the rest of the shared object files.
    
    This is a candidate for an Errata Notice since the issue this fixes
    breaks upgrades.
    
    PR:             289769
    Reported by:    Graham Perrin
    Reviewed by:    kib
    MFC after:      3 days
    Sponsored by:   https://www.patreon.com/cperciva
    Differential Revision:  https://reviews.freebsd.org/D52688
    
    (cherry picked from commit 7ece602e00e85195fc426a2401c49921cd39735e)
---
 usr.sbin/freebsd-update/freebsd-update.sh | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh
index 543ca9319da1..a9bda574713c 100644
--- a/usr.sbin/freebsd-update/freebsd-update.sh
+++ b/usr.sbin/freebsd-update/freebsd-update.sh
@@ -3058,10 +3058,28 @@ Kernel updates have been installed.  Please reboot and run
 		    grep -E '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' > INDEX-NEW
 		install_from_index INDEX-NEW || return 1
 
-		# Install new shared libraries next
+		# Next, in order, libsys, libc, and libthr.
 		grep -vE '^/boot/' $1/INDEX-NEW |
 		    grep -vE '^[^|]+\|d\|' |
 		    grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' |
+		    grep -E '^[^|]*/lib/libsys\.so\.[0-9]+\|' > INDEX-NEW
+		install_from_index INDEX-NEW || return 1
+		grep -vE '^/boot/' $1/INDEX-NEW |
+		    grep -vE '^[^|]+\|d\|' |
+		    grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' |
+		    grep -E '^[^|]*/lib/libc\.so\.[0-9]+\|' > INDEX-NEW
+		install_from_index INDEX-NEW || return 1
+		grep -vE '^/boot/' $1/INDEX-NEW |
+		    grep -vE '^[^|]+\|d\|' |
+		    grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' |
+		    grep -E '^[^|]*/lib/libthr\.so\.[0-9]+\|' > INDEX-NEW
+		install_from_index INDEX-NEW || return 1
+
+		# Install the rest of the shared libraries next
+		grep -vE '^/boot/' $1/INDEX-NEW |
+		    grep -vE '^[^|]+\|d\|' |
+		    grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' |
+		    grep -vE '^[^|]*/lib/(libsys|libc|libthr)\.so\.[0-9]+\|' |
 		    grep -E '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-NEW
 		install_from_index INDEX-NEW || return 1
 

From nobody Thu Sep 25 19:27:34 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXkJ62cT1z68V2d;
	Thu, 25 Sep 2025 19:27:34 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cXkJ61sRsz44RZ;
	Thu, 25 Sep 2025 19:27:34 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758828454;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=W0Nib4+aKxMEHTcU2boH8yG+0zeOpw4rrtOakznu4+w=;
	b=lK93uRVaCLMN8LqQ4XR50ZI+Fm22efJHjjVHHqnjnGJyyZLVxEaXD7YZ5Och5ZW4CpS6BQ
	+CiiJ+c6zSLo1i2Lyc5Jt40E4RLq5rfk2EVgC6PHsAwC9VpottCEIv+WBK7IQsxhFhq3cA
	gJwXLa++BA3XnCUKR1LdSuAsg/jT8E5M05nrxIIAdJQGgY0LjXezTJ8ShFAkRDFKp11+bw
	AcJQvoeYm68YBUsrihjgnUIaw4Jp603hvyYGfQMuUeFuCQ8CrLkWduVRfrrDGqsIttSJd2
	fS1Ukeq+olBKxvO3pswjmjCRSXhoYFsQd3o7jne3M2gtfnD/LPLZFnbm7rBZUw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758828454;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=W0Nib4+aKxMEHTcU2boH8yG+0zeOpw4rrtOakznu4+w=;
	b=aNBBVBaGyjWJXA5LqjGft6eKqFOL4X4W/CwPGeUSSwuLgFsaihrLxnUte+A3wEdZVAd9N9
	rhrph0gleiKIrlwzMLK9t1z2r9d8fWRfKsqs3ZnO9elnocwbqBzCLw4ftC2FeJhLGJSpfh
	wgXZHRYP2r+okB1QspQR/C3V8ZQH7uf+eDi+N6cLis5blHONzFa1TzYa63MpWe33LfO4Ef
	WlsSkBxql4L2p2ELCRj+3wGtBcNN5kLn/uqBugLGYZrQ28LHHTTmYX1Ap1iqgTq3nje0pZ
	f/q5wMMKUfDC/ln1xvk9yBsjCcZ6hAU9Hp6slHaKt5SHWt1wYJh6aGKAGp/C0g==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758828454; a=rsa-sha256; cv=none;
	b=aSRbhtMREfJeXHsypM0dCFMrb9AZb9U+EJ04rD+2TM2KwUTTMf4mS7TsW047Pbg1dIKmuT
	1AU+7iKYNJErX22U+OYcbyLUMz5lk9cipjWCMsHnJmwBatB3A4w5YW2PofGq6mtnZGuJkU
	+I97/D8yMzymaTHmp+g3pGz3xfQ4/U58vWY/otng9FHW9q0WJI5fq6Sac05uKUzdRwJN0P
	VY2icScPGi007Np0dKlBIpW7U2yVIPMQD0zHzgYm+sHy8LaIk27PoGGdTjtTTrUy++Ikfv
	Zn42oDmL4oexPGwfGhwfvyvSSvRk43Fv08sgbYIw3mTLF/5MYMKGpGHhv3hxHg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXkJ61H9sztD;
	Thu, 25 Sep 2025 19:27:34 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PJRYA5059345;
	Thu, 25 Sep 2025 19:27:34 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PJRYg5059342;
	Thu, 25 Sep 2025 19:27:34 GMT
	(envelope-from git)
Date: Thu, 25 Sep 2025 19:27:34 GMT
Message-Id: <202509251927.58PJRYg5059342@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Colin Percival 
Subject: git: 87eb52f1b061 - stable/13 - freebsd-update: Library
  ordering
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: cperciva
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/13
X-Git-Reftype: branch
X-Git-Commit: 87eb52f1b061989a948d3eb08953c81a4e1281f0
Auto-Submitted: auto-generated

The branch stable/13 has been updated by cperciva:

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

commit 87eb52f1b061989a948d3eb08953c81a4e1281f0
Author:     Colin Percival 
AuthorDate: 2025-09-23 06:55:08 +0000
Commit:     Colin Percival 
CommitDate: 2025-09-25 19:27:28 +0000

    freebsd-update: Library ordering
    
    Upgrading from 14.x to 15.x with freebsd-update broke because libc
    depends on the new libsys library; freebsd-update installed the new
    libc before creating libsys, and every step after that failed because
    all the tools (including gunzip and install) are dynamically linked
    and need a working libc.
    
    Enforce ordering when installing shared objects: First libsys, then
    libc, then libthr, and then all the rest of the shared object files.
    
    This is a candidate for an Errata Notice since the issue this fixes
    breaks upgrades.
    
    PR:             289769
    Reported by:    Graham Perrin
    Reviewed by:    kib
    MFC after:      3 days
    Sponsored by:   https://www.patreon.com/cperciva
    Differential Revision:  https://reviews.freebsd.org/D52688
    
    (cherry picked from commit 7ece602e00e85195fc426a2401c49921cd39735e)
---
 usr.sbin/freebsd-update/freebsd-update.sh | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh
index f620b956f80b..bb30cd54c01a 100644
--- a/usr.sbin/freebsd-update/freebsd-update.sh
+++ b/usr.sbin/freebsd-update/freebsd-update.sh
@@ -3043,10 +3043,28 @@ Kernel updates have been installed.  Please reboot and run
 		    grep -E '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' > INDEX-NEW
 		install_from_index INDEX-NEW || return 1
 
-		# Install new shared libraries next
+		# Next, in order, libsys, libc, and libthr.
 		grep -vE '^/boot/' $1/INDEX-NEW |
 		    grep -vE '^[^|]+\|d\|' |
 		    grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' |
+		    grep -E '^[^|]*/lib/libsys\.so\.[0-9]+\|' > INDEX-NEW
+		install_from_index INDEX-NEW || return 1
+		grep -vE '^/boot/' $1/INDEX-NEW |
+		    grep -vE '^[^|]+\|d\|' |
+		    grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' |
+		    grep -E '^[^|]*/lib/libc\.so\.[0-9]+\|' > INDEX-NEW
+		install_from_index INDEX-NEW || return 1
+		grep -vE '^/boot/' $1/INDEX-NEW |
+		    grep -vE '^[^|]+\|d\|' |
+		    grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' |
+		    grep -E '^[^|]*/lib/libthr\.so\.[0-9]+\|' > INDEX-NEW
+		install_from_index INDEX-NEW || return 1
+
+		# Install the rest of the shared libraries next
+		grep -vE '^/boot/' $1/INDEX-NEW |
+		    grep -vE '^[^|]+\|d\|' |
+		    grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' |
+		    grep -vE '^[^|]*/lib/(libsys|libc|libthr)\.so\.[0-9]+\|' |
 		    grep -E '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-NEW
 		install_from_index INDEX-NEW || return 1
 

From nobody Thu Sep 25 21:08:13 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXmXF2lkqz68d6D;
	Thu, 25 Sep 2025 21:08:13 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cXmXF1SYmz4LCn;
	Thu, 25 Sep 2025 21:08:13 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758834493;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=pbtcjQWDHyGi5DM6vTFDUDzA/OAaKhgtgz5xDnMSTrs=;
	b=iTe/NH9X816093QY+14zoCrYktzWrBV/KRpX1owH6dBgd+O83V/MbjVaReIKVMcyqlYBDG
	R68LgQJwMB1krYZUfv2G9YeaYgMhM4iYkSn23JJc/tl57KOatZF1eNOBuNbB/BOmSw/9rD
	slSxZmMJmfPrQgohwUywx48hFUVWl1HZpfVQvyga6C5iLk/dQJ4IcZvmIuehQVRLIJ+O+V
	q0mUioclt4nvC3d+BjNQu4PMZEkrH6NwvhydZxqXkuSVq8UNKO58hjwYUulEWToIybg7LO
	r6DOC3uggZa7HZwS+LmSdM4cBUvYYtq4add2l1oILOXE73yFZ0iqYh/+L0gJTg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758834493;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=pbtcjQWDHyGi5DM6vTFDUDzA/OAaKhgtgz5xDnMSTrs=;
	b=ip25TjF3ryhHoeJ7mbLG2SCPp9PmbVRfT6VWOmedFfdIC2HrYXSNQG2QRwxCqHs8X9NnT/
	BFCxCl9G0BL+apwmGw7lQ7NgfLQ2sVtTYT6epq0zT12UAf7SYO63RjDfQdoEIrR1DMx2td
	vP71lyGhaamSNZ1PdXnmgEAiVbTzk2Fx54St4EgGGKqaEyzbdf6zC9pNf82W+A98xdzyAU
	GV0p6oPVqp+v7vPQsdpmtdHfdlgU7HzLnds9TlV2oWE21whADjnQS81J/iYH0EglaQqJXC
	R87j5Kzh77hp4grvmT5tFN9vU1QDHQoXnbzjsDrXc2LBkeZ8aELtnbRdopLtkw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758834493; a=rsa-sha256; cv=none;
	b=WFD8AKlKesNPoHUQ71y8fJVZXqhQ1ppLOh9ogHh/wkWsNxrzTbce3UZ9psbtf3q4l9fJtT
	QoLlTDeuNhx5nLVnMEJlx9aU6Hjy8Ns6LRa746zLQaqgtgXeYl/rMhdZIKoEIz/J4GD0Dx
	vp0KRLxppU8qanVChmzUHJQTBLYKv9cFHN4IkcmJrMUpkrpaEJiAtBAgjki7YILJBnK7Jt
	qYsNoEB7S916YQQQ9BtdOA2v+GA5bCUVpFzgUlufk4KEnIvSWmI9H+UT0INUcVpdm5IvqP
	DdMoaYDHVRlMkS5kJSR0/BLkxfi7glY7DCIULdE1PTZsz1EUoKTYV9TIgtdc7Q==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXmXF0whFz3GT;
	Thu, 25 Sep 2025 21:08:13 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PL8Dul047841;
	Thu, 25 Sep 2025 21:08:13 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PL8Dq7047838;
	Thu, 25 Sep 2025 21:08:13 GMT
	(envelope-from git)
Date: Thu, 25 Sep 2025 21:08:13 GMT
Message-Id: <202509252108.58PL8Dq7047838@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Colin Percival 
Subject: git: 32c48d373817 - stable/15 - release: Make toolchain
  OCI container use pkg set
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: cperciva
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 32c48d37381749021d16db3a4c76202a7eb18456
Auto-Submitted: auto-generated

The branch stable/15 has been updated by cperciva:

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

commit 32c48d37381749021d16db3a4c76202a7eb18456
Author:     Colin Percival 
AuthorDate: 2025-09-24 23:12:57 +0000
Commit:     Colin Percival 
CommitDate: 2025-09-25 21:07:59 +0000

    release: Make toolchain OCI container use pkg set
    
    This also indirectly addresses the lack of FreeBSD-lldb package on
    the riscv64 platform by relying on that package being part of the
    FreeBSD-set-devel set iff it exists.
    
    A subsequent commit will adjust the "notoolchain" OCI container image
    to also use a package set, which will indirectly affect the contents
    of the "toolchain" container (which is an explicit superset of the
    "notoolchain" container).
    
    MFC after:      1 day
    Co-authored-by: dch
    
    (cherry picked from commit 56e01d0d7e0f7c2129c05467ca99d5f5538f52bc)
---
 release/tools/oci-image-toolchain.conf | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/release/tools/oci-image-toolchain.conf b/release/tools/oci-image-toolchain.conf
index b3b7eed8e8d1..984fb3fbfbfe 100644
--- a/release/tools/oci-image-toolchain.conf
+++ b/release/tools/oci-image-toolchain.conf
@@ -1,16 +1,11 @@
 #! /bin/sh
 
-# Build Open Container Initiative (OCI) container image with almost all of FreeBSD base.txz
+# Build OCI container images with almost all packages for running and building FreeBSD.
 
 OCI_BASE_IMAGE=notoolchain
 
 oci_image_build() {
 	set_cmd ${workdir} /bin/sh
 	install_packages ${abi} ${workdir} \
-		FreeBSD-clang \
-		FreeBSD-ctf-tools \
-		FreeBSD-lld \
-		FreeBSD-lldb \
-		FreeBSD-toolchain \
-		FreeBSD-*-dev
+		FreeBSD-set-devel
 }

From nobody Thu Sep 25 22:39:08 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXpY90pgHz68l8B;
	Thu, 25 Sep 2025 22:39:09 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cXpY903twz3FFv;
	Thu, 25 Sep 2025 22:39:09 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758839949;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=FEBkBShDsq4nIh8KnuG+4BeXzJD+D7KBM92D/8rAOvk=;
	b=YCGazfx3/P02nQYmvMV/Bu/JQ38Mv8R9ZLdMAnhqZHRFiOylmeWWyMFW9w/e0Z/PH8lDV4
	4JxAYNIQV8tgHuz+2CnKczBYWBQbCR827k3ygD/snwrpYSfMpMZQ04AlusIGf538TEtkg1
	+KROFY/QDem+98cZC7l/y70+sDqIT9ACB1PcOPOZyUSsZyhucLl/8xfcxN7+HkN07PPE2f
	3MhO3JKNBSmrqBXYNA3obZ7eGm/Sz9DqP5248kB5FQPxdHpXOyGzi55sZ/8x9mVsra2b2s
	OA8NZ0dUdetM+PE6p9JnoN/nwwj4svkeICze0WWYcIoVrh9WohbhaFQB1AKSsg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758839949;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=FEBkBShDsq4nIh8KnuG+4BeXzJD+D7KBM92D/8rAOvk=;
	b=Mv7onMp1nW70erbF6bF1yJVHVPIOOGd7y3li53bsnWNjcIm3jgdg0JZEIK7ENM383YAbdK
	B31g26vBXZpjSQCmD7aiaqdGs/jQHhkyiOCzO/2bSOpnlMT8uM1oJhCYFyN5CWD3UbdlLT
	OQp7Li1hIQ3mREt9K89x/uV3zWZJdtMQ6H7l56X/XZGvzBfIby+5JS7IVWr7TuHnF3pPUB
	zy5Nio1dAuF4GZGgVY0WrhPwo9SxOkIaNvglNVtOy9AFBNBqJNdRa8v/rbYQqyWu+Uscuv
	VLiROsfGorvxzOWAMWGYJmtDnrZ5e6F6A1JX3txRxWvIOPXWqWR4PceM0xVlAg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758839949; a=rsa-sha256; cv=none;
	b=b6CqOXEgkHnWqw1oIeiNvtdkAJprnPHSBRObqhOgqq7BQMU+t3AheSgW2r+9yWX+x33KLv
	ttPJKFnS6oV0Nfnv33tveFiMT234qTFqdmBxObQuji5YIjokkiLW7ssCkylCTgTN6yDDqY
	R3frKr3vFf/02qrzoF37ikrO2xWcWbWvxUKo5ql0X5lkYA/VKRNn77GtdfB7j6cp3GpDp7
	6HkbBe7bp6YkiLmRSn75SCTYweaCbEoYv5lz1LSCRX6IJK8iYTXsT0h/DPCFtkDW46ivgf
	gH3A+dj6wTtPBWP1UnrphTnrj26M1oNJtR5fbAypD9wdVRumzBH/0CkW1BBauw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXpY86mDGz5R3;
	Thu, 25 Sep 2025 22:39:08 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PMd8k0014621;
	Thu, 25 Sep 2025 22:39:08 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PMd8jX014618;
	Thu, 25 Sep 2025 22:39:08 GMT
	(envelope-from git)
Date: Thu, 25 Sep 2025 22:39:08 GMT
Message-Id: <202509252239.58PMd8jX014618@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Alan Somers 
Subject: git: 3289d3831718 - stable/15 - fusefs: fix the last_local_modify
  LLM/LastLocalModify.lookup/3 test
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: asomers
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 3289d383171825622c907df79a0824c8c2175d1c
Auto-Submitted: auto-generated

The branch stable/15 has been updated by asomers:

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

commit 3289d383171825622c907df79a0824c8c2175d1c
Author:     Alan Somers 
AuthorDate: 2025-09-15 00:22:36 +0000
Commit:     Alan Somers 
CommitDate: 2025-09-25 22:35:46 +0000

    fusefs: fix the last_local_modify LLM/LastLocalModify.lookup/3 test
    
    The LastLocalModify tests were originally written to simulate a race
    condition between VOP_SETATTR and VOP_LOOKUP.  They were later extended
    to cover some other VOPs that can affect file size, including VOP_WRITE.
    However, the test never correctly simulated the race with VOP_WRITE.  So
    that test only ever passed by accident.  Fix it by always opening the
    file with O_DIRECT.
    
    PR:             289237
    Reported by:    Siva Mahadevan 
    
    (cherry picked from commit d1eaa52d10f9b85e5f6358e1a280899b9d55dd07)
---
 tests/sys/fs/fusefs/last_local_modify.cc | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/tests/sys/fs/fusefs/last_local_modify.cc b/tests/sys/fs/fusefs/last_local_modify.cc
index 5fcd3c36c892..6b8c19f1efc7 100644
--- a/tests/sys/fs/fusefs/last_local_modify.cc
+++ b/tests/sys/fs/fusefs/last_local_modify.cc
@@ -174,7 +174,15 @@ static void* write_th(void* arg) {
 
 	if (sem)
 		sem_wait(sem);
-	fd = open("mountpoint/some_file.txt", O_RDWR);
+	/*
+	 * Open the file in direct mode.
+	 * The race condition affects both direct and non-direct writes, and
+	 * they have separate code paths.  However, in the non-direct case, the
+	 * kernel updates last_local_modify _before_ sending FUSE_WRITE to the
+	 * server.  So the technique that this test program uses to invoke the
+	 * race cannot work.  Therefore, test with O_DIRECT only.
+	 */
+	fd = open("mountpoint/some_file.txt", O_RDWR | O_DIRECT);
 	if (fd < 0)
 		return (void*)(intptr_t)errno;
 
@@ -332,7 +340,7 @@ TEST_P(LastLocalModify, lookup)
 	/* Wait for FUSE_SETATTR to be sent */
 	sem_wait(&sem);
 
-	/* Lookup again, which will race with setattr */
+	/* Lookup again, which will race with the mutator */
 	ASSERT_EQ(0, stat(FULLPATH, &sb)) << strerror(errno);
 	ASSERT_EQ((off_t)newsize, sb.st_size);
 

From nobody Fri Sep 26 00:02:52 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXrPn1sG8z68rwx;
	Fri, 26 Sep 2025 00:02:53 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cXrPn10XBz3MGB;
	Fri, 26 Sep 2025 00:02:53 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758844973;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=eynE/J7hHojMa9rzTTDTZsqy5oswtP5Z1L3k6NQsuII=;
	b=TdZEAyZ8VElMJB6RilqjwDR7dlp/T/flT8tcaLXeRk5H6rOTDphKKvfkrRSJ7l4Ou5OqQN
	B5N916+0lXrEUWyhT3wxYTfzJwUhWuaesln7euOu96Br4s8xriTl2G0NUVJIvG1QVbhcSN
	emSn/DFYC9QdU+9BuXSYwX5ijyiNNRI6ly7EX+cLnWI4eWz68cxbUIdgloEJAL8MUIVqTF
	28hQBaYalrdmwZVW45FQkPUeyKe+KxZkeO8w4gWJ/krDMA6ZTKIlhQJKTzwmG+HEOT8cIk
	ewQJLWJPE3hfT0UXACTIv23lPTARuVCOPOsK1UAxj8vSfXmBPKw/dXBmVQ8KzQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758844973;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=eynE/J7hHojMa9rzTTDTZsqy5oswtP5Z1L3k6NQsuII=;
	b=yJ7j+oVDPeKKRxk7x4iW+U8w2emBKijdLgjeEkHY8d715P+QEVmBeSYSAlahlIZDWEMRnp
	P3op8KLaXVtnIRN4VpuBTJBiJMQ+vwvGXxpSwpwEprsd+EzGkmqbr0se/oHIQgdq/PbaEJ
	/7PwQCUe1ePWxKh2P4bBBERoTAneqvK8mbFk1iPopj5Yx9a1Unlyh8nu+uX1AAgO8o/Gvt
	VTE3xOb6KkkZnmBugiAyvOmenY/hjK9H10zwQwAygKDiYbcgOsQGofvJCSF3PzrbLyc5Qa
	/7zawV3xZIGsoNEiZd07jDiphAkJF1DDHaACXVSYvoEZHx6LPQFSNgHoBL7qLA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758844973; a=rsa-sha256; cv=none;
	b=T+H43GbnYi02eR3rpu7d6oT4zMN3jVa61wDLjvB0wBnzNNB0bT6bcRrdHI3jzoFxM2+p5P
	RKQiJyDWLpkT+YDCQRghfynsZv+3z+N45H/0corRhJCpaPpHHhSetVdVvJaKirNvcaSkRS
	JN5FppeMLVxYb+ZbDbW/wR3KOI/MzuirsNS4yA8IOBfTGdXuUL0I9PDZOBr0itijba9BFK
	T90AQbiZk6rfQ+7XxoVIf2sV/lHPncPO+D5NdaDakqgBDL2Xir41wWniDgQU3zr4HovZb5
	mqqw07ZyImE22eNf6Kq/eamPcavevW/cyrk+GnVUP1syu3CdpDuTHsPEpoAFeg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXrPn0X2Vz7nY;
	Fri, 26 Sep 2025 00:02:53 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58Q02qdT086743;
	Fri, 26 Sep 2025 00:02:52 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58Q02qoY086740;
	Fri, 26 Sep 2025 00:02:52 GMT
	(envelope-from git)
Date: Fri, 26 Sep 2025 00:02:52 GMT
Message-Id: <202509260002.58Q02qoY086740@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Colin Percival 
Subject: git: 54dd9fd8a525 - stable/15 - 15.0: Update to ALPHA4
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: cperciva
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 54dd9fd8a5255b04af7b01cad3892668c837b97a
Auto-Submitted: auto-generated

The branch stable/15 has been updated by cperciva:

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

commit 54dd9fd8a5255b04af7b01cad3892668c837b97a
Author:     Colin Percival 
AuthorDate: 2025-09-26 00:02:30 +0000
Commit:     Colin Percival 
CommitDate: 2025-09-26 00:02:30 +0000

    15.0: Update to ALPHA4
    
    Approved by:    re (implicit)
    Sponsored by:   https://www.patreon.com/cperciva
---
 sys/conf/newvers.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index 133ada1f0388..dfbb24de3969 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -51,7 +51,7 @@
 
 TYPE="FreeBSD"
 REVISION="15.0"
-BRANCH="ALPHA3"
+BRANCH="ALPHA4"
 if [ -n "${BRANCH_OVERRIDE}" ]; then
 	BRANCH=${BRANCH_OVERRIDE}
 fi

From nobody Fri Sep 26 09:36:38 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cY57p5WrNz681YD;
	Fri, 26 Sep 2025 09:36:38 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cY57p4zxxz3D1x;
	Fri, 26 Sep 2025 09:36:38 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758879398;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=wtSxlkkqxtl+bRGE2ZnWXSgCRwo78mLGRzDn8upKDsY=;
	b=sxlwg9aZxVgn3GWPKBky89ZVtOYpDJIgBvwI9jUyHTCGKJjBQXaDhSqNc6iVaB9vTAH1xk
	LhcBPlW6haCyNGgmg8D97pZoxmFu7y3TJG5gcsMpPPqX/j7IGckqKmo/5KdtgIfplrXavf
	Y+0CoJEchnmxvq1jkL9nmzPBB5MH2Mo4g1ZdZYVT2LQ/OVnEMtgvq0DOagOLa/QN0CVEmL
	mlMKHufuCNakrkJFbhWAtCRBV06ToCDlzr/Ks+KDVvvWSPGvIrjloSRMUjKV6e0CtI6F+C
	Gs28Lg4GiDS5ZF4lyMzojj8W/gbXtpIrQm+cQow+hdKNN1sS0sCbn9pjESe8Yg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758879398;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=wtSxlkkqxtl+bRGE2ZnWXSgCRwo78mLGRzDn8upKDsY=;
	b=hDr1fAXirM9/bEQg2yOSaXWJCDvhhwtL2ZzVaT8PM748c4PoF23saHw79jMJcQLAvWSUEx
	o+N0aBn0adU5MK81EDtTUio++gYl7Fmb0H8kvVrtP6v8uW6FHz84nlNbUStEQXeYSuoZHr
	HqPM67UYu2mfSFEeMWt2l9Zo/xV+LnRMSYhvm0/GItxMXylaECs6sxaRyucjve/m66uL1X
	KiRBzk6uhUT8yBOO47jnNETLM1Y7Bty5zuhcThv0XQKcF1RIPTwTQOVjDfOdeW6J65qcfP
	S4VO00yWW1TLLt28namDIzYSq2reSJEk2nToshkE4nQGqV4yjDEZYOx0zLrZbQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758879398; a=rsa-sha256; cv=none;
	b=pJfngb/yVggre04T3hEGWWySwVF/dOLTF4HBqyx7iYwQs1sbsJ0e9f1qG2WclTj4mf8KoP
	9ExJavxpPlZHmouPP1vGJtFIj2dTOeA7mn2MpABROCOY7D+vHbsTL7V33fMIM30I7+epCP
	sLK9jYXbsIs/o8Y3rkAD16HQnjFBUPiBSH8hdHsKxnVwPa7SvSNuaXM7WAAmPxUQ+P/MgN
	t1kmqlZRrENrbfaBwbBSmtiwYSFlzLRSOB7MMPfT3/vwITwnU4DGSW5eLAVzd7OXN/VV7c
	o/udwmvU46L9T9A/A6SU1Xnr4GJ2TqMQZCiBab6B5v4zC67GwWGeEkmG0irDOg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cY57p4bDnzj2W;
	Fri, 26 Sep 2025 09:36:38 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58Q9acD7044271;
	Fri, 26 Sep 2025 09:36:38 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58Q9acjx044268;
	Fri, 26 Sep 2025 09:36:38 GMT
	(envelope-from git)
Date: Fri, 26 Sep 2025 09:36:38 GMT
Message-Id: <202509260936.58Q9acjx044268@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Michael Tuexen 
Subject: git: 3f87b632ed04 - stable/14 - tcp: fix sending of RST
  segments
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: tuexen
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 3f87b632ed047d70f93ca21d481a709529763f2f
Auto-Submitted: auto-generated

The branch stable/14 has been updated by tuexen:

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

commit 3f87b632ed047d70f93ca21d481a709529763f2f
Author:     Michael Tuexen 
AuthorDate: 2025-09-23 17:29:48 +0000
Commit:     Michael Tuexen 
CommitDate: 2025-09-26 09:32:19 +0000

    tcp: fix sending of RST segments
    
    Take endpoint parameters into account when available.
    
    Fixes:          463b5aed0d62 ("tcp: retire rstreason")
    Sponsored by:   Netflix, Inc.
    
    (cherry picked from commit ab17974c12033c6ff3bae27458efcd13584438ba)
---
 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 d1d0cc7d70e8..4a6f8d80f231 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -3432,7 +3432,7 @@ dropafterack:
 	return;
 
 dropwithreset:
-	tcp_dropwithreset(m, th, NULL, tlen);
+	tcp_dropwithreset(m, th, tp, tlen);
 	if (tp != NULL) {
 		INP_WUNLOCK(inp);
 	}

From nobody Fri Sep 26 09:40:47 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cY5Db758gz681Ys;
	Fri, 26 Sep 2025 09:40:47 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cY5Db6Snxz3Dd1;
	Fri, 26 Sep 2025 09:40:47 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758879647;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=0Iwfu8cYmKbiNsM9fxID6jLfOVfasVcdmzQvUykKmTU=;
	b=PP0Ho8gyui15TCQyQOkAJVR2C4LamTPnNZKVkoAhkyCM3rWvJCA7gmmH8/HE5swgZ2CdyT
	not9LUcKtrnK9aiKPyDj75PTDH0sbB9hOVG+bb2AUxBKr/UBZdSnd7SvuYKaXOtDQXhDLg
	VSB5G4wHJk4iHM7AWD9VYwkfenltIpVIPOjyQlXkYuOwDnArIT/NrE4/mMERPy1nY2CF++
	/K4iwJlMxgkXflsaN9xHyMRKVPn4yRGVb92pLSj70dREhCZa8rWGWVnsPoQ4hN/4lkeVLW
	oal7AGmauV1FbIuDlS8s52MMxlO7ZGurFIM1JI8aDvYtmsTbUQlz0j3MKQKQgQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758879647;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=0Iwfu8cYmKbiNsM9fxID6jLfOVfasVcdmzQvUykKmTU=;
	b=lsuhzzetXiZmBKGRGKAVQ3LLKf/1207y/QjjmjZWJMgapoEz3vdK6bl4/EQO0PaVhs5o7u
	D+BvV6x3WRjDDj53gUaNhehyDA/YCnDide4AgEUasWE7TjRJlqZ2B20YCwaFAlf9yW3fzu
	flxyDAAHwWD5z8t2mXwj73zx9InN70ikm4xqqokj0RVfpgvcSi7euiNOr5zf6vGR3rM/If
	1yy8wJ7uLikXDI5mVegzGv7yirAKhuFYrFrbbHzRpyWEEI2enheZz/ETSkpjSZkyWn6kYr
	sfweS1f9iA+Xv8JMc+/5ZufnZRN9MUfVc5I25U5mXZjz7Hyyf9P3RtzEKqe5eQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758879647; a=rsa-sha256; cv=none;
	b=RTkgEpq1yCdB+E2MK0LXS2FQff9ymjh2zEC7j4LAXumpRRl+/crGuKlP4P1lyRILFMhu2y
	UvWfvfBDKTUDjdUSG1TZicqPAVGP/DzDMWaw5AEu/z5uRTgb1W6hStZABjsNvP13lXVVzb
	YNf1QOblVeL3qIiBx69E2BgTHbGtMi5NugjRi0aZp24O+52PI/wfn7RYGBmkTGxM0oJv8n
	xclL4QWSNSwGlZmNY3kJ2iu5oRR/TamxXGIDPXtK5XtnHrEdy8gZ4kyMR42VB8tBrmTvYc
	TtKj7hQ9NnI44SB2weFCrHx0aQgbYZ6MWzIBrc/QEUyjUSw7OporTC/uuapy/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])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cY5Db61YYzj2b;
	Fri, 26 Sep 2025 09:40:47 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58Q9elYP055026;
	Fri, 26 Sep 2025 09:40:47 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58Q9elXm055023;
	Fri, 26 Sep 2025 09:40:47 GMT
	(envelope-from git)
Date: Fri, 26 Sep 2025 09:40:47 GMT
Message-Id: <202509260940.58Q9elXm055023@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Michael Tuexen 
Subject: git: 4010352306ef - stable/14 - tcp lro: remove redundant
  check
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: tuexen
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 4010352306ef73b6d5b3c2f652dac346f035e481
Auto-Submitted: auto-generated

The branch stable/14 has been updated by tuexen:

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

commit 4010352306ef73b6d5b3c2f652dac346f035e481
Author:     Michael Tuexen 
AuthorDate: 2025-09-23 18:28:54 +0000
Commit:     Michael Tuexen 
CommitDate: 2025-09-26 09:38:46 +0000

    tcp lro: remove redundant check
    
    Remove a check which is also done in tcp_lro_rx_common().
    
    Reviewed by:            gallatin
    Sponsored by:           Netflix, Inc.
    Differential Revision:  https://reviews.freebsd.org/D52683
    
    (cherry picked from commit 43bbecaeb95fe5ea1d7acffab4f2874247ba6915)
---
 sys/netinet/tcp_lro.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/sys/netinet/tcp_lro.c b/sys/netinet/tcp_lro.c
index 10afed17bf3b..2a5839440d69 100644
--- a/sys/netinet/tcp_lro.c
+++ b/sys/netinet/tcp_lro.c
@@ -1428,17 +1428,6 @@ tcp_lro_rx(struct lro_ctrl *lc, struct mbuf *m, uint32_t csum)
 {
 	int error;
 
-	if (((m->m_pkthdr.csum_flags & (CSUM_DATA_VALID | CSUM_PSEUDO_HDR)) !=
-	     ((CSUM_DATA_VALID | CSUM_PSEUDO_HDR))) || 
-	    (m->m_pkthdr.csum_data != 0xffff)) {
-		/* 
-		 * The checksum either did not have hardware offload
-		 * or it was a bad checksum. We can't LRO such
-		 * a packet.
-		 */
-		counter_u64_add(tcp_bad_csums, 1);
-		return (TCP_LRO_CANNOT);
-	}
 	/* get current time */
 	binuptime(&lc->lro_last_queue_time);
 	CURVNET_SET(lc->ifp->if_vnet);

From nobody Fri Sep 26 09:55:55 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cY5Z34VwGz683HV;
	Fri, 26 Sep 2025 09:55:55 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cY5Z33z47z3FYC;
	Fri, 26 Sep 2025 09:55:55 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758880555;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=mMVWyt0uChTFxJC2g7YCTbkR80QvBy7ewN1w0YB2i0o=;
	b=P/V0sCa+zTR9yiqh6wR5tZoEQNPQMowNygJpQdx93ZfSEjieasdUIndtZkWZxZbgGLspkU
	/leWH60IkeccPI9PwP5ziQjp7/I9xKjCmaCTmp6TeW/psLP1WZll81/bT+46h2dLMuOnHq
	FoI9BQGuOZ3/Y8KMRe4cbjRPvonWkdVsvWgF+6jasb/MyNUPXAyVc+sP/UWSNc8R1iBkMa
	kvcPc4fR1olttZAPy3HDJa5irXjczJ/4IRSuAKlp7oOgBBsjNvDpjHjICjhN2MCZazhZdE
	oeGuhEnUCo2rQIUnI4IWFErzMBgdcbyU43DezNuiTtRi+G4XmwQQRin4H4blWA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758880555;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=mMVWyt0uChTFxJC2g7YCTbkR80QvBy7ewN1w0YB2i0o=;
	b=MfG3CLJROel7CPP2FNODutE0zhEVT9FE5tPiZzyN6FeQwYw/7fVOGGW0It8WGekYRtFlBg
	YDFozmcRkO3IO/RNWD2kSGidS+sDL72QN5w0lzChGAGGY85itaYOBB/DQVX9LSTnNupoHV
	l94eXZ7rZ1+Xp1bAUqUiBltharfaRek5xubRW5JHtVMCgtZEZDcJmdvdDjrB03MLtyjkbG
	rhfe7su2tBO9rs2M/wa45OstVPVmKEkBth8bkPrH30X5dIpH88KQhQIEB3rvBxYuuT9pK3
	EBwxng0VJGXQWtEPr0QlWDSaRZlIYUDdZqKpSbF9orUisOYnf8ZU9+Y4iaoPJg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758880555; a=rsa-sha256; cv=none;
	b=sMRZ9bQzjueR96bFkLr+s6NoJxMdksBbvLNHG77UjRqwmXD00ux/surM2rEZi27AfE6pS/
	2hFipqDjrzUYQX/psjWZPVVtsPMfXQSlHQebREBvUMtBC3Bq7kjzp8xTSMpdpmG9mDgPV5
	G0sqKhbziTFIT5OdTisFdupcRD2WrlbBUZhs5iW3wH/Uje2KiuHjUwcfUf9ErKd1UYx8Sk
	zQTYMV8vKe3vEkvYD2EvmtgUXUkb8duoqpnhWuCW415zRZ+JD6jd5qUt+eJiZtyUonEXar
	dDiO5K18RaD1UBJ4fxWvk3vN8tQ962r/CXWTmy+xhBXnB6869Ibx1psg8cl7kA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cY5Z339vVzjyn;
	Fri, 26 Sep 2025 09:55:55 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58Q9ttpo080336;
	Fri, 26 Sep 2025 09:55:55 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58Q9ttpk080333;
	Fri, 26 Sep 2025 09:55:55 GMT
	(envelope-from git)
Date: Fri, 26 Sep 2025 09:55:55 GMT
Message-Id: <202509260955.58Q9ttpk080333@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Michael Tuexen 
Subject: git: a41b0e52ab90 - stable/15 - tcp: fix sending of RST
  segments
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: tuexen
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: a41b0e52ab90920ba3c136d95661d624aeb67147
Auto-Submitted: auto-generated

The branch stable/15 has been updated by tuexen:

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

commit a41b0e52ab90920ba3c136d95661d624aeb67147
Author:     Michael Tuexen 
AuthorDate: 2025-09-23 17:29:48 +0000
Commit:     Michael Tuexen 
CommitDate: 2025-09-26 09:55:41 +0000

    tcp: fix sending of RST segments
    
    Take endpoint parameters into account when available.
    
    Fixes:          463b5aed0d62 ("tcp: retire rstreason")
    Sponsored by:   Netflix, Inc.
    
    (cherry picked from commit ab17974c12033c6ff3bae27458efcd13584438ba)
---
 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 d5dc516c28aa..dd27ec77c1af 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -3412,7 +3412,7 @@ dropafterack:
 	return;
 
 dropwithreset:
-	tcp_dropwithreset(m, th, NULL, tlen);
+	tcp_dropwithreset(m, th, tp, tlen);
 	if (tp != NULL) {
 		INP_WUNLOCK(inp);
 	}

From nobody Fri Sep 26 09:56:29 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cY5Zj2Gtyz683Ty;
	Fri, 26 Sep 2025 09:56:29 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cY5Zj1Sdbz3G5Z;
	Fri, 26 Sep 2025 09:56:29 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758880589;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Ecl6ML0AVk79R0t62B1i1HytpUEn3sGQ2ubBzs4h14M=;
	b=wIQ+A+c4e5pj3w81fwooVontsClB1yHzqDh83v0t9/mwhZD2qdMmzQWDnnGbNFNqcLyiCz
	8kgnWn3NZkIPuB72/dg/1GrJxHpDrJDddWScXEvCIRBZXrdkiDY/BoCgKx8VJftLHuj16d
	EmIfs6PoSutIoEhRqb1UWVhxxzo36CMSEyKxwV3o9VZrERY08q599eoE/kXz9jWGXQizTl
	UTyiYt30Sbw0wVpaVIRGzw06RDcTRlHxI/ZgC8WuDUzue1vadjdHD/+OXsx+zALUi86fhJ
	c5IQIyK0CHRFVQztxIURES6112qxrI8iJuao4HCzftgwTJxEBzgr+Ww2tZqLTw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758880589;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Ecl6ML0AVk79R0t62B1i1HytpUEn3sGQ2ubBzs4h14M=;
	b=faq0Zm9ER6ml/XW7xlGjP+tWnqN08adQ6DCe2+BrdC6/xgCBh0ssRTuxvW52q1ikTSHWRf
	fnX9jO/sJaHaFnj9kLmKISio/34Z1wfWFCD3R6Aje+LUVtVPOViQ8A3x3Cy9iAbyTX8qrS
	w7p1MFmwFCLimeUJhDnmzsDQyWX0uVrgwqE2jTKvB6BMkAgciWINjwE9g1TcrG1+kuAr36
	sVIcx8Ic+kPGO5iFKbl5Ye3gDvu6aXCZ8V21Rbps+5HvC9I0FFGjp1YyJr5fQhExB52o+7
	zKG92tazSBJDov+mqtt+IlmtwQHuBeuNTDHJ+UEXGnYDLutros8VvCQE1c6Sqg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758880589; a=rsa-sha256; cv=none;
	b=A9iX6nlqHPYWsk3xQHmwZ4rr6CZDYgHi7DS+WBym+9UfBUNmeV/kHrfuSqWwBZa1XUAHhu
	MxmbwA0LSu8EuhzYkhy5K2gdFbv++YFUF4wxvKyaAN50Qlq9xKUoTSAwzm20W9/ZopOeyx
	GCtq3dWA4AsDPtiDnjsLwW/uQ5hF6pAiBeYF+i5sUTlFdfqRBf4S/CAx4T7+NcPHvic8aj
	jD0D6tc/izoBzrxfi1OEBk42jADVIkSUhW8FIH+89a19Y4V0KiJkhVqbZo+StHnYklxoVC
	tvmokbj1E8U1YLwcqT9MFQhfpAyC0V3ULPp37+s03yWHc7SKAn09l3gzDZ96/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])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cY5Zj0p00zk28;
	Fri, 26 Sep 2025 09:56:29 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58Q9uTNI080584;
	Fri, 26 Sep 2025 09:56:29 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58Q9uTgj080581;
	Fri, 26 Sep 2025 09:56:29 GMT
	(envelope-from git)
Date: Fri, 26 Sep 2025 09:56:29 GMT
Message-Id: <202509260956.58Q9uTgj080581@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Michael Tuexen 
Subject: git: ccbc5f307a66 - stable/15 - tcp lro: remove redundant
  check
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: tuexen
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: ccbc5f307a664c0ffba6eb0665106164665dffe2
Auto-Submitted: auto-generated

The branch stable/15 has been updated by tuexen:

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

commit ccbc5f307a664c0ffba6eb0665106164665dffe2
Author:     Michael Tuexen 
AuthorDate: 2025-09-23 18:28:54 +0000
Commit:     Michael Tuexen 
CommitDate: 2025-09-26 09:56:15 +0000

    tcp lro: remove redundant check
    
    Remove a check which is also done in tcp_lro_rx_common().
    
    Reviewed by:            gallatin
    Sponsored by:           Netflix, Inc.
    Differential Revision:  https://reviews.freebsd.org/D52683
    
    (cherry picked from commit 43bbecaeb95fe5ea1d7acffab4f2874247ba6915)
---
 sys/netinet/tcp_lro.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/sys/netinet/tcp_lro.c b/sys/netinet/tcp_lro.c
index 7512679bd4e9..64efa4bf060f 100644
--- a/sys/netinet/tcp_lro.c
+++ b/sys/netinet/tcp_lro.c
@@ -1428,17 +1428,6 @@ tcp_lro_rx(struct lro_ctrl *lc, struct mbuf *m, uint32_t csum)
 {
 	int error;
 
-	if (((m->m_pkthdr.csum_flags & (CSUM_DATA_VALID | CSUM_PSEUDO_HDR)) !=
-	     ((CSUM_DATA_VALID | CSUM_PSEUDO_HDR))) ||
-	    (m->m_pkthdr.csum_data != 0xffff)) {
-		/*
-		 * The checksum either did not have hardware offload
-		 * or it was a bad checksum. We can't LRO such
-		 * a packet.
-		 */
-		counter_u64_add(tcp_bad_csums, 1);
-		return (TCP_LRO_CANNOT);
-	}
 	/* get current time */
 	binuptime(&lc->lro_last_queue_time);
 	CURVNET_SET(lc->ifp->if_vnet);

From nobody Fri Sep 26 18:27:09 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYJvx4tK5z68h44;
	Fri, 26 Sep 2025 18:27:09 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYJvx433Gz44VX;
	Fri, 26 Sep 2025 18:27:09 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758911229;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=1DsoganS6WrFaGfGTl2aJm+90aS1t9CQ7C2ODP5QriI=;
	b=AQXMQ4Q59BDnVNAX5YFwHBTv6eXvQSntvmRiQgvWT0jJBIB6IsHyS3aFvOTbB7XcauGPly
	DjctXdbMzREJQzdlgLdeoUm8WXIbRkIHo38dJ/+VdGj9jJ0FmLFfc5OPVaz6HNe00QVIvf
	MFiEBYhJFjCPzLnjMPGUVBHjoqIaBeCAgliCDppxTYJMFW87L6CyDrBoRG0m5QxgeN1S/G
	lIaoNf0hq6b4U0aMNftPxE3WHQOOpH4546sQX6ja3ktsjXKGw9l2VHSuIkdQVgZrxBQpDe
	LI6oSmA6/qwj4DSfkBVPOgpSdb/bGWNfL/Awg0Jf0QpJIBRz7Z/LGcPM1aqJhg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758911229;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=1DsoganS6WrFaGfGTl2aJm+90aS1t9CQ7C2ODP5QriI=;
	b=LQLXZu2kPvJzicvnM5ikMfl5740eoDzhI2lgEPRYguaFG+6l6cCUpEIwpECWY1M76/wevM
	z03iNlSaTIlBs2T4cy7RGxKg2A8rLxIanfCUqFrs2PTCqeNuHykV38a5TNm8y1mdBn4QA2
	BFWi78kZ9YpQjodclqKKJQ8KWLM3Qjm2C5do4uEp0mg8lNxtEYnv1VqOx1Zq+bapDDuXl4
	RqAbPVoJIv/otvp9l8LvnYNmTUOnSjzlFYTgZuBP74TREiA/ffYa49lye5RBgKNnVu9uZZ
	rBRTGsPcO12qC1YKBbQffuRs1x/zzmYL3sN2ve/PI3l/Ie1KvshxFewsbwuPwg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758911229; a=rsa-sha256; cv=none;
	b=WKw3HYa2TM6aczAJw6GmoJx15S+AyAfJorjj7IHyucK+H+UIjMS9ItZ/kqIj0jgjFkqRmY
	ZkaRzEGy+Njuqp/26/aQPjdK6pOOi/jr9P7WaEjzl+xJ/ppQAjuNDc1Fi4nIOrki3XauPc
	qMxwTetxD2we3NkAdGm1t7V0DcHuQibzxQvDwFbZzCqqV2yXnwn3MacUrYyqJQs7dNyhlE
	5thwnyEu5aLEVvsLjYEv+2biRv4ioQv1eT+KhS/BwCKPhVvc8Ib0zY67k6glfoyO+hgIaL
	kM7bDsyUpDVmehksrh8SnO3RUpdfTHvtLVmgx8lKVZAFK8E2Jhy3OYvmPNuduw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYJvx3cHhzyP6;
	Fri, 26 Sep 2025 18:27:09 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58QIR9t4032650;
	Fri, 26 Sep 2025 18:27:09 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58QIR99M032647;
	Fri, 26 Sep 2025 18:27:09 GMT
	(envelope-from git)
Date: Fri, 26 Sep 2025 18:27:09 GMT
Message-Id: <202509261827.58QIR99M032647@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Alan Somers 
Subject: git: 5206983e76c0 - stable/15 - fusefs: fix a kernel panic
  regarding SCM_RIGHTS
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: asomers
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 5206983e76c0bd42893eae98955bc8168a0a8d0a
Auto-Submitted: auto-generated

The branch stable/15 has been updated by asomers:

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

commit 5206983e76c0bd42893eae98955bc8168a0a8d0a
Author:     Alan Somers 
AuthorDate: 2025-09-19 16:02:25 +0000
Commit:     Alan Somers 
CommitDate: 2025-09-26 18:11:37 +0000

    fusefs: fix a kernel panic regarding SCM_RIGHTS
    
    If the last copy of an open file resides within the socket buffer of a
    unix-domain socket, then VOP_CLOSE will be called with no thread
    information.  Fix fusefs to handle that case, and add a regression test.
    
    Also add a test case for writes to a file that lies within a sockbuf.
    Along with close, a write from the writeback cache is the only other
    operation I can think of that might apply to a file residing in a
    sockbuf.
    
    PR:             289686
    Reported by:    iron.udjin@gmail.com
    Sponsored by:   ConnectWise
    Reviewed by:    glebius, markj
    Differential Revision: https://reviews.freebsd.org/D52625
    
    (cherry picked from commit e043af9ca59608309cac2fd222c17f989ba0d35e)
---
 sys/fs/fuse/fuse_vnops.c       | 10 ++++--
 tests/sys/fs/fusefs/release.cc | 54 +++++++++++++++++++++++++++++++
 tests/sys/fs/fusefs/write.cc   | 73 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 134 insertions(+), 3 deletions(-)

diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c
index de60a4717dd4..be600b57f0a3 100644
--- a/sys/fs/fuse/fuse_vnops.c
+++ b/sys/fs/fuse/fuse_vnops.c
@@ -795,11 +795,15 @@ fuse_vnop_close(struct vop_close_args *ap)
 	struct mount *mp = vnode_mount(vp);
 	struct ucred *cred = ap->a_cred;
 	int fflag = ap->a_fflag;
-	struct thread *td = ap->a_td;
-	pid_t pid = td->td_proc->p_pid;
+	struct thread *td;
 	struct fuse_vnode_data *fvdat = VTOFUD(vp);
+	pid_t pid;
 	int err = 0;
 
+	/* NB: a_td will be NULL from some async kernel contexts */
+	td = ap->a_td ? ap->a_td : curthread;
+	pid = td->td_proc->p_pid;
+
 	if (fuse_isdeadfs(vp))
 		return 0;
 	if (vnode_isdir(vp))
@@ -838,7 +842,7 @@ fuse_vnop_close(struct vop_close_args *ap)
 	}
 	/* TODO: close the file handle, if we're sure it's no longer used */
 	if ((fvdat->flag & FN_SIZECHANGE) != 0) {
-		fuse_vnode_savesize(vp, cred, td->td_proc->p_pid);
+		fuse_vnode_savesize(vp, cred, pid);
 	}
 	return err;
 }
diff --git a/tests/sys/fs/fusefs/release.cc b/tests/sys/fs/fusefs/release.cc
index b664ba512b64..9df236bfbaf7 100644
--- a/tests/sys/fs/fusefs/release.cc
+++ b/tests/sys/fs/fusefs/release.cc
@@ -29,6 +29,9 @@
  */
 
 extern "C" {
+#include 
+#include 
+
 #include 
 #include 
 }
@@ -188,6 +191,57 @@ TEST_F(Release, ok)
 	ASSERT_EQ(0, close(fd)) << strerror(errno);
 }
 
+/*
+ * Nothing bad should happen when closing a Unix-domain named socket that
+ * contains a fusefs file descriptor within its receive buffer.
+ * Regression test for
+ * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289686
+ */
+TEST_F(Release, scm_rights)
+{
+	const char FULLPATH[] = "mountpoint/some_file.txt";
+	const char RELPATH[] = "some_file.txt";
+	struct msghdr msg;
+	struct iovec iov;
+	char message[CMSG_SPACE(sizeof(int))];
+	uint64_t ino = 42;
+	int fd;
+	int s[2];
+	union {
+		char buf[CMSG_SPACE(sizeof(fd))];
+		struct cmsghdr align;
+	} u;
+
+	expect_lookup(RELPATH, ino, 1);
+	expect_open(ino, 0, 1);
+	expect_flush(ino, 1, ReturnErrno(0));
+	expect_release(ino, getpid(), O_RDONLY, 0);
+
+	ASSERT_EQ(0, socketpair(AF_UNIX, SOCK_STREAM, 0, s)) << strerror(errno);
+
+	fd = open(FULLPATH, O_RDONLY);
+	ASSERT_LE(0, fd) << strerror(errno);
+
+	memset(&message, 0, sizeof(message));
+	memset(&msg, 0, sizeof(msg));
+	iov.iov_base = NULL;
+	iov.iov_len = 0;
+	msg.msg_iov = &iov;
+	msg.msg_iovlen = 1;
+	msg.msg_control = u.buf,
+	msg.msg_controllen = sizeof(u.buf);
+	struct cmsghdr *cmsg = CMSG_FIRSTHDR(&msg);
+	cmsg->cmsg_level = SOL_SOCKET;
+	cmsg->cmsg_type = SCM_RIGHTS;
+	cmsg->cmsg_len = CMSG_LEN(sizeof(fd));
+	memcpy(CMSG_DATA(cmsg), &fd, sizeof(fd));
+	ASSERT_GE(sendmsg(s[0], &msg, 0), 0) << strerror(errno);
+
+	close(fd);	// Close fd within our process
+	close(s[0]);
+	close(s[1]);	// The last copy of fd is within this socket's rcvbuf
+}
+
 /* When closing a file with a POSIX file lock, release should release the lock*/
 TEST_F(ReleaseWithLocks, unlock_on_close)
 {
diff --git a/tests/sys/fs/fusefs/write.cc b/tests/sys/fs/fusefs/write.cc
index 1fe2e3cc522d..f5573a865a04 100644
--- a/tests/sys/fs/fusefs/write.cc
+++ b/tests/sys/fs/fusefs/write.cc
@@ -32,9 +32,11 @@ extern "C" {
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -1398,6 +1400,77 @@ TEST_F(WriteBackAsync, eof)
 	leak(fd);
 }
 
+/*
+ * Nothing bad should happen if a file with a dirty writeback cache is closed
+ * while the last copy lies in some socket's socket buffer.  Inspired by bug
+ * 289686 .
+ */
+TEST_F(WriteBackAsync, scm_rights)
+{
+	const char FULLPATH[] = "mountpoint/some_file.txt";
+	const char RELPATH[] = "some_file.txt";
+	const char *CONTENTS = "abcdefgh";
+	uint64_t ino = 42;
+	int fd;
+	ssize_t bufsize = strlen(CONTENTS);
+	int s[2];
+	struct msghdr msg;
+	struct iovec iov;
+	char message[CMSG_SPACE(sizeof(int))];
+	union {
+		char buf[CMSG_SPACE(sizeof(fd))];
+		struct cmsghdr align;
+	} u;
+
+	expect_lookup(RELPATH, ino, 0);
+	expect_open(ino, 0, 1);
+	/* VOP_SETATTR will try to set timestamps during flush */
+	EXPECT_CALL(*m_mock, process(
+		ResultOf([=](auto in) {
+			return (in.header.opcode == FUSE_SETATTR &&
+				in.header.nodeid == ino);
+		}, Eq(true)),
+		_)
+	).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) {
+		SET_OUT_HEADER_LEN(out, attr);
+		out.body.attr.attr.ino = ino;
+		out.body.attr.attr.mode = S_IFREG | 0644;
+		out.body.attr.attr.size = bufsize;
+	})));
+
+	expect_write(ino, 0, bufsize, bufsize, CONTENTS);
+	expect_flush(ino, 1, ReturnErrno(0));
+	expect_release(ino, ReturnErrno(0));
+
+	/* Open a file on the fusefs file system */
+	fd = open(FULLPATH, O_RDWR);
+	ASSERT_LE(0, fd) << strerror(errno);
+
+	/* Write to the file to dirty its writeback cache */
+	ASSERT_EQ(bufsize, write(fd, CONTENTS, bufsize)) << strerror(errno);
+
+	/* Send the file into a socket */
+	ASSERT_EQ(0, socketpair(AF_UNIX, SOCK_STREAM, 0, s)) << strerror(errno);
+	memset(&message, 0, sizeof(message));
+	memset(&msg, 0, sizeof(msg));
+	iov.iov_base = NULL;
+	iov.iov_len = 0;
+	msg.msg_iov = &iov;
+	msg.msg_iovlen = 1;
+	msg.msg_control = u.buf,
+	msg.msg_controllen = sizeof(u.buf);
+	struct cmsghdr *cmsg = CMSG_FIRSTHDR(&msg);
+	cmsg->cmsg_level = SOL_SOCKET;
+	cmsg->cmsg_type = SCM_RIGHTS;
+	cmsg->cmsg_len = CMSG_LEN(sizeof(fd));
+	memcpy(CMSG_DATA(cmsg), &fd, sizeof(fd));
+	ASSERT_GE(sendmsg(s[0], &msg, 0), 0) << strerror(errno);
+
+	close(fd);	// Close fd within our process
+	close(s[0]);
+	close(s[1]);	// The last copy of fd is within this socket's rcvbuf
+}
+
 /* 
  * When a file has dirty writes that haven't been flushed, the server's notion
  * of its mtime and ctime will be wrong.  The kernel should ignore those if it

From nobody Fri Sep 26 20:16:46 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYMLQ6R5Dz68pjd;
	Fri, 26 Sep 2025 20:16:46 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYMLQ5Txnz3GBZ;
	Fri, 26 Sep 2025 20:16:46 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758917806;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=cJAd9SDNzX2Q1MgWJNRONHBzJyE/5eamDUAsdGOzoK4=;
	b=U80Wac3Xy23+pBq+NzRu6oXDgRHaKk0gPVSQW3zrXHc1/3a0YFCxNDGoN6cdTTSNfOLuKy
	DS74gNaOOCS+v0ZqIX3x7q9V5sb6LknNdAXfa61hXs6eeFv3Va8HNgQNG1wQS6oUzIRxQz
	EPsWhX0uRgXnsFKgobfUD2y7OIVc4Nj+e7HU4nxhaQ1080Vza8O0Uwe5iwu8eTiGujxvC/
	HGu7gO4rDQ5Zn9eZku3/VgkZpIgnJSl8H96MpX6QxvlrW/BtLVaZXmiexD+fYmOiRlx/uW
	cmFtFnHQO49EH0eVws4U/E9jc1mWOMgz0OrfQ4Vj8FDhH78Olwhm7GcadJGUxg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758917806;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=cJAd9SDNzX2Q1MgWJNRONHBzJyE/5eamDUAsdGOzoK4=;
	b=sXoJUa+S1WuiNHIAifKNSRUXIbHam9aUa+9KgJW22gzEuJgvaPdZhDD7PaJncfscrYhxAJ
	/rFsFMMYRxoqoJnG0pH/A616SW5hTB5uuMM4SljyvP3A7uWbNTrydws0pp+53nAj4lmoAw
	Z8QMEc2IgsMW5XA+72scNg/qE/MWQQ5aus6v31VOPxO633qmh7qGv0Q2ZCOWF30tFMWDoE
	0LoHB8SWit3thIT1X8miJwvi5lk6ae8t8oeNiM4s+8c0mHG//7hRi1RSrbEjU3dBs1/aZC
	1PO9W+qRYvSmnD0mPJzHDTsn+n6566FEx0SMJ4C9wrmmRLC2Ic4JB7KDLNM/vg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758917806; a=rsa-sha256; cv=none;
	b=ITPtC/Hs3/aR27+kl939lM0A2QS3Zo1yeAoWRbnrku5UK2VKCS0LzZaXPx/DG/NtAFXWQC
	m8fhbafrmueGavAcb0sxJWogXb+R33yq7yY1goT/osRMab4t2hcKcAac2uhyTH025tfc06
	EbiKDRfLBZK/1ZKXmKPQgrmgt761E61sRPGwTe6xrBPnbigWlw0DvnrH1NdFCFNF6I7FMm
	totYjWHJioZar8TM8bj1GxnU0qEnMditIlWZzULKyOmlSAb85Wjulex/eJwIX+mBfRWjWj
	AEdiEw6S+EIS50QXPepNp7BM5c4gFWu+B+/hUwlqPLz0tBHOX8iCUcEUjAj03g==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYMLQ4k28z12CV;
	Fri, 26 Sep 2025 20:16:46 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58QKGk6Q039290;
	Fri, 26 Sep 2025 20:16:46 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58QKGkea039287;
	Fri, 26 Sep 2025 20:16:46 GMT
	(envelope-from git)
Date: Fri, 26 Sep 2025 20:16:46 GMT
Message-Id: <202509262016.58QKGkea039287@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: John-Mark Gurney 
Subject: git: d2518851f2f9 - stable/15 - e1000: fix igb VF stats
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: jmg
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: d2518851f2f90b0b36e7354b5441935125b8a574
Auto-Submitted: auto-generated

The branch stable/15 has been updated by jmg:

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

commit d2518851f2f90b0b36e7354b5441935125b8a574
Author:     John-Mark Gurney 
AuthorDate: 2025-09-26 19:58:02 +0000
Commit:     John-Mark Gurney 
CommitDate: 2025-09-26 20:16:16 +0000

    e1000: fix igb VF stats
    
    igb VF must not read normal stat registers and only read a limited
    set of registers.  The PF registers also don't make since as the VF
    is an internal port, and there is no PHY to collect stats like CRC
    errors from.
    
    This is effectively a cherry-pick of 3c60ea77649d, which had to be
    adapted due to another commit.  This is diff id 161565.
    
    PR:     282309
    Obtained from:  Juniper Networks, Inc.
    Differential Revision:  https://reviews.freebsd.org/D52326
---
 sys/dev/e1000/if_em.c | 351 +++++++++++++++++++++++++++++++-------------------
 sys/dev/e1000/if_em.h |  19 ++-
 2 files changed, 237 insertions(+), 133 deletions(-)

diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c
index 9c5ae2806f75..1f0a2430fa6a 100644
--- a/sys/dev/e1000/if_em.c
+++ b/sys/dev/e1000/if_em.c
@@ -407,6 +407,7 @@ static int	em_if_rx_queues_alloc(if_ctx_t, caddr_t *, uint64_t *, int,
     int);
 static void	em_if_queues_free(if_ctx_t);
 
+static uint64_t	em_if_get_vf_counter(if_ctx_t, ift_counter);
 static uint64_t	em_if_get_counter(if_ctx_t, ift_counter);
 static void	em_if_init(if_ctx_t);
 static void	em_if_stop(if_ctx_t);
@@ -440,6 +441,7 @@ static int	igb_if_tx_queue_intr_enable(if_ctx_t, uint16_t);
 static void	em_if_multi_set(if_ctx_t);
 static void	em_if_update_admin_status(if_ctx_t);
 static void	em_if_debug(if_ctx_t);
+static void	em_update_vf_stats_counters(struct e1000_softc *);
 static void	em_update_stats_counters(struct e1000_softc *);
 static void	em_add_hw_stats(struct e1000_softc *);
 static int	em_if_set_promisc(if_ctx_t, int);
@@ -1377,6 +1379,11 @@ em_if_attach_post(if_ctx_t ctx)
 	em_reset(ctx);
 
 	/* Initialize statistics */
+	if (sc->vf_ifp)
+		sc->ustats.vf_stats = (struct e1000_vf_stats){};
+	else
+		sc->ustats.stats = (struct e1000_hw_stats){};
+
 	em_update_stats_counters(sc);
 	hw->mac.get_link_status = 1;
 	em_if_update_admin_status(ctx);
@@ -4668,121 +4675,174 @@ em_disable_aspm(struct e1000_softc *sc)
 static void
 em_update_stats_counters(struct e1000_softc *sc)
 {
-	u64 prev_xoffrxc = sc->stats.xoffrxc;
+	struct e1000_hw_stats *stats;
+	u64 prev_xoffrxc;
+
+	if (sc->vf_ifp) {
+		em_update_vf_stats_counters(sc);
+		return;
+	}
+
+	stats = &sc->ustats.stats;
+	prev_xoffrxc = stats->xoffrxc;
 
 	if(sc->hw.phy.media_type == e1000_media_type_copper ||
 	   (E1000_READ_REG(&sc->hw, E1000_STATUS) & E1000_STATUS_LU)) {
-		sc->stats.symerrs += E1000_READ_REG(&sc->hw, E1000_SYMERRS);
-		sc->stats.sec += E1000_READ_REG(&sc->hw, E1000_SEC);
-	}
-	sc->stats.crcerrs += E1000_READ_REG(&sc->hw, E1000_CRCERRS);
-	sc->stats.mpc += E1000_READ_REG(&sc->hw, E1000_MPC);
-	sc->stats.scc += E1000_READ_REG(&sc->hw, E1000_SCC);
-	sc->stats.ecol += E1000_READ_REG(&sc->hw, E1000_ECOL);
-
-	sc->stats.mcc += E1000_READ_REG(&sc->hw, E1000_MCC);
-	sc->stats.latecol += E1000_READ_REG(&sc->hw, E1000_LATECOL);
-	sc->stats.colc += E1000_READ_REG(&sc->hw, E1000_COLC);
-	sc->stats.dc += E1000_READ_REG(&sc->hw, E1000_DC);
-	sc->stats.rlec += E1000_READ_REG(&sc->hw, E1000_RLEC);
-	sc->stats.xonrxc += E1000_READ_REG(&sc->hw, E1000_XONRXC);
-	sc->stats.xontxc += E1000_READ_REG(&sc->hw, E1000_XONTXC);
-	sc->stats.xoffrxc += E1000_READ_REG(&sc->hw, E1000_XOFFRXC);
+		stats->symerrs += E1000_READ_REG(&sc->hw, E1000_SYMERRS);
+		stats->sec += E1000_READ_REG(&sc->hw, E1000_SEC);
+	}
+	stats->crcerrs += E1000_READ_REG(&sc->hw, E1000_CRCERRS);
+	stats->mpc += E1000_READ_REG(&sc->hw, E1000_MPC);
+	stats->scc += E1000_READ_REG(&sc->hw, E1000_SCC);
+	stats->ecol += E1000_READ_REG(&sc->hw, E1000_ECOL);
+
+	stats->mcc += E1000_READ_REG(&sc->hw, E1000_MCC);
+	stats->latecol += E1000_READ_REG(&sc->hw, E1000_LATECOL);
+	stats->colc += E1000_READ_REG(&sc->hw, E1000_COLC);
+	stats->dc += E1000_READ_REG(&sc->hw, E1000_DC);
+	stats->rlec += E1000_READ_REG(&sc->hw, E1000_RLEC);
+	stats->xonrxc += E1000_READ_REG(&sc->hw, E1000_XONRXC);
+	stats->xontxc += E1000_READ_REG(&sc->hw, E1000_XONTXC);
+	stats->xoffrxc += E1000_READ_REG(&sc->hw, E1000_XOFFRXC);
 	/*
 	 ** For watchdog management we need to know if we have been
 	 ** paused during the last interval, so capture that here.
 	*/
-	if (sc->stats.xoffrxc != prev_xoffrxc)
+	if (stats->xoffrxc != prev_xoffrxc)
 		sc->shared->isc_pause_frames = 1;
-	sc->stats.xofftxc += E1000_READ_REG(&sc->hw, E1000_XOFFTXC);
-	sc->stats.fcruc += E1000_READ_REG(&sc->hw, E1000_FCRUC);
-	sc->stats.prc64 += E1000_READ_REG(&sc->hw, E1000_PRC64);
-	sc->stats.prc127 += E1000_READ_REG(&sc->hw, E1000_PRC127);
-	sc->stats.prc255 += E1000_READ_REG(&sc->hw, E1000_PRC255);
-	sc->stats.prc511 += E1000_READ_REG(&sc->hw, E1000_PRC511);
-	sc->stats.prc1023 += E1000_READ_REG(&sc->hw, E1000_PRC1023);
-	sc->stats.prc1522 += E1000_READ_REG(&sc->hw, E1000_PRC1522);
-	sc->stats.gprc += E1000_READ_REG(&sc->hw, E1000_GPRC);
-	sc->stats.bprc += E1000_READ_REG(&sc->hw, E1000_BPRC);
-	sc->stats.mprc += E1000_READ_REG(&sc->hw, E1000_MPRC);
-	sc->stats.gptc += E1000_READ_REG(&sc->hw, E1000_GPTC);
+	stats->xofftxc += E1000_READ_REG(&sc->hw, E1000_XOFFTXC);
+	stats->fcruc += E1000_READ_REG(&sc->hw, E1000_FCRUC);
+	stats->prc64 += E1000_READ_REG(&sc->hw, E1000_PRC64);
+	stats->prc127 += E1000_READ_REG(&sc->hw, E1000_PRC127);
+	stats->prc255 += E1000_READ_REG(&sc->hw, E1000_PRC255);
+	stats->prc511 += E1000_READ_REG(&sc->hw, E1000_PRC511);
+	stats->prc1023 += E1000_READ_REG(&sc->hw, E1000_PRC1023);
+	stats->prc1522 += E1000_READ_REG(&sc->hw, E1000_PRC1522);
+	stats->gprc += E1000_READ_REG(&sc->hw, E1000_GPRC);
+	stats->bprc += E1000_READ_REG(&sc->hw, E1000_BPRC);
+	stats->mprc += E1000_READ_REG(&sc->hw, E1000_MPRC);
+	stats->gptc += E1000_READ_REG(&sc->hw, E1000_GPTC);
 
 	/* For the 64-bit byte counters the low dword must be read first. */
 	/* Both registers clear on the read of the high dword */
 
-	sc->stats.gorc += E1000_READ_REG(&sc->hw, E1000_GORCL) +
+	stats->gorc += E1000_READ_REG(&sc->hw, E1000_GORCL) +
 	    ((u64)E1000_READ_REG(&sc->hw, E1000_GORCH) << 32);
-	sc->stats.gotc += E1000_READ_REG(&sc->hw, E1000_GOTCL) +
+	stats->gotc += E1000_READ_REG(&sc->hw, E1000_GOTCL) +
 	    ((u64)E1000_READ_REG(&sc->hw, E1000_GOTCH) << 32);
 
-	sc->stats.rnbc += E1000_READ_REG(&sc->hw, E1000_RNBC);
-	sc->stats.ruc += E1000_READ_REG(&sc->hw, E1000_RUC);
-	sc->stats.rfc += E1000_READ_REG(&sc->hw, E1000_RFC);
-	sc->stats.roc += E1000_READ_REG(&sc->hw, E1000_ROC);
-	sc->stats.rjc += E1000_READ_REG(&sc->hw, E1000_RJC);
-
-	sc->stats.mgprc += E1000_READ_REG(&sc->hw, E1000_MGTPRC);
-	sc->stats.mgpdc += E1000_READ_REG(&sc->hw, E1000_MGTPDC);
-	sc->stats.mgptc += E1000_READ_REG(&sc->hw, E1000_MGTPTC);
-
-	sc->stats.tor += E1000_READ_REG(&sc->hw, E1000_TORH);
-	sc->stats.tot += E1000_READ_REG(&sc->hw, E1000_TOTH);
-
-	sc->stats.tpr += E1000_READ_REG(&sc->hw, E1000_TPR);
-	sc->stats.tpt += E1000_READ_REG(&sc->hw, E1000_TPT);
-	sc->stats.ptc64 += E1000_READ_REG(&sc->hw, E1000_PTC64);
-	sc->stats.ptc127 += E1000_READ_REG(&sc->hw, E1000_PTC127);
-	sc->stats.ptc255 += E1000_READ_REG(&sc->hw, E1000_PTC255);
-	sc->stats.ptc511 += E1000_READ_REG(&sc->hw, E1000_PTC511);
-	sc->stats.ptc1023 += E1000_READ_REG(&sc->hw, E1000_PTC1023);
-	sc->stats.ptc1522 += E1000_READ_REG(&sc->hw, E1000_PTC1522);
-	sc->stats.mptc += E1000_READ_REG(&sc->hw, E1000_MPTC);
-	sc->stats.bptc += E1000_READ_REG(&sc->hw, E1000_BPTC);
+	stats->rnbc += E1000_READ_REG(&sc->hw, E1000_RNBC);
+	stats->ruc += E1000_READ_REG(&sc->hw, E1000_RUC);
+	stats->rfc += E1000_READ_REG(&sc->hw, E1000_RFC);
+	stats->roc += E1000_READ_REG(&sc->hw, E1000_ROC);
+	stats->rjc += E1000_READ_REG(&sc->hw, E1000_RJC);
+
+	stats->mgprc += E1000_READ_REG(&sc->hw, E1000_MGTPRC);
+	stats->mgpdc += E1000_READ_REG(&sc->hw, E1000_MGTPDC);
+	stats->mgptc += E1000_READ_REG(&sc->hw, E1000_MGTPTC);
+
+	stats->tor += E1000_READ_REG(&sc->hw, E1000_TORH);
+	stats->tot += E1000_READ_REG(&sc->hw, E1000_TOTH);
+
+	stats->tpr += E1000_READ_REG(&sc->hw, E1000_TPR);
+	stats->tpt += E1000_READ_REG(&sc->hw, E1000_TPT);
+	stats->ptc64 += E1000_READ_REG(&sc->hw, E1000_PTC64);
+	stats->ptc127 += E1000_READ_REG(&sc->hw, E1000_PTC127);
+	stats->ptc255 += E1000_READ_REG(&sc->hw, E1000_PTC255);
+	stats->ptc511 += E1000_READ_REG(&sc->hw, E1000_PTC511);
+	stats->ptc1023 += E1000_READ_REG(&sc->hw, E1000_PTC1023);
+	stats->ptc1522 += E1000_READ_REG(&sc->hw, E1000_PTC1522);
+	stats->mptc += E1000_READ_REG(&sc->hw, E1000_MPTC);
+	stats->bptc += E1000_READ_REG(&sc->hw, E1000_BPTC);
 
 	/* Interrupt Counts */
 
-	sc->stats.iac += E1000_READ_REG(&sc->hw, E1000_IAC);
-	sc->stats.icrxptc += E1000_READ_REG(&sc->hw, E1000_ICRXPTC);
-	sc->stats.icrxatc += E1000_READ_REG(&sc->hw, E1000_ICRXATC);
-	sc->stats.ictxptc += E1000_READ_REG(&sc->hw, E1000_ICTXPTC);
-	sc->stats.ictxatc += E1000_READ_REG(&sc->hw, E1000_ICTXATC);
-	sc->stats.ictxqec += E1000_READ_REG(&sc->hw, E1000_ICTXQEC);
-	sc->stats.ictxqmtc += E1000_READ_REG(&sc->hw, E1000_ICTXQMTC);
-	sc->stats.icrxdmtc += E1000_READ_REG(&sc->hw, E1000_ICRXDMTC);
-	sc->stats.icrxoc += E1000_READ_REG(&sc->hw, E1000_ICRXOC);
+	stats->iac += E1000_READ_REG(&sc->hw, E1000_IAC);
+	stats->icrxptc += E1000_READ_REG(&sc->hw, E1000_ICRXPTC);
+	stats->icrxatc += E1000_READ_REG(&sc->hw, E1000_ICRXATC);
+	stats->ictxptc += E1000_READ_REG(&sc->hw, E1000_ICTXPTC);
+	stats->ictxatc += E1000_READ_REG(&sc->hw, E1000_ICTXATC);
+	stats->ictxqec += E1000_READ_REG(&sc->hw, E1000_ICTXQEC);
+	stats->ictxqmtc += E1000_READ_REG(&sc->hw, E1000_ICTXQMTC);
+	stats->icrxdmtc += E1000_READ_REG(&sc->hw, E1000_ICRXDMTC);
+	stats->icrxoc += E1000_READ_REG(&sc->hw, E1000_ICRXOC);
 
 	if (sc->hw.mac.type >= e1000_82543) {
-		sc->stats.algnerrc +=
+		stats->algnerrc +=
 		E1000_READ_REG(&sc->hw, E1000_ALGNERRC);
-		sc->stats.rxerrc +=
+		stats->rxerrc +=
 		E1000_READ_REG(&sc->hw, E1000_RXERRC);
-		sc->stats.tncrs +=
+		stats->tncrs +=
 		E1000_READ_REG(&sc->hw, E1000_TNCRS);
-		sc->stats.cexterr +=
+		stats->cexterr +=
 		E1000_READ_REG(&sc->hw, E1000_CEXTERR);
-		sc->stats.tsctc +=
+		stats->tsctc +=
 		E1000_READ_REG(&sc->hw, E1000_TSCTC);
-		sc->stats.tsctfc +=
+		stats->tsctfc +=
 		E1000_READ_REG(&sc->hw, E1000_TSCTFC);
 	}
 }
 
+static void
+em_update_vf_stats_counters(struct e1000_softc *sc)
+{
+	struct e1000_vf_stats *stats;
+
+	if (sc->link_speed == 0)
+		return;
+
+	stats = &sc->ustats.vf_stats;
+
+	UPDATE_VF_REG(E1000_VFGPRC,
+	    stats->last_gprc, stats->gprc);
+	UPDATE_VF_REG(E1000_VFGORC,
+	    stats->last_gorc, stats->gorc);
+	UPDATE_VF_REG(E1000_VFGPTC,
+	    stats->last_gptc, stats->gptc);
+	UPDATE_VF_REG(E1000_VFGOTC,
+	    stats->last_gotc, stats->gotc);
+	UPDATE_VF_REG(E1000_VFMPRC,
+	    stats->last_mprc, stats->mprc);
+}
+
+static uint64_t
+em_if_get_vf_counter(if_ctx_t ctx, ift_counter cnt)
+{
+	struct e1000_softc *sc = iflib_get_softc(ctx);
+	if_t ifp = iflib_get_ifp(ctx);
+
+	switch (cnt) {
+	case IFCOUNTER_IERRORS:
+		return sc->dropped_pkts;
+	case IFCOUNTER_OERRORS:
+		return sc->watchdog_events;
+	default:
+		return (if_get_counter_default(ifp, cnt));
+	}
+}
+
 static uint64_t
 em_if_get_counter(if_ctx_t ctx, ift_counter cnt)
 {
 	struct e1000_softc *sc = iflib_get_softc(ctx);
+	struct e1000_hw_stats *stats;
 	if_t ifp = iflib_get_ifp(ctx);
 
+	if (sc->vf_ifp)
+		return (em_if_get_vf_counter(ctx, cnt));
+
+	stats = &sc->ustats.stats;
+
 	switch (cnt) {
 	case IFCOUNTER_COLLISIONS:
-		return (sc->stats.colc);
+		return (stats->colc);
 	case IFCOUNTER_IERRORS:
-		return (sc->dropped_pkts + sc->stats.rxerrc +
-		    sc->stats.crcerrs + sc->stats.algnerrc +
-		    sc->stats.ruc + sc->stats.roc +
-		    sc->stats.mpc + sc->stats.cexterr);
+		return (sc->dropped_pkts + stats->rxerrc +
+		    stats->crcerrs + stats->algnerrc +
+		    stats->ruc + stats->roc +
+		    stats->mpc + stats->cexterr);
 	case IFCOUNTER_OERRORS:
-		return (sc->stats.ecol + sc->stats.latecol +
+		return (stats->ecol + stats->latecol +
 		    sc->watchdog_events);
 	default:
 		return (if_get_counter_default(ifp, cnt));
@@ -4884,7 +4944,7 @@ em_add_hw_stats(struct e1000_softc *sc)
 	struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(dev);
 	struct sysctl_oid *tree = device_get_sysctl_tree(dev);
 	struct sysctl_oid_list *child = SYSCTL_CHILDREN(tree);
-	struct e1000_hw_stats *stats = &sc->stats;
+	struct e1000_hw_stats *stats;
 
 	struct sysctl_oid *stat_node, *queue_node, *int_node;
 	struct sysctl_oid_list *stat_list, *queue_list, *int_list;
@@ -4975,6 +5035,33 @@ em_add_hw_stats(struct e1000_softc *sc)
 	    CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Statistics");
 	stat_list = SYSCTL_CHILDREN(stat_node);
 
+	/*
+	** VF adapter has a very limited set of stats
+	** since its not managing the metal, so to speak.
+	*/
+	if (sc->vf_ifp) {
+		struct e1000_vf_stats *vfstats = &sc->ustats.vf_stats;
+
+		SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_pkts_recvd",
+		    CTLFLAG_RD, &vfstats->gprc,
+		    "Good Packets Received");
+		SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_pkts_txd",
+		    CTLFLAG_RD, &vfstats->gptc,
+		    "Good Packets Transmitted");
+		SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_octets_recvd",
+		    CTLFLAG_RD, &vfstats->gorc,
+		    "Good Octets Received");
+		SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "good_octets_txd",
+		    CTLFLAG_RD, &vfstats->gotc,
+		    "Good Octets Transmitted");
+		SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_recvd",
+		    CTLFLAG_RD, &vfstats->mprc,
+		    "Multicast Packets Received");
+		return;
+	}
+
+	stats = &sc->ustats.stats;
+
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "excess_coll",
 	    CTLFLAG_RD, &stats->ecol,
 	    "Excessive collisions");
@@ -4991,147 +5078,147 @@ em_add_hw_stats(struct e1000_softc *sc)
 	    CTLFLAG_RD, &stats->colc,
 	    "Collision Count");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "symbol_errors",
-	    CTLFLAG_RD, &sc->stats.symerrs,
+	    CTLFLAG_RD, &stats->symerrs,
 	    "Symbol Errors");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "sequence_errors",
-	    CTLFLAG_RD, &sc->stats.sec,
+	    CTLFLAG_RD, &stats->sec,
 	    "Sequence Errors");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "defer_count",
-	    CTLFLAG_RD, &sc->stats.dc,
+	    CTLFLAG_RD, &stats->dc,
 	    "Defer Count");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "missed_packets",
-	    CTLFLAG_RD, &sc->stats.mpc,
+	    CTLFLAG_RD, &stats->mpc,
 	    "Missed Packets");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_length_errors",
-	    CTLFLAG_RD, &sc->stats.rlec,
+	    CTLFLAG_RD, &stats->rlec,
 	    "Receive Length Errors");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_no_buff",
-	    CTLFLAG_RD, &sc->stats.rnbc,
+	    CTLFLAG_RD, &stats->rnbc,
 	    "Receive No Buffers");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_undersize",
-	    CTLFLAG_RD, &sc->stats.ruc,
+	    CTLFLAG_RD, &stats->ruc,
 	    "Receive Undersize");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_fragmented",
-	    CTLFLAG_RD, &sc->stats.rfc,
+	    CTLFLAG_RD, &stats->rfc,
 	    "Fragmented Packets Received ");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_oversize",
-	    CTLFLAG_RD, &sc->stats.roc,
+	    CTLFLAG_RD, &stats->roc,
 	    "Oversized Packets Received");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_jabber",
-	    CTLFLAG_RD, &sc->stats.rjc,
+	    CTLFLAG_RD, &stats->rjc,
 	    "Recevied Jabber");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_errs",
-	    CTLFLAG_RD, &sc->stats.rxerrc,
+	    CTLFLAG_RD, &stats->rxerrc,
 	    "Receive Errors");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "crc_errs",
-	    CTLFLAG_RD, &sc->stats.crcerrs,
+	    CTLFLAG_RD, &stats->crcerrs,
 	    "CRC errors");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "alignment_errs",
-	    CTLFLAG_RD, &sc->stats.algnerrc,
+	    CTLFLAG_RD, &stats->algnerrc,
 	    "Alignment Errors");
 	/* On 82575 these are collision counts */
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "coll_ext_errs",
-	    CTLFLAG_RD, &sc->stats.cexterr,
+	    CTLFLAG_RD, &stats->cexterr,
 	    "Collision/Carrier extension errors");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xon_recvd",
-	    CTLFLAG_RD, &sc->stats.xonrxc,
+	    CTLFLAG_RD, &stats->xonrxc,
 	    "XON Received");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xon_txd",
-	    CTLFLAG_RD, &sc->stats.xontxc,
+	    CTLFLAG_RD, &stats->xontxc,
 	    "XON Transmitted");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xoff_recvd",
-	    CTLFLAG_RD, &sc->stats.xoffrxc,
+	    CTLFLAG_RD, &stats->xoffrxc,
 	    "XOFF Received");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xoff_txd",
-	    CTLFLAG_RD, &sc->stats.xofftxc,
+	    CTLFLAG_RD, &stats->xofftxc,
 	    "XOFF Transmitted");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "unsupported_fc_recvd",
-	    CTLFLAG_RD, &sc->stats.fcruc,
+	    CTLFLAG_RD, &stats->fcruc,
 	    "Unsupported Flow Control Received");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_recvd",
-	    CTLFLAG_RD, &sc->stats.mgprc,
+	    CTLFLAG_RD, &stats->mgprc,
 	    "Management Packets Received");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_drop",
-	    CTLFLAG_RD, &sc->stats.mgpdc,
+	    CTLFLAG_RD, &stats->mgpdc,
 	    "Management Packets Dropped");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_txd",
-	    CTLFLAG_RD, &sc->stats.mgptc,
+	    CTLFLAG_RD, &stats->mgptc,
 	    "Management Packets Transmitted");
 
 	/* Packet Reception Stats */
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "total_pkts_recvd",
-	    CTLFLAG_RD, &sc->stats.tpr,
+	    CTLFLAG_RD, &stats->tpr,
 	    "Total Packets Received ");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_pkts_recvd",
-	    CTLFLAG_RD, &sc->stats.gprc,
+	    CTLFLAG_RD, &stats->gprc,
 	    "Good Packets Received");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "bcast_pkts_recvd",
-	    CTLFLAG_RD, &sc->stats.bprc,
+	    CTLFLAG_RD, &stats->bprc,
 	    "Broadcast Packets Received");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_recvd",
-	    CTLFLAG_RD, &sc->stats.mprc,
+	    CTLFLAG_RD, &stats->mprc,
 	    "Multicast Packets Received");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_64",
-	    CTLFLAG_RD, &sc->stats.prc64,
+	    CTLFLAG_RD, &stats->prc64,
 	    "64 byte frames received ");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_65_127",
-	    CTLFLAG_RD, &sc->stats.prc127,
+	    CTLFLAG_RD, &stats->prc127,
 	    "65-127 byte frames received");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_128_255",
-	    CTLFLAG_RD, &sc->stats.prc255,
+	    CTLFLAG_RD, &stats->prc255,
 	    "128-255 byte frames received");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_256_511",
-	    CTLFLAG_RD, &sc->stats.prc511,
+	    CTLFLAG_RD, &stats->prc511,
 	    "256-511 byte frames received");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_512_1023",
-	    CTLFLAG_RD, &sc->stats.prc1023,
+	    CTLFLAG_RD, &stats->prc1023,
 	    "512-1023 byte frames received");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_frames_1024_1522",
-	    CTLFLAG_RD, &sc->stats.prc1522,
+	    CTLFLAG_RD, &stats->prc1522,
 	    "1023-1522 byte frames received");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_octets_recvd",
-	    CTLFLAG_RD, &sc->stats.gorc,
+	    CTLFLAG_RD, &stats->gorc,
 	    "Good Octets Received");
 
 	/* Packet Transmission Stats */
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_octets_txd",
-	    CTLFLAG_RD, &sc->stats.gotc,
+	    CTLFLAG_RD, &stats->gotc,
 	    "Good Octets Transmitted");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "total_pkts_txd",
-	    CTLFLAG_RD, &sc->stats.tpt,
+	    CTLFLAG_RD, &stats->tpt,
 	    "Total Packets Transmitted");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "good_pkts_txd",
-	    CTLFLAG_RD, &sc->stats.gptc,
+	    CTLFLAG_RD, &stats->gptc,
 	    "Good Packets Transmitted");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "bcast_pkts_txd",
-	    CTLFLAG_RD, &sc->stats.bptc,
+	    CTLFLAG_RD, &stats->bptc,
 	    "Broadcast Packets Transmitted");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mcast_pkts_txd",
-	    CTLFLAG_RD, &sc->stats.mptc,
+	    CTLFLAG_RD, &stats->mptc,
 	    "Multicast Packets Transmitted");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_64",
-	    CTLFLAG_RD, &sc->stats.ptc64,
+	    CTLFLAG_RD, &stats->ptc64,
 	    "64 byte frames transmitted ");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_65_127",
-	    CTLFLAG_RD, &sc->stats.ptc127,
+	    CTLFLAG_RD, &stats->ptc127,
 	    "65-127 byte frames transmitted");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_128_255",
-	    CTLFLAG_RD, &sc->stats.ptc255,
+	    CTLFLAG_RD, &stats->ptc255,
 	    "128-255 byte frames transmitted");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_256_511",
-	    CTLFLAG_RD, &sc->stats.ptc511,
+	    CTLFLAG_RD, &stats->ptc511,
 	    "256-511 byte frames transmitted");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_512_1023",
-	    CTLFLAG_RD, &sc->stats.ptc1023,
+	    CTLFLAG_RD, &stats->ptc1023,
 	    "512-1023 byte frames transmitted");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tx_frames_1024_1522",
-	    CTLFLAG_RD, &sc->stats.ptc1522,
+	    CTLFLAG_RD, &stats->ptc1522,
 	    "1024-1522 byte frames transmitted");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tso_txd",
-	    CTLFLAG_RD, &sc->stats.tsctc,
+	    CTLFLAG_RD, &stats->tsctc,
 	    "TSO Contexts Transmitted");
 	SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "tso_ctx_fail",
-	    CTLFLAG_RD, &sc->stats.tsctfc,
+	    CTLFLAG_RD, &stats->tsctfc,
 	    "TSO Contexts Failed");
 
 	/* Interrupt Stats */
@@ -5140,39 +5227,39 @@ em_add_hw_stats(struct e1000_softc *sc)
 	int_list = SYSCTL_CHILDREN(int_node);
 
 	SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "asserts",
-	    CTLFLAG_RD, &sc->stats.iac,
+	    CTLFLAG_RD, &stats->iac,
 	    "Interrupt Assertion Count");
 
 	SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "rx_pkt_timer",
-	    CTLFLAG_RD, &sc->stats.icrxptc,
+	    CTLFLAG_RD, &stats->icrxptc,
 	    "Interrupt Cause Rx Pkt Timer Expire Count");
 
 	SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "rx_abs_timer",
-	    CTLFLAG_RD, &sc->stats.icrxatc,
+	    CTLFLAG_RD, &stats->icrxatc,
 	    "Interrupt Cause Rx Abs Timer Expire Count");
 
 	SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "tx_pkt_timer",
-	    CTLFLAG_RD, &sc->stats.ictxptc,
+	    CTLFLAG_RD, &stats->ictxptc,
 	    "Interrupt Cause Tx Pkt Timer Expire Count");
 
 	SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "tx_abs_timer",
-	    CTLFLAG_RD, &sc->stats.ictxatc,
+	    CTLFLAG_RD, &stats->ictxatc,
 	    "Interrupt Cause Tx Abs Timer Expire Count");
 
 	SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "tx_queue_empty",
-	    CTLFLAG_RD, &sc->stats.ictxqec,
+	    CTLFLAG_RD, &stats->ictxqec,
 	    "Interrupt Cause Tx Queue Empty Count");
 
 	SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "tx_queue_min_thresh",
-	    CTLFLAG_RD, &sc->stats.ictxqmtc,
+	    CTLFLAG_RD, &stats->ictxqmtc,
 	    "Interrupt Cause Tx Queue Min Thresh Count");
 
 	SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "rx_desc_min_thresh",
-	    CTLFLAG_RD, &sc->stats.icrxdmtc,
+	    CTLFLAG_RD, &stats->icrxdmtc,
 	    "Interrupt Cause Rx Desc Min Thresh Count");
 
 	SYSCTL_ADD_UQUAD(ctx, int_list, OID_AUTO, "rx_overrun",
-	    CTLFLAG_RD, &sc->stats.icrxoc,
+	    CTLFLAG_RD, &stats->icrxoc,
 	    "Interrupt Cause Receiver Overrun Count");
 }
 
diff --git a/sys/dev/e1000/if_em.h b/sys/dev/e1000/if_em.h
index 52bfed0f9a42..582e8d9c6327 100644
--- a/sys/dev/e1000/if_em.h
+++ b/sys/dev/e1000/if_em.h
@@ -370,6 +370,19 @@
 #define EM_NVM_MSIX_N_MASK	(0x7 << EM_NVM_MSIX_N_SHIFT)
 #define EM_NVM_MSIX_N_SHIFT	7
 
+/*
+ * VFs use 32-bit counter that rolls over.
+ */
+#define UPDATE_VF_REG(reg, last, cur)		\
+do {						\
+	u32 new = E1000_READ_REG(&sc->hw, reg);	\
+	if (new < last)				\
+		cur += 0x100000000LL;		\
+	last = new;				\
+	cur &= 0xFFFFFFFF00000000LL;		\
+	cur |= new;				\
+} while (0)
+
 struct e1000_softc;
 
 struct em_int_delay_info {
@@ -546,7 +559,11 @@ struct e1000_softc {
 	unsigned long		rx_overruns;
 	unsigned long		watchdog_events;
 
-	struct e1000_hw_stats	stats;
+	union {
+		struct e1000_hw_stats	stats;		/* !sc->vf_ifp */
+		struct e1000_vf_stats	vf_stats;	/* sc->vf_ifp */
+	} ustats;
+
 	u16			vf_ifp;
 };
 

From nobody Sat Sep 27 04:10:01 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYYrV0Wpqz68gqc;
	Sat, 27 Sep 2025 04:10:02 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYYrT6sTZz3x7W;
	Sat, 27 Sep 2025 04:10:01 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758946202;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=tsD6i8GF0a7lQg39h/x5Fd54CF2TJcDR+4eCss7DCR8=;
	b=EycOrH3dY+gSc74hTV3VbILlOu16f1e6xFcr4w2KLo2T0PCyeCKh0xBNxFNFtx0j5QC3G5
	OJlr8idjUcO6zMfaSpu82SZFBM/4QV/BMS3/3FwHQVmjeFGxAXemab3vWZgDh142YkAg2M
	aS2clksNSMYPST+VwTOnP6QRDZ8PvKkhlrIHSRBVWRIiAogfNYSnQgrpqt/QkdYjgYOwAq
	yVnPltM4ex3MxYob3Rsyf7llqhuIsLBgkUd1M+Z+avH7VbMSg4tP8F2xqXFuHf7IXdv0Ya
	4IlsndKWfQkbT3ah+VZZj3iSE7qni/d1i+g/4hK7n3018U/hivzW6ysR13NGyg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758946202;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=tsD6i8GF0a7lQg39h/x5Fd54CF2TJcDR+4eCss7DCR8=;
	b=hJAKL7dV4s50HB8h4smeM7eQdBUH+Z6BV2v3cm0vImNerNr2dB54HIAe8VlTUWlcCJCjl7
	sxEg7IgZ00dLPMwzYSzvsEUJenuHJRNhsDuPdF5yLVhKXi+1mU2AdJeiU7m+r/P/WSZpDd
	ktOgOXX9N8lAcUizIp7RquWbZ370qJcJrjCmDGUhOjNzKOw4FiWDREL5U0ORFwjr7hTSsX
	ElpbzSAmm89rXcLP6A9umWp40hEf93MQ3wrsSPWEDhOl3RCVF6Jj9Cr8J2qeqgF5EnV0gq
	9sDxbnbgCWDbKRKBjwUO50HcVyhGm1+eDLSq9uP6eLdCn6xq3t+/KmG07WAsJw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758946202; a=rsa-sha256; cv=none;
	b=LCaMNztceRuVLEbmPbpaH/G9t1+nzD+XPLjBpeqO5tobNXo9BX7Lb0iPees58O1wRwtHYO
	VusSOSt2zTPHdHEBmcqkSoyIWyouGzNs96FXn6eR+9FQa01744yrR1nZEM2z55IJMWUxer
	J4KySGoMYukHNHtx2m62YHk58upVI5vZmDmudnsASYNbn514K2SRzEipTzluFp/XcIb9a7
	/E7F5VSJ/mE1WJwcMURsN1pwPLVyV9cx5yMEtxP6yLkVsV+XK2IqaBWNU1WXg/kOxzfH8g
	Uv5lMc5QGbpYcqd5WJjnFL37xq+dasMwKg58KEXU/424kyLawxJs61T6ioUt/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])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYYrT68Yzz2sK;
	Sat, 27 Sep 2025 04:10:01 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58R4A1oG024504;
	Sat, 27 Sep 2025 04:10:01 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58R4A1S4024499;
	Sat, 27 Sep 2025 04:10:01 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 04:10:01 GMT
Message-Id: <202509270410.58R4A1S4024499@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Colin Percival 
Subject: git: d2b670b27f37 - stable/15 - pkgbase-stage: Use unique
  PKG_DBDIR
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: cperciva
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: d2b670b27f37df65d0db11182ed5a0873f6ad8e6
Auto-Submitted: auto-generated

The branch stable/15 has been updated by cperciva:

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

commit d2b670b27f37df65d0db11182ed5a0873f6ad8e6
Author:     Colin Percival 
AuthorDate: 2025-09-27 01:23:20 +0000
Commit:     Colin Percival 
CommitDate: 2025-09-27 04:09:37 +0000

    pkgbase-stage: Use unique PKG_DBDIR
    
    Prior to this commit, pkgbase-stage.lua used a hard-coded PKG_DBDIR
    "./pkgdb"; unfortunately this creates a race condition if we start
    building disc1.iso and dvd1.iso at the same time
    
      pkg: sqlite error while executing CREATE TABLE licenses [...]
      in file pkgdb.c:2330: table licenses already exists
    
    since pkg checks to see if the pkgdb is initialized and initializes
    it if not.
    
    Use separate pkgdb-disc1 and pkgdb-dvd directories.
    
    MFC after:      1 minute
    Sponsored by:   https://www.patreon.com/cperciva
    Differential Revision:  https://reviews.freebsd.org/D52755
    
    (cherry picked from commit 523fece9d11e5d084c1d20d10d05971f5354d343)
---
 release/Makefile                  | 6 +++---
 release/scripts/pkgbase-stage.lua | 4 +++-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/release/Makefile b/release/Makefile
index 73ab2b7cb250..425223747148 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -133,7 +133,7 @@ CLEANFILES+=	${I}.xz
 .if defined(WITH_DVD) && !empty(WITH_DVD)
 CLEANFILES+=	pkg-stage
 .endif
-CLEANDIRS=	dist pkgdb pkgbase-repo pkgbase-repo-conf ftp disc1 disc1-disc1 disc1-memstick bootonly bootonly-bootonly bootonly-memstick dvd
+CLEANDIRS=	dist pkgdb-dvd pkgdb-disc1 pkgbase-repo pkgbase-repo-conf ftp disc1 disc1-disc1 disc1-memstick bootonly bootonly-bootonly bootonly-memstick dvd
 beforeclean:
 	chflags -R noschg .
 .include 
@@ -220,7 +220,7 @@ disc1: ${PKGBASE_REPO}
 	${.CURDIR}/scripts/pkgbase-stage.lua disc \
 	    ${.OBJDIR}/pkgbase-repo/${PKG_ABI}/latest \
 	    ${.TARGET}/usr/freebsd-packages/offline \
-	    "${_ALL_libcompats}" ${PKG_ABI}
+	    "${_ALL_libcompats}" ${PKG_ABI} ${.OBJDIR}/pkgdb-disc1
 	cp ${.CURDIR}/scripts/FreeBSD-base-offline.conf \
 		${.TARGET}/usr/freebsd-packages/repos/
 	mtree -c -p ${.TARGET}/usr/freebsd-packages | \
@@ -318,7 +318,7 @@ dvd: ${PKGBASE_REPO}
 	${.CURDIR}/scripts/pkgbase-stage.lua dvd \
 	    ${.OBJDIR}/pkgbase-repo/${PKG_ABI}/latest \
 	    ${.TARGET}/usr/freebsd-packages/offline \
-	    "${_ALL_libcompats}" ${PKG_ABI}
+	    "${_ALL_libcompats}" ${PKG_ABI} ${.OBJDIR}/pkgdb-dvd
 	cp ${.CURDIR}/scripts/FreeBSD-base-offline.conf \
 		${.TARGET}/usr/freebsd-packages/repos/
 	mtree -c -p ${.TARGET}/usr/freebsd-packages | \
diff --git a/release/scripts/pkgbase-stage.lua b/release/scripts/pkgbase-stage.lua
index 6845e0079b05..56cb2dc758ec 100755
--- a/release/scripts/pkgbase-stage.lua
+++ b/release/scripts/pkgbase-stage.lua
@@ -89,6 +89,8 @@ local function main()
 	local all_libcompats = assert(arg[4])
 	-- ABI of repository
 	local ABI = assert(arg[5])
+	-- pkgdb to use
+	local PKGDB = assert(arg[6])
 
 	assert(os.execute("mkdir -p pkgbase-repo-conf"))
 	local f  = assert(io.open("pkgbase-repo-conf/FreeBSD-base.conf", "w"))
@@ -102,7 +104,7 @@ local function main()
 
 	local pkg = "pkg -o ASSUME_ALWAYS_YES=yes -o IGNORE_OSVERSION=yes " ..
 	    "-o ABI=" .. ABI .. " " ..
-	    "-o INSTALL_AS_USER=1 -o PKG_DBDIR=./pkgdb -R ./pkgbase-repo-conf "
+	    "-o INSTALL_AS_USER=1 -o PKG_DBDIR=" .. PKGDB .. " -R ./pkgbase-repo-conf "
 
 	assert(os.execute(pkg .. "update"))
 

From nobody Sat Sep 27 08:51:54 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYh5l2QQyz6936t;
	Sat, 27 Sep 2025 08:51:55 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYh5l0ZR5z3N2R;
	Sat, 27 Sep 2025 08:51:55 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758963115;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=sd8HsgQEvYUrO3PG6DoTJGFsdp1TcH3L+1X32/dbPco=;
	b=h15FNk2aLuj684Pn1BPrA7SMNNItvvnLCM++n86l8gtvnTmCeVe+pB2uTheQ1WNW+ioS1B
	LiJB+NIXAmNZaM418FF4ha+VKiO0zD1cWA8exIeD8QOuCP6N6zKUVbJNIM+CGkIcO9E1MI
	XnF6NIb+IRKim3KR6gHm7ObMfvKPAkv3OKFH9ou+aNb1fO0FpcimIvhL+IfuQ26D9tuVuq
	T9jPd2FvjBa5YIyg9uAXbZvEt4xcUqfZ8i6xPD/ACBk8eTwyTDcEcphqUR6K/j9uNI5JcH
	d4/WSg8JPgQx1jy/KIuT6sMb0JMA7FVXOmIL+G48483Z0QB2UdO+Gnf57Z0EdA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758963115;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=sd8HsgQEvYUrO3PG6DoTJGFsdp1TcH3L+1X32/dbPco=;
	b=J/JyWKMQ1UOjbkZMy8sSepRDk38+NqNnUWgWr24lhs8XZolR1qkGuWpRJHchPMmEYpNE5u
	AwViVfDNbsbJjvyQlv8D8+VJQhgXXLp+9BvTpDUDteTyEPjdcbm1/VmV8SBirxqXrk4O+q
	jkxk1u/mpGkAOo1Kgjyhv2i1j6o+DV9hhFQM9kDpPH6GjymEtnvWvdq9/jptdWlbcruO97
	a/Z6hjx+BEesJcRtPzLt33dYpiexTOCIA8zB+AE9+624A8kg4404c0UfIfe7vNII/0CQ6d
	ydP9FUMHPN3TtRVv6AKnVP6uzZ4HVTMDqFrhxfXwOTStHkZS35oqIMHv8/bJlA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758963115; a=rsa-sha256; cv=none;
	b=BXW+PEkH/8GsUv05o9M2aVtMmmy79Sx/KrUE8xP3zTROn+X3pMLJY2QXcpQpAMrCZGAptv
	fHmXgrm6y6HxKPioeiO0uiV3JV9z0V9LEdxn93P+QMM02MUA3XIHPC6yuyBn6Ic2HUoITw
	UZfJcMXERXzcXJcMCNIuiNEYVPjANhEo0+FfZdfno4lwZsoRink2fBpOR6MI47hJ1hBG56
	uy0mypmykbjo7kAyKTFSAJFdy/Pd+mJ38KrikUl7A8ICuiMl47B8wvvzRtZigO+g/dFC4f
	pZlKHzKtZbczBJkTOuOo2D+XNowt6R4v45PfTCZxL+QJC/UbD3LOpK5F1TkFNQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYh5l07V4zB7j;
	Sat, 27 Sep 2025 08:51:55 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58R8psev060775;
	Sat, 27 Sep 2025 08:51:54 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58R8ps3E060772;
	Sat, 27 Sep 2025 08:51:54 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 08:51:54 GMT
Message-Id: <202509270851.58R8ps3E060772@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Robert Clausecker 
Subject: git: 510a9e3885e7 - stable/15 - libc/aarch64: fix ELF size
  of timingsafe_memcmp
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: fuz
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 510a9e3885e7852e420bea01dcb0247827ea932c
Auto-Submitted: auto-generated

The branch stable/15 has been updated by fuz:

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

commit 510a9e3885e7852e420bea01dcb0247827ea932c
Author:     Paul Floyd 
AuthorDate: 2025-09-25 19:49:08 +0000
Commit:     Robert Clausecker 
CommitDate: 2025-09-27 08:51:33 +0000

    libc/aarch64: fix ELF size of timingsafe_memcmp
    
    Looks like a copy and paste error.
    The ELF size of 0 prevents Valgrind from redirecting this function.
    
    PR:             289845
    Reviewed by:    fuz
    Fixes:          3f224333af163d5fcd7547a20993dcf18f19076c
    See also:       https://bugs.kde.org/show_bug.cgi?id=509406
    Pull Request:   https://github.com/freebsd/freebsd-src/pull/1854
    MFC after:      1 day
    Event:          EuroBSDcon 2025
    
    (cherry picked from commit 7feac79331bc8c77e2f8a3e71d6ea087fa17b61d)
---
 lib/libc/aarch64/string/timingsafe_memcmp.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libc/aarch64/string/timingsafe_memcmp.S b/lib/libc/aarch64/string/timingsafe_memcmp.S
index 28fdd911a387..4cc10a152aa8 100644
--- a/lib/libc/aarch64/string/timingsafe_memcmp.S
+++ b/lib/libc/aarch64/string/timingsafe_memcmp.S
@@ -114,4 +114,4 @@ ENTRY(timingsafe_memcmp)
 	csetm	w0, lo
 	csinc	w0, w0, wzr, ls
 	ret
-END(timingsafe_bcmp)
+END(timingsafe_memcmp)

From nobody Sat Sep 27 10:26:52 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYkCK0rM0z697fY;
	Sat, 27 Sep 2025 10:26:53 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYkCJ7347z3V5W;
	Sat, 27 Sep 2025 10:26:52 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758968813;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=3MnA27Nh2KViSKPmLdRQu5LRG7tuLAmSU3gX8mTvny4=;
	b=thEwvjoxw2gagEBSDkL5EmtPTfywqapQ/+v6p6HRInNaRasUtqp3iBoSB/vdJhJLEcCxLd
	leSEvIxH9Wg/ViruFwDzeCEpDeK4O3LTIPjqFgmeobHIhzG6kP4vdlcIzcywCuwGhEECDs
	0IQj7BBGZ+OXcrz2dCcqF7LEN9KYZq2sX8du3VectAywTOdziNszN98D/GC601s32I8M1B
	O8xMjbsnByaHL6LZC0dyePC6NRwVbxNQLdqkK+nyiDcm0kn26Xto3lergdY5LlYDvbQEUR
	Ptu3Rvz8ENhRNIS1FE7pPceN6wjdbu3bc8HYoQvL+QCNNMYflkEN+NrJG5gbmg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758968813;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=3MnA27Nh2KViSKPmLdRQu5LRG7tuLAmSU3gX8mTvny4=;
	b=xU1I7ev25sXBI0ERq6Dl4O25IzKrjuglNQyiVZfUX+R8qRiYwMje3nb1VzY5/aCcm50eH1
	QL8jLcajVFcq3Ne8YdC7LtjBJi7HUSCMiZPz0chQxmOIYyuqfJskpe2Nx3LqtRT58CK/0d
	W+zuAuylm5kRaNHKuofl4TFJUkQNKBs9gGZmORkXwNdStibbwyuvJnD4830HcMTwvaBF1b
	LPc2ryb81L9zkwTNy80WNctbbQQyHhFL7iL6XOeUjjDHvugQ1Pdx1irmhgKCow6K4lZh/x
	whVQMdR/IDSH9cEJQAo2Wdtko+S/6igfpPWyw/fudcrvCsD2RkNPyh9NRTg7Pw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758968813; a=rsa-sha256; cv=none;
	b=woBETT9I+mKL2q8eRUkjKDFHicl2Z3F23M17ivNNwkGO/SX/zRr7ilxrtdq7N63qi+wtyR
	zqZIyN8ef8PUr5Hiy1b+AAEzGbjlQNenJjybKsiV6a49zIvDwPirZKpLNO0x1LeeV40k0K
	Ci7M6tMt7h+TIll9YBeEbGcXyepK9sI9bnp4ty/+aDiapa4d1ppH5WS70yEs/LE0OxNi87
	3LRP8fry1iE3bFS7qLJZL6jNIDE7JIFlqCjlo+8OvmS6SlEBz9oUJkOj+O/QVlzyBv1MbL
	J5UIBxVqMkGl6EhYrdE2A0MkspSifT4jGA0y4g/bNhzl9yDPQ3VSH2EniI9INQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYkCJ6GRTzTpd;
	Sat, 27 Sep 2025 10:26:52 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RAQqLH036274;
	Sat, 27 Sep 2025 10:26:52 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RAQqLc036271;
	Sat, 27 Sep 2025 10:26:52 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 10:26:52 GMT
Message-Id: <202509271026.58RAQqLc036271@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Vladimir Kondratyev 
Subject: git: d82a9494e798 - stable/15 - u2f(4): Use taskqueue to
  start USB transfers from kqueue context
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: wulf
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: d82a9494e7985dd9e3e8b5d31f9488e60972b865
Auto-Submitted: auto-generated

The branch stable/15 has been updated by wulf:

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

commit d82a9494e7985dd9e3e8b5d31f9488e60972b865
Author:     Vladimir Kondratyev 
AuthorDate: 2025-09-25 07:54:19 +0000
Commit:     Vladimir Kondratyev 
CommitDate: 2025-09-27 10:25:05 +0000

    u2f(4): Use taskqueue to start USB transfers from kqueue context
    
    to avoid recursion on u2f mutex and taking of hidbus sleepable lock.
    
    Tested by:      emaste
    PR:             289494
    MFC after:      2 days
    
    (cherry picked from commit 186e433300fed9093dd9716baa20e838eb3b51b6)
---
 sys/dev/hid/u2f.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/sys/dev/hid/u2f.c b/sys/dev/hid/u2f.c
index ac2eba7a499d..39610845c5fb 100644
--- a/sys/dev/hid/u2f.c
+++ b/sys/dev/hid/u2f.c
@@ -47,6 +47,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -78,6 +79,7 @@ struct u2f_softc {
 	struct cdev *dev;
 
 	struct mtx sc_mtx;		/* hidbus private mutex */
+	struct task sc_kqtask;		/* kqueue task */
 	void *sc_rdesc;
 	hid_size_t sc_rdesc_size;
 	hid_size_t sc_isize;
@@ -121,6 +123,7 @@ static device_probe_t	u2f_probe;
 static device_attach_t	u2f_attach;
 static device_detach_t	u2f_detach;
 
+static void		u2f_kqtask(void *context, int pending);
 static int		u2f_kqread(struct knote *, long);
 static void		u2f_kqdetach(struct knote *);
 static void		u2f_notify(struct u2f_softc *);
@@ -174,6 +177,7 @@ u2f_attach(device_t dev)
 
 	mtx_init(&sc->sc_mtx, "u2f lock", NULL, MTX_DEF);
 	knlist_init_mtx(&sc->sc_rsel.si_note, &sc->sc_mtx);
+	TASK_INIT(&sc->sc_kqtask, 0, u2f_kqtask, sc);
 
 	make_dev_args_init(&mda);
 	mda.mda_flags = MAKEDEV_WAITOK;
@@ -217,6 +221,7 @@ u2f_detach(device_t dev)
 		destroy_dev(sc->dev);
 	}
 
+	taskqueue_drain(taskqueue_thread, &sc->sc_kqtask);
 	hid_intr_stop(sc->sc_dev);
 
 	knlist_clear(&sc->sc_rsel.si_note, 0);
@@ -519,6 +524,14 @@ u2f_kqfilter(struct cdev *dev, struct knote *kn)
 	return (0);
 }
 
+static void
+u2f_kqtask(void *context, int pending)
+{
+	struct u2f_softc *sc = context;
+
+	hid_intr_start(sc->sc_dev);
+}
+
 static int
 u2f_kqread(struct knote *kn, long hint)
 {
@@ -533,7 +546,7 @@ u2f_kqread(struct knote *kn, long hint)
 	} else {
 		ret = sc->sc_state.data ? 1 : 0;
 		if (!sc->sc_state.data)
-			hid_intr_start(sc->sc_dev);
+			taskqueue_enqueue(taskqueue_thread, &sc->sc_kqtask);
 	}
 
 	return (ret);

From nobody Sat Sep 27 10:26:53 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYkCL2bXDz697yB;
	Sat, 27 Sep 2025 10:26:54 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYkCL0CJtz3VD4;
	Sat, 27 Sep 2025 10:26:54 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758968814;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=ig8TOLjbCAqnzHjWBd81Og6jSGy1akCuU2EuowfVPqE=;
	b=sFVYKtVaQOan9hR7yTW5VGrnicCrHRgUTPNEzv+syEr2VRnVbI04zS1Sgct9PXx9eQ0qZN
	W+X84UL6NMfvkC9zk8lQpz+IVsg/v5oGQA8gnj5KjIH5Y6dRvk+XiZygNcGdGZVgvVZINF
	sv0vOV5Qk78EipN7dCuWLD0WiR0H1bpjX1JVKJYHqyW3P/gfOI8JbYaSQ3yZ56T8Xjn/ze
	5wJl3j6SHEbzZnmrO3xSPHeMzq5ADZ/rAxH0oN/lSPiswvJFLrmFERUVStk0p/ygBlsfk5
	uRDXuv35G3KG++lYDFyyZfVLlLlh0Rt071psTjuN3Ek362lNvPjh8qmxOf6mzw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758968814;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=ig8TOLjbCAqnzHjWBd81Og6jSGy1akCuU2EuowfVPqE=;
	b=r4ab7JQx5OV4F5YACBz0chK3Nx0WthL4gL/cfJoXYt+yuojdZgOpPzV5iBa33x3OBh0huh
	bgdHJW+R4MHJjjKIw6HKJbn2UIof5d+MzoUOdPlH6sjzIHntATi61yS6XUawae9U/Sm1zG
	dtQHFknDauYgVLxAIgciaH6r/gMbWajBmz4eWmpBf4XcOdDnLotgbjdRfYui6rrpuuXjkM
	nqcYLGOL2WUAc3/aIjD0Q+sUmuKY/KWqydPhxPxOS3i8IEDQ0qNvlb2Ic5PnFjiNXjeGrY
	sxmB20QbepLMCiMg8QJjZEGKBUY7jvtp/xT45jPNaHxj0N2zuoB8qUDIrTG1mw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758968814; a=rsa-sha256; cv=none;
	b=KOSvJ+Wa0KwXMIOpQZ1fS1G1vOlVtSZxFvaXf91pt1PKKE9Kkj+6eBc1nmuGguG2nCktpJ
	+M4OFDdHgu+6+OmjWSZRZZmSG3qJvs3zgUpRflCi24sCYP+aLHbzMXkn0To+TmgMc5xlzj
	NBu5UKp2WWH0u86XnOjGc26NubneF2SPC7M8kcGqSjRgtai2ltOeZEksXdut2/Z0GkJBMl
	5WuE+t40FQrpN8cT406pbH1jx1MUjBc5fBwHsxFV6KYUPMeCvMBBCTS70chgo5OQDXl9tV
	sElj/gC0798lUoP8MAcRqwhtPvxG3K8A0nzDGABWZuRqUi1G5DETBg8ynpTvtA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYkCK6rvPzTpf;
	Sat, 27 Sep 2025 10:26:53 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RAQrqf036314;
	Sat, 27 Sep 2025 10:26:53 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RAQrLS036311;
	Sat, 27 Sep 2025 10:26:53 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 10:26:53 GMT
Message-Id: <202509271026.58RAQrLS036311@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Vladimir Kondratyev 
Subject: git: 64b530b38be3 - stable/15 - u2f(4): Invert U2F_MAKE_UHID_ALIAS
  kernel build option
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: wulf
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 64b530b38be37ebf32596a5ee7ab95f484f49176
Auto-Submitted: auto-generated

The branch stable/15 has been updated by wulf:

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

commit 64b530b38be37ebf32596a5ee7ab95f484f49176
Author:     Vladimir Kondratyev 
AuthorDate: 2025-09-25 07:54:19 +0000
Commit:     Vladimir Kondratyev 
CommitDate: 2025-09-27 10:25:11 +0000

    u2f(4): Invert U2F_MAKE_UHID_ALIAS kernel build option
    
    This makes non-GENERIC kernel configs easier to maintain.
    
    Requested by:   glebius
    MFC after:      2 days
    
    (cherry picked from commit e43fbf27976df17991d32c72c41e43fda66fb262)
---
 sys/amd64/conf/GENERIC       | 1 -
 sys/arm/conf/GENERIC         | 1 -
 sys/arm64/conf/std.dev       | 1 -
 sys/conf/NOTES               | 3 ++-
 sys/conf/options             | 2 +-
 sys/dev/hid/u2f.c            | 8 ++++----
 sys/i386/conf/GENERIC        | 1 -
 sys/powerpc/conf/GENERIC64   | 1 -
 sys/powerpc/conf/GENERIC64LE | 1 -
 sys/riscv/conf/GENERIC       | 1 -
 10 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC
index bbbb94f05191..b3d60c6e68d9 100644
--- a/sys/amd64/conf/GENERIC
+++ b/sys/amd64/conf/GENERIC
@@ -384,7 +384,6 @@ options 	HID_DEBUG		# enable debug msgs
 device		hid			# Generic HID support
 device		hidbus			# Generic HID Bus
 options 	IICHID_SAMPLING		# Workaround missing GPIO INTR support
-options 	U2F_MAKE_UHID_ALIAS	# install /dev/uhid alias for /dev/u2f/
 
 # EFI devices
 device		efidev			# EFI pseudo-device
diff --git a/sys/arm/conf/GENERIC b/sys/arm/conf/GENERIC
index 26b0c7bf0294..7394f3842d43 100644
--- a/sys/arm/conf/GENERIC
+++ b/sys/arm/conf/GENERIC
@@ -261,7 +261,6 @@ device		aw_thermal	# Allwinner Thermal Sensor Controller
 # HID support
 device		hid		# Generic HID support
 device		hidbus		# Generic HID Bus
-options 	U2F_MAKE_UHID_ALIAS	# install /dev/uhid alias for /dev/u2f/
 
 # Flattened Device Tree
 options 	FDT			# Configure using FDT/DTB data
diff --git a/sys/arm64/conf/std.dev b/sys/arm64/conf/std.dev
index 719f272426dd..c5c364ffda04 100644
--- a/sys/arm64/conf/std.dev
+++ b/sys/arm64/conf/std.dev
@@ -115,7 +115,6 @@ device		mmcsd			# mmc/sd flash cards
 options 	HID_DEBUG		# enable debug msgs
 device		hid			# Generic HID support
 device		hidbus			# Generic HID Bus
-options 	U2F_MAKE_UHID_ALIAS	# install /dev/uhid alias for /dev/u2f/
 
 # Firmware
 device		mmio_sram		# Generic on-chip SRAM
diff --git a/sys/conf/NOTES b/sys/conf/NOTES
index c7a8862fb906..ea9b2667607e 100644
--- a/sys/conf/NOTES
+++ b/sys/conf/NOTES
@@ -2447,7 +2447,8 @@ device		hpen		# Generic pen driver
 device		hsctrl		# System controls
 device		ps4dshock	# Sony PS4 DualShock 4 gamepad driver
 device		u2f		# FIDO/U2F authenticator
-options 	U2F_MAKE_UHID_ALIAS	# install /dev/uhid alias for /dev/u2f/
+options 	U2F_DROP_UHID_ALIAS	# Do not install /dev/uhid alias for
+				# /dev/u2f/ and rename driver from uhid to u2f
 device		xb360gp		# XBox 360 gamepad driver
 
 #####################################################################
diff --git a/sys/conf/options b/sys/conf/options
index 66f7f2ee2d7e..b48ad1cf42cf 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -1004,7 +1004,7 @@ IICHID_DEBUG	opt_hid.h
 IICHID_SAMPLING	opt_hid.h
 HKBD_DFLT_KEYMAP	opt_hkbd.h
 HIDRAW_MAKE_UHID_ALIAS	opt_hid.h
-U2F_MAKE_UHID_ALIAS	opt_hid.h
+U2F_DROP_UHID_ALIAS	opt_hid.h
 
 # kenv options
 # The early kernel environment (loader environment, config(8)-provided static)
diff --git a/sys/dev/hid/u2f.c b/sys/dev/hid/u2f.c
index 39610845c5fb..08f1a5ceedba 100644
--- a/sys/dev/hid/u2f.c
+++ b/sys/dev/hid/u2f.c
@@ -193,7 +193,7 @@ u2f_attach(device_t dev)
 		u2f_detach(dev);
 		return (error);
 	}
-#ifdef U2F_MAKE_UHID_ALIAS
+#ifndef U2F_DROP_UHID_ALIAS
 	(void)make_dev_alias(sc->dev, "uhid%d", device_get_unit(dev));
 #endif
 
@@ -587,10 +587,10 @@ static device_method_t u2f_methods[] = {
 };
 
 static driver_t u2f_driver = {
-#ifdef U2F_MAKE_UHID_ALIAS
-	"uhid",
+#ifdef U2F_DROP_UHID_ALIAS
+	"uf2",
 #else
-	"u2f",
+	"uhid",
 #endif
 	u2f_methods,
 	sizeof(struct u2f_softc)
diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC
index 2cc883de94fa..f09e8b0703e4 100644
--- a/sys/i386/conf/GENERIC
+++ b/sys/i386/conf/GENERIC
@@ -341,4 +341,3 @@ options 	HID_DEBUG		# enable debug msgs
 device		hid			# Generic HID support
 device		hidbus			# Generic HID Bus
 options 	IICHID_SAMPLING		# Workaround missing GPIO INTR support
-options 	U2F_MAKE_UHID_ALIAS	# install /dev/uhid alias for /dev/u2f/
diff --git a/sys/powerpc/conf/GENERIC64 b/sys/powerpc/conf/GENERIC64
index 8fb1eeea23c3..446e3afca511 100644
--- a/sys/powerpc/conf/GENERIC64
+++ b/sys/powerpc/conf/GENERIC64
@@ -291,4 +291,3 @@ device          virtio_balloon          # VirtIO Memory Balloon device
 options 	HID_DEBUG		# enable debug msgs
 device		hid			# Generic HID support
 device		hidbus			# Generic HID Bus
-options 	U2F_MAKE_UHID_ALIAS	# install /dev/uhid alias for /dev/u2f/
diff --git a/sys/powerpc/conf/GENERIC64LE b/sys/powerpc/conf/GENERIC64LE
index 0a150044dcc3..b1a2d12713a8 100644
--- a/sys/powerpc/conf/GENERIC64LE
+++ b/sys/powerpc/conf/GENERIC64LE
@@ -272,4 +272,3 @@ device          virtio_balloon          # VirtIO Memory Balloon device
 options 	HID_DEBUG		# enable debug msgs
 device		hid			# Generic HID support
 device		hidbus			# Generic HID Bus
-options 	U2F_MAKE_UHID_ALIAS	# install /dev/uhid alias for /dev/u2f/
diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC
index 187e7396e884..ffd958bb33bf 100644
--- a/sys/riscv/conf/GENERIC
+++ b/sys/riscv/conf/GENERIC
@@ -132,7 +132,6 @@ device		umass			# Disks/Mass storage - Requires scbus and da
 options 	HID_DEBUG	# enable debug msgs
 device		hid		# Generic HID support
 device		hidbus		# Generic HID Bus
-options 	U2F_MAKE_UHID_ALIAS	# install /dev/uhid alias for /dev/u2f/
 
 # Serial (COM) ports
 device		uart		# Generic UART driver

From nobody Sat Sep 27 10:57:22 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYktW0CNjz699XJ;
	Sat, 27 Sep 2025 10:57:23 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYktV4k8rz3Xb2;
	Sat, 27 Sep 2025 10:57:22 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758970642;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=zpbaXUUNRfn5Cme8ZdT6n27rp742BPz0Ziqs2Rj+/hI=;
	b=VlMfHeMSX0CkqhAo5ttV318O0PaSTUR4jpCPwIpf5l3JwTHjUb7NxiAMLSqVkztKP3QkA2
	loWvvfF9qI9kZUg5JzUZO++ffRVQzNRDK6MZnLq7h688rprtvJCIBD1GtOXQYlvd77GrbA
	Kzfv1ABwv59vnNrSMWZPgT7dzZHy90aq/ActNsmI81KJp/JjaIQX9KCVuQ+4HGGjij+IKd
	14ALzblM2Xxw/PBvuh/ZqexH219N9Cep9yk51nNaKQx4R4n8XRcqEVIwK7ebL2p5unKiFx
	d2xuGqfIaeCt1t4z6EcXj1enmKx8X3BOcQxeMv6GzXyDFVHILNAMziFFq5QTGw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758970642;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=zpbaXUUNRfn5Cme8ZdT6n27rp742BPz0Ziqs2Rj+/hI=;
	b=HOjcbuNx5f2eicXUP0K9LRIX8XFF5SFv6tix0Xb7TqpifFdE3KfjSAufzd51gFalodUVN+
	sUff/XgmQWfiwBq87hJt1zuYitVQZCy23LFwh6NYkM2nc5EF4tvWW+9D8OHvtPLAzTt2GA
	Id3iaJtfz19WudTuqr8SW5ogGInKMv8KBziNZ5PFinwiRUfP3sU/wp3YY/s2MZkTeFRfU3
	PMTKMISXDllZw0WeXuRpGia72dCHbttwV4sRrZnjB456N/Dx2w+L94tAg6Gv6D8SsA1gKZ
	pj65oL4GW6/2wbDNtyBn+nvhai7fgCLKQVI3myAESq5h1rRjKQoJ+RaPMC/eAg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758970642; a=rsa-sha256; cv=none;
	b=qGPto/gehGKGeCDzQ+OIA+RvKMjhkh8h6It+ix1MrnPR2GzUujSojpnkwql7V8PBlW4CPY
	4/FwiI8dJCngi7J4jGlSrS1aesePgN5GTuPhYeS1kfP3hQwr4N5iBkEIzML+8V5cgxN4MU
	vsfh/nuCqexBtymiCzY+NHCzGwKQfxZpKmw3XfCY4Q1OuEtKOUv39j3PYSZB6r0qnv6D1V
	67QzmzccKMLgQUZYnsDmPjHQL2+KN6U3aBdV1wcY49ZRGqokn5qcQqYcr22xodHzHe2p0J
	s1sYRrdnJ7py2TN7zUcB4OxmqQLDnOik0qDAj5qJlxAX/U252tYHGdloF7OFJA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYktV412zzTlc;
	Sat, 27 Sep 2025 10:57:22 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RAvMxj092726;
	Sat, 27 Sep 2025 10:57:22 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RAvM3h092723;
	Sat, 27 Sep 2025 10:57:22 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 10:57:22 GMT
Message-Id: <202509271057.58RAvM3h092723@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Jose Luis Duran 
Subject: git: 4b1b8a558727 - stable/15 - cron: Fix comment from
  "root's" to "system" crontab
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: jlduran
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 4b1b8a558727f91d290a08ec4adf00fb41c72abe
Auto-Submitted: auto-generated

The branch stable/15 has been updated by jlduran:

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

commit 4b1b8a558727f91d290a08ec4adf00fb41c72abe
Author:     Jose Luis Duran 
AuthorDate: 2025-09-13 00:38:48 +0000
Commit:     Jose Luis Duran 
CommitDate: 2025-09-27 10:55:01 +0000

    cron: Fix comment from "root's" to "system" crontab
    
    It is referred to in the documentation as the system crontab, not root's
    crontab.
    
    PR:             289099
    Reviewed by:    emaste
    Approved by:    emaste (mentor)
    Fixes:  d33daab9348a ("Call /etc/crontab the "system crontab", not "root's crontab".  While here, fix some other wording issues")
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D52503
    
    (cherry picked from commit c806defe8fee62c4738f46e555d69b085e8d1259)
---
 usr.sbin/cron/cron/crontab | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr.sbin/cron/cron/crontab b/usr.sbin/cron/cron/crontab
index 2f4bc71d8722..e37d3fd67543 100644
--- a/usr.sbin/cron/cron/crontab
+++ b/usr.sbin/cron/cron/crontab
@@ -1,4 +1,4 @@
-# /etc/crontab - root's crontab for FreeBSD
+# /etc/crontab - system crontab for FreeBSD
 #
 #
 SHELL=/bin/sh

From nobody Sat Sep 27 10:57:23 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYktW61TXz699jd;
	Sat, 27 Sep 2025 10:57:23 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYktW57wQz3Xb3;
	Sat, 27 Sep 2025 10:57:23 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758970643;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=D3wIS+n2fHEUAS/OvvmywzZ3CgMr+Lu5i7rqEEtalBs=;
	b=LVTxAcYo/asgqHKOTYackZpK6uHQJwWnIO7Y8B+GcFAp+AeHeXl9H8aLmJV3riFdhvuxKW
	/yuSU4L7pFd+CXAA4EAf++hBgC0gM8VO5Cs0GbniHjoB0QVsY9doR6jaGgU0ZhOnmENr7w
	w2qP/AVC3SQ0gBcu67ts2kd4pKgjRKPqfooKpjQfUjehTSVcA0Xjl2K+LqENqYNneUc6Pe
	oPFi0l0wIUWRIFmvHltOtgO/DqbVtzPhLL7Mu7akH3Q0a1zNFzwfAzoA2CyDWl9W3BRrjg
	Dtp/B6YMHnkm+lkvmde9FDXoeNiieUwlyLVMRoOfQxe2kNrv/5gqxTty0UkUwQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758970643;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=D3wIS+n2fHEUAS/OvvmywzZ3CgMr+Lu5i7rqEEtalBs=;
	b=F81GzuMeB6BIid6MACr0duWTGNefUvxgcb30ITMli+YgMwxThklaVl2KVTa6qTpKJ9jKcu
	qF99DACC932eigyrAgNcVsfgT6siufWbL5VjwLzCvN/46vOYEltUsX1FuRKd+2tSac8lal
	hooSjcyXXh1Hpj4xNvALCNNkQgts9LgGzVvDd+PiUZUqdziZaaQKg610Co7jgMufN2icMI
	lCz2VW/Pv8ubSFba6U1XQqS5Qd3R1FTuBOfuG4Eg9DA1RTKEA4uZ2Z4cPRQI6vGF1raeXN
	vIJWm2e5ivw9gmtzvnLV9VFTrz7o3PAQjyWe/g3o9Tej+f4p0aIEWlZGMo1MSQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758970643; a=rsa-sha256; cv=none;
	b=SWx/b6hlzxGT6VPiucn3Kl6oErE26QkpUlKOToTQ2g4l4ZEQ+Fv2Xf3i7rw/2rNTeYzmxY
	YicmjuoC8RPhZin8oP7F4QNmgJJ52/6gspu21z3kfMQgP/O8QPLw86fP2Sqy7d+9ZZvXvp
	zP32MWp5CkvtMUpJ7XBVaBUOfhO9ZTaPf5ydVqvk+L8Wl+dCTO5Xiks9rvUdSSvwoMo822
	4ytry+XNcx5RZ9qX92JmvQ72ZDdhmamBBayMTZkOFGGtsiK1Lga9becQJ1B3+anNFUVuWX
	mdzPwBP4Vp6Ckas6xunRQBBARV8X/aKo2b6w789o5WDiZvlwxUaFnjy45z3FwA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYktW4lJDzVmV;
	Sat, 27 Sep 2025 10:57:23 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RAvNTw092766;
	Sat, 27 Sep 2025 10:57:23 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RAvNhT092763;
	Sat, 27 Sep 2025 10:57:23 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 10:57:23 GMT
Message-Id: <202509271057.58RAvNhT092763@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Jose Luis Duran 
Subject: git: a84744caa297 - stable/15 - pf tests: Add python3 as
  a dependency
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: jlduran
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: a84744caa297f25673b7eaddf8863be107c917d6
Auto-Submitted: auto-generated

The branch stable/15 has been updated by jlduran:

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

commit a84744caa297f25673b7eaddf8863be107c917d6
Author:     Jose Luis Duran 
AuthorDate: 2025-09-17 00:26:49 +0000
Commit:     Jose Luis Duran 
CommitDate: 2025-09-27 10:55:32 +0000

    pf tests: Add python3 as a dependency
    
    These tests use pft_ping.py, which requires python3 and Scapy.
    
    Reviewed by:    ngie
    Approved by:    emaste (mentor)
    Fixes:  65c318630123 ("pf: Add prefer-ipv6-nexthop option for route-to pools")
    MFC after:      10 days
    Differential Revision:  https://reviews.freebsd.org/D52589
    
    (cherry picked from commit dea1dd66905462e3b65688928dc4016eeae4ce80)
---
 tests/sys/netpfil/pf/route_to.sh | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/tests/sys/netpfil/pf/route_to.sh b/tests/sys/netpfil/pf/route_to.sh
index 872de0dcbb91..13b60c8f80bc 100644
--- a/tests/sys/netpfil/pf/route_to.sh
+++ b/tests/sys/netpfil/pf/route_to.sh
@@ -968,6 +968,7 @@ table_loop_head()
 {
 	atf_set descr 'Check that iterating over tables poperly loops'
 	atf_set require.user root
+	atf_set require.progs python3 scapy
 }
 
 table_loop_body()
@@ -1032,6 +1033,7 @@ roundrobin_head()
 {
 	atf_set descr 'multiple gateways of mixed AF, including prefixes and tables, for IPv6 packets'
 	atf_set require.user root
+	atf_set require.progs python3 scapy
 }
 
 roundrobin_body()
@@ -1094,6 +1096,7 @@ random_table_head()
 {
 	atf_set descr 'Pool with random flag and a table for IPv6'
 	atf_set require.user root
+	atf_set require.progs python3 scapy
 }
 
 random_table_body()
@@ -1131,6 +1134,7 @@ random_prefix_head()
 {
 	atf_set descr 'Pool with random flag and a table for IPv4'
 	atf_set require.user root
+	atf_set require.progs python3 scapy
 }
 
 random_prefix_body()
@@ -1167,6 +1171,7 @@ prefer_ipv6_nexthop_single_ipv4_head()
 {
 	atf_set descr 'prefer-ipv6-nexthop option for a single IPv4 gateway'
 	atf_set require.user root
+	atf_set require.progs python3 scapy
 }
 
 prefer_ipv6_nexthop_single_ipv4_body()
@@ -1219,6 +1224,7 @@ prefer_ipv6_nexthop_single_ipv6_head()
 {
 	atf_set descr 'prefer-ipv6-nexthop option for a single IPv6 gateway'
 	atf_set require.user root
+	atf_set require.progs python3 scapy
 }
 
 prefer_ipv6_nexthop_single_ipv6_body()
@@ -1269,6 +1275,7 @@ prefer_ipv6_nexthop_mixed_af_roundrobin_ipv4_head()
 {
 	atf_set descr 'prefer-ipv6-nexthop option for multiple gateways of mixed AF with prefixes and tables, round robin selection, for IPv4 packets'
 	atf_set require.user root
+	atf_set require.progs python3 scapy
 }
 
 prefer_ipv6_nexthop_mixed_af_roundrobin_ipv4_body()
@@ -1337,6 +1344,7 @@ prefer_ipv6_nexthop_mixed_af_roundrobin_ipv6_head()
 {
 	atf_set descr 'prefer-ipv6-nexthop option for multiple gateways of mixed AF with prefixes and tables, round-robin selection, for IPv6 packets'
 	atf_set require.user root
+	atf_set require.progs python3 scapy
 }
 
 prefer_ipv6_nexthop_mixed_af_roundrobin_ipv6_body()
@@ -1407,6 +1415,7 @@ prefer_ipv6_nexthop_mixed_af_random_table_ipv4_head()
 {
 	atf_set descr 'prefer-ipv6-nexthop option for a mixed-af table with random selection for IPv4 packets'
 	atf_set require.user root
+	atf_set require.progs python3 scapy
 }
 
 prefer_ipv6_nexthop_mixed_af_random_table_ipv4_body()
@@ -1444,6 +1453,7 @@ prefer_ipv6_nexthop_ipv4_random_table_ipv4_head()
 {
 	atf_set descr 'prefer-ipv6-nexthop option for an IPv4-only table with random selection for IPv4 packets'
 	atf_set require.user root
+	atf_set require.progs python3 scapy
 }
 
 prefer_ipv6_nexthop_ipv4_random_table_ipv4_body()
@@ -1479,6 +1489,7 @@ prefer_ipv6_nexthop_ipv4_random_table_ipv6_head()
 {
 	atf_set descr 'prefer-ipv6-nexthop option for an IPv4-only table with random selection for IPv6 packets'
 	atf_set require.user root
+	atf_set require.progs python3 scapy
 }
 
 prefer_ipv6_nexthop_ipv4_random_table_ipv6_body()
@@ -1516,6 +1527,7 @@ prefer_ipv6_nexthop_ipv6_random_prefix_ipv4_head()
 {
 	atf_set descr 'prefer-ipv6-nexthop option for an IPv6 prefix with random selection for IPv4 packets'
 	atf_set require.user root
+	atf_set require.progs python3 scapy
 }
 
 prefer_ipv6_nexthop_ipv6_random_prefix_ipv4_body()
@@ -1544,6 +1556,7 @@ prefer_ipv6_nexthop_ipv6_random_prefix_ipv6_head()
 {
 	atf_set descr 'prefer-ipv6-nexthop option for an IPv6 prefix with random selection for IPv6 packets'
 	atf_set require.user root
+	atf_set require.progs python3 scapy
 }
 
 prefer_ipv6_nexthop_ipv6_random_prefix_ipv6_body()
@@ -1572,6 +1585,7 @@ prefer_ipv6_nexthop_ipv4_random_prefix_ipv4_head()
 {
 	atf_set descr 'prefer-ipv6-nexthop option for an IPv4 prefix with random selection for IPv4 packets'
 	atf_set require.user root
+	atf_set require.progs python3 scapy
 }
 
 prefer_ipv6_nexthop_ipv4_random_prefix_ipv4_body()
@@ -1600,6 +1614,7 @@ prefer_ipv6_nexthop_ipv4_random_prefix_ipv6_head()
 {
 	atf_set descr 'prefer-ipv6-nexthop option for an IPv4 prefix with random selection for IPv6 packets'
 	atf_set require.user root
+	atf_set require.progs python3 scapy
 }
 
 prefer_ipv6_nexthop_ipv4_random_prefix_ipv6_body()

From nobody Sat Sep 27 10:59:15 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYkwh66hgz699wj;
	Sat, 27 Sep 2025 10:59:16 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYkwh1Ccvz3Y9N;
	Sat, 27 Sep 2025 10:59:16 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758970756;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=sSZSdOPX+P92DZP2XvHnGMsWNwU+hqMREOp5UsXoCNk=;
	b=jxynCkuWf0OW6+Rc64hZs0Ky08FU/kMJbespmke8VNbM53FNiR2UfLD5PUKbQ0LgOohG8a
	CURln6UpItIjgm5+foc/vL37m5kSD5wMOhocm4wK048svauky3qwT0/biVijvA4rjfV4bZ
	5J4hYFO4Wfv6C8T8wOyEc4Ff/UG49gWmoO2XwGrWvoBEBP6vdpKM95WKXT5QSMlI1G+vV1
	+lKM8SjMQ70GHhZoWt3HbNzFkowrbnXRR8YJv1nVfSeYjj4Ce1fed3iPPTY7Sod09vOBgc
	hmRdV5NlJfDPMVxIkQyC+C62Vx3/zkRoavRVCrbQyZxam6wut3Y86KeZ4AVJ2g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758970756;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=sSZSdOPX+P92DZP2XvHnGMsWNwU+hqMREOp5UsXoCNk=;
	b=KsV/1q7DX1PISFje1SAP15mwh45hB+7IXOth+JEj5vi04tpAN8+ESZ+n3mgI+2aNEfYMNG
	iCz2ecdaDnYpki84tYcfo/2NvGj/rLF9c8BljOvasz0rZ6uIXfoO1sDAT9z4CPaEZ+rGmh
	U7iYITm26ehdaKCxbzx5kckpr7KglwwN4XtdKjQbYQsle88eP1N8NWBg01i4RoRbIWbmjG
	nlTSXBwRR7m/Gc1xw+NfyXL1HdjVlbikYpXAz6k8qpX+3t1C1gMucS6ES/evcdrOy9yKOe
	zfdBte/KaNnGBnE8UIivuJxgeLVqJ4hSssgci2TnALkKmYQZ5fHO/MYNioi80Q==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758970756; a=rsa-sha256; cv=none;
	b=DzFgHqpMcawhWSk9VyXdoib0P0STwm+vsADqcYjMpVKtFJVsMWjRzTP922qkMXpXpP3xx3
	8hB6hvuKjM4t/1rX4L3X+IwJPa2sZ7vsezcshvDzZBpjCClQ1hWRNkyWf2CbO9jz3b8GE5
	I/xRx4zpfnNWE2H7uBoTtrgfgfF+6OIkzd1XOuOOB1jKz58s3C50ATGquZDVE9UtTA9zu1
	KJ7zwMOTkaF/qTcvfMJSS2edFFoGRB7ZpXx9udzBrdaDGiqpfP9z+5YEH5mcCi1a1fcEIn
	29PWx76mL68bhj9L9OxLGL87OVEUAIZ1dj0VW9hEotYMVeBVtNWWs12dlxY0tA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYkwh0ZgbzVs5;
	Sat, 27 Sep 2025 10:59:16 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RAxFXD093457;
	Sat, 27 Sep 2025 10:59:15 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RAxF31093454;
	Sat, 27 Sep 2025 10:59:15 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 10:59:15 GMT
Message-Id: <202509271059.58RAxF31093454@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Jose Luis Duran 
Subject: git: 9c4e33eb359f - stable/14 - cron: Fix comment from
  "root's" to "system" crontab
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: jlduran
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 9c4e33eb359f9fe3f2795d2f29464a616436133e
Auto-Submitted: auto-generated

The branch stable/14 has been updated by jlduran:

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

commit 9c4e33eb359f9fe3f2795d2f29464a616436133e
Author:     Jose Luis Duran 
AuthorDate: 2025-09-13 00:38:48 +0000
Commit:     Jose Luis Duran 
CommitDate: 2025-09-27 10:58:28 +0000

    cron: Fix comment from "root's" to "system" crontab
    
    It is referred to in the documentation as the system crontab, not root's
    crontab.
    
    PR:             289099
    Reviewed by:    emaste
    Approved by:    emaste (mentor)
    Fixes:  d33daab9348a ("Call /etc/crontab the "system crontab", not "root's crontab".  While here, fix some other wording issues")
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D52503
    
    (cherry picked from commit c806defe8fee62c4738f46e555d69b085e8d1259)
---
 usr.sbin/cron/cron/crontab | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr.sbin/cron/cron/crontab b/usr.sbin/cron/cron/crontab
index 2f4bc71d8722..e37d3fd67543 100644
--- a/usr.sbin/cron/cron/crontab
+++ b/usr.sbin/cron/cron/crontab
@@ -1,4 +1,4 @@
-# /etc/crontab - root's crontab for FreeBSD
+# /etc/crontab - system crontab for FreeBSD
 #
 #
 SHELL=/bin/sh

From nobody Sat Sep 27 11:01:42 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYkzW02Pvz69B0B;
	Sat, 27 Sep 2025 11:01:43 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYkzV6TLLz3YP4;
	Sat, 27 Sep 2025 11:01:42 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758970902;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=FI8H80BgsVfcvpYxEMAARR80ms3EI/IKSGu0l9IPQw0=;
	b=s5PAtrq0fMMitRgOrAATm+iI0xGoL+lu9IAhP5jLA1zuEA2qFaRTM3HpZ0Jzw2eYi0vcdY
	MkqF0SeH9xQgA0ifG2BMt5+hNtcwNgVPEQWHTJKCtLtCdtJRH7Afg+4BG9YpQgeGWxnv09
	m0Msz4aYEO8igqM2Hair2y6hcQtyIbW79L6f2YBXg035tlmqovDOImepddWFfiqhN6SMNQ
	LykXjJy6MaUFG5LU4q3FkPhPi1WPiWoGscOhbWt3kAK1xk84UUXjtxUIVnlcrTltMbLZHi
	Tm3qpkvxcMbDCTcAeh4gepUIesw4Cnni+c2LzSNHOAFCEXqS58GpaWkSam9pqg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758970902;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=FI8H80BgsVfcvpYxEMAARR80ms3EI/IKSGu0l9IPQw0=;
	b=TF9zcWKpRjjQEBJjVxah3mlurTLZ3O4HcU4SAtEOnZq/lPzxbjivOOtyM/x0kzUmdqpp6C
	RywX325Jdz3eqxW08jRgWP5ImSDZDBZ0WviNmHprY0Z7Aq4uEZPfzvLbp6i1Wv4ZDsZFHL
	xoPN5JQRp2peC/h2cx9uNpit2WXW62xFipYPqkZ/u3RikCHlY5lQGp4ToRw5TpgskSp035
	zguz4go70M8E+HkzDocYCinTJm1mOEg22LyZm+yzakZ9qA1WPeYLMt8F2cHuOrHTkX+nQ9
	zbUkCw6/TnGOb4nlbxdgk92sST7WbMUlBqudRRqY1o9au6q7LGv4O1SSa1N2iQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758970902; a=rsa-sha256; cv=none;
	b=MZEzMdwwMx8J4cDZhSLi9ey72+vPDheOJVBXVbjJnyrdccfWrgoatNfxniTWzQf58DBp7X
	kfU9zdpsJjG9HUGlT2ZsZtYrYBF2iDaOrTd4shJQCzAppYd9RWdSRctAedrpd11SRHyaOp
	zzOxGc8OEFe2dFdJKLLWF95G/gea8NgLVln6Q/cYPdhO5OrKH+v3Y5JJos9x++PqzJBCEm
	jSEaAsLDmkn+2wGm5nmy68JImhDcsSj9xneGvR9iFX0tRaAgA9XQ65qJwnb1XRDoViPgJr
	hb/bweqSDUn0wlKyxLtcZv5mdihyMXjwZySLFy7nA/5TH/M30hTdg0vPNAjTRQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYkzV5rjFzWnH;
	Sat, 27 Sep 2025 11:01:42 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RB1g5U008697;
	Sat, 27 Sep 2025 11:01:42 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RB1gjx008694;
	Sat, 27 Sep 2025 11:01:42 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 11:01:42 GMT
Message-Id: <202509271101.58RB1gjx008694@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Jose Luis Duran 
Subject: git: 7a5bdaf1d7dd - stable/13 - cron: Fix comment from
  "root's" to "system" crontab
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: jlduran
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/13
X-Git-Reftype: branch
X-Git-Commit: 7a5bdaf1d7dd024c34c53e4eb2baeb2f427df2fa
Auto-Submitted: auto-generated

The branch stable/13 has been updated by jlduran:

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

commit 7a5bdaf1d7dd024c34c53e4eb2baeb2f427df2fa
Author:     Jose Luis Duran 
AuthorDate: 2025-09-13 00:38:48 +0000
Commit:     Jose Luis Duran 
CommitDate: 2025-09-27 11:01:12 +0000

    cron: Fix comment from "root's" to "system" crontab
    
    It is referred to in the documentation as the system crontab, not root's
    crontab.
    
    PR:             289099
    Reviewed by:    emaste
    Approved by:    emaste (mentor)
    Fixes:  d33daab9348a ("Call /etc/crontab the "system crontab", not "root's crontab".  While here, fix some other wording issues")
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D52503
    
    (cherry picked from commit c806defe8fee62c4738f46e555d69b085e8d1259)
---
 usr.sbin/cron/cron/crontab | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr.sbin/cron/cron/crontab b/usr.sbin/cron/cron/crontab
index 2f4bc71d8722..e37d3fd67543 100644
--- a/usr.sbin/cron/cron/crontab
+++ b/usr.sbin/cron/cron/crontab
@@ -1,4 +1,4 @@
-# /etc/crontab - root's crontab for FreeBSD
+# /etc/crontab - system crontab for FreeBSD
 #
 #
 SHELL=/bin/sh

From nobody Sat Sep 27 13:54:05 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYppP1hZpz69MbB;
	Sat, 27 Sep 2025 13:54:05 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYppP1X1kz3rnf;
	Sat, 27 Sep 2025 13:54:05 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758981245;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=sHRDcagtEOZHXdobV7/ZO+TQGRymic4noxlbwzxdr9g=;
	b=EMbWP2Mx+Iy7usCzG2Gko11l8dE2ej+wimRGfhL/t/lRa0YLpCtcoQlIIfsY/H9OsvpUR6
	Is9VGZ9Q1HPxJUUSNRGQnMcpFUMzwC5MbiWYII6ZmsgksN2wGiWs3hN7rFwVy/4/Z+bEEZ
	5pRxhNQuEwHh1IHVTp3jRS3AbT23feojxYl0AmZeMTOPdU5ohbBulBPVEnvjykCPX/CHNa
	rhwZPhCTCaCfOj7kQGCBXePgtTaertCNV1IjREzqSKoSkT76Gtog7y2Uho6lHWvwR6shfv
	EmpDc6XpEB0qHXvoOxUVLgieuF1JYBnNlSzKjkt3Qb2JhOFAaOwZkukrsPEVYw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758981245;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=sHRDcagtEOZHXdobV7/ZO+TQGRymic4noxlbwzxdr9g=;
	b=v8uxqANc+howiLAroL6mO/WBw2OmxlC5S1PnTqW+vg242AgmHDEzalQdYXXa/EHkx4Hep4
	QnWiSWuAZ4Q2BZz4UglnJWoVwwVSZRpwEtTtIqgFMdFIAN62DAY8fhIV31zYgP9PjKvYki
	6keNEpa4cv6FQz3+UD49XC2XBgBD6BCJ/zkpPZlncnCXNBcuFkw7vvKePT3oXHgTWnMIdS
	3oMmMub1Id/jWbQzVmDhcZibirirx/O2cRKQGFCP1j2V4N7C9xalVhEDoY5/hFjiojWqPL
	2Jo030fMlKseLTUxm3lVeKpLjuyaNqER42ucUSjto+EsYm6KQIPqyonH747iBg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758981245; a=rsa-sha256; cv=none;
	b=iu0f4sl0AImA4hj+pcrlJIrTe+4TtLRqJum02DxP6ztvR2/DKQe7Nyn5+61q1gNsfTgjqm
	gZu7cZIoWUChLeXMSrY5Uc4mK/9YcAAdz1ReqMp3Pz3l8Q8+brEEzJecZ74eChumC3nb5/
	yIYjIiv7cZYat9bLtAD9W9syJa8GGrDwsEGe5fZaCcC+lSGqWBVr6dvnzpYbiW930wh56x
	Tx9QOrGF8avbsKFhXuJyJbNqxG9w5cIzS8fOqH1nhuXUNusyqWUvkRJwaxVopHfhiB4EYO
	YdF0qtlKsjDUCC7pk3NicY3K6yYFN+Yvct4eIOYJM09Rz630lvJhF3j9FEQ/eg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYppP0wL2zcsM;
	Sat, 27 Sep 2025 13:54:05 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RDs5QI030217;
	Sat, 27 Sep 2025 13:54:05 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RDs5Bn030214;
	Sat, 27 Sep 2025 13:54:05 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 13:54:05 GMT
Message-Id: <202509271354.58RDs5Bn030214@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Alan Somers 
Subject: git: 8b66d677a99b - stable/14 - ctl: add ATF tests for
  SCSI PERSISTENT RESERVE IN/OUT
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: asomers
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 8b66d677a99be46ddd3b0698e6727f65e8efee7e
Auto-Submitted: auto-generated

The branch stable/14 has been updated by asomers:

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

commit 8b66d677a99be46ddd3b0698e6727f65e8efee7e
Author:     Alan Somers 
AuthorDate: 2024-10-03 21:52:44 +0000
Commit:     Alan Somers 
CommitDate: 2025-09-27 13:53:55 +0000

    ctl: add ATF tests for SCSI PERSISTENT RESERVE IN/OUT
    
    These commands are complicated, and the test suite isn't complete.  But
    it's a start.  And it includes a regression test for HYP-08
    (commit 64b0f52be2c9d7bcecebfeef393f8ec56cb85f47).
    
    Security:       HYP-08
    Sponsored by:   ConnectWise
    Differential Revision: https://reviews.freebsd.org/D46947
    
    (cherry picked from commit ece617cda6b5999e6e57c2227f98c18c1ca1d79d)
---
 tests/sys/cam/ctl/Makefile                  |   6 +
 tests/sys/cam/ctl/persist.sh                | 349 ++++++++++++++++++++++++++++
 tests/sys/cam/ctl/prout_register_huge_cdb.c |  88 +++++++
 3 files changed, 443 insertions(+)

diff --git a/tests/sys/cam/ctl/Makefile b/tests/sys/cam/ctl/Makefile
index 1333397af464..05f0831fc8b0 100644
--- a/tests/sys/cam/ctl/Makefile
+++ b/tests/sys/cam/ctl/Makefile
@@ -1,13 +1,19 @@
 PACKAGE=	tests
 
 TESTSDIR=	${TESTSBASE}/sys/cam/ctl
+BINDIR=${TESTSDIR}
 
 ${PACKAGE}FILES+=	ctl.subr
 
+ATF_TESTS_SH+=	persist
 ATF_TESTS_SH+=	prevent
 ATF_TESTS_SH+=	read_buffer
 ATF_TESTS_SH+=	start_stop_unit
 
+PROGS+=	prout_register_huge_cdb
+LIBADD+=	cam
+CFLAGS+=	-I${SRCTOP}/sys
+
 # Must be exclusive because it disables/enables camsim
 TEST_METADATA+=	is_exclusive="true"
 
diff --git a/tests/sys/cam/ctl/persist.sh b/tests/sys/cam/ctl/persist.sh
new file mode 100644
index 000000000000..2a350ee4775a
--- /dev/null
+++ b/tests/sys/cam/ctl/persist.sh
@@ -0,0 +1,349 @@
+# SPDX-License-Identifier: BSD-2-Clause
+#
+# Copyright (c) 2024 ConnectWise
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS DOCUMENTATION IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+. $(atf_get_srcdir)/ctl.subr
+
+# TODO
+# * PRIN READ RESERVATION, with one reservation
+# * PROUT with illegal type
+# * PROUT REGISTER AND IGNORE EXISTING KEY
+# * PROUT REGISTER AND IGNORE EXISTING KEY with a RESERVATION KEY that isn't registered
+# * PROUT REGISTER AND IGNORE EXISTING KEY to unregister
+# * PROUT CLEAR allows previously prevented medium removal
+# * PROUT PREEMPT
+# * PROUT PREEMPT with a RESERVATION KEY that isn't registered
+# * PROUT PREEMPT_AND_ABORT
+# * PROUT PREEMPT_AND_ABORT with a RESERVATION KEY that isn't registered
+# * PROUT REGISTER AND MOVE
+# * PROUT REGISTER AND MOVE with a RESERVATION KEY that isn't registered
+# * multiple initiators
+
+# Not Tested
+# * PROUT REPLACE LOST RESERVATION (not supported by ctl)
+# * Specify Initiator Ports bit (not supported by ctl)
+# * Activate Persist Through Power Loss bit (not supported by ctl)
+# * All Target Ports bit (not supported by ctl)
+
+RESERVATION_KEY=0xdeadbeef1a7ebabe
+
+atf_test_case prin_read_full_status_empty cleanup
+prin_read_full_status_empty_head()
+{
+	atf_set "descr" "PERSISTENT RESERVATION IN with the READ FULL STATUS service action, with no status descriptors"
+	atf_set "require.user" "root"
+	atf_set "require.progs" sg_persist ctladm
+}
+prin_read_full_status_empty_body()
+{
+	create_ramdisk
+
+	atf_check -o match:"No full status descriptors" sg_persist -ns /dev/$dev
+}
+prin_read_full_status_empty_cleanup()
+{
+	cleanup
+}
+
+atf_test_case prin_read_keys_empty cleanup
+prin_read_keys_empty_head()
+{
+	atf_set "descr" "PERSISTENT RESERVATION IN with the READ KEYS service action, with no registered keys"
+	atf_set "require.user" "root"
+	atf_set "require.progs" sg_persist ctladm
+}
+prin_read_keys_empty_body()
+{
+	create_ramdisk
+
+	atf_check -o match:"there are NO registered reservation keys" sg_persist -nk /dev/$dev
+}
+prin_read_keys_empty_cleanup()
+{
+	cleanup
+}
+
+atf_test_case prin_read_reservation_empty cleanup
+prin_read_reservation_empty_head()
+{
+	atf_set "descr" "PERSISTENT RESERVATION IN with the READ RESERVATION service action, with no reservations"
+	atf_set "require.user" "root"
+	atf_set "require.progs" sg_persist ctladm
+}
+prin_read_reservation_empty_body()
+{
+	create_ramdisk
+
+	atf_check -o match:"there is NO reservation held" sg_persist -nr /dev/$dev
+}
+prin_read_reservation_empty_cleanup()
+{
+	cleanup
+}
+
+atf_test_case prin_report_capabilities cleanup
+prin_report_capabilities_head()
+{
+	atf_set "descr" "PERSISTENT RESERVATION IN with the REPORT CAPABILITIES service action"
+	atf_set "require.user" "root"
+	atf_set "require.progs" sg_persist ctladm
+}
+prin_report_capabilities_body()
+{
+	create_ramdisk
+
+	cat > expected < expected <>
+      scope: LU_SCOPE,  type: Exclusive Access, all registrants
+      Transport Id of initiator:
+        Parallel SCSI initiator SCSI address: 0x1
+        relative port number (of corresponding target): 0x0
+HERE
+	atf_check -o file:expected sg_persist -ns /dev/$dev
+}
+prout_reserve_cleanup()
+{
+	cleanup
+}
+
+atf_test_case prout_reserve_bad_scope cleanup
+prout_reserve_bad_scope_head()
+{
+	atf_set "descr" "PERSISTENT RESERVATION OUT will be rejected with an unknown scope field"
+	atf_set "require.user" "root"
+	atf_set "require.progs" sg_persist camcontrol ctladm
+}
+prout_reserve_bad_scope_body()
+{
+	create_ramdisk
+	# First register a key
+	atf_check sg_persist -n --out --param-rk=0 --param-sark=$RESERVATION_KEY -G /dev/$dev
+
+	# Then make a reservation using that key
+	atf_check -s exit:1 -e match:"ILLEGAL REQUEST asc:24,0 .Invalid field in CDB." camcontrol persist $dev -o reserve -k $RESERVATION_KEY -T read_shared -s 15 -v
+
+	# Finally, check that nothing has been reserved
+	atf_check -o match:"there is NO reservation held" sg_persist -nr /dev/$dev
+}
+prout_reserve_bad_scope_cleanup()
+{
+	cleanup
+}
+
+
+atf_init_test_cases()
+{
+	atf_add_test_case prin_read_full_status_empty
+	atf_add_test_case prin_read_keys_empty
+	atf_add_test_case prin_read_reservation_empty
+	atf_add_test_case prin_report_capabilities
+	atf_add_test_case prout_clear
+	atf_add_test_case prout_register
+	atf_add_test_case prout_register_duplicate
+	atf_add_test_case prout_register_huge_cdb
+	atf_add_test_case prout_register_unregister
+	atf_add_test_case prout_release
+	atf_add_test_case prout_reserve
+	atf_add_test_case prout_reserve_bad_scope
+}
diff --git a/tests/sys/cam/ctl/prout_register_huge_cdb.c b/tests/sys/cam/ctl/prout_register_huge_cdb.c
new file mode 100644
index 000000000000..951da0628830
--- /dev/null
+++ b/tests/sys/cam/ctl/prout_register_huge_cdb.c
@@ -0,0 +1,88 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2024 ConnectWise
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS DOCUMENTATION IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Helper that sends a PERSISTENT RESERVATION OUT command to CTL with a
+ * ridiculously huge size for the length of the CDB.  This is not possible with
+ * ctladm, for good reason.
+ */
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+int
+main(int argc, char **argv)
+{
+	union ctl_io *io;
+	int fd = open("/dev/cam/ctl", O_RDWR);
+	int r;
+	uint32_t targ_port;
+
+	if (argc < 2)
+		errx(2, "usage: prout_register_huge_cdb \n");
+
+	targ_port = strtoul(argv[1], NULL, 10);
+
+	io = calloc(1, sizeof(*io));
+	io->io_hdr.nexus.initid = 7;	/* 7 is ctladm's default initiator id */
+	io->io_hdr.nexus.targ_port = targ_port;
+	io->io_hdr.nexus.targ_mapped_lun = 0;
+	io->io_hdr.nexus.targ_lun = 0;
+	io->io_hdr.io_type = CTL_IO_SCSI;
+	io->taskio.tag_type = CTL_TAG_UNTAGGED;
+	uint8_t cdb[32] = {};
+	// ctl_persistent_reserve_out// 5f 00
+	cdb[0] = 0x5f;
+	cdb[1] = 0x00;
+	struct scsi_per_res_out *cdb_ = ( struct scsi_per_res_out *)cdb;
+	// Claim an enormous size of the CDB, but don't actually alloc it all.
+	cdb_->length[0] = 0xff;
+	cdb_->length[1] = 0xff;
+	cdb_->length[2] = 0xff;
+	cdb_->length[3] = 0xff;
+	io->scsiio.cdb_len = sizeof(cdb);
+	memcpy(io->scsiio.cdb, cdb, sizeof(cdb));
+	io->io_hdr.flags |= CTL_FLAG_DATA_IN;
+	r = ioctl(fd, CTL_IO, io);
+	if (r == -1)
+		err(1, "ioctl");
+	if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) {
+		return (0);
+	} else {
+		return (1);
+	}
+}

From nobody Sat Sep 27 14:02:15 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYpzq4kH3z69Myl;
	Sat, 27 Sep 2025 14:02:15 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYpzq23Z6z3sXl;
	Sat, 27 Sep 2025 14:02:15 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758981735;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Yb8NM3xMLF0RtGgWgXRGRx3YKSa/3PVi8C01OaX3FYM=;
	b=es8MQf1WP/tOoytZa89RwMuNd4AxFhE8T5IBm7L3wi8td3wlpcs4RrxE7uzGYGH6ZpWAEp
	u5f3QRYJTPKg2km46rFnWiU9RRBBW+WPpfYf/eFU1YKByozSDBEgRAiqpQIQx4NpcAh92z
	uLWLagyOaOEXjRRo2aH0fZZUA7QFcpdrTtgNf8Fo6AvTGTv56AUHsyQy7EUjFZDpqEuIC4
	RImgYWovrJWtwjLlgd8xm/dq7opNm90N/fRqkMxa/Xi+TkRIDnhcnoc/leDi1ROJYlphmC
	vW68+AhRc0jYhkC1VuExAVe6TJg5KPEU3wz3mnH9wL2jTC0ojskTBzvdntVBBQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758981735;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Yb8NM3xMLF0RtGgWgXRGRx3YKSa/3PVi8C01OaX3FYM=;
	b=pNzqSCvRV40LM/z4+7bEprSoxIp8TfXbhi+GNgap3Rd6DjW5mthJ6e5U5mTwTw9hA4qird
	Yz+PRX8sTTE0SCjJ0Zs4jtzwx2poP3TmGHSYg5n7U/sKECxX8aXMgsohWt4rBRCgqPi29n
	ek8BGVTM3A3npoj/OYWQ4pQvrBVDa6x2BDJ3S8NRneLESlSQmYSxWw4X8d6Ud+iAfoQm/e
	vygjPeDxk+zN72Dj1uSEwmA6veGUiz0hOYLcAz8xW7GZLywMJOdtsU3MrGKhcHfasv6f7X
	UrN1KCJqdoHYzqiZ6pRaPBZAhs1I8I4RUm8sBEl49oi4OxeagXn3W2fYxZ/KoA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758981735; a=rsa-sha256; cv=none;
	b=aKVfCpc4w/FDiYOvK5Eh+ip8f6tMo+hC0ebhD7OfQglNc5TMVibAS1Kv/0rgCjcNekTK61
	2chF7eS+dR+ykoV+FHbCxnGdi2iRUAMogj/QBAJh4W+Qu+1KnZu4yWAPf8LS/mighXRXHV
	4a1Vgk3QGQo4kMFEL4JXofoSfw3AtMiUvK3IeNGax/fUzkWYqq3Ycd8fknTxXGlyN+7xfq
	RgxezDeYMKBgCGoaZHuhNQZyxoCXT5R4gJRHiie1wNLHmxJgQv1J4NUn15PuCmZ7oXGP/8
	YxqTnLBqc/t3BVIMgvh5FmizUACZppTFt3kiUau+dI1mpGRFsTlZS+WLlWXpMQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYpzq1NJXzd4m;
	Sat, 27 Sep 2025 14:02:15 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RE2F1w049488;
	Sat, 27 Sep 2025 14:02:15 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RE2F54049485;
	Sat, 27 Sep 2025 14:02:15 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 14:02:15 GMT
Message-Id: <202509271402.58RE2F54049485@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: 032918dfd155 - stable/15 - tcp: Add CTLFLAG_VNET flag
  to some sysctls
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: 032918dfd155936a79847f17ac355439e6b59027
Auto-Submitted: auto-generated

The branch stable/15 has been updated by zlei:

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

commit 032918dfd155936a79847f17ac355439e6b59027
Author:     Zhenlei Huang 
AuthorDate: 2025-09-24 01:16:13 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 14:00:56 +0000

    tcp: Add CTLFLAG_VNET flag to some sysctls
    
    The two sysctls net.inet.tcp.hostcache.list and net.inet.tcp.hostcache.histo
    are readonly and are to operate hostcache of vnet jails. Add CTLFLAG_VNET
    flag to them since they are per-vnet sysctls.
    
    This change does not have any impact on reading the two sysctls, but
    `sysctl -ANV net.inet.tcp.hostcache` will report them correctly.
    
    Reviewed by:    tuexen, #transport, #network
    MFC after:      3 days
    Differential Revision:  https://reviews.freebsd.org/D52693
    
    (cherry picked from commit b1f96169cfb50a7b65aee115b2c9ad2f00797bbf)
---
 sys/netinet/tcp_hostcache.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c
index 36a4f813d590..df639876a85c 100644
--- a/sys/netinet/tcp_hostcache.c
+++ b/sys/netinet/tcp_hostcache.c
@@ -192,12 +192,12 @@ SYSCTL_INT(_net_inet_tcp_hostcache, OID_AUTO, purge, CTLFLAG_VNET | CTLFLAG_RW,
     "Expire all entries on next purge run");
 
 SYSCTL_PROC(_net_inet_tcp_hostcache, OID_AUTO, list,
-    CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_MPSAFE,
+    CTLFLAG_VNET | CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_MPSAFE,
     0, 0, sysctl_tcp_hc_list, "A",
     "List of all hostcache entries");
 
 SYSCTL_PROC(_net_inet_tcp_hostcache, OID_AUTO, histo,
-    CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_MPSAFE,
+    CTLFLAG_VNET | CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_MPSAFE,
     0, 0, sysctl_tcp_hc_histo, "A",
     "Print a histogram of hostcache hashbucket utilization");
 

From nobody Sat Sep 27 14:02:14 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYpzp2ph3z69Mqy;
	Sat, 27 Sep 2025 14:02:14 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYpzp1bc8z3scs;
	Sat, 27 Sep 2025 14:02:14 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758981734;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=+WtHzH5KC5gCjzcz7rI1mk2mSXVNLf2729hdy7Q58fQ=;
	b=GTh+Cqzvcf7L/vxRGsSz8782C25xIiRCcX8gt+ii7jjIAYiCcZY4u+aqbAmuPGhHDk+DZm
	+JHsdE5yUpSl7Jl/+idj591fvIBV9mf5rzQicUgP1rfcOfFnKn9MLMuhe8Ib6+jjePThSy
	RUsSlhGq8inEZi4hetTK1s7P9vaFWeTz2AC7PiR7fdkv0y/y6JG5gvaT/uxpnzEg+Zb1wM
	4jOeRACvgB7ZvKGB6HcQDtgiElIRMbOdPYc5ruQJlgXk3Hy2WOYllgLhF7nv7X80WYRTuD
	qS6mdyPO40uBrLY0aN1O5fF3N3+XLIzpUV1xr1T0TSGHl25KBtiq9z/O/Y6X5w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758981734;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=+WtHzH5KC5gCjzcz7rI1mk2mSXVNLf2729hdy7Q58fQ=;
	b=xYtDNAp+/k0oOHzkYfld5OX2JpF+b0nX1aSZZma/l9pj3DCCEZk9Ic2hWttBimdMbZLmtf
	A8jazHbeoRkzFZni5c8QdlUfulctDBfzxbq7ozoWcRjE/KKm85EivtHYbppZsioIcQBVAV
	LOH0avYb0A8ADdOxdkmnc7g1cuWF2OW+tkrEaSFeE6/fCaT+CYgsrwYCw6skQ1e+6GQ2dP
	jyvlEsDXIlWO7R5r2ak2xhh3Tk/TF5HNdkcLP/4J9vVjzEYssg637ngUAyGoX2wVzRjl4x
	7Cnw/ZvWZFrXFx29rTXS90/G3CYoP4h5wz0NjYuswhfjc5WOdfKG0Q+BhTDyzg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758981734; a=rsa-sha256; cv=none;
	b=bk/bkS8QA6wCRcRsuFp3AcORFmSeZ0yeGm2ZtF55NRQ4kymVeCxGoLbUcHrRHstw1MFeOU
	E8ON18vP3DbAxQ+0bp0NuzEWn27lqwBlzLADl9dzFKOZYGJKGLyAnhgTe7//3PaqA9n5Ut
	AIUiQRZACUhZXERfpm+pydxAutYOvxZ+0bGfsIB0oYc1DX5prx/JBxv3X9auWYX2jzZqmz
	sQ9evPR3Dn9LEsYCby2SKmDphVjo0s7r5PXG4a/dQ6qO7/6UHt1FPhXm8nC3oDRGyFd1K2
	0CiSHIXK5IFAnMIeq9zUOyvIX5GXOHIiVdoCxj393pFtrw2fEfc38+GLFZBwDg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYpzp1BYzzdLB;
	Sat, 27 Sep 2025 14:02:14 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RE2EiI049456;
	Sat, 27 Sep 2025 14:02:14 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RE2E7b049453;
	Sat, 27 Sep 2025 14:02:14 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 14:02:14 GMT
Message-Id: <202509271402.58RE2E7b049453@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: fa30199a3dbf - stable/15 - tcp: Fix expiring and
  purging hostcache entries of vnet jails
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/15
X-Git-Reftype: branch
X-Git-Commit: fa30199a3dbfe1d4994e7e4e63ad9c582c6f8a1a
Auto-Submitted: auto-generated

The branch stable/15 has been updated by zlei:

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

commit fa30199a3dbfe1d4994e7e4e63ad9c582c6f8a1a
Author:     Zhenlei Huang 
AuthorDate: 2025-09-24 01:16:13 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 14:00:56 +0000

    tcp: Fix expiring and purging hostcache entries of vnet jails
    
    A jailed process, `sysctl -j foo` or `jexec foo sysctl`, do not have
    privilege to write to non-vnet sysctls but only to those marked as jail
    writable, aka sysctls those marked with CTLFLAG_VNET flag.
    
    Without this change we will get EPERM when trying to expire and purge
    hostcache entries of vnet jails via the net.inet.tcp.hostcache.purgenow
    sysctl. Fix that by adding a CTLFLAG_VNET flag.
    
    Reviewed by:    tuexen, #transport, #network
    Fixes:  264563806496 Add a new sysctl net.inet.tcp.hostcache.purgenow=1 to expire ...
    MFC after:      3 days
    Differential Revision:  https://reviews.freebsd.org/D52692
    
    (cherry picked from commit 33ceb31e256e386da5a42cc7ca2ef8d4b81b6eda)
---
 sys/netinet/tcp_hostcache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c
index dbc966acc56b..36a4f813d590 100644
--- a/sys/netinet/tcp_hostcache.c
+++ b/sys/netinet/tcp_hostcache.c
@@ -202,7 +202,7 @@ SYSCTL_PROC(_net_inet_tcp_hostcache, OID_AUTO, histo,
     "Print a histogram of hostcache hashbucket utilization");
 
 SYSCTL_PROC(_net_inet_tcp_hostcache, OID_AUTO, purgenow,
-    CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE,
+    CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE,
     NULL, 0, sysctl_tcp_hc_purgenow, "I",
     "Immediately purge all entries");
 

From nobody Sat Sep 27 14:19:18 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYqMV4cgnz69Nxx;
	Sat, 27 Sep 2025 14:19:18 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYqMV3wjXz3vF2;
	Sat, 27 Sep 2025 14:19:18 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758982758;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=yb4SrMcioGgdlDEsvm4MSiTqqqyqWyCzU0P/ceVbYjw=;
	b=ZJHPY8MZnvekd1m8gmtV79r513geT2OS5APCowyG1itCRHikON7hywIRA5JdcR3E6bL88y
	6bmo2hqrdmG8qXT5XzENbXQinEiObmIpFI5VhQNeGmEs/W3wDuwjCIk4pIRCHrw9Gpx4DV
	+KTwcvSUtF7fMboB44KZJh1dsVxIq+tA7NIciuLnEf8VG/7sEO1GcVIrGybAij1fmwOVuT
	GCGH9zy8GY6TO6UPVTEVHKswnhva80NvYa3pGZPJt0mutvdfFtmC2ppH8y3fPE8Hg3B7q2
	AvXrgr1Pt/b4TisM79kSXgGbPEDfdfEsAuYiERMGq32zbhpjuybkB7rsikV25g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758982758;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=yb4SrMcioGgdlDEsvm4MSiTqqqyqWyCzU0P/ceVbYjw=;
	b=CL8y/3ktRmjZon0Q0AAJDu3K4AXj9tjS4lrjZVuU/0IHsSmJNF80qTeJalVJP8EaqgxgxM
	x1M45r1hQ00xRJ94lYTwUty8ehWi0UHBA3qKIw8XuSAK2XRmSF2vU/jLRupIag/2Ac4QmI
	ul2M7/s4QYPy7Zpd27NLK9Aml5KOQQ7ScL2k4hNg7/OwkMMzC7blrUOCiEu/hsLT3oMIFb
	n+eCCVx746FHoDDzmeqMMBLOKGO4JkP5qA4K/zWwO4bEQOCC0E/9ZhDPg5Bh5xut0sYsB6
	SKJa7PVW8SQVwKVkcvL0z2AHGgnWxBpRSMEI+nSta9Rp1l23C1qTosm8DIKK0g==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758982758; a=rsa-sha256; cv=none;
	b=DW4vgng6+i8p6f2Qx4h+x0DJqZEI7r4aUS9Vyu3EC8cm0NOV30jvpjpjmc8mxt9vXMslzw
	X2i8KYqNZX6A26tDnzfW3x0gyR/XuqRP8wzQVY6C6VWZE9yKDNChLyi3XFxfvCuCm+o/cx
	vtlBkwD/AT7oMtiLnOIYdcdWXjhf82tXcv7DCJqcyrHnMUHRl+4Jvw7TR2NoMglPY1i7dt
	a12aVqGw7yo7+86qajlVwQxiUH8nmQ4sAjoQRCoBmXm14Sz8JRYs8nfFwYtcB3nNnXgnJt
	bo2E+tx4sz8vb46jTmeerdLnTYBh5W+9aLJPJBFfYwCDkoCYf2saDwQF1lKSXQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYqMV37wpzd75;
	Sat, 27 Sep 2025 14:19:18 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58REJIjl070473;
	Sat, 27 Sep 2025 14:19:18 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58REJIOV070470;
	Sat, 27 Sep 2025 14:19:18 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 14:19:18 GMT
Message-Id: <202509271419.58REJIOV070470@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Alan Somers 
Subject: git: 931274f70d08 - stable/14 - fusefs: report that all
  tests require the fusefs kernel module
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: asomers
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 931274f70d082b13e62f61eb51d78694946e4e5f
Auto-Submitted: auto-generated

The branch stable/14 has been updated by asomers:

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

commit 931274f70d082b13e62f61eb51d78694946e4e5f
Author:     Alan Somers 
AuthorDate: 2025-07-22 16:35:03 +0000
Commit:     Alan Somers 
CommitDate: 2025-09-27 14:16:10 +0000

    fusefs: report that all tests require the fusefs kernel module
    
    Previously the googletest tests would skip themselves if /dev/fuse could
    not be found.  But that information would not be passed to Kyua.
    Instead it would think that they had passed.  Also, the atf-sh test
    would previously fail if the fusefs module weren't loaded.  Now both
    tests will correctly report their requirements to Kyua.
    
    Note that fusefs's googletest tests still require that the
    mac_bsdextended(4) module _not_ be loaded, but Kyua has no way to report
    such a requirement.
    
    Sponsored by:   ConnectWise
    Reviewed by:    Siva Mahadevan 
    Pull Request:   https://github.com/freebsd/freebsd-src/pull/1782
    
    (cherry picked from commit 2662fd6a487bb505cf1667e4cc3436b36f7e9d4e)
---
 tests/sys/fs/fusefs/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/sys/fs/fusefs/Makefile b/tests/sys/fs/fusefs/Makefile
index 9e2065be434a..2b7e2c805583 100644
--- a/tests/sys/fs/fusefs/Makefile
+++ b/tests/sys/fs/fusefs/Makefile
@@ -73,7 +73,8 @@ TEST_METADATA.nfs+=	required_user="root"
 TEST_METADATA.ctl+=	is_exclusive="true"
 TEST_METADATA.ctl+=	required_user="root"
 
-TEST_METADATA+= timeout=10
+TEST_METADATA+=	timeout=10
+TEST_METADATA+=	required_kmods="fusefs"
 
 FUSEFS=		${SRCTOP}/sys/fs/fuse
 MOUNT=		${SRCTOP}/sbin/mount

From nobody Sat Sep 27 14:24:05 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYqT13Z25z69Nx3;
	Sat, 27 Sep 2025 14:24:05 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYqT12cFnz3vbV;
	Sat, 27 Sep 2025 14:24:05 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758983045;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=vGdIS92YYiydmxkvNN9JDW3jq+Q5S7UjFgDLPPp0WoI=;
	b=s2vTmm++Rhfg17bC89oKocz1PACEwt4PSMIZ26uyS5ecDt0X5dcEv4uSb7EAiN/Yn6/xvC
	t3zbDNGleRWZG6HMOjSw/snViY1zHygThjD1Z6OhrQRESp1GwVP1SOEMZYLrpzm23188d8
	Idgfc1Fcwotum3y5q+IyYnvqvao/sqodvd3aF78KYXXQvMFseAnMC/WsM7P7D9PH7DuhWe
	XsXd5ufJZdCPeI4EHggvfy1Jvgs7OYlGcyL3wz/LoiPBP0WyxSKkrJCotEPTNh9G/I7dcg
	GiBy5QI+PrL4rYWIPmw3tQmgi4btAVb0sHzaOL98/iD0AA2QrEw41c4M6OLRdA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758983045;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=vGdIS92YYiydmxkvNN9JDW3jq+Q5S7UjFgDLPPp0WoI=;
	b=LfN7EonbDkOAKknFUdrZKqXW8RaQzm23qR5bjiEMgDFdgjId6j/sK4fL5uTo9CrwP/iIQJ
	nMmLOyfQhQjvGsl6al2cxefKryQq0Itc1jk/CltXAOCflCG1XbhJJgZtwoEnWMBhX2ogLo
	/39XvjRy3lidjimmYu/r36HrwjVF4bWcjfp2uuC7Frv+SJXFb+X9BtbuU3Dqtsm3TTkT+o
	OfSyDMaXXyjM9KY4k8lX/SrWOVHh8rLbYfA+DVarzxdkB79CBYGUMzCcF5zDAjd6AQDT4S
	ePOcgg823PaXP8fmdxvJQNjBgxVXUILYF6dtikyBeKaL+cS22H7ZtdpBTdo2dA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758983045; a=rsa-sha256; cv=none;
	b=viu1NiQlOsq89RnhnyouzD680TWUSBKxy8rpGVRDwJUZ3EKHyEeBqB3ECq+YknS6vgSJUj
	zGZS57ZkRYGNB0/MbX5KAJWWcMZQjMoqay/xnZHlHoJTjkxECaZufRwWVwfZALDhzqASXU
	jXIm5KyOw7vM49ldxE19tA3sHwo/g5iBbvu/sUoxC+/N1hHFNQZLTof3DCximL85UChSdR
	8KKugPoaQ9oFiTaxfZ/bNC/7LFhs5m/fmP7DPNZrRPdidf0xnSCNPxff0A6sFkHFXIrH72
	aDyUhiCFgx096B5BQIG6W6EqCETPizx6o6se9oyuB1u23hA8UYAGghj5Nx3amQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYqT124SRzdrt;
	Sat, 27 Sep 2025 14:24:05 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58REO5gh087588;
	Sat, 27 Sep 2025 14:24:05 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58REO5L2087585;
	Sat, 27 Sep 2025 14:24:05 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 14:24:05 GMT
Message-Id: <202509271424.58REO5L2087585@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Alan Somers 
Subject: git: e39e892969cb - stable/14 - ctl: delete dead code in
  the tests
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: asomers
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: e39e892969cb18531fbfa152795c96e1f7da1f08
Auto-Submitted: auto-generated

The branch stable/14 has been updated by asomers:

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

commit e39e892969cb18531fbfa152795c96e1f7da1f08
Author:     Alan Somers 
AuthorDate: 2025-07-22 22:55:40 +0000
Commit:     Alan Somers 
CommitDate: 2025-09-27 14:19:56 +0000

    ctl: delete dead code in the tests
    
    This function has always been dead.  It isn't needed, since ctladm will
    automatically load the module, if needed.
    
    Sponsored by:   ConnectWise
    
    (cherry picked from commit d3c9f62862e4e76acec581a2e2c0aa05d7145e24)
---
 tests/sys/cam/ctl/ctl.subr | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/tests/sys/cam/ctl/ctl.subr b/tests/sys/cam/ctl/ctl.subr
index 5da441b806f0..6cc02d774bdb 100644
--- a/tests/sys/cam/ctl/ctl.subr
+++ b/tests/sys/cam/ctl/ctl.subr
@@ -25,15 +25,6 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-load_modules() {
-	if ! kldstat -q -m ctl; then
-		kldload ctl || atf_skip "could not load ctl kernel mod"
-	fi
-	if ! ctladm port -o on -p 0; then
-		atf_skip "could not enable the camsim frontend"
-	fi
-}
-
 find_device() {
 	LUN=$1
 

From nobody Sat Sep 27 14:24:06 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYqT25r9vz69P0Q;
	Sat, 27 Sep 2025 14:24:06 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYqT24Pxxz3vpt;
	Sat, 27 Sep 2025 14:24:06 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758983046;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=1Vy+1jU0moeDiLrp350FYdmt+hQmfgZBd/DOoyCkP1w=;
	b=rprzlEY3BVf8TO+jnOHoz3UQR4kfEBohKW9cOGYVwkVb+K+oMLry1VLa4Cll3f+pY/LBSz
	fRUgSlYRvGY+GxiPn8ZL1We+7Vlqn3ZUCuTfNU6HJtAGer0q2EaGDBJ7FMc9IMO9tBCU0Z
	Ck71Tk+YtSQM7t8MNOZP8WcFjjlnLawo8/i4ocBHeTvF6fyYvSvDu5AvmziHuBk1OE0xsL
	Z2bZHCtVYHI/VE0nZEhhm8QUfD17kkwRaJKCuh67Ae8JikuhA7Q0U+ZSlPXEYuGNBVcoAD
	Uof/o+H5Uygd6yFF1gVCLVkJp9wtnJZapGxfvGm5nH7WbFpISSa7S+peNTQ0eA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758983046;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=1Vy+1jU0moeDiLrp350FYdmt+hQmfgZBd/DOoyCkP1w=;
	b=xtQYey6jwF4C7jopGGMl61HZx7bn76+5izH+J+wbNtMwIIfZklNSe4ktY448JZvDL1b8/a
	4iCNVUaaxe+mMsSFaA/oSSFayJOXjz1sK4qIgWQImRVr9y88DJKNGjpMFKC9EMqRjTKfen
	6a0H6miZisJ3F/9QJVAGDALUNGGOkiZgyjPDucaaceKDPB4VkO1tGuPe95wDpvjhgN5dEC
	JNdjKedngQvJoZemvN6wqNYkA+jrNCoGD0VlZePO4uXmQ7W9YM/8CDxEsQF5sM2r+Fu1u9
	E9kaOZ74tDmn+RXCSkBqf9p/D1j250dwmvtCvKVkzTZ6IvTu6l4ThsvMbFM42w==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758983046; a=rsa-sha256; cv=none;
	b=dos5zLIVBA7MVCzgceOFZjrTLNkhl8sy532NtW6fttRlBOmSylRiqDRVG/QF4JD0//PIyJ
	DBTtEtxHQVmP2XSSS3/zRsZYU1fqiKtT/9cpr3Zmu2MBdL2RwkKqiLDfR3AtJQ7ybDAFSi
	c0/pql0JqsvXR3sfOACjJXOpipP9T1vYPtLJumH6LusWEWqRrLcixZHWLUZciq1FnKJhYK
	QztdXQCf36KE+4g9jgYaqwbvNL/VwLZTqCT+OHSB1PpzkUUUR0ZtFQnXnT0n9/Jx5CpoXw
	DeZGgd+KpdTbNy3yGXuDCsUY+4dxxxWp6rPjjAboUmoLtROiAAtzU/p+dNPl5g==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYqT232BXzcY0;
	Sat, 27 Sep 2025 14:24:06 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58REO6Aq087621;
	Sat, 27 Sep 2025 14:24:06 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58REO6vu087618;
	Sat, 27 Sep 2025 14:24:06 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 14:24:06 GMT
Message-Id: <202509271424.58REO6vu087618@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Alan Somers 
Subject: git: 872d4fb51ef4 - stable/14 - ctladm: skip the tests if
  ctladm is missing
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: asomers
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 872d4fb51ef4d885302a0802101964787e02c2b5
Auto-Submitted: auto-generated

The branch stable/14 has been updated by asomers:

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

commit 872d4fb51ef4d885302a0802101964787e02c2b5
Author:     Olivier Cochard 
AuthorDate: 2025-06-29 00:26:13 +0000
Commit:     Alan Somers 
CommitDate: 2025-09-27 14:21:19 +0000

    ctladm: skip the tests if ctladm is missing
    
    Reviewed by:    asomers
    Sponsored by:   Netflix
    Differential Revision:  https://reviews.freebsd.org/D51081
    
    (cherry picked from commit 582f787e2a5c3114819dfaa4611cb4762716f0a1)
---
 usr.sbin/ctladm/tests/port.sh | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/usr.sbin/ctladm/tests/port.sh b/usr.sbin/ctladm/tests/port.sh
index a9ff609d3f4c..5bc5d879c983 100644
--- a/usr.sbin/ctladm/tests/port.sh
+++ b/usr.sbin/ctladm/tests/port.sh
@@ -73,6 +73,7 @@ create_ioctl_head()
 {
 	atf_set "descr" "ctladm can create a new ioctl port"
 	atf_set "require.user" "root"
+	atf_set "require.progs" ctladm
 }
 create_ioctl_body()
 {
@@ -96,6 +97,7 @@ remove_ioctl_without_required_args_head()
 {
 	atf_set "descr" "ctladm will gracefully fail to remove an ioctl target if required arguments are missing"
 	atf_set "require.user" "root"
+	atf_set "require.progs" ctladm
 }
 remove_ioctl_without_required_args_body()
 {
@@ -115,6 +117,7 @@ create_iscsi_head()
 {
 	atf_set "descr" "ctladm can create a new iscsi port"
 	atf_set "require.user" "root"
+	atf_set "require.progs" ctladm
 }
 create_iscsi_body()
 {
@@ -142,6 +145,7 @@ create_iscsi_alias_head()
 {
 	atf_set "descr" "ctladm can create a new iscsi port with a target alias"
 	atf_set "require.user" "root"
+	atf_set "require.progs" ctladm
 }
 create_iscsi_alias_body()
 {
@@ -168,6 +172,7 @@ create_iscsi_without_required_args_head()
 {
 	atf_set "descr" "ctladm will gracefully fail to create an iSCSI target if required arguments are missing"
 	atf_set "require.user" "root"
+	atf_set "require.progs" ctladm
 }
 create_iscsi_without_required_args_body()
 {
@@ -184,6 +189,7 @@ create_ioctl_options_head()
 {
 	atf_set "descr" "ctladm can set options when creating a new ioctl port"
 	atf_set "require.user" "root"
+	atf_set "require.progs" ctladm
 }
 create_ioctl_options_body()
 {
@@ -211,6 +217,7 @@ disable_ioctl_head()
 {
 	atf_set "descr" "ctladm can disable an ioctl port"
 	atf_set "require.user" "root"
+	atf_set "require.progs" ctladm
 }
 disable_ioctl_body()
 {
@@ -232,6 +239,7 @@ enable_ioctl_head()
 {
 	atf_set "descr" "ctladm can enable an ioctl port"
 	atf_set "require.user" "root"
+	atf_set "require.progs" ctladm
 }
 enable_ioctl_body()
 {
@@ -254,6 +262,7 @@ remove_ioctl_head()
 {
 	atf_set "descr" "ctladm can remove an ioctl port"
 	atf_set "require.user" "root"
+	atf_set "require.progs" ctladm
 }
 remove_ioctl_body()
 {
@@ -278,6 +287,7 @@ remove_iscsi_head()
 {
 	atf_set "descr" "ctladm can remove an iscsi port"
 	atf_set "require.user" "root"
+	atf_set "require.progs" ctladm
 }
 remove_iscsi_body()
 {
@@ -303,6 +313,7 @@ remove_iscsi_without_required_args_head()
 {
 	atf_set "descr" "ctladm will gracefully fail to remove an iSCSI target if required arguments are missing"
 	atf_set "require.user" "root"
+	atf_set "require.progs" ctladm
 }
 remove_iscsi_without_required_args_body()
 {

From nobody Sat Sep 27 14:24:07 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYqT4086Xz69P0V;
	Sat, 27 Sep 2025 14:24:08 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYqT34txwz3vdy;
	Sat, 27 Sep 2025 14:24:07 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758983047;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=+wcV5Wqc7bmXgTcTdqDOuJK6qxlgAuMnvRNQhtUSCU0=;
	b=QNe6OyjyJuiJ1vC/pV8MHkA/WhczJS6+JaCJq9huEhGhO4SmnDN1m3cKSYsWuFgjCq7v0v
	Vit5EWNOJeg+0QNHB7P9im7jMl2KgFNObrEztSWYWeF/L+jOH4VYeXDRjL7KvjyxuwaNzQ
	WPQA4HmXk4rbv3n5F+z1ylWbdLQ53F7awlivqykebgeImrhDF+y8rC6zba24bscGMCmJlV
	d04YY1PE8vniXoiFTsNCxc8OcO/jmA0Ja15EYflVTcksCIDMBSmxiT6fjVq8xWoxZuDbfp
	lBTORnhwcl2p4JGUoafgh0NuZI1Q1VT7hnewIFUBkbyMfAdelQu0BmyW/fbuzw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758983047;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=+wcV5Wqc7bmXgTcTdqDOuJK6qxlgAuMnvRNQhtUSCU0=;
	b=T2zXXyZKUeZAXU+T/+t0IPrBmdDkSYEYGOAccmzM9B1rdsBA5L++nmcBknihBhmMShWP/o
	zoB/RlCzXLrjZZ8Fz5YfEL+NV530rQutzcC5hpIyW89+kF5c9x2fzDXQXcnGdtZZtScxgV
	0eC95WQzfM/GmhsrwLshJvAH4hv1K54GqdMtcEc+MqLkjpmiDVbi7ZHwMtIKQ6KBHiN2E9
	M18Lc+M6d0c+Cf96oo0NWbVC1fo9We28WQvN7dUd9UktJTbTujyBgOQFNLv8XG/QfNgW9C
	4SoKPEiKz+PqbPzSTTQGe53KsZXmyp8iVziaM6/WKO5x3JQYbeBPH5b6VeFxGA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758983047; a=rsa-sha256; cv=none;
	b=lJOnlYIkcl6E+hetxKVbgktODbx91FUhu6JCr6hZN68Pu6zGZhT9Hs2y7Zs20qx7k9m9l3
	d5lc+zoInIdK1sWVfE+Yx0HmyDXGMgDnzbfNfupx7/Nr80IvxdwtsZF5sHvF8NfP2W1zFM
	lZ4325inNqzko4V+b3xpbD1GbXg9bxHRhlRei2H8+0WKxwvpmjU6Cad+K1iTUiOC12SJfS
	kVFI6oJpjgdwQ7eulT42l5S2PPb0JDvP9lCwAjj5cgK6p72RfAUTAUYFaERh4FCCbIQZh+
	h9X8LkYhJDdywm3bL5bE3WV5fuVgBaNESKen4lnzroURyrcXTltE7Da+7/91Sw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYqT340hMzdSh;
	Sat, 27 Sep 2025 14:24:07 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58REO7U2087654;
	Sat, 27 Sep 2025 14:24:07 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58REO7RJ087651;
	Sat, 27 Sep 2025 14:24:07 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 14:24:07 GMT
Message-Id: <202509271424.58REO7RJ087651@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Alan Somers 
Subject: git: e1deeea6c173 - stable/14 - ctladm: Use require.kmods
  for cfiscsi
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: asomers
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: e1deeea6c1737d26c9160d1112138137292082e5
Auto-Submitted: auto-generated

The branch stable/14 has been updated by asomers:

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

commit e1deeea6c1737d26c9160d1112138137292082e5
Author:     Alan Somers 
AuthorDate: 2025-07-22 23:31:06 +0000
Commit:     Alan Somers 
CommitDate: 2025-09-27 14:21:30 +0000

    ctladm: Use require.kmods for cfiscsi
    
    Use the standard require.kmods ATF variable instead of ad-hoc code to
    load the cfiscsi kernel module.
    
    Sponsored by:   ConnectWise
    Reviewed by:    imp, Siva Mahadevan 
    Pull Request:   https://github.com/freebsd/freebsd-src/pull/1784
    
    (cherry picked from commit 863dc799f74306e18625e29a7522c2fe72533a89)
---
 usr.sbin/ctladm/tests/port.sh | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/usr.sbin/ctladm/tests/port.sh b/usr.sbin/ctladm/tests/port.sh
index 5bc5d879c983..d966529a85ae 100644
--- a/usr.sbin/ctladm/tests/port.sh
+++ b/usr.sbin/ctladm/tests/port.sh
@@ -38,12 +38,6 @@
 # PGTAG,TARGET pair must be globally unique.
 PGTAG=30257
 
-load_cfiscsi() {
-	if ! kldstat -q -m cfiscsi; then
-		kldload cfiscsi || atf_skip "could not load cfscsi kernel mod"
-	fi
-}
-
 skip_if_ctld() {
 	if service ctld onestatus > /dev/null; then
 		# If ctld is running on this server, let's not interfere.
@@ -118,11 +112,11 @@ create_iscsi_head()
 	atf_set "descr" "ctladm can create a new iscsi port"
 	atf_set "require.user" "root"
 	atf_set "require.progs" ctladm
+	atf_set "require.kmods" "cfiscsi"
 }
 create_iscsi_body()
 {
 	skip_if_ctld
-	load_cfiscsi
 
 	TARGET=iqn.2018-10.myhost.create_iscsi
 	atf_check -o save:port-create.txt ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target="$TARGET"
@@ -146,11 +140,11 @@ create_iscsi_alias_head()
 	atf_set "descr" "ctladm can create a new iscsi port with a target alias"
 	atf_set "require.user" "root"
 	atf_set "require.progs" ctladm
+	atf_set "require.kmods" "cfiscsi"
 }
 create_iscsi_alias_body()
 {
 	skip_if_ctld
-	load_cfiscsi
 
 	TARGET=iqn.2018-10.myhost.create_iscsi_alias
 	ALIAS="foobar"
@@ -173,11 +167,11 @@ create_iscsi_without_required_args_head()
 	atf_set "descr" "ctladm will gracefully fail to create an iSCSI target if required arguments are missing"
 	atf_set "require.user" "root"
 	atf_set "require.progs" ctladm
+	atf_set "require.kmods" "cfiscsi"
 }
 create_iscsi_without_required_args_body()
 {
 	skip_if_ctld
-	load_cfiscsi
 
 	TARGET=iqn.2018-10.myhost.create_iscsi
 	atf_check -s exit:1 -e match:"Missing required argument: cfiscsi_target" ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG
@@ -288,11 +282,11 @@ remove_iscsi_head()
 	atf_set "descr" "ctladm can remove an iscsi port"
 	atf_set "require.user" "root"
 	atf_set "require.progs" ctladm
+	atf_set "require.kmods" "cfiscsi"
 }
 remove_iscsi_body()
 {
 	skip_if_ctld
-	load_cfiscsi
 
 	TARGET=iqn.2018-10.myhost.remove_iscsi
 	atf_check -o save:port-create.txt ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target="$TARGET"
@@ -314,11 +308,11 @@ remove_iscsi_without_required_args_head()
 	atf_set "descr" "ctladm will gracefully fail to remove an iSCSI target if required arguments are missing"
 	atf_set "require.user" "root"
 	atf_set "require.progs" ctladm
+	atf_set "require.kmods" "cfiscsi"
 }
 remove_iscsi_without_required_args_body()
 {
 	skip_if_ctld
-	load_cfiscsi
 
 	TARGET=iqn.2018-10.myhost.remove_iscsi_without_required_args
 	atf_check -o save:port-create.txt ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target="$TARGET"

From nobody Sat Sep 27 14:24:56 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYqV06Vljz69PPx;
	Sat, 27 Sep 2025 14:24:56 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYqV05bbtz3wcF;
	Sat, 27 Sep 2025 14:24:56 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758983096;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=1fJeiMpRfP2QvcH4WdRQcNo6cXnGD0yGwsBTS5irBC0=;
	b=yLo/NeWuXbXPyE27c2ap6tHtVQ/rQHhfqLbt83cCSQ8IDvSS6MCaX+9zwYU9eKHng3lY5t
	FpZRhkKqgkRK26I/D1EhxxyshVoPUiIIfjnJ2Jh95SU9GY7Bt2hsmDGw+ePle9rbJeaZru
	yHbcSo9bFeUa2KKVc5V0CeQku79+3MmlioewGWnOaW16r62zZyQ4V5AyFuTZxIOILVd/z5
	f9WHtC/PnB+sJxj1WAaODI2fr2TeprrqnuStFsZBj3b+3o/UNzUWk5KANBF+HSvqDvUVVt
	3CgzoeELoDpi+rE4zJ9hWVfLWvYJNVY7/D9wmZRK9Xe/LMOAYFapKlsO1JEpww==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758983096;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=1fJeiMpRfP2QvcH4WdRQcNo6cXnGD0yGwsBTS5irBC0=;
	b=ajWpODz/VuMa02oQX1HcWOSZTYIZ/oA5uhbI1GrtmcgLXcQ2IeKfFoVwR0SDY1s4JGWtXZ
	gu37xQt3HBdHxSXCy+5cUVJl6rrFAU7zV1+To+oudHcUDGbffuKAMopn85UFMAg2Ux+BJd
	apItzsoWamr3nLmdt9ALd+nP6ra5LEwJUArjhAf8jt21/KfsNM1bpF9pbCwC0WtY78i1Ep
	/QnVoe0ACK7JCiSJZpdJ8u4t1uy0ld2T/Zehn/ct8WiDbhqr6DmDJPqi+24R+Bz6GJIH5Q
	85F7L4DVRtXWMEiKDqUast3LqvzE3H2s7eSVUUqz09bTaDHN94kKPFyNg2y+sg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758983096; a=rsa-sha256; cv=none;
	b=Swu4FDZhTt8YjdC3Z9hBXvy904r5y0JzYo4INblvoIA8nKTQcRO9laZ4Ikb2kKrUEE+LE1
	6rEUcpezgbAdhXsvqzhjl50ZuZobWxWhRgvWR1tDfvP4D8sXKFRn4DSzKnz2I3bF0DQpHA
	nGpo3b2831hcdBmyhlUfV39hmSnbRSh0T6ELMfNWlI9dCpRbFHuawOAMU+V/bUvL8zJo23
	9PR5RigKB71Ep/EXOTjA3Dip0ViLk1Rw2qPbbSD24LUTXX/9HatAU9Zy7Jviyd/pjJTpqp
	haIgnbWZDMRzqoIoxOycFFmoo433xonPtf5+nHfWqtbvgETenq9WO31wp9T7aw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYqV04wsnzdSj;
	Sat, 27 Sep 2025 14:24:56 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58REOuKj087960;
	Sat, 27 Sep 2025 14:24:56 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58REOups087957;
	Sat, 27 Sep 2025 14:24:56 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 14:24:56 GMT
Message-Id: <202509271424.58REOups087957@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Alan Somers 
Subject: git: 3c69315911ba - stable/14 - mac_bsdextended: report
  that all tests require the kernel module
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: asomers
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 3c69315911babfa4e71c8cb53c601a22f6aa6bb1
Auto-Submitted: auto-generated

The branch stable/14 has been updated by asomers:

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

commit 3c69315911babfa4e71c8cb53c601a22f6aa6bb1
Author:     Alan Somers 
AuthorDate: 2025-07-22 23:08:27 +0000
Commit:     Alan Somers 
CommitDate: 2025-09-27 14:24:13 +0000

    mac_bsdextended: report that all tests require the kernel module
    
    Use the standard required_kmods reporting mechanism to notify Kyua of
    which kernel modules are required.
    
    Sponsored by:   ConnectWise
    Reviewed by:    Siva Mahadevan 
    Pull Request:   https://github.com/freebsd/freebsd-src/pull/1783
    
    (cherry picked from commit 2a08ae16555ea60c5a1d6f1c9966ea233af405be)
---
 tests/sys/mac/bsdextended/Makefile        | 1 +
 tests/sys/mac/bsdextended/matches_test.sh | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/tests/sys/mac/bsdextended/Makefile b/tests/sys/mac/bsdextended/Makefile
index f5b07db386c2..cd7bce2653ac 100644
--- a/tests/sys/mac/bsdextended/Makefile
+++ b/tests/sys/mac/bsdextended/Makefile
@@ -10,5 +10,6 @@ TEST_METADATA.ugidfw_test+=	required_user="root"
 # Each test case of matches_test reuses the same ruleset number, so they cannot
 # be run simultaneously
 TEST_METADATA.matches_test+=	is_exclusive=true
+TEST_METADATA+=			required_kmods="mac_bsdextended"
 
 .include 
diff --git a/tests/sys/mac/bsdextended/matches_test.sh b/tests/sys/mac/bsdextended/matches_test.sh
index 40774594fd18..42ec143f0891 100644
--- a/tests/sys/mac/bsdextended/matches_test.sh
+++ b/tests/sys/mac/bsdextended/matches_test.sh
@@ -12,9 +12,6 @@ gidoutrange="daemon" # We expect $uidinrange in this group
 
 check_ko()
 {
-	if ! sysctl -N security.mac.bsdextended >/dev/null 2>&1; then
-		atf_skip "mac_bsdextended(4) support isn't available"
-	fi
 	if [ $(sysctl -n security.mac.bsdextended.enabled) = "0" ]; then
 		# The kernel module is loaded but disabled.  Enable it for the
 		# duration of the test.

From nobody Sat Sep 27 14:27:48 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYqYK03m9z69PNQ;
	Sat, 27 Sep 2025 14:27:49 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYqYJ6Ng4z3wh3;
	Sat, 27 Sep 2025 14:27:48 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758983268;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=+rUXVgjMnjfH57BWkj47Rb64F0tFS88ifKX5THV4GK0=;
	b=fDO6GPSh8TxXwWwqU+tY2GkhWeLyW/eI0YVVNaGwK6lgNnrwjiIGu1LZSOtGc9TJJpIAVV
	gk1aPWk5Cfnaokra5/eTbeSGvOceH0vy+i26TapOb/cZ8979Xm5ToHU7w0NrOMG4n1BXOV
	wQGChcPTqYkZmLnd4Gq8YhTjMaq53ynHW8lSgoRHKunsDzV4ba30IYLSiCh7BvGNcqLdcQ
	ij05QjFauOQR7eNZ6BqwkjL7GVIvl9Ikc+QJKNgJWpNdcfLFtk4QVHJbbGnIuJuaqMt8Z+
	Dl8xz2QNiEfx1A1CAijj3oZSamcCFs7FOslBvncD49NqhRm5TZ5nhhhmuZa0kw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758983268;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=+rUXVgjMnjfH57BWkj47Rb64F0tFS88ifKX5THV4GK0=;
	b=S02en9A23iw9aYByCAW4g+mKu9V0NEdY+FtCGmIaH/BVjxqZDHoqmP+1QGwqat1/8gw2VZ
	WAqDGG5tzfVPQisarAlm3VwNQ+VEkVd80bp0rER9Y0cRPpA96uJZudj6r1fjXgW/BqdQqj
	aoMZWVt22B71PgTNfGP8/ttv1uzaB4OmsTYKFZ7iW47I2EDDN2eGXX4MTuCFnO7aZjbdEj
	jmoRbtjzNZLm9kLGPw8hgs4NwylLkqNv97YgWYSJzQeBSPFr5eoJNXx4bOLv75j8gUTs+7
	eZgOkl1/XERIqMllJMxpS9sdhSl9kLey9kM+M2I0AQfhvpSnwbpSS/8cg/1wLw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758983268; a=rsa-sha256; cv=none;
	b=jjbskUUvgbf6cIDS9SiQjdpEuZG1sBXkeZ7zhgrvIZNjA46VzWCEEHNEhTIEIf5itGpCUk
	7jJA8PAdMpYpFm9r2u2qNB6pK8ofDMRdCld44nHfxTTOQjPP3QCszpt/fPFOW0/rsGU622
	HivZFaezNdE65E1g1bpm/8n1Q9FSxXuuhh84a3sLf8p8jcYWlcpxCwb0CcjmOuOfaV0j5i
	gTX6BBaT3Nqg+g5VUkXeNgIpvEdZt2/WqdgQnNA3VDvtyUo+h3lceMfjUv7pofvIvPKui9
	BW7ndfDPjoqIa9290PWwCoihkAFBLurGRolgGd6goLr5Cro2XnRVHLI8JxivAA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYqYJ5hWPzcY1;
	Sat, 27 Sep 2025 14:27:48 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RERmh6088830;
	Sat, 27 Sep 2025 14:27:48 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RERmR5088827;
	Sat, 27 Sep 2025 14:27:48 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 14:27:48 GMT
Message-Id: <202509271427.58RERmR5088827@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Alan Somers 
Subject: git: 4171bf5905a9 - stable/14 - zfsd: don't try to fix an
  OFFLINE condition
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: asomers
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 4171bf5905a95b8fcfd3bb6bb6ede2fe543db092
Auto-Submitted: auto-generated

The branch stable/14 has been updated by asomers:

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

commit 4171bf5905a95b8fcfd3bb6bb6ede2fe543db092
Author:     Alan Somers 
AuthorDate: 2025-05-02 12:45:32 +0000
Commit:     Alan Somers 
CommitDate: 2025-09-27 14:25:04 +0000

    zfsd: don't try to fix an OFFLINE condition
    
    If the system administrator does "zpool offline", he's doing it for a
    reason.  zfsd shouldn't consider an offline disk to be an event that
    requires automatic healing.  Don't online it in response to a GEOM
    event, and don't try to activate a hotspare to take over from it.
    
    Sponsored by:   ConnectWise
    
    (cherry picked from commit a13ddd6210f349dec341eba0506b5f2395a7a2d6)
---
 cddl/usr.sbin/zfsd/case_file.cc                    | 18 +++++-
 cddl/usr.sbin/zfsd/zfsd_event.cc                   |  7 +++
 tests/sys/cddl/zfs/tests/zfsd/Makefile             |  2 +
 .../cddl/zfs/tests/zfsd/zfsd_offline_001_neg.ksh   | 64 +++++++++++++++++++++
 .../cddl/zfs/tests/zfsd/zfsd_offline_002_neg.ksh   | 66 ++++++++++++++++++++++
 tests/sys/cddl/zfs/tests/zfsd/zfsd_test.sh         | 60 ++++++++++++++++++++
 6 files changed, 215 insertions(+), 2 deletions(-)

diff --git a/cddl/usr.sbin/zfsd/case_file.cc b/cddl/usr.sbin/zfsd/case_file.cc
index 7adfb08b75c6..852767aeb227 100644
--- a/cddl/usr.sbin/zfsd/case_file.cc
+++ b/cddl/usr.sbin/zfsd/case_file.cc
@@ -299,6 +299,15 @@ CaseFile::ReEvaluate(const string &devPath, const string &physPath, Vdev *vdev)
 		    PoolGUIDString().c_str(), VdevGUIDString().c_str());
 		return (/*consumed*/false);
 	}
+	if (VdevState() == VDEV_STATE_OFFLINE) {
+		/*
+		 * OFFLINE is an administrative decision.  No need for zfsd to
+		 * do anything.
+		 */
+		syslog(LOG_INFO, "CaseFile::ReEvaluate(%s,%s): Pool/Vdev ignored",
+		    PoolGUIDString().c_str(), VdevGUIDString().c_str());
+		return (/*consumed*/false);
+	}
 
 	if (vdev != NULL
 	 && ( vdev->PoolGUID() == m_poolGUID
@@ -401,7 +410,8 @@ CaseFile::ReEvaluate(const ZfsEvent &event)
 		return (/*consumed*/true);
 	} else if (event.Value("type") == "sysevent.fs.zfs.config_sync") {
 		RefreshVdevState();
-		if (VdevState() < VDEV_STATE_HEALTHY)
+		if (VdevState() < VDEV_STATE_HEALTHY &&
+		    VdevState() != VDEV_STATE_OFFLINE)
 			consumed = ActivateSpare();
 	}
 
@@ -694,6 +704,11 @@ CaseFile::CloseIfSolved()
 		switch (VdevState()) {
 		case VDEV_STATE_HEALTHY:
 			/* No need to keep cases for healthy vdevs */
+		case VDEV_STATE_OFFLINE:
+			/*
+			 * Offline is a deliberate administrative action.  zfsd
+			 * doesn't need to do anything for this state.
+			 */
 			Close();
 			return (true);
 		case VDEV_STATE_REMOVED:
@@ -710,7 +725,6 @@ CaseFile::CloseIfSolved()
 			 */
 		case VDEV_STATE_UNKNOWN:
 		case VDEV_STATE_CLOSED:
-		case VDEV_STATE_OFFLINE:
 			/*
 			 * Keep open?  This may not be the correct behavior,
 			 * but it's what we've always done
diff --git a/cddl/usr.sbin/zfsd/zfsd_event.cc b/cddl/usr.sbin/zfsd/zfsd_event.cc
index 7a19b95abeed..afdabd99a8c3 100644
--- a/cddl/usr.sbin/zfsd/zfsd_event.cc
+++ b/cddl/usr.sbin/zfsd/zfsd_event.cc
@@ -355,6 +355,13 @@ ZfsEvent::Process() const
 
 	Vdev vdev(zpl.front(), vdevConfig);
 	caseFile = &CaseFile::Create(vdev);
+	if (caseFile->VdevState() == VDEV_STATE_OFFLINE) {
+		/*
+		 * An administrator did this deliberately.  It's not considered
+		 * an error that zfsd must fix.
+		 */
+		return (false);
+	}
 	if (caseFile->ReEvaluate(*this) == false) {
 		stringstream msg;
 		int priority = LOG_INFO;
diff --git a/tests/sys/cddl/zfs/tests/zfsd/Makefile b/tests/sys/cddl/zfs/tests/zfsd/Makefile
index 7d3f29a7359e..b9ba49b60214 100644
--- a/tests/sys/cddl/zfs/tests/zfsd/Makefile
+++ b/tests/sys/cddl/zfs/tests/zfsd/Makefile
@@ -31,6 +31,8 @@ ${PACKAGE}FILES+=	zfsd_hotspare_006_pos.ksh
 ${PACKAGE}FILES+=	zfsd_hotspare_007_pos.ksh
 ${PACKAGE}FILES+=	zfsd_hotspare_008_neg.ksh
 ${PACKAGE}FILES+=	zfsd_import_001_pos.ksh
+${PACKAGE}FILES+=	zfsd_offline_001_neg.ksh
+${PACKAGE}FILES+=	zfsd_offline_002_neg.ksh
 ${PACKAGE}FILES+=	zfsd_replace_001_pos.ksh
 ${PACKAGE}FILES+=	zfsd_replace_002_pos.ksh
 ${PACKAGE}FILES+=	zfsd_replace_003_pos.ksh
diff --git a/tests/sys/cddl/zfs/tests/zfsd/zfsd_offline_001_neg.ksh b/tests/sys/cddl/zfs/tests/zfsd/zfsd_offline_001_neg.ksh
new file mode 100644
index 000000000000..de7996976504
--- /dev/null
+++ b/tests/sys/cddl/zfs/tests/zfsd/zfsd_offline_001_neg.ksh
@@ -0,0 +1,64 @@
+#!/usr/local/bin/ksh93 -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2025 ConnectWise.  All rights reserved.
+# Use is subject to license terms.
+
+. $STF_SUITE/tests/hotspare/hotspare.kshlib
+
+verify_runnable "global"
+
+function cleanup
+{
+	$ZPOOL status $TESTPOOL
+	if poolexists $TESTPOOL ; then
+		destroy_pool $TESTPOOL
+	fi
+
+	partition_cleanup
+}
+
+function verify_assertion
+{
+	log_must $ZPOOL offline $TESTPOOL $FAULT_DISK
+
+	# Wait a few seconds before verifying the state
+	$SLEEP 10
+	log_must check_state $TESTPOOL "$FAULT_DISK" "OFFLINE"
+}
+
+log_onexit cleanup
+
+log_assert "ZFSD will not automatically reactivate a disk which has been administratively offlined"
+
+ensure_zfsd_running
+
+typeset FAULT_DISK=$DISK0
+typeset POOLDEVS="$DISK0 $DISK1 $DISK2"
+set -A MY_KEYWORDS mirror raidz1
+for keyword in "${MY_KEYWORDS[@]}" ; do
+	log_must create_pool $TESTPOOL $keyword $POOLDEVS
+	verify_assertion
+
+	destroy_pool "$TESTPOOL"
+done
diff --git a/tests/sys/cddl/zfs/tests/zfsd/zfsd_offline_002_neg.ksh b/tests/sys/cddl/zfs/tests/zfsd/zfsd_offline_002_neg.ksh
new file mode 100644
index 000000000000..7d8dfc62d365
--- /dev/null
+++ b/tests/sys/cddl/zfs/tests/zfsd/zfsd_offline_002_neg.ksh
@@ -0,0 +1,66 @@
+#!/usr/local/bin/ksh93 -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2025 ConnectWise.  All rights reserved.
+# Use is subject to license terms.
+
+. $STF_SUITE/tests/hotspare/hotspare.kshlib
+
+verify_runnable "global"
+
+function cleanup
+{
+	$ZPOOL status $TESTPOOL
+	if poolexists $TESTPOOL ; then
+		destroy_pool $TESTPOOL
+	fi
+
+	partition_cleanup
+}
+
+function verify_assertion
+{
+	log_must $ZPOOL offline $TESTPOOL $FAULT_DISK
+
+	# Wait a few seconds before verifying the state
+	$SLEEP 10
+	log_must check_state $TESTPOOL "$FAULT_DISK" "OFFLINE"
+	log_must check_state $TESTPOOL "$SPARE_DISK" "AVAIL"
+}
+
+log_onexit cleanup
+
+log_assert "ZFSD will not automatically activate a spare when a disk has been administratively offlined"
+
+ensure_zfsd_running
+
+typeset FAULT_DISK=$DISK0
+typeset SPARE_DISK=$DISK3
+typeset POOLDEVS="$DISK0 $DISK1 $DISK2"
+set -A MY_KEYWORDS mirror raidz1
+for keyword in "${MY_KEYWORDS[@]}" ; do
+	log_must create_pool $TESTPOOL $keyword $POOLDEVS spare $SPARE_DISK
+	verify_assertion
+
+	destroy_pool "$TESTPOOL"
+done
diff --git a/tests/sys/cddl/zfs/tests/zfsd/zfsd_test.sh b/tests/sys/cddl/zfs/tests/zfsd/zfsd_test.sh
index fe4ac4866ed3..b9924500a298 100755
--- a/tests/sys/cddl/zfs/tests/zfsd/zfsd_test.sh
+++ b/tests/sys/cddl/zfs/tests/zfsd/zfsd_test.sh
@@ -483,6 +483,64 @@ zfsd_autoreplace_003_pos_cleanup()
 	ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed"
 }
 
+atf_test_case zfsd_offline_001_neg cleanup
+zfsd_offline_001_neg_head()
+{
+	atf_set "descr" "ZFSD will not automatically reactivate a disk which has been administratively offlined"
+	atf_set "require.progs" "ksh93 zpool zfs"
+}
+zfsd_offline_001_neg_body()
+{
+	. $(atf_get_srcdir)/../../include/default.cfg
+	. $(atf_get_srcdir)/../hotspare/hotspare.cfg
+	. $(atf_get_srcdir)/zfsd.cfg
+
+	verify_disk_count "$DISKS" 3
+	verify_zfsd_running
+	ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed"
+	ksh93 $(atf_get_srcdir)/zfsd_offline_001_neg.ksh
+	if [[ $? != 0 ]]; then
+		save_artifacts
+		atf_fail "Testcase failed"
+	fi
+}
+zfsd_offline_001_neg_cleanup()
+{
+	. $(atf_get_srcdir)/../../include/default.cfg
+	. $(atf_get_srcdir)/zfsd.cfg
+
+	ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed"
+}
+
+atf_test_case zfsd_offline_002_neg cleanup
+zfsd_offline_002_neg_head()
+{
+	atf_set "descr" "ZFSD will not automatically activate a spare when a disk has been administratively offlined"
+	atf_set "require.progs" "ksh93 zpool zfs"
+}
+zfsd_offline_002_neg_body()
+{
+	. $(atf_get_srcdir)/../../include/default.cfg
+	. $(atf_get_srcdir)/../hotspare/hotspare.cfg
+	. $(atf_get_srcdir)/zfsd.cfg
+
+	verify_disk_count "$DISKS" 4
+	verify_zfsd_running
+	ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed"
+	ksh93 $(atf_get_srcdir)/zfsd_offline_002_neg.ksh
+	if [[ $? != 0 ]]; then
+		save_artifacts
+		atf_fail "Testcase failed"
+	fi
+}
+zfsd_offline_002_neg_cleanup()
+{
+	. $(atf_get_srcdir)/../../include/default.cfg
+	. $(atf_get_srcdir)/zfsd.cfg
+
+	ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed"
+}
+
 atf_test_case zfsd_replace_001_pos cleanup
 zfsd_replace_001_pos_head()
 {
@@ -676,6 +734,8 @@ atf_init_test_cases()
 	atf_add_test_case zfsd_autoreplace_001_neg
 	atf_add_test_case zfsd_autoreplace_002_pos
 	atf_add_test_case zfsd_autoreplace_003_pos
+	atf_add_test_case zfsd_offline_001_neg
+	atf_add_test_case zfsd_offline_002_neg
 	atf_add_test_case zfsd_replace_001_pos
 	atf_add_test_case zfsd_replace_002_pos
 	atf_add_test_case zfsd_replace_003_pos

From nobody Sat Sep 27 14:36:21 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYql92T9qz69Pwk;
	Sat, 27 Sep 2025 14:36:21 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYql91k6Fz3xL7;
	Sat, 27 Sep 2025 14:36:21 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758983781;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=zNN8Kgb+4SxZyl1smJ344za/LJm+/H67b6KCggLNRXA=;
	b=EeTa1xraCh48LtIe2WbtOqEs66Fv5vCxuA8n3RkIlscgnJ22hWDUawn+JpQ1zJmQoyxE8c
	F76UFXV3HL6HMyhhTYARQaWiJX1Tic9S9bSTCjAM4dqnczEZMlGOEhEH4g7a0l/PzTNGQD
	DyHQjGmXeBUgVcejAWtQQF7cUUR/iODyNFWnZr3gnnSx9Nyc18hzwdc/XGNR89Jo98I750
	zMGi4dtLRs/96nO8vMcawM0H64yPepfoZcFrUnY7MDFD3K177Ceq4LtwrrAcHb9rXuthIL
	HZBY3ZpAQHSt+A5ufXc49K0O0VLY7B+h4j8OneZcYTCFr3aMLlTUO3GeEfH3+g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758983781;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=zNN8Kgb+4SxZyl1smJ344za/LJm+/H67b6KCggLNRXA=;
	b=XzFcwpdoc5UUR0DeNkaXxFmJRHPCbOs2V6m0lFY8obO2c1BVoi0VmT0oY3Dso3YuttkzLL
	ZycLQlC2P1v1hR+AbwcxZX/vh2HrR8AV5mphBFf3TSqEhW58+mma25OlAY+2b4pydwHd6T
	0qs3WPL/wqxz/Lq3ELi0Gw8MjcmrU21usCgXDCH3ztW3bqumfO2chvfJI7J71KpQ720CMr
	1Ps7nDFBoNS+Ae+oKv28pKndaFHqUsLKP3/Aqq6PCmnsFEWEK/N9lHoKzyefxtPfKIUixi
	BcG7JO/b+CIRqznA6TQq75UcAQ8qD9Wl0ZIqM28XalW9Gb6F+LC+RykwyM+ATg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758983781; a=rsa-sha256; cv=none;
	b=RJbf27YwJFljM6/nE3w735UMe1XhiRoD/BtQxWjHCHRUknvpw3klu1Rz+IH+g5GAnbrAr9
	2dS4ZDVBQpRx9dWjOc/Dw/3xzNkKK/4zYaZP3m15LqOP8GFi6DXGWXi3pVx19xccOHISth
	va0Iebzg43GeTd4LB8NZfd5dwCAJvGM7wLNkXBWNfopfd0E6rin2oyJC/HcFqWFwBri7DZ
	fhCZ+NBfkTTzYfXuv6RlPooCVcl2mHDaANvn7o2U89G0hnoVoNOtRV95v3ILomRX8314rx
	n/zw1nfsgF3LnFrVGqn8DhoN0RAWUP/+mNS6ZgMMULzgjaOf2r7oCEQgCK8Y6g==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYql918FCzdTP;
	Sat, 27 Sep 2025 14:36:21 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58REaLWO007343;
	Sat, 27 Sep 2025 14:36:21 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58REaLmv007340;
	Sat, 27 Sep 2025 14:36:21 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 14:36:21 GMT
Message-Id: <202509271436.58REaLmv007340@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Alan Somers 
Subject: git: a16c01f71fd5 - stable/14 - fusefs: don't fake the
  mountpoint's stat info before FUSE_INIT completes
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: asomers
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: a16c01f71fd513fec4bc76a572c5b15f3b2369df
Auto-Submitted: auto-generated

The branch stable/14 has been updated by asomers:

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

commit a16c01f71fd513fec4bc76a572c5b15f3b2369df
Author:     Alan Somers 
AuthorDate: 2025-06-11 21:26:48 +0000
Commit:     Alan Somers 
CommitDate: 2025-09-27 14:29:36 +0000

    fusefs: don't fake the mountpoint's stat info before FUSE_INIT completes
    
    Ever since the first GSoC contribution, fusefs has had a curious
    behavior.  If the daemon hasn't finished responding to FUSE_INIT,
    fuse_vnop_getattr would reply to VOP_GETATTR requests for the mountpoint
    by returning all zeros.  I don't know why.  It isn't necessary for
    unmounting, even if the daemon is dead.
    
    Delete that behavior.  Now VOP_GETATTR for the mountpoint will wait for
    the daemon to be ready, just like it will for any other vnode.
    
    Reported by:    Vassili Tchersky
    Sponsored by:   ConnectWise
    Differential Revision: https://reviews.freebsd.org/D50800
    
    (cherry picked from commit 9e682c426093a3afc0f609a1f04048b0beb021ec)
---
 sys/fs/fuse/fuse_vnops.c        | 34 ++++++-------------
 tests/sys/fs/fusefs/pre-init.cc | 72 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 81 insertions(+), 25 deletions(-)

diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c
index 52e62f121808..265d1604e796 100644
--- a/sys/fs/fuse/fuse_vnops.c
+++ b/sys/fs/fuse/fuse_vnops.c
@@ -1207,36 +1207,20 @@ fuse_vnop_getattr(struct vop_getattr_args *ap)
 	struct vattr *vap = ap->a_vap;
 	struct ucred *cred = ap->a_cred;
 	struct thread *td = curthread;
-
 	int err = 0;
-	int dataflags;
-
-	dataflags = fuse_get_mpdata(vnode_mount(vp))->dataflags;
-
-	/* Note that we are not bailing out on a dead file system just yet. */
 
-	if (!(dataflags & FSESS_INITED)) {
-		if (!vnode_isvroot(vp)) {
-			fdata_set_dead(fuse_get_mpdata(vnode_mount(vp)));
-			err = ENOTCONN;
-			return err;
-		} else {
-			goto fake;
-		}
-	}
 	err = fuse_internal_getattr(vp, vap, cred, td);
 	if (err == ENOTCONN && vnode_isvroot(vp)) {
-		/* see comment in fuse_vfsop_statfs() */
-		goto fake;
-	} else {
-		return err;
+		/*
+		 * We want to seem a legitimate fs even if the daemon is dead,
+		 * so that, eg., we can still do path based unmounting after
+		 * the daemon dies.
+		 */
+		err = 0;
+		bzero(vap, sizeof(*vap));
+		vap->va_type = vnode_vtype(vp);
 	}
-
-fake:
-	bzero(vap, sizeof(*vap));
-	vap->va_type = vnode_vtype(vp);
-
-	return 0;
+	return err;
 }
 
 /*
diff --git a/tests/sys/fs/fusefs/pre-init.cc b/tests/sys/fs/fusefs/pre-init.cc
index e990d3cafffa..2d3257500304 100644
--- a/tests/sys/fs/fusefs/pre-init.cc
+++ b/tests/sys/fs/fusefs/pre-init.cc
@@ -44,12 +44,26 @@ using namespace testing;
 
 /* Tests for behavior that happens before the server responds to FUSE_INIT */
 class PreInit: public FuseTest {
+public:
 void SetUp() {
 	m_no_auto_init = true;
 	FuseTest::SetUp();
 }
 };
 
+/*
+ * Tests for behavior that happens before the server responds to FUSE_INIT,
+ * parameterized on default_permissions
+ */
+class PreInitP: public PreInit,
+	        public WithParamInterface
+{
+void SetUp() {
+	m_default_permissions = GetParam();
+	PreInit::SetUp();
+}
+};
+
 static void* unmount1(void* arg __unused) {
 	ssize_t r;
 
@@ -152,3 +166,61 @@ TEST_F(PreInit, signal_during_unmount_before_init)
 	sem_post(&sem0);
 	m_mock->join_daemon();
 }
+
+/*
+ * If some process attempts VOP_GETATTR for the mountpoint before init is
+ * complete, fusefs should wait, just like it does for other VOPs.
+ *
+ * To verify that fuse_vnop_getattr does indeed wait for FUSE_INIT to complete,
+ * invoke the test like this:
+ *
+> sudo cpuset -c -l 0 dtrace -i 'fbt:fusefs:fuse_internal_init_callback:' -i 'fbt:fusefs:fuse_vnop_getattr:' -c "./pre-init --gtest_filter=PI/PreInitP.getattr_before_init/0"
+...
+dtrace: pid 4224 has exited
+CPU     ID                    FUNCTION:NAME
+  0  68670          fuse_vnop_getattr:entry
+  0  68893 fuse_internal_init_callback:entry
+  0  68894 fuse_internal_init_callback:return
+  0  68671         fuse_vnop_getattr:return
+ *
+ * Note that fuse_vnop_getattr was entered first, but exitted last.
+ */
+TEST_P(PreInitP, getattr_before_init)
+{
+	struct stat sb;
+	nlink_t nlink = 12345;
+
+	EXPECT_CALL(*m_mock, process(
+		ResultOf([=](auto in) {
+			return (in.header.opcode == FUSE_INIT);
+		}, Eq(true)),
+		_)
+	).WillOnce(Invoke(ReturnImmediate([&](auto in, auto& out) {
+		SET_OUT_HEADER_LEN(out, init);
+		out.body.init.major = FUSE_KERNEL_VERSION;
+		out.body.init.minor = FUSE_KERNEL_MINOR_VERSION;
+		out.body.init.flags = in.body.init.flags & m_init_flags;
+		out.body.init.max_write = m_maxwrite;
+		out.body.init.max_readahead = m_maxreadahead;
+		out.body.init.time_gran = m_time_gran;
+		nap();	/* Allow stat() to run first */
+	})));
+	EXPECT_CALL(*m_mock, process(
+		ResultOf([=](auto in) {
+			return (in.header.opcode == FUSE_GETATTR &&
+				in.header.nodeid == FUSE_ROOT_ID);
+		}, Eq(true)),
+		_)
+	).WillOnce(Invoke(ReturnImmediate([=](auto& in, auto& out) {
+		SET_OUT_HEADER_LEN(out, attr);
+		out.body.attr.attr.ino = in.header.nodeid;
+		out.body.attr.attr.mode = S_IFDIR | 0644;
+		out.body.attr.attr.nlink = nlink;
+		out.body.attr.attr_valid = UINT64_MAX;
+	})));
+
+	EXPECT_EQ(0, stat("mountpoint", &sb));
+	EXPECT_EQ(nlink, sb.st_nlink);
+}
+
+INSTANTIATE_TEST_SUITE_P(PI, PreInitP, Bool());

From nobody Sat Sep 27 14:36:22 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYqlB3k8bz69PyK;
	Sat, 27 Sep 2025 14:36:22 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYqlB1xCLz3xqk;
	Sat, 27 Sep 2025 14:36:22 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758983782;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=nRxKEpx0ZGs7WnrtToXlJYyYLqGf4QN+dyqGZMRdb7Q=;
	b=N3nes8dFz3jF1l1lWf9bhmEPBHMIGCJh1JAuZljZ9sHtFNx8gK0bErhVovmDCiKUfVISzV
	LqIAxGUknoeGcVMxmc7axWU2ZeWrC2fETjuPh+12u1kzDonFOrVNzDo3cbKkkp6Emiu770
	es8hQFNYm1kPWtwIlv6OuTp4u5W0MKHQoOMqOslIJ2kNFC0dq/zspARG22lktUfeuuV3Eh
	i1TIVmQ4bNcaip5Ohkm7EEnQjy/m1wNj0cLh+OJILRffMhSoQ9URdvX8L6z3G1CGlJpdNW
	4IqANMlrBaiXzSGVV6Oo4nGzMJJP0O+oUQ0jL52DtHctbByI9TqYGCIN/bW0WA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758983782;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=nRxKEpx0ZGs7WnrtToXlJYyYLqGf4QN+dyqGZMRdb7Q=;
	b=b003jHE8YaMIN0cLwdYcTEzdC9POenJiEMQUQgVOcuzy9jB/i+7wB7gTLUil81BrXcTboI
	IrN7NGAu9ZMJjOgrOsI5ym6kFoRb5AxgGyiRbLWCIppurMs2TgPl3c9zcdx+9Demvb+5Kq
	bEFSdvN/wb87BmjHw3ZnKDso48rqQevz1omKg7K8jYde4FTlqpidLZpSSX4jPmKrB/6YTG
	PYXDYGSbYw+rRAAQzSUwhMUnQETbcWiyoAaRUGikUPXdXc50sq2OOHzecJBimeBguQ1OMy
	v1a7tlpqia73vnOnra/HPX5X2m8zdSfUd0nhptBBpmE0f4l2YaHqbqkkjiBcmg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758983782; a=rsa-sha256; cv=none;
	b=hlSsfCkwWpRDKPNsAnLMzvRBaL4M/6h42HFfkQZyn1S8g3ImbE83m6/WKVySnNen8qLKDH
	gSKeLFqF7un25AkODVbWar9WnZHmkCESpXFyfx/8aG2syn3esGkT8Ledmfc6IgAxje0hlA
	DxsyQzQsYG73YshwN+S3tKNE7FjhMQ37djl1Qi5vxenbxs/sPbWFSc88s6e2A4+7j2WieU
	bJs4eC1pM7RmSn06AehkqJeQbBoN/Y5TuqG3oDj9cX0fbBHer1F7okFRJeV2KEteKvqM0W
	t5AbexigCJdriZ+iiIXHgiIfvD3BhFM2RmYOcP1dxUjVZi2ZRzXc8Bwa7zouhA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYqlB1Qdpzf1w;
	Sat, 27 Sep 2025 14:36:22 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58REaMBA007383;
	Sat, 27 Sep 2025 14:36:22 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58REaMPt007380;
	Sat, 27 Sep 2025 14:36:22 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 14:36:22 GMT
Message-Id: <202509271436.58REaMPt007380@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Alan Somers 
Subject: git: 7dc691b70353 - stable/14 - fusefs: fix the last_local_modify
  LLM/LastLocalModify.lookup/3 test
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: asomers
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 7dc691b703537113c686add53e2789566c8ab9e6
Auto-Submitted: auto-generated

The branch stable/14 has been updated by asomers:

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

commit 7dc691b703537113c686add53e2789566c8ab9e6
Author:     Alan Somers 
AuthorDate: 2025-09-15 00:22:36 +0000
Commit:     Alan Somers 
CommitDate: 2025-09-27 14:29:52 +0000

    fusefs: fix the last_local_modify LLM/LastLocalModify.lookup/3 test
    
    The LastLocalModify tests were originally written to simulate a race
    condition between VOP_SETATTR and VOP_LOOKUP.  They were later extended
    to cover some other VOPs that can affect file size, including VOP_WRITE.
    However, the test never correctly simulated the race with VOP_WRITE.  So
    that test only ever passed by accident.  Fix it by always opening the
    file with O_DIRECT.
    
    PR:             289237
    Reported by:    Siva Mahadevan 
    
    (cherry picked from commit d1eaa52d10f9b85e5f6358e1a280899b9d55dd07)
---
 tests/sys/fs/fusefs/last_local_modify.cc | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/tests/sys/fs/fusefs/last_local_modify.cc b/tests/sys/fs/fusefs/last_local_modify.cc
index 5fcd3c36c892..6b8c19f1efc7 100644
--- a/tests/sys/fs/fusefs/last_local_modify.cc
+++ b/tests/sys/fs/fusefs/last_local_modify.cc
@@ -174,7 +174,15 @@ static void* write_th(void* arg) {
 
 	if (sem)
 		sem_wait(sem);
-	fd = open("mountpoint/some_file.txt", O_RDWR);
+	/*
+	 * Open the file in direct mode.
+	 * The race condition affects both direct and non-direct writes, and
+	 * they have separate code paths.  However, in the non-direct case, the
+	 * kernel updates last_local_modify _before_ sending FUSE_WRITE to the
+	 * server.  So the technique that this test program uses to invoke the
+	 * race cannot work.  Therefore, test with O_DIRECT only.
+	 */
+	fd = open("mountpoint/some_file.txt", O_RDWR | O_DIRECT);
 	if (fd < 0)
 		return (void*)(intptr_t)errno;
 
@@ -332,7 +340,7 @@ TEST_P(LastLocalModify, lookup)
 	/* Wait for FUSE_SETATTR to be sent */
 	sem_wait(&sem);
 
-	/* Lookup again, which will race with setattr */
+	/* Lookup again, which will race with the mutator */
 	ASSERT_EQ(0, stat(FULLPATH, &sb)) << strerror(errno);
 	ASSERT_EQ((off_t)newsize, sb.st_size);
 

From nobody Sat Sep 27 14:36:23 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYqlD1cP4z69PyL;
	Sat, 27 Sep 2025 14:36:24 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYqlC3Sj5z3xqq;
	Sat, 27 Sep 2025 14:36:23 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758983783;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=bdrgen7rP+7IuxDrNQJmNrOS2WYvaX23AO7Lr/JSThI=;
	b=v1O38N0wC0RU/syM/D6MyibTwVhql0Kx48Up7MPgeyG7arZ4/aNNKyovQguU1GsuZmMo0K
	lEjMR+eqdUmvyqzMA7l6GWHZjUZDtIHltr+OSiftlK9HP2C8t+4ASNHGfEk5wnVGVEmpIo
	1PobbwMPJa+QU27fHPTBvzVuuvHNQM/oTo9Sh0g43835RgoSii887AlYGuKaNQE2fV9sU7
	ljUbXZcySTGp8VHpRxpnfWcSoF4gFvk/k2/OmzpM6sJQNyRLrZPXzyJ9wNh1lw7u8oKiq1
	EXtkFGXDCiHZuFryNEj/CV3SMrB/ExxoBBDjqPbcmcgZCI2JU1MC83v9P9clgA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758983783;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=bdrgen7rP+7IuxDrNQJmNrOS2WYvaX23AO7Lr/JSThI=;
	b=fMr7YB7r3tG6VKIYznapvhvTWdktUeeBhDSaD5DtKOyjl6OlJP8I7lasQ1ozhiiH8Lc1vr
	ar0LsFmBNqj8bAav675IEk2GLXfiTORx8MJyj5kLu9CxLgEjPMwLxpiGARUGyebuzUH7Pk
	48NDqUOgL2f7QqzM73u4MSyOVhdf0JAtVxPNZUAPScpFUJWHFqQ7fCenRbRn2YHx3mB5Tz
	eb+kNZQZ9aGIIt0gbzaLzIAJaS9pxXS4YzEG357ur01DFcTkygXlKu5MOlRc+JhSB+nXXP
	uPRoiZ+HUR+29eZmzIHE23YGw6YDDMKHf5R87XjhgPGZdXaRq1tAxNOFHRPPPw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758983783; a=rsa-sha256; cv=none;
	b=xLnqaZTttcyGtQTHA2hgmiDjVxwsAvR1mqv3AGoDDwZPh/WbA4ugj5mm9+Rnwq/4j/VHmf
	527pL9YjS2SqSnz3RMOHI+M+jQ9+PhJOHEDgXaZgNHmSuRJ64cuybU7DxCfRIG6xfkMjIQ
	va9kRJCidTj64i9Vn0Rn80hRG+MVDUywT7+A5C14akaGxcEIQBAb4FpZHOQ0YBzjmdLyuX
	9KEnXrlzavGcVtY6tDVnRZAjYlsXYGajDZ9hb7ECMQcbgDrLoRyy1Ca5ju52hr+cDWWQRc
	cssRdSfupyHdAdlWt6ZWRk+Q9aQ1A58lGg9Zq1kNI0C1FqGFGyqryDTz1UNxjg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYqlC2kHZzf2n;
	Sat, 27 Sep 2025 14:36:23 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58REaNTt007419;
	Sat, 27 Sep 2025 14:36:23 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58REaN8K007416;
	Sat, 27 Sep 2025 14:36:23 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 14:36:23 GMT
Message-Id: <202509271436.58REaN8K007416@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Alan Somers 
Subject: git: 3152a2f5dd04 - stable/14 - fusefs: fix a kernel panic
  regarding SCM_RIGHTS
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: asomers
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 3152a2f5dd0447daba80466f70c66ea794400015
Auto-Submitted: auto-generated

The branch stable/14 has been updated by asomers:

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

commit 3152a2f5dd0447daba80466f70c66ea794400015
Author:     Alan Somers 
AuthorDate: 2025-09-19 16:02:25 +0000
Commit:     Alan Somers 
CommitDate: 2025-09-27 14:30:13 +0000

    fusefs: fix a kernel panic regarding SCM_RIGHTS
    
    If the last copy of an open file resides within the socket buffer of a
    unix-domain socket, then VOP_CLOSE will be called with no thread
    information.  Fix fusefs to handle that case, and add a regression test.
    
    Also add a test case for writes to a file that lies within a sockbuf.
    Along with close, a write from the writeback cache is the only other
    operation I can think of that might apply to a file residing in a
    sockbuf.
    
    PR:             289686
    Reported by:    iron.udjin@gmail.com
    Sponsored by:   ConnectWise
    Reviewed by:    glebius, markj
    Differential Revision: https://reviews.freebsd.org/D52625
    
    (cherry picked from commit e043af9ca59608309cac2fd222c17f989ba0d35e)
---
 sys/fs/fuse/fuse_vnops.c       | 10 ++++--
 tests/sys/fs/fusefs/release.cc | 54 +++++++++++++++++++++++++++++++
 tests/sys/fs/fusefs/write.cc   | 73 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 134 insertions(+), 3 deletions(-)

diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c
index 265d1604e796..28dca332dfd3 100644
--- a/sys/fs/fuse/fuse_vnops.c
+++ b/sys/fs/fuse/fuse_vnops.c
@@ -785,11 +785,15 @@ fuse_vnop_close(struct vop_close_args *ap)
 	struct mount *mp = vnode_mount(vp);
 	struct ucred *cred = ap->a_cred;
 	int fflag = ap->a_fflag;
-	struct thread *td = ap->a_td;
-	pid_t pid = td->td_proc->p_pid;
+	struct thread *td;
 	struct fuse_vnode_data *fvdat = VTOFUD(vp);
+	pid_t pid;
 	int err = 0;
 
+	/* NB: a_td will be NULL from some async kernel contexts */
+	td = ap->a_td ? ap->a_td : curthread;
+	pid = td->td_proc->p_pid;
+
 	if (fuse_isdeadfs(vp))
 		return 0;
 	if (vnode_isdir(vp))
@@ -828,7 +832,7 @@ fuse_vnop_close(struct vop_close_args *ap)
 	}
 	/* TODO: close the file handle, if we're sure it's no longer used */
 	if ((fvdat->flag & FN_SIZECHANGE) != 0) {
-		fuse_vnode_savesize(vp, cred, td->td_proc->p_pid);
+		fuse_vnode_savesize(vp, cred, pid);
 	}
 	return err;
 }
diff --git a/tests/sys/fs/fusefs/release.cc b/tests/sys/fs/fusefs/release.cc
index b664ba512b64..9df236bfbaf7 100644
--- a/tests/sys/fs/fusefs/release.cc
+++ b/tests/sys/fs/fusefs/release.cc
@@ -29,6 +29,9 @@
  */
 
 extern "C" {
+#include 
+#include 
+
 #include 
 #include 
 }
@@ -188,6 +191,57 @@ TEST_F(Release, ok)
 	ASSERT_EQ(0, close(fd)) << strerror(errno);
 }
 
+/*
+ * Nothing bad should happen when closing a Unix-domain named socket that
+ * contains a fusefs file descriptor within its receive buffer.
+ * Regression test for
+ * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289686
+ */
+TEST_F(Release, scm_rights)
+{
+	const char FULLPATH[] = "mountpoint/some_file.txt";
+	const char RELPATH[] = "some_file.txt";
+	struct msghdr msg;
+	struct iovec iov;
+	char message[CMSG_SPACE(sizeof(int))];
+	uint64_t ino = 42;
+	int fd;
+	int s[2];
+	union {
+		char buf[CMSG_SPACE(sizeof(fd))];
+		struct cmsghdr align;
+	} u;
+
+	expect_lookup(RELPATH, ino, 1);
+	expect_open(ino, 0, 1);
+	expect_flush(ino, 1, ReturnErrno(0));
+	expect_release(ino, getpid(), O_RDONLY, 0);
+
+	ASSERT_EQ(0, socketpair(AF_UNIX, SOCK_STREAM, 0, s)) << strerror(errno);
+
+	fd = open(FULLPATH, O_RDONLY);
+	ASSERT_LE(0, fd) << strerror(errno);
+
+	memset(&message, 0, sizeof(message));
+	memset(&msg, 0, sizeof(msg));
+	iov.iov_base = NULL;
+	iov.iov_len = 0;
+	msg.msg_iov = &iov;
+	msg.msg_iovlen = 1;
+	msg.msg_control = u.buf,
+	msg.msg_controllen = sizeof(u.buf);
+	struct cmsghdr *cmsg = CMSG_FIRSTHDR(&msg);
+	cmsg->cmsg_level = SOL_SOCKET;
+	cmsg->cmsg_type = SCM_RIGHTS;
+	cmsg->cmsg_len = CMSG_LEN(sizeof(fd));
+	memcpy(CMSG_DATA(cmsg), &fd, sizeof(fd));
+	ASSERT_GE(sendmsg(s[0], &msg, 0), 0) << strerror(errno);
+
+	close(fd);	// Close fd within our process
+	close(s[0]);
+	close(s[1]);	// The last copy of fd is within this socket's rcvbuf
+}
+
 /* When closing a file with a POSIX file lock, release should release the lock*/
 TEST_F(ReleaseWithLocks, unlock_on_close)
 {
diff --git a/tests/sys/fs/fusefs/write.cc b/tests/sys/fs/fusefs/write.cc
index 1fe2e3cc522d..f5573a865a04 100644
--- a/tests/sys/fs/fusefs/write.cc
+++ b/tests/sys/fs/fusefs/write.cc
@@ -32,9 +32,11 @@ extern "C" {
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -1398,6 +1400,77 @@ TEST_F(WriteBackAsync, eof)
 	leak(fd);
 }
 
+/*
+ * Nothing bad should happen if a file with a dirty writeback cache is closed
+ * while the last copy lies in some socket's socket buffer.  Inspired by bug
+ * 289686 .
+ */
+TEST_F(WriteBackAsync, scm_rights)
+{
+	const char FULLPATH[] = "mountpoint/some_file.txt";
+	const char RELPATH[] = "some_file.txt";
+	const char *CONTENTS = "abcdefgh";
+	uint64_t ino = 42;
+	int fd;
+	ssize_t bufsize = strlen(CONTENTS);
+	int s[2];
+	struct msghdr msg;
+	struct iovec iov;
+	char message[CMSG_SPACE(sizeof(int))];
+	union {
+		char buf[CMSG_SPACE(sizeof(fd))];
+		struct cmsghdr align;
+	} u;
+
+	expect_lookup(RELPATH, ino, 0);
+	expect_open(ino, 0, 1);
+	/* VOP_SETATTR will try to set timestamps during flush */
+	EXPECT_CALL(*m_mock, process(
+		ResultOf([=](auto in) {
+			return (in.header.opcode == FUSE_SETATTR &&
+				in.header.nodeid == ino);
+		}, Eq(true)),
+		_)
+	).WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) {
+		SET_OUT_HEADER_LEN(out, attr);
+		out.body.attr.attr.ino = ino;
+		out.body.attr.attr.mode = S_IFREG | 0644;
+		out.body.attr.attr.size = bufsize;
+	})));
+
+	expect_write(ino, 0, bufsize, bufsize, CONTENTS);
+	expect_flush(ino, 1, ReturnErrno(0));
+	expect_release(ino, ReturnErrno(0));
+
+	/* Open a file on the fusefs file system */
+	fd = open(FULLPATH, O_RDWR);
+	ASSERT_LE(0, fd) << strerror(errno);
+
+	/* Write to the file to dirty its writeback cache */
+	ASSERT_EQ(bufsize, write(fd, CONTENTS, bufsize)) << strerror(errno);
+
+	/* Send the file into a socket */
+	ASSERT_EQ(0, socketpair(AF_UNIX, SOCK_STREAM, 0, s)) << strerror(errno);
+	memset(&message, 0, sizeof(message));
+	memset(&msg, 0, sizeof(msg));
+	iov.iov_base = NULL;
+	iov.iov_len = 0;
+	msg.msg_iov = &iov;
+	msg.msg_iovlen = 1;
+	msg.msg_control = u.buf,
+	msg.msg_controllen = sizeof(u.buf);
+	struct cmsghdr *cmsg = CMSG_FIRSTHDR(&msg);
+	cmsg->cmsg_level = SOL_SOCKET;
+	cmsg->cmsg_type = SCM_RIGHTS;
+	cmsg->cmsg_len = CMSG_LEN(sizeof(fd));
+	memcpy(CMSG_DATA(cmsg), &fd, sizeof(fd));
+	ASSERT_GE(sendmsg(s[0], &msg, 0), 0) << strerror(errno);
+
+	close(fd);	// Close fd within our process
+	close(s[0]);
+	close(s[1]);	// The last copy of fd is within this socket's rcvbuf
+}
+
 /* 
  * When a file has dirty writes that haven't been flushed, the server's notion
  * of its mtime and ctime will be wrong.  The kernel should ignore those if it

From nobody Sat Sep 27 15:13:49 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrZP4Sfzz68DF7;
	Sat, 27 Sep 2025 15:13:49 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrZP3TMyz44Fx;
	Sat, 27 Sep 2025 15:13:49 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758986029;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=s+j5KvP8QGk8YauS6pquy4yRC5YEnyFNUviVLT0KHvc=;
	b=TgbRd9PA+QiZHuVguZpaLYdETkB4/s6N0aLEuTTiFGa4SMSykye2waTdwJ4bSLYfAvUQpx
	XDOa5DnmaPZda6hRb0j0TI/tKuUz/XeKtAXioJxm8QNOvZkCrBpbJVqqTfRFBw7ar/XLzd
	lZMNjNV84sGJH+AFP+WTVXl+/QeNawjSLEgAgAX00z9DmOUr1P6WdzwXcKuTjXIDiqy4od
	t4LpYwvVLXuEpawLy7lxCDqfg/XULyWnUTP6wJdxUthhpyFSPs+4KNRX5n7eeZqqQJ6ma3
	4GoChZdF7VsvTRmhXu8wvKanq7z1PVzC6zI/U1SoU7lDVj+9rW27xFHXkktsPw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986029;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=s+j5KvP8QGk8YauS6pquy4yRC5YEnyFNUviVLT0KHvc=;
	b=JYm6RHUogAsJwnXgGiZQeX+T1YBQR5fA6Rf/SkWHSciMy558eWsTZ6FHkn1kcnZJ2XChg2
	sxGf6Vi+VPMVE4fGFXtPG9tvyiWFs+r4d8wAcwXF7SL5cs/MUqhV6iv1AKdSkPPlWYr37D
	Jz/GKmSeSbhyZ3dWAw9BjzZjXnn9lMAJXdFrv2K0ywB0zSiZKYTmm9I4wD1PqyMvWPRDHh
	0GAUrLGTRLmD5n6WRPyGplAMYhJApiLxUC6J+zwSV3Mn0C77FbdomOaZiymsRH02p6JdDm
	jgydK0FlIIS3o0QTy2iexvCoGndHFzCLEd3SoUIUkLDrj7J47abCn0kE3dH+JA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986029; a=rsa-sha256; cv=none;
	b=vQFcMT01bL/km7mCaWDWpDhOtsfbIDKGcg9o90GQYkWmx8YVilgUddpM/pW0bshdSmKLGG
	ZDSQKzlYF3mRmIA+daDTl5c7mC+umb8g4tnKvj/RCdF4W59CwgswPK3U/yG9JRjuRccj5p
	A3ZFYZ80PfbCsGwJnuG16qcKvJXWRHwO/7FuYzm18O9MJBuAn7j69YpSWttwePGaypzQzl
	M/zdLViTYh+WZsscnIpgW+4P4m+bvenVwYlr35qCbCwAYhdhgoJ+dLSaQpwFRL4j3trkfY
	w+OxUvHtNdQx38Eh9KG/mahsI7GpMoqMtTeeGrFyD1f3V5Tva9mAf7/7QrmvjQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrZP355Xzg4x;
	Sat, 27 Sep 2025 15:13:49 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFDnj5082876;
	Sat, 27 Sep 2025 15:13:49 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFDn4g082873;
	Sat, 27 Sep 2025 15:13:49 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:13:49 GMT
Message-Id: <202509271513.58RFDn4g082873@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: e5f01421ddbf - stable/14 - tests: gif(4): Add regression
  tests for setup with EtherIP
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: e5f01421ddbfee935546271121e6254472dcc7f5
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit e5f01421ddbfee935546271121e6254472dcc7f5
Author:     Zhenlei Huang 
AuthorDate: 2025-08-08 10:17:51 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:34 +0000

    tests: gif(4): Add regression tests for setup with EtherIP
    
    Tunnel IPv[46] traffic over IPv[46] should still function when the
    gif(4) interface is member of a if_bridge(4) interface, aka the
    EtherIP setup.
    
    PR:             227450
    Reviewed by:    kp
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D51682
    
    (cherry picked from commit 04d0dc4c0c65592a21225cff43f25e0a0da64eb9)
---
 tests/sys/net/if_gif.sh | 154 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 154 insertions(+)

diff --git a/tests/sys/net/if_gif.sh b/tests/sys/net/if_gif.sh
index 5c7278d17e8f..bff88f9e75b6 100644
--- a/tests/sys/net/if_gif.sh
+++ b/tests/sys/net/if_gif.sh
@@ -202,10 +202,164 @@ atf_test_case "6in6" "cleanup"
 	vnet_cleanup
 }
 
+atf_test_case "etherip" "cleanup"
+etherip_head()
+{
+	atf_set descr 'EtherIP regression'
+	atf_set require.user root
+}
+
+etherip_body()
+{
+	vnet_init
+	vnet_init_bridge
+
+	if ! kldstat -q -m if_gif; then
+		atf_skip "This test requires if_gif"
+	fi
+
+	epair=$(vnet_mkepair)
+
+	vnet_mkjail one ${epair}a
+	gone=$(jexec one ifconfig gif create)
+	jexec one ifconfig ${epair}a 192.0.2.1/24 up
+	jexec one ifconfig $gone tunnel 192.0.2.1 192.0.2.2
+	jexec one ifconfig $gone 198.51.100.1/24 198.51.100.2 up
+	jexec one ifconfig $gone inet6 no_dad 2001:db8:1::1/64
+
+	bone=$(jexec one ifconfig bridge create)
+	jexec one ifconfig $bone addm $gone
+	jexec one ifconfig $bone 192.168.169.253/24 up
+	jexec one ifconfig $bone inet6 no_dad 2001:db8:2::1/64
+
+	vnet_mkjail two ${epair}b
+	gtwo=$(jexec two ifconfig gif create)
+	jexec two ifconfig ${epair}b 192.0.2.2/24 up
+	jexec two ifconfig $gtwo tunnel 192.0.2.2 192.0.2.1
+	jexec two ifconfig $gtwo 198.51.100.2/24 198.51.100.1 up
+	jexec two ifconfig $gtwo inet6 no_dad 2001:db8:1::2/64
+
+	btwo=$(jexec two ifconfig bridge create)
+	jexec two ifconfig $btwo addm $gtwo
+	jexec two ifconfig $btwo 192.168.169.254/24 up
+	jexec two ifconfig $btwo inet6 no_dad 2001:db8:2::2/64
+
+	# Sanity check
+	atf_check -s exit:0 -o ignore \
+	    jexec one ping -c 1 192.0.2.2
+
+	# EtherIP tunnel test
+	atf_check -s exit:0 -o ignore \
+	    jexec one ping -c 1 192.168.169.254
+	atf_check -s exit:0 -o ignore \
+	    jexec one ping -6 -c 1 2001:db8:2::2
+	atf_check -s exit:0 -o ignore \
+	    jexec two ping -c 1 192.168.169.253
+	atf_check -s exit:0 -o ignore \
+	    jexec two ping -6 -c 1 2001:db8:2::1
+
+	# EtherIP should not affect normal IPv[46] over IPv4 tunnel
+	# See bugzilla PR 227450
+	# IPv4 in IPv4 Tunnel test
+	atf_check -s exit:0 -o ignore \
+	    jexec one ping -c 1 198.51.100.2
+	atf_check -s exit:0 -o ignore \
+	    jexec two ping -c 1 198.51.100.1
+
+	# IPv6 in IPv4 tunnel test
+	atf_check -s exit:0 -o ignore \
+	    jexec one ping -6 -c 1 2001:db8:1::2
+	atf_check -s exit:0 -o ignore \
+	    jexec two ping -6 -c 1 2001:db8:1::1
+}
+
+etherip_cleanup()
+{
+	vnet_cleanup
+}
+
+atf_test_case "etherip6" "cleanup"
+etherip6_head()
+{
+	atf_set descr 'EtherIP over IPv6 regression'
+	atf_set require.user root
+}
+
+etherip6_body()
+{
+	vnet_init
+	vnet_init_bridge
+
+	if ! kldstat -q -m if_gif; then
+		atf_skip "This test requires if_gif"
+	fi
+
+	epair=$(vnet_mkepair)
+
+	vnet_mkjail one ${epair}a
+	gone=$(jexec one ifconfig gif create)
+	jexec one ifconfig ${epair}a inet6 no_dad 2001:db8::1/64 up
+	jexec one ifconfig $gone inet6 tunnel 2001:db8::1 2001:db8::2
+	jexec one ifconfig $gone 198.51.100.1/24 198.51.100.2 up
+	jexec one ifconfig $gone inet6 no_dad 2001:db8:1::1/64
+
+	bone=$(jexec one ifconfig bridge create)
+	jexec one ifconfig $bone addm $gone
+	jexec one ifconfig $bone 192.168.169.253/24 up
+	jexec one ifconfig $bone inet6 no_dad 2001:db8:2::1/64
+
+	vnet_mkjail two ${epair}b
+	gtwo=$(jexec two ifconfig gif create)
+	jexec two ifconfig ${epair}b inet6 no_dad 2001:db8::2/64 up
+	jexec two ifconfig $gtwo inet6 tunnel 2001:db8::2 2001:db8::1
+	jexec two ifconfig $gtwo 198.51.100.2/24 198.51.100.1 up
+	jexec two ifconfig $gtwo inet6 no_dad 2001:db8:1::2/64
+
+	btwo=$(jexec two ifconfig bridge create)
+	jexec two ifconfig $btwo addm $gtwo
+	jexec two ifconfig $btwo 192.168.169.254/24 up
+	jexec two ifconfig $btwo inet6 no_dad 2001:db8:2::2/64
+
+	# Sanity check
+	atf_check -s exit:0 -o ignore \
+	    jexec one ping -6 -c 1 2001:db8::2
+
+	# EtherIP tunnel test
+	atf_check -s exit:0 -o ignore \
+	    jexec one ping -c 1 192.168.169.254
+	atf_check -s exit:0 -o ignore \
+	    jexec one ping -6 -c 1 2001:db8:2::2
+	atf_check -s exit:0 -o ignore \
+	    jexec two ping -c 1 192.168.169.253
+	atf_check -s exit:0 -o ignore \
+	    jexec two ping -6 -c 1 2001:db8:2::1
+
+	# EtherIP should not affect normal IPv[46] over IPv6 tunnel
+	# See bugzilla PR 227450
+	# IPv4 in IPv6 Tunnel test
+	atf_check -s exit:0 -o ignore \
+	    jexec one ping -c 1 198.51.100.2
+	atf_check -s exit:0 -o ignore \
+	    jexec two ping -c 1 198.51.100.1
+
+	# IPv6 in IPv6 tunnel test
+	atf_check -s exit:0 -o ignore \
+	    jexec one ping -6 -c 1 2001:db8:1::2
+	atf_check -s exit:0 -o ignore \
+	    jexec two ping -6 -c 1 2001:db8:1::1
+}
+
+etherip6_cleanup()
+{
+	vnet_cleanup
+}
+
 atf_init_test_cases()
 {
 	atf_add_test_case "4in4"
 	atf_add_test_case "6in4"
 	atf_add_test_case "4in6"
 	atf_add_test_case "6in6"
+	atf_add_test_case "etherip"
+	atf_add_test_case "etherip6"
 }

From nobody Sat Sep 27 15:13:50 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrZQ6jRlz68D68;
	Sat, 27 Sep 2025 15:13:50 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrZQ4Sn1z4497;
	Sat, 27 Sep 2025 15:13:50 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758986030;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=fjtsx9b/s3c4y94tu4eSTrkos/4Z/NbFN1K7/RgiWA0=;
	b=dnd97Qco4KA+awx1uztUnHFISxjTR2+uSKRSK50jklSPBfDXwN5HAy3U9jm6FSSb79x5I9
	R1zjeAlEeHTjXfcK15FYwEKzt7YdcfBkWS4+nFLLS4OBLWFQKQuhSQwktwxf8mtC7jAYbm
	8HbkxUTS+2vBJnVQJRDVCDTksWa0g+vcrlPyctuMez29TZ02soLvcx3JUyZypD30cu/O2R
	864kMe5unX1Q8phmnPON3LYjIdJOho9CBTfNLdFYencNhSyxYWa9O7gK8qyXYRwZv8KaQ0
	2Az14SFaMz0Q2VneJMWjtlag4xO6bH6rPJ88y6GgDXI7tSd1jg2Bp/6p+86elw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986030;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=fjtsx9b/s3c4y94tu4eSTrkos/4Z/NbFN1K7/RgiWA0=;
	b=CAauPNJGYK4luQM8ze+ssdB0Rx1zp0Qdkpz6SieMb/t+SNJ0EXutD/Ce3LEWZRjUzZa5E5
	SEAU0IvGixtMXiMZK+Qt6fVSjt5JzC2bsDPGDpm1gpCrPHgQTXp2bfpGA5+1RLXQpk57Id
	/0CS5gMJH/RFYFIVZHfmX2Kp8ZGZS3Ya7Fjlh9mjs+/K5Y2zcR14D8BfWbaBnBlCSA3g+m
	wDcNeyD3k5YTV3JgAoQDXVYck2AExGYQeOBGp7vFlA8gsm4WEztfwyYagsPyNyEfWHJhNb
	x9DwWxDbNADRZcyQI62FLX01v7rsX6WYQHsJl94yUIMQtr/E7n42KfcdFWFQvQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986030; a=rsa-sha256; cv=none;
	b=N48VECGEZuL5AUqflyQNp2CPjjztexD/riFFiFvGi0Vtv0PSbFHPp3XyAjjEaQ//0lH8Un
	d06GA7Uzjmv5q0h7m6FmpWLX3ydDp01prfVXKTrFp7IXWLvyf9nTWwQP8cFXl0TgodRoYO
	DhqDBrURVrvDzUamV6Q+5XsyLPXgHAXSY9jw74H66cQRlks7IXuAGHWXMXLc3tcPY85VWX
	igq7KikaDGJ6VHyUrsjW7KNHEL4mJMYnodPCN3K9deZY2rIiFS4Og1DHie7rB0tCqXPa0F
	sbOpE7dliqLhRlHwzT1+5J6S6PbmCGaTOU3nunjDkexErvcGy+WiIlyoOJfUdQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrZQ43rLzfy8;
	Sat, 27 Sep 2025 15:13:50 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFDomb082910;
	Sat, 27 Sep 2025 15:13:50 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFDoQi082907;
	Sat, 27 Sep 2025 15:13:50 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:13:50 GMT
Message-Id: <202509271513.58RFDoQi082907@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: aeb8f341ad20 - stable/14 - EtherIP: Fix passing the
  address family from if_bridge(4) to gif(4)
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: aeb8f341ad20b5f49561fff688e8bee601b0e15a
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit aeb8f341ad20b5f49561fff688e8bee601b0e15a
Author:     Zhenlei Huang 
AuthorDate: 2025-08-08 10:17:51 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:34 +0000

    EtherIP: Fix passing the address family from if_bridge(4) to gif(4)
    
    Given IPPROTO_IPV4, IPPROTO_IPV6 and IPPROTO_ETHERIP have different
    protocol numbers, then it is perfect valid to tunnel IPv4, IPv6 and
    Ethernet traffic over IPv[46] by the same interface. Since gif(4) has
    already utilized the inbound csum_data field to carry address family,
    also teach if_bridge(4) to do that, rather than checking if a gif(4)
    interface is member of a if_bridge(4) interface.
    
    Without this fix, tunnel IPv[46] over IPv[46] will not work when the
    gif(4) interface is member of a if_bridge(4) interface, aka the EtherIP
    setup, as the address family passed from gif_output() will be overwritten
    with the wrong one AF_LINK by gif_transmit(), and end up with incorrectly
    encapsulated packets.
    
    PR:             227450
    Reviewed by:    kp
    Tested by:      meta
    Fixes:          8a0308722372 gif(4): Assert that gif_output() isn't called for EtherIP
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D51682
    
    (cherry picked from commit f4744b8acb932fbb3e48b71d31b7cd585566b668)
---
 sys/net/if_bridge.c |  6 ++++++
 sys/net/if_gif.c    | 10 +++-------
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index 035ba0f0806c..3a470454db27 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -2140,6 +2140,12 @@ bridge_enqueue(struct bridge_softc *sc, struct ifnet *dst_ifp, struct mbuf *m)
 		}
 
 		M_ASSERTPKTHDR(m); /* We shouldn't transmit mbuf without pkthdr */
+		/*
+		 * XXXZL: gif(4) requires the af to be saved in csum_data field
+		 * so that gif_transmit() routine can pull it back.
+		 */
+		if (dst_ifp->if_type == IFT_GIF)
+			m->m_pkthdr.csum_data = AF_LINK;
 		if ((err = dst_ifp->if_transmit(dst_ifp, m))) {
 			int n;
 
diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c
index ef64c15074ed..272ab214a788 100644
--- a/sys/net/if_gif.c
+++ b/sys/net/if_gif.c
@@ -312,10 +312,7 @@ gif_transmit(struct ifnet *ifp, struct mbuf *m)
 		goto err;
 	}
 	/* Now pull back the af that we stashed in the csum_data. */
-	if (ifp->if_bridge)
-		af = AF_LINK;
-	else
-		af = m->m_pkthdr.csum_data;
+	af = m->m_pkthdr.csum_data;
 	m->m_flags &= ~(M_BCAST|M_MCAST);
 	M_SETFIB(m, sc->gif_fibnum);
 	BPF_MTAP2(ifp, &af, sizeof(af), m);
@@ -355,6 +352,8 @@ gif_transmit(struct ifnet *ifp, struct mbuf *m)
 		break;
 #endif
 	case AF_LINK:
+		KASSERT(ifp->if_bridge != NULL,
+		    ("%s: bridge not attached", __func__));
 		proto = IPPROTO_ETHERIP;
 		M_PREPEND(m, sizeof(struct etherip_header), M_NOWAIT);
 		if (m == NULL) {
@@ -405,9 +404,6 @@ gif_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
 {
 	uint32_t af;
 
-	KASSERT(ifp->if_bridge == NULL,
-	    ("%s: unexpectedly called with bridge attached", __func__));
-
 	/* BPF writes need to be handled specially. */
 	if (dst->sa_family == AF_UNSPEC || dst->sa_family == pseudo_AF_HDRCMPLT)
 		memcpy(&af, dst->sa_data, sizeof(af));

From nobody Sat Sep 27 15:13:51 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrZS1BWJz68DNW;
	Sat, 27 Sep 2025 15:13:52 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrZR57hFz440d;
	Sat, 27 Sep 2025 15:13:51 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758986031;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Bsp++8Iir+xkRVRDpG6CT1osF96flTQhquS6E3P+NXE=;
	b=fHPKGqt8iaTAbJOjOrIs7YeU8AeScQUcs5TUlQiF4q6fMtOSH6I6J7S0heIERxrODhR7+B
	3+KNVXGNHuN18HBtOlZQb33EySF+80ejIRVh4nQKW63PRG1mSlHsq63qydMGY5j109h3Ba
	MS5RUvlUPRqzhrDXZz5ILSq2ZX0S9t64NUcvhWRNIfmMVqjhpx1hqrhC76tIDBlPByu7xw
	v2PjRMuhsj/F3lF8yE1W+WewC9YMtxO3KKU+d/ZEZmRLy/FOHDHheZAeo6KwtWAqkIUqco
	TQ0/S8gDVhA7n1xycHg4k/ib1/cXn647c/NbFfxK4ocX4RRGeqn027HcxiHVLg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986031;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Bsp++8Iir+xkRVRDpG6CT1osF96flTQhquS6E3P+NXE=;
	b=RpkX/3zPQNbvtjZ2J3aLSHfK4SPetjL7zLXL8WmlzrUwXeFSOaodzLmtlF50Q91NMQLiFo
	YU4iiWV22Hjul9X3th9DH8ZKbNkYDR6UgyTsiX6vA6h2m6OJXWFLBne6eDNl+Aq3nwSeyy
	JFpggtRAqHROCe5eFDl87yxe57kMCQVObxOK2cogWRo9kZEIF5qY7UzyJHwyaEFXH2b8xX
	0cDbv4EJJlq3RjN5xLRM07+O5g42v8n549Ub/52bJ2zvBKB/n/+c/LUNE/V3uc+RZeX1TU
	ZVsGzWf7hT+MelsFU57gJ4XVEteyPBLpVP/6pvKiKA6kG4BRf9WaR3xBEU45pw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986031; a=rsa-sha256; cv=none;
	b=QwN9lmFZkRcsWblh4t+xYQuiTJM75M3XBAGHknpzjmXVywcAUZYZn9Et0TkOhCQjM3hMBo
	4ViHUFI6UYI5sX9E8/34EogySnFTL74uuPtw7ncsgrl1y85VymHdEFcGw+AI9YFO7cAwvA
	vGoRn5gwQu6CQeRgbXyw9j9moxqc8SJI1c94AjhU2PvhO4nTG178gEr1oijXFsnLlUlAI+
	Vtpa1NE6hkBewVyOwznoJLdIrhrm7BrWxIa8ao7eFkS0lrQVbtV/mWBdB1pf/Dx3/qykCY
	R4bn48hvT1wqhSa9nHwHN3Ak8wKvYO/MzC3MoXFFv5PLMnqGQMa2fappb6Ex+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])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrZR4k3Nzfs7;
	Sat, 27 Sep 2025 15:13:51 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFDpK8082945;
	Sat, 27 Sep 2025 15:13:51 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFDptc082941;
	Sat, 27 Sep 2025 15:13:51 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:13:51 GMT
Message-Id: <202509271513.58RFDptc082941@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: 1b42526ce9f4 - stable/14 - gif.4: Mention that gif(4)
  can tunnel Ethernet traffic
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 1b42526ce9f4e4587f4179a7e78655ce34b95110
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit 1b42526ce9f4e4587f4179a7e78655ce34b95110
Author:     Zhenlei Huang 
AuthorDate: 2025-08-27 15:55:22 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:34 +0000

    gif.4: Mention that gif(4) can tunnel Ethernet traffic
    
    Ideally this manpage shall have examples for the EtherIP setup, but
    there has been one in if_bridge(4) since the introduction of EtherIP [1],
    so direct the setup to if_bridge(4) at this moment.
    
    While here, add RFC 3378 to the reference section.
    
    [1] 73ff045c575b Add RFC 3378 EtherIP support
    
    Reviewed by:    meta
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D51781
    
    (cherry picked from commit bf6027df0955cb79c9c56c47cc96709b2215c82a)
---
 share/man/man4/gif.4 | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/share/man/man4/gif.4 b/share/man/man4/gif.4
index 959510451011..03fc712bf2a6 100644
--- a/share/man/man4/gif.4
+++ b/share/man/man4/gif.4
@@ -27,7 +27,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd October 21, 2018
+.Dd August 27, 2025
 .Dt GIF 4
 .Os
 .Sh NAME
@@ -54,6 +54,16 @@ does not perform GRE encapsulation; use
 .Xr gre 4
 for GRE encapsulation.
 .Pp
+The
+.Nm
+interface can also tunnel Ethernet traffic over IPv4 or IPv6
+when combined with a
+.Xr if_bridge 4
+interface using EtherIP protocol.
+See
+.Xr if_bridge 4
+for detailed setup.
+.Pp
 Each
 .Nm
 interface is created at runtime using interface cloning.
@@ -169,6 +179,7 @@ variable
 to the desired level of nesting.
 .Sh SEE ALSO
 .Xr gre 4 ,
+.Xr if_bridge 4 ,
 .Xr inet 4 ,
 .Xr inet6 4 ,
 .Xr ifconfig 8
@@ -188,6 +199,13 @@ to the desired level of nesting.
 .%D December 1999
 .%O draft-ietf-ipsec-ecn-02.txt
 .Re
+.Rs
+.%A R. Housley
+.%A S. Hollenbeck
+.%T EtherIP: Tunneling Ethernet Frames in IP Datagrams
+.%R RFC 3378
+.%D September 2002
+.Re
 .\"
 .Sh HISTORY
 The

From nobody Sat Sep 27 15:13:52 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrZT37Qbz68D69;
	Sat, 27 Sep 2025 15:13:53 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrZS6H98z444Q;
	Sat, 27 Sep 2025 15:13:52 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758986032;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=PsEk8U2IuRy3wys5Z1UTPR5b9DCDqcqCjAXtZA9N2gc=;
	b=xVcDWPp+vRaurr0VvU/lLI5BNt51AROgrQJahgwVIuzyJvoH3Sf+0kWGU7Ckx8ORBF4KH+
	GgDCWhJZ9z2K1ECW/qz76DCGOVFdEabmCHOg0cWml0CnD8rIamPdkzxQovtNqaRUvaDmXU
	FPZdqNc871rJSNBqztboIMfNbbxgnmW0miC5fm+U2d4hII2nyh8rXntkXH5d4ielIOEPBB
	6W6RplKeLsi5UW1xZ6qozj+ivsHylDhZjrIPaQ3ZIiyASTVddBJTHnHJ3njt8apV18Ip3G
	VhP8o3ylocxGFp8ftatS5DnipD3/5AAgnlGxh8iJZmltGOfSrZusrrbUEaERAA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986032;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=PsEk8U2IuRy3wys5Z1UTPR5b9DCDqcqCjAXtZA9N2gc=;
	b=BOo8cQNzSvBkSRgfaubYcRxPCxzG3BJMm7rljEiUHkCDBalwpbP2+fZHmeZXySTdwDZkYV
	3yie8YkaDcX681L+jpdaDOhU41FGJoWxX2DVWsLYH1/JlMdIUuf7C1BM13uHq9dbRuCStU
	UsWyTf4fcDueSFB7OCVCtIVuVP1YEUujzYQuNI6N9Z3oY7cTv7L9Wv7Sx91S+2UwE90LuN
	C8H+j1oGi5n5yHbvfhaCvX4k+OoHmEWpo+RuSoIFvlIsmEK5la0A8EuH9WZh6oQZjbm0ow
	UO0xjBzmlCEqbgyja6bn8ZYqyzrb+Iz2or1dch4nBX/F7miQ/156fSDH7bVrIg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986032; a=rsa-sha256; cv=none;
	b=OouIk8o0RR4MctVpmoZO3AWkPKlgpf/S8Es17wIaHORaCKO/F5z884tVGB67fOztKkbaqn
	BpXc+bAoRtHJ8dG0g0zZGDGJsvNnXWs0rXmSMfsgphDExxCjdTYUPpMIZrNzsPeTKWDP/L
	RveLTGnRc6TXxG8P1V0CFYM3kYbeyAW1KlEtDFl3KC5vZ//kOOaUd5TNKObwwKmiXwQr4r
	C0CnXNR8bwAgxP62zWI2rTT0u8utEPl1z2pDzf/FyffKawHgDxsmC0yno5tvV8MWbV1dzW
	Gazunytzjir9+hICtfI4P4gqobOnCw71/LhOUajk1uDukErzKMKk7a3+pIG+0w==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrZS5rkGzg4y;
	Sat, 27 Sep 2025 15:13:52 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFDqY9082984;
	Sat, 27 Sep 2025 15:13:52 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFDqTx082981;
	Sat, 27 Sep 2025 15:13:52 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:13:52 GMT
Message-Id: <202509271513.58RFDqTx082981@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: 5c6fae9d27da - stable/14 - tests: bridge: Add regression
  test for gif(4) interface as bridge member
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 5c6fae9d27dacf77c900e9b982d35a6095b22ec6
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit 5c6fae9d27dacf77c900e9b982d35a6095b22ec6
Author:     Zhenlei Huang 
AuthorDate: 2025-09-01 10:14:22 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:34 +0000

    tests: bridge: Add regression test for gif(4) interface as bridge member
    
    if_bridge(4) should not prohibit adding a gif(4) interface which is
    assigned with IP addresses as a bridge member regardless of the setting
    of sysctl variable net.link.bridge.member_ifaddrs.
    
    Assigning IP addresses on the gif(4) interface should not be affected
    no matter whether it is member of a bridge interface or not.
    
    PR:             227450
    Reported by:    Siva Mahadevan 
    Reviewed by:    ivy (previous version)
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D52200
    
    (cherry picked from commit b944c8ff17971b1c8f61d5612eac146f5d589e87)
---
 tests/sys/net/if_bridge_test.sh | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/tests/sys/net/if_bridge_test.sh b/tests/sys/net/if_bridge_test.sh
index 264a8986fcf9..8fe3c4ac7d4d 100755
--- a/tests/sys/net/if_bridge_test.sh
+++ b/tests/sys/net/if_bridge_test.sh
@@ -586,6 +586,25 @@ gif_body()
 		jexec one ping -c 1 -s 1200 198.51.100.2
 	atf_check -s exit:0 -o ignore \
 		jexec one ping -c 1 -s 2000 198.51.100.2
+
+	# Assigning IP addresses on the gif tunneling interfaces
+	jexec one sysctl net.link.bridge.member_ifaddrs=1
+	atf_check -s exit:0 -o ignore \
+		jexec one ifconfig ${gif_one} 192.168.0.224/24 192.168.169.254
+	atf_check -s exit:0 -o ignore \
+		jexec one ifconfig ${gif_one} inet6 no_dad 2001:db8::1/64
+	jexec one ifconfig ${bridge_one} deletem ${gif_one}
+	atf_check -s exit:0 -o ignore \
+		jexec one ifconfig ${bridge_one} addm ${gif_one}
+
+	jexec two sysctl net.link.bridge.member_ifaddrs=0
+	atf_check -s exit:0 -o ignore \
+		jexec two ifconfig ${gif_two} 192.168.169.254/24 192.168.0.224
+	atf_check -s exit:0 -o ignore \
+		jexec two ifconfig ${gif_two} inet6 no_dad 2001:db8::2/64
+	jexec two ifconfig ${bridge_two} deletem ${gif_two}
+	atf_check -s exit:0 -o ignore \
+		jexec two ifconfig ${bridge_two} addm ${gif_two}
 }
 
 gif_cleanup()

From nobody Sat Sep 27 15:13:54 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrZW2FFSz68D8x;
	Sat, 27 Sep 2025 15:13:55 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrZW0VTwz444h;
	Sat, 27 Sep 2025 15:13:55 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758986035;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=BVCMyuZ+UA3AWzxZALlTtM5DkgZUpes0ty97zRfaIJM=;
	b=MO4SPwbIYM0azs2KJB5AASgWjw7JUFIg/qAZlkwc6zrBDARmxAam0FF1tTr+XLT7JUvL4a
	++SC/lsNNgnramw7k3Fow+uEYhlEF6aTEXtd5WGP/AAoyJxwiOHM9IyustdVZGvWBQCSD4
	9e7PvxGhYNj6rIRyb+q5sGJx6WTYvuZYVLJzgEJlDzC2/miLWYjyafiCK/wVfkDRoEEMGM
	wVsOTqICa7/rsQY1ZRb7bLld5G69+h/tBAlRy5t8ZZurjRUMqfZB2uEtAlU5NFem9Y3n5F
	Clk9U7zTMn+BD1KZsaYyWbUGUoAZ7FZo6mQxpdv+VguSeQxBE8RBAQgqwGEL8w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986035;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=BVCMyuZ+UA3AWzxZALlTtM5DkgZUpes0ty97zRfaIJM=;
	b=gbjo1MvMxu8YMhlIE29u024FHe9uhOyHVX/Ne2KT7SRuq6VjtlDGINcPBVNgCerGYzCTOV
	rTWkw/GoyqX6fMZfCNb3+f7Zzf4TRQnWHsrBab5Qbna5hPU5HGvAH6FdEfQJs+dmmrXE20
	JzZA0WCnN3WE/4QoRY8wZ7EpyhkiQSZwMWggBJ5bO72/FKkl/BPzrqYdM0ih0WhFVbDc9Q
	tQPLCXPYlNTVGv06qyoe6eMMf8/EeR/30sCOmE47NAIejQOt7wMI9M72HZjZ+75LgnddQL
	+794qcjtzDFMVc7d2hr9PCPjlrymHKdslznJPsw73oYMAjkSSfiuW6+OcHjDEA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986035; a=rsa-sha256; cv=none;
	b=i4iqdqkRArTnk4RWFK9nhOq6P43y7m0hV3k03Jr3gpTuhtJH3A0/3v9Tjdj0Y7f7j8USNK
	Am5l83P+X9d8+ZGFXR1YagdrgXVAgKSJ2S6OPkaAy7P4xslyBd8kg6ihPUOsbDAmcjdgKP
	03OeNBEbU3YJT+wn+cRX4Hd2C1PByw6wKshlaWGrWfzGWWdbTEJw+Con95CFB4wGNZAiwX
	BSpWNpr7KUj3t6X3Q7VKSgcjXLwbJCdNIUPHPxKWzEh+s5Zvr+3o2asDtvo489toWoCIWt
	5/C5JYavHTZxML9WtjAthiIlyTMfiXEhNPYqsjcAW0UvUMujpXZhk1tmmmRaFw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrZV74DczfWM;
	Sat, 27 Sep 2025 15:13:54 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFDseQ083060;
	Sat, 27 Sep 2025 15:13:54 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFDst3083057;
	Sat, 27 Sep 2025 15:13:54 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:13:54 GMT
Message-Id: <202509271513.58RFDst3083057@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: b4c6c3db0379 - stable/14 - ipfw: Teach ipfw that
  EtherIP is an upper layer protocol
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: b4c6c3db0379a5b3d34143325805cd7e68cf3d9a
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit b4c6c3db0379a5b3d34143325805cd7e68cf3d9a
Author:     Zhenlei Huang 
AuthorDate: 2025-09-16 15:58:24 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:35 +0000

    ipfw: Teach ipfw that EtherIP is an upper layer protocol
    
    so that we do not discard EtherIP packets ( over IPv6 network ) when
    net.inet6.ip6.fw.deny_unknown_exthdrs is set to 1 ( which is the default
    value ).
    
    PR:             227450
    Reviewed by:    ae, #network
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D52566
    
    (cherry picked from commit 0418e6690e91aa6c38dd9af9da43c4c5a9dc1cd2)
    (cherry picked from commit b1c96e54b906d0cdea0b5a9c74cc295803dfe50e)
---
 sys/netpfil/ipfw/ip_fw2.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sys/netpfil/ipfw/ip_fw2.c b/sys/netpfil/ipfw/ip_fw2.c
index 0e0ecd3c6b20..928ccefe4803 100644
--- a/sys/netpfil/ipfw/ip_fw2.c
+++ b/sys/netpfil/ipfw/ip_fw2.c
@@ -67,6 +67,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -1717,6 +1718,12 @@ do {								\
 				PULLUP_TO(hlen, ulp, struct ip);
 				break;
 
+			case IPPROTO_ETHERIP:	/* RFC 3378 */
+				PULLUP_LEN(hlen, ulp,
+				    sizeof(struct etherip_header) +
+				    sizeof(struct ether_header));
+				break;
+
 			case IPPROTO_PFSYNC:
 				PULLUP_TO(hlen, ulp, struct pfsync_header);
 				break;

From nobody Sat Sep 27 15:13:53 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrZV6WSyz68Dfb;
	Sat, 27 Sep 2025 15:13:54 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrZT72BJz4432;
	Sat, 27 Sep 2025 15:13:53 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758986034;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=EtGfVD0A1YBxYRHEL6s5ivXLps/c5PJnAFK/NFPWZ8c=;
	b=HT9F3us/WMfQIT/JQaVJQHIx6pbm5o2ui27AaeOqB/7afWloJi32Pti0c+Z9br0PNIeTME
	Z5qW8o9tGX7M6pOEjOFYEYRBSUBTqLdFgxpiJcw9mMxHCxMXV4IVYm1Iq9JOr+7it5rWbQ
	5CGr1v2kgqSGdbDTMUNNtwkmpRRV2CRi17wVTjDB7iNlBQ2nNZRbmq7owRyn+99q4uvNvn
	x58xJneWoTnDe9IR38YorD5enSjf+jw/a+R8kWVNxhiL7vwTaw7GMxbes/VEwbg0eQ5Zcx
	xhDQ6vv6Ug/i802xUcrXrdWhtsyXzrxd2+htoLrpDzSkMMDFeB0pFFF1POHj5g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986034;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=EtGfVD0A1YBxYRHEL6s5ivXLps/c5PJnAFK/NFPWZ8c=;
	b=aXV3Kvzk0YwzZAvWwZuzxXDADr3d4LmY8MpXB2n3BAs6koPNAu95HXIT2MocajeKjLtzLD
	QwEXtwV7H6yUpvWGIVXZJjzleWmkO3dsZEe4QukzqY7Fv20/NaCn81EnbgZvqwUvZsxrgI
	8P9jnTRNtDZSauJLyhTwV74LMMM/8z7NtyVWKY2/plQI0xi8djqmPjJw4cxxrNMCCyvOeQ
	QarZnsOYzNRjz+RnGQlHBial60EZxl/fPTv4NZ8AkW7lRuQsVX9QyB30nEU37ef8ILHhvR
	uGSlRhOshFoHWk1R+DlDzUYSQqsR9QMjMPx6WZ4fRDwKsATb//RSGazm3YcS3w==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986034; a=rsa-sha256; cv=none;
	b=wGhYP4m6sVSZOK4KRfaU0rJ/zwQwBa+BBQDwRLqC5Ii3crJOoZdzxN5mSIqbQdZqRQY4fK
	DvueDh0MnifLF2X/gLmNxdbgvbbbrN+eMqL4djbs32eNyys6NX3tvNtNdmFAq0CB4W5R20
	/XaEUSmTO9q1/N6OIPF8yjJ9OBaxYlMLAfdjk5vBc4hzCowJlM+RbdgbDV8WGHqRVR4u44
	DJ53hijKk+1mH/9jS6OV/MGs8+/5ziYlLsc+i1P5AwGfjUzuWgOcY1I3VB7MSezibrCTGk
	Pk/YB0rJFDDkusZ1qB9bXlXo4JOwOAmIPgza0vHzQucWaGFHg00zprcgTZfc+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])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrZT6TZTzfs8;
	Sat, 27 Sep 2025 15:13:53 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFDrEu083019;
	Sat, 27 Sep 2025 15:13:53 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFDrx8083015;
	Sat, 27 Sep 2025 15:13:53 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:13:53 GMT
Message-Id: <202509271513.58RFDrx8083015@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: 52dbbe3f37ff - stable/14 - bridge: Fix adding gif(4)
  interface assigned with IP addresses as bridge memeber
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 52dbbe3f37ffda10751c3146b9ec0e11772fd5b6
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit 52dbbe3f37ffda10751c3146b9ec0e11772fd5b6
Author:     Zhenlei Huang 
AuthorDate: 2025-09-01 10:14:22 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:35 +0000

    bridge: Fix adding gif(4) interface assigned with IP addresses as bridge memeber
    
    and fix assigning IP addresses to the gif(4) interface when it is a
    member of a if_bridge(4) interface.
    
    When setting the sysctl net.link.bridge.member_ifaddrs to 1, if_bridge(4)
    can eliminate unnecessary walk of the member list to determine whether
    the inbound unicast packets are for us or not.
    
    Well when a gif(4) interface is member of a if_bridge(4) interface, it
    acts as the tunnel endpoint to tunnel Ethernet frames over IP network,
    aka the EtherIP protocol, so the IP addresses configured on it are
    independent of the if_bridge(4) interface or other if_bridge(4) members,
    hence the sysctl net.link.bridge.member_ifaddrs should not have any
    influnce over gif(4) interfaces's behavior of assigning IP addresses.
    
    PR:             227450
    Reported by:    Siva Mahadevan 
    Reviewed by:    ivy, #bridge
    MFC after:      1 week
    Fixes:          0a1294f6c610 bridge: allow IP addresses on members to be disabled
    Differential Revision:  https://reviews.freebsd.org/D52200
    
    (cherry picked from commit 9764aa1ccad08a7ec53ed9b80741b9553f3fa4e6)
---
 sys/net/if_bridge.c | 6 +++---
 sys/netinet/in.c    | 4 ++--
 sys/netinet6/in6.c  | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index 3a470454db27..0f4ec01fb392 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -1328,10 +1328,10 @@ bridge_ioctl_add(struct bridge_softc *sc, void *arg)
 #endif
 
 	/*
-	 * If member_ifaddrs is disabled, do not allow an interface with
-	 * assigned IP addresses to be added to a bridge.
+	 * If member_ifaddrs is disabled, do not allow an Ethernet-like
+	 * interface with assigned IP addresses to be added to a bridge.
 	 */
-	if (!V_member_ifaddrs) {
+	if (!V_member_ifaddrs && ifs->if_type != IFT_GIF) {
 		struct ifaddr *ifa;
 
 		CK_STAILQ_FOREACH(ifa, &ifs->if_addrhead, ifa_link) {
diff --git a/sys/netinet/in.c b/sys/netinet/in.c
index 21555a0714b6..75ff9066875c 100644
--- a/sys/netinet/in.c
+++ b/sys/netinet/in.c
@@ -503,8 +503,8 @@ in_aifaddr_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp, struct ucred *cred
 	/*
 	 * Check if bridge wants to allow adding addrs to member interfaces.
 	 */
-	if (ifp->if_bridge && bridge_member_ifaddrs_p &&
-	    !bridge_member_ifaddrs_p())
+	if (ifp->if_bridge != NULL && ifp->if_type != IFT_GIF &&
+	    bridge_member_ifaddrs_p != NULL && !bridge_member_ifaddrs_p())
 		return (EINVAL);
 
 	/*
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index 0e2c19efe9d5..b6ecf24a73cd 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -1238,8 +1238,8 @@ in6_addifaddr(struct ifnet *ifp, struct in6_aliasreq *ifra, struct in6_ifaddr *i
 	int error;
 
 	/* Check if this interface is a bridge member */
-	if (ifp->if_bridge && bridge_member_ifaddrs_p &&
-	    !bridge_member_ifaddrs_p()) {
+	if (ifp->if_bridge != NULL && ifp->if_type != IFT_GIF &&
+	    bridge_member_ifaddrs_p != NULL && !bridge_member_ifaddrs_p()) {
 		error = EINVAL;
 		goto out;
 	}

From nobody Sat Sep 27 15:13:55 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrZY0XjVz68DBv;
	Sat, 27 Sep 2025 15:13:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrZX1P4tz44Lc;
	Sat, 27 Sep 2025 15: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=1758986036;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=2YuE1jluU/NdMwJTy3+/RMq7YOLWpDkL6BEJ7301TGo=;
	b=VbJ/Fbhn73YC7i5BJiwH146A88n6C0+VYasnm69o3d9nzdlHsY8g+dgKOX9cR7WUVo2j+P
	4Ce/xuKQovbEpVnVPlUOgjhepYSAbE295U94764gGe7I9lJToqc5VfV3ibvRhknw9GNY56
	xAsFeGSvPFILdwVCu6tQKlO27AXDjkRmx3SDZ015Av8uvv7iB972H2Ut5V92NSiGhZGXxA
	zfCAPweXkRcUrRFugxrfCwzD2hAvV7XBQb1QF55yfIMIUiN0RVncqQowW+QwTt8KR0fdSj
	NmNAxYPuzTnyra3IWT2bX5zHVRLcuhW5Z/5JNts5pP4ELEPfG0Z1wPARy4fljw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986036;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=2YuE1jluU/NdMwJTy3+/RMq7YOLWpDkL6BEJ7301TGo=;
	b=adETReD0xyBiQ8HgU3hx5ma36hi/cNrLWJFfciQxqbodjbiP+AWFVVUd4Z3hkSRMadV88G
	uRtpYm5UBh4c8s73Rq5J5CmCUG1E00rwbIqFmlB384SgdXo56gau9fGBPjjnFB5rycQ3F5
	bX3Gr312ZhlA0dKR4zujD2w94rRneYzCm8oRwMSqrsfYuggfYq9FhGxaY3bPsZ/jjhasbg
	a4Sr3AzY+39stYqHOwi25d1rAPqQtswO/Iodt4ZRdU0+hmpVN6ZSQ33deFnPRRqi5dhmBX
	gudwSUPlYT7CkdhGPa3l03nIYehZ/OysPpIhaFlq3FMLLPUCNo67LVtmFOoHnQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986036; a=rsa-sha256; cv=none;
	b=GxXS2P9uZAS+qQmGnOdtWqBWk8Rqdrg0FkXB9FGLZP8Iwfh+aLucO7W8FIjTxUk0lQTB6+
	tIWob8eH2p+SFq9/wAUNa3amdK9aT/DSpzQWHi/29G5aR0Z2EcgELWLl7/Zw/ydzlZz6uO
	xFBfSCYDnLwSvELcecCotqC3DrgpNlVk+BEvtZagxiD3GVT4C1frtGnIYKJf1PPc2CofBX
	kGbJ7WjEe7eFf26D9Eu2Z+jGHUSO/jjNY1blpBcos6VuhlPQSRkdFgGvVOa+H6Em1eu309
	UKV0oith7Q0c47ymQoNRfJsGwDZywl7CfsUFCyJq/L8c1wY7ZS6A7MJCIFQ70w==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrZX0cWPzfWN;
	Sat, 27 Sep 2025 15:13:56 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFDtIR083095;
	Sat, 27 Sep 2025 15:13:55 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFDtlS083092;
	Sat, 27 Sep 2025 15:13:55 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:13:55 GMT
Message-Id: <202509271513.58RFDtlS083092@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: 8d6bc14c5474 - stable/14 - iflib: Make iflib_register()
  return void
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 8d6bc14c547472aafeddae65ae64024a24c5c5a7
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit 8d6bc14c547472aafeddae65ae64024a24c5c5a7
Author:     Zhenlei Huang 
AuthorDate: 2025-08-30 15:23:51 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:35 +0000

    iflib: Make iflib_register() return void
    
    It never fails since change [1]. No functional change intended.
    
    [1] aa3860851b9f net: Remove unneeded NULL check for the allocated ifnet
    
    Reviewed by:    kbowling, #iflib
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D50713
    
    (cherry picked from commit bb5135d0f2276e84b7abfcc481c92000647f68d4)
---
 sys/net/iflib.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/sys/net/iflib.c b/sys/net/iflib.c
index dc93da722ef4..1113a5e8e9f4 100644
--- a/sys/net/iflib.c
+++ b/sys/net/iflib.c
@@ -709,7 +709,7 @@ static uint32_t iflib_txq_can_drain(struct ifmp_ring *);
 static void iflib_altq_if_start(if_t ifp);
 static int iflib_altq_if_transmit(if_t ifp, struct mbuf *m);
 #endif
-static int iflib_register(if_ctx_t);
+static void iflib_register(if_ctx_t);
 static void iflib_deregister(if_ctx_t);
 static void iflib_unregister_vlan_handlers(if_ctx_t ctx);
 static uint16_t iflib_get_mbuf_size_for(unsigned int size);
@@ -5214,10 +5214,7 @@ iflib_device_register(device_t dev, void *sc, if_shared_ctx_t sctx, if_ctx_t *ct
 	ctx->ifc_dev = dev;
 	ctx->ifc_softc = sc;
 
-	if ((err = iflib_register(ctx)) != 0) {
-		device_printf(dev, "iflib_register failed %d\n", err);
-		goto fail_ctx_free;
-	}
+	iflib_register(ctx);
 	iflib_add_device_sysctl_pre(ctx);
 
 	scctx = &ctx->ifc_softc_ctx;
@@ -5458,7 +5455,6 @@ fail_unlock:
 	CTX_UNLOCK(ctx);
 	IFNET_WUNLOCK();
 	iflib_deregister(ctx);
-fail_ctx_free:
 	device_set_softc(ctx->ifc_dev, NULL);
 	if (ctx->ifc_flags & IFC_SC_ALLOCATED)
 		free(ctx->ifc_softc, M_IFLIB);
@@ -5756,7 +5752,7 @@ _iflib_pre_assert(if_softc_ctx_t scctx)
 	MPASS(scctx->isc_txrx->ift_rxd_flush);
 }
 
-static int
+static void
 iflib_register(if_ctx_t ctx)
 {
 	if_shared_ctx_t sctx = ctx->ifc_sctx;
@@ -5802,7 +5798,6 @@ iflib_register(if_ctx_t ctx)
 		ifmedia_init(ctx->ifc_mediap, IFM_IMASK,
 		    iflib_media_change, iflib_media_status);
 	}
-	return (0);
 }
 
 static void

From nobody Sat Sep 27 15:13:57 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrZY6sbtz68Dc8;
	Sat, 27 Sep 2025 15:13:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrZY1g27z44Cp;
	Sat, 27 Sep 2025 15:13:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758986037;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=GRyv2F6jP5E4Leo8RSVCV+oCP3XnY+JnrtExC5gUHE4=;
	b=tzuPtJse8bIH7JMyRiTaGCvue0XSC1iDZDBlR0J5/ryn8TvSttGMLyXigs8ZXi89Dvp8os
	LdEdK6wr9/wXeC+PQNixmu4Gn2uRgdPIsDR/lS17qyRW3VoBpyUv2E7O4lUmojfct7vowR
	ZYZYl0vSOeRRYyDTR0huBb32Akp+ceY/v2pSplbuh2vxCuKAV0GJVQckyLh1Lmd8SJ567J
	8mJqibvOzqS79SwJvdVsZq9vkViVnyOn+cFmu/v+1MOH2HOk9Q5t8wfgFDEpOF2jnzza4X
	0/2EhB7snEDP4tylCDVfhQy9r1VGeZsO26NLMv9M25PM0H8WpmNAugsfVjPURw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986037;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=GRyv2F6jP5E4Leo8RSVCV+oCP3XnY+JnrtExC5gUHE4=;
	b=VgB2eblbuI70kjVjXqS75S4pvgff7vFMzQU1Spf1y/6+Q/r41v8f7YUXU50FUauCB4ubk4
	MiKcO7bwW1a799LqaM16Ls4yC2nuHykfQYzspFPvs+3ITCvrHMs3XfxZ3ludbfErJf6zXD
	G6OoaZ9m9N/Y0gLj7Jxic4ROTNOAIHP3OY694f3iDqDyLI5GNOQizqPlcatgrn71CNnOuk
	/PaK+gyihJQUCFlKOfU6BU//cYTUcxH5QvvJJmacQtln2onEKO4/vGIMe3pOorIt8e1mrW
	zJEV0mv4+k7v4doZak8g9v0DPXLSxfSRZ+Aq5rMVJGyxcmrAxbCWDXltjHdFjw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986037; a=rsa-sha256; cv=none;
	b=h+FP8u0kX/bMU9TAER3EVajUAJG4z0buLDk2v8DhmhOxtHhyBpR1ih3phOPlyo4HZ2fvyA
	XnY9N6ZkTh3rSKb2eRkpw0lcfc8KyU2Xw3Zr9XAPJwNFeRWXmZLXpT5RJlBahgnrwQaA+k
	R+e5gyNUxo4XoFgPrsHawUa2ONxiZoC+8NsTS4EGFaEXAhFI47tb66WOddvwPqtuA0BUT1
	yEfd+pV5ViNxx6UFSsNpsJ7QVfXnkKVe2rJh/CuFHMqr9xX6GnxsGasDY9ra9ZSJaHPhWo
	k/tVg57HcnGZiPXQXurZOeWOmQPplh1+OQ+5bKaNwK8QrPgzLEUpmqcQueEauA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrZY1DH6zfy9;
	Sat, 27 Sep 2025 15:13:57 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFDv2k083133;
	Sat, 27 Sep 2025 15:13:57 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFDv38083127;
	Sat, 27 Sep 2025 15:13:57 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:13:57 GMT
Message-Id: <202509271513.58RFDv38083127@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: 04741ceafa2c - stable/14 - iflib: Set the get counter
  routine prior to attaching the interface
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 04741ceafa2c14b6352626e66b99d023a65be006
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit 04741ceafa2c14b6352626e66b99d023a65be006
Author:     Zhenlei Huang 
AuthorDate: 2025-08-30 15:23:51 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:36 +0000

    iflib: Set the get counter routine prior to attaching the interface
    
    This ensures other threads, e.g. ioctl threads, see the correct counter
    routine once after the interface has been attached.
    
    This change partially reverts commit 23ac9029f96b, which for unclear
    reason moved setting the get counter routine after ether_ifattach().
    
    Reviewed by:    kbowling, kgalazka, #iflib
    Fixes:          23ac9029f96b Update iflib to support more NIC designs
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D50712
    
    (cherry picked from commit ae7f8da8bf6ed0c4f0e9f0e95ae2b08abce54378)
---
 sys/net/iflib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/net/iflib.c b/sys/net/iflib.c
index 1113a5e8e9f4..65d383e2d51e 100644
--- a/sys/net/iflib.c
+++ b/sys/net/iflib.c
@@ -5431,7 +5431,6 @@ iflib_device_register(device_t dev, void *sc, if_shared_ctx_t sctx, if_ctx_t *ct
 
 	DEBUGNET_SET(ctx->ifc_ifp, iflib);
 
-	if_setgetcounterfn(ctx->ifc_ifp, iflib_if_get_counter);
 	iflib_add_device_sysctl_post(ctx);
 	iflib_add_pfil(ctx);
 	ctx->ifc_flags |= IFC_INIT_DONE;
@@ -5785,6 +5784,7 @@ iflib_register(if_ctx_t ctx)
 	if_settransmitfn(ifp, iflib_if_transmit);
 #endif
 	if_setqflushfn(ifp, iflib_if_qflush);
+	if_setgetcounterfn(ifp, iflib_if_get_counter);
 	if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST);
 	ctx->ifc_vlan_attach_event =
 	    EVENTHANDLER_REGISTER(vlan_config, iflib_vlan_register, ctx,

From nobody Sat Sep 27 15:13:59 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrZc1CNwz68DYp;
	Sat, 27 Sep 2025 15:14:00 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrZb3QvKz445D;
	Sat, 27 Sep 2025 15:13:59 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758986039;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=9dMEvLjB/Q0Mt2QDoupaXUvlx0TwIBIp6VCiNHTdo7w=;
	b=LG8HKxcNLwkj61pXivJDfJjNI0U0q52pCy5OfC6oex3mc3d0K6T4tRe+Kx3MTAzoLXlLAr
	uF3ukLAurx9FLIk5sf5BYVI6Mk4c3zudistXRX3xqHQuOLx+TOn+iOIBlehHI2YMmIcEnB
	UtisD0tTI9uaytgpYM1XUrCn4k3QYcLEJZRj7yLj79ukNfMxJzm+gBktBpGLJKaOg5P+jF
	XIZWyULlVXfQ2yJ/emt15Hvuu2LTf4h37yt9pvYoRzBqqAwvI70lcuYCYkqMw7+9CwoRF6
	wMcjflgO1LOyvuCcZWCDx6Es5aaM6XAvZzEht9O59nH+y3tiJIuHD81J40qVqA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986039;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=9dMEvLjB/Q0Mt2QDoupaXUvlx0TwIBIp6VCiNHTdo7w=;
	b=VfdjNvnzaQp9diHBaSEd79smzZ9BOnUnFGVqjuvppMxStvjtApj2afHP+u59z1+jmdsKKv
	FYoDOup/DrW/yUnJyp/yFrMD9J7f9Y/f6cfB830lTg2DzSxWE+O28fMF4u5xChMWY7SG2F
	AA3K25ugDyjfdbqCF2EERYvTB8vKjv6WD3Gok6lxBFEwgB/G8DPEEYHyvmIBjxiCGKDaPX
	qr2eOw2R5V1dOIRkVaQMd80l1ckujBzMgYZV1jyc4MX6kVVAOIh9xM/WiJ51JUVXiKx5+E
	wpm55ovZxUG4BZRfSHuBQ1UG0LtiwfRatjQzMmS6dnpD33746l7o6rFsLjh7Pw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986039; a=rsa-sha256; cv=none;
	b=Htdg1kj+7s1TyFxakBI7oX6NfteKJDwW5R6C3mHpDkv4bx+jBDEpXmIZiw+pSS+Wx5H+6O
	S/ZAd0CQZSLZlv9okUB65OE1rrYu9Zc8oX4MGBCs+X15IB9EiPC223heLiI1/X4dvm5tLr
	T5tJR4h4DPUMjoEwwMMREfCax2UwL4pDm7ZlYtOxYeGZ/7IXaSiBQoEkCGE8yJDkCyMZCm
	qdq52yDkNyYTjE5na7UAqyAoRW2DfIdETVGaLByYfgA0bGgs4AX61E18+inJIyruKVJC9X
	pmAif8nxi5Of460QbPULZdyBSxR31eLKziaz4aM9OfrjEb24fajFroN2bJVmyQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrZb2mBvzfh9;
	Sat, 27 Sep 2025 15:13:59 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFDxXu083203;
	Sat, 27 Sep 2025 15:13:59 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFDxRf083200;
	Sat, 27 Sep 2025 15:13:59 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:13:59 GMT
Message-Id: <202509271513.58RFDxRf083200@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: 3038122a7642 - stable/14 - init_main: Remove the
  placeholder SYSINIT
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 3038122a7642e66514658fb6db7c6ab8b4fd3cfb
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit 3038122a7642e66514658fb6db7c6ab8b4fd3cfb
Author:     Zhenlei Huang 
AuthorDate: 2025-09-03 17:09:11 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:36 +0000

    init_main: Remove the placeholder SYSINIT
    
    This was initially introduced to ensure there is at least one entry so
    that the sysinit_set symbol is not undefined. Well now that the kernel
    has plenty of SYSINITs and it is unlikely we will have a kernel without
    any SYSINITs in future, then this placeholder is not relevant anymore.
    
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D47916
    
    (cherry picked from commit 7e38993247f5e82abd4c347079fd256e73a76a00)
---
 sys/kern/init_main.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 9fb92dfb12f2..cc9d300caa6e 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -147,13 +147,6 @@ int	verbose_sysinit = VERBOSE_SYSINIT;
 FEATURE(invariants, "Kernel compiled with INVARIANTS, may affect performance");
 #endif
 
-/*
- * This ensures that there is at least one entry so that the sysinit_set
- * symbol is not undefined.  A sybsystem ID of SI_SUB_DUMMY is never
- * executed.
- */
-SYSINIT(placeholder, SI_SUB_DUMMY, SI_ORDER_ANY, NULL, NULL);
-
 /*
  * The sysinit linker set compiled into the kernel.  These are placed onto the
  * sysinit list by mi_startup; sysinit_add can add (e.g., from klds) additional

From nobody Sat Sep 27 15:13:58 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrZZ6Vtvz68DYm;
	Sat, 27 Sep 2025 15:13:58 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrZZ1v7nz44Gr;
	Sat, 27 Sep 2025 15:13:58 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758986038;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=mTuviX2f/S5pMbvV6jOW/eExhPJ0mrSZgZeW+CbLMGg=;
	b=QuCnSjZuULrjp2wnFD++yrgkkWCc8osfUl8HLuN9OhxG7nl3NhRC1XInjZXU2cCe22Jfc5
	AanCtdrCydu0j7kZfGCAg4349uHBp/ISO06LeDKBHQngYqoXnl9y8+c9/zcprvKpkkXmCl
	cZSBRJBeV0l+ij1NhMOythUYVsXBXWOL++MotF2i41RxDba4mKO+GTEZw9S5RFIvuid4aj
	/CvYCm3W/mkI07WedlgGfm0M/mCFKob5YtzgxSBU2x32gCteW5XVgwLD4LHo0S2KJlwhyw
	naOx1FynjPhUaPfXcsC2a1ta2QpllT32d0nCTj+Kbh4VppiUXietuvXHalamjA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986038;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=mTuviX2f/S5pMbvV6jOW/eExhPJ0mrSZgZeW+CbLMGg=;
	b=erd5QSKthTWbe3abIz+c+GZX3NogOdVdR6CHxblBqvyS2SQ1ftpSIgb5ybo6Cv1oLUB1kY
	dBgMyqAcGtACOXp7HDOFSveImoZZI31mEO+3GJDOfww17GjL5UeZgpIldkYlWc3abYnKZ4
	T+QykRLOF59xLK4PtdenQiDckwf+efcXhzPuv3Ecude2ao7P6Sw4KOPPnH8jYH/QQmTMZY
	E0DMEqfpxitud2V8UKm+UzahfCqb73jDhvoJyW2XnNyLI5nrEM/Z0O0sGR5Xv8uOVWx971
	4Mm+fD7Ka7nJpjDFcJtMKkPmJgL39cCeBYc58BLZdW5Vfvemf+C8O8NFlz+J3w==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986038; a=rsa-sha256; cv=none;
	b=Q7orkivMyL6UnLZHpt1vQAoCYrITenBNLHLD7rRx02VbF7HIhKYhJ6LwUJhUrA5e86QmC6
	1DkAC3JlPKUOiibMK+1ft60scqYHGUbrMF4JefGtDQ+XwP6hRd3KYkNF5bLTZcOoCclp4x
	fa98tDrqb677zT/emT+mJ/AbmO9b/U9oujX9IhsrmpFm7WhX1fvezCMn+xFnegPBILsRjt
	tdO2Rs0fVPm78bgn0Us+j7dCvEhTeb59B70sJyH2V2l2gLVREnT+57GH0tICuO259hyaug
	n91TT030BgHciX+gi8ToDoDJg30+jZJQcsk5P2/A4L9iLhTmh0moUMLEyxnP8g==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrZZ1W4bzg50;
	Sat, 27 Sep 2025 15:13:58 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFDw5R083168;
	Sat, 27 Sep 2025 15:13:58 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFDwSb083163;
	Sat, 27 Sep 2025 15:13:58 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:13:58 GMT
Message-Id: <202509271513.58RFDwSb083163@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: b2293f7f60c2 - stable/14 - init_main: Fix logging the
  subsystem of pre-loaded kernel modules
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: b2293f7f60c238e7a83551472aed9452cd017769
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit b2293f7f60c238e7a83551472aed9452cd017769
Author:     Zhenlei Huang 
AuthorDate: 2025-09-03 10:14:21 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:36 +0000

    init_main: Fix logging the subsystem of pre-loaded kernel modules
    
    The pre-load, aka linker_preload() runs at the order of SI_SUB_KLD, but
    a pre-loaded module may have SYSINITs that have startup order prior to
    SI_SUB_KLD, e.g. TUNABLE_INT() / TUNABLE_LONG(), hence it is possible
    that we run into abnormal orders.
    
    Without this change, the subsystem of the pre-loaded kernel modules
    will be melted into previous one. That is mostly harmless but confusing.
    
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D47904
    
    (cherry picked from commit 11f1dd193af57dfa5128eadc62b084502292a784)
---
 sys/kern/init_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 5835db44b853..9fb92dfb12f2 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -300,7 +300,7 @@ mi_startup(void)
 			BOOTTRACE_INIT("sysinit 0x%7x", sip->subsystem);
 
 #if defined(VERBOSE_SYSINIT)
-		if (sip->subsystem > last && verbose_sysinit != 0) {
+		if (sip->subsystem != last && verbose_sysinit != 0) {
 			verbose = 1;
 			printf("subsystem %x\n", sip->subsystem);
 		}

From nobody Sat Sep 27 15:14:01 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrZf31rfz68DNh;
	Sat, 27 Sep 2025 15:14:02 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrZd5HzTz44BD;
	Sat, 27 Sep 2025 15:14:01 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758986041;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=dwCuF2prOvguHR7JXkLBp8jzXYpBgj/v82+mSakY6MM=;
	b=q7CPbG/9sXOio6CyewARtQgKoDpyBR03TBjnYM215UrvI3a3h+ORuhhId1yPnWrTZDMNhR
	JuzMJfUVbPRTRHz/+snk+xKDDVVUg+w7nF/T4uDonzNbYfB6u0stkVLv3kxduUBJm6leEv
	w+C1k95hmFDTbVKSqAa4l20llVmdU8BTgEAJtq2w4kFhxNO6HABDcDrJbmNIKjlxNTAy5c
	Ktv6PpN0i65WpMbHItI/XWftFJRnJJEmDS6R0dTpXc0xiEs3cIVKqOCESrMyYBrhEPXWId
	9rhNJ7D0//rlUAs+JYXZQqP1Bzz0630lhLNx8rf4m8ftngt2EGQvH806k3TG0w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986041;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=dwCuF2prOvguHR7JXkLBp8jzXYpBgj/v82+mSakY6MM=;
	b=W7Zudj5ufs06Q0bSD7JM8mxkHm/wnITpCxPihbnrwvML8/+p4DLSikXFnxKfiBl8Hpsst/
	na0ikFqFqxWBR4X39rCV7wQgS71DZTjAGAPHYuNnwBWujyEaao9jpLinKfUiebn/zrj1E/
	QthAqV3KcbGeibO/LBwJ4cuhA7MS3lJJbAqfhM5S5EcCw0V3dvWbCF2kt9LUoVrdC8wGve
	ChgRU5WljTAk5AKPFOCbfaceg/XZoOHqDgGqfd+7KwnGdEFV2WtlwksMT9Wvs5GrK6Yr7o
	jxAeV3xvF/YbXf/1QfYXXmmchD1BQ8pDYUb2i1FHKNKMoov8/n2o4hshxxrg4g==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986041; a=rsa-sha256; cv=none;
	b=gpOhnTQ/Iql5vPo4tYVUZ9O69Z30300osuCmej1uyO2qc/o5qkBVL9SMnUYiYuHSvBcYoM
	5f+3oQaSUM3DUPNnJHJEUNchicDuERCg31+QoiNpDsFF0sjlkP1cDok+jJZxqf9c6iNuIm
	ld55NypbAeBlUnOJrRoi5oCDWJwXHbM0S+KUpUZxlXlUl2233klvq9iQkLjRdX+zde0O1r
	NvOLW/2l35Tq+bEB381C2+EA7CeGyJNgOV3849DhcOya5RI99A2WXsfnaI6bwrzOeE7L++
	zg0R5lUnLUa2GBYbH1qMxhxyOkCTGXQdYn2xsdgtJOe042CygQZw/nIy9F2UEw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrZd4t47zfWP;
	Sat, 27 Sep 2025 15:14:01 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFE1eK083277;
	Sat, 27 Sep 2025 15:14:01 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFE1TT083274;
	Sat, 27 Sep 2025 15:14:01 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:14:01 GMT
Message-Id: <202509271514.58RFE1TT083274@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: dc32441e3825 - stable/14 - ifnet: Defer detaching
  address family dependent data
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: dc32441e3825a90027b61259c3c77ef6e213728a
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit dc32441e3825a90027b61259c3c77ef6e213728a
Author:     Zhenlei Huang 
AuthorDate: 2025-09-03 19:16:40 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:37 +0000

    ifnet: Defer detaching address family dependent data
    
    While diagnosing PR 279653 and PR 285129, I observed that thread may
    write to freed memory but the system does not crash. This hides the
    real problem. A clear NULL pointer derefence is much better than writing
    to freed memory.
    
    PR:     279653
    PR:     285129
    Reviewed by:    glebius
    MFC after:      3 weeks
    Differential Revision:  https://reviews.freebsd.org/D49444
    
    (cherry picked from commit b5c46895fdddcdb7dd1994598925d6989ea7c8f2)
---
 sys/net/if.c       | 26 +++++++++++++++++++++-----
 sys/netinet/in.c   |  2 ++
 sys/netinet6/in6.c |  2 ++
 3 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/sys/net/if.c b/sys/net/if.c
index f308edd24734..607bcdd2aa80 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1105,6 +1105,7 @@ if_detach_internal(struct ifnet *ifp, bool vmove)
 	struct ifaddr *ifa;
 	int i;
 	struct domain *dp;
+	void *if_afdata[AF_MAX];
 #ifdef VIMAGE
 	bool shutdown;
 
@@ -1228,15 +1229,30 @@ finish_vnet_shutdown:
 	IF_AFDATA_LOCK(ifp);
 	i = ifp->if_afdata_initialized;
 	ifp->if_afdata_initialized = 0;
+	if (i != 0) {
+		/*
+		 * Defer the dom_ifdetach call.
+		 */
+		_Static_assert(sizeof(if_afdata) == sizeof(ifp->if_afdata),
+		    "array size mismatch");
+		memcpy(if_afdata, ifp->if_afdata, sizeof(if_afdata));
+		memset(ifp->if_afdata, 0, sizeof(ifp->if_afdata));
+	}
 	IF_AFDATA_UNLOCK(ifp);
 	if (i == 0)
 		return;
+	/*
+	 * XXXZL: This net epoch wait is not necessary if we have done right.
+	 * But if we do not, at least we can make a guarantee that threads those
+	 * enter net epoch will see NULL address family dependent data,
+	 * e.g. if_afdata[AF_INET6]. A clear NULL pointer derefence is much
+	 * better than writing to freed memory.
+	 */
+	NET_EPOCH_WAIT();
 	SLIST_FOREACH(dp, &domains, dom_next) {
-		if (dp->dom_ifdetach && ifp->if_afdata[dp->dom_family]) {
-			(*dp->dom_ifdetach)(ifp,
-			    ifp->if_afdata[dp->dom_family]);
-			ifp->if_afdata[dp->dom_family] = NULL;
-		}
+		if (dp->dom_ifdetach != NULL &&
+		    if_afdata[dp->dom_family] != NULL)
+			(*dp->dom_ifdetach)(ifp, if_afdata[dp->dom_family]);
 	}
 }
 
diff --git a/sys/netinet/in.c b/sys/netinet/in.c
index 75ff9066875c..857f12a40ce7 100644
--- a/sys/netinet/in.c
+++ b/sys/netinet/in.c
@@ -1872,6 +1872,8 @@ in_domifdetach(struct ifnet *ifp, void *aux)
 {
 	struct in_ifinfo *ii = (struct in_ifinfo *)aux;
 
+	MPASS(ifp->if_afdata[AF_INET] == NULL);
+
 	igmp_domifdetach(ifp);
 	lltable_free(ii->ii_llt);
 	free(ii, M_IFADDR);
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index b6ecf24a73cd..8d43ae18969a 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -2620,6 +2620,8 @@ in6_domifdetach(struct ifnet *ifp, void *aux)
 {
 	struct in6_ifextra *ext = (struct in6_ifextra *)aux;
 
+	MPASS(ifp->if_afdata[AF_INET6] == NULL);
+
 	mld_domifdetach(ifp);
 	scope6_ifdetach(ext->scope6_id);
 	nd6_ifdetach(ifp, ext->nd_ifinfo);

From nobody Sat Sep 27 15:14:00 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrZc6YM5z68DFK;
	Sat, 27 Sep 2025 15:14:00 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrZc4LCmz44KK;
	Sat, 27 Sep 2025 15:14:00 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758986040;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=PB3zAaCfh21GsHuSfWTF395WiyH2iJyrbUkEnh76aIg=;
	b=oWjAxang4As2VzXFwfD5r2g4KFfeHJjyYml3TiywdwboU45bc9hytygxE6uxiWibCRKxhg
	IOKfgQ9DAZVkNSolni1OvANi6LMmOB0aE3KRKgCIWL/0Sg7PbHgwgDhwE0YSAPh7lxvSCd
	YO6No9e9Sv9BywrxMQgL2usEhPcCttEGsnuELTdqEn6nqmcd61rmfmq6cSbI7ovFoPQzV/
	YWoZK73fM4miWU5RLeeiWxchKk7SQiVP6SJ1V5Y6F0buUv59cUNwSsFqSmWgn0HKD86NlD
	dL7DY89QeKBXFf083ShY2056knEyEVTzm6sf9CYxmSksdV9wZfiXrt2QDI6yFw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986040;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=PB3zAaCfh21GsHuSfWTF395WiyH2iJyrbUkEnh76aIg=;
	b=Fa972DfIUEXfRKirZyqxIrL2NDkgfuRti7ARQhJOt10xf9P10WclqvYisSWSHgK6HwGBeb
	gXWF6Tp2eHhjYshQ8ijbA5iZfUmPVylqIB9FbrMqNUFNrefucv58Wq0i46yj7cym3+PMvQ
	dl5id7vT8x0AIlewz1g93VT+W6A2zOacGzvS9pcjlqvEf3OET+NojdQpeitucru07kVtt/
	GF3Qsi8bt1fr8aLZcfrldKr8p9pRTlNniURTiGwMWOiE7wRf/ogKKs166lRzUflCy1xFWr
	Q5zcWHEM6A+BbDVkCOA0dRgyMvgydjHUygarGJ/FLe90OMVpmvnXkYFJoRoiDw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986040; a=rsa-sha256; cv=none;
	b=DVv05lfL8je415jaoMvrIg5MvypXvEgoTDpEiKSYSQ7wifh2mS2/vdjc6DtOULthC0UVLz
	UwYS79Adct4p8I07MsAAezf4UQ3srWqGIdRe1dV1mrEgBB/0l5NHL9bLkCruNRPwEj13Bh
	WE7h6pRu0goVMzH7XOZdGkWEtb7/Cab659Sl4brdoEghMBNaD4asEnXnE/lkmcQNn5NLIA
	RB1fuWcHdcyWgyV252sciIcrpDkAU1ddluDjHUe1a4F5pyVaYs9UxI4tuEeUWZEbbNUa4F
	UQSVxOFPmiWpRzz5Q39axbmYXjOXxybIL2CkLp0/4zeC8ccpWIyzNbu8IHWjbg==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrZc3t4nzg51;
	Sat, 27 Sep 2025 15:14:00 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFE0mX083243;
	Sat, 27 Sep 2025 15:14:00 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFE0GR083240;
	Sat, 27 Sep 2025 15:14:00 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:14:00 GMT
Message-Id: <202509271514.58RFE0GR083240@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: e05d4c4c08b2 - stable/14 - ethernet: Prefer memcmp()
  over bcmp()
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: e05d4c4c08b2d515713e909cb9c5a30a7c9da153
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit e05d4c4c08b2d515713e909cb9c5a30a7c9da153
Author:     Zhenlei Huang 
AuthorDate: 2025-09-03 17:09:11 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:36 +0000

    ethernet: Prefer memcmp() over bcmp()
    
    The link-level address and the mbuf shall not overlap. Prefer memcmp()
    over bcmp() for slight performance gain.
    
    No functional change intended.
    
    Reviewed by:    glebius
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D52345
    
    (cherry picked from commit 51098f0529f0d1cc532512e0eae9bfcffb8e68e4)
---
 sys/net/if_ethersubr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index b0e459dd1bdf..d33d8f682521 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -712,7 +712,7 @@ ether_input_internal(struct ifnet *ifp, struct mbuf *m)
 		 * seen by upper protocol layers.
 		 */
 		if (!ETHER_IS_MULTICAST(eh->ether_dhost) &&
-		    bcmp(IF_LLADDR(ifp), eh->ether_dhost, ETHER_ADDR_LEN) != 0)
+		    memcmp(IF_LLADDR(ifp), eh->ether_dhost, ETHER_ADDR_LEN) != 0)
 			m->m_flags |= M_PROMISC;
 	}
 

From nobody Sat Sep 27 15:14:02 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrZg3JwVz68D94;
	Sat, 27 Sep 2025 15:14:03 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrZg0ZGNz44Hn;
	Sat, 27 Sep 2025 15:14:03 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758986043;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Kv7Mxi1FFRT02HY24l3jhGvncf2LYsqd7IaETEh53mY=;
	b=X4YcYAdVzqyVVyqgpxxMzzE3P80kryuLFOEnl3AT5nnQJIKR3dEYhYu/Jmj4wVb4RNRnrZ
	eRioZ5l1fg2LTWgAdYVAApDV3gh5PJCpdRoZ1bpiyG3E+iczz23TB91LAaTTx5e/zvicjd
	lPk11yPwxXnqTpzTYG2+ReE9sB4OjNyuR52x/yfecOh3knHpkNlp/dV9A9kbTXaau1aeDU
	qYByziJGJd9GrzSbgvKKeUoGvYUzPCzCgimlT5w4G/CdgkoGSbari/IOeYK8XKC03sHU44
	wVuKJmv7DFzC9Se3cF9XO6lG/yGhEyX09ldRfnHWtQ/9TcXRZDnw60NHQOmyAA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986043;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Kv7Mxi1FFRT02HY24l3jhGvncf2LYsqd7IaETEh53mY=;
	b=mvxqyF6/qC3j60CSL1oR+EIzb58tGHN3jTPDQ+/IZKNUlI+ABSqgH/962gaYjpMeEok0aJ
	6RqA5Kyn8mbmB9cz+3BC286Ey3sIrAdKKY9sPx3XSEvTX3j2RXBNgWdVFvuJ14j4pO1/vv
	9re6r5OEMZhYtZY31zqGE8NovgxxxxYhrt+yDXzF+23kUztSnbQ60ucXnWUgc8Rak75kl6
	yCM5mI1ADccWamo3xqDnztZZ6QNEZoAs5llHrp3+mP6MpT0r6kTqJMgvfNCXKmKmuGdDbg
	kZy0fKwRGajh50E3fQHtvV/fuohfmakqiqtkKMekfdHYz+GlYfENEWChlKKx2g==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986043; a=rsa-sha256; cv=none;
	b=tJnU5y8+O/y956naHgc73tt7X4BVZrTLRgA+hpOcdQVz/LaVg8zDjTCuC29ia3L4s8wMbr
	TRS1aiofhFvbow7JTEZGM+ebkKtVyMP9NMQtcsgVuLpwrbR4/OKjOIBk5t2qvjhnaS/mWS
	jor+GNTN0brZlduBu5i3uidm3dsFubCALeMLqZ0fwQ0m3rIQvflQUK94Xr/EsZGt+0ohEN
	KHJ+Waqsk1yA9F40SNSmqA20DVV1GoZ2ueubTTVUx1RUkT6E7UdV5djt1vgJzdBdCV9iBF
	/S/0WzfgPDYp3lCudYZtBaIQWjQyxNyZ9DjjddY/Zlp8g+c+IocaYl3wSz2gYQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrZf5d1Hzg52;
	Sat, 27 Sep 2025 15:14:02 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFE2Ge083311;
	Sat, 27 Sep 2025 15:14:02 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFE2r8083308;
	Sat, 27 Sep 2025 15:14:02 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:14:02 GMT
Message-Id: <202509271514.58RFE2r8083308@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: 8049f85bdd8b - stable/14 - vtnet: Do "hardware"
  accounting for the total number of received octets
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 8049f85bdd8b60560d7a4759afb762dc62033171
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit 8049f85bdd8b60560d7a4759afb762dc62033171
Author:     Joyu Liao 
AuthorDate: 2025-09-04 20:00:27 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:37 +0000

    vtnet: Do "hardware" accounting for the total number of received octets
    
    While here, advertise the IFCAP_HWSTATS capability to avoid the net
    stack from double counting it.
    
    Co-authored-by: zlei
    Reviewed by:    zlei
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D44816
    
    (cherry picked from commit a14d561e58529c9686a2efc47f4828ad82026e63)
---
 sys/dev/virtio/network/if_vtnet.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c
index 92cb659c92c3..355027391985 100644
--- a/sys/dev/virtio/network/if_vtnet.c
+++ b/sys/dev/virtio/network/if_vtnet.c
@@ -1178,6 +1178,7 @@ vtnet_setup_interface(struct vtnet_softc *sc)
 	if (sc->vtnet_max_mtu >= ETHERMTU_JUMBO)
 		if_setcapabilitiesbit(ifp, IFCAP_JUMBO_MTU, 0);
 	if_setcapabilitiesbit(ifp, IFCAP_VLAN_MTU, 0);
+	if_setcapabilitiesbit(ifp, IFCAP_HWSTATS, 0);
 
 	/*
 	 * Capabilities after here are not enabled by default.
@@ -3047,6 +3048,8 @@ vtnet_get_counter(if_t ifp, ift_counter cnt)
 		return (rxaccum.vrxs_iqdrops);
 	case IFCOUNTER_IERRORS:
 		return (rxaccum.vrxs_ierrors);
+	case IFCOUNTER_IBYTES:
+		return (rxaccum.vrxs_ibytes);
 	case IFCOUNTER_OPACKETS:
 		return (txaccum.vtxs_opackets);
 #ifndef VTNET_LEGACY_TX

From nobody Sat Sep 27 15:14:04 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrZk0Xz6z68DNr;
	Sat, 27 Sep 2025 15:14:06 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrZj1Ncbz44BZ;
	Sat, 27 Sep 2025 15:14:05 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758986045;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=WLZegS09tuh4WwUp7cHg8sp2aL2xfEHpdO67PX4BMKs=;
	b=WSjPXTI0DED2LfE6wSMzOtxQQUAf9aZg4b16OcPoqzC3TekOvVdz5+EdXF73YMZM62v8MV
	pDJf/Npux6KXIb4g/9o1VG9nr01nztbAWR5/XhpmYSKf3FOMHqTwrmPFq+JrzXqZ2HThkA
	8ozkspK6sqXzsM5H5d6dHnWITJVxPr2aB3ii+J6QQFTW7CPKz/8Jmdc5MxkK7x+t5OC/Jg
	MF9jRvc8eC6jX5FxMYHUyAZGjP6rObK7jbL+XHgwC0Xm1px87m7qRjRYk+FbThgvsfTRTs
	iqnEFHdYCEUztoPZ9WQpmQtWRFP379ScLYtnAXx4o6BmzLmoxzkSYRRwF/Juzg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986045;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=WLZegS09tuh4WwUp7cHg8sp2aL2xfEHpdO67PX4BMKs=;
	b=Y/CfuNXLvVrEs3RfWjZjUDtY4fB0te+YRJRhDrjVRvjkCk70KFf41aBzgSsg20C164dddj
	qabGJw5I0iWrbPdj/4V9Ohou8xq1z5voKbgpogNqvL1wdUongbdc/Egkmwen7QRL4Sue6k
	F7qC+bEvxDdmykdz7mXCnyKWmltbxiw9Uu9VZ/gb6c/zpSJt6itGHTuRIrQLBgDeUcj4qw
	CcqrwtCSwg+vnn3h+DVVg3Pxam63DPVmnPiXGK6oum/S3X66ePEqc1ogHUjD53CGhrIPjT
	qGdeCGcgXvpnEPXiBAnDtRer+olYxWMBR4GDX1qkMVf3PO2hiIQCYFiHyRuO0g==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986045; a=rsa-sha256; cv=none;
	b=GBoJi3VRpmSAU/dAH9adC4XG9Q+1qMn4ZXBgYyuMOKOj+7fnzrc5wPP2NGFmmvQ+IQc0Io
	lbCkQBuaqsb6sdJEIcZsizgR7feHspMz1y7X2A8wQfWVjwB7ECQhiWVJFcVW/as9umJlDB
	CiifAKNPZYabVuLZaGZJMT13BTCuM4C0LUlCjqpZQJ9TwR1+BUJnZphURHsnLcJ1kEn73o
	tD8hMXb83hfkLyty4YDZmx9MOBOnK1WL4kLj+tn9Kqb6rC3pxNxqBARcY8FBPnz6iQN4jq
	z8rrWNPUXY0wy7p8inOxZuFPZnqkNtWFq3MAnM4/sZgD5j70CtGa2P5x2bDajA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrZj0YyJzfs9;
	Sat, 27 Sep 2025 15:14:05 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFE4AM083379;
	Sat, 27 Sep 2025 15:14:04 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFE482083376;
	Sat, 27 Sep 2025 15:14:04 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:14:04 GMT
Message-Id: <202509271514.58RFE482083376@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: c2f1bb9a8c02 - stable/14 - kenv: Sprinkle const
  qualifiers where appropriate
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: c2f1bb9a8c02cb23ff5d807e124a2df2bd046801
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit c2f1bb9a8c02cb23ff5d807e124a2df2bd046801
Author:     Zhenlei Huang 
AuthorDate: 2025-09-05 16:00:04 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:37 +0000

    kenv: Sprinkle const qualifiers where appropriate
    
    No functional change intended.
    
    MFC after:      2 weeks
    
    (cherry picked from commit 2a0ed0bef264da39b670461809bf027362dfeb80)
---
 sys/kern/kern_environment.c | 32 ++++++++++++++++----------------
 sys/sys/kernel.h            | 16 ++++++++--------
 2 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/sys/kern/kern_environment.c b/sys/kern/kern_environment.c
index 761734674bdf..985ce49de001 100644
--- a/sys/kern/kern_environment.c
+++ b/sys/kern/kern_environment.c
@@ -1094,65 +1094,65 @@ kernenv_next(char *cp)
 }
 
 void
-tunable_int_init(void *data)
+tunable_int_init(const void *data)
 {
-	struct tunable_int *d = (struct tunable_int *)data;
+	const struct tunable_int *d = data;
 
 	TUNABLE_INT_FETCH(d->path, d->var);
 }
 
 void
-tunable_long_init(void *data)
+tunable_long_init(const void *data)
 {
-	struct tunable_long *d = (struct tunable_long *)data;
+	const struct tunable_long *d = data;
 
 	TUNABLE_LONG_FETCH(d->path, d->var);
 }
 
 void
-tunable_ulong_init(void *data)
+tunable_ulong_init(const void *data)
 {
-	struct tunable_ulong *d = (struct tunable_ulong *)data;
+	const struct tunable_ulong *d = data;
 
 	TUNABLE_ULONG_FETCH(d->path, d->var);
 }
 
 void
-tunable_int64_init(void *data)
+tunable_int64_init(const void *data)
 {
-	struct tunable_int64 *d = (struct tunable_int64 *)data;
+	const struct tunable_int64 *d = data;
 
 	TUNABLE_INT64_FETCH(d->path, d->var);
 }
 
 void
-tunable_uint64_init(void *data)
+tunable_uint64_init(const void *data)
 {
-	struct tunable_uint64 *d = (struct tunable_uint64 *)data;
+	const struct tunable_uint64 *d = data;
 
 	TUNABLE_UINT64_FETCH(d->path, d->var);
 }
 
 void
-tunable_quad_init(void *data)
+tunable_quad_init(const void *data)
 {
-	struct tunable_quad *d = (struct tunable_quad *)data;
+	const struct tunable_quad *d = data;
 
 	TUNABLE_QUAD_FETCH(d->path, d->var);
 }
 
 void
-tunable_bool_init(void *data)
+tunable_bool_init(const void *data)
 {
-	struct tunable_bool *d = (struct tunable_bool *)data;
+	const struct tunable_bool *d = data;
 
 	TUNABLE_BOOL_FETCH(d->path, d->var);
 }
 
 void
-tunable_str_init(void *data)
+tunable_str_init(const void *data)
 {
-	struct tunable_str *d = (struct tunable_str *)data;
+	const struct tunable_str *d = data;
 
 	TUNABLE_STR_FETCH(d->path, d->var, d->size);
 }
diff --git a/sys/sys/kernel.h b/sys/sys/kernel.h
index d6b5f8ec10dc..1c58775831fa 100644
--- a/sys/sys/kernel.h
+++ b/sys/sys/kernel.h
@@ -324,7 +324,7 @@ void	sysinit_add(struct sysinit **set, struct sysinit **set_end);
  * int
  * please avoid using for new tunables!
  */
-extern void tunable_int_init(void *);
+extern void tunable_int_init(const void *);
 struct tunable_int {
 	const char *path;
 	int *var;
@@ -343,7 +343,7 @@ struct tunable_int {
 /*
  * long
  */
-extern void tunable_long_init(void *);
+extern void tunable_long_init(const void *);
 struct tunable_long {
 	const char *path;
 	long *var;
@@ -362,7 +362,7 @@ struct tunable_long {
 /*
  * unsigned long
  */
-extern void tunable_ulong_init(void *);
+extern void tunable_ulong_init(const void *);
 struct tunable_ulong {
 	const char *path;
 	unsigned long *var;
@@ -381,7 +381,7 @@ struct tunable_ulong {
 /*
  * int64_t
  */
-extern void tunable_int64_init(void *);
+extern void tunable_int64_init(const void *);
 struct tunable_int64 {
 	const char *path;
 	int64_t *var;
@@ -400,7 +400,7 @@ struct tunable_int64 {
 /*
  * uint64_t
  */
-extern void tunable_uint64_init(void *);
+extern void tunable_uint64_init(const void *);
 struct tunable_uint64 {
 	const char *path;
 	uint64_t *var;
@@ -419,7 +419,7 @@ struct tunable_uint64 {
 /*
  * quad
  */
-extern void tunable_quad_init(void *);
+extern void tunable_quad_init(const void *);
 struct tunable_quad {
 	const char *path;
 	quad_t *var;
@@ -438,7 +438,7 @@ struct tunable_quad {
 /*
  * bool
  */
-extern void tunable_bool_init(void *);
+extern void tunable_bool_init(const void *);
 struct tunable_bool {
 	const char *path;
 	bool *var;
@@ -454,7 +454,7 @@ struct tunable_bool {
 
 #define	TUNABLE_BOOL_FETCH(path, var)	getenv_bool((path), (var))
 
-extern void tunable_str_init(void *);
+extern void tunable_str_init(const void *);
 struct tunable_str {
 	const char *path;
 	char *var;

From nobody Sat Sep 27 15:14:03 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrZj03Q1z68DFR;
	Sat, 27 Sep 2025 15:14:05 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrZh0HJmz4481;
	Sat, 27 Sep 2025 15:14:04 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758986044;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=dvxvdriXJkurYEKCKWdtyzZTWPaopSiuvS1pR44oFm0=;
	b=bUf5xaZLv9IU1GFfA2jHPA2M3RL5wf9oPBoj7jmJPXjd5JneITluJKOO9fn70mvuPDYPeq
	9DVmffH3F4c2PrsHW7+hUcs5SPP9w4fKSWUBANMjcEgRvXeMzSISVdQfMaSgYO0Hvw5Kqp
	3A424aoDcLVlXXzPoi3VpOv5f+Uk9w1CwkvERHWOCP70pxsiWVbSDTw4JLWtyN3+5PADJy
	ubRpzr276JRbXNCWG7R+kQdlm1hspJ4uVYRrjcDnWEXF/JV+WzQ++4m/IILD7AjTKa8oNe
	JJquRaphzcsi2koNirYHQUJ61jNpjbWsX6x31qdRRUCfFAYsQaycGDWOuhTAFA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986044;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=dvxvdriXJkurYEKCKWdtyzZTWPaopSiuvS1pR44oFm0=;
	b=F2cYTXFQ3ts56QshXfD8oH+hxRWH7gNRuSfCPPKUZK6xzvvWu1wgjXW8n5TdvCVdVD//ye
	WcO2gH8j3Zb+VHK1od66Lfv4c0mZIOBJ8B3Dxi+0wH+6DFoLOXwzpbgWnNPcw/65kAadTC
	7nqFGDc6sUt/eJohqtERzLrAeIh4rWjQjyk/iE4J2+xyXdViJXYBNUHv2d6w92MtTYfY9m
	Uh8LprAfuNYM+YoTWtwumSOY4nf27m1XeLcAFegoy/XFe5AAh8Xm1SWmJKDgXRDDQ4Xahy
	++68OPVkeh+FqGFgXgOgbVIVXiIDYKHbSKlFHXzfAYbx4G/ALlLQ05QZ9M2R7A==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986044; a=rsa-sha256; cv=none;
	b=l1uWF1b61E9C8I3yJ6l5Mav6GUC6u8vpD6bWynwea5wcxtJCU7cpNfvLpou6ubeDEBIKha
	odUHUNsS3RdYh1sqYXjj0gBoPK6Ttb0ZHqnyYulUwFg+AmtHvW3tnh+HbVCM104AyDHCNZ
	mNhw+wtgZWeZKQ3Hs9+YqUUoTYZHxGRxu6smUZz6k4VbvuJAl9JcMb/e+0YPO05yeAdCjf
	FFhUrOJz8QVRp2jTVqtkM0DgJEgI+plN4LhfyTj5762/zV7H+dTqmEV6be3negL4fAjxTe
	pKkO40ZEf/fdLey8G223Hj+ly6LYKYcpTpHRHCOk2i0Tm696/cqqw4MaWoQJbQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrZg6hGXzg53;
	Sat, 27 Sep 2025 15:14:03 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFE3jI083346;
	Sat, 27 Sep 2025 15:14:03 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFE3fl083343;
	Sat, 27 Sep 2025 15:14:03 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:14:03 GMT
Message-Id: <202509271514.58RFE3fl083343@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: 7d680875473d - stable/14 - vtnet: Prefer "hardware"
  accounting for the multicast and total number of octets sent
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 7d680875473d4abc056d0e6ad354842d8909bbdc
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit 7d680875473d4abc056d0e6ad354842d8909bbdc
Author:     Joyu Liao 
AuthorDate: 2025-09-04 20:00:28 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:37 +0000

    vtnet: Prefer "hardware" accounting for the multicast and total number of octets sent
    
    When ALTQ is enabled, this driver does "hardware" accounting and soft
    accounting at the same time. Prefer the "hardware" one to make the logic
    simpler.
    
    Reviewed by:    zlei
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D44817
    
    (cherry picked from commit 2a346c8993cbb92a321a7c25bd9ac4dcaae352d1)
---
 sys/dev/virtio/network/if_vtnet.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c
index 355027391985..949b3ba0e5bb 100644
--- a/sys/dev/virtio/network/if_vtnet.c
+++ b/sys/dev/virtio/network/if_vtnet.c
@@ -3052,12 +3052,10 @@ vtnet_get_counter(if_t ifp, ift_counter cnt)
 		return (rxaccum.vrxs_ibytes);
 	case IFCOUNTER_OPACKETS:
 		return (txaccum.vtxs_opackets);
-#ifndef VTNET_LEGACY_TX
 	case IFCOUNTER_OBYTES:
 		return (txaccum.vtxs_obytes);
 	case IFCOUNTER_OMCASTS:
 		return (txaccum.vtxs_omcasts);
-#endif
 	default:
 		return (if_get_counter_default(ifp, cnt));
 	}

From nobody Sat Sep 27 15:14:06 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrZk5B86z68DNs;
	Sat, 27 Sep 2025 15:14:06 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrZk1sCCz44FC;
	Sat, 27 Sep 2025 15:14:06 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758986046;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=E3r66U3Y1vWcMIkxza1cJDtCgNnM1VcNuIHU08gjXDc=;
	b=lHUpEE9/hcNyQG8gywBDLhtSGILVlAaP+bVI1Ha+Je8MGkx4illUvsGnOziki5sK3crzsE
	+ovK8MMe1UoywzydepSJMJzfAWgZkmfUKIUGl9OFIarl3VqgxIJYxdlD7P6uMijMvNETAs
	vAKAd2kWhNSKys1I4QaBfZxPHLEBtrbWKgVyayZwuqUthCDbs8OfiDI6S0jBmqY3JmgFO8
	cKqXaWXDkRynzMfNYZRk80Ve1ugsebVfQ16rSM+GNhYjTFC38IQyzd7/m7/0bsNk9sUPqA
	yh44r/L0+dLRSyJEqr4H8xpFeP8kVQAoAs+o/3eS8SGduJ+zi78yd7BRgZYr7g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986046;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=E3r66U3Y1vWcMIkxza1cJDtCgNnM1VcNuIHU08gjXDc=;
	b=oedtsQhSmoIrWlJjYnuZywQReCp5s08gqsYJkjH5FmT+nkiiRI2ROfPZam5H/MdXFXcpeM
	JITFL2y4F4LUXqB6X2mAKMR99V6Nn87QJuF0zO/H0atRoh3P8Nkce2tCmamcMVvnnm1Cf+
	9IvghGh2YtOAIC+xCBy+N9TN7izhMH+54419qpenY0DPUbQ2s4yBvNuOtfkvrVWREuLw0b
	Q6OxPzYRN4VyRl0b+pZzPid+PL7l1H0DwIVnOazVyBx5GesPSNNuEnqFwk3yjLJW3fBS+L
	oGnSZTX4fKgBPBJ4dKUrMQS8kl8RsncJV/RJ7MbhCxRS5KupR8EStKQwCScisw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986046; a=rsa-sha256; cv=none;
	b=HJgOTjWi09LDOrqPvFzJPbTpf8nbCZE0Xoz2sGPE8jk3ahPL8ouCLqk7726g9ShSH+vbrK
	x07Iaeiy/PuxzPbc/ly/DbpRK/fmoJma1+ODg9UmRj6ZacTeIfvBridS/ypEjDiEfBR2jW
	K1h/Yo6TKWK9lamrHrPOo//K+NdAXKsTnAj5qb+R4kwWm3SPIsHEoZ5LggQ4MI/iabedyS
	/oOAjl16yWlEWU06I0VeeTmBNtRHPBX8SPY4bkzNliMJaHaOJ53vLnjLowo5T48ZIXeSGK
	wNQvVhTHReYCkrIOCITG3bop5RPqND4PAhTeY1K7gmReXWzDqncEnHGoJ69M1Q==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrZk1SW4zfsB;
	Sat, 27 Sep 2025 15:14:06 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFE6NH083412;
	Sat, 27 Sep 2025 15:14:06 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFE6sD083409;
	Sat, 27 Sep 2025 15:14:06 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:14:06 GMT
Message-Id: <202509271514.58RFE6sD083409@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: 89c3be21d65b - stable/14 - mtx: Sprinkle const
  qualifiers where appropriate
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 89c3be21d65bbf7f992f3a37519f831dc3e93871
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit 89c3be21d65bbf7f992f3a37519f831dc3e93871
Author:     Zhenlei Huang 
AuthorDate: 2025-09-05 16:00:04 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:38 +0000

    mtx: Sprinkle const qualifiers where appropriate
    
    No functional change intended.
    
    MFC after:      2 weeks
    
    (cherry picked from commit 7bbfcc540810ba08f75b8f04263bb9a25f1cf45e)
---
 sys/kern/kern_mutex.c | 4 ++--
 sys/sys/mutex.h       | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c
index 3a8afdcad338..62c7652e81f5 100644
--- a/sys/kern/kern_mutex.c
+++ b/sys/kern/kern_mutex.c
@@ -1115,9 +1115,9 @@ __mtx_assert(const volatile uintptr_t *c, int what, const char *file, int line)
  * General init routine used by the MTX_SYSINIT() macro.
  */
 void
-mtx_sysinit(void *arg)
+mtx_sysinit(const void *arg)
 {
-	struct mtx_args *margs = arg;
+	const struct mtx_args *margs = arg;
 
 	mtx_init((struct mtx *)margs->ma_mtx, margs->ma_desc, NULL,
 	    margs->ma_opts);
diff --git a/sys/sys/mutex.h b/sys/sys/mutex.h
index 56c03a1b0be9..08d4e2d28b33 100644
--- a/sys/sys/mutex.h
+++ b/sys/sys/mutex.h
@@ -91,7 +91,7 @@
 void	_mtx_init(volatile uintptr_t *c, const char *name, const char *type,
 	    int opts);
 void	_mtx_destroy(volatile uintptr_t *c);
-void	mtx_sysinit(void *arg);
+void	mtx_sysinit(const void *arg);
 int	_mtx_trylock_flags_int(struct mtx *m, int opts LOCK_FILE_LINE_ARG_DEF);
 int	_mtx_trylock_flags_(volatile uintptr_t *c, int opts, const char *file,
 	    int line);

From nobody Sat Sep 27 15:14:08 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrZm70jgz68D96;
	Sat, 27 Sep 2025 15:14:08 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrZm3dGQz44P0;
	Sat, 27 Sep 2025 15:14:08 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758986048;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=pzgkgmHHF1ZMCsvaZQ/Q3Nng4xL9IoTmssxx8dyORpA=;
	b=kRFfbF70VQf+favOw686vSr2NfizUJV2QhbwdnNM4bsCR7RgVguyX4egzO3ENqNw9OShBK
	NZhqSSZtkMHPHplM1J/+C7xpSmLutny3t/FVMTpp/S5GrGfKEb7LogI8hm3QJL1zgY5iis
	FpYXCeHjATPd7tGVAfOsMRJTzqX9mziRRFd1IsRUh2Et1WohwDjxv0AMDTwFbC9rV9XA59
	KydqABBm3tZigSKLvrO/ffdnxwvwibE0K2POMxR00GwDpo8EWxpjWf0bjORcqZl4ARdNKj
	qj4lp2z+oP7uQwNlgrbfoE1WGWjwyA+cVhX0truGo5mqH+ERAzC6ZYuo6vHo5w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986048;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=pzgkgmHHF1ZMCsvaZQ/Q3Nng4xL9IoTmssxx8dyORpA=;
	b=yce/pNEi5aa4mp1RWOao4skIrxOjczvV7pAYKBaVa2sH4Y0UyCwoChE5RG+s7wO+ENly0D
	a4f5W32SVeinqupKfoA4zrQslISWrRqAkl8bP4AZiXUx2g20ao5OCVd7bCk3I+nlINRT5f
	0TZeXbJZ9lvY0XtShBHAIGz6kQYboRk7R6fTSDbY9lE7YyW8uSUnh1Z6V/gfd0k1ckAnzr
	lz6I2CxxmhKCxiOmgSlEM3gCWLUZvN8YviOImgZs46j2GhU7yAZCfH8GDF3DIzbWq3/U+p
	W/9WuJyFITmB9RnjoKMy/7V+2npLEY5/rsknUOVsHtgOnjNzX35PHfZWM/J6IA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986048; a=rsa-sha256; cv=none;
	b=D2Ry8xPEJcSt9pQSejOQURS+z5sgQI1dcLcRrwhJcJdf7fBiA7fWzKyM0J8pag11aE60El
	6X8q9kk4eEexRxmBoFM9Do33XKRzciYmlEikmqc/O2KAOraP1KlFPNgGWmnc4SbOdU852W
	AUft/tCeFP6yL6Mv7xjeKUcJJfi5Q3CGR79+SvM6giMQB5H+lhIjFxEkgJwof31EcrZL00
	PmnfF79FiK5gJEf4Dvax+MKfMtQYFcfGTrMVPU65bpFIEN0OPYPjze9O1lnr5F0vGieN+U
	uRzJiF9NlqO8c1xCo2q/qYeMirZwBArFxkEI0NfEl2wXYWYkNpC2lmAH4aKO5g==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrZm38Rnzg54;
	Sat, 27 Sep 2025 15:14:08 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFE8xx083478;
	Sat, 27 Sep 2025 15:14:08 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFE8Cx083475;
	Sat, 27 Sep 2025 15:14:08 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:14:08 GMT
Message-Id: <202509271514.58RFE8Cx083475@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: 79720e10b208 - stable/14 - rwlock: Sprinkle const
  qualifiers where appropriate
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 79720e10b20849db722a62f14444745a53afda06
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit 79720e10b20849db722a62f14444745a53afda06
Author:     Zhenlei Huang 
AuthorDate: 2025-09-05 16:00:04 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:38 +0000

    rwlock: Sprinkle const qualifiers where appropriate
    
    No functional change intended.
    
    MFC after:      2 weeks
    
    (cherry picked from commit 3c3686b3c773131243d204b4096e484037c7b502)
---
 sys/kern/kern_rwlock.c | 4 ++--
 sys/sys/rwlock.h       | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/kern/kern_rwlock.c b/sys/kern/kern_rwlock.c
index dc2b9892cecd..46bc0c94a6d5 100644
--- a/sys/kern/kern_rwlock.c
+++ b/sys/kern/kern_rwlock.c
@@ -252,9 +252,9 @@ _rw_destroy(volatile uintptr_t *c)
 }
 
 void
-rw_sysinit(void *arg)
+rw_sysinit(const void *arg)
 {
-	struct rw_args *args;
+	const struct rw_args *args;
 
 	args = arg;
 	rw_init_flags((struct rwlock *)args->ra_rw, args->ra_desc,
diff --git a/sys/sys/rwlock.h b/sys/sys/rwlock.h
index 0ebe90e09bed..929f78c1d204 100644
--- a/sys/sys/rwlock.h
+++ b/sys/sys/rwlock.h
@@ -128,7 +128,7 @@
  */
 void	_rw_init_flags(volatile uintptr_t *c, const char *name, int opts);
 void	_rw_destroy(volatile uintptr_t *c);
-void	rw_sysinit(void *arg);
+void	rw_sysinit(const void *arg);
 int	_rw_wowned(const volatile uintptr_t *c);
 void	_rw_wlock_cookie(volatile uintptr_t *c, const char *file, int line);
 int	__rw_try_wlock_int(struct rwlock *rw LOCK_FILE_LINE_ARG_DEF);

From nobody Sat Sep 27 15:14:07 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrZm3HzJz68DZ0;
	Sat, 27 Sep 2025 15:14:08 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrZl33wmz44Bs;
	Sat, 27 Sep 2025 15:14:07 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758986047;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=RhzOxm9zfwLCT1BUaQb7Qz+FfQcM5NQTfKtHcAO8Fo4=;
	b=iuVQ5uCTvc0zm7/GUH/HTxyOgCEaqsBteTfFUc4kym6kaMxhilQ/DKyyt0UQ+upofnCJr3
	fmkdQBmxRRjOMSC5PIWQ3JzYZsXqQ3bxAk8HLpwsYL44e+0ibFNA5vD/J2vO+hTKgNACEU
	t0uBK+T4p74SV1y6xI1veKkuKW4whPUQ8STuZCe7SNJNFPenYh6u5dh2ydla0Kz66DSPtc
	fCF1uHZAX5h2QY5Ox50eQ5JVwourEIV2nUEVBu0qPuT+r5wEffCQTRoFiweqkttv0DwBdB
	5uapAyeTIXR1kvEq8r8+ewam8JpujLdVaZIX9d/iI/KOmZ8alx0cY0tHvgse5Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986047;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=RhzOxm9zfwLCT1BUaQb7Qz+FfQcM5NQTfKtHcAO8Fo4=;
	b=tVQfS9xC2L7QKh/B5JB01EEQoWLKo+VXMfVwm0WypB0Ouoc/TfvJPV531RXiZxrDgolGdG
	WFxZWrmM9gpU6A0JChlUznv9zaI/WofXzgTWC4/tnX4jTWK0dpkYtPVO09Wk7nd/nA7zg7
	Wq1X0UjD1xwrjDlSOZq59WBNOKcYsgU4X2Y2vQ1UVWSYFUASom2JBEHGD1fMd83r19F1T9
	F0DjHJwgWBOgIqq2eQcx+o7tGfCq/BzEK1z3VD7CAgTo1wCM4CDfK5VRq8IEau9xn8GZL5
	tFzWuKBtllkWC/ayQlXqVpHkV12sUsRN+9INDGkKPK4RBSjsNaYQm4LPa6VJFg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986047; a=rsa-sha256; cv=none;
	b=gvjrCfDqXg0/of2X6HXNuEPH3o1hdvDtGwL0fyTiuu/IBxJ92u/u0l6KGHeROoeCwYsBqY
	tbt1kvukDMMt1fzVbmSbi5qs2nj0OjHuU63DcFXZlCEUFekqFrMVQkLI+eaopY2JDM03+4
	N+CSZJXrxg7XDHsFP1c/EEXzvEL/h4SqVK3cnVPCsuF8bECWkporsEYMkjpIC+c4VdHj2+
	fn/QdI8JYXuQ4GuNRLYdg5JyiWBJ/AfoZY8I5Cwov/hwi92Lk8/fL2kl7pFLlkFMNVJFhj
	sbHpLsnP6nc/J8QXNXhMUN2bJbkoWCZoFl9DR6v5ocboMYOMSvKRPtSdFe2JDQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrZl2QmdzfWQ;
	Sat, 27 Sep 2025 15:14:07 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFE7EG083445;
	Sat, 27 Sep 2025 15:14:07 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFE7xm083442;
	Sat, 27 Sep 2025 15:14:07 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:14:07 GMT
Message-Id: <202509271514.58RFE7xm083442@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: 17226a28bbd5 - stable/14 - rmlock: Sprinkle const
  qualifiers where appropriate
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 17226a28bbd59ebd2b2031606a38e29654a62964
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit 17226a28bbd59ebd2b2031606a38e29654a62964
Author:     Zhenlei Huang 
AuthorDate: 2025-09-05 16:00:04 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:38 +0000

    rmlock: Sprinkle const qualifiers where appropriate
    
    No functional change intended.
    
    MFC after:      2 weeks
    
    (cherry picked from commit bec053201032b6b200dfe4e545e745af0f2179b4)
---
 sys/kern/kern_rmlock.c | 4 ++--
 sys/sys/rmlock.h       | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/kern/kern_rmlock.c b/sys/kern/kern_rmlock.c
index c1633dd19de2..7206572ffc02 100644
--- a/sys/kern/kern_rmlock.c
+++ b/sys/kern/kern_rmlock.c
@@ -337,9 +337,9 @@ rm_wowned(const struct rmlock *rm)
 }
 
 void
-rm_sysinit(void *arg)
+rm_sysinit(const void *arg)
 {
-	struct rm_args *args;
+	const struct rm_args *args;
 
 	args = arg;
 	rm_init_flags(args->ra_rm, args->ra_desc, args->ra_flags);
diff --git a/sys/sys/rmlock.h b/sys/sys/rmlock.h
index 664356998438..eae7342527e3 100644
--- a/sys/sys/rmlock.h
+++ b/sys/sys/rmlock.h
@@ -52,7 +52,7 @@ void	rm_init(struct rmlock *rm, const char *name);
 void	rm_init_flags(struct rmlock *rm, const char *name, int opts);
 void	rm_destroy(struct rmlock *rm);
 int	rm_wowned(const struct rmlock *rm);
-void	rm_sysinit(void *arg);
+void	rm_sysinit(const void *arg);
 
 void	_rm_wlock_debug(struct rmlock *rm, const char *file, int line);
 void	_rm_wunlock_debug(struct rmlock *rm, const char *file, int line);

From nobody Sat Sep 27 15:14:09 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrZp20PTz68Dfx;
	Sat, 27 Sep 2025 15:14:10 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrZn5m2Xz44Sp;
	Sat, 27 Sep 2025 15:14:09 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758986049;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=NvjxTVIXoHhM9+xWQa9owx+JMAqEcTLPuGsZTV7hEKg=;
	b=gQH4dF1FY80VUdMIXE3JZ3+SMc2t/d8tcoaI8KBmxlvZVP+iyjIVZBuZXtfDMZ17TTYLoz
	5o+zqoXR2wzfZdLm2n704ngMy7DddPgJqRQN2kybc+I7bssTENk9OJOrB6a2g/nt+IeS1C
	clGtdOzvoZz/a3hLUGUAl0rN9MpMdeacgumoVJBvdRhFpynEt7Evd6rqnLONS1wIag+/rG
	M5D76g1mjNjdx6ysYfK0zBRHt1LPAbktR/rxUcC5Vn6CFzk/7d4rXK10hdjgaUB4DSf4CZ
	3hEoty2kMfPQvSz1QAQTVxXT2ZF3yXOmv5Ff/d1JiArgEoRrsjAGuXqBqOwcpA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986049;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=NvjxTVIXoHhM9+xWQa9owx+JMAqEcTLPuGsZTV7hEKg=;
	b=eRzUOQ0D0T+Ian8xjv5Klsne/0qrbcOBZbZii9l+5b6LVEA23T0MJEVQVXBRnW+TVfnT9y
	C3Wziv2JKiiwlYNeuta+vQRfhFkgYhbJ4BBAgb+bCab2sjq2nRzRuDx76hJhZhz8qnkIJJ
	0WUw2PzO03M33Eo+XIP5BXLSVjdMbL+y+woO78aDSDydcLhemB5XoaTDeF27NHYATH7JTL
	CAe6lHqtVo1WfYkgNlvumhtt+7n7uO8+XHWyH8omK+CPobsGvMWaRpjcYFJjhGyHFHMMn3
	TZ/zsHVZj9am+0NiL5cbewg16tZU03ikGlZCHmGK+sMXPZq+4Pdxdv2ea5YETw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986049; a=rsa-sha256; cv=none;
	b=WTIq/GQPNhnRjSbN+iDXkTExQCLCIl4Sd27AfoO5cE4yCB8wh8tc9PzwNzn4g8WL3liTZM
	Ep+9HuDVCQmbbRfi6YzpjJjQQ+Cbv9xJMRSIdVMc56qx3YfQwbwXSdV28/HIrf0FlIfrVq
	+ISQN4674/1qkSUmBjvCF5N9sJBjlmeAw5H0ifLv3iBELBoCeyEaP0s4yPxERoWOKeGEbY
	aGiIsBORzZEAECrwaSnSSQy+FgGvBmJ01yHUw4rb5/S7PJglFYpmkOCnejkiuyhMefxpnr
	ix5DLvES3O+La/7Sgi/FNLoTqud5JqCS5yYdvH+QNysTj/xNrqZTiG8d84x5oA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrZn4446zg55;
	Sat, 27 Sep 2025 15:14:09 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFE98t083510;
	Sat, 27 Sep 2025 15:14:09 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFE9XF083507;
	Sat, 27 Sep 2025 15:14:09 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:14:09 GMT
Message-Id: <202509271514.58RFE9XF083507@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: 629d42653584 - stable/14 - sx: Sprinkle const qualifiers
  where appropriate
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 629d42653584af5c1a05e2f012b62338de92f523
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit 629d42653584af5c1a05e2f012b62338de92f523
Author:     Zhenlei Huang 
AuthorDate: 2025-09-05 16:00:05 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:39 +0000

    sx: Sprinkle const qualifiers where appropriate
    
    No functional change intended.
    
    MFC after:      2 weeks
    
    (cherry picked from commit 306f0c4cf1a2f58a56993d29d666b4643326493b)
---
 sys/kern/kern_sx.c | 4 ++--
 sys/sys/sx.h       | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/kern/kern_sx.c b/sys/kern/kern_sx.c
index 0422e6804459..c8a8ceef3b93 100644
--- a/sys/kern/kern_sx.c
+++ b/sys/kern/kern_sx.c
@@ -223,9 +223,9 @@ owner_sx(const struct lock_object *lock, struct thread **owner)
 #endif
 
 void
-sx_sysinit(void *arg)
+sx_sysinit(const void *arg)
 {
-	struct sx_args *sargs = arg;
+	const struct sx_args *sargs = arg;
 
 	sx_init_flags(sargs->sa_sx, sargs->sa_desc, sargs->sa_flags);
 }
diff --git a/sys/sys/sx.h b/sys/sys/sx.h
index 798e85ed67dc..9a7efaf73807 100644
--- a/sys/sys/sx.h
+++ b/sys/sys/sx.h
@@ -99,7 +99,7 @@
  * Function prototipes.  Routines that start with an underscore are not part
  * of the public interface and are wrappered with a macro.
  */
-void	sx_sysinit(void *arg);
+void	sx_sysinit(const void *arg);
 #define	sx_init(sx, desc)	sx_init_flags((sx), (desc), 0)
 void	sx_init_flags(struct sx *sx, const char *description, int opts);
 void	sx_destroy(struct sx *sx);

From nobody Sat Sep 27 15:14:10 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrZq48nxz68DCK;
	Sat, 27 Sep 2025 15:14:11 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrZp5jglz44Y6;
	Sat, 27 Sep 2025 15:14:10 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758986050;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=PrEUhLktAG0XTujbuGlJUsiHDh/q3+ZvJITaAL5roiI=;
	b=CDhWqhCNZCsZBVZ6oPMuf+rVXFLiZj2aT9f5pi4y5824m/K/k+gvsWm7DmrAMdUEpCdOPS
	G8PsnCNB1nXANo3n44e0Y90qkCsNcoa13G/Hp0fhOFlm4C4eDXY5YvhtuIaGSzugdoP3t+
	Dh5wB878vunL6fdisQjgj0OP4ntfV9e+mEcWXy+cM7qqCkwRUFXN004rSkjdPNSnJpEbUM
	mH9lRKmHChe6WKraBifQCJriECQWJV1LrOMe8Ptgd/3VzsSK5MVkDi66n7y6ozACCJcRDi
	cxhwZnNtZ1eifFh1eU1qpZwKmWBuuT5/Kx5jcH13zBwv89V8gRycLc4V0elrxQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986050;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=PrEUhLktAG0XTujbuGlJUsiHDh/q3+ZvJITaAL5roiI=;
	b=NbXMgCp/3/qz9GHu0thuhdL/2T47WVl16BOluaHdFUCbRi05yWtVqu5lmuqcltFRvnJS5k
	DfbKuyoJHQZr66S0b+1sz49+FA9S7xKH0OpiyMUrf6CMSJTuqIrDEOLNihCV9uWk+6PL4/
	UT7thLLwtDvgBmL8hrwNC/qj8E5v9kUh8i19goJQBNgG/7io27lQ2ZaVxwT93YOLUy/K+5
	62giTypdq92gsbUtn02RgAb4PqF4cFcdkX3Y15RlElNapYePo0SiEKZQ1uc6dnvYBFmRaH
	qZ8Nu3TZluKMnkd45AG89i+fOu1jWgJGtnuEDKHQzpVNatWdTW+Lp4++77+cfQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986050; a=rsa-sha256; cv=none;
	b=AgiQZh0AKHh3vDyNft0yfRG20HwV42N9kOlm9GA9zPIzjzAoXnF9KAtAyjn9hJPwh0uOmQ
	afNBgNAky0yMp/og+de6XHl95Cs1tXOT0/21H4IhxJtMTP3nbZgw0Z7EI5O3j3+ZU1KNpm
	hfF3jLt+AcrtwG2cmyZlLGr2mtq8tReuPtIhnLwBQVe6oLKZD10Swvvi6XyivlY73HLcws
	mZfE5RmLSjC6E774/9HzSv+kd+m0QV2hVNPqZg8CbG+oHsSHuk91MJiFFaWOWwuDdKrGuy
	4G/Tf6U9qq+ljeY/k8f4SOxEx8WeVhWBlR3Swt8ls48WUWXpswrVpfRGhDekeQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrZp57LCzfWR;
	Sat, 27 Sep 2025 15:14:10 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFEAb9083542;
	Sat, 27 Sep 2025 15:14:10 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFEAfJ083539;
	Sat, 27 Sep 2025 15:14:10 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:14:10 GMT
Message-Id: <202509271514.58RFEAfJ083539@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: 2cb20b25a573 - stable/14 - qlnxe: Unconditionally
  enable extended media types
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 2cb20b25a5739fb542513571e3f6d7ffd607f346
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit 2cb20b25a5739fb542513571e3f6d7ffd607f346
Author:     Zhenlei Huang 
AuthorDate: 2025-09-09 10:04:54 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:39 +0000

    qlnxe: Unconditionally enable extended media types
    
    Those extended media types are available since about 2015 [1]. All
    supported branches already have them defined.
    
    No functional change intended.
    
    [1] eb7e25b22f1c ifmedia changes: Extend the number of available subtypes for Ethernet media ...
    
    Reviewed by:    kbowling
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D52374
    
    (cherry picked from commit 08356a733eb7a7bef1afe20ded2d983b55310de7)
    (cherry picked from commit 5aa49c98edfc48fbe96f7aba0e0631d4c0f29493)
---
 sys/dev/qlnx/qlnxe/qlnx_def.h | 16 ----------------
 sys/dev/qlnx/qlnxe/qlnx_os.c  | 21 +++++++++------------
 2 files changed, 9 insertions(+), 28 deletions(-)

diff --git a/sys/dev/qlnx/qlnxe/qlnx_def.h b/sys/dev/qlnx/qlnxe/qlnx_def.h
index 4342bba89587..796845f3f8c6 100644
--- a/sys/dev/qlnx/qlnxe/qlnx_def.h
+++ b/sys/dev/qlnx/qlnxe/qlnx_def.h
@@ -696,22 +696,6 @@ extern int qlnx_alloc_mem_sb(qlnx_host_t *ha, struct ecore_sb_info *sb_info,
  * Some OS specific stuff
  */
 
-#if (defined IFM_100G_SR4)
-#define QLNX_IFM_100G_SR4 IFM_100G_SR4
-#define QLNX_IFM_100G_LR4 IFM_100G_LR4
-#define QLNX_IFM_100G_CR4 IFM_100G_CR4
-#else
-#define QLNX_IFM_100G_SR4 IFM_UNKNOWN
-#define QLNX_IFM_100G_LR4 IFM_UNKNOWN
-#endif /* #if (defined IFM_100G_SR4) */
-
-#if (defined IFM_25G_SR)
-#define QLNX_IFM_25G_SR IFM_25G_SR
-#define QLNX_IFM_25G_CR IFM_25G_CR
-#else
-#define QLNX_IFM_25G_SR IFM_UNKNOWN
-#define QLNX_IFM_25G_CR IFM_UNKNOWN
-#endif /* #if (defined IFM_25G_SR) */
 
 #define QLNX_INC_IERRORS(ifp)	if_inc_counter(ifp, IFCOUNTER_IERRORS, 1)
 #define QLNX_INC_IQDROPS(ifp)	if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1)
diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c
index 1be77dcc3d37..eeea1aa17ac9 100644
--- a/sys/dev/qlnx/qlnxe/qlnx_os.c
+++ b/sys/dev/qlnx/qlnxe/qlnx_os.c
@@ -2375,18 +2375,15 @@ qlnx_init_ifnet(device_t dev, qlnx_host_t *ha)
 		ifmedia_add(&ha->media, (IFM_ETHER | IFM_40G_CR4), 0, NULL);
         } else if ((device_id == QLOGIC_PCI_DEVICE_ID_1656) ||
 			(device_id == QLOGIC_PCI_DEVICE_ID_8070)) {
-		ifmedia_add(&ha->media, (IFM_ETHER | QLNX_IFM_25G_SR), 0, NULL);
-		ifmedia_add(&ha->media, (IFM_ETHER | QLNX_IFM_25G_CR), 0, NULL);
+		ifmedia_add(&ha->media, (IFM_ETHER | IFM_25G_SR), 0, NULL);
+		ifmedia_add(&ha->media, (IFM_ETHER | IFM_25G_CR), 0, NULL);
         } else if (device_id == QLOGIC_PCI_DEVICE_ID_1654) {
 		ifmedia_add(&ha->media, (IFM_ETHER | IFM_50G_KR2), 0, NULL);
 		ifmedia_add(&ha->media, (IFM_ETHER | IFM_50G_CR2), 0, NULL);
         } else if (device_id == QLOGIC_PCI_DEVICE_ID_1644) {
-		ifmedia_add(&ha->media,
-			(IFM_ETHER | QLNX_IFM_100G_LR4), 0, NULL);
-		ifmedia_add(&ha->media,
-			(IFM_ETHER | QLNX_IFM_100G_SR4), 0, NULL);
-		ifmedia_add(&ha->media,
-			(IFM_ETHER | QLNX_IFM_100G_CR4), 0, NULL);
+		ifmedia_add(&ha->media, (IFM_ETHER | IFM_100G_LR4), 0, NULL);
+		ifmedia_add(&ha->media, (IFM_ETHER | IFM_100G_SR4), 0, NULL);
+		ifmedia_add(&ha->media, (IFM_ETHER | IFM_100G_CR4), 0, NULL);
 	}
 
         ifmedia_add(&ha->media, (IFM_ETHER | IFM_FDX), 0, NULL);
@@ -3806,11 +3803,11 @@ qlnx_get_optics(qlnx_host_t *ha, struct qlnx_link_output *if_link)
 	case MEDIA_MODULE_FIBER:
 	case MEDIA_UNSPECIFIED:
 		if (if_link->speed == (100 * 1000))
-			ifm_type = QLNX_IFM_100G_SR4;
+			ifm_type = IFM_100G_SR4;
 		else if (if_link->speed == (40 * 1000))
 			ifm_type = IFM_40G_SR4;
 		else if (if_link->speed == (25 * 1000))
-			ifm_type = QLNX_IFM_25G_SR;
+			ifm_type = IFM_25G_SR;
 		else if (if_link->speed == (10 * 1000))
 			ifm_type = (IFM_10G_LR | IFM_10G_SR);
 		else if (if_link->speed == (1 * 1000))
@@ -3820,11 +3817,11 @@ qlnx_get_optics(qlnx_host_t *ha, struct qlnx_link_output *if_link)
 
 	case MEDIA_DA_TWINAX:
 		if (if_link->speed == (100 * 1000))
-			ifm_type = QLNX_IFM_100G_CR4;
+			ifm_type = IFM_100G_CR4;
 		else if (if_link->speed == (40 * 1000))
 			ifm_type = IFM_40G_CR4;
 		else if (if_link->speed == (25 * 1000))
-			ifm_type = QLNX_IFM_25G_CR;
+			ifm_type = IFM_25G_CR;
 		else if (if_link->speed == (10 * 1000))
 			ifm_type = IFM_10G_TWINAX;
 

From nobody Sat Sep 27 15:14:12 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrZs549Zz68D97;
	Sat, 27 Sep 2025 15:14:13 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrZs0d4fz44fW;
	Sat, 27 Sep 2025 15:14:13 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758986053;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=mpaKAhvQZrtICshHwbZpjzmnhbvan/IQr6sXDNGPjGg=;
	b=j7lp96f4UBP1j7RK+EZADWUKcpRgGMc8RldkyrA4BrPOGyvMY9SaWp/xVxl+rdE4Ft+F+c
	UwGqYnUZd8/5ZBwRkAUy1NaF7IvHlC5ZEeKvTTWwpC7wZeB+0/YBgHUOflrQSTpowWJCtx
	43oBFAgZuhJbdXSoYntX/+TkM3UjY4vjv5hfDqNjaXWzpS9zIWu03TqWBKyfLFpmReIbnh
	9FKz3hmsbh2YWw10l+XFLZHUh9nTYsquWrHgG38dTa7ITK/DWcnk7WcLm/JC7NbqzXCBmq
	PhMbV6P/ky6R4g8xTGOJWeqYM6hvPMT3G+8+YfrINDcATsMHyoPG5AwUEELiUw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986053;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=mpaKAhvQZrtICshHwbZpjzmnhbvan/IQr6sXDNGPjGg=;
	b=uI9wIKrN+yTmVCAWTMq/qSFCi3gaiPNkd97yPZXjlnuAJOHQgfEwJV2zdC997xAkeBYDBT
	4pNz0HdTl621RR+QkYFTMrUvYEe78IS3Ot2MXP8JGvr3kfS/afG4iUH7LIDEFV9yQZyO12
	jnNIZe0p2VtSLk7x4hJ9SII4JLaMha5//oGNRpGo8a0pkiiPWgN3ahxR+73f1mQa7G3V6p
	Nvk9sUvdXeaYXy50rianIj6l7NUI8RsTmg0Ohp7y3sAmVpBrhMNYdYxBh1gf+TWRsRv/d8
	CfMzi0gacv6flU9EW1Cl10aSoypgzXw1KqX1Rxcj4ougsQCC4tilu7rDXVpD2w==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986053; a=rsa-sha256; cv=none;
	b=kCuv5SggvgxuNh7PPVqt5sSJh/T7b6OMpFxvrYw2ybKs+zI2jaivE62I7kEtEuBmVi/3G6
	6jOZXUwT2hZdrgY8Tqh38a0ozzACJgvNd+iTxpflePuVHGMQ5F+zNz9UzScMDAUMb+wUIh
	pBUdUepkNqDwm/e9AJg5io0mqeo7Y5OQzjFTM0P56Iok1A9mrJO7xEffxgMWYAEs9NNDf8
	Z6SfcqgaHkN+H8MH1LAk5iJJNiKzGbRRSfbgeVgaPx2OBQZZABHsqg3qO4Hm3eLopU42OC
	BR3cwxv5lCk/Puu+iuCfhn9zVdwKUxlUQVU0YSu3X4oaZQ/kkL+6EFnB7eLeig==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrZr6sGfzftK;
	Sat, 27 Sep 2025 15:14:12 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFECK5083606;
	Sat, 27 Sep 2025 15:14:12 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFECPU083603;
	Sat, 27 Sep 2025 15:14:12 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:14:12 GMT
Message-Id: <202509271514.58RFECPU083603@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: 94d3be2b547c - stable/14 - qlnxe: Report speeds in
  decimal format
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 94d3be2b547c133f42730e6c8692590ea32adab0
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit 94d3be2b547c133f42730e6c8692590ea32adab0
Author:     Zhenlei Huang 
AuthorDate: 2025-09-09 10:04:55 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:39 +0000

    qlnxe: Report speeds in decimal format
    
    It is more natural to read the speed in decimal format than hexadecimal
    one.
    
    Spotted this while diagnosing PR 287445,
    
    ```
    [__ecore_configure_pf_max_bandwidth:6864(qlnx-0)]Configured MAX bandwidth to be 000061a8 Mb/sec
    [__ecore_configure_pf_min_bandwidth:6922(qlnx-0)]Configured MIN bandwidth to be 750 Mb/sec
    ```
    
    Reviewed by:    kbowling
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D52376
    
    (cherry picked from commit e1c5e043961ab3a5429a0c6e727265dfa819cf00)
    (cherry picked from commit 6fb046515ea6005b3958e0c3220d0e6e630af292)
---
 sys/dev/qlnx/qlnxe/ecore_dev.c | 6 +++---
 sys/dev/qlnx/qlnxe/ecore_mcp.c | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sys/dev/qlnx/qlnxe/ecore_dev.c b/sys/dev/qlnx/qlnxe/ecore_dev.c
index 6187ecdbc446..389a95a4164c 100644
--- a/sys/dev/qlnx/qlnxe/ecore_dev.c
+++ b/sys/dev/qlnx/qlnxe/ecore_dev.c
@@ -5268,7 +5268,7 @@ ecore_hw_get_nvm_info(struct ecore_hwfn *p_hwfn,
 	}
 
 	DP_VERBOSE(p_hwfn, ECORE_MSG_LINK,
-		   "Read default link: Speed 0x%08x, Adv. Speed 0x%08x, AN: 0x%02x, PAUSE AN: 0x%02x EEE: %02x [%08x usec]\n",
+		   "Read default link: Speed %u Mb/sec, Adv. Speeds 0x%08x, AN: 0x%02x, PAUSE AN: 0x%02x EEE: %02x [%u usec]\n",
 		   link->speed.forced_speed, link->speed.advertised_speeds,
 		   link->speed.autoneg, link->pause.autoneg,
 		   p_caps->default_eee, p_caps->eee_lpi_timer);
@@ -6860,7 +6860,7 @@ int __ecore_configure_pf_max_bandwidth(struct ecore_hwfn *p_hwfn,
 			      p_hwfn->qm_info.pf_rl);
 
 	DP_VERBOSE(p_hwfn, ECORE_MSG_LINK,
-		   "Configured MAX bandwidth to be %08x Mb/sec\n",
+		   "Configured MAX bandwidth to be %u Mb/sec\n",
 		   p_link->speed);
 
 	return rc;
@@ -6918,7 +6918,7 @@ int __ecore_configure_pf_min_bandwidth(struct ecore_hwfn *p_hwfn,
 	rc = ecore_init_pf_wfq(p_hwfn, p_ptt, p_hwfn->rel_pf_id, min_bw);
 
 	DP_VERBOSE(p_hwfn, ECORE_MSG_LINK,
-		   "Configured MIN bandwidth to be %d Mb/sec\n",
+		   "Configured MIN bandwidth to be %u Mb/sec\n",
 		   p_link->min_pf_rate);
 
 	return rc;
diff --git a/sys/dev/qlnx/qlnxe/ecore_mcp.c b/sys/dev/qlnx/qlnxe/ecore_mcp.c
index ab14b1eb5186..6d1e5fe24d06 100644
--- a/sys/dev/qlnx/qlnxe/ecore_mcp.c
+++ b/sys/dev/qlnx/qlnxe/ecore_mcp.c
@@ -1638,7 +1638,7 @@ enum _ecore_status_t ecore_mcp_set_link(struct ecore_hwfn *p_hwfn,
 
 	if (b_up)
 		DP_VERBOSE(p_hwfn, ECORE_MSG_LINK,
-			   "Configuring Link: Speed 0x%08x, Pause 0x%08x, adv_speed 0x%08x, loopback 0x%08x\n",
+			   "Configuring Link: Speed %u Mb/sec, Pause 0x%08x, adv_speed 0x%08x, loopback 0x%08x\n",
 			   phy_cfg.speed, phy_cfg.pause, phy_cfg.adv_speed,
 			   phy_cfg.loopback_mode);
 	else

From nobody Sat Sep 27 15:14:11 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrZr4NwRz68DCL;
	Sat, 27 Sep 2025 15:14:12 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrZq6YYPz44T6;
	Sat, 27 Sep 2025 15:14:11 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758986051;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=kZf7O9+VTxLQ1cZRCzXXZV+7Z1L5Za58W1rmWEfA4Ws=;
	b=aRLH1m2ZrzdnPcni1GjRm5ohpczPd7+yOotIrGdqRGYsVqDZN/0dlaxmhLS+lvr5dxA1/h
	1QhONbxOmIROTLp/XW5g28yimqbFfj8r+gnbnrLRDeX1IBkqtO8JvRFvMvfPwUr9q4AzQ2
	fhFWvcgjrcoJkIxjtyFM3NUzPcO5UNYDC1A0NN6iZ8FFN2Rmr3rCX1PTMc9I/GrF4GV/um
	6N4c+5dzTC5tfnY5vH9KbKj3vh/CMtBzeYvmAbJOoYjTahTGDmtNBQzKZV3drxq6H2RqO/
	cwiGHJdIhjaOxJt0942Y0P+iJs7ZlYZoNJyk119T6IkA+vS5b2wgevA/hMA+zw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986051;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=kZf7O9+VTxLQ1cZRCzXXZV+7Z1L5Za58W1rmWEfA4Ws=;
	b=Pe1BgsBNzFiDYDwYhvCWCkMnfKgNVDaVUxDee/Lz13M/muvY9ay7gBgJIMOtx40Xn37OTX
	CR771/OeeGs5UuOZkI8bGup86B8hI/2hsxF078zupaP8BR27dppdaYJTnpZRm17bp3RQrh
	zsZj1frbnAFUsDtWXTDG0DzGacMkLFg3Nm+FPj9ZXT9/LTpk65oCFHWERxmEx9uwsgto3H
	o2iovB1YXd3IU9dE/ejZLae4/68f4c65Or5m2yAB8WEdFDJJgCB3A5AYPHs+FgAwGLc6YT
	u4eOhPrUcgtJ5mZiRM922vZ2gBpfblRdjPJsMwAOMN/x3X10dbbmBdsjblsR2g==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986051; a=rsa-sha256; cv=none;
	b=cltucgAlO3RJ7DHUKGIWKipOjtSdeYVwSZeQTFxYv9WsgqachUQVX6cVYO6lYbFd2FYppo
	ZasufJdWak/kl64byCePlrlCEf6PPfdcVYIL0bGKGDSNU5ym718MO5PFAvFhF1IDCdO0dT
	6MoAP/SCUNl6cnyNQqgo743UQQEEip/0zbMqpzaOTA0HyuUOY8KxWPkb67DIBXMxmWDsRO
	m09ai+ZoovEUXMmDNTaBnK5Dl4HxCDoYyxKREgo4lg8w4SdfHhYxVduWN++7yNxg9ctnmo
	svzct6XeWxTLH8xpME6h5wOHdF192MxKg93zZXsFDb207PDHShySm1H9NjzJBA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrZq66mxzfhB;
	Sat, 27 Sep 2025 15:14:11 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFEBIF083574;
	Sat, 27 Sep 2025 15:14:11 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFEB7i083571;
	Sat, 27 Sep 2025 15:14:11 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:14:11 GMT
Message-Id: <202509271514.58RFEB7i083571@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: ac4b48b6ad34 - stable/14 - qlnxe: Support SIOCGIFXMEDIA
  ioctl
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: ac4b48b6ad34a83406054c5badd0f835136ffd88
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit ac4b48b6ad34a83406054c5badd0f835136ffd88
Author:     Zhenlei Huang 
AuthorDate: 2025-09-09 10:04:54 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:39 +0000

    qlnxe: Support SIOCGIFXMEDIA ioctl
    
    ifconfig(8) will try SIOCGIFXMEDIA first and then retry SIOCGIFMEDIA if
    that fails. Since the driver reports extended media types, support
    SIOCGIFXMEDIA ioctl directly rather than doing another round.
    
    Reviewed by:    kbowling
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D52375
    
    (cherry picked from commit 6e3c8c0f709ab0b9d70e2725e58f4a4ba7a4404e)
    (cherry picked from commit 817bc700927087a52d0dd34c43e45736a867240e)
---
 sys/dev/qlnx/qlnxe/qlnx_os.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c
index eeea1aa17ac9..32b893480401 100644
--- a/sys/dev/qlnx/qlnxe/qlnx_os.c
+++ b/sys/dev/qlnx/qlnxe/qlnx_os.c
@@ -2719,7 +2719,9 @@ qlnx_ioctl(if_t ifp, u_long cmd, caddr_t data)
 
 	case SIOCSIFMEDIA:
 	case SIOCGIFMEDIA:
-		QL_DPRINT4(ha, "SIOCSIFMEDIA/SIOCGIFMEDIA (0x%lx)\n", cmd);
+	case SIOCGIFXMEDIA:
+		QL_DPRINT4(ha,
+		    "SIOCSIFMEDIA/SIOCGIFMEDIA/SIOCGIFXMEDIA (0x%lx)\n", cmd);
 
 		ret = ifmedia_ioctl(ifp, ifr, &ha->media, cmd);
 		break;

From nobody Sat Sep 27 15:14:17 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrZx5wVvz68DrM;
	Sat, 27 Sep 2025 15:14:17 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrZx3zcYz44m0;
	Sat, 27 Sep 2025 15:14:17 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758986057;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=MRXRKbMv+G8lfw07QEvTNSVNSan2EBCstOPgZNA2VGk=;
	b=n0RNznTCAa2M88BveY4L8agtwY+ysSnddleS07I4qeOx+mVU4vlqR9an7hUCr5ALvL6M7r
	QAbbjp1tHiDFG1fP4umJYXdpwI98ymElc8XYVa5JFAmRFjyuR5nzjEfpf2bVcsNNZy8AyQ
	pTMQZmQx4aC5lEjU6ws/fG9n0XqX25hLW/WAoCbNmr8cZIpMwunSkYJOl9R/4O6RS/tAtf
	g7yjrZaVvdBhqyeIcBpubR43NpfCYisviWyMs6IzGwEml9I6xTk2YGy+QFy6N8CEurDxMP
	VvN8wvprnOycRWBszL0MfaWVabQQi+NxdknVZ335PRb29cgbeGfEQsy/CQgQlw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986057;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=MRXRKbMv+G8lfw07QEvTNSVNSan2EBCstOPgZNA2VGk=;
	b=e0pTBqiWACj8JqqqlbqnzzxWt5euWESMEYc/aHKH6g/R16+MpKolIaA/QjtKsAvVkqBLIh
	RHvOvcdn2jFx2TRyQPSyZVM/t2GwXspWTndmdhN6kDg1PERfkfsVcK418TXFsM9pzCTJUP
	hPbeXm8+XUQaHFGrTl6VSvPin42RXep53CXwgBj88/L8jAqVHbyWlxZkMtNlMs3fZiQv0T
	mbhSdHk5VntkF5IAWLIHLZmXewvP3EMr/rxX48KTt8XYjqPJU285gXQBRTQHgBlXNI1eRk
	fIi743qOocM7t1Nhwmwt+bZ2e7InxpQQg1L6jgNksiXDMiTfAACdydiQZTUoiQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986057; a=rsa-sha256; cv=none;
	b=axrFFXIGzXXrWgg+2rJ4f/EkY1NmAzJLOn8NMNs+2JQKYvAVXkh1GRwEsUa38S3fMm3N0W
	TyOQSKChl1ZRKPF+tmJSF6X3sKaUlG16ikOCA2qG5gVBs9fZ9yWPs2KAcwXoAhWdP4Epqc
	dQRoz6ipbddAgMVH2nDipR6SSVP3pzgF1ba9I2w6CLkzY0HaBxPHMHDyhq4swgLMesJhuF
	ndypoCXafpbXbTVe+Du2FXgiAAyDITYdifbwTPC7B7nl8cyKHmctdQCvL08TVq9CclqkPB
	XY+HcA3WrNOm9AbWQ4SAXwqsc10vzpVLj5UfW4MU+/WgknHKZMQN1dPIEHL0rw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrZx3Z9LzftL;
	Sat, 27 Sep 2025 15:14:17 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFEHFo083738;
	Sat, 27 Sep 2025 15:14:17 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFEHMv083735;
	Sat, 27 Sep 2025 15:14:17 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:14:17 GMT
Message-Id: <202509271514.58RFEHMv083735@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: 6a2eca1b38d7 - stable/14 - ifconfig: Fix the display
  of the IFCAP_MEXTPG capability without netlink
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 6a2eca1b38d762776676065d72518d30d1f1f348
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit 6a2eca1b38d762776676065d72518d30d1f1f348
Author:     Zhenlei Huang 
AuthorDate: 2025-09-19 19:18:27 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:40 +0000

    ifconfig: Fix the display of the IFCAP_MEXTPG capability without netlink
    
    Historically this capability is IFCAP_NOMAP but it was renamed to
    IFCAP_MEXTPG. Catch up with the change 3f43ada98c89.
    
    PR:             289545
    Fixes:          3f43ada98c89 Catch up with 6edfd179c86: mechanically rename IFCAP_NOMAP to IFCAP_MEXTPG
    MFC after:      3 days
    
    (cherry picked from commit 5017fdb728811fd3e15d7151524378f49a49aee1)
    (cherry picked from commit 5f472754ba6f9cc95607956c6e2ad6483c9dd157)
---
 sbin/ifconfig/ifconfig.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 6f2196433a37..037f360d1b7a 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1674,7 +1674,7 @@ static const char *IFCAPBITS[] = {
 	[22] = "TXCSUM_IPV6",
 	[24] = "TXRTLMT",
 	[25] = "HWRXTSTMP",
-	[26] = "NOMAP",
+	[26] = "MEXTPG",
 	[27] = "TXTLS4",
 	[28] = "TXTLS6",
 	[29] = "VXLAN_HWCSUM",

From nobody Sat Sep 27 15:14:13 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrZt6YV5z68DCN;
	Sat, 27 Sep 2025 15:14:14 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrZt1F93z44Wy;
	Sat, 27 Sep 2025 15:14:14 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758986054;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Rae1RYJF9HM5fdGs04huVzlQo0STTI4Qt9FMOjEIRDU=;
	b=nsgmQuR515GlB3KxznrVF9vr9kcjOJtdoe4HlrFDtmW8gFl25YHnAOGno9wMbOlwJ94XdD
	ujY4oyufPsxh3YhCNtDS5qFWYZFgYGxTgkzDdg3suJZJ9VDT3Ve+CDmqc3DmKOmobuJ6c6
	1eNUfHeewqXuz83ZmQefHfBq1uClh6AMBgyUMt34Uo7WzOC8S410JMFdtgZyBuLCGyide5
	K6BSh5P7kkUsnfokBkJuLoXSMImC+eVUmpCnnXf4ybyj0Su3Zxvi65uZY39pABz5LQO9u8
	xbsmayXnIYuLttH644Jcnk3eEu9PQCmvkxuTuAxQWcGfz0TJpMC8XUolGaDm3A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986054;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Rae1RYJF9HM5fdGs04huVzlQo0STTI4Qt9FMOjEIRDU=;
	b=WB25meNtdKaYL5cMMF6NF/WlXlqTSakGp3UKGy8XGrjgCcZgQ9zzREKCf4Mvq9Fed0HtPB
	ro6oRcU+ByN8m10kpdMbKr3+H9WTlcboTQKFiierbMAdn3E5icnJGFHt8/pgUnxCQxiEaD
	ojKucQojyq0CIJA2LFkjZB+jTcAIQZNPg6YhDjufJ9wiZF4QJNkobBG+NUArsMXdp4/+qg
	swBf0xxMfta7gkig9lVixqPf70i5yzC7GYOKAa+BdW2a/jmTvyJKavZHUt1mNTP5JiQBLy
	/uhkpuwx7d8drGgIyRYJIN8hL/VnwrW2ZF7VVrS+qxiq6sgBxTs9pU+Cb3hVYA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986054; a=rsa-sha256; cv=none;
	b=yPQhttKzksNNoVBKodgR7CmofvR8Onak0TI5Hk16QCX+4aaFFoV0vQVqBYYt5vE9pYMwh0
	y1MZry6eyRdpyGnTbWq/bMg7oS/X+RvgjCHq9O/9NQWHMZ9FKLhYc/gU7GURq9nsM/Eajq
	OJ68Ed25jooXjth2fp2+/6PTR49a2oGrMfU29MgjtJMC7B1Cr1OgXUq0esVIJgQ2gvd8OF
	rz3/pEFPm2KwLvXWFkCSXqpJsLYlhxRq3Ciay32V4oTa0S19CC/wlSda4SUjPVvQbiQ+sj
	Xdi0z6s2P61CJlqh+ARg3gMiCepXng5W21bG8LRo3JD1QV1FPOgqHZaRS69NeA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrZt0mfKzfsC;
	Sat, 27 Sep 2025 15:14:14 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFED74083640;
	Sat, 27 Sep 2025 15:14:13 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFEDOA083637;
	Sat, 27 Sep 2025 15:14:13 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:14:13 GMT
Message-Id: <202509271514.58RFEDOA083637@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: 112d1a5f5df0 - stable/14 - tslog: Move sysinit_tslog_shim()
  into kern_tslog.c
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 112d1a5f5df0edb1e530348143413407b2659325
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit 112d1a5f5df0edb1e530348143413407b2659325
Author:     Zhenlei Huang 
AuthorDate: 2025-09-10 14:44:36 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:39 +0000

    tslog: Move sysinit_tslog_shim() into kern_tslog.c
    
    struct sysinit's func pointer requires its address, thus a real function
    is generated in every translation unit when the source file has SYSINITs
    declared. That results in plenty of identical sysinit_tslog_shim in the
    final kernel file, in which only one is used and others are left useless.
    
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D52413
    
    (cherry picked from commit 5f9a05e574050c8b3f6b444311a12e8fb293ad1a)
    (cherry picked from commit bd721f6e8040f0b9d0546c293954290844b6a070)
---
 sys/kern/kern_tslog.c | 10 ++++++++++
 sys/sys/kernel.h      | 11 ++---------
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/sys/kern/kern_tslog.c b/sys/kern/kern_tslog.c
index a22370b85b02..0f2b1db5f347 100644
--- a/sys/kern/kern_tslog.c
+++ b/sys/kern/kern_tslog.c
@@ -221,3 +221,13 @@ SYSCTL_PROC(_debug, OID_AUTO, tslog_user,
     CTLTYPE_STRING|CTLFLAG_RD|CTLFLAG_MPSAFE|CTLFLAG_SKIP,
     0, 0, sysctl_debug_tslog_user,
     "", "Dump recorded userland event timestamps");
+
+void
+sysinit_tslog_shim(const void *data)
+{
+	const struct sysinit_tslog *x = data;
+
+	tslog(curthread, TS_ENTER, "SYSINIT", x->name);
+	(x->func)(x->data);
+	tslog(curthread, TS_EXIT, "SYSINIT", x->name);
+}
diff --git a/sys/sys/kernel.h b/sys/sys/kernel.h
index 1c58775831fa..6f454ec927a8 100644
--- a/sys/sys/kernel.h
+++ b/sys/sys/kernel.h
@@ -251,15 +251,8 @@ struct sysinit_tslog {
 	const void *data;
 	const char *name;
 };
-static inline void
-sysinit_tslog_shim(const void *data)
-{
-	const struct sysinit_tslog *x = data;
-
-	TSRAW(curthread, TS_ENTER, "SYSINIT", x->name);
-	(x->func)(x->data);
-	TSRAW(curthread, TS_EXIT, "SYSINIT", x->name);
-}
+void sysinit_tslog_shim(const void *);
+
 #define	C_SYSINIT(uniquifier, subsystem, order, func, ident)	\
 	static struct sysinit_tslog uniquifier ## _sys_init_tslog = {	\
 		func,						\

From nobody Sat Sep 27 15:14:15 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrZw0kVsz68DCf;
	Sat, 27 Sep 2025 15:14:16 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrZv20nyz44XB;
	Sat, 27 Sep 2025 15:14:15 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758986055;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=4mC52n28wUEHS5vk5lDc+qV6vIXgYAov1MzLXNBho8A=;
	b=oB/xVJOa3w9Gu+T2C7ZzY4Z1CmBcMW77A1GVrwi2qQRtoohaJJz3TAo9cau2K7DJUkUwUc
	saB0CGEQXjAFqbadHeJY3Rl7zv6Rh/XcKfDK1qNj5OBaoEDCGQ2TKchOUJ6tSkgTy9cK8j
	vuEOWyjiBAQt87PWYjApq79d4ou4NzYhKv3c1g3w40iS2qtc7w8xX83c0xKmvMhHIw8GTe
	LOvvPaQ56LkmWwSmNkWFeZrN4wketkH8VTYOfzphLkaNh+Ywm+7o6y3OA+MsFvlU0V82K9
	KKosepZqaFYu6OohNWIs+xlJQRzNRAVQ7hXPPJ2muI7U7suR29J8TKXsYB5+kA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986055;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=4mC52n28wUEHS5vk5lDc+qV6vIXgYAov1MzLXNBho8A=;
	b=VssliMcJ89/36E8i8Ius0j8CusnqafzoWqlpJZO0d5wRUd3CaWsKty2cf5MxyBlVcPgVZZ
	OlYyIgSuvR99E/P3u7rHFevZdWgUdW9HZHTJH4Q4UAuY/GNWXEkeVBjdFI9xsDoq6KEsJ+
	C0AtR7VRKRAGbBpw0BnUBtgVF7tEO9z/1GakDsCOMIIeREloWJcI2ebw7EJLUKLiGrFgOd
	X1VakcwwkZEcxulsYTn80sqjFnE7vU5Jf9IfYU1YwQFcYW5SfctXuY6NVcT4Fh4zgiUsZB
	ZZTFE6qC4VQZSYbq73IO/ehBG56SH76a6k/pd1nAozvsq/V7xs45B4mG+gSmPQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986055; a=rsa-sha256; cv=none;
	b=vepHZ/PJb/nwYsOVUD2WD1ztksZH8IhtRRz/WUbSLvZtTuBW2Dtqc8QMI3swpg/zrW6lp0
	FFPEVKWYXR0RlVu0ReMycDwvFw3q92hYrs9uVqJVLNzKHxGCrs0AEvH4YpVEV3vCqQTx0E
	uOfLgn+EJXiMqcmuwysiUBaDsnWHSjATqOzqwLPuDTvGfTDAtLqOcfmvY/dKDtjcshKb7v
	9VzRZDnarOWxtaJrlUhNGwlgkeA4uPbaFjAeUC8H9b2PihBsorc0m+q5ZWZqnk0sU3p0Sv
	QbX5IqW4v0Kp+f7hIoMm6BmqtFr4ssZC5JNDW4ulSshbzjpqaDqHs7FWR8jYtA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrZv1WBHzfsD;
	Sat, 27 Sep 2025 15:14:15 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFEF0r083674;
	Sat, 27 Sep 2025 15:14:15 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFEF58083671;
	Sat, 27 Sep 2025 15:14:15 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:14:15 GMT
Message-Id: <202509271514.58RFEF58083671@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: ac91312f28a9 - stable/14 - Move print_bits to ifconfig.c
  and make available to other src files.
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: ac91312f28a93e9d1d2a21ddbde76d6920ce8ddc
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit ac91312f28a93e9d1d2a21ddbde76d6920ce8ddc
Author:     Gordon Tetlow 
AuthorDate: 2024-05-31 17:48:10 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:40 +0000

    Move print_bits to ifconfig.c and make available to other src files.
    
    Reviewed by:    emaste
    Event:          Kitchener-Waterloo Hackathon 202406
    Differential Revision:  https://reviews.freebsd.org/D45441
    
    (cherry picked from commit c3e9423743d91ae5b5865602a905900a1855055e)
---
 sbin/ifconfig/ifconfig.c         | 23 +++++++++++++++++++++++
 sbin/ifconfig/ifconfig.h         |  2 ++
 sbin/ifconfig/ifconfig_netlink.c | 23 -----------------------
 3 files changed, 25 insertions(+), 23 deletions(-)

diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 2449d6ca484e..3f3569efbe66 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1887,6 +1887,29 @@ Perror(const char *cmd)
 	Perrorc(cmd, errno);
 }
 
+void
+print_bits(const char *btype, uint32_t *v, const int v_count,
+    const char **names, const int n_count)
+{
+	int num = 0;
+
+	for (int i = 0; i < v_count * 32; i++) {
+		bool is_set = v[i / 32] & (1U << (i % 32));
+		if (is_set) {
+			if (num++ == 0)
+				printf("<");
+			if (num != 1)
+				printf(",");
+			if (i < n_count)
+				printf("%s", names[i]);
+			else
+				printf("%s_%d", btype, i);
+		}
+	}
+	if (num > 0)
+		printf(">");
+}
+
 /*
  * Print a value a la the %b format of the kernel's printf
  */
diff --git a/sbin/ifconfig/ifconfig.h b/sbin/ifconfig/ifconfig.h
index 264e7b82a40e..1ea6c29e4ddb 100644
--- a/sbin/ifconfig/ifconfig.h
+++ b/sbin/ifconfig/ifconfig.h
@@ -268,6 +268,8 @@ void	setifcap(if_ctx *ctx, const char *, int value);
 void	setifcapnv(if_ctx *ctx, const char *vname, const char *arg);
 
 void	Perror(const char *cmd);
+void	print_bits(const char *btype, uint32_t *v, const int v_count,
+		const char **names, const int n_count);
 void	printb(const char *s, unsigned value, const char *bits);
 
 void	ifmaybeload(struct ifconfig_args *args, const char *name);
diff --git a/sbin/ifconfig/ifconfig_netlink.c b/sbin/ifconfig/ifconfig_netlink.c
index 11b3595dafe6..0ec63e3a0b99 100644
--- a/sbin/ifconfig/ifconfig_netlink.c
+++ b/sbin/ifconfig/ifconfig_netlink.c
@@ -81,29 +81,6 @@ static const char	*IFFBITS[] = {
 	"LOWER_UP",		/* 24:0x1000000 IFF_NETLINK_1*/
 };
 
-static void
-print_bits(const char *btype, uint32_t *v, const int v_count,
-    const char **names, const int n_count)
-{
-	int num = 0;
-
-	for (int i = 0; i < v_count * 32; i++) {
-		bool is_set = v[i / 32] & (1U << (i % 32));
-		if (is_set) {
-			if (num++ == 0)
-				printf("<");
-			if (num != 1)
-				printf(",");
-			if (i < n_count)
-				printf("%s", names[i]);
-			else
-				printf("%s_%d", btype, i);
-		}
-	}
-	if (num > 0)
-		printf(">");
-}
-
 static void
 nl_init_socket(struct snl_state *ss)
 {

From nobody Sat Sep 27 15:14:16 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrZw5RySz68Dp0;
	Sat, 27 Sep 2025 15:14:16 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrZw30XDz44bh;
	Sat, 27 Sep 2025 15:14:16 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758986056;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=EDAEdndhRVyXhGW3DzA+ujlnlpUOhBrhLBY6GbN70rA=;
	b=KlhRi/aFkC5xA9CrQaPV3L/k1yv7ej1q3lkBg5h9C78eKByJsIQ04xhJVYxddXJI7kB4jW
	u93llegnCTmUFTrA6tf8EfD+yd2ck+LQrm05Ms8VAQdLd4RrfFfkxbk3wmRacQvrWUwW9j
	S49+2PxxJGlltuvbvbaGWjIHWDWpM78ytew0TNkD3xQ2f/qH0htbmRbUKZq6kKSy1VBE1h
	zTIGB6rEGPXHNjECmE5CQLpzfvZrhf+4xFf67rVOJ1sJmbP4HOt5G+IJBxfl4uLophVC5p
	m2LxWeVO7KwuEIahaDzicQQU/evW1ZtQcjGqdNfNsiv3r1OEmmIk8krctYc2+Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986056;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=EDAEdndhRVyXhGW3DzA+ujlnlpUOhBrhLBY6GbN70rA=;
	b=x8oaJAux2QWHM48UJPK7gi56jxpYnwgfeLPc2DnK+SEupIH6vwWB4S6Z6qft9g2DRKZfv9
	voFiM7kS03NBOKDJTW4bMKnitb0birJg1bpCKweiK5WEmrld2MbpPXP9Bm61pQ/A8+QZpO
	US+vJr4qMvHQAYcWW0gdpTFf+ySraCbsvLSx9tZkewOzHCN4UvcxvYY4RAB15p2mzWyMAf
	YY+4/G4N2pE2zUFpB3HkEQzUAg8aum6SBKUR508RIrQvLuR1VDDwIotpgal4zU+jBSe9Ch
	HaxAj10Ic3UDhsvoj6swSuXkeVYzLzJ8TNZTYWz18n5Bw/zU6f1F9+PpIg/E1g==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986056; a=rsa-sha256; cv=none;
	b=IptK8hYaClpTilMkNLsemlR8zjaFIpRJqUHvAr76yYVpQUIgEurcywGplyFtjgZn0a+5Vn
	oPciu6lcEr0o3d+6P/T019SrvskLkbyjhWUSKpJ5H+e6UBB8li8w/jyn3gaiMmIoXhDcRJ
	2kQ2ctZz5U9JsDDS+fQt0OPLm/VzqPS4XjSnfGeHb0kNTA1cg9Kqn4y/3empZJ7CjszTOZ
	Mb99mD8abGACamKey9URURA+7IGDS0BU+wvYtNYoLh6nDsgljneZnLCyliaS2iUbNx6gDw
	/QnL3dc2hkTFATNboRdvvx4Yer83srJSuDnDNTY5MxrdA+U+BE7qiez+j1jayA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrZw2XW1zg7B;
	Sat, 27 Sep 2025 15:14:16 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFEGkj083706;
	Sat, 27 Sep 2025 15:14:16 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFEGOr083703;
	Sat, 27 Sep 2025 15:14:16 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:14:16 GMT
Message-Id: <202509271514.58RFEGOr083703@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: 9ed73bd78c78 - stable/14 - Migrate from printb to
  print_bits for locally defined bit fields.
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 9ed73bd78c7881698e8f600fcc34bd9634143b92
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit 9ed73bd78c7881698e8f600fcc34bd9634143b92
Author:     Gordon Tetlow 
AuthorDate: 2024-05-31 20:58:52 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:40 +0000

    Migrate from printb to print_bits for locally defined bit fields.
    
    Reviewed by:    emaste
    Event:          Kitchener-Waterloo Hackathon 202406
    Differential Revision:  https://reviews.freebsd.org/D45441
    
    (cherry picked from commit a68e4f7a065218f0bcc5b34ff8d2e73a240b59b2)
---
 sbin/ifconfig/af_nd6.c   | 29 ++++++++++++-------
 sbin/ifconfig/ifconfig.c | 75 ++++++++++++++++++++++++++++++++++++++----------
 sbin/ifconfig/ifgif.c    |  7 +++--
 sbin/ifconfig/ifgre.c    |  9 ++++--
 4 files changed, 90 insertions(+), 30 deletions(-)

diff --git a/sbin/ifconfig/af_nd6.c b/sbin/ifconfig/af_nd6.c
index 73044e95740a..2899ad6a0778 100644
--- a/sbin/ifconfig/af_nd6.c
+++ b/sbin/ifconfig/af_nd6.c
@@ -52,17 +52,22 @@
 #include "ifconfig.h"
 
 #define	MAX_SYSCTL_TRY	5
+static const char *ND6BITS[] = {
+	[0]  = "PERFORMNUD",
+	[1]  = "ACCEPT_RTADV",
+	[2]  = "PREFER_SOURCE",
+	[3]  = "IFDISABLED",
+	[4]  = "DONT_SET_IFROUTE",
+	[5]  = "AUTO_LINKLOCAL",
+	[6]  = "NO_RADR",
+	[7]  = "NO_PREFER_IFACE",
+	[8]  = "NO_DAD",
 #ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG
-#define	ND6BITS	"\020\001PERFORMNUD\002ACCEPT_RTADV\003PREFER_SOURCE" \
-		"\004IFDISABLED\005DONT_SET_IFROUTE\006AUTO_LINKLOCAL" \
-		"\007NO_RADR\010NO_PREFER_IFACE\011NO_DAD" \
-		"\012IPV6_ONLY\013IPV6_ONLY_MANUAL" \
-		"\020DEFAULTIF"
-#else
-#define	ND6BITS	"\020\001PERFORMNUD\002ACCEPT_RTADV\003PREFER_SOURCE" \
-		"\004IFDISABLED\005DONT_SET_IFROUTE\006AUTO_LINKLOCAL" \
-		"\007NO_RADR\010NO_PREFER_IFACE\011NO_DAD\020DEFAULTIF"
+	[9]  = "IPV6_ONLY",
+	[10] = "IPV6_ONLY_MANUAL",
 #endif
+	[15] = "DEFAULTIF",
+};
 
 static int isnd6defif(if_ctx *ctx, int s);
 void setnd6flags(if_ctx *, const char *, int);
@@ -141,6 +146,7 @@ nd6_status(if_ctx *ctx)
 	int s6;
 	int error;
 	int isdefif;
+	uint32_t bits;
 
 	strlcpy(nd.ifname, ctx->ifname, sizeof(nd.ifname));
 	if ((s6 = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) {
@@ -159,7 +165,8 @@ nd6_status(if_ctx *ctx)
 	close(s6);
 	if (nd.ndi.flags == 0 && !isdefif)
 		return;
-	printb("\tnd6 options",
-	    (unsigned int)(nd.ndi.flags | (isdefif << 15)), ND6BITS);
+	bits = (nd.ndi.flags | (isdefif << 15));
+	printf("\tnd6 options=%x", bits);
+	print_bits("options", &bits, 1, ND6BITS, nitems(ND6BITS));
 	putchar('\n');
 }
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 3f3569efbe66..6f2196433a37 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1627,17 +1627,60 @@ unsetifdescr(if_ctx *ctx, const char *val __unused, int value __unused)
 
 #ifdef WITHOUT_NETLINK
 
-#define	IFFBITS \
-"\020\1UP\2BROADCAST\3DEBUG\4LOOPBACK\5POINTOPOINT\7RUNNING" \
-"\10NOARP\11PROMISC\12ALLMULTI\13OACTIVE\14SIMPLEX\15LINK0\16LINK1\17LINK2" \
-"\20MULTICAST\22PPROMISC\23MONITOR\24STATICARP\25STICKYARP"
-
-#define	IFCAPBITS \
-"\020\1RXCSUM\2TXCSUM\3NETCONS\4VLAN_MTU\5VLAN_HWTAGGING\6JUMBO_MTU\7POLLING" \
-"\10VLAN_HWCSUM\11TSO4\12TSO6\13LRO\14WOL_UCAST\15WOL_MCAST\16WOL_MAGIC" \
-"\17TOE4\20TOE6\21VLAN_HWFILTER\23VLAN_HWTSO\24LINKSTATE\25NETMAP" \
-"\26RXCSUM_IPV6\27TXCSUM_IPV6\31TXRTLMT\32HWRXTSTMP\33NOMAP\34TXTLS4\35TXTLS6" \
-"\36VXLAN_HWCSUM\37VXLAN_HWTSO\40TXTLS_RTLMT"
+static const char *IFFBITS[] = {
+	[0]  = "UP",
+	[1]  = "BROADCAST",
+	[2]  = "DEBUG",
+	[3]  = "LOOPBACK",
+	[4]  = "POINTOPOINT",
+	[6]  = "RUNNING",
+	[7]  = "NOARP",
+	[8]  = "PROMISC",
+	[9]  = "ALLMULTI",
+	[10] = "OACTIVE",
+	[11] = "SIMPLEX",
+	[12] = "LINK0",
+	[13] = "LINK1",
+	[14] = "LINK2",
+	[15] = "MULTICAST",
+	[17] = "PPROMISC",
+	[18] = "MONITOR",
+	[19] = "STATICARP",
+	[20] = "STICKYARP",
+};
+
+static const char *IFCAPBITS[] = {
+	[0]  = "RXCSUM",
+	[1]  = "TXCSUM",
+	[2]  = "NETCONS",
+	[3]  = "VLAN_MTU",
+	[4]  = "VLAN_HWTAGGING",
+	[5]  = "JUMBO_MTU",
+	[6]  = "POLLING",
+	[7]  = "VLAN_HWCSUM",
+	[8]  = "TSO4",
+	[9]  = "TSO6",
+	[10] = "LRO",
+	[11] = "WOL_UCAST",
+	[12] = "WOL_MCAST",
+	[13] = "WOL_MAGIC",
+	[14] = "TOE4",
+	[15] = "TOE6",
+	[16] = "VLAN_HWFILTER",
+	[18] = "VLAN_HWTSO",
+	[19] = "LINKSTATE",
+	[20] = "NETMAP",
+	[21] = "RXCSUM_IPV6",
+	[22] = "TXCSUM_IPV6",
+	[24] = "TXRTLMT",
+	[25] = "HWRXTSTMP",
+	[26] = "NOMAP",
+	[27] = "TXTLS4",
+	[28] = "TXTLS6",
+	[29] = "VXLAN_HWCSUM",
+	[30] = "VXLAN_HWTSO",
+	[31] = "TXTLS_RTLMT",
+};
 
 static void
 print_ifcap_nv(if_ctx *ctx)
@@ -1709,10 +1752,12 @@ print_ifcap(if_ctx *ctx)
 	if ((ifr.ifr_curcap & IFCAP_NV) != 0)
 		print_ifcap_nv(ctx);
 	else {
-		printb("\toptions", ifr.ifr_curcap, IFCAPBITS);
+		printf("\toptions=%x", ifr.ifr_curcap);
+		print_bits("options", &ifr.ifr_curcap, 1, IFCAPBITS, nitems(IFCAPBITS));
 		putchar('\n');
 		if (ctx->args->supmedia && ifr.ifr_reqcap != 0) {
-			printb("\tcapabilities", ifr.ifr_reqcap, IFCAPBITS);
+			printf("\tcapabilities=%x", ifr.ifr_reqcap);
+			print_bits("capabilities", &ifr.ifr_reqcap, 1, IFCAPBITS, nitems(IFCAPBITS));
 			putchar('\n');
 		}
 	}
@@ -1800,8 +1845,8 @@ status(if_ctx *ctx, const struct sockaddr_dl *sdl __unused, struct ifaddrs *ifa)
 	old_s = ctx->io_s;
 	ctx->io_s = s;
 
-	printf("%s: ", ctx->ifname);
-	printb("flags", ifa->ifa_flags, IFFBITS);
+	printf("%s: flags=%x", ctx->ifname, ifa->ifa_flags);
+	print_bits("flags", &ifa->ifa_flags, 1, IFFBITS, nitems(IFFBITS));
 	print_metric(ctx);
 	print_mtu(ctx);
 	putchar('\n');
diff --git a/sbin/ifconfig/ifgif.c b/sbin/ifconfig/ifgif.c
index 6a4bb8b5a240..991cf110678f 100644
--- a/sbin/ifconfig/ifgif.c
+++ b/sbin/ifconfig/ifgif.c
@@ -48,7 +48,9 @@
 
 #include "ifconfig.h"
 
-#define	GIFBITS	"\020\2IGNORE_SOURCE"
+static const char *GIFBITS[] = {
+	[1] = "IGNORE_SOURCE",
+};
 
 static void
 gif_status(if_ctx *ctx)
@@ -60,7 +62,8 @@ gif_status(if_ctx *ctx)
 		return;
 	if (opts == 0)
 		return;
-	printb("\toptions", opts, GIFBITS);
+	printf("\toptions=%x", opts);
+	print_bits("options", &opts, 1, GIFBITS, nitems(GIFBITS));
 	putchar('\n');
 }
 
diff --git a/sbin/ifconfig/ifgre.c b/sbin/ifconfig/ifgre.c
index dda04e363bfc..6f7bf56f0513 100644
--- a/sbin/ifconfig/ifgre.c
+++ b/sbin/ifconfig/ifgre.c
@@ -42,7 +42,11 @@
 
 #include "ifconfig.h"
 
-#define	GREBITS	"\020\01ENABLE_CSUM\02ENABLE_SEQ\03UDPENCAP"
+static const char *GREBITS[] = {
+	[0] = "ENABLE_CSUM",
+	[1] = "ENABLE_SEQ",
+	[2] = "UDPENCAP",
+};
 
 static void
 gre_status(if_ctx *ctx)
@@ -61,7 +65,8 @@ gre_status(if_ctx *ctx)
 	ifr.ifr_data = (caddr_t)&port;
 	if (ioctl_ctx_ifr(ctx, GREGPORT, &ifr) == 0 && port != 0)
 		printf("\tudpport: %u\n", port);
-	printb("\toptions", opts, GREBITS);
+	printf("\toptions=%x", opts);
+	print_bits("options", &opts, 1, GREBITS, nitems(GREBITS));
 	putchar('\n');
 }
 

From nobody Sat Sep 27 15:14:19 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrb06wr2z68DbP;
	Sat, 27 Sep 2025 15:14:20 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrZz5wnCz44ZK;
	Sat, 27 Sep 2025 15:14:19 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758986059;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Wg0qa7LYi89pFlkviDT4cUQU1kyJAh1f7Nx/OrSVczI=;
	b=Hqi6B3q9Dgc7bXugEXYyA8FGHw5kIpjhM7ius40Wog+DBmpB4QGRag9HNU4zUnwQ+zlUf6
	z9yuEVNvopKZ01FA8Ab7PXM8RmzRYJe6C3+86jycekdrb16d/ukqdkp3bYiGVxcp78gdXE
	Ygd+Tf2qXo4fqWyBP5AFBGoWnZpzFYZtBKagmjVHUaNoLIMzjj7lWe/qkzx31RTV09uV5R
	1FxWSXgMBDSyw7U93AaebBihdlkJYtuAYhykuTLlkKmGGT7iWmgjruj8aaP3w0mqc4yzRd
	gjFTuhiKJsFDteZcEO76HWEaMu7OQrDvIkA5xoR42NTVfPtzObuBZIkxmEbr+A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986059;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=Wg0qa7LYi89pFlkviDT4cUQU1kyJAh1f7Nx/OrSVczI=;
	b=Xajw8VdRT9An53PkIAM+hSL2ojGq1UFjaHoX9cmtspvdlmLvmv1L+chZDgCh7NVCsdwkZK
	/hWL73mXjFbaj791Hh6irNRgYUGUNS+lWN/sGhM8Kk1mHWSazpRN4zJVPFEfOJhEXQFcWj
	rJbw3UNzXNtBzRju40xm17TKwbUsymQZlnajQsy5w5MunhlX4V3M2jNCLAKTG0Emi/Wnhu
	LImavYgQEZXHtPhyDAWqpCJug+UTMM4Jey7K97Z1jrsrxnuWtnqEOpTQJ6fXQuo+YOS8O0
	J93KcOKTD86ffahuOJj5uZeTH8lq0uXqqGRd/CunlIxc0S0Oqm/nm3ew0ZRN9A==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986059; a=rsa-sha256; cv=none;
	b=nocadLiZGyHywOZg59qYTooOF0Z5r+EbuPxio46KMM8odShraU7gL4aSoPV1ZYkVZD60TA
	40jNlehlpaJDHOxwJlIHzsrt7lViUnQ2xALx4yIETfQA1m/z8CH6xTOuZQg4eHP2+t2ufe
	z/CwprmqyJwY3P4FJ4lLccw8fC8uKzCkDVHQLPNXfoSusmL3K3eeiV2s0LN+UC/iXY2ckH
	cHfEB+86Gg9ShGeXHNtWkuK28RPgWwujVrPqZjdpcCiwPhmBeC5AcgpUN6hIhVZ+aX2sS/
	rHNXnfO4Zu6GtnWobCVoFfd8++TCmGyiLPIvBaw1bIJAMhAwzLQMZnIX3SY+ag==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrZz5TCQzfyB;
	Sat, 27 Sep 2025 15:14:19 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFEJHB083803;
	Sat, 27 Sep 2025 15:14:19 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFEJE7083800;
	Sat, 27 Sep 2025 15:14:19 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:14:19 GMT
Message-Id: <202509271514.58RFEJE7083800@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: 79d114544fab - stable/14 - tcp: Fix expiring and
  purging hostcache entries of vnet jails
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 79d114544fabd5a80198e925e4dc34f47a9f9e3a
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit 79d114544fabd5a80198e925e4dc34f47a9f9e3a
Author:     Zhenlei Huang 
AuthorDate: 2025-09-24 01:16:13 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:41 +0000

    tcp: Fix expiring and purging hostcache entries of vnet jails
    
    A jailed process, `sysctl -j foo` or `jexec foo sysctl`, do not have
    privilege to write to non-vnet sysctls but only to those marked as jail
    writable, aka sysctls those marked with CTLFLAG_VNET flag.
    
    Without this change we will get EPERM when trying to expire and purge
    hostcache entries of vnet jails via the net.inet.tcp.hostcache.purgenow
    sysctl. Fix that by adding a CTLFLAG_VNET flag.
    
    Reviewed by:    tuexen, #transport, #network
    Fixes:  264563806496 Add a new sysctl net.inet.tcp.hostcache.purgenow=1 to expire ...
    MFC after:      3 days
    Differential Revision:  https://reviews.freebsd.org/D52692
    
    (cherry picked from commit 33ceb31e256e386da5a42cc7ca2ef8d4b81b6eda)
    (cherry picked from commit fa30199a3dbfe1d4994e7e4e63ad9c582c6f8a1a)
---
 sys/netinet/tcp_hostcache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c
index ed90a9ba7196..489ea270704e 100644
--- a/sys/netinet/tcp_hostcache.c
+++ b/sys/netinet/tcp_hostcache.c
@@ -203,7 +203,7 @@ SYSCTL_PROC(_net_inet_tcp_hostcache, OID_AUTO, histo,
     "Print a histogram of hostcache hashbucket utilization");
 
 SYSCTL_PROC(_net_inet_tcp_hostcache, OID_AUTO, purgenow,
-    CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE,
+    CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE,
     NULL, 0, sysctl_tcp_hc_purgenow, "I",
     "Immediately purge all entries");
 

From nobody Sat Sep 27 15:14:18 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrb00v8mz68Dmf;
	Sat, 27 Sep 2025 15:14:20 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrZz26Lzz44gt;
	Sat, 27 Sep 2025 15:14:19 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758986059;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=3j4V72pHPqk5M4diOOS3XZOptcmBWAuquysdZ+AyQKA=;
	b=sobJ2YSQDiDs7RqDzgc+XgMzE6oRVDxehaDsY347OZ2Srp6FfayP6QfpEHbk8ucJ8Vx1ez
	z1kLg3DFW6aRCnI7AqDG0qSsCfa86j/IRWDRjpmH5Rt41qi+xQaRqLvGdzzFFEQnNDc5pZ
	yaLqCAQP/5SI1ATyzdIH7e8PYpfET+7tjOLsF5EuCiPxqZCWqKfP6w6DbgD2wQ5Zm4snhO
	oriP2d9V0s50n5bGn0OcicB/9sw1bwPtECiKnAfX06wA32ypR31gK/ZhnqOCCGR2C9IxbL
	7ELtqidkWRYsCAf0amYogLBNG+Gi6j63qfguoqv+s+iEuIsm5AQRTcQeypwTzQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986059;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=3j4V72pHPqk5M4diOOS3XZOptcmBWAuquysdZ+AyQKA=;
	b=kMMkWz2yyAD5ckRyBsrL/cVyCF0IIYPLfc7LwwAQhlQr+MnND1EemzcId7mAckkOHwPeK5
	3Xyo7pqHMCmR6UnPrLOI7eek02tw1ZjgS7BAdb721JZyf0IhCJ7ZCxkTvpC3Z4nqSsYF//
	rpyJFxsR34CAFO70GfWtKjd/Y21BTKA+TOv9gE2gVmusUHKCtcB6QVSAGjK/6kJQKC9deh
	1WhUwsrNhUWswK9Axv8/BVPpvPexmrJM0HADEW4KI/tAgLufdeczuea1Y/wZb8PD2ah2eP
	E6Ne2dLrvleReBR2EtJ7lc1MIa7owf5A3z/20x6SIZ4yWNS9L+vKTes4Eux3Zg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986059; a=rsa-sha256; cv=none;
	b=ZCNeN3sXUouVV9U+J8QccejubmeBG9b29uV1/CToPq+FrTR0x+F/jiBmnW9x2/zIOGzlxe
	ClGm+QloHn4xcgCTAGZFHTloZ7V4kqXn1wOYn44OV7jnbzw3TOCqKtoC1ue/AFODdHBqIv
	aHGe9PUoH2QqhoQyiZiXM0HZOeKNxS+/R6yn2iB+FBBeoUdY9v6jLTqOWR6Wd+ToA48DLe
	j81I/rt0Z5K6O1r6gfL7bL5upCMOLrkNC2+MzxoC4kL3Xo775y9x+mz/6xm707221VWM/j
	e/0xMDkq3rR0rUzfUzowo6owQ16o7IUQn2ig9hAv9vYrcVM+r+uGY+mKoB+d5g==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrZy4XygzfWS;
	Sat, 27 Sep 2025 15:14:18 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFEIGk083770;
	Sat, 27 Sep 2025 15:14:18 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFEIhu083767;
	Sat, 27 Sep 2025 15:14:18 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:14:18 GMT
Message-Id: <202509271514.58RFEIhu083767@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: 1bd02c42131a - stable/14 - ifconfig: Display the
  IFCAP_HWSTATS capability without netlink
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: 1bd02c42131a20ecc34d4d0d4acb964fc650ff67
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit 1bd02c42131a20ecc34d4d0d4acb964fc650ff67
Author:     Zhenlei Huang 
AuthorDate: 2025-09-21 16:47:45 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:41 +0000

    ifconfig: Display the IFCAP_HWSTATS capability without netlink
    
    This follows the commit 4cdc1f5421c5, which introduces the IFCAP_HWSTATS
    capability.
    
    Fixes:  4cdc1f5421c5 There are some high performance NICs that count statistics in hardware
    MFC after:      3 days
    
    (cherry picked from commit 595acb29a35f36a4fc08b89d3a476f16c1d108b4)
    (cherry picked from commit 6bcce275a5a9e10f8e5b990f8cfa2166aa49875a)
---
 sbin/ifconfig/ifconfig.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 037f360d1b7a..ccc783c64ff9 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1672,6 +1672,7 @@ static const char *IFCAPBITS[] = {
 	[20] = "NETMAP",
 	[21] = "RXCSUM_IPV6",
 	[22] = "TXCSUM_IPV6",
+	[23] = "HWSTATS",
 	[24] = "TXRTLMT",
 	[25] = "HWRXTSTMP",
 	[26] = "MEXTPG",

From nobody Sat Sep 27 15:14:20 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrb20klbz68DdQ;
	Sat, 27 Sep 2025 15:14:22 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrb116nzz44mY;
	Sat, 27 Sep 2025 15:14:21 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758986061;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=mdTuFoS6wikXrPI9X/9d5Aqo9+69mZV4gTa9Xjf+Z6s=;
	b=mBXsyf7/MuP3PUEcnFHu1yWJsRhI0DEIVAfQ3w8u4KcIMVFrHLihnUHjRHM30Two8NBTcx
	ozXaFnXU+D40QCe+6cG3JwrS/m8QDWRR/2Sg3cIRUYlYI5aT9yqPakOdmOynYLsyEi6jUE
	OhbwNwA4YqRIyTzwaahRK1MfZFj7qR/gjMl0RiKgOfZ7xeYGYILNzZqQpk3cMcFFklQR53
	1Ygoylti0zkqfL0jtK3eCfYWP3+9v2ejMAUnGVx2YIRqj+PsNnbrUQf0t6/ojs+Y4KcM55
	OjSFlShCoExD3mONAKdhUbuGKnqJaIOWMgy1J6iVsL8YnC8qpeENjX5FQ5vs8A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758986061;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=mdTuFoS6wikXrPI9X/9d5Aqo9+69mZV4gTa9Xjf+Z6s=;
	b=F9VNIByQtpFXDhUz2xFNpCF6rVXupk+kCERTelzoooRRPxgT/t+CG0ntoTFTOfWo6+dvqL
	GwxUwTJZo9e98MS2ELDrGunKAXKfmCnPhAkGRR7tckCV71mT8beYQQCB1XxSesXZETOZGc
	hfOXxY1fc0960JAQMpAiQBp+ryN3MNH89KXkZe+PrTdE75TPUg7q/GbT0+HUKD1thJHn+2
	RP1lV/dUM+abFIuqYavuugWfX2C+VogYnRobHMJDX0iBeThEafavIf1wCLjIaTi0Mqre4Z
	GgyCOS+Hgd+Idx1kFnQ5t8EJgweclEzcIksn8X3y1nZ+SGhIiuNW6vwh3Zngkw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986061; a=rsa-sha256; cv=none;
	b=ZckqzJsB56cE3w2bp5UqtzvRpqMcbSGsbG3MFDYcvDoUtqWpL/AKpXkAukmFbcSbJzYCYr
	rpSH+IXN5SMFSlHjNhmiDw66BsKgfjxx1opTRgjSaNIMgkszHpLP/qDVv4dFweuxCweuQ9
	6l3KCoNAeH/4oYcp6QkNs71LoWlJLHCDYgiUBnmLuqFD0eTvzD5okw6UC5CnC+c2T/oXDq
	aMBZASRahi5XxIlZdSPPyytjsS4HVHjUMLFL2wrk/pz15q931S3tKkWMOniHYh13ByESrG
	nZprBvMI7kUDueUuwXp8mFfTW5Xwr/OgHpZox2VlbvfVJyHxmMsxuMWWEg2qXA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrb05nhTzftM;
	Sat, 27 Sep 2025 15:14:20 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFEKn5083836;
	Sat, 27 Sep 2025 15:14:20 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFEKsU083833;
	Sat, 27 Sep 2025 15:14:20 GMT
	(envelope-from git)
Date: Sat, 27 Sep 2025 15:14:20 GMT
Message-Id: <202509271514.58RFEKsU083833@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang 
Subject: git: ccbc722a1945 - stable/14 - tcp: Add CTLFLAG_VNET flag
  to some sysctls
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: ccbc722a19450df2981049777d4930deae94a840
Auto-Submitted: auto-generated

The branch stable/14 has been updated by zlei:

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

commit ccbc722a19450df2981049777d4930deae94a840
Author:     Zhenlei Huang 
AuthorDate: 2025-09-24 01:16:13 +0000
Commit:     Zhenlei Huang 
CommitDate: 2025-09-27 15:11:41 +0000

    tcp: Add CTLFLAG_VNET flag to some sysctls
    
    The two sysctls net.inet.tcp.hostcache.list and net.inet.tcp.hostcache.histo
    are readonly and are to operate hostcache of vnet jails. Add CTLFLAG_VNET
    flag to them since they are per-vnet sysctls.
    
    This change does not have any impact on reading the two sysctls, but
    `sysctl -ANV net.inet.tcp.hostcache` will report them correctly.
    
    Reviewed by:    tuexen, #transport, #network
    MFC after:      3 days
    Differential Revision:  https://reviews.freebsd.org/D52693
    
    (cherry picked from commit b1f96169cfb50a7b65aee115b2c9ad2f00797bbf)
    (cherry picked from commit 032918dfd155936a79847f17ac355439e6b59027)
---
 sys/netinet/tcp_hostcache.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c
index 489ea270704e..5afdedd20d23 100644
--- a/sys/netinet/tcp_hostcache.c
+++ b/sys/netinet/tcp_hostcache.c
@@ -193,12 +193,12 @@ SYSCTL_INT(_net_inet_tcp_hostcache, OID_AUTO, purge, CTLFLAG_VNET | CTLFLAG_RW,
     "Expire all entries on next purge run");
 
 SYSCTL_PROC(_net_inet_tcp_hostcache, OID_AUTO, list,
-    CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_MPSAFE,
+    CTLFLAG_VNET | CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_MPSAFE,
     0, 0, sysctl_tcp_hc_list, "A",
     "List of all hostcache entries");
 
 SYSCTL_PROC(_net_inet_tcp_hostcache, OID_AUTO, histo,
-    CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_MPSAFE,
+    CTLFLAG_VNET | CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_MPSAFE,
     0, 0, sysctl_tcp_hc_histo, "A",
     "Print a histogram of hostcache hashbucket utilization");
 

From nobody Sat Sep 27 18:32:20 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYwzZ1k0jz68Vds;
	Sat, 27 Sep 2025 18:32:26 +0000 (UTC)
	(envelope-from tuexen@FreeBSD.org)
Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "smtp.freebsd.org", Issuer "R13" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYwzY62TDz3RvL;
	Sat, 27 Sep 2025 18:32:25 +0000 (UTC)
	(envelope-from tuexen@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758997945;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=RtTXJG8+05Sbb1Eq5JWrKGbEZGyDqi0Yx25ylagk+0U=;
	b=OGqveaLJfYIAaY+77ICSALGVp60QrQW0Yg97ScR+Iwmv8xefDk7yXNDkSs6yrtUDq5G4IM
	P89G5oacEjk5dPfBmxeZdGaYyfKgh7yASSTfP3xQuK9ytjLDW0/h6QlhDTqmwOMmbJ20LM
	C+HyXFVSyFLSVSrRyoKhl/w/LrBGvbfDPaFwfhtTOyx7nqrgqPAouslh9tsTcD+R3+BfY4
	zJMB2Zcjd1/Rrn66RBlXTbTYVJLgWIf0UPaokI2kdoI9pCtD0W1+azjWqAru2pabrHhr4s
	WYSwXm8qnzJTrzngzRje14CiTPx+ach/xqaVNpXFC3376Cu8IURY88yaKELf2A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758997945;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=RtTXJG8+05Sbb1Eq5JWrKGbEZGyDqi0Yx25ylagk+0U=;
	b=ko+QEiW21IblN+FUsXWjayfV2zYeYrQX2nPezdNMeezbvaLarHO16rrSUlfrMiw4gtio3m
	YmNC1d2PSZyqTPrkexxN39k/sX47eDOextmrdh0noeWRl+izJ0MGCrSowNO17/SdEUYAFU
	Xikeq2IKyVpF692l8jZDCph/ze5ll1f2Yaw5v2FXaSX3TUQZA/WU2ep/zsnRFK3sIDwEuk
	Rw3sYZcL4kWpdfe4SLHGjKIOsgtnvxidWZ239dn2Hy+WsTsa174tCZzPJNK2rEXPW0/tNQ
	ICoeEWfPzxi4sMZGTa6wDfHtZH5zralMtxLmw1fpaeK4wA+BPdvy9c8Gdc35jA==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758997945; a=rsa-sha256; cv=none;
	b=BZAXNfmICDvqhcFTM75uBCx0J2HStMxhUzjrzSZVAX0YcUehRlOCwsMOJJsbS3bBOif4tV
	ADehFVi4Yqg2bboLPizVdCHQvpTazLmTSAhBQVDIxsonue1dZakUraYZSYchgGnovR8ndK
	oI+awYpUi9pV7QgBrfcHtPikrmQJkQUKLFjl5G6GQE+DHHe7ABC2rQC7uP5Z6MnW+hXTct
	78+lIgt9KwXdh8cMqDZJqw/K+QXaHDvh1ikCNQ7X3kbVkm9N7sxaMaQsgi69ovc+eZaIZU
	xn8iHl1b2Z4dsoLqrxZQziG1qU+DLdm4xGevXKruXYns1Uyk8oO61B52TtEZ5A==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from smtpclient.apple (unknown [IPv6:2a02:8109:1101:be00:d8e4:fc6f:9ab0:98d3])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client did not present a certificate)
	(Authenticated sender: tuexen)
	by smtp.freebsd.org (Postfix) with ESMTPSA id 4cYwzY1vHlz82h;
	Sat, 27 Sep 2025 18:32:25 +0000 (UTC)
	(envelope-from tuexen@FreeBSD.org)
Content-Type: text/plain;
	charset=us-ascii
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.100.1.1.5\))
Subject: Re: git: b4c6c3db0379 - stable/14 - ipfw: Teach ipfw that EtherIP is
 an upper layer protocol
From: Michael Tuexen 
In-Reply-To: <202509271513.58RFDst3083057@gitrepo.freebsd.org>
Date: Sat, 27 Sep 2025 20:32:20 +0200
Cc: "src-committers@freebsd.org" ,
 "dev-commits-src-all@freebsd.org" ,
 "dev-commits-src-branches@freebsd.org" 
Content-Transfer-Encoding: quoted-printable
Message-Id: <44DAB9B2-B037-49B0-9153-90B4CFBB6234@FreeBSD.org>
References: <202509271513.58RFDst3083057@gitrepo.freebsd.org>
To: Zhenlei Huang 
X-Mailer: Apple Mail (2.3864.100.1.1.5)

> On 27. Sep 2025, at 17:13, Zhenlei Huang  wrote:
>=20
> The branch stable/14 has been updated by zlei:
>=20
> URL: =
https://cgit.FreeBSD.org/src/commit/?id=3Db4c6c3db0379a5b3d34143325805cd7e=
68cf3d9a
>=20
> commit b4c6c3db0379a5b3d34143325805cd7e68cf3d9a
> Author:     Zhenlei Huang 
> AuthorDate: 2025-09-16 15:58:24 +0000
> Commit:     Zhenlei Huang 
> CommitDate: 2025-09-27 15:11:35 +0000
>=20
>    ipfw: Teach ipfw that EtherIP is an upper layer protocol
>=20
>    so that we do not discard EtherIP packets ( over IPv6 network ) =
when
>    net.inet6.ip6.fw.deny_unknown_exthdrs is set to 1 ( which is the =
default
>    value ).
>=20
>    PR:             227450
>    Reviewed by:    ae, #network
>    MFC after:      1 week
>    Differential Revision:  https://reviews.freebsd.org/D52566
>=20
>    (cherry picked from commit =
0418e6690e91aa6c38dd9af9da43c4c5a9dc1cd2)
>    (cherry picked from commit =
b1c96e54b906d0cdea0b5a9c74cc295803dfe50e)
Why is this cherry picked from two commits? Shouldn't this be only
cherry picked from the commit to the main branch?

Best regards
Michael
> ---
> sys/netpfil/ipfw/ip_fw2.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>=20
> diff --git a/sys/netpfil/ipfw/ip_fw2.c b/sys/netpfil/ipfw/ip_fw2.c
> index 0e0ecd3c6b20..928ccefe4803 100644
> --- a/sys/netpfil/ipfw/ip_fw2.c
> +++ b/sys/netpfil/ipfw/ip_fw2.c
> @@ -67,6 +67,7 @@
> #include 
> #include 
> #include 
> +#include 
> #include 
>=20
> #include 
> @@ -1717,6 +1718,12 @@ do { \
> PULLUP_TO(hlen, ulp, struct ip);
> break;
>=20
> + case IPPROTO_ETHERIP: /* RFC 3378 */
> + PULLUP_LEN(hlen, ulp,
> +    sizeof(struct etherip_header) +
> +    sizeof(struct ether_header));
> + break;
> +
> case IPPROTO_PFSYNC:
> PULLUP_TO(hlen, ulp, struct pfsync_header);
> break;


From nobody Sat Sep 27 18:35:48 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYx3f08jKz68VDL;
	Sat, 27 Sep 2025 18:35:58 +0000 (UTC)
	(envelope-from chmeee@has.gonegalt.net)
Received: from mail.gonegalt.net (mail.gonegalt.net [208.167.253.104])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYx3d3Tgvz3S8b;
	Sat, 27 Sep 2025 18:35:57 +0000 (UTC)
	(envelope-from chmeee@has.gonegalt.net)
Authentication-Results: mx1.freebsd.org;
	none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gonegalt.net;
	s=dkim; t=1758998150;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=16nTrGCoEivZxb7MtDoqjwSCasfNeWfI4Z4wyHZkt3M=;
	b=dF85QuiuUam4T934i33ZiV/7nwxX27nC1ThCE1Z1MMkMO103b02pu267o1/RwAYBWealvK
	AZZuhEXP3uX9XjosLO2GZQHmh39z+q8qlYpvaYa7ThTjLUoAbKuaVCip1EAhGMWp+C5+78
	/bL/kYkmN94ko3J6tQdhWiWM1dA1GmE=
Received: 
	by localhost (OpenSMTPD) with ESMTP id b598bd7b;
	Sat, 27 Sep 2025 14:35:50 -0400 (EDT)
Received: from ralga.knownspace ([2600:2b00:a720:d301:9f03:382a:d672:81f0])
	by mail.gonegalt.net with ESMTPSA
	id DVsOMIUu2Gg+OAAA0J78UA
	(envelope-from ); Sat, 27 Sep 2025 14:35:49 -0400
Date: Sat, 27 Sep 2025 14:35:48 -0400
From: Justin Hibbits 
To: Michael Tuexen 
Cc: Zhenlei Huang , "src-committers@freebsd.org"
 , "dev-commits-src-all@freebsd.org"
 , "dev-commits-src-branches@freebsd.org"
 
Subject: Re: git: b4c6c3db0379 - stable/14 - ipfw: Teach ipfw that EtherIP
 is an upper layer protocol
Message-ID: <20250927143548.661e75f7@ralga.knownspace>
In-Reply-To: <44DAB9B2-B037-49B0-9153-90B4CFBB6234@FreeBSD.org>
References: <202509271513.58RFDst3083057@gitrepo.freebsd.org>
	<44DAB9B2-B037-49B0-9153-90B4CFBB6234@FreeBSD.org>
X-Mailer: Claws Mail 4.3.1 (GTK 3.24.50; powerpc64le-unknown-linux-gnu)
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Spamd-Bar: ----
X-Spamd-Result: default: False [-4.00 / 15.00];
	REPLY(-4.00)[]
X-Rspamd-Pre-Result: action=no action;
	module=replies;
	Message is reply to one we originated
X-Rspamd-Queue-Id: 4cYx3d3Tgvz3S8b

On Sat, 27 Sep 2025 20:32:20 +0200
Michael Tuexen  wrote:

> > On 27. Sep 2025, at 17:13, Zhenlei Huang  wrote:
> > 
> > The branch stable/14 has been updated by zlei:
> > 
> > URL:
> > https://cgit.FreeBSD.org/src/commit/?id=b4c6c3db0379a5b3d34143325805cd7e68cf3d9a
> > 
> > commit b4c6c3db0379a5b3d34143325805cd7e68cf3d9a
> > Author:     Zhenlei Huang 
> > AuthorDate: 2025-09-16 15:58:24 +0000
> > Commit:     Zhenlei Huang 
> > CommitDate: 2025-09-27 15:11:35 +0000
> > 
> >    ipfw: Teach ipfw that EtherIP is an upper layer protocol
> > 
> >    so that we do not discard EtherIP packets ( over IPv6 network )
> > when net.inet6.ip6.fw.deny_unknown_exthdrs is set to 1 ( which is
> > the default value ).
> > 
> >    PR:             227450
> >    Reviewed by:    ae, #network
> >    MFC after:      1 week
> >    Differential Revision:  https://reviews.freebsd.org/D52566
> > 
> >    (cherry picked from commit
> > 0418e6690e91aa6c38dd9af9da43c4c5a9dc1cd2) (cherry picked from
> > commit b1c96e54b906d0cdea0b5a9c74cc295803dfe50e)  
> Why is this cherry picked from two commits? Shouldn't this be only
> cherry picked from the commit to the main branch?
> 
> Best regards
> Michael

It's common to cherry-pick from stable to older-stable.  This was
likely cherry-picked from stable/15, which was cherry-picked from main.

- Justin

> > ---
> > sys/netpfil/ipfw/ip_fw2.c | 7 +++++++
> > 1 file changed, 7 insertions(+)
> > 
> > diff --git a/sys/netpfil/ipfw/ip_fw2.c b/sys/netpfil/ipfw/ip_fw2.c
> > index 0e0ecd3c6b20..928ccefe4803 100644
> > --- a/sys/netpfil/ipfw/ip_fw2.c
> > +++ b/sys/netpfil/ipfw/ip_fw2.c
> > @@ -67,6 +67,7 @@
> > #include 
> > #include 
> > #include 
> > +#include 
> > #include 
> > 
> > #include 
> > @@ -1717,6 +1718,12 @@ do { \
> > PULLUP_TO(hlen, ulp, struct ip);
> > break;
> > 
> > + case IPPROTO_ETHERIP: /* RFC 3378 */
> > + PULLUP_LEN(hlen, ulp,
> > +    sizeof(struct etherip_header) +
> > +    sizeof(struct ether_header));
> > + break;
> > +
> > case IPPROTO_PFSYNC:
> > PULLUP_TO(hlen, ulp, struct pfsync_header);
> > break;  
> 


From nobody Sat Sep 27 18:44:23 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYxFR16jNz68Vrt;
	Sat, 27 Sep 2025 18:44:27 +0000 (UTC)
	(envelope-from tuexen@FreeBSD.org)
Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "smtp.freebsd.org", Issuer "R13" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYxFR0KY7z3TTV;
	Sat, 27 Sep 2025 18:44:27 +0000 (UTC)
	(envelope-from tuexen@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1758998667;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=S89P3/m5dU4csyU1xwkIzsYpgxD+Ii7fztPrXp1fI9g=;
	b=E8uf4f++L+r2+8Pi17UZUGEuUJMDeZoXq/plLgjwS8iYPJuxfchNkxx8fBvA171SjkR4vJ
	LaHuWB8LPDufNiDaOZQINFl6qP4Jfd36KkE06Rjlpkt65DyvL5v5Gf92D73tI3O0qBtbXe
	M6E+5j5H1mvtfOb3Y4ZYHS+IwBc13wjYNh20lV6KwJuLqkudKfctbKyYMjY8cmnztIdLqu
	49p7ZauJ97Ll85iHtyZEDXy7IgY89nad6svrbRzdhEM4MZKjNnaBw1ZWyoAflQ3WbixXMs
	mPGdhdbFelTlB5GqNjgS5tMNc+eepyril2NyKDJ0WC5/onJ9YboUjArxWgwEDg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1758998667;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=S89P3/m5dU4csyU1xwkIzsYpgxD+Ii7fztPrXp1fI9g=;
	b=LlWrP/6EsJIHhu+fcYb8oQLvx5KmYsNTKuOf4CEvSVB7cYe5Oq+JYKE8XqDDvRbLqZAfKj
	ez66tUgdfYQM7UBkN6+v07/liboUBFawLvhWBFT5Z86W8dD0lCDG0s1Cxov4925evbHUoa
	/V8Upi0E3qXQVE5axEGeiVi9h88Wh3J77XXdj05C7moi3U0P0AVdvgOsq3BEyKOWzxr90L
	qcKhUA9+2UxwllsnbRRkHgpiYWvCQOj3eXMgVCAh4rt2AQ8PKOdXDomBGomKQU/1wqvtdy
	vuxyzDAoURAmj6/cCbucCtHm5TOU/ca01Qg10axBYmRRghrhbXbRyCGcLn9V9g==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758998667; a=rsa-sha256; cv=none;
	b=XLFuaT1EBmnYYyaWAS0pWyH7lyarC3LSdcvTzOu1PHZPLHeZgOSkN6ZESyv5I0JMiND0DV
	9zkQydIXpddHr7Vt1lMpqMMy3gUZy3XoeUQxinf9XX2Lw0Ng51ncS+/2WQ5o1KogZRvQtd
	XKVZr0auOu+M0wA3YjvzFnrsQTgHeNwzbc1kWWMn+hh2ojwYi0BjJlHDMHpXOXhJZsNXQO
	DsJsAgCRFzqO6YQ+vE2cWFg6tUiks7NLlCMB43oInmNYp9pCOiBe/wk7kKihiz+IC7hBIp
	ExGOz+SGUVMitafeRlcnvOmM1pR4ba0Yk88KEl2lY+xG3uFSeEDX0tRrf0BCFQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from smtpclient.apple (unknown [IPv6:2a02:8109:1101:be00:d8e4:fc6f:9ab0:98d3])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client did not present a certificate)
	(Authenticated sender: tuexen)
	by smtp.freebsd.org (Postfix) with ESMTPSA id 4cYxFP4TXJz9Np;
	Sat, 27 Sep 2025 18:44:25 +0000 (UTC)
	(envelope-from tuexen@FreeBSD.org)
Content-Type: text/plain;
	charset=us-ascii
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.100.1.1.5\))
Subject: Re: git: b4c6c3db0379 - stable/14 - ipfw: Teach ipfw that EtherIP is
 an upper layer protocol
From: Michael Tuexen 
In-Reply-To: <20250927143548.661e75f7@ralga.knownspace>
Date: Sat, 27 Sep 2025 20:44:23 +0200
Cc: Zhenlei Huang ,
 "src-committers@freebsd.org" ,
 "dev-commits-src-all@freebsd.org" ,
 "dev-commits-src-branches@freebsd.org" 
Content-Transfer-Encoding: quoted-printable
Message-Id: <7CCC215D-E9EF-49CD-95A1-F2D5215AD268@FreeBSD.org>
References: <202509271513.58RFDst3083057@gitrepo.freebsd.org>
 <44DAB9B2-B037-49B0-9153-90B4CFBB6234@FreeBSD.org>
 <20250927143548.661e75f7@ralga.knownspace>
To: Justin Hibbits 
X-Mailer: Apple Mail (2.3864.100.1.1.5)

> On 27. Sep 2025, at 20:35, Justin Hibbits  =
wrote:
>=20
> On Sat, 27 Sep 2025 20:32:20 +0200
> Michael Tuexen  wrote:
>=20
>>> On 27. Sep 2025, at 17:13, Zhenlei Huang  wrote:
>>>=20
>>> The branch stable/14 has been updated by zlei:
>>>=20
>>> URL:
>>> =
https://cgit.FreeBSD.org/src/commit/?id=3Db4c6c3db0379a5b3d34143325805cd7e=
68cf3d9a
>>>=20
>>> commit b4c6c3db0379a5b3d34143325805cd7e68cf3d9a
>>> Author:     Zhenlei Huang 
>>> AuthorDate: 2025-09-16 15:58:24 +0000
>>> Commit:     Zhenlei Huang 
>>> CommitDate: 2025-09-27 15:11:35 +0000
>>>=20
>>>   ipfw: Teach ipfw that EtherIP is an upper layer protocol
>>>=20
>>>   so that we do not discard EtherIP packets ( over IPv6 network )
>>> when net.inet6.ip6.fw.deny_unknown_exthdrs is set to 1 ( which is
>>> the default value ).
>>>=20
>>>   PR:             227450
>>>   Reviewed by:    ae, #network
>>>   MFC after:      1 week
>>>   Differential Revision:  https://reviews.freebsd.org/D52566
>>>=20
>>>   (cherry picked from commit
>>> 0418e6690e91aa6c38dd9af9da43c4c5a9dc1cd2) (cherry picked from
>>> commit b1c96e54b906d0cdea0b5a9c74cc295803dfe50e) =20
>> Why is this cherry picked from two commits? Shouldn't this be only
>> cherry picked from the commit to the main branch?
>>=20
>> Best regards
>> Michael
>=20
> It's common to cherry-pick from stable to older-stable.  This was
> likely cherry-picked from stable/15, which was cherry-picked from =
main.
That is why I am asking.

My understanding is that we should
* MFC from main to stable/15
* MFC from main to stable/14
* MFC from stable/14 to releng/14.4

So I might be wrong and and I should actually do instead
* MFC from main to stable/15
* MFC from stable/15 to stable/14
* MFC from stable/14 to releng/14.4

I know that releng/14.4 does not exist, but there is a time window
we can get changes into relen/14.4 with approval from re@.

I would just like to know how I should MFC to stable/14...

Best regards
Michael
>=20
> - Justin
>=20
>>> ---
>>> sys/netpfil/ipfw/ip_fw2.c | 7 +++++++
>>> 1 file changed, 7 insertions(+)
>>>=20
>>> diff --git a/sys/netpfil/ipfw/ip_fw2.c b/sys/netpfil/ipfw/ip_fw2.c
>>> index 0e0ecd3c6b20..928ccefe4803 100644
>>> --- a/sys/netpfil/ipfw/ip_fw2.c
>>> +++ b/sys/netpfil/ipfw/ip_fw2.c
>>> @@ -67,6 +67,7 @@
>>> #include 
>>> #include 
>>> #include 
>>> +#include 
>>> #include 
>>>=20
>>> #include 
>>> @@ -1717,6 +1718,12 @@ do { \
>>> PULLUP_TO(hlen, ulp, struct ip);
>>> break;
>>>=20
>>> + case IPPROTO_ETHERIP: /* RFC 3378 */
>>> + PULLUP_LEN(hlen, ulp,
>>> +    sizeof(struct etherip_header) +
>>> +    sizeof(struct ether_header));
>>> + break;
>>> +
>>> case IPPROTO_PFSYNC:
>>> PULLUP_TO(hlen, ulp, struct pfsync_header);
>>> break; =20
>>=20
>=20


From nobody Sat Sep 27 19:12:01 2025
X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYxsX5CD7z68YJL
	for ; Sat, 27 Sep 2025 19:12:16 +0000 (UTC)
	(envelope-from wlosh@bsdimp.com)
Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "smtp.gmail.com", Issuer "WR4" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4cYxsX0bZGz3W76
	for ; Sat, 27 Sep 2025 19:12:16 +0000 (UTC)
	(envelope-from wlosh@bsdimp.com)
Authentication-Results: mx1.freebsd.org;
	none
Received: by mail-pj1-x102b.google.com with SMTP id 98e67ed59e1d1-32ed19ce5a3so2777348a91.0
        for ; Sat, 27 Sep 2025 12:12:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1759000333; x=1759605133; darn=freebsd.org;
        h=cc:to:subject:message-id:date:from:in-reply-to:references
         :mime-version:from:to:cc:subject:date:message-id:reply-to;
        bh=AYjgvLVoQDIzJwkMgrD7XFSwvH+Uf/YnW0vb7gJCvCE=;
        b=RP7vzcaBpPxUbjyH7l9NUt5R2cMlrQP64lMLtJno/bsCp6dCV3i5ZV46Dvb/JOcQIl
         h+ZCuzvSbxWOdJL9aSXhmv3T+PqGMAZ8RLX9LGp+WucglNy30fHV5Q7IGwP0AAH7UZms
         oSJW6ugaAmHdEzQ5zb7O3c18ypj65LjMZZfHn+pykYW8L9dURR/eBY3AmTJb+jtWzL1Y
         sDVKt5ixxesYuvSp1gP+7DwXfLdo8sKqQtZazHQh0t6Hb8tp+Qr2NkTUqzYVG6onVvuh
         zZaKKcnNsixbLesRHcLIUOWD3SKZaP4OjGrHFhW/nwJ+gjkNl95V134/LzZc90nl6cit
         eaVA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1759000333; x=1759605133;
        h=cc:to:subject:message-id:date:from:in-reply-to:references
         :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
         :reply-to;
        bh=AYjgvLVoQDIzJwkMgrD7XFSwvH+Uf/YnW0vb7gJCvCE=;
        b=OMJp4gZ+cb82we46G9Sjvoy6ewPLelIQEHtapYUcqNFISRfCFuaTmt+omFMMjCnzeQ
         gagZJLNRlPlqVDJTO+YLDAkHiRtyP5OFIbZSf9h0N4WN16FuyfHsxSHy9ULcZhKFlDNe
         r/9Fd/1PVhsfzUgpQXD41vnos1fAv5N5Yu3za1jH5T/i5wwdlDtc18S3Tdwz1hkVjIkU
         ZSsaw3WJSZgUP70sgxqnYFkAQkZTjXIwkUwNSL7qBzME5qUT5hcQvzTG+EYNa6psb2gW
         pkXDz+R3zQxGwgu3UlvDqhTgCTymbMMoV+1xxTcGxQlvGEEh1b0kmWSKM4e/VyMjmOGL
         1/Pg==
X-Forwarded-Encrypted: i=1; AJvYcCXcEqBqqC/MOeJFs74MonmJf34+WWMxDtcy29lQmvFH6bQpfHl58AMqwisuOC2Q/eEfvL3JY9dD1cOaLB0onOgi7HG4iD1skFA=@freebsd.org
X-Gm-Message-State: AOJu0YxCTrQU0yhaicdxmX6bwyPm3hl1s1uKpN65bEjbxj/YcMIejiv4
	XCM6t4T0bhTTd7LW7AqxZs18R7jNwjxk54MRM4GIXKKrOm5oyKlFTIIeBp6awKtWmTJf+1izGfi
	TmA6M6b34xXeNkD7Htxc9WTETM7TyJJo0MKcI5RzWGA==
X-Gm-Gg: ASbGncuE1QszRp1Eag0o99cRzC4vdgiUDMlFeDQ0S/Sec2PJPR9rPmNx72BY7ZJ6Qrj
	FEplLGhvXX1m2hGBm9VvTmP7ZS6ZmB78zpJgJj2QU22p4engvIDHhAixgg8CHIts4Wy/RYG4tK9
	HbRnfxt0IKImMswbUdXh4NXEXNVNvC3/cq/cEABE3JGbavavM0CccP/iSZT0bBGJDs8LG11ygmn
	J/IjRWHGzXYq1AdjPOyuDrXkLvdwGBVu+fgiDXUFWdkJBl40sCslrnZv1PzT2zcIztonQ==
X-Google-Smtp-Source: AGHT+IFHVQm2rLyxyMakfUlBU+pI8jKOUvOaY55J8Puy+a2og+LpPyHvACu6DUZsMwFXOopzjCTEfq7iUL8/t10FvF8=
X-Received: by 2002:a17:90b:4d08:b0:32b:6cf2:a2cf with SMTP id
 98e67ed59e1d1-3342a3e634dmr12580015a91.14.1759000333227; Sat, 27 Sep 2025
 12:12:13 -0700 (PDT)
List-Id: Commits to the stable branches of the FreeBSD src repository 
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: 
List-Post: 
List-Subscribe: 
List-Unsubscribe: 
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@FreeBSD.org
MIME-Version: 1.0
References: <202509271513.58RFDst3083057@gitrepo.freebsd.org>
 <44DAB9B2-B037-49B0-9153-90B4CFBB6234@FreeBSD.org> <20250927143548.661e75f7@ralga.knownspace>
 <7CCC215D-E9EF-49CD-95A1-F2D5215AD268@FreeBSD.org>
In-Reply-To: <7CCC215D-E9EF-49CD-95A1-F2D5215AD268@FreeBSD.org>
From: Warner Losh 
Date: Sat, 27 Sep 2025 13:12:01 -0600
X-Gm-Features: AS18NWAZHJmktUhqHgmRlgJaANuLpwYjmY_staK2voBameHVZDp-DBkCzzUn5EM
Message-ID: 
Subject: Re: git: b4c6c3db0379 - stable/14 - ipfw: Teach ipfw that EtherIP is
 an upper layer protocol
To: Michael Tuexen 
Cc: Justin Hibbits , Zhenlei Huang , 
	src-committers , 
	"" , dev-commits-src-branches@freebsd.org
Content-Type: multipart/alternative; boundary="00000000000005aaa4063fcd2e65"
X-Spamd-Bar: ----
X-Spamd-Result: default: False [-4.00 / 15.00];
	REPLY(-4.00)[];
	ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]
X-Rspamd-Pre-Result: action=no action;
	module=replies;
	Message is reply to one we originated
X-Rspamd-Queue-Id: 4cYxsX0bZGz3W76

--00000000000005aaa4063fcd2e65
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Sat, Sep 27, 2025, 12:44=E2=80=AFPM Michael Tuexen  =
wrote:

> > On 27. Sep 2025, at 20:35, Justin Hibbits 
> wrote:
> >
> > On Sat, 27 Sep 2025 20:32:20 +0200
> > Michael Tuexen  wrote:
> >
> >>> On 27. Sep 2025, at 17:13, Zhenlei Huang  wrote:
> >>>
> >>> The branch stable/14 has been updated by zlei:
> >>>
> >>> URL:
> >>>
> https://cgit.FreeBSD.org/src/commit/?id=3Db4c6c3db0379a5b3d34143325805cd7=
e68cf3d9a
> >>>
> >>> commit b4c6c3db0379a5b3d34143325805cd7e68cf3d9a
> >>> Author:     Zhenlei Huang 
> >>> AuthorDate: 2025-09-16 15:58:24 +0000
> >>> Commit:     Zhenlei Huang 
> >>> CommitDate: 2025-09-27 15:11:35 +0000
> >>>
> >>>   ipfw: Teach ipfw that EtherIP is an upper layer protocol
> >>>
> >>>   so that we do not discard EtherIP packets ( over IPv6 network )
> >>> when net.inet6.ip6.fw.deny_unknown_exthdrs is set to 1 ( which is
> >>> the default value ).
> >>>
> >>>   PR:             227450
> >>>   Reviewed by:    ae, #network
> >>>   MFC after:      1 week
> >>>   Differential Revision:  https://reviews.freebsd.org/D52566
> >>>
> >>>   (cherry picked from commit
> >>> 0418e6690e91aa6c38dd9af9da43c4c5a9dc1cd2) (cherry picked from
> >>> commit b1c96e54b906d0cdea0b5a9c74cc295803dfe50e)
> >> Why is this cherry picked from two commits? Shouldn't this be only
> >> cherry picked from the commit to the main branch?
> >>
> >> Best regards
> >> Michael
> >
> > It's common to cherry-pick from stable to older-stable.  This was
> > likely cherry-picked from stable/15, which was cherry-picked from main.
> That is why I am asking.
>
> My understanding is that we should
> * MFC from main to stable/15
> * MFC from main to stable/14
> * MFC from stable/14 to releng/14.4
>
> So I might be wrong and and I should actually do instead
> * MFC from main to stable/15
> * MFC from stable/15 to stable/14
> * MFC from stable/14 to releng/14.4
>
> I know that releng/14.4 does not exist, but there is a time window
> we can get changes into relen/14.4 with approval from re@.
>
> I would just like to know how I should MFC to stable/14...
>

Either way works. Without conflicts I do main to both. With conflicts I do
main to 15 and then 15 to 14. For releng, it's always from the stable
branch.

Warner

Best regards
> Michael
> >
> > - Justin
> >
> >>> ---
> >>> sys/netpfil/ipfw/ip_fw2.c | 7 +++++++
> >>> 1 file changed, 7 insertions(+)
> >>>
> >>> diff --git a/sys/netpfil/ipfw/ip_fw2.c b/sys/netpfil/ipfw/ip_fw2.c
> >>> index 0e0ecd3c6b20..928ccefe4803 100644
> >>> --- a/sys/netpfil/ipfw/ip_fw2.c
> >>> +++ b/sys/netpfil/ipfw/ip_fw2.c
> >>> @@ -67,6 +67,7 @@
> >>> #include 
> >>> #include 
> >>> #include 
> >>> +#include 
> >>> #include 
> >>>
> >>> #include 
> >>> @@ -1717,6 +1718,12 @@ do { \
> >>> PULLUP_TO(hlen, ulp, struct ip);
> >>> break;
> >>>
> >>> + case IPPROTO_ETHERIP: /* RFC 3378 */
> >>> + PULLUP_LEN(hlen, ulp,
> >>> +    sizeof(struct etherip_header) +
> >>> +    sizeof(struct ether_header));
> >>> + break;
> >>> +
> >>> case IPPROTO_PFSYNC:
> >>> PULLUP_TO(hlen, ulp, struct pfsync_header);
> >>> break;
> >>
> >
>
>

--00000000000005aaa4063fcd2e65
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable



On Sat, Sep 27, 2025, 12:44=E2= =80=AFPM Michael Tuexen <tuexen@fr= eebsd.org> wrote:
> On = 27. Sep 2025, at 20:35, Justin Hibbits <chmeee@has.gonegalt.net= > wrote:
>
> On Sat, 27 Sep 2025 20:32:20 +0200
> Michael Tuexen <tuexen@FreeBSD.org> wrote:
>
>>> On 27. Sep 2025, at 17:13, Zhenlei Huang <zlei@FreeBSD.org&= gt; wrote:
>>>
>>> The branch stable/14 has been updated by zlei:
>>>
>>> URL:
>>> https://cgit.FreeBSD.org/src/commit/?id=3Db4c6c3db0379a5b3d3414332580= 5cd7e68cf3d9a
>>>
>>> commit b4c6c3db0379a5b3d34143325805cd7e68cf3d9a
>>> Author:=C2=A0 =C2=A0 =C2=A0Zhenlei Huang <zlei@FreeBSD.org&= gt;
>>> AuthorDate: 2025-09-16 15:58:24 +0000
>>> Commit:=C2=A0 =C2=A0 =C2=A0Zhenlei Huang <zlei@FreeBSD.org&= gt;
>>> CommitDate: 2025-09-27 15:11:35 +0000
>>>
>>>=C2=A0 =C2=A0ipfw: Teach ipfw that EtherIP is an upper layer pr= otocol
>>>
>>>=C2=A0 =C2=A0so that we do not discard EtherIP packets ( over I= Pv6 network )
>>> when net.inet6.ip6.fw.deny_unknown_exthdrs is set to 1 ( which= is
>>> the default value ).
>>>
>>>=C2=A0 =C2=A0PR:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0227450
>>>=C2=A0 =C2=A0Reviewed by:=C2=A0 =C2=A0 ae, #network
>>>=C2=A0 =C2=A0MFC after:=C2=A0 =C2=A0 =C2=A0 1 week
>>>=C2=A0 =C2=A0Differential Revision:=C2=A0 h= ttps://reviews.freebsd.org/D52566
>>>
>>>=C2=A0 =C2=A0(cherry picked from commit
>>> 0418e6690e91aa6c38dd9af9da43c4c5a9dc1cd2) (cherry picked from<= br> >>> commit b1c96e54b906d0cdea0b5a9c74cc295803dfe50e)=C2=A0
>> Why is this cherry picked from two commits? Shouldn't this be = only
>> cherry picked from the commit to the main branch?
>>
>> Best regards
>> Michael
>
> It's common to cherry-pick from stable to older-stable.=C2=A0 This= was
> likely cherry-picked from stable/15, which was cherry-picked from main= .
That is why I am asking.

My understanding is that we should
* MFC from main to stable/15
* MFC from main to stable/14
* MFC from stable/14 to releng/14.4

So I might be wrong and and I should actually do instead
* MFC from main to stable/15
* MFC from stable/15 to stable/14
* MFC from stable/14 to releng/14.4

I know that releng/14.4 does not exist, but there is a time window
we can get changes into relen/14.4 with approval from re@.

I would just like to know how I should MFC to stable/14...
=

Either way works.= Without conflicts I do main to both. With conflicts I do main to 15 and th= en 15 to 14. For releng, it's always from the stable branch.

Warner

=
Best regards
Michael
>
> - Justin
>
>>> ---
>>> sys/netpfil/ipfw/ip_fw2.c | 7 +++++++
>>> 1 file changed, 7 insertions(+)
>>>
>>> diff --git a/sys/netpfil/ipfw/ip_fw2.c b/sys/netpfil/ipfw/ip_f= w2.c
>>> index 0e0ecd3c6b20..928ccefe4803 100644
>>> --- a/sys/netpfil/ipfw/ip_fw2.c
>>> +++ b/sys/netpfil/ipfw/ip_fw2.c
>>> @@ -67,6 +67,7 @@
>>> #include <net/route/nhop.h>
>>> #include <net/pfil.h>
>>> #include <net/vnet.h>
>>> +#include <net/if_gif.h>
>>> #include <net/if_pfsync.h>
>>>
>>> #include <netpfil/pf/pf_mtag.h>
>>> @@ -1717,6 +1718,12 @@ do { \
>>> PULLUP_TO(hlen, ulp, struct ip);
>>> break;
>>>
>>> + case IPPROTO_ETHERIP: /* RFC 3378 */
>>> + PULLUP_LEN(hlen, ulp,
>>> +=C2=A0 =C2=A0 sizeof(struct etherip_header) +
>>> +=C2=A0 =C2=A0 sizeof(struct ether_header));
>>> + break;
>>> +
>>> case IPPROTO_PFSYNC:
>>> PULLUP_TO(hlen, ulp, struct pfsync_header);
>>> break;=C2=A0
>>
>

--00000000000005aaa4063fcd2e65-- From nobody Sat Sep 27 21:47:40 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZ1Jx29gQz68lXG; Sat, 27 Sep 2025 21:47:45 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZ1Jx1bzQz3nCw; Sat, 27 Sep 2025 21:47:45 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759009665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=laahTYb+khXux2ASyodziiQ2mqKb38LgABFqVp0ip+I=; b=t+INNcnmyULIz8rDC7nGjrI4HYqMRPU5h7/EoQ4s6yz43m7AyUjYrJaX0/Tdxbj8ov+inQ fuNW29i6HGRta77rOBMQ61tayAFPImoOzTpFLb8V8v6J1kaCqSAwTLj0o2iAGw4yLP7NEk cdUDqtYlumJ3EyFZZgbRxNKvaGqIh4496LWjmjfuJtbmmOc5iKTmTa4OcMu6YqMSZT0nY2 vY6aUxBVGye1HV2rcZ+tO7Codce6EL6F4iGuD3bsFGzjPYvyBAeGQYsOZU2z1NVuUSIoJ8 Hi0thseprMKLS9dM56kk+IWgwzmWXWpQU6kli+tJRQFS7snkdAnwmEIGJvIOXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759009665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=laahTYb+khXux2ASyodziiQ2mqKb38LgABFqVp0ip+I=; b=EuZIfuwLhOfhYcfDcbMud+u8BCOHV/coYSIZZE8ZBdiYWkHalScpEFOOUxljxJFTZXsgAN jF6KXZRVG5OeqUqmgCCCFTcYasx94u2EDEgzw036efgc5ArAx0pQu5AZYH4SXipI3fMbCR dKZnMqG2Z1Nd3U8xUULNtY3AyhTXznZ+4YKGJ5Ch9Qp9mSQGCHvoeAK7m1xzzoM7+9mSgY rLSAqU0NBwsqcwGAai42zVTzJvj78VrEXn+k028XqmIO8rpUGu5S2DFZ/ytPWdn3efgP2m EycKnSwxkIuoFyaqm1ae0bk7o9yVvNP5EsNlq8joyI7ilP6VfZ2V0ls1Mo0yNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759009665; a=rsa-sha256; cv=none; b=PJr4QTjPBB84yOGE8u10xSWWINdgwXlxcSr2u7KtaO9H/f1z63c1Rm7cTlci4y9JbIx2nR VbJlpLre5Salm4m1VGZ+E00xzXYwX7aXz1UdNYuN0OcZF58hKWqKbgtDOFx9xxSC/ZLrXq BmQZENWXoBALZ5K140OJHNmVgOGCVVxXEHPxq+CuYfcGEgAOLxLnzlKee09+FnL9kmOCtC +CGuUf0lNsXQ/4i2Fb5YhrMqIixVBr1pMmhaheGUF1YM94cXIinXdwKHyJ0deYSBvs+vnK m9Dp7betXEjI+SX+CERWWxkm+G1zelltMNXqVujZdZs/lEBOP7OdTq86Qmqyxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from smtpclient.apple (unknown [IPv6:2a02:8109:1101:be00:d8e4:fc6f:9ab0:98d3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: tuexen) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cZ1Jv6Y1nzDCd; Sat, 27 Sep 2025 21:47:43 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Content-Type: text/plain; charset=utf-8 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.100.1.1.5\)) Subject: Re: git: b4c6c3db0379 - stable/14 - ipfw: Teach ipfw that EtherIP is an upper layer protocol From: Michael Tuexen In-Reply-To: Date: Sat, 27 Sep 2025 23:47:40 +0200 Cc: Justin Hibbits , Zhenlei Huang , src-committers , "" , dev-commits-src-branches@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <270A504B-9801-41D0-A214-39C4389B0670@FreeBSD.org> References: <202509271513.58RFDst3083057@gitrepo.freebsd.org> <44DAB9B2-B037-49B0-9153-90B4CFBB6234@FreeBSD.org> <20250927143548.661e75f7@ralga.knownspace> <7CCC215D-E9EF-49CD-95A1-F2D5215AD268@FreeBSD.org> To: Warner Losh X-Mailer: Apple Mail (2.3864.100.1.1.5) > On 27. Sep 2025, at 21:12, Warner Losh wrote: >=20 >=20 >=20 > On Sat, Sep 27, 2025, 12:44=E2=80=AFPM Michael Tuexen = wrote: > > On 27. Sep 2025, at 20:35, Justin Hibbits = wrote: > >=20 > > On Sat, 27 Sep 2025 20:32:20 +0200 > > Michael Tuexen wrote: > >=20 > >>> On 27. Sep 2025, at 17:13, Zhenlei Huang wrote: > >>>=20 > >>> The branch stable/14 has been updated by zlei: > >>>=20 > >>> URL: > >>> = https://cgit.FreeBSD.org/src/commit/?id=3Db4c6c3db0379a5b3d34143325805cd7e= 68cf3d9a > >>>=20 > >>> commit b4c6c3db0379a5b3d34143325805cd7e68cf3d9a > >>> Author: Zhenlei Huang > >>> AuthorDate: 2025-09-16 15:58:24 +0000 > >>> Commit: Zhenlei Huang > >>> CommitDate: 2025-09-27 15:11:35 +0000 > >>>=20 > >>> ipfw: Teach ipfw that EtherIP is an upper layer protocol > >>>=20 > >>> so that we do not discard EtherIP packets ( over IPv6 network ) > >>> when net.inet6.ip6.fw.deny_unknown_exthdrs is set to 1 ( which is > >>> the default value ). > >>>=20 > >>> PR: 227450 > >>> Reviewed by: ae, #network > >>> MFC after: 1 week > >>> Differential Revision: https://reviews.freebsd.org/D52566 > >>>=20 > >>> (cherry picked from commit > >>> 0418e6690e91aa6c38dd9af9da43c4c5a9dc1cd2) (cherry picked from > >>> commit b1c96e54b906d0cdea0b5a9c74cc295803dfe50e) =20 > >> Why is this cherry picked from two commits? Shouldn't this be only > >> cherry picked from the commit to the main branch? > >>=20 > >> Best regards > >> Michael > >=20 > > It's common to cherry-pick from stable to older-stable. This was > > likely cherry-picked from stable/15, which was cherry-picked from = main. > That is why I am asking. >=20 > My understanding is that we should > * MFC from main to stable/15 > * MFC from main to stable/14 > * MFC from stable/14 to releng/14.4 >=20 > So I might be wrong and and I should actually do instead > * MFC from main to stable/15 > * MFC from stable/15 to stable/14 > * MFC from stable/14 to releng/14.4 >=20 > I know that releng/14.4 does not exist, but there is a time window > we can get changes into relen/14.4 with approval from re@. >=20 > I would just like to know how I should MFC to stable/14... >=20 > Either way works. Without conflicts I do main to both. With conflicts = I do main to 15 and then 15 to 14. For releng, it's always from the = stable branch. Hi Warner, thanks for the clarification. Best regards Michael >=20 > Warner >=20 > Best regards > Michael > >=20 > > - Justin > >=20 > >>> --- > >>> sys/netpfil/ipfw/ip_fw2.c | 7 +++++++ > >>> 1 file changed, 7 insertions(+) > >>>=20 > >>> diff --git a/sys/netpfil/ipfw/ip_fw2.c b/sys/netpfil/ipfw/ip_fw2.c > >>> index 0e0ecd3c6b20..928ccefe4803 100644 > >>> --- a/sys/netpfil/ipfw/ip_fw2.c > >>> +++ b/sys/netpfil/ipfw/ip_fw2.c > >>> @@ -67,6 +67,7 @@ > >>> #include > >>> #include > >>> #include > >>> +#include > >>> #include > >>>=20 > >>> #include > >>> @@ -1717,6 +1718,12 @@ do { \ > >>> PULLUP_TO(hlen, ulp, struct ip); > >>> break; > >>>=20 > >>> + case IPPROTO_ETHERIP: /* RFC 3378 */ > >>> + PULLUP_LEN(hlen, ulp, > >>> + sizeof(struct etherip_header) + > >>> + sizeof(struct ether_header)); > >>> + break; > >>> + > >>> case IPPROTO_PFSYNC: > >>> PULLUP_TO(hlen, ulp, struct pfsync_header); > >>> break; =20 > >>=20 > >=20 >=20 From nobody Sun Sep 28 00:47:09 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZ5Hy0fXrz68ygr; Sun, 28 Sep 2025 00:47:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZ5Hx6wvlz45D0; Sun, 28 Sep 2025 00: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=1759020430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9GuX5wPXSkfMTbSKMFnVqN2wPFA3lmhwb1fu8DveRCA=; b=g5x8iw6+RV5YjeU0++o6Ugeip9x3qQJDY2Guxmsg0712bo605Et6eqOw/0zQK2RcTGHl5q YpusaA4bUjFu62qD4M+gIbz1xYuQ4oakJ/DF8WX6WnbIiHEj7UehOYDA/CwHA3ze7CW8k/ dKtVJNke4tSJh0oB8cjNN3VWvPB0vX1msj1Mj560r55hRJU/toXcGCGsYU6Y6R9bz/q1fw My8K7c9OJubL3PSAlEOmKpuouvaGNGzw3aFSaLKyLYp7/q5jxzoavFt2Zwtb0dWvmcZaqG Vn1CqwgJBt/qkL/Q7WjQTEh6yvuKoFX4pENmhb3JyXHKKqBXN6FAnsr46SgsBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759020430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9GuX5wPXSkfMTbSKMFnVqN2wPFA3lmhwb1fu8DveRCA=; b=lPC7b85//ahkCxXC8DQbLzscGxRdeEZ06q3YVbY+5k1x1AQrGkxXhNvPljIGFnej0yAdCK m6TGMbLO+bGoCRmW+exYuX5rUtbrTrq8dHjehf0tjNZYYjIELYmhQSuq9qvbLt95hbAyo9 KEN0n6Xqsl8JtKal797tvj8PqM46JEZjgtIIwea/odUzP6i1dsvpFWU3MJZrazNnmZu/57 vWHaiOMwj0T1raoTS/sygel05q75c66z+Mz1+2BF8K66mMjRpAjVGIxJITWSUwaWqO/37R lbf098B6L9pbcdcdpMszU3o2P29Law9+rueAjY5jUQ21pgLN4BudNMA6rPwkQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759020430; a=rsa-sha256; cv=none; b=tiPQ6pOGUZkSpLkZ+S2Q84MZ9RE96YTqrLKzJZzDr8KYnOZ64VImg3RSDXLn1VOloAVeab qIwuLdfgmiVpuF3GCRQSSqm6fWVAlDbFfkc16zwDPg3UjeHt9mv+L5TmexKOebQoLpI7BG CRtpxcHKdZCCBl4Mh0BxiJJIEN6rLjCbIgxEcMgSryiTLifrm4AUhaikzK/euUdVq+0vFP OxN+reVFiFe/5BB79TcbRvoB5SAuLWk/Yb2CYo3QCGmq3/NCdzAq2PAqQPxPi/Ib7DRcHQ 1nYKh87/H/mCAoKBgTQe80KsYmA9sDqH16kUpAD2hyzxuC8H9qbbgAUhDSM9cA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZ5Hx6F5nzxZj; Sun, 28 Sep 2025 00:47:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S0l942048141; Sun, 28 Sep 2025 00:47:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S0l9Lj048139; Sun, 28 Sep 2025 00:47:09 GMT (envelope-from git) Date: Sun, 28 Sep 2025 00:47:09 GMT Message-Id: <202509280047.58S0l9Lj048139@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: e8abf61e63bb - stable/15 - arm, powerpc, riscv: implement atomic_set/clear_16 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: e8abf61e63bb9990bd11879ea7a1984c62b0cdeb Auto-Submitted: auto-generated The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e8abf61e63bb9990bd11879ea7a1984c62b0cdeb commit e8abf61e63bb9990bd11879ea7a1984c62b0cdeb Author: Konstantin Belousov AuthorDate: 2025-09-19 18:01:47 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-28 00:43:20 +0000 arm, powerpc, riscv: implement atomic_set/clear_16 (cherry picked from commit b31abc95eb730d566891e134ba14af852645f772) --- sys/arm/include/atomic.h | 3 +++ sys/powerpc/include/atomic.h | 33 ++++++++++++++++++++++++++++++++- sys/riscv/include/atomic.h | 3 +++ sys/sys/_atomic_subword.h | 28 ++++++++++++++++++++++++++++ 4 files changed, 66 insertions(+), 1 deletion(-) diff --git a/sys/arm/include/atomic.h b/sys/arm/include/atomic.h index f3313b136656..c180ceaca142 100644 --- a/sys/arm/include/atomic.h +++ b/sys/arm/include/atomic.h @@ -1110,4 +1110,7 @@ atomic_thread_fence_seq_cst(void) */ #include +#define atomic_set_short atomic_set_16 +#define atomic_clear_short atomic_clear_16 + #endif /* _MACHINE_ATOMIC_H_ */ diff --git a/sys/powerpc/include/atomic.h b/sys/powerpc/include/atomic.h index 015a283e2de7..b2d7549e5bd0 100644 --- a/sys/powerpc/include/atomic.h +++ b/sys/powerpc/include/atomic.h @@ -1137,7 +1137,38 @@ atomic_thread_fence_seq_cst(void) #define atomic_cmpset_short atomic_cmpset_16 #define atomic_fcmpset_char atomic_fcmpset_8 #define atomic_fcmpset_short atomic_fcmpset_16 -#endif +#define atomic_set_short atomic_set_16 +#define atomic_clear_short atomic_clear_16 +#else + +static __inline void +atomic_set_short(volatile u_short *p, u_short bit) +{ + u_short v; + + v = atomic_load_short(p); + for (;;) { + if (atomic_fcmpset_16(p, &v, v | bit)) + break; + } +} + +static __inline void +atomic_clear_short(volatile u_short *p, u_short bit) +{ + u_short v; + + v = atomic_load_short(p); + for (;;) { + if (atomic_fcmpset_16(p, &v, v & ~bit)) + break; + } +} + +#define atomic_set_16 atomic_set_short +#define atomic_clear_16 atomic_clear_short + +#endif /* ISA_206_ATOMICS */ /* These need sys/_atomic_subword.h on non-ISA-2.06-atomic platforms. */ ATOMIC_CMPSET_ACQ_REL(char); diff --git a/sys/riscv/include/atomic.h b/sys/riscv/include/atomic.h index 74ffc171b028..c90cb02c482c 100644 --- a/sys/riscv/include/atomic.h +++ b/sys/riscv/include/atomic.h @@ -656,4 +656,7 @@ atomic_thread_fence_seq_cst(void) #include +#define atomic_set_short atomic_set_16 +#define atomic_clear_short atomic_clear_16 + #endif /* _MACHINE_ATOMIC_H_ */ diff --git a/sys/sys/_atomic_subword.h b/sys/sys/_atomic_subword.h index dee5a3bed871..284e2bfa340f 100644 --- a/sys/sys/_atomic_subword.h +++ b/sys/sys/_atomic_subword.h @@ -205,4 +205,32 @@ atomic_load_acq_16(const volatile uint16_t *p) #undef _ATOMIC_BYTE_SHIFT #undef _ATOMIC_HWORD_SHIFT +#ifndef atomic_set_16 +static __inline void +atomic_set_16(volatile uint16_t *p, uint16_t bit) +{ + uint16_t v; + + v = atomic_load_16(p); + for (;;) { + if (atomic_fcmpset_16(p, &v, v | bit)) + break; + } +} +#endif + +#ifndef atomic_clear_16 +static __inline void +atomic_clear_16(volatile uint16_t *p, uint16_t bit) +{ + uint16_t v; + + v = atomic_load_16(p); + for (;;) { + if (atomic_fcmpset_16(p, &v, v & ~bit)) + break; + } +} +#endif + #endif /* _SYS__ATOMIC_SUBWORD_H_ */ From nobody Sun Sep 28 00:47:10 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZ5Hz0zjVz68ylr; Sun, 28 Sep 2025 00:47:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZ5Hz01HGz45X3; Sun, 28 Sep 2025 00:47:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759020431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8gcLgz3rggJzw7o1PtW7hNE4ajaAzQ78ME6XHSLeE9Q=; b=xL/HYVqhrQAjcTiQH1dU+1b+cGZQ6GK1WGeAP2MsiTPP9z0xQxA1rakddr4Py5jjqAvTGN PQP/ezd5QrFGJF2g2Q1lT7tewhxzPa+Eh+RQqi7jJ3klKx2T6gNdMAbom+Unt11OkbwxwM 5gHrSDLBn8BQbsTfRoYokPm6oPoku2aZuqIyFHihWD0rY96dtiXTahkzPIes9EIoxQgMdr Netqkp19DjNYboa2eVEnKspTVhRjIhX7LUoFgb5qZL0GB9/96DlRA70lUxKaFrxvRNipW3 tyAA6oTlfOmbXwRNB3JeWoB2aN6gA36udT4tDQLmXFpD//daCf+kyZbobrmYjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759020431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8gcLgz3rggJzw7o1PtW7hNE4ajaAzQ78ME6XHSLeE9Q=; b=ljlft2ubk1Ldm65zquE0exDPL8hPMrwTTaQCbNG3PEa3AR4T/vA+nBDMymrmscaiCrYmY5 hEXT6MeplJ7AKV7mXFb2EIx/d9UPzogiWUEmIWY7UO6o5BmEhbLbJ2AlxuCzIEW+ihYpJA G2u5fnEEMM12mkPC3oO31HLvAJgXG6NxPEUP204oZ8aRM6v5pG3zcbruUgnRrLAUtTWh0r rSlxEPuzYksDFifXfjQ60dnoK5VBNkDc4UzbiH0YF3XuBMlUxM+DzI+klZBMZHJK+Etxuf kvXs6y0cDz8FdjkR7Nwg+SdgwTzAj/0y3MV0Dt2+X/pdSu4hDfvhjtv4HgH+GQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759020431; a=rsa-sha256; cv=none; b=oPcgc3bGE/sFR1FS9fZcX9C9PfPXo4j4+cbwsDEpAx6ZTOpmA9eBKfS5MBh2VAhQYRmKen XtLqSaEG3hGDl2cNPY6N2EcbmWNEnUz5HFMurCWdTzOebW4QJDTFjvUEG7EmlO2wQ5ceMv UjUSpI0LLirTnxlYmQ3e730gPVwsg5sU1fyzEhk0CFDJ5TCToPCu/yqD/nT2F9BidcX77/ uBZGc+BOdqTZFJH3qBzHqLIm8fV9bzgPZWASe/Xg6pxE5Ckhi914WgvMqZmLzB6v0tv7cs /Qd2pIjMj1aWdHkceF7SS6gvNaPrEcjs+HX5gnaJKf917W3Pc2f/DM63GaqBSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZ5Hy6bWnzwVL; Sun, 28 Sep 2025 00:47:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S0lAHB048173; Sun, 28 Sep 2025 00:47:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S0lA1H048170; Sun, 28 Sep 2025 00:47:10 GMT (envelope-from git) Date: Sun, 28 Sep 2025 00:47:10 GMT Message-Id: <202509280047.58S0lA1H048170@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 88d23b649ceb - stable/15 - arm/atomic.h: remove misleading comment List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 88d23b649ceba423fdec37b1de460fb4ef1e76c6 Auto-Submitted: auto-generated The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=88d23b649ceba423fdec37b1de460fb4ef1e76c6 commit 88d23b649ceba423fdec37b1de460fb4ef1e76c6 Author: Konstantin Belousov AuthorDate: 2025-09-20 19:10:02 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-28 00:43:20 +0000 arm/atomic.h: remove misleading comment (cherry picked from commit 1c0465a3d32e59cd260067e87469abd013571470) --- sys/arm/include/atomic.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/arm/include/atomic.h b/sys/arm/include/atomic.h index c180ceaca142..f66953710615 100644 --- a/sys/arm/include/atomic.h +++ b/sys/arm/include/atomic.h @@ -1103,11 +1103,6 @@ atomic_thread_fence_seq_cst(void) #define atomic_store_rel_int atomic_store_rel_32 #define atomic_swap_int atomic_swap_32 -/* - * For: - * - atomic_load_acq_8 - * - atomic_load_acq_16 - */ #include #define atomic_set_short atomic_set_16 From nobody Sun Sep 28 00:47:11 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZ5J057mTz68yyL; Sun, 28 Sep 2025 00:47:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZ5J031XDz45G9; Sun, 28 Sep 2025 00: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=1759020432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qDPU+lb/eF9egoYJb8K2rrOkrlIHDO022wGFn70pWrI=; b=FFSijiEb35Cf/45NnFpRK21doCc91PA7yqnXX5TAppG1C2V9hvij1pm2rmoKuCAPVfOFAX KAep9KH77H0KhjO6ohfpMLolPaKVz5vZl2YmsBrvcd8wFr5zv9xxiO0oQ1PA7nXSj+/9qE BDwiCzbAgyU31IqQBEMtsJrDtA1e1tYL7KDsHW3dbbVw/SfqJuBJhOxgcl057NNVd6lenn a+IHKj6Vivkpx7ykrmtXsXCdzFy/euOKhpmXTWlT6aw2cbCYk6AP9x7i/8KVDViGGmwzGb 2uXAoLgUKVqIMUk7HCvbfzmJOOnxf6B1kdocwzIY5dzCn668sdGQCHPSrNOiEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759020432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qDPU+lb/eF9egoYJb8K2rrOkrlIHDO022wGFn70pWrI=; b=XCYO0+RwLMy+/tDUmfN23HG8aOHT0X9jFThSI612B0/MrbvAAAjpice9JRZs/46+X02gtn xg8Ow2xNJVqfrpCDeY7H02j4INbky1dtqAEWSjTaihxqn/TX6qUPGLj6M9CGbKLh6hIXQm Rz9fvbPpgvXlJyPjYQlgi4jcX4pj6paHabA9WywJjc9hGv+JTMRdq7jC+6djwdbfG0JDBj Izpj29Ej0MalaAQ1pI8cD+cHDZtdG3i3pQTpCGKVFTPCU1lOUFdfRM2jg1IUgDM1dkt2Qx T3Y5v0pVKCCZbU/ar7REINH6CCh4GxUrTKbA2WvWMRudH0twr1N5IH247yDF5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759020432; a=rsa-sha256; cv=none; b=Y4z7y71htkJNxjwMvmpMhn+/uT7jFTaZQfFN+AA36vVtmqfw56YHm8sN2pSKDHSZp8utTc 7+COkTOTvKXRsyDKCBTcGme9AMpJLlk7edLHO0nb5wdNkwh0FoY0JreVyVFI8P3fnfkK0R 2zmycOgDDE7H5HYCIpCLPlr1RLHZcG9mekDxKV+5uoi7Cksmy9rWIB5S7OIr5kVsyWT4eL KGrdc4o9yOXlklBkyni8guxszVeDrov2XX+WOh9uXi0sc4qx9p1cWMMMFZfS90X8jvEKwy RXcc5GBOMKbNRKnCYEGS6ER3ndm8MNWG9ApN7oOP9n7dd0tZyRwrg06heI+ThA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZ5J00BH2zwdj; Sun, 28 Sep 2025 00:47:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S0lBfd048205; Sun, 28 Sep 2025 00:47:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S0lBEi048202; Sun, 28 Sep 2025 00:47:11 GMT (envelope-from git) Date: Sun, 28 Sep 2025 00:47:11 GMT Message-Id: <202509280047.58S0lBEi048202@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 071a785e912c - stable/15 - x86: directly use clflushopt mnemonic in cpufunc.h List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 071a785e912c9a53149bba27badecfca8acd642c Auto-Submitted: auto-generated The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=071a785e912c9a53149bba27badecfca8acd642c commit 071a785e912c9a53149bba27badecfca8acd642c Author: Konstantin Belousov AuthorDate: 2025-09-21 03:03:09 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-28 00:43:20 +0000 x86: directly use clflushopt mnemonic in cpufunc.h (cherry picked from commit 5c55b2f3ba6f48575496bde2d4d86272d10a8197) --- sys/amd64/include/cpufunc.h | 2 +- sys/i386/include/cpufunc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h index d180f5c76afb..e6c9f47ea261 100644 --- a/sys/amd64/include/cpufunc.h +++ b/sys/amd64/include/cpufunc.h @@ -76,7 +76,7 @@ static __inline void clflushopt(u_long addr) { - __asm __volatile(".byte 0x66;clflush %0" : : "m" (*(char *)addr)); + __asm __volatile("clflushopt %0" : : "m" (*(char *)addr)); } static __inline void diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h index 4bed57b5afbf..b200588b0739 100644 --- a/sys/i386/include/cpufunc.h +++ b/sys/i386/include/cpufunc.h @@ -74,7 +74,7 @@ static __inline void clflushopt(u_long addr) { - __asm __volatile(".byte 0x66;clflush %0" : : "m" (*(char *)addr)); + __asm __volatile("clflushopt %0" : : "m" (*(char *)addr)); } static __inline void From nobody Sun Sep 28 00:47:13 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZ5J13TnKz68yyM; Sun, 28 Sep 2025 00: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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZ5J12Cb6z45SL; Sun, 28 Sep 2025 00: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=1759020433; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d75ohfWNbRDcnZa9HHEwwXxvlRD3pBslhpaDhLh/6iY=; b=r9uWZTRt1bKRzloiLtuDNNPNGi+F33qVJc8hQC+YaagUBS+imOVTE/VWjudNNw2tePJrEK T08HFKM6ZxABWijPYXO5UBw4wl2Pcb/XAT22eFyAG1lD9ZCi+4gRgI6qzWc0nG2M4FBIbA 4aCwydL3AosH+cFMgDIig4ka0oLRA8e476d1jEFkZNMWZC2pUvmo0eyPrL9v0IFDZbjo5Q ZNw6dAdHWT05+PK2dc4CblYX/5ojbLGJSGUbtj9ooFnP6aCnaQuyNwGXCQ0LYj8ghmoqRR 94dujvoRot8Jg/91sdNh6WuLYqFbB47PXBXvOHmIObqVCkpOtrvSbDxQ9+A6lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759020433; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d75ohfWNbRDcnZa9HHEwwXxvlRD3pBslhpaDhLh/6iY=; b=wPv5Nssxip0BxPjNzEEns0IAuCzDzkE5QLURC41tldUKXqTdYoz1FGddM7NTJPR+NnSe9Y r29c7TkGISixf/EgtTTqGPOeNrPzZZFhnboT2a6+ztiOTnpijGz5JtC+VtAAsjrsI8EBNq 6lG0o7QRnbwAifhJLchF7cpiDdi4jkZj1vdi/CtmSjfRFpvFIHbZAeLN0T8prChwRF9fnn OrTfMlfZoOI+RPSOBE+48nj4qp3kULlyJ/G3keuFBLgZd1AWFe+67yv7YH1//11IAnq+rj zV7ZugmlTHBvWEmjOtwZh1ERrjSTRDLTuFRVqkcGDwUF6VWXVTPxufHWhXVICA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759020433; a=rsa-sha256; cv=none; b=MsYpbJdLMxABE3XnABT013LnN3Nn8+dp8kjb5yHsUyL7hBadl2E/VadssDNaKBb3TKUlIY 9wJ4xf/W3CLemmDaKEyRNF8DC/rqd1oQr+Q6BMs/UsUg2jox5eYxD614NtMFSynpLdnvky lALkomAovjkXubcwr0fiJX31D/tv6I02I/vrqNddpN5I7zeKS/5HSTOTZvHEXs2EAirtLQ 1kBp7hXvrycsqguPUNdrHV4FdxS8jfrxQyyk8NNIcYnApTXXhOLW/weyD78VLjCL6c9ZU2 M1pr/nHs1EtgIYxa9iUqjkTdycpvrlWtrUNQiT87Na9N/J9lR2hUClE1UzHBKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZ5J11S19zxPh; Sun, 28 Sep 2025 00:47:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S0lDc6048243; Sun, 28 Sep 2025 00:47:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S0lDIU048240; Sun, 28 Sep 2025 00:47:13 GMT (envelope-from git) Date: Sun, 28 Sep 2025 00:47:13 GMT Message-Id: <202509280047.58S0lDIU048240@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 0c3b3c7482db - stable/15 - amd64 cpufunc.h: add rcs(), to read code selector List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 0c3b3c7482dbdf854e96268d2afbda91928a648c Auto-Submitted: auto-generated The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0c3b3c7482dbdf854e96268d2afbda91928a648c commit 0c3b3c7482dbdf854e96268d2afbda91928a648c Author: Konstantin Belousov AuthorDate: 2025-09-19 02:37:14 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-28 00:43:50 +0000 amd64 cpufunc.h: add rcs(), to read code selector (cherry picked from commit 50ee990e1874d6d40b8e3dc359c37e2ef2ebf477) --- sys/amd64/include/cpufunc.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h index e6c9f47ea261..9a4c82275a99 100644 --- a/sys/amd64/include/cpufunc.h +++ b/sys/amd64/include/cpufunc.h @@ -572,6 +572,15 @@ rss(void) return (sel); } +static __inline u_short +rcs(void) +{ + u_short sel; + + __asm __volatile("movw %%cs,%0" : "=rm" (sel)); + return (sel); +} + static __inline void load_ds(u_short sel) { From nobody Sun Sep 28 00:51:42 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZ5PB2Jb0z690HV; Sun, 28 Sep 2025 00:51:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZ5PB1Zz7z46WN; Sun, 28 Sep 2025 00:51:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759020702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CxjzPjqje+BjuwD3PJdaX54y7UPmm/Z3n/SuVNnkY4U=; b=VrPetVxvdBQBIr7JLXqPV94o7lmU/s1EDB96vuiI2C4YsnjXpJ4T7TtIq3fNt/JJo8y9g8 qv8yeSfDNNGrAw+hOXP7JUfFiotv2F2NG4YVnkZKl7ukzo24R/oB6GNWTIZwlXnnaasefs qR40RbJjFudr4fqCukDfhTpAaZeNJkZRRbPy0PYfrwVmkjJbWKLWcbKl+FFXcxElGvlmo6 hgCErit7420r3WDyM/73iqHARbeEFQF7dk63Q8cgvDmx+IlmS38X6sXZrG8tweJHT/Wvxf j32vGXYKXYxbStrLvdaZypl7oqRdC9NNKqN7VFugKB5lboA+k+zxWUT1C/irHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759020702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CxjzPjqje+BjuwD3PJdaX54y7UPmm/Z3n/SuVNnkY4U=; b=LUV/eqZS7t2CO8i6WcnLV/XsVxTE6fVpg1GG0nOrO2cQylbuTkiWQG8J6F/cekXCIHspWe Cwui9uv8eUSsEtNeKj+D17o79ehddTy1mT53v6rC9pD2YIxzZi/kFPm1bwZHy84XtKq4Pw SVoNwWFMkvN0H6PaGckObrl+GE2f/Xu/xCr0nnNO7J4LhWBuo9rPIf5qqzo4StxDAsunhz EtrEjMirSCioIOAxhC1sisO/xikjIEfFEK9LHQwPTTJL1IU5F09rdCBYD/cDnTN7Osqyyj A8fagNMGvwaLodlNfLHUz0GHfvZ/pJqrKQXXG8tJvJUYybfBbzxk1wiDEwBjlA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759020702; a=rsa-sha256; cv=none; b=gWA220hxp9Necvpi9i9QuUw5ce2WkP2Z0kw9kisU7jHROAMFCdpbkdLp1kz77l4SeT+hni p4xX7EG55mjqa/kNEcJQ7biGzfLh2UfQKK0L+80f9XhYuKFVLEH5eoBuoBjAiEoomVJIKM 5YCyROTp4OuVoZPplZ6R1xclXkDgX+RLjKvPGdU7cSrF8EwMoX/1gOlipdcXmHPcPlMzqV llrvOqg1Xv8rri3aeANM/uFUTFQFDGVGDzOhaWStzQr19x57QnsYxLiY98HkFRE9AuC56K RH21hAmFt6+zb7wgzrm6qwAvWbqaRXyzSXIX8/SlOe9znT9n2wthsW6qos70HA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZ5PB1042zwdw; Sun, 28 Sep 2025 00:51:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S0pg7W064178; Sun, 28 Sep 2025 00:51:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S0pg0X064175; Sun, 28 Sep 2025 00:51:42 GMT (envelope-from git) Date: Sun, 28 Sep 2025 00:51:42 GMT Message-Id: <202509280051.58S0pg0X064175@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 715f597eb2ea - stable/14 - arm, powerpc, riscv: implement atomic_set/clear_16 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 715f597eb2eadbf666a22a48e8431ce2f21447ce Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=715f597eb2eadbf666a22a48e8431ce2f21447ce commit 715f597eb2eadbf666a22a48e8431ce2f21447ce Author: Konstantin Belousov AuthorDate: 2025-09-19 18:01:47 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-28 00:47:23 +0000 arm, powerpc, riscv: implement atomic_set/clear_16 (cherry picked from commit b31abc95eb730d566891e134ba14af852645f772) --- sys/arm/include/atomic.h | 3 +++ sys/powerpc/include/atomic.h | 33 ++++++++++++++++++++++++++++++++- sys/riscv/include/atomic.h | 3 +++ sys/sys/_atomic_subword.h | 28 ++++++++++++++++++++++++++++ 4 files changed, 66 insertions(+), 1 deletion(-) diff --git a/sys/arm/include/atomic.h b/sys/arm/include/atomic.h index a7b5ed76c0ad..c1a7ce527329 100644 --- a/sys/arm/include/atomic.h +++ b/sys/arm/include/atomic.h @@ -1116,4 +1116,7 @@ atomic_thread_fence_seq_cst(void) */ #include +#define atomic_set_short atomic_set_16 +#define atomic_clear_short atomic_clear_16 + #endif /* _MACHINE_ATOMIC_H_ */ diff --git a/sys/powerpc/include/atomic.h b/sys/powerpc/include/atomic.h index 015a283e2de7..b2d7549e5bd0 100644 --- a/sys/powerpc/include/atomic.h +++ b/sys/powerpc/include/atomic.h @@ -1137,7 +1137,38 @@ atomic_thread_fence_seq_cst(void) #define atomic_cmpset_short atomic_cmpset_16 #define atomic_fcmpset_char atomic_fcmpset_8 #define atomic_fcmpset_short atomic_fcmpset_16 -#endif +#define atomic_set_short atomic_set_16 +#define atomic_clear_short atomic_clear_16 +#else + +static __inline void +atomic_set_short(volatile u_short *p, u_short bit) +{ + u_short v; + + v = atomic_load_short(p); + for (;;) { + if (atomic_fcmpset_16(p, &v, v | bit)) + break; + } +} + +static __inline void +atomic_clear_short(volatile u_short *p, u_short bit) +{ + u_short v; + + v = atomic_load_short(p); + for (;;) { + if (atomic_fcmpset_16(p, &v, v & ~bit)) + break; + } +} + +#define atomic_set_16 atomic_set_short +#define atomic_clear_16 atomic_clear_short + +#endif /* ISA_206_ATOMICS */ /* These need sys/_atomic_subword.h on non-ISA-2.06-atomic platforms. */ ATOMIC_CMPSET_ACQ_REL(char); diff --git a/sys/riscv/include/atomic.h b/sys/riscv/include/atomic.h index 74ffc171b028..c90cb02c482c 100644 --- a/sys/riscv/include/atomic.h +++ b/sys/riscv/include/atomic.h @@ -656,4 +656,7 @@ atomic_thread_fence_seq_cst(void) #include +#define atomic_set_short atomic_set_16 +#define atomic_clear_short atomic_clear_16 + #endif /* _MACHINE_ATOMIC_H_ */ diff --git a/sys/sys/_atomic_subword.h b/sys/sys/_atomic_subword.h index dee5a3bed871..284e2bfa340f 100644 --- a/sys/sys/_atomic_subword.h +++ b/sys/sys/_atomic_subword.h @@ -205,4 +205,32 @@ atomic_load_acq_16(const volatile uint16_t *p) #undef _ATOMIC_BYTE_SHIFT #undef _ATOMIC_HWORD_SHIFT +#ifndef atomic_set_16 +static __inline void +atomic_set_16(volatile uint16_t *p, uint16_t bit) +{ + uint16_t v; + + v = atomic_load_16(p); + for (;;) { + if (atomic_fcmpset_16(p, &v, v | bit)) + break; + } +} +#endif + +#ifndef atomic_clear_16 +static __inline void +atomic_clear_16(volatile uint16_t *p, uint16_t bit) +{ + uint16_t v; + + v = atomic_load_16(p); + for (;;) { + if (atomic_fcmpset_16(p, &v, v & ~bit)) + break; + } +} +#endif + #endif /* _SYS__ATOMIC_SUBWORD_H_ */ From nobody Sun Sep 28 00:51:43 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZ5PC4CW1z6908m; Sun, 28 Sep 2025 00:51:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZ5PC1l3wz46WR; Sun, 28 Sep 2025 00:51:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759020703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=91XWxD+YMUCpa08LDHT9s8/+vGIOrbCmcGgQtM2ECj4=; b=UpIDLZyyvMTtAqt7NrOQcc1e/FSLKuzPesqKuRPA+q3mIhs0TK47bChvenCJ8wE+QXWTsR 9+wIw0WgJ3W9vbiA+27p8atTdD8+stb9TK+203jGsWfI+IoZ1kbqShjMeayx81aUjZZG6R BppdmDY+hBEC9OirMgXOpZxJsXtMhADKcPT4x2UZWQ/JVST6ujAQHovsywQyNnzZeY/qeZ jXKoWOtXRTnYt6rqzASE7i2NDnlchGSYZxfpiM3UU6SV44er63dsa5tGFRE2PwZfIjFLUW /OS1NHKp6NgHP/bM9V5iSe/m2j/8aq9yRHfOt7PFWdpgFrsHQAu5tQFFZYSTEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759020703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=91XWxD+YMUCpa08LDHT9s8/+vGIOrbCmcGgQtM2ECj4=; b=u8P+0n3d/ye+y/mjdi2qyST6dg5Gh/e46LHlso9BvorC0t6QJn/LxUFmPfnUbsMYrht8bd Mn0cFH0nTCQrhia8ex0XTVEqQ647mmd+az7uw4LKJP4hs8zYOTdShq7wxlOd4u37hbXAYC 5ujTAC6UToBGgYjDuQSsNYnC3D26LG2murRo58vrhdEFZg3Bvgf+qVX8OUsEfbrKhebWNR aA/Pzu0WpVHBUBfOrTPESppYrfOxBkw/8uiNWsrqqABq22qgv+FXLarE4lZgiCHCLBYLBg E4/qwdXd3EnfGGvpj2k+rPzM+uccqFIeaO/B5TjaJAYHO7fhKLsMbL2fWFcFzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759020703; a=rsa-sha256; cv=none; b=siSJiuUxKxeps5a0BayzFTGMnnshQoe4rEvsDm1r2pnMZjpQUjyxHpheZcpBZy9fXeVkvC Az8RlAHjbsM5+aDn/1HM36VlrXOnV6IFpDT4k67GFWOIEoC14wUmXN0CD9i8pnN/OC0imK /xgUSJenXR0mF+STa0VfCffjYwaDS6SWCRychug49wCoAfVb0u3gnL1RDeZNqQ3d56VVkO KWKpz3xAgTHuwhuYmR9a2SqGX6eLBA99NV1H/rrmIfChuhh/O7lxseu/9lwxixKAUcylnk pZxX0NO57S9lf/OyRD8q8qZT25WBzIzDQW35ysCLd33KB7SJrEZ4JDfWNcy1Vw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZ5PC1K9rzx4X; Sun, 28 Sep 2025 00:51:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S0phsn064211; Sun, 28 Sep 2025 00:51:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S0phgU064208; Sun, 28 Sep 2025 00:51:43 GMT (envelope-from git) Date: Sun, 28 Sep 2025 00:51:43 GMT Message-Id: <202509280051.58S0phgU064208@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 1cf34a9ead7b - stable/14 - arm/atomic.h: remove misleading comment List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1cf34a9ead7b3851369fe5fbb62663acb7b2aeba Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1cf34a9ead7b3851369fe5fbb62663acb7b2aeba commit 1cf34a9ead7b3851369fe5fbb62663acb7b2aeba Author: Konstantin Belousov AuthorDate: 2025-09-20 19:10:02 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-28 00:47:23 +0000 arm/atomic.h: remove misleading comment (cherry picked from commit 1c0465a3d32e59cd260067e87469abd013571470) --- sys/arm/include/atomic.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/arm/include/atomic.h b/sys/arm/include/atomic.h index c1a7ce527329..fe7d48475af9 100644 --- a/sys/arm/include/atomic.h +++ b/sys/arm/include/atomic.h @@ -1109,11 +1109,6 @@ atomic_thread_fence_seq_cst(void) #define atomic_store_rel_int atomic_store_rel_32 #define atomic_swap_int atomic_swap_32 -/* - * For: - * - atomic_load_acq_8 - * - atomic_load_acq_16 - */ #include #define atomic_set_short atomic_set_16 From nobody Sun Sep 28 00:51:44 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZ5PD72jFz6907Z; Sun, 28 Sep 2025 00:51:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZ5PD3Qtxz46Z0; Sun, 28 Sep 2025 00:51:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759020704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CQU96yQDp8lzQtQ4XaOSwsZh7I4gvhh92w+b9PozXTA=; b=Ndc9V/YETa8yydfVAqVuDA+rpDHDffAb/ubqPad9edB7tbNFlxuHzv2LsVa+H4LU1A4ATL QKJ9LT4p9Oc5Qm1lquBLWWOh6gMLpCctrXxdJ6F4x6WCg23TN9r2pF9BzlzemDyBMw4w7p 9bcn73Xq7c02getHVFF4cOiNaapcrPzQ/3+QzRDqtFjyE7YkcYqzq2yIG/G7yRe2qOJ3Uw MCU6B2uaWhmFwuMJ06iLFunmHkSWiC3jeoACRJsLr5PoRWQ3kFifzqc3ZPasvhjlxPPWRQ FnqQ/qe8qHA5ANyAzaPbWz8Kq12O+q70JFhXGcPV5IjJe6VYxLlbgjaupiQNYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759020704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CQU96yQDp8lzQtQ4XaOSwsZh7I4gvhh92w+b9PozXTA=; b=nmw4Y/6yx7kkM8hHOmfLwddbZJ9Dzae45s7WNuT+7UK8fYIfGheLbUlsGgc3J9uD4UjRGb uwmcNAIGs/+jylh8scqLy10q7J7hbt4NcPTFMeOHcui7+B5f2tLtIHFpA87VjTXqnxPXWW Sa/Z/K1xg2h2BdUh8Vxj4Fm4pu0erBuQgHU/+8LS2ulwD35Rwo+9aaWg4NmXOrownbpLuW 3UTGPlRHgQq3+SUzRN0PQJtql90agXv0AT/zSslvHEuP/tW52orZLLnTi45L8wGA2Gt+LI cwMV7Kp5yjHRXKPx/wRcZWzn+kZpkEtMNYjBK/00ifLc9tW6mJso57Oj0WaMSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759020704; a=rsa-sha256; cv=none; b=Fa+XS4+HfcVSeGqAD9yTb8Lv9Ps/lAJLVn6kmWzafdxDHf1BLb4DENXQWGwxM6IPt01vn1 vkZxy98bBtA7H/PJhpaDGkRB29UW6TknnCQTsclheGEqmo1uSvJB82w6U55EmipYrIOOO8 Da3emvgRUQLysnc+XOFL20XHcfPMKzVe3bXDgE+eYZU2+CfOumMTfD20ZsUwO8oM8DK1Sa TBr2mmZPUwu7sSKFBkiqIZUi0MSvptEK8NNNxxZ8R9XEga0r1AO5hOvxadNTSuGrl/jfOw MQ69f/4JGlf7ndCVUtOmNLA0r4Mjr4YtC+ux788y+X5O4jRVSOSfp2i2WaRBxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZ5PD2BLfzxQ9; Sun, 28 Sep 2025 00:51:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S0pi5f064244; Sun, 28 Sep 2025 00:51:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S0piEH064241; Sun, 28 Sep 2025 00:51:44 GMT (envelope-from git) Date: Sun, 28 Sep 2025 00:51:44 GMT Message-Id: <202509280051.58S0piEH064241@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: a3be514dbcd1 - stable/14 - x86: directly use clflushopt mnemonic in cpufunc.h List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a3be514dbcd1386d42887d10f49aaa3b085b7d7d Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a3be514dbcd1386d42887d10f49aaa3b085b7d7d commit a3be514dbcd1386d42887d10f49aaa3b085b7d7d Author: Konstantin Belousov AuthorDate: 2025-09-21 03:03:09 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-28 00:47:24 +0000 x86: directly use clflushopt mnemonic in cpufunc.h (cherry picked from commit 5c55b2f3ba6f48575496bde2d4d86272d10a8197) --- sys/amd64/include/cpufunc.h | 2 +- sys/i386/include/cpufunc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h index ca53d73b0186..3a4a83821f1f 100644 --- a/sys/amd64/include/cpufunc.h +++ b/sys/amd64/include/cpufunc.h @@ -76,7 +76,7 @@ static __inline void clflushopt(u_long addr) { - __asm __volatile(".byte 0x66;clflush %0" : : "m" (*(char *)addr)); + __asm __volatile("clflushopt %0" : : "m" (*(char *)addr)); } static __inline void diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h index 4bed57b5afbf..b200588b0739 100644 --- a/sys/i386/include/cpufunc.h +++ b/sys/i386/include/cpufunc.h @@ -74,7 +74,7 @@ static __inline void clflushopt(u_long addr) { - __asm __volatile(".byte 0x66;clflush %0" : : "m" (*(char *)addr)); + __asm __volatile("clflushopt %0" : : "m" (*(char *)addr)); } static __inline void From nobody Sun Sep 28 00:51:45 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZ5PF5bbSz690Bw; Sun, 28 Sep 2025 00:51:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZ5PF40T8z46gC; Sun, 28 Sep 2025 00:51:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759020705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8WJZjtyQOwltTL0PIyOZGCTfxSewxP3hcTenCsk8JnI=; b=KvTqES9cj9dBOb5rR9dKMu45xe8IWSR3ndOjT7S/v5dy3W4FsKnqoKtAZUkws9727KAjNQ gUyMOKasSpq2nz7ZW1/aADrdOFHqRv9w8aiwdDx7i9Bt7BKXIP0MHILxAJKS17vO6N1eu9 72Q8LgJH5pVJQfd3JH+Hk/fuWpN0k+vT7iSDeHH8qmBXFnA0HEujgr3q3vFB/VihGAdP6E bGiSgDex9U1wf6ZgaVdx5S+L3bNGU5TIlTRKLo9/0eWRAI6w5eTX905h9yuTZKUdUisI5j G/J6A8tyfwoY69WmXXxoZQRwYfpnfuj20YkPXNKi6DON3Uqk9yFp/KaEkhrfiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759020705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8WJZjtyQOwltTL0PIyOZGCTfxSewxP3hcTenCsk8JnI=; b=MRdQaRzeGuyhqvEV/exdKstuqkvQAon8pT+LuPCnOPGAbkPKMcwhDvGk8U9QE6qAQcOLPI +ji2+Bfd19FOuW+WIU8Y4bD3QumOlACFKP/atvfYfm/YxJ41qMOiO+d3os3qq/JNUL9Rr2 B6xV1yiPIYOSl7oqlfVygIRK0v9h6G2+DPqwzDTz4gYqDXi8qQgFvMuG0y3/2k3GCGghtM XG7meKDnsCKY/wemmn4cwrcNavvddMYOvJVI4wh0Drd+XKl1LHDGQfN8tBFIEFRZJbU3Lb rzbU2fkxfqVM/tI9mVhFHYmgbdcV4rAAv1lIKwe1J+jo3jOP1uz45Qh8E/0gKQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759020705; a=rsa-sha256; cv=none; b=S5uZsbK5XPUvsFgeA4joUZGRdVBb6msUpDKQJY43ZGNCu5DRQIrmdxR0uX4cn5vSqaHygG KgW1dS7OWtJout7EEAdqQetV2Qb27s1sMdgLeVE+UTg/ksXNP/jC7wNLcv/hunJpjl+nVf srtHyazvDHrIRheuRDkGU2LyV3GUmLogJW3GP4KJE+lZrl/2vKU91zGvIzcEj7E3T6y0BS V9Vox1OC78wIhiz459HUdJjt8Bd9IsqdS/voVJep/Yd50nlwg6VjFKlSCSTzqtHCwXQ99o Azv4Ud2+q5Mprkbny96DRBEy49kohJiaNYB5AcLeVICdkD4FXI998LTqObvjuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZ5PF37HdzxKp; Sun, 28 Sep 2025 00:51:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S0pj6D064285; Sun, 28 Sep 2025 00:51:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S0pjDU064282; Sun, 28 Sep 2025 00:51:45 GMT (envelope-from git) Date: Sun, 28 Sep 2025 00:51:45 GMT Message-Id: <202509280051.58S0pjDU064282@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: db0b2f107a46 - stable/14 - amd64 cpufunc.h: add rcs(), to read code selector List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: db0b2f107a46a1b01ca21054fe655132f2495e01 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=db0b2f107a46a1b01ca21054fe655132f2495e01 commit db0b2f107a46a1b01ca21054fe655132f2495e01 Author: Konstantin Belousov AuthorDate: 2025-09-19 02:37:14 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-28 00:47:56 +0000 amd64 cpufunc.h: add rcs(), to read code selector (cherry picked from commit 50ee990e1874d6d40b8e3dc359c37e2ef2ebf477) --- sys/amd64/include/cpufunc.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h index 3a4a83821f1f..84bed6fcbcf4 100644 --- a/sys/amd64/include/cpufunc.h +++ b/sys/amd64/include/cpufunc.h @@ -572,6 +572,15 @@ rss(void) return (sel); } +static __inline u_short +rcs(void) +{ + u_short sel; + + __asm __volatile("movw %%cs,%0" : "=rm" (sel)); + return (sel); +} + static __inline void load_ds(u_short sel) { From nobody Sun Sep 28 03:51:58 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZ9PB6jchz69Cv9; Sun, 28 Sep 2025 03:51:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZ9PB67Jtz3hB5; Sun, 28 Sep 2025 03:51:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759031518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+9+2noz/jptmN/B2qik4spXn8QHB8ZAeAYhRQAMg8PE=; b=wVCoSVqfh5LdpmaysLnY8IqjpOL7mZ+gY3ntvzBOYDN2Crvs6z0yR7ZTOpvgeNtGgsgiza jnsxEOnvsZkrH6fCKwJewwkcPiN3IYJKFx1SaHyp1qPP36poUSVVh92MetFJ+PzLGQSDFd 5C8eXPxrBGzU2OhfCr+uKZm0908rfpAVi+qHG3kqFwqrs2f6QKtGfHXRf7X664dxe7lM6o ilYPUp+MSJYhR3cV9GaTqHDdzVeuo3gjTTyeuZ+X5Mkl9iaauyeWzNzyzQy3kzNDQm+O5S vdrp9jbpVrDPCl2xfDo4n3Xt3WmVy+d089irqetXoz6GdyqSzTvr62KDdU2OXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759031518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+9+2noz/jptmN/B2qik4spXn8QHB8ZAeAYhRQAMg8PE=; b=ZZU6iguIJQ4nHv7q4UeL3XighzoeLEhF2xKkqtlOjCd027Gkd52VzEm+5poHzcmlUnVUuT fnI3FEED1C1HbEWor7UB4Lfum4C4cKpcBLT1Xfoi8+LjTRdhl/V8K9NWlET8WHw2l9183n kiggyn4WMugUyIjdqXgG59iexQpI1KcTvOLWDpwGMUeiHZhaIXwUlSsPQgTQd0ABlucc85 XTtWHxl/HIMJFQ8CbqoxxispOBJlHYfSXHGlPnJEVEtsqv7FgRtjdHrB0PfMBDl7U90hWy JsIq3YEV7k5PKc6Ki/MjB8kEschWq+OneSJ0E4oCt1x6IqOX9zCRWXtLetUP5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759031518; a=rsa-sha256; cv=none; b=Vrj3+NLFapSxjCE6U6qpAqpB/BLcxp9QBSUZFoJtyfnIqR3GovmKg3MKE66/HwWOlP+Kbd dMp+4fHfDpoffysD4baZRl1n+UTMsrePnAw287e9ZodFlkRqwMRcIOwmIAcmNm+I7z7KgU /6NPx4OlsLN6/KSfMY3zeQsUJXThjt1fewJNABstQLYzrFOi4DEwRcG95+ynQ+vpPafG1T Ls959PGxNKW9v0PvpiRb61cqKPmMLEuPnpgM0wl1TLWr/puPHFFObSuXHrdJHy2EfstazI 5NYoIfMwhg37jZ50znTvJ3Kp4pTdGEQLiBXxtpdtXtDa9h1WewZgHAoNMr9ERA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZ9PB5jQnz13fP; Sun, 28 Sep 2025 03:51:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S3pwNt003206; Sun, 28 Sep 2025 03:51:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S3pwY6003203; Sun, 28 Sep 2025 03:51:58 GMT (envelope-from git) Date: Sun, 28 Sep 2025 03:51:58 GMT Message-Id: <202509280351.58S3pwY6003203@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: 31dfc2775421 - stable/15 - blackhole.4: Describe better List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 31dfc27754212f03562f2eeedc42c3939a12bf49 Auto-Submitted: auto-generated The branch stable/15 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=31dfc27754212f03562f2eeedc42c3939a12bf49 commit 31dfc27754212f03562f2eeedc42c3939a12bf49 Author: Alexander Ziaee AuthorDate: 2025-09-23 19:05:18 +0000 Commit: Alexander Ziaee CommitDate: 2025-09-28 03:48:44 +0000 blackhole.4: Describe better Rewrite the document description to fit cleanly on one line and omit crossreferences, to clean up apropos results. MFC after: 3 days Reviewed by: tuexen, cperciva Differential Revision: https://reviews.freebsd.org/D52695 (cherry picked from commit 38f6a4467419f5b2344d184baa454c126e2919a9) --- share/man/man4/blackhole.4 | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/share/man/man4/blackhole.4 b/share/man/man4/blackhole.4 index bb955fd4497d..56b1b52b9212 100644 --- a/share/man/man4/blackhole.4 +++ b/share/man/man4/blackhole.4 @@ -10,15 +10,12 @@ .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" -.Dd May 25, 2024 +.Dd September 23, 2025 .Dt BLACKHOLE 4 .Os .Sh NAME .Nm blackhole -.Nd a -.Xr sysctl 8 -MIB for manipulating behaviour in respect of refused SCTP, TCP, or UDP connection -attempts +.Nd quietly drop refused SCTP, TCP, or UDP connections .Sh SYNOPSIS .Cd sysctl net.inet.sctp.blackhole Ns Op = Ns Brq "0 | 1 | 2" .Cd sysctl net.inet.tcp.blackhole Ns Op = Ns Brq "0 | 1 | 2 | 3" From nobody Sun Sep 28 03:51:59 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZ9PD0q6Wz69Cb9; Sun, 28 Sep 2025 03:52:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZ9PC6Ygdz3hGg; Sun, 28 Sep 2025 03:51:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759031519; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bfF0l3UvJYY/NQanfrRKyBLING9YMmfsiePfAmpvQIg=; b=gc4LTWg9I4NQh1kuxO24qx2jPiAp+jqg61vkPOMziyY8GMYDdx+ykb7WWNqMnMAEmIhIW1 CFhLZuluwW/dcFfvb7md0E+RS3T7PLJ7yUnTK7D5qQYZnd6qyI7bvAsGRRK4ON75zwktvf ZuQivChGtbvKVyRcPnn8+T7GAIyxU5rPm9hT/+VUpQB4BFgzcJJqAl8+NjOXU2JtpOPTY8 IgtvhOTc6tPSkRTPY72aHtUOToLwAUIgiOLoBPR2g7rmsTX+7pUR2qy79if5ElOSQKHJHu Q8lZMYN8I6neTaUCUN/Jod+SSUWNm3lT89aQD9ezY3Yl5ioRXJGjL7DJRXPA6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759031519; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bfF0l3UvJYY/NQanfrRKyBLING9YMmfsiePfAmpvQIg=; b=EItLLADgWNxS478i6l6WklrPzV3e6EI67zxCDTnROHX9k4JQMZEowUtuUpk4+KZvXKSW7S AN1VZf2+beyfsEBMgp47176eWRlQY+V5myo0EZo9JnAxbSXvvAkc4lrI0uSPEQf4AQ4LoA GZ0029MmdVi9+FpbgQv/yN7q+CjfsrxNc/94z+kvAcjK8aNkJ23yItdParPpE/7z3T5KEA gkBsqnkwRndoOS/aCJRPEgF4JSHYKB2Y8rapVxKzowoBBKxf4LdYOPVTEiBQ2t4B8D12aD AX4WmsTb4Ji5GBqRXNYVWUzyaWM5nu0XYWR6ge0YieQ+/AkbaB3ZqJmaAJ37Tg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759031519; a=rsa-sha256; cv=none; b=sl9b2pxroeT/0bFWLfZNjAOzdS7/ZG1KwG6gzl8XNgJFlP7aWUMFUl7BA8V7FmYvCA1KLf lWcKZO3J39oAATiYFytaq99SDOheGtC/v3iz/ZVzSlo8Fmi//GxWk/pJaw356932p6zeBr sQY70wk0ACwwNjzPVXUUS2pnPFN5vaN/MOw2Su5dfNgsMIDtoZ0oDu1CsAdNA78wXhY/YV cDnd/M7Y/75L2ImKmG+5TpLcJmfKrM5jQUNHsRft1OYAEU9q6zRRHvTcXqSgxF+iVgShTY wmLVivbQMFSgdIF6fcfiDZP+EzgGdNxfXN7Y6FYlUqurKzngM5ioPadqRh6gAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZ9PC67Phz13M2; Sun, 28 Sep 2025 03:51:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S3pxPQ003241; Sun, 28 Sep 2025 03:51:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S3pxTC003238; Sun, 28 Sep 2025 03:51:59 GMT (envelope-from git) Date: Sun, 28 Sep 2025 03:51:59 GMT Message-Id: <202509280351.58S3pxTC003238@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: 1db80c5b93d5 - stable/15 - blackhole.4: Describe even better List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 1db80c5b93d5b420bd1389b9f57532ed68284a53 Auto-Submitted: auto-generated The branch stable/15 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=1db80c5b93d5b420bd1389b9f57532ed68284a53 commit 1db80c5b93d5b420bd1389b9f57532ed68284a53 Author: Alexander Ziaee AuthorDate: 2025-09-24 12:22:47 +0000 Commit: Alexander Ziaee CommitDate: 2025-09-28 03:48:45 +0000 blackhole.4: Describe even better Rewrite the document description to omit ficticious "UDP connections". Fixes: 38f6a4467419 (blackhole.4: Describe better) MFC after: 3 days Reviewed by: tuexen Reported by: tuexen, zi Differential Revision: https://reviews.freebsd.org/D52696 (cherry picked from commit f9a71840d8ee0cfff4ec983a589be53648e7017d) --- share/man/man4/blackhole.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/blackhole.4 b/share/man/man4/blackhole.4 index 56b1b52b9212..afa1c37709f3 100644 --- a/share/man/man4/blackhole.4 +++ b/share/man/man4/blackhole.4 @@ -15,7 +15,7 @@ .Os .Sh NAME .Nm blackhole -.Nd quietly drop refused SCTP, TCP, or UDP connections +.Nd quietly respond to refused SCTP, TCP, or UDP packets .Sh SYNOPSIS .Cd sysctl net.inet.sctp.blackhole Ns Op = Ns Brq "0 | 1 | 2" .Cd sysctl net.inet.tcp.blackhole Ns Op = Ns Brq "0 | 1 | 2 | 3" From nobody Sun Sep 28 03:52:00 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZ9PF2Wh3z69CbB; Sun, 28 Sep 2025 03:52:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZ9PF0Z0Pz3hK7; Sun, 28 Sep 2025 03:52:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759031521; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LYUGJuD7eQoI3BfLZcHDdwtDgu/f5maBmI0echiT8QM=; b=XKAsBtK/vzqB9MEEAPnydecWINRIr26Z2x++FyoBpgU4xDfQjHQJcXw15qBlXW8Ih3HxUx jFe7eTIFvVeH4L3yF/w8/nhGPwrMAdklkqwwwVvOgNJmDXyqJzIUIr9KbreRfjoOfcWmYq gRin5+QxzyFx3LomxyE+Wih/X2IyckoX6DoUr2RDWAyTQNIoKeU+lbNdnZTW3/Jb75dsfR srKTHHsWP1f54S1Kdp/Er7c2Ve0f5dK2nRYtkk8NmjZLfOegl55zCZMy91T5afEqYeggir VebyS3xkhoNEarJyUhDznGqCxYbPd/5iO1Y0sE3dzTMgaHTC+YAe3M6m30wlfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759031521; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LYUGJuD7eQoI3BfLZcHDdwtDgu/f5maBmI0echiT8QM=; b=cMQrms/bKePEzgkyq0uys0uiqSKQrvNHIpAC21YVz2O5IyaPocOz/zRoX5jMusWUbAkZ1N rGpyL43AwF2KdeRSdvqmTt25V+8QPXMthZDhC7g/3IsukkkEPzkjFbB5UmdVv7AHnML7J3 f28YDotVGmunstYGjSXBfFI1LOTUNBL2WtCPLnIP1XLF0fdNo0YKSa0qjkdX62ZyLayXVC 0ca/5yrpUzzW8Buyy9BEgqzz1uZff7c1s519Pc1bWdyoApKinIM8E3APmhxAWYmn+pWvCD fXYW9LTavYJimUFizLTjP0XNj7422JN0im+LGyqKo7SWj/ft8rrsL0JG+qpNqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759031521; a=rsa-sha256; cv=none; b=i5II6oh6uSKPshaZR75FgVU/AEMbXph755LzRiLsVhOtIv1LJi7JYq827wwqvx/A2gA0Np OKpmT+PyShRRUBf+/lWEx3ZlqNUct9VZq4oJK+RQO3+87DyIjZUytUZlGNNp6DmTyj9yZO yYnYnraJXX+B8+8ydt3PJh0fh05nklJb0HPtbJeh1zQwZlEIAMAQfzjNAPMiLvkJ+x6Dqp F4u/Gx3zP3zXx0cmsSNFmqnK/I2rtC/F40eZEVv0yDhsm+vMTcp+CpMTO74Zkz5nSc0Y44 QBP+99rEDo8wcSrUtQ41tPDMD+MBh0qTCDOucJl73LoZNCriWbQHx9odlTbPIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZ9PD75j2z13fQ; Sun, 28 Sep 2025 03:52:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S3q02Y003281; Sun, 28 Sep 2025 03:52:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S3q0Jw003278; Sun, 28 Sep 2025 03:52:00 GMT (envelope-from git) Date: Sun, 28 Sep 2025 03:52:00 GMT Message-Id: <202509280352.58S3q0Jw003278@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: 9acd6934bbbc - stable/15 - blackhole.4: Describe even better, take two List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 9acd6934bbbca1b8be85b9e8e029d4bea61fcecd Auto-Submitted: auto-generated The branch stable/15 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=9acd6934bbbca1b8be85b9e8e029d4bea61fcecd commit 9acd6934bbbca1b8be85b9e8e029d4bea61fcecd Author: Alexander Ziaee AuthorDate: 2025-09-24 12:26:14 +0000 Commit: Alexander Ziaee CommitDate: 2025-09-28 03:48:45 +0000 blackhole.4: Describe even better, take two I meant to change this to tuexen's suggestion upon commit but failed. MFC after: 3 days Fixes: 9e02de4ad6c3 (blackhole.4: Describe even better) (cherry picked from commit 1a9ec72022ddce0cacb9aedda3d69aa95cd45ed0) --- share/man/man4/blackhole.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man4/blackhole.4 b/share/man/man4/blackhole.4 index afa1c37709f3..777a38eedc86 100644 --- a/share/man/man4/blackhole.4 +++ b/share/man/man4/blackhole.4 @@ -10,12 +10,12 @@ .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" -.Dd September 23, 2025 +.Dd September 24, 2025 .Dt BLACKHOLE 4 .Os .Sh NAME .Nm blackhole -.Nd quietly respond to refused SCTP, TCP, or UDP packets +.Nd quietly drop refused SCTP, TCP, or UDP packets .Sh SYNOPSIS .Cd sysctl net.inet.sctp.blackhole Ns Op = Ns Brq "0 | 1 | 2" .Cd sysctl net.inet.tcp.blackhole Ns Op = Ns Brq "0 | 1 | 2 | 3" From nobody Sun Sep 28 03:52:02 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZ9PG3mLSz69CxX; Sun, 28 Sep 2025 03:52:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZ9PG1Q10z3hPP; Sun, 28 Sep 2025 03:52:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759031522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d8bRQD4tk1QgM1BMOjZUtZ5s8EGtBLBu4pVWfuDTfx0=; b=IgzRv6A+IRetkKyjsTGjkRBmGDYPOqQjBv4b1jz970kLwHZInrjdMu/EItXtWWIeEEW7Fs Ajmg2b7+xIoDxOW/ATzHi7nlhRRUtV+NC7gV5f7ZbdPpZ1Kwso2cOVKkWUXNm3MfGNiYDm V9KxfBUlCg1O3V8NiKLR8HDLrz0sJ3KjjfuoGOK62DrBewq/wfPrSldngZ2xqA9Jx0UHB9 JVy9tY9o3f4uPsd5dgYufk/bcsTk7PZbsQxOUHzI2aVtsDUYwO1Og3rVCRFrT1kp9rGMeW X/4dVf7k5Hp6oOotg2cH7cul+D0cA1fuKxueH8Q9jT6kVgqb9lrgkfHbw/FBIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759031522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d8bRQD4tk1QgM1BMOjZUtZ5s8EGtBLBu4pVWfuDTfx0=; b=XazhRDZCJ2N4Yfu60/lcOd4kF6kLwWCGFZ6Wr+uUhenXOPdTP5xKZxSRnq59JVX+fIYAEO +th8yf0xRtts/fy4YArgKH9dVfyBIJqa0o/3N4RVJpicIkp6LPEaWMe+v3yDLHhdOQ6TsK VutRUL4wJRHIalmX2PB3Pxfw68JmNz2WOuqK0yTtKn4khW35r1ioYVLKRPpP/0e7QrkyUg tGrjYuPuul89orI2US9VI+89BqPl/t/TgAQCUkNcceHkP2/SHmaaPOQ3hXD4ZD24INOR0T /DaHqd6k6TlV4saXByRD2zKc7Mqwa+Uubsda4oP+I14mPMUQiFivGamjiZ8wJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759031522; a=rsa-sha256; cv=none; b=xAQY456IMQuMa3oCD650voh1GZgu6dldzAMkKLXKKKRbfSdB0cqU7QvLz/XorBlKe/CsLy O8NtlxlwzKWwfLhBc0G9ohi04aaNEq3UABB1OhuZ04Zs37Koy64M8/eaHH6vCP4hP00mka Bfub9KlArV0yXI524OHVn5bR1nm//7xUzCUM7NcXkZXgP4iEjSsowwkrIZ/4Gxak4y2tuD SnY2PNjPrm/JtBzbue+kZEkq3NZihhRq2z7MDw9z7+4m8mmQaRNQ+qhX5uxVlNIQ/ckixM DVwHX16nE8r2hxi3zHmWqcC3iCFgiLt6e/vT0Emhf6/Wcamsa2hskwbmkZ8yzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZ9PG10Fpz13bw; Sun, 28 Sep 2025 03:52:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S3q2US003339; Sun, 28 Sep 2025 03:52:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S3q2e6003328; Sun, 28 Sep 2025 03:52:02 GMT (envelope-from git) Date: Sun, 28 Sep 2025 03:52:02 GMT Message-Id: <202509280352.58S3q2e6003328@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: db14f5c96de9 - stable/15 - build/development.7: System building examples List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: db14f5c96de9d6383b1e7f33b5a7ef659d6581d4 Auto-Submitted: auto-generated The branch stable/15 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=db14f5c96de9d6383b1e7f33b5a7ef659d6581d4 commit db14f5c96de9d6383b1e7f33b5a7ef659d6581d4 Author: Alexander Ziaee AuthorDate: 2025-09-24 20:06:56 +0000 Commit: Alexander Ziaee CommitDate: 2025-09-28 03:49:53 +0000 build/development.7: System building examples Consolidate examples to build the system in the build(7) manual where the details about the syntax involved is documented. Remove them from development(7), instead adding examples for patching the trees. They are left in UPDATING for now, to hopefully be removed eventually. Reduce documentation proliferation and create consistent, maintainable doc about building the system, eventually removing the COMMMON ITEMS section of UPDATING so there is a single source of truth in the cannon and well-integrated location, the in-band system reference manual. + Example 1: Build and upgrade system in place + Example 2: Build and upgrade a custom kernel in place + Example 3: Build and upgrade a single piece of userspace + Example 4: Build and upgrade a loadable kernel module + Example 5: Quickly rebuild a kernel in place + Example 6: Cross-compiling for different architectures The examples section of development(7) now contains examples for applying patches to the trees. There is certainy much more to do here, but it needs to be chunked. MFC after: 3 days Reviewed by: imp (previous version), ivy (previous version) Discussed with: emaste, imp, jhb, ivy Differential Revision: https://reviews.freebsd.org/D48693 (cherry picked from commit 275f61111f43507a01eef064efc660f1fa72b6a9) --- share/man/man7/build.7 | 245 +++++++++++++++++++++++++++++++++++-------- share/man/man7/development.7 | 113 ++++++++------------ 2 files changed, 241 insertions(+), 117 deletions(-) diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index 4022b915c972..27147d5ecb53 100644 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -1,4 +1,4 @@ -.\"- +.\" .\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2000 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 8, 2025 +.Dd September 24, 2025 .Dt BUILD 7 .Os .Sh NAME @@ -36,34 +36,28 @@ system .Sh DESCRIPTION The sources for the .Fx -system and its applications are contained in three different directories, -normally -.Pa /usr/src , -.Pa /usr/doc , -and -.Pa /usr/ports . -These directories may be initially empty or non-existent until updated with -Git -.Po installed from packages with -.Xr pkg 7 -or from -.Xr ports 7 Pc . -Directory -.Pa /usr/src -contains the -.Dq "base system" -sources, which is loosely defined as the things required to rebuild -the system to a useful state. -Directory -.Pa /usr/doc -contains the source for the system documentation, excluding the manual -pages. -Directory -.Pa /usr/ports -contains a tree that provides a consistent interface for building and -installing third party applications. -For more information about the ports build process, see -.Xr ports 7 . +system and its applications are contained in three directories, +normally: +.Bl -tag -width "/usr/ports" +.It Pa /usr/src +.Dq base system , +loosely defined as everything required to build the system +to a useful state +.It Pa /usr/doc +system documentation, excluding manual pages +.It Pa /usr/ports +third-party software, with a consistent interface for building and +installing them; see +.Xr ports 7 +.El +.Pp +These directories may be initially empty or non-existent until updated +with Git +.Po Pa devel/git +from the +.Fx +Ports Collection +.Pc . .Pp The .Xr make 1 @@ -92,7 +86,9 @@ The canonical object directory is described in the documentation for the .Cm buildworld target below. .Pp -The build may be controlled by defining +The +.Nm +may be controlled by defining .Xr make 1 variables described in the .Sx ENVIRONMENT @@ -392,7 +388,7 @@ The target directory under .Pa ${DESTDIR} may be modified using the .Va INSTKERNNAME -and +or .Va KODIR .Xr make 1 variables. @@ -549,6 +545,9 @@ should be set to the name of the package. LLVM toolchain packages use the name llvm. GCC toolchains provide separate packages for each architecture and use the name ${MACHINE_ARCH}-gcc. +.It Va INSTKERNNAME +If set, specify an alternative name to build and install for the various +kernel make targets. .It Va KERNCONF Overrides which kernel to build and install for the various kernel make targets. @@ -583,6 +582,9 @@ then .Va KERNCONF is set to the value of .Va KERNFAST . +.It Va KODIR +If set, +this variable specifies an alternative directory to install the kernel. .It Va LOCAL_DIRS If set, this variable supplies a list of additional directories relative to the root of the source tree to build as part of the @@ -931,26 +933,159 @@ fringe uses that do not have a wide appeal. .It Pa /usr/doc/share/mk/doc.project.mk .It Pa /usr/ports/Mk/bsd.port.mk .It Pa /usr/ports/Mk/bsd.sites.mk -.It Pa /usr/share/examples/etc/make.conf .It Pa /usr/src/Makefile .It Pa /usr/src/Makefile.inc1 +.Xr make 1 +infrastructure for each tree +.It Pa /usr/ports/UPDATING +.It Pa /usr/src/UPDATING +notable changes in each tree +.It Pa /usr/share/examples/etc/make.conf +example +.Xr make.conf 5 +.It Pa /etc/src.conf +src build configuration, see +.Xr src.conf 5 .El .Sh EXAMPLES -For an -.Dq approved -method of updating your system from the latest sources, please see the -.Sx COMMON ITEMS -section in -.Pa src/UPDATING . +This section describes best practices for common situations. +When manual intervention is necessary, it will be mentioned in +.Pa UPDATING . +Make sure you have full backups before proceeding! +.Ss Example 1: Build and upgrade system in place +If using installed drivers such as graphics or virtual machine guest +drivers, check out the +.Xr ports 7 +tree, and specify the drivers in +.Xr src.conf 5 +so they are built and installed automatically after the kernel: +.Bd -literal -offset indent +git clone https://git.FreeBSD.org/ports.git /usr/ports +cat << EOF >> /etc/src.conf +PORTS_MODULES+=graphics/drm-kmod emulators/virtualbox-ose-kmod +EOF +.Ed +.Pp +Check out the CURRENT branch, build it, and install, +overwriting the current system: +.Bd -literal -offset indent +git clone https://git.FreeBSD.org/src.git /usr/src +cd /usr/src +make buildworld buildkernel +make installkernel +shutdown -r now +.Ed .Pp -The following sequence of commands can be used to cross-build the system for -the arm64 (aarch64) architecture on a different host architecture, such as -amd64: +For major version upgrades, boot into single-user mode. +After restarting, install userspace, and merge configurations. +After verifying that you do not need them, delete old files +and libraries: .Bd -literal -offset indent cd /usr/src -make TARGET=arm64 buildworld buildkernel -make TARGET=arm64 DESTDIR=/clients/arm64 installworld installkernel +etcupdate -p +make installworld +etcupdate -B +make delete-old delete-old-libs +shutdown -r now +.Ed +.Ss Example 2: Build and upgrade a custom kernel in place +Create a custom kernel configuration, +.Va MYKERNEL , +by including an existing configuration and using +.Cm device Ns / Ns Cm nodevice +and +.Cm options Ns / Ns Cm nooption +to select and configure components: +.Bd -literal -offset indent +cd /usr/src +cat << EOF > sys/amd64/conf/MYKERNEL +include GENERIC +ident MYKERNEL +nodevice sound +EOF +.Ed +.Pp +After creating the new kernel configuration, build a fresh toolchain, +build the kernel, and install it, moving the old kernel to +.Pa /boot/kernel.old/ : +.Bd -literal -offset indent +make kernel-toolchain +make -DALWAYS_CHECK_MAKE buildkernel KERNCONF=MYKERNEL +make -DALWAYS_CHECK_MAKE installkernel KERNCONF=MYKERNEL +shutdown -r now .Ed +.Pp +To build the kernel to an alternate location, use the +.Va INSTKERNNAME +variable and boot it once to test via +.Xr nextboot 8 : +.Bd -literal -offset indent +make installkernel KERNCONF=MYKERNEL INSTKERNNAME=testkernel +nextboot -k testkernel +shutdown -r now +.Ed +.Ss Example 3: Build and upgrade a single piece of userspace +Rebuild and reinstall a single piece of userspace, in this case +.Xr ls 1 : +.Bd -literal -offset indent +cd /usr/src/bin/ls +make clean all +make install +.Ed +.Ss Example 4: Build and upgrade a loadable kernel module +Rebuild and reinstall a single loadable kernel module, in this case +.Xr sound 4 : +.Bd -literal -offset indent +cd /usr/src/sys/modules/sound +make all install clean cleandepend KMODDIR=/boot/kernel +.Ed +.Ss Example 5: Quickly rebuild a kernel in place +Quickly rebuild and reinstall the kernel, only recompiling the files +changed since last build; note that this will only work if the full +kernel build has been completed in the past, not on a fresh source tree: +.Bd -literal -offset indent +cd /usr/src +make kernel KERNFAST=1 +.Ed +.Ss Example 6: Cross-compiling for different architectures +To rebuild parts of +.Fx +for another CPU architecture, +first prepare your source tree by building the cross-toolchain: +.Bd -literal -offset indent +cd src +make toolchain TARGET_ARCH=aarch64 +.Ed +.Pp +The following sequence of commands can be used to cross-build the system +for the arm64 (aarch64) architecture on a different host architecture, +such as amd64: +.Bd -literal -offset indent +cd /usr/src +make TARGET_ARCH=aarch64 buildworld buildkernel +make TARGET_ARCH=aarch64 DESTDIR=/armclient installworld installkernel +.Ed +.Pp +Afterwards, to build and install a single piece of userspace, use: +.Bd -literal -offset indent +cd src/bin/ls +make buildenv TARGET_ARCH=aarch64 +make clean all install DESTDIR=/armclient +.Ed +.Pp +Likewise, to quickly rebuild and reinstall the kernel, use: +.Bd -literal -offset indent +cd src +make buildenv TARGET_ARCH=aarch64 +make kernel KERNFAST=1 DESTDIR=/armclient +.Ed +.Sh DIAGNOSTICS +.Bl -diag +.It Bad system call (core dumped) +.It rescue/sh check failed, installation aborted +.Pp +The kernel was not updated due to incorrect build procedure. +Study the examples above. .Sh SEE ALSO .Xr cc 1 , .Xr install 1 , @@ -965,7 +1100,7 @@ make TARGET=arm64 DESTDIR=/clients/arm64 installworld installkernel .Xr tests 7 , .Xr config 8 , .Xr etcupdate 8 , -.Xr reboot 8 , +.Xr nextboot 8 , .Xr shutdown 8 .Sh HISTORY The @@ -974,3 +1109,23 @@ manpage first appeared in .Fx 4.3 . .Sh AUTHORS .An Mike W. Meyer Aq Mt mwm@mired.org +.Sh CAVEATS +Old objects can cause obscure build problems; try +.Ql make cleandir cleandir . +.Pp +Environment poisioning can cause obscure build problems; try prefixing +.Xr make 1 +commands with +.Ql env -i +.Pp +When doing a major release upgrade, +booting into single user mode for +.Cm installworld +is required. +.Pp +Updating the boot +.Xr loader 8 +is architecture specific. +Consult +.Xr boot 8 +for your architecture for more details. diff --git a/share/man/man7/development.7 b/share/man/man7/development.7 index 1b875fb14bda..348302a50ee7 100644 --- a/share/man/man7/development.7 +++ b/share/man/man7/development.7 @@ -1,4 +1,4 @@ -.\"- +.\" .\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2018 Edward Tomasz Napierala @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 19, 2025 +.Dd September 24, 2025 .Dt DEVELOPMENT 7 .Os .Sh NAME @@ -75,13 +75,14 @@ There is also a list of public, read-only Git mirrors at: The .Ql main Git branch represents CURRENT; -all changes are first committed to CURRENT and then usually cherry-picked -back to STABLE, which refers to Git branches such as -.Ql stable/13 . +all changes are first committed to CURRENT and then usually +cherry-picked back to STABLE, which refers to Git branches such as +.Ql stable/14 . Every few years a new STABLE is branched from CURRENT, with an incremented major version number. -Releases are then branched off STABLE and numbered with consecutive minor -numbers. +Releases are then branched off STABLE and numbered with consecutive +minor numbers such as +.Ql releng/14.3 .Pp The layout of the source tree is described in its .Pa README.md @@ -107,12 +108,16 @@ such as freebsd-arch@ and freebsd-hackers@: To get your patches integrated into the main .Fx repository use Phabricator; -it is a code review tool that allows other developers to review the changes, -suggest improvements, and, eventually, allows them to pick up the change and -commit it: +it is a code review tool that allows other developers to +review the changes, suggest improvements, and, eventually, +allows them to pick up the change and commit it: .Pp .Lk https://reviews.FreeBSD.org .Pp +Or Github: +.Pp +.Lk https://github.com/freebsd +.Pp To check the latest .Fx build and test status of CURRENT and STABLE branches, @@ -120,77 +125,41 @@ the continuous integration system is at: .Pp .Lk https://ci.FreeBSD.org .Sh FILES -.Bl -compact -tag -width "/usr/src/tools/tools/git/git-arc.sh" +.Bl -tag -compact -width "/usr/ports/devel/freebsd-git-devtools" .It Pa /usr/src/CONTRIBUTING.md .Fx contribution guidelines .It Pa /usr/src/tools/tools/git/git-arc.sh Phabricator review tooling +.It Pa /usr/ports/devel/freebsd-git-devtools +Phabricator review tooling as a port .El .Sh EXAMPLES -Check out the CURRENT branch, build it, and install, overwriting the current -system: -.Bd -literal -offset indent -git clone https://git.FreeBSD.org/src.git src -cd src -make -sj8 buildworld buildkernel installkernel -shutdown -r now -.Ed -.Pp -After reboot: -.Bd -literal -offset indent -cd src -make -j8 installworld -reboot -.Ed -.Pp -Rebuild and reinstall a single piece of userspace, in this -case -.Xr ls 1 : -.Bd -literal -offset indent -cd src/bin/ls -make clean all install -.Ed -.Pp -Rebuild and reinstall a single loadable kernel module, in this case -.Xr sound 4 : -.Bd -literal -offset indent -cd src/sys/modules/sound -make all install clean cleandepend KMODDIR=/boot/kernel -.Ed -.Pp -Quickly rebuild and reinstall the kernel, only recompiling the files -changed since last build; note that this will only work if the full kernel -build has been completed in the past, not on a fresh source tree: -.Bd -literal -offset indent -cd src -make -sj8 kernel KERNFAST=1 -.Ed -.Pp -To rebuild parts of -.Fx -for another CPU architecture, -first prepare your source tree by building the cross-toolchain: -.Bd -literal -offset indent -cd src -make -sj8 toolchain TARGET_ARCH=aarch64 -.Ed -.Pp -Afterwards, to build and install a single piece of userspace, use: -.Bd -literal -offset indent -cd src/bin/ls -make buildenv TARGET_ARCH=aarch64 -make clean all install DESTDIR=/clients/arm -.Ed -.Pp -Likewise, to quickly rebuild and reinstall the kernel, use: -.Bd -literal -offset indent -cd src -make buildenv TARGET_ARCH=aarch64 -make -sj8 kernel KERNFAST=1 DESTDIR=/clients/arm -.Ed +Apply a patch from Github pull #1234, using +.Pa devel/gh : +.Pp +.Dl gh pr checkout 1234 +.Pp +Apply a patch from Phabricator review D1234, using +.Xr git-arc 1 : +.Pp +.Dl git arc patch -c D1234 +.Pp +Apply a manually downloaded +.Xr git-format-patch 1 , +.Pa draft.patch , +from Bugzilla or mail: +.Pp +.Dl git am draft.patch +.Pp +Apply a manually downloaded patch, +.Pa draft.diff , +from Bugzilla or mail: +.Pp +.Dl git apply draft.diff .Sh SEE ALSO .Xr git 1 , +.Xr git-arc 1 , .Xr witness 4 , .Xr build 7 , .Xr hier 7 , From nobody Sun Sep 28 03:52:03 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZ9PH4jwDz69CbL; Sun, 28 Sep 2025 03:52:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZ9PH1xgRz3hMP; Sun, 28 Sep 2025 03:52:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759031523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6YeANoJWNcD2kSyTWzYh7u8FIfjUypIcUq8DpB9x67I=; b=SBXjVJ1P4It/VkGDRC0gil10iRdid82v3LP/wEeZGgGk4Ljyfe1BZhcTiljuwTL0Cozmho l328SFnWC4OZKAo7w0VOjYyvqmgd6tcVZfYO5EF9fwyOEbExht3m4BTogPLL7rfoI2mDTr uDLY+uMQU626l0JZhGt1CkdkzmiX37b96aDasndNe+MpDkheMD7qzAHXY5NpFkNDSfy1HT Dknqc/GDnmxmwoASbA3XYz5I9RWVHHBTjvW5e30RUykbMeCxUyd8iviHgvK6daaqSzZEXg o4h9U9fnowCAofjfY4g/TcvjI9I9BJ2QPanozOpYyWvYR4MF7nd3R0X0bu9lYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759031523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6YeANoJWNcD2kSyTWzYh7u8FIfjUypIcUq8DpB9x67I=; b=MIFyov0vJw6ih6QgyqzkmsiEVO/0d24VMwukHOQozZbLMaZ7jwUY1c3pxTbkUlCjllmZ/L TNWEss3XP3u5/cmrvzXsNM8MQ3TN/r/unSx+OoldZJHEH/N6/kBAwxKLXCcgrfxFRml2bM TDLyPNFTnDrIKwV2ige4I8kv+xhFd/ypW2cTRq2CFrIvNGPUb/kyYaLCF28vg9jWNghb70 K62CcNlbQjGIvg9Wc2ZEBhM74LFyJIzWZeIFdIrKIAztZ91Dv2bGMl2Oko9nVoQUhdoKCQ zo8fFn45DnFt+DJNVVlWMX+F/QGUD+mcHN8XRoY2Dl0cWaHS1yC58niKWFFbPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759031523; a=rsa-sha256; cv=none; b=o8SbP6g6l4QudzVc4HKge/3g0iAir55APth6Bqj/nrCqFuNZGmfms+IlKbjCsLbdL0vKBI GjG+fvzIis/tOCkhku3TG+bSNBcCPslqusOlQrzfubjYmXsldk18lbQlLUJoK5oG2DnwsW X4QPZSNiArhfSvlPHX3j6azB8gPuIQF1psod2adkiejmDPH0GnTRKrhItfMwcrdMg7LaKA V+811oIZHWVPmGY0gaQCGiu8zGe24k14PugGj7otzMQYjysidTKygN6YtOzRXyOgAp1yax 0b5VPss1eaGDTAvAFGO+zn/W1segjnCoq3Wrcot7Ii938+3HjvlyAnkCBfgqhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZ9PH1VmTz135k; Sun, 28 Sep 2025 03:52:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S3q3sg004489; Sun, 28 Sep 2025 03:52:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S3q3jC004475; Sun, 28 Sep 2025 03:52:03 GMT (envelope-from git) Date: Sun, 28 Sep 2025 03:52:03 GMT Message-Id: <202509280352.58S3q3jC004475@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: a32d033e4913 - stable/15 - kerneldocs: Update latex package List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a32d033e4913c71f4cda2be353996b77782029b9 Auto-Submitted: auto-generated The branch stable/15 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=a32d033e4913c71f4cda2be353996b77782029b9 commit a32d033e4913c71f4cda2be353996b77782029b9 Author: Minsoo Choo AuthorDate: 2025-09-25 02:12:37 +0000 Commit: Alexander Ziaee CommitDate: 2025-09-28 03:49:57 +0000 kerneldocs: Update latex package MFC after: 3 days Reviewed by: ziaee Signed-off-by: Minsoo Choo Closes: https://github.com/freebsd/freebsd-src/pull/1853 (cherry picked from commit cd813380ad832a0bfa5b99f22012092cc9d373b1) --- tools/kerneldoc/subsys/README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/kerneldoc/subsys/README b/tools/kerneldoc/subsys/README index 6679d5cb9055..2ad9a00625ae 100644 --- a/tools/kerneldoc/subsys/README +++ b/tools/kerneldoc/subsys/README @@ -20,12 +20,12 @@ The following environment variables can be used in the Doxyfile: For the PDF generation you may have to change some limits in the latex configuration (the build may fail and an error about e.g. "pool size" is -shown), for print/teTeX this is done in +shown), for print/texlive-full this is done in /usr/local/share/texmf/web2c/texmf.cnf Programs needed to generate the API docs: - devel/doxygen - - print/teTeX + - print/texlive-full - graphics/graphviz -- From nobody Sun Sep 28 03:52:04 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZ9PJ6NJ2z69Crs; Sun, 28 Sep 2025 03:52:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZ9PJ3VL5z3hKq; Sun, 28 Sep 2025 03:52:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759031524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eJ0Cbn+bK9+CFdOSpF4CaFNWVoUidOwJd4z7muzPGuw=; b=mKSDmyznK0BVTuuZNFo8x4f+nQvmEs7X69Mk10lbuhFLy2eifQjb/BmgpMa8je0ikGTtX0 WOUfrv4HDdy9ozm8Yelr6VikYDIDEsrxhMu+kr2FbguYuzGyE66kVSf2smTbPD1pWNSF/K Iow8bQWbKBWyJEE3/1DiV6lZTTKHcKW/9IwQwdHZC4BAZ6xWD8EIBlD3i/HHOTEIdFWy1z QdtPZ+H/0rTJ+iP5ME2lkQtXlFxOf12Fiqtw1ka+PumoXrSQ4quhl61WWQTNv59xB1t7KO Mv8LpgnZg1/IsOWTr8qZFUdzuS2dFF3+lz3YeeTNAPYgj04n5oMgI4+vslzkIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759031524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eJ0Cbn+bK9+CFdOSpF4CaFNWVoUidOwJd4z7muzPGuw=; b=hRtK689+iWCuK6qICsarlA5YPmrxzbw3AhtiM6ZfEGqnFB25N8sWvrtA6u1+m9LcR2Gghb HRP9fsyVZ/U+lEQ4JQWwgmz34lLeEeeyObca2qKKKjEhadbrWTY5PcMY3ijBKHi8fIA959 KyWZWWpo+KaPF7LUElxQPjnTJIXzn56tPdzHfuh34/VIZtll3S9flQbJQxBFb4wtnKbwLw BYEAqblhO7DTKcaV+DMWHbj8ZjMDf3dMYBf0X58xB+/EWh3yNzSyBtzSOYGIOQc5hoMzt5 VpPEFAuzlA2RoXWabNddfDNwl8CXjd4DyofO3CMEIO6ERrCMttIVMHCHKoBGag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759031524; a=rsa-sha256; cv=none; b=jEShRSx+39FHSaMolg1t5RZqAnNcOQVy6LCjREGFHWEwyRmgIdowHclcFx1I7cCRcnX1qq 2EqQM3gmR7oy3eU1B3cGalF7oFK2HHRbrdToPuqBjT2TvFceQ2Rc5+l8ueNN5cA/Pjotvf zecbGno8LXaSukJF0jSUX4EIIvwOLNgjQhZHktoXN6jbaqUYxPYbDeE/EKHwH+ajflkiQG IjmfAN9weARc8lIS0Mcc9gkU0V0r2gMMY/jU/2ZXpu0FAKGvxKdl6j8O9+qyRbqP8PbFjB EwQeG2/Qr2+bK+gVkq+FhS+qId+nPxa+mOVWDsFgDp77X1qBbG81iTSP84vAEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZ9PJ2vbpz13BN; Sun, 28 Sep 2025 03:52:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S3q4At004681; Sun, 28 Sep 2025 03:52:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S3q4An004678; Sun, 28 Sep 2025 03:52:04 GMT (envelope-from git) Date: Sun, 28 Sep 2025 03:52:04 GMT Message-Id: <202509280352.58S3q4An004678@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: b15ef791f91f - stable/15 - build.7: Improve building pkgbase List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b15ef791f91fbbf99a234df85011bed1c915b707 Auto-Submitted: auto-generated The branch stable/15 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=b15ef791f91fbbf99a234df85011bed1c915b707 commit b15ef791f91fbbf99a234df85011bed1c915b707 Author: Alexander Ziaee AuthorDate: 2025-09-25 12:19:52 +0000 Commit: Alexander Ziaee CommitDate: 2025-09-28 03:49:58 +0000 build.7: Improve building pkgbase The packages target was previously listed under kernel, move it to the general source make targets listing. Add the update-packages target as well. Adjust the release building targets with package in their names to clarify they are unrelated to pkgbase. Add the OBJROOT and REPODIR variables to ENVIRONMENT. MFC after: 3 days Reviewed by: ivy, markj (both previous versions) Suggestions by: des, emaste, ivy, kevans, markj Fixes: 1d26746cfd4a (Document the packages target) Fixes: 0ac8aa55da1c (Add incremental packages) Fixes: 26490d9b74f0 (allow update-packages for first) Differential Revision: https://reviews.freebsd.org/D50289 (cherry picked from commit 7e8fb7756c3ed89a2141b923e6da1b6fd96f509c) --- share/man/man7/build.7 | 75 ++++++++++++++++++++++++++++++++++---------------- 1 file changed, 51 insertions(+), 24 deletions(-) diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index 27147d5ecb53..fa2b6c32fda4 100644 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 24, 2025 +.Dd September 25, 2025 .Dt BUILD 7 .Os .Sh NAME @@ -264,13 +264,31 @@ defaults to and .Sy TARGET_ARCH must be defined. +.It Cm packages +Create a +.Xr freebsd-base 7 +package repository containing packages that can be +used to install or upgrade the base system. +The repository is created in the object directory, under +.Pa ${REPODIR}/${PKG_ABI} +where +.Ev REPODIR +is the base directory where the repository will be created, and +.Va PKG_ABI +is the +.Xr pkg 7 +ABI for the build target, for example, +.Pa /usr/obj/${SRCDIR}/repo/FreeBSD:15:amd64 . .It Cm packageworld Archive the results of .Cm distributeworld , placing the results in .Va DISTDIR . -This target is used while building a release; see -.Xr release 7 . +This target is used while building a +.Xr release 7 +and is unrelated to building +.Xr freebsd-base 7 +packages. .It Cm installworld Install everything built by a preceding .Cm buildworld @@ -351,6 +369,14 @@ and .Va XDDIR defaults to .Pa ${TARGET_ARCH}-freebsd . +.It Cm update-packages +Create or update the +.Xr freebsd-base 7 +package repository for the base system. +If an old repository is being updated, +then packages whose contents have not changed since the previous version +will be copied into the new repository to avoid needless updating of the +version number. .It Cm xdev-build Builds for the .Cm xdev @@ -397,26 +423,16 @@ Install the kernel to the directory .Pa ${DISTDIR}/kernel/boot/kernel . This target is used while building a release; see .Xr release 7 . -.It Cm packages -Create a -.Xr pkg 7 -repository containing packages that can be used to create or upgrade an -installation of the base system. -The output repository is placed in the object directory, under -.Pa repo/${PKG_ABI} -where -.Va PKG_ABI -is the -.Xr pkg 7 -ABI for the build target, for example, -.Pa /usr/obj/${SRCDIR}/repo/FreeBSD:15:amd64 . .It Cm packagekernel Archive the results of .Cm distributekernel , placing the results in .Va DISTDIR . -This target is used while building a release; see -.Xr release 7 . +This target is used while building a +.Xr release 7 +and is unrelated to building +.Xr freebsd-base 7 +packages. .It Cm kernel Equivalent to .Cm buildkernel @@ -644,11 +660,15 @@ If set, this variable supplies a list of additional directories relative to the root of the source tree to build as part of the .Cm cross-tools target. +.It Va OBJROOT +The object directory root is defined as +.Pa ${OBJDIR}/${SRCDIR}/ . +See +.Pa share/mk/src.sys.obj.mk . .It Va PKG_FORMAT Specify a package compression format when building -.Pa src -into -.Cm packages . +.Xr freebsd-base 7 +packages. Default: .Ql tzst . Consider using @@ -666,9 +686,8 @@ and .Cm installkernel process. This is currently incompatible with building -.Pa src -into -.Cm packages . +.Xr freebsd-base 7 +packages. Each port must be specified as .Ar category Ns Li / Ns Ar port Ns Op Li @ Ns Ar flavor , e.g. @@ -697,6 +716,13 @@ Specify a file to override the default The src.conf file controls the components to build. See .Xr src.conf 5 +.It Va REPODIR +The root directory used to create the package repository for building +.Xr packges 7 . +Defaults to +.Pa ${OBJROOT}/repo/ . +This can also be set in +.Xr src-env.conf 5 . .It Va STRIPBIN Command to use at install time when stripping binaries. Be sure to add any additional tools required to run @@ -1094,6 +1120,7 @@ Study the examples above. .Xr src.conf 5 , .Xr arch 7 , .Xr development 7 , +.Xr freebsd-base 7 , .Xr pkg 7 , .Xr ports 7 , .Xr release 7 , From nobody Sun Sep 28 09:09:30 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZJRZ3hdHz68MBT; Sun, 28 Sep 2025 09:09:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZJRZ2tvDz3F6X; Sun, 28 Sep 2025 09:09:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759050570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ueZ0dvbUReiLvn+qt/ffJnKg3gvjktAGXw2MtlIyFGA=; b=l0fZnuop3T3l6GBNNOcRko6MdtvMKF2Cod7BgHYtBZuUWebv23yT1QVtOClalAgwY4h1Y1 wn/m9LUjpokIVlVpK3+uAInp/j7x40k+CBEr9j0Fot4lQsfn8PUCTMh44+vXoz3C043byV +Ja0N4tYqPvAmyGVTwW6EbIs6bRUAbqB7w9z2wvox4afz6B3rsSBpWX5bQWpTgQqFBTH08 SMpm+1XdqxCFUycPLh4KEhEjx41TWVkdwucv1IuFrIslsEFiwmcARSD8T8Vbzbxmcu+YRo uVCKdB6zHM/+vWyOIwlZ2aXOkXVFNZ8hTx3ItXGSOvSIbfUc7rswbqBWBfb1zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759050570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ueZ0dvbUReiLvn+qt/ffJnKg3gvjktAGXw2MtlIyFGA=; b=nnMUX8gH8961aT2TbHzpNnGDOdesMl6CreufWshq6jldJrwfZHWgUZfupPG3jKip3yePmv PAAcoSLgxvSGmUok/DZathR0liQqWECEO9DtZrM3kxsaKzhX8rkT+luKbxxsOzBWLgWcw6 8J5eL6xE5NDCjktsasARMDk569+qgi6lZHhRMKg2CBglcmIANEDbuuPRRCWjkzm8dAXHSi 33j3VrOz4Y2FG5v7wHEOTyTfKEElZph0AE7f8gRvlihaZF6Y7A+Lk1aiTBCGS+aTdnIRtg wHnKmV+OkPqmUSrP8wkk2/LzSg3ASXFQGBegBpYuyLBMucpcp9c1+KeOLoxCGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759050570; a=rsa-sha256; cv=none; b=waSv3/croi0K8OIMmSHDys8ksQSWsbjHc6qhkEyWneKKrUGUKrnW1US3VZaz6S6R0eYe4q TbEcGVa033A8L4Gt2p/8EPTAcVRO9Q3nQeN+4nBT2t3ye7oMUaahbrHasdBBKJdkXpIppu DliV/DqXFNzy+99pVAG7kkuEebCdhrEMnq+7nlfRhJoQKTqdqRTQSCOymW5mmXVZVI4TRh xuaJ2cCe0TzBIhHMEj2fat2LZfyMnw2Jgfv3NtG2P4kNWU3pPjs9ClfJT4nu0IyvdHnCw+ Cz+NyQYdGr2Tg8I6rfBKfpBpcg0Pi6akE8ma/nO9fxiJ6sUwD5WVTYONsXhXgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZJRZ2Qssz1CJd; Sun, 28 Sep 2025 09:09:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S99Uck087841; Sun, 28 Sep 2025 09:09:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S99Uom087839; Sun, 28 Sep 2025 09:09:30 GMT (envelope-from git) Date: Sun, 28 Sep 2025 09:09:30 GMT Message-Id: <202509280909.58S99Uom087839@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: cfda7828e33d - stable/15 - tcp: whitespace cleanup List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: cfda7828e33d49b28795cf3c894086fa965db9f7 Auto-Submitted: auto-generated The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=cfda7828e33d49b28795cf3c894086fa965db9f7 commit cfda7828e33d49b28795cf3c894086fa965db9f7 Author: Michael Tuexen AuthorDate: 2025-09-24 08:51:06 +0000 Commit: Michael Tuexen CommitDate: 2025-09-28 09:09:11 +0000 tcp: whitespace cleanup No functional change intended. Sponsored by: Netflix, Inc. (cherry picked from commit 40417930f6ba50f61990fb995dd071c6fd42d080) --- sys/netinet/tcp_syncache.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_syncache.h b/sys/netinet/tcp_syncache.h index 55e062e35a54..a336571f12c9 100644 --- a/sys/netinet/tcp_syncache.h +++ b/sys/netinet/tcp_syncache.h @@ -50,7 +50,7 @@ int syncache_pcblist(struct sysctl_req *); struct syncache { TAILQ_ENTRY(syncache) sc_hash; - struct in_conninfo sc_inc; /* addresses */ + struct in_conninfo sc_inc; /* addresses */ int sc_rxttime; /* retransmit time */ u_int16_t sc_rxmits; /* retransmit counter */ u_int16_t sc_port; /* remote UDP encaps port */ @@ -59,7 +59,7 @@ struct syncache { u_int32_t sc_flowlabel; /* IPv6 flowlabel */ tcp_seq sc_irs; /* seq from peer */ tcp_seq sc_iss; /* our ISS */ - struct mbuf *sc_ipopts; /* source route */ + struct mbuf *sc_ipopts; /* source route */ u_int16_t sc_peer_mss; /* peer's MSS */ u_int16_t sc_wnd; /* advertised window */ u_int8_t sc_ip_ttl; /* TTL / Hop Limit */ From nobody Sun Sep 28 09:10:12 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZJSN2s5kz68MRy; Sun, 28 Sep 2025 09:10:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZJSN1SJlz3FYp; Sun, 28 Sep 2025 09:10:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759050612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=66DDieLEdirLOlzYs7ljq6D2Zfm6Es1q9fC1fJt0A+U=; b=dAoANflvfxPxXvB8cqkt+0mnF7B0t+oHJ0L2+Xlx/KQZVDIb3Mi7I9yBbTersBDTe6sx8Y 1cVUBF1SHOo//0WuNit0oBW+JkQKav91jMv62ewHx9m64gsVqqDfoWKFsXc/9mQQLqHRA3 slUgR6yhBbCYAS5HJVPvnDLfmforZUXVIdjoj0bMao1Ti9nHpWnYQPR6D/rlBHYz/r1IeA /m5wBz1ddbSLBX4xNL4vPNP3gXXMnYxX1v4639j1dTPTsfpAgds7adj6e2bWPbhBQaw7+m f5Jf5FLb22gcU+6xfsEj033VI9xRQcBb2kYkURx3Ql4VH+ShUyEoTGFUfMhGuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759050612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=66DDieLEdirLOlzYs7ljq6D2Zfm6Es1q9fC1fJt0A+U=; b=X/BubfX8Fcy74O88inxL2SZYd+QfBWbT10iLZyOb2+dI6Sm6DiRiWjwPN9EeZRFSmyEjdX kn62arpe4md62QZ+ViQpE8gnWyGRvu1Jtwye/tKrXVfy9d5AADnG2iMuqO05tnY8Ds97q8 NHxWQ4VCdlJjBRj/D7BANrACSAQezrKEuB7PUZIEMVk/Gvbv+FDY/NdyVXHfHHNBIejSsK Vxx7LyF38cYBXB9bJoTLbiiCiHxbwS2+Sghs72zSZ7f4ZkAulxh7Cn4QaVKryAx7HyUIG3 s/x6x/J4MxZPNyb/37qoVLtMYuM5DqhkD2NyDEBKpjVsy/8fYcMTFGI8lXCxmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759050612; a=rsa-sha256; cv=none; b=uLqz3Yu88GhcuUgGGRV6rI/7l0G5ZZv6S4he1hF7OQg4tt5/LJ7JPMofN6tbuQ+qf6gdhB 8HlP84XR8e20iJvWKBJA85zJYKKhULRswqplP5gaYXC/EFBn/UO9Z43a7rLkZcdLIkSrK9 92FfmuVSsApFacNB4ZFb/Et42bUswxBeXTmUauSHGRnaMtwXpSaUn2bM/HBDJWaUeWlGrV kZ7JPBiS4z1COBHoqLfYTruRSJrk2sr59GOjostuEMQfvtXC70lwiTwkRQfuD8Sj+2J4/V YFME21OPWUvJr6mhs+RSPrKRL/RYGWUXdHVdN1rSlLopg76bUM32nIXCnykFdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZJSN0wLGz1CTg; Sun, 28 Sep 2025 09:10:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S9ACvE093374; Sun, 28 Sep 2025 09:10:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S9AC5J093369; Sun, 28 Sep 2025 09:10:12 GMT (envelope-from git) Date: Sun, 28 Sep 2025 09:10:12 GMT Message-Id: <202509280910.58S9AC5J093369@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 125e23572c71 - stable/15 - tcp: refactor tcp_send_challenge_ack() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 125e23572c7151dd27e89a035f3b4db4fb32b44c Auto-Submitted: auto-generated The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=125e23572c7151dd27e89a035f3b4db4fb32b44c commit 125e23572c7151dd27e89a035f3b4db4fb32b44c Author: Michael Tuexen AuthorDate: 2025-09-25 01:40:33 +0000 Commit: Michael Tuexen CommitDate: 2025-09-28 09:10:00 +0000 tcp: refactor tcp_send_challenge_ack() Refactor tcp_send_challenge_ack() such that the logic checking whether a challenge ACK is sent or not is available in the separate function tcp_challenge_ack_check(). This new function will also be used for sending challenge ACKs in the SYN-cache code, which will be added in upcoming commits. No functional change intended. Reviewed by: cc, Nick Banks, Peter Lei Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D52717 (cherry picked from commit db37256ce5437e6c667a537afff0fd9f59576514) --- sys/netinet/tcp_subr.c | 42 +++++++++++++++++++++++++++--------------- sys/netinet/tcp_var.h | 1 + 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index cc83a21773a8..c817c79881d6 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2148,14 +2148,16 @@ tcp_respond(struct tcpcb *tp, void *ipgen, struct tcphdr *th, struct mbuf *m, } /* - * Send a challenge ack (no data, no SACK option), but not more than - * V_tcp_ack_war_cnt per V_tcp_ack_war_time_window (per TCP connection). + * Check that no more than V_tcp_ack_war_cnt per V_tcp_ack_war_time_window + * are sent. *epoch_end is the end of the current epoch and is updated, if the + * current epoch ended in the past. *ack_cnt is the counter used during the + * current epoch. It might be reset and incremented. + * The function returns true if a challenge ACK should be sent. */ -void -tcp_send_challenge_ack(struct tcpcb *tp, struct tcphdr *th, struct mbuf *m) +bool +tcp_challenge_ack_check(sbintime_t *epoch_end, uint32_t *ack_cnt) { sbintime_t now; - bool send_challenge_ack; /* * The sending of a challenge ACK could be triggered by a blind attacker @@ -2164,29 +2166,39 @@ tcp_send_challenge_ack(struct tcpcb *tp, struct tcphdr *th, struct mbuf *m) * would have guessed wrongly. */ (void)badport_bandlim(BANDLIM_TCP_RST); + if (V_tcp_ack_war_time_window == 0 || V_tcp_ack_war_cnt == 0) { /* ACK war protection is disabled. */ - send_challenge_ack = true; + return (true); } else { /* Start new epoch, if the previous one is already over. */ now = getsbinuptime(); - if (tp->t_challenge_ack_end < now) { - tp->t_challenge_ack_cnt = 0; - tp->t_challenge_ack_end = now + - V_tcp_ack_war_time_window * SBT_1MS; + if (*epoch_end < now) { + *ack_cnt = 0; + *epoch_end = now + V_tcp_ack_war_time_window * SBT_1MS; } /* * Send a challenge ACK, if less than tcp_ack_war_cnt have been * sent in the current epoch. */ - if (tp->t_challenge_ack_cnt < V_tcp_ack_war_cnt) { - send_challenge_ack = true; - tp->t_challenge_ack_cnt++; + if (*ack_cnt < V_tcp_ack_war_cnt) { + (*ack_cnt)++; + return (true); } else { - send_challenge_ack = false; + return (false); } } - if (send_challenge_ack) { +} + +/* + * Send a challenge ack (no data, no SACK option), but not more than + * V_tcp_ack_war_cnt per V_tcp_ack_war_time_window (per TCP connection). + */ +void +tcp_send_challenge_ack(struct tcpcb *tp, struct tcphdr *th, struct mbuf *m) +{ + if (tcp_challenge_ack_check(&tp->t_challenge_ack_end, + &tp->t_challenge_ack_cnt)) { tcp_respond(tp, mtod(m, void *), th, m, tp->rcv_nxt, tp->snd_nxt, TH_ACK); tp->last_ack_sent = tp->rcv_nxt; diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 53856bae9a66..c3be95c80798 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -1462,6 +1462,7 @@ int tcp_default_output(struct tcpcb *); void tcp_state_change(struct tcpcb *, int); void tcp_respond(struct tcpcb *, void *, struct tcphdr *, struct mbuf *, tcp_seq, tcp_seq, uint16_t); +bool tcp_challenge_ack_check(sbintime_t *, uint32_t *); void tcp_send_challenge_ack(struct tcpcb *, struct tcphdr *, struct mbuf *); bool tcp_twcheck(struct inpcb *, struct tcpopt *, struct tcphdr *, struct mbuf *, int); From nobody Sun Sep 28 09:16:39 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZJbq2pd2z68MrV; Sun, 28 Sep 2025 09:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZJbq2DGLz3GW4; Sun, 28 Sep 2025 09:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759050999; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hZ3zJiVzCJtTk2107LneUObl3ou52UpZfx7WG+Zltqo=; b=CjzEBcbhAX4CYnQ8HU24TFJ7gVduCtl0pi+8CZksKO6Razz2n7PRHJIvpFv/pSVLiaRd89 4Qk7t4gtsAw4C/aPKIl9tPDf54wMAPd5+fz43RJrHtrCtX/kJogAL9L3SHuACkxU1G7i9C 7hLQ5WzdeIBBgIyc8SgNAF+1HBowpKE7mzzPu3iBqQAEPBo4SAOwKG7AfMxg3Wj4Z/DMp+ nna91CMCPv2C0N+RB1dHkr+Of0aV6okclgwhnPFwMpPkW+0UpjqQHocPfvjFvaFpXRLXFS i/t1V0rV8K0y6mg5+pS3no66fmDmhv2EqxkIcjGwv5FW3L+pLrPUUyRPSQgkRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759050999; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hZ3zJiVzCJtTk2107LneUObl3ou52UpZfx7WG+Zltqo=; b=DkyMiZ9G69cYj3qaxigz/XOZxo1rYKKXaWZ3gzD60pK2qpqAiiH1AgBII7OZkPtItUVG+6 jcvvhmuFnz+tTiBAppEKWuE8kU67sc5P/pIZTIoGtCwxEbED872arnyKDIbs4q9YpW/bTA GTFTr2hzEBOkzPK1PkXHtut9JtebEMPv0GtH+MY1NnGk5/S7fppPXZfYwsHckY5RqWbSxu aQGaH+xbPm9DuDjRw8CZwKQj4pN45+nIC8DaTmTbjPL3i/yVLP9pmOgWVk374dlgbBhMcu f+uzQBQQWbCOTkk61hpiYuzCtm4fk0hp6ByJ1K/U6ugHJGssPbOIDIuTil60Mw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759050999; a=rsa-sha256; cv=none; b=vyir9Rv2f+p9jHXXtPoCawAbbhXpLJBsV1u94HMhWOtN5VPVqzOsAUtZaaQr3+lhlC30Wl vVqy54nJoItWzj4QxIlmGJ7LRlInZ6QiSlGuY0FXp3NuuaM8NYYDi7PG3iFfccMWNU3r4a GqANY3+fLGaplCFE4mhBexwKlT3ZIA2r2F4YEdc11zEOWplC3nxgOLdzYZig8/rSyc6Cbc WHwltFuZQ0NVfpYJoQvqBHRLBXETvTWaBSQaFLngpvfj9DMwBoo3KTMcjw03BgJrnr2QLI dGGqEai9u+MrVCabDLDLXLQgypTjIoKO/7HLvgwNElBYnSPYBCW4PA/Lu/1CPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZJbq1fk5z1CGQ; Sun, 28 Sep 2025 09:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S9GdG7006960; Sun, 28 Sep 2025 09:16:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S9GdfI006957; Sun, 28 Sep 2025 09:16:39 GMT (envelope-from git) Date: Sun, 28 Sep 2025 09:16:39 GMT Message-Id: <202509280916.58S9GdfI006957@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 994b3f20900d - stable/14 - tcp: whitespace cleanup List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 994b3f20900d59fca8935525f4007de1378b2918 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=994b3f20900d59fca8935525f4007de1378b2918 commit 994b3f20900d59fca8935525f4007de1378b2918 Author: Michael Tuexen AuthorDate: 2025-09-24 08:51:06 +0000 Commit: Michael Tuexen CommitDate: 2025-09-28 09:16:20 +0000 tcp: whitespace cleanup No functional change intended. Sponsored by: Netflix, Inc. (cherry picked from commit 40417930f6ba50f61990fb995dd071c6fd42d080) --- sys/netinet/tcp_syncache.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_syncache.h b/sys/netinet/tcp_syncache.h index 878b1ddabc7e..219cddee0b1d 100644 --- a/sys/netinet/tcp_syncache.h +++ b/sys/netinet/tcp_syncache.h @@ -52,7 +52,7 @@ int syncache_pcblist(struct sysctl_req *); struct syncache { TAILQ_ENTRY(syncache) sc_hash; - struct in_conninfo sc_inc; /* addresses */ + struct in_conninfo sc_inc; /* addresses */ int sc_rxttime; /* retransmit time */ u_int16_t sc_rxmits; /* retransmit counter */ u_int16_t sc_port; /* remote UDP encaps port */ @@ -61,7 +61,7 @@ struct syncache { u_int32_t sc_flowlabel; /* IPv6 flowlabel */ tcp_seq sc_irs; /* seq from peer */ tcp_seq sc_iss; /* our ISS */ - struct mbuf *sc_ipopts; /* source route */ + struct mbuf *sc_ipopts; /* source route */ u_int16_t sc_peer_mss; /* peer's MSS */ u_int16_t sc_wnd; /* advertised window */ u_int8_t sc_ip_ttl; /* TTL / Hop Limit */ From nobody Sun Sep 28 09:18:09 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZJdY50ggz68MWr; Sun, 28 Sep 2025 09:18:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZJdY4Glbz3GkJ; Sun, 28 Sep 2025 09:18:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759051089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9tbnoDCk62LmgNGovm67tuFo9JIQ291cxL5I+JaOqs4=; b=vSOExozbNCCtUcu+YlcTgI+Pu0yWXWkf9tiK2hwqKY0/cOYpqmEBTHSG09SrebqlbchBOL +WZsX+XtbJjOldoS4Tfyn7dw5hwN4gHxiUC+oRMX4RCECsdkItsaF1YCjhE+WeHhBtiWVN i+PvALbIDonLqqTaIlJbO/m/KawGig/6pjmZ4mDBR+21ndu/Prdb+mnT56bVdh8NetZ8tj X7DQbAeTt0R3a70lAGL6dgSN9H1+WMJvDSiBIQ/nS4lk7z7Z4qMQEwH0R3Q985/mqrdLQN SuDIyVCkg/vdFUx/XCqtV5UJw46UFUOVaB7a7t3uT9osc9rgetEbH91OLMUs5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759051089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9tbnoDCk62LmgNGovm67tuFo9JIQ291cxL5I+JaOqs4=; b=RkxAGs2SL4RN29XvVzCbmqrYOsc+BYw47TQZo9NXni/zofqs5vKq8zvNDFb6sUXpuCZOJx hDPdzR4Qz5Diug15nKvKGRI56mPxNGTW7vNlLbqWogVSlWZ/rqxdtiKrENZse2cSA490w6 xg6gl1DqbqI+MrD7YekDJ1C+0TRXD7TJ232iMzHGt5UuW0vWxWy9fzWOL6/iQClqAOrhtL 5GVF/PusYTWC6CymlHj4AR59GVeynF52+NYgZV+1Rbs0gCZykBy8GD+hSiecg6lCbdLlYQ vDzDJCNGqCtvMR9xEw+YQdvJBWQT7xiNEyreQ9Vu5DuhIKPfvalT9md6QxrMpw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759051089; a=rsa-sha256; cv=none; b=m9TjDfbGAwNSXYFrAvqyBzQNp4Zlgptdc5JROtVZVWfoflY7+jf3eFzA6IZvf1zMezKctF Ka4sKzA1PhdsuZfQh3Ai50knkDMX6GnAqsJF7aiwZOVDvmRv6CPnNyYOcRQCHqXrdY1tRM RSbzfvhG8E1Jmd3RgXPMVykgWS3Eg6rUP4DnvanMo2m7X3VBnEVl9Zu+TOR5Wfxjl90MKb mE3xq7dNvvIpebqhZna2Z/4SH2Q58OO75MxUR3zd0K2RotkLCVBRaX+aBOCnyqSll/iL7k +TsEhH230M1ze4Ck6j2moya8Xu8Kd0+GLsdkw8CP8AhXgl6HEorlzEsiUiwqcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZJdY3qGGz1CQN; Sun, 28 Sep 2025 09:18:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S9I93Q007519; Sun, 28 Sep 2025 09:18:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S9I9Zv007516; Sun, 28 Sep 2025 09:18:09 GMT (envelope-from git) Date: Sun, 28 Sep 2025 09:18:09 GMT Message-Id: <202509280918.58S9I9Zv007516@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 5e4bed48699a - stable/14 - tcp: refactor tcp_send_challenge_ack() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5e4bed48699aeaa351a57c848a38138e804ed5fc Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=5e4bed48699aeaa351a57c848a38138e804ed5fc commit 5e4bed48699aeaa351a57c848a38138e804ed5fc Author: Michael Tuexen AuthorDate: 2025-09-25 01:40:33 +0000 Commit: Michael Tuexen CommitDate: 2025-09-28 09:16:56 +0000 tcp: refactor tcp_send_challenge_ack() Refactor tcp_send_challenge_ack() such that the logic checking whether a challenge ACK is sent or not is available in the separate function tcp_challenge_ack_check(). This new function will also be used for sending challenge ACKs in the SYN-cache code, which will be added in upcoming commits. No functional change intended. Reviewed by: cc, Nick Banks, Peter Lei Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D52717 (cherry picked from commit db37256ce5437e6c667a537afff0fd9f59576514) --- sys/netinet/tcp_subr.c | 42 +++++++++++++++++++++++++++--------------- sys/netinet/tcp_var.h | 1 + 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 4a270ed07d08..6829d2a743f2 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2222,14 +2222,16 @@ tcp_respond(struct tcpcb *tp, void *ipgen, struct tcphdr *th, struct mbuf *m, } /* - * Send a challenge ack (no data, no SACK option), but not more than - * V_tcp_ack_war_cnt per V_tcp_ack_war_time_window (per TCP connection). + * Check that no more than V_tcp_ack_war_cnt per V_tcp_ack_war_time_window + * are sent. *epoch_end is the end of the current epoch and is updated, if the + * current epoch ended in the past. *ack_cnt is the counter used during the + * current epoch. It might be reset and incremented. + * The function returns true if a challenge ACK should be sent. */ -void -tcp_send_challenge_ack(struct tcpcb *tp, struct tcphdr *th, struct mbuf *m) +bool +tcp_challenge_ack_check(sbintime_t *epoch_end, uint32_t *ack_cnt) { sbintime_t now; - bool send_challenge_ack; /* * The sending of a challenge ACK could be triggered by a blind attacker @@ -2238,29 +2240,39 @@ tcp_send_challenge_ack(struct tcpcb *tp, struct tcphdr *th, struct mbuf *m) * would have guessed wrongly. */ (void)badport_bandlim(BANDLIM_TCP_RST); + if (V_tcp_ack_war_time_window == 0 || V_tcp_ack_war_cnt == 0) { /* ACK war protection is disabled. */ - send_challenge_ack = true; + return (true); } else { /* Start new epoch, if the previous one is already over. */ now = getsbinuptime(); - if (tp->t_challenge_ack_end < now) { - tp->t_challenge_ack_cnt = 0; - tp->t_challenge_ack_end = now + - V_tcp_ack_war_time_window * SBT_1MS; + if (*epoch_end < now) { + *ack_cnt = 0; + *epoch_end = now + V_tcp_ack_war_time_window * SBT_1MS; } /* * Send a challenge ACK, if less than tcp_ack_war_cnt have been * sent in the current epoch. */ - if (tp->t_challenge_ack_cnt < V_tcp_ack_war_cnt) { - send_challenge_ack = true; - tp->t_challenge_ack_cnt++; + if (*ack_cnt < V_tcp_ack_war_cnt) { + (*ack_cnt)++; + return (true); } else { - send_challenge_ack = false; + return (false); } } - if (send_challenge_ack) { +} + +/* + * Send a challenge ack (no data, no SACK option), but not more than + * V_tcp_ack_war_cnt per V_tcp_ack_war_time_window (per TCP connection). + */ +void +tcp_send_challenge_ack(struct tcpcb *tp, struct tcphdr *th, struct mbuf *m) +{ + if (tcp_challenge_ack_check(&tp->t_challenge_ack_end, + &tp->t_challenge_ack_cnt)) { tcp_respond(tp, mtod(m, void *), th, m, tp->rcv_nxt, tp->snd_nxt, TH_ACK); tp->last_ack_sent = tp->rcv_nxt; diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 2aa300ef043a..ccbc308ddfd8 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -1479,6 +1479,7 @@ int tcp_default_output(struct tcpcb *); void tcp_state_change(struct tcpcb *, int); void tcp_respond(struct tcpcb *, void *, struct tcphdr *, struct mbuf *, tcp_seq, tcp_seq, uint16_t); +bool tcp_challenge_ack_check(sbintime_t *, uint32_t *); void tcp_send_challenge_ack(struct tcpcb *, struct tcphdr *, struct mbuf *); bool tcp_twcheck(struct inpcb *, struct tcpopt *, struct tcphdr *, struct mbuf *, int); From nobody Sun Sep 28 09:37:35 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZK402Jczz68PRZ; Sun, 28 Sep 2025 09:37:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZK401gYsz3LPV; Sun, 28 Sep 2025 09:37:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759052256; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=njft/IgNz588vlzh+DQlwxJGAlmdyw9K7MUbzruv9s0=; b=AHgVyPo7suogQQIL298AkeoFDDm9Fzafdfu3VsjH0p8tegnJy9tQ28Clr/lzWj0mn+9BhT UfH+r2uyNwDycS68Ba9hWmLCwo4wASXxu5PNeT4Y7AYdgEEIqzCb81/+TE6023XmKbNw3b nfrj6QdGVrafUR20se2Rp18tK2noE6z5Uu1NR0W++aDbBuhBQhtGUksa9ZSqmWqHXtZJAW tkYmdMwnjJ5OIQueLbiO/bnAQWzU2PrD4qq13jyrE7b4f/3Zshcyvspc9Ibqe09h63iA+b Z/8LnC102pT954kZyGJojhOlIX+SOMh4O/5KuRYPbBJ6qPkmaM1xuA0cG+WPkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759052256; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=njft/IgNz588vlzh+DQlwxJGAlmdyw9K7MUbzruv9s0=; b=vJhKDjIdDPV6YWMVDpibOkZrRiiZhbPehP/VrxuASPLhNmC8nfiRFH+iOBbKB/1JC4Vazs LkJzzlG+IADxbplhyWxwVZyUs6mitjggbHcLS5C75VcxaNDlO2b3PFW42n+uDhN5dRHzHx pfp/QTwvkLXnXModWvxFgsk/VN41K0cwly6efocoQGlAGpP4rkjmxbgGh0UZ2e1I7wcnfm V9qN81Dg3ibocmf3slDUfV64NyehMzXgYNh+16xVHGriDs2edNdAxjcfb/8dGaMXxD/emu PuDfekKl2LjbAGfjRf4P4BsNlqHys2UK8MNuGidcUYVNVhKaiGFWyUIKCraWhA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759052256; a=rsa-sha256; cv=none; b=pKdRyQg2x3y+iUluFzgj+ZYvT4uUw34xqrn5peRTlbZ6H8ySW1F49O1CnlzcKdNHfGZQHR zHxVA57gPZHfmFOfjwH23SM3Rbc9hdRE1SSqWxUMYNLWZswn5c8x0cm0VPmPn+apgTfp9U ajSve0LlGiv01uFBR81b7owGgloWgTSC2lDonWiSJ6wFeqREHj4ojjLURoE0+o6++HrLhP p6ZF9osyQKL16jjpmZKgYSDJYVOXJVAM8VSyZAql3oYUc8RuhlHdRBUwOe+1se/wPllmhb bDTcMkUVaNtt8BJsMO6uANLwyEfJQUBONpSFhohqA4tnhf8/wFYRwW9AU9XG/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]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZK400zBJz1CNC; Sun, 28 Sep 2025 09:37:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S9bZi5045164; Sun, 28 Sep 2025 09:37:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S9bZlw045161; Sun, 28 Sep 2025 09:37:35 GMT (envelope-from git) Date: Sun, 28 Sep 2025 09:37:35 GMT Message-Id: <202509280937.58S9bZlw045161@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 6284c753e507 - stable/15 - d.7: Fix synopsis List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6284c753e507f9a47773eb795cb08f4bf257b24e Auto-Submitted: auto-generated The branch stable/15 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=6284c753e507f9a47773eb795cb08f4bf257b24e commit 6284c753e507f9a47773eb795cb08f4bf257b24e Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2025-09-24 05:42:49 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2025-09-28 09:37:23 +0000 d.7: Fix synopsis A predicate cannot be used without an action. MFC after: 3 days Event: EuroBSDCon DevSummit 2025 (cherry picked from commit ba05cddcc634ac235beb252bd505deb83dcd99f1) --- share/man/man7/d.7 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/share/man/man7/d.7 b/share/man/man7/d.7 index f4686d98b1d1..c098958ffa56 100644 --- a/share/man/man7/d.7 +++ b/share/man/man7/d.7 @@ -3,7 +3,7 @@ .\" .\" Copyright (c) 2025 Mateusz Piotrowski <0mp@FreeBSD.org> .\" -.Dd June 14, 2025 +.Dd September 24, 2025 .Dt D 7 .Os .Sh NAME @@ -18,12 +18,14 @@ .Sm on .Sm off .Oo +.Oo .Cm / .Ar predicate .Cm / .Sm on .Oc -.Op Cm \&{ Ns Ar action Ns Cm \&} +.Cm \&{ Ns Ar action Ns Cm \&} +.Oc .Sh DESCRIPTION .Nm D is the From nobody Sun Sep 28 09:38:53 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZK5T2Mllz68PRg; Sun, 28 Sep 2025 09:38:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZK5T1Vg1z3LHS; Sun, 28 Sep 2025 09:38:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759052333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kuoAtXB3DGxofXHjq7+JXceIwvnAXC2II7wR6t8QDI0=; b=M6z49faPbTLKtj1Aq1P4pDbInmJV8i+W7fxElUQfY0Peu64jzzgv/Wlx5wJPAZ4YBuIxui bh3ay3KuAOGs2AH/Ck1uRaPHhazKVDhnoecePhyou55PzF55SccaCBQPESeLCm9amfy9cT EUmUIuFcgdUZiVrym0oFFq+1EP/g1hZrH3GN9lkvwW6w1hueccoHUpSq8aLn7q4k0Zbg9d afWPI0X9KODfjOwf3dUxAKkZDdUoavWL57AV3TqTTDcDGZ69OPA9K4El2upKcFZ7bgcQLS 7c3lEU1jKdoqv5QhizfvLLKYNEbRrdReYUF30IMGicY7b4mAXawb/dKAywhjDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759052333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kuoAtXB3DGxofXHjq7+JXceIwvnAXC2II7wR6t8QDI0=; b=uoDJxgogzwlbQUqPKg0CgjaDgpjjattnxbh0mbRxdMVuKJUtUosfiQNq1rwgNwMpERtLwp MKuqA7I5pEj4jgOaYtYWSoj5q2FubVOwQcDs+gyEwvN9HY8Ahtv12XRm86rISWvoMM50ol JSgxr0Ci4EZ64iXhnINTRFPm4bR48q3BXveAXOhTUmwfN5ymkiOHCTCniW5TsvFPlgHUcz a+qrYk/wh50KoCZSlqJj3Tn5Oe6WE4C0dwDLeb5mKliE6uP38ZqykTOleSe9t3AXPb0I/6 Mw+bAhk7AuBeKC1oEVz3onZBw8pGAlvqJatwkZ/4lIbKHe8ivlXCs/MEjAgGbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759052333; a=rsa-sha256; cv=none; b=vaFGqsPTgD33ib1Fj2IUPvdrMCJ81qo7Hrh+QlrZfJhMaNlysOuN7XqCmXhdQ24+4eFD0G rD9EihIhouXrkawEHEKHR424QAvmnOJORVkuuvhjJWzjufCCEDHlJy7JgoJGMmbjaGfYyi LeGmgjTD/ZeyZNNFRSwH1soRcikOuMiaxggyhLHIExl7h9ATWk025qu+g80K9PahuvN2xE 2EoIMEsZ6H0rs0WZdfq5/WhJgRg04VvtYqUiSAi/GrdkM6Vfum1mKl/W5U40yMKKL5Vf0B Xg2iIOFhf2DbTwbJIyuMmNtJckNm+4GcXdaTyc6R+oCaPkiPeZQWV0u9/vdIJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZK5T13hDz4Q; Sun, 28 Sep 2025 09:38:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S9cr2w045651; Sun, 28 Sep 2025 09:38:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S9crNB045649; Sun, 28 Sep 2025 09:38:53 GMT (envelope-from git) Date: Sun, 28 Sep 2025 09:38:53 GMT Message-Id: <202509280938.58S9crNB045649@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 93bc812788c0 - stable/15 - ports.7: Fix example of passing variables on the command line List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 93bc812788c0aa378d1a2c484c004cb522fab51e Auto-Submitted: auto-generated The branch stable/15 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=93bc812788c0aa378d1a2c484c004cb522fab51e commit 93bc812788c0aa378d1a2c484c004cb522fab51e Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2025-09-10 08:52:15 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2025-09-28 09:38:42 +0000 ports.7: Fix example of passing variables on the command line make(1)'s -D flag does not allow for setting the value of the variable. It just defines the variable and sets its value to 1. In fact, make(1) treats "=" as just another character in the variable name: ``` $ make -DA=2 -V A # Output is just an empty line. $ make -DA=2 -V A=2 # Variable "A=2" is defined and set to "1". 1 ``` Fixes: d25f7d324a9d ports.7: Document DEBUG_FLAGS and the process of debugging ports MFC after: 3 days (cherry picked from commit 9365a328596c9f156deaa15fa018b76b3a6e6b18) --- share/man/man7/ports.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man7/ports.7 b/share/man/man7/ports.7 index b681a326f407..75070ce852fe 100644 --- a/share/man/man7/ports.7 +++ b/share/man/man7/ports.7 @@ -25,7 +25,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 March 21, 2025 +.Dd September 10, 2025 .Dt PORTS 7 .Os .Sh NAME @@ -683,7 +683,7 @@ WITH_DEBUG_PORTS= mail/dovecot security/krb5 .Pp It is also possible to use the debug variables on the command line: .Bd -literal -offset 2n -.Li # Ic make -DWITH_DEBUG DEBUG_FLAGS="-g -O0" build +.Li # Ic make WITH_DEBUG DEBUG_FLAGS="-g -O0" build .Ed .Pp See the