From nobody Mon Apr 20 04:44:41 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fzXvs67Vkz6b0Cb for ; Mon, 20 Apr 2026 04:44:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fzXvs5fDzz3qJF for ; Mon, 20 Apr 2026 04:44:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776660281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AK9h29o3HEhajYXtz5Wnu0JHCxEt5Z760wKtwDUXjtA=; b=coEBGP7UTBIn5ndF0Uh+tOc3YRAJzwtGjnZC1gaIUN7515nR3BmH52CwgyxuwP22hk7NGp iWOM8asWzjNp9F19RwGIoKRXq4jUqjs/ZU4lQpo7SxvSTUPMXwbOeMNL7UdbEPNsZ6t8Di zHVhd0P8CS3NIulb7MP+ZnykAzd4rVIv6nqExGAfsyLDkd2jfABgakf0abC7oN/r4xWG7w SX253nP0EwfLxn7qExiT4+qgMFWnVgtHLPyJ8AmcjasXeD4zlm+IawN+zNp1pm+L/0htTh jgppHUmPc99HfNezKl9o7cblIueFfZy1T3gWCIo1wSqDeJVo5AC6r5XrpfX9qg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776660281; a=rsa-sha256; cv=none; b=leJ78N6Cxr3sKdeUQ2Cl6hLdOYfFmw7JDtNtaP9Hz62YThMFukh6/SNc24FEJhytW8UOxh 10O35v/ObrcB0tNCkcegSLpKNRVtUyzPzu6UKNjANBZDznO8VFQRj2aB7J3wLhbUNRp420 37s1jAvIYE7cOw27T5z+T8CU8ibUt2KPWlxAKkRfRaO7ptMIGdmVDcRbwOQwcAlUUV87IH 5w73NcwfTT2AkteqCOpK8s8GUKw9pUdQfcFrWr0nGmpHqN3bLSOi4BystxnygExjL05WEo tLxGD5dJ26SmpmDg35WgAKXmy4Ax2aCGTMbhBqlaz7kfyohf/B2Ps4px5yLvmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776660281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AK9h29o3HEhajYXtz5Wnu0JHCxEt5Z760wKtwDUXjtA=; b=Or3an15XNMhW9JTTtBaR584mMvOolds13SZHBt7nXRZOYlz+IRi+URN0+pkVu+kZQKM0YU W6P+8wcuD3IABnIGKb0cTlS9N7q0Z07ewhc3eyuQuRr5lf4pEVkKq9MnLUps+PtjBgp29m +P77t6xBFA3jurBIJaivDonOAz+1M7CC0hfjmCeIXcvzqCdi1GW70aMehShoCG3fHYpVlj F8MkIT2ydeq2yuPFkeA2jjxVYJMPVXy2ULr3uZXc4cKxeg/Qgj/4fo6xw03lUgigYlAuB8 rMRAZplFZZbFbAdV4NqMLX5y21A70fQx54cb/kibs1e0kTxjN99oVgR6gwxyFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fzXvs58qQzjWH for ; Mon, 20 Apr 2026 04:44:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37489 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 20 Apr 2026 04:44:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 16719d340734 - stable/15 - rc.conf: Fix typo in 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: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 16719d34073444c50fcd57d337d0f1246c8e84c9 Auto-Submitted: auto-generated Date: Mon, 20 Apr 2026 04:44:41 +0000 Message-Id: <69e5af39.37489.15245a6d@gitrepo.freebsd.org> The branch stable/15 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=16719d34073444c50fcd57d337d0f1246c8e84c9 commit 16719d34073444c50fcd57d337d0f1246c8e84c9 Author: Jose Luis Duran AuthorDate: 2026-04-17 13:55:16 +0000 Commit: Jose Luis Duran CommitDate: 2026-04-20 04:43:27 +0000 rc.conf: Fix typo in comment The correct path is /etc/defaults/rc.conf (defaults in plural). Reviewed by: netchild Fixes: cc4eb1ea1040 ("Add support for a /etc/defaults/vendor.conf override file") MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D56456 (cherry picked from commit 8e08080ee581dfd30c128d032035da7b6ae44463) --- libexec/rc/rc.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 19c57eeba295..d497d7009a15 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -788,7 +788,7 @@ if [ -z "${source_rc_confs_defined}" ]; then } fi -# Allow vendors to override FreeBSD defaults in /etc/default/rc.conf +# Allow vendors to override FreeBSD defaults in /etc/defaults/rc.conf # without the need to carefully manage /etc/rc.conf. if [ -r /etc/defaults/vendor.conf ]; then . /etc/defaults/vendor.conf From nobody Mon Apr 20 04:44:57 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fzXw95V7Yz6b0gB for ; Mon, 20 Apr 2026 04:44:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fzXw94qX5z3qgp for ; Mon, 20 Apr 2026 04:44:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776660297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Msu3nQrm0Opp+utm+Pepacwq1E/nI5zP2jgWQlJuQHg=; b=HwTGPL4E50v5s+hWZpRUFHDkgxYLITDbpVXThyIMkaIPqa72WwVBahCwAWOs1Q5VqfVxJK 1nr0vW+N/QtnKIZfC/mVNuiPryO1FfPqPxG2yFwZsPa6L5LH2yW5E8XQ0Vy8w4P26V9EKe gF+njbfOQU+/mcX9YF1jKuqeyqyoPcOGIXqN9p/FkgRt08+VPraNWobabNbYqQyBw0ojin Fqrmx45jDJQWRB9moWn7jatp0jZ1PzqTscVGk+GplKFZijwRLFhDl55oN6LbuQAwty3S8A UL+9QP/09wDEfkCcdTeQzJJBvKj/OJBP35JmBIAVER5Lt70gJYWSwkAog7xUOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776660297; a=rsa-sha256; cv=none; b=ikvPJMC+rFaTMUhznbZVLGRGj2tHpwJRfuZvpkb9PBlHj0TYNb37SuXJIchsZQfn1s2tHM TvcrzcEe+fXunoYs8BB1P1yJAW/1u/xwkTnmWXIFQcCJOA8ULLdoMqIAZA1Ov/+1nRtDMd Wn3BOkk8tTHgzoR6Fcwb2TE+z0LaKItt3L1e7Er5cBsbSNcT7dRx7rpgXzBQNS4ShaXfU7 Ryb/abEftvNO320kDTfdO9bnC6KaEN7lKQU9BehJfTK5mAt416QaCC9tdhLN+n1iKd0qwI 98sbOz5OpIqZLILY9NJCriBThivwug3NrJPd4e7zvXoRJoRSwQnzHlyHVdOXkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776660297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Msu3nQrm0Opp+utm+Pepacwq1E/nI5zP2jgWQlJuQHg=; b=MXbAQoC4fOUKOB+JKWTUuTWjzM6JZBsficdvmlnoR4W3sTMd3b3KqTxIvztpQAC3+qSGoL dTXZyaIxUtIZi9dYlQvcfwPgMpPtnZeksr4KbE8IOmX6HDV/yxPBYilIardKXOreDXJQtA gkmp0wVoXC6JDfwf8mMfpxHmJZ2T78bNNYefPf+IQfrzuXbJ9Y8Fsw4TMRliO/0HTf7ir9 2i9JoezHZ+o+PtvS7m9nSosyHcp6d0MM0pSClGasa1EQPpI5WeYAZe2WOESJ+ux8pQfQqy 1GBgtfQndKj6yJ4VmtIjGMX52gpWy4znCqMSpN4eijfkNC8mR2L/Rm17nsi3Wg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fzXw947JgzjWK for ; Mon, 20 Apr 2026 04:44:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36def by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 20 Apr 2026 04:44:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: f5e1bc1ca1b1 - stable/14 - rc.conf: Fix typo in 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: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f5e1bc1ca1b1b8d6c096ac65c64f69586d501200 Auto-Submitted: auto-generated Date: Mon, 20 Apr 2026 04:44:57 +0000 Message-Id: <69e5af49.36def.bc98f92@gitrepo.freebsd.org> The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=f5e1bc1ca1b1b8d6c096ac65c64f69586d501200 commit f5e1bc1ca1b1b8d6c096ac65c64f69586d501200 Author: Jose Luis Duran AuthorDate: 2026-04-17 13:55:16 +0000 Commit: Jose Luis Duran CommitDate: 2026-04-20 04:43:53 +0000 rc.conf: Fix typo in comment The correct path is /etc/defaults/rc.conf (defaults in plural). Reviewed by: netchild Fixes: cc4eb1ea1040 ("Add support for a /etc/defaults/vendor.conf override file") MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D56456 (cherry picked from commit 8e08080ee581dfd30c128d032035da7b6ae44463) --- libexec/rc/rc.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index a1bb88903911..2fbd0c4280de 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -790,7 +790,7 @@ if [ -z "${source_rc_confs_defined}" ]; then } fi -# Allow vendors to override FreeBSD defaults in /etc/default/rc.conf +# Allow vendors to override FreeBSD defaults in /etc/defaults/rc.conf # without the need to carefully manage /etc/rc.conf. if [ -r /etc/defaults/vendor.conf ]; then . /etc/defaults/vendor.conf From nobody Mon Apr 20 04:45:13 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fzXwT3bM6z6b0dC for ; Mon, 20 Apr 2026 04:45:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fzXwT2S18z3r0J for ; Mon, 20 Apr 2026 04:45:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776660313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lvEp2i0FlT9gBA1rt3VsnZno1ErUouwBoyPzGXLWVG8=; b=gYdkjc6NrC+m07uKjR9BSIsQai491XYof9r7NiZmwWPC22P26lFcZmfVcf5ZhS8Z+4Y4l5 +sXkxTqF4SGR+3MRJBA44Bq4r7VcNJPwVUL9QTZ5Bk8Rt8yJv6xrti/OByoJG5ZBRavauw Aq9ywG5ryu5cP9kWCqicqyN46S0R3LcF4sTEMfMIwp71oh2ekJEEv2LdshVujGpedT7jiz WCwRDUKxNDCw6yDeA7p7VP+ILEneocUWz6Q+386GJwG9jRbgJ4a9+SOnKMvdJdh1GnE8+A QNh4oHpz07xWTu2l7yQgBvmimv/L0ge3ybignt7dSv/d2QdXcrU1oV/XzuNsvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776660313; a=rsa-sha256; cv=none; b=ed5qJldbjoG5yXVE3qhy/MXNocnTfujCx16cdlEpKM9ypqzRkZT0fojTCe/APCmcwajiq3 9/VeOFBourLBL9tSPjqXtUvP3108ZjI5ySOnJhSfGvhmm+HNypHZmY6cv28SI6DgjjhXrH sCnHGpluvJ6r5+CSLwl+rZwMuk6uup3HInNKKFTUJUEh29z+G/+DgzGPntOT1k9Zhf8Dd2 njUGwll3r6RZT2VP8Cb2Ma8xEkeys6eT6Y2Rmd0qJz+TcSsKbGZ5lr6KzmWF/0sN7PleX6 fUm6wDrMEnfCEYLgRfQsOvT/sGUF5E97bezuy7Cw3H/7YlE8dlKwYGunm7fwVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776660313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lvEp2i0FlT9gBA1rt3VsnZno1ErUouwBoyPzGXLWVG8=; b=BQAfiConwF/+2lTeViEeoTr+x/3UdGpZFxg1OoFxGwVKJfaqQmuPZvh/pqcyv5kaMpwaTr TR3VEre7H04K9PQF/O40gGRKUGzhUzevRldzED4ONIbU7Q3d3qkf/Gwvl8ATGZ92Th2kF6 BuRJXpGYJB+u1muBSZwy5vJCgfbmY0Kks4aXNfbs6d4QK9w/FgJU85mkgIWyTrJ3CCySb8 kc1uKI0OLMWzwEmr/1QzLAarkMVuHS9KmvvccOqCqA2wwup0tTZQIg71Jhd8hKXIhg2Nil qkQhz9SmHnPXHzU8RS2YByPkIE5ouJh+2l1fKI2/f5UGo4bZJ0Nq6JqLdJNQIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fzXwT1mf0zjSJ for ; Mon, 20 Apr 2026 04:45:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37c01 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 20 Apr 2026 04:45:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: e6f8afd1e859 - stable/13 - rc.conf: Fix typo in 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: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e6f8afd1e85942c61921248d2803d775e62855d3 Auto-Submitted: auto-generated Date: Mon, 20 Apr 2026 04:45:13 +0000 Message-Id: <69e5af59.37c01.718866ab@gitrepo.freebsd.org> The branch stable/13 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=e6f8afd1e85942c61921248d2803d775e62855d3 commit e6f8afd1e85942c61921248d2803d775e62855d3 Author: Jose Luis Duran AuthorDate: 2026-04-17 13:55:16 +0000 Commit: Jose Luis Duran CommitDate: 2026-04-20 04:44:12 +0000 rc.conf: Fix typo in comment The correct path is /etc/defaults/rc.conf (defaults in plural). Reviewed by: netchild Fixes: cc4eb1ea1040 ("Add support for a /etc/defaults/vendor.conf override file") MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D56456 (cherry picked from commit 8e08080ee581dfd30c128d032035da7b6ae44463) --- libexec/rc/rc.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index d740d2df32d9..fadee7f6548d 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -787,7 +787,7 @@ if [ -z "${source_rc_confs_defined}" ]; then } fi -# Allow vendors to override FreeBSD defaults in /etc/default/rc.conf +# Allow vendors to override FreeBSD defaults in /etc/defaults/rc.conf # without the need to carefully manage /etc/rc.conf. if [ -r /etc/defaults/vendor.conf ]; then . /etc/defaults/vendor.conf From nobody Mon Apr 20 07:27:48 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fzcX44Kfcz6bDLt for ; Mon, 20 Apr 2026 07:27:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fzcX41skPz44gb for ; Mon, 20 Apr 2026 07: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=1776670068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iU/8AftWCMppw5aVb3sQ4bQJfHamViOVGEBSBByG99o=; b=KN3q5Jmc/S0/ubGD5gdZfKCbgbdsFWJBfRPYslLF+qAEua00Ty0Ng64fEWtahJdsfjq0Dx oiu4c36bc7Pk7gdAwgz1IV1hTCexdFG9Q0LDHOtMaGjyPyiMzmG1Bsq16YhiBLKt1rrvTv 9ucD0FklkzV+ACF4Vn3hWd0A3zs+HkUL05CqPrp3o+woAHrm2lopT8AmLa45ZjHLiiMr99 SZhUPvVBRcO/8/UclNTGuqdO9qCrUxUO3tGPt2zwaRxUTQXktz4TeTZDQ9oUL8yWQhZngm mAsiH9xBgfM6UA3U33f7u64EmDuBrjd5WIulyjDxZ7KzuNz3pZTZ5t6qTawZWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776670068; a=rsa-sha256; cv=none; b=cEjDKE1o7ZNGN5KHJglrZ+0ATCh7rSy8UV0i4f46NdsEd8rEGM3kHiedudreis0ICuxPq+ vZCrE0+LQITse8c1ba56yNUrkAP0Ft20Ah2mblxea0o6yOdz//VElJ2BykKJXmj8FvOopw X9SF3qYASTi2iZjlbD5Dw8ACLqwg8dE1RtechOAxUhQSLXekGoVQpYqfVF5WamPalfYEEk R324blbGbhx3q4w2MsNJn2yOuJEtpE4laP5801+P8WRbGtTdXRMmqJ3zPbT9K5XxqxoAam OmF57fahAdttU8ru+LE5IeT8mLQdzIgnQbhPYVtffmGQJRa/s9R86n7n+FIwMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776670068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iU/8AftWCMppw5aVb3sQ4bQJfHamViOVGEBSBByG99o=; b=hv9Lc4E9x/8iqMKgYQtzQnv2p1V8Uh3xdnAQPf+sNTCXbe/r2Imm6yU+j15/6yii2jj+ox gEd/euLFGya0NbXcRnTSLzp6xFhpOVMAIsvVmcq5+m5rFrAKFoldikn1PlurfYOPrG4P12 llEo2B1CzkW0TfO4OIRxBbc4C9y77eDCBMmpKBSf/nleCyH66zwiifdKOG6VWofSxLcIuc v7P/CbnlZ3IEfl70NzDwuJ6RIxlBGXi+CSfDGxwnu/VlAJaa9y60Yk3/8wuqAxUW4GiJy3 cUpCPlSb9kmOIhX05sNrFgbdz7vVwwwlOTU2XUH183BOF1d6n3dATRUFTfOeKg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fzcX41GYVznV0 for ; Mon, 20 Apr 2026 07:27:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 47588 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 20 Apr 2026 07:27:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 4d3670980878 - stable/15 - sctp(4): Fix a typo in a source code 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4d3670980878f20a4b3b53596d23bf1f7fd4e5a6 Auto-Submitted: auto-generated Date: Mon, 20 Apr 2026 07:27:48 +0000 Message-Id: <69e5d574.47588.d2479f0@gitrepo.freebsd.org> The branch stable/15 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=4d3670980878f20a4b3b53596d23bf1f7fd4e5a6 commit 4d3670980878f20a4b3b53596d23bf1f7fd4e5a6 Author: Gordon Bergling AuthorDate: 2026-04-17 14:59:26 +0000 Commit: Gordon Bergling CommitDate: 2026-04-20 07:27:29 +0000 sctp(4): Fix a typo in a source code comment - s/initited/initiated/ Obtained from: NetBSD (cherry picked from commit a154d72775cbf3f0679fb2f989b3d1a035ae41c9) --- sys/netinet/sctp_structs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/sctp_structs.h b/sys/netinet/sctp_structs.h index 53d9bfd4f445..177b54656ae9 100644 --- a/sys/netinet/sctp_structs.h +++ b/sys/netinet/sctp_structs.h @@ -898,7 +898,7 @@ struct sctp_association { uint32_t str_reset_seq_in; /* various verification tag information */ - uint32_t my_vtag; /* The tag to be used. if assoc is re-initited + uint32_t my_vtag; /* The tag to be used. if assoc is re-initiated * by remote end, and I have unlocked this * will be regenerated to a new random value. */ uint32_t peer_vtag; /* The peers last tag */ From nobody Mon Apr 20 07:28:05 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fzcXQ218dz6bDM0 for ; Mon, 20 Apr 2026 07:28:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fzcXP6mPvz45X2 for ; Mon, 20 Apr 2026 07:28:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776670086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=csenaORnduUJW9964/SNvgx4ARHvNMgeXK2WllNaRFc=; b=wlOWQg07FZ1RaDLcLEh8Rltc5vNWI5IUEx21uyp4q3YfL3mz9olAY6r09AMThDZ5cSbbtJ LRHuOMjs/BhL9wJ08uZApmIpyxwIYoiJb9asWQUpt1PkQ8HBw3km660gZgrBUpxJaAzc17 +UpiEipu+KvFYafKS/5E5dT3vOEgeGkKbIlfsctVCq6/jttq1IK16/n8ENmUjA2et+mcIH jsPShYIQ0fwusyJPCWxeal3K98TjnjapCpVyxy5/Cy1kgHdXE4fdnBag6lEMuS9Yro0xRj s+4NH4r03P3PENXcsxCcGluAHS/no/7OOOzvZbkT062ZqNEcci78DuRA+2xbxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776670086; a=rsa-sha256; cv=none; b=kCTup910v6tzNZVqQZoOWRa3/ywgh9xXwCcYeEGh4erFLxbhB59NjQ/hL59VLN48TAxVYV SzvY2fcZJyUTKmzhzV06tA4phLBZyeni0Q0txKS/pFZBf3e6/cvTV0kpyt1s1b7Q+a6GXM KY5oqUGTaslch2FFBmR8ydm3VB7FGr5CRDkR0BHbXq/rUugpOm1noL+eNsVFUOGquIKTQE 29jjBbmngEfvkl4JuwgWuKdA08BjYohbK7PNI3qE01cBNHBZ41TJipnOP4Qy7BV/3cd20m yRGVsj6GRj8X7FO2sAVPWsrqM7JyDNSTc2bOFN9+uIX3GAj6PhZS80vj5If9rw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776670086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=csenaORnduUJW9964/SNvgx4ARHvNMgeXK2WllNaRFc=; b=Fxuw49sT3OTqlrU/6C+Ekj28eubwgXOjb6EIQOYtkL3f+S8u3qyXwtdr2fM7on9Vi1Dt01 lXzbXi7v9Cshot3Ma3ZkrxdzkM25FvgEW21HHEuLZwiO1Jbwt5vNH6ZyqgTwOZCuo1bfh/ PZXPJlPVn+Cmjk0i3GKtzca0hbQiPI39hlMng/A9dtAjwt3ggT1RXIG50dJ8rj5qX2HEgb hUHh4enCNzhZ/nQqIlaXT4KiTxjcb5pplrgxwkJ4ZqOTB39NushPxQjKZo02KGr8uzZKz3 YxTLCwsCtZmxTwzVFltny57z/OsdNhY5HiTNryDzgDZ1ypkHpYHzBn9yUTjdeA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fzcXP57CmznFf for ; Mon, 20 Apr 2026 07:28:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 44f54 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 20 Apr 2026 07:28:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 26b162dd8298 - stable/14 - sctp(4): Fix a typo in a source code 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 26b162dd829885701e75b7196ef380d998faeef0 Auto-Submitted: auto-generated Date: Mon, 20 Apr 2026 07:28:05 +0000 Message-Id: <69e5d585.44f54.6f86e0d8@gitrepo.freebsd.org> The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=26b162dd829885701e75b7196ef380d998faeef0 commit 26b162dd829885701e75b7196ef380d998faeef0 Author: Gordon Bergling AuthorDate: 2026-04-17 14:59:26 +0000 Commit: Gordon Bergling CommitDate: 2026-04-20 07:27:55 +0000 sctp(4): Fix a typo in a source code comment - s/initited/initiated/ Obtained from: NetBSD (cherry picked from commit a154d72775cbf3f0679fb2f989b3d1a035ae41c9) --- sys/netinet/sctp_structs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/sctp_structs.h b/sys/netinet/sctp_structs.h index 53d9bfd4f445..177b54656ae9 100644 --- a/sys/netinet/sctp_structs.h +++ b/sys/netinet/sctp_structs.h @@ -898,7 +898,7 @@ struct sctp_association { uint32_t str_reset_seq_in; /* various verification tag information */ - uint32_t my_vtag; /* The tag to be used. if assoc is re-initited + uint32_t my_vtag; /* The tag to be used. if assoc is re-initiated * by remote end, and I have unlocked this * will be regenerated to a new random value. */ uint32_t peer_vtag; /* The peers last tag */ From nobody Mon Apr 20 16:18:55 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fzrJv6Bnfz6WsGF for ; Mon, 20 Apr 2026 16:18: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fzrJv5Q4Cz3JXw for ; Mon, 20 Apr 2026 16:18:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776701935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AouttKl3PmCnolilvpYAEBJUnS8WeWz+1/tceqDXC1I=; b=HnmXjtB/x7G9QIF1QyMldfwh7sqmqFYevNcsvfUEtqB15ChIDbge6jPlokPX2n+X6761iu qKaAtBL2WOGZP1bNzltaqQcZqALN5X8/A3TpTy0faqA7f1sQVEk22WP4S8aPusAB1qGWDp G5nEhK7G52Ywv2d0Nce1pbq2Zx83nLNVsng/MqM+dCL7nTuGCCKhpyQvOt1V8ComAja0yZ PkG0VU3l2TEiz/Jb03VRIZEQbvH6AANvG727Lju902mRUEiZmSxT3ca7kqBPMGausYQo7O A30WBXUxQ7gMP3E/rlEvFh7g2jEu0iAEySEAR1kMe9fmxhuuEVwjtmHRzXEnlQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776701935; a=rsa-sha256; cv=none; b=QIgY98S7hbPoOoBIh2z2ak/MIBBjux74gZ201ZNXbA68IgftStQXBaBVHBZrcG8+vPDSJX a8K9h/t5O5cDmZH4O5/nc3DyCE6GNzbGtFlv7d7elW5lTf9rZOYP399Unkc37fW8u1EQ4M qZU/4AxxfXBbdtHarTe8LZYf8Mx4S3rMxl9TMXWsK/spfJDIAVvMMKl4k240C7rPOU6iHq Aw9tdpagSi8O8S/qRSV7NJIAtMZYr6O8IoKB7WPuzjzSbaRuj63jAYHNZB4bvwtMM4grZm UzeFxyQ/16BTsGIC5DIvnppb2QU+rUHEd7ibxot3cGDaj48kmsmI2DcUZ2A1zg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776701935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AouttKl3PmCnolilvpYAEBJUnS8WeWz+1/tceqDXC1I=; b=so92VHYySJqWibdtbDtTFPNFsECeSDp5/WPJG2+2hmrqBSs7TecNHhUf+/42yL8v6xfgk9 +h4GxcGjFSWMNYOlYNmmP5MVCjprTDrQmOTRMY0q24PG8bDEe2/0QNxF2y2Dq8tOXsY9Qo hZFj525FDgUmI2nXYmxnmM1NVWTBBPQP8VaACu3I7z4KuGVK8iCRF3Woyq5WNOTo4Mkdsl xnUehbc0XntGBdGGb8+IX3mPG/Sx0Yb0m7YPGqUidg4PRkDru3OjTnGLiyBYA368ZoscBb k2vBfufLM6np2DmsvTF/tPCijZk1PnTgrqAV6xbHLmYf2RUO1MC9JF6XUGc4nw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fzrJv4yNvz14GL for ; Mon, 20 Apr 2026 16:18:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38f51 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 20 Apr 2026 16:18:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: a5ac63f95919 - stable/15 - Bourne shell -> POSIX shell List-Id: Commits to the stable branches 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: a5ac63f95919f7695f17abad36d5b8831ffd2f1e Auto-Submitted: auto-generated Date: Mon, 20 Apr 2026 16:18:55 +0000 Message-Id: <69e651ef.38f51.ed59296@gitrepo.freebsd.org> The branch stable/15 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=a5ac63f95919f7695f17abad36d5b8831ffd2f1e commit a5ac63f95919f7695f17abad36d5b8831ffd2f1e Author: Alexander Ziaee AuthorDate: 2026-04-14 13:02:53 +0000 Commit: Alexander Ziaee CommitDate: 2026-04-20 16:18:37 +0000 Bourne shell -> POSIX shell The FreeBSD shell is a POSIX compatible shell. It evolved over several decades from the Almquist shell, which was preceeded a decade before that by the Bourne shell. Most readers today have never seen a Bourne shell. If someone wants to learn to use our shell, they need to look for tutorials on the POSIX shell. Align descriptions through out the tree with this reality, consistent with it's manual and common parlance. We made a similar change to the doc tree in b4d6eb01540fe. MFC after: 3 days Reviewed by: carlavilla Differential Revision: https://reviews.freebsd.org/D56382 (cherry picked from commit dc140a9fc151f3717bce2157f49070daafa13ec0) --- share/skel/dot.profile | 2 +- usr.bin/apply/apply.1 | 2 +- usr.bin/chpass/chpass.1 | 2 +- usr.bin/fortune/datfiles/freebsd-tips | 4 ++-- usr.bin/script/script.1 | 4 ++-- usr.sbin/adduser/adduser.8 | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/share/skel/dot.profile b/share/skel/dot.profile index 40dfa58f4e84..d67a6e2a934b 100644 --- a/share/skel/dot.profile +++ b/share/skel/dot.profile @@ -1,5 +1,5 @@ # -# .profile - Bourne Shell startup script for login shells +# .profile - POSIX Shell startup script for login shells # # see also sh(1), environ(7). # diff --git a/usr.bin/apply/apply.1 b/usr.bin/apply/apply.1 index f1c114d40814..1e0115364e81 100644 --- a/usr.bin/apply/apply.1 +++ b/usr.bin/apply/apply.1 @@ -96,7 +96,7 @@ The following environment variable affects the execution of .Bl -tag -width SHELL .It Ev SHELL Pathname of shell to use. -If this variable is not defined, the Bourne shell is used. +If this variable is not defined, the POSIX shell is used. .El .Sh FILES .Bl -tag -width /bin/sh -compact diff --git a/usr.bin/chpass/chpass.1 b/usr.bin/chpass/chpass.1 index 0891f3f28c92..0321d748a1a4 100644 --- a/usr.bin/chpass/chpass.1 +++ b/usr.bin/chpass/chpass.1 @@ -227,7 +227,7 @@ The field is the command interpreter the user prefers. If the .Ar shell -field is empty, the Bourne shell, +field is empty, the POSIX shell, .Pa /bin/sh , is assumed. When altering a login shell, and not the super-user, the user diff --git a/usr.bin/fortune/datfiles/freebsd-tips b/usr.bin/fortune/datfiles/freebsd-tips index 379f772fea88..47fd3c755626 100644 --- a/usr.bin/fortune/datfiles/freebsd-tips +++ b/usr.bin/fortune/datfiles/freebsd-tips @@ -180,7 +180,7 @@ directory sizes. nc(1) (or netcat) is useful not only for redirecting input/output to TCP or UDP connections, but also for proxying them with inetd(8). % -sh (the default Bourne shell in FreeBSD) supports command-line editing. Just +sh (the default POSIX shell in FreeBSD) supports command-line editing. Just ``set -o emacs'' or ``set -o vi'' to enable it. Use "" key to complete paths. % @@ -415,7 +415,7 @@ if you leave the shell idle for more than 30 minutes. % You can use aliases to decrease the amount of typing you need to do to get commands you commonly use. Examples of fairly popular aliases include (in -Bourne shell style, as in /bin/sh, bash, ksh, and zsh): +POSIX shell style, as in /bin/sh, bash, ksh, and zsh): alias lf="ls -FA" alias ll="ls -lA" diff --git a/usr.bin/script/script.1 b/usr.bin/script/script.1 index 5f40e5af28ff..ef8eaa35174f 100644 --- a/usr.bin/script/script.1 +++ b/usr.bin/script/script.1 @@ -139,7 +139,7 @@ Forward terminal size changes on The script ends when the forked shell (or command) exits (a .Em control-D to exit -the Bourne shell +the POSIX shell .Pf ( Xr sh 1 ) , and .Em exit , @@ -184,7 +184,7 @@ exists, the shell forked by will be that shell. If .Ev SHELL -is not set, the Bourne shell +is not set, the POSIX shell is assumed. .Pq Most shells set this variable automatically . .El diff --git a/usr.sbin/adduser/adduser.8 b/usr.sbin/adduser/adduser.8 index e21a7653f250..eacc12a8f3ce 100644 --- a/usr.sbin/adduser/adduser.8 +++ b/usr.sbin/adduser/adduser.8 @@ -459,7 +459,7 @@ command appeared in .An -nosplit This manual page and the original script, in Perl, was written by .An Wolfram Schneider Aq Mt wosch@FreeBSD.org . -The replacement script, written as a Bourne +The replacement script, written as a POSIX shell script with some enhancements, and the man page modification that came with it were done by .An Mike Makonnen Aq Mt mtm@identd.net . From nobody Mon Apr 20 16:18:56 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fzrJx2Lhjz6WsGG for ; Mon, 20 Apr 2026 16:18:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fzrJw6rWZz3Jk9 for ; Mon, 20 Apr 2026 16:18:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776701937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fo9YKLHY5cIRpEY40KMb2KcxAIbPJyVCdy2IA7aqEPY=; b=V6JWJr4VvWvdk/FFXgRP7fW+wEOv73j8hkdJlGFrdMxIn6Rl7oyH1Aw8YF5ZX+Taw4L5+D 4TBBBx8RYVcwtZ7/v4PR49ZfoOwb8lNTWWmJu5/J5yiSywrRPPUfYKxmrW+gcCLpQxmq95 o1WZujqUC34znWW1AP6L3GOHV52TXew12xNeSmuydtRYyLP0jJHE8vTEOT+GBtjPIuwo7R RZcCfw9hWjkjQ8J2Z0X494mNPruc+WCwXtNasYBN5u0XLhMc7OAmVZ2NKu9Awxm17BHvQ4 94ggjGsaia3g2vcId0mJPcHmTT0E1yB0o4JPceoOgWtVpS/wP6hC5b58cKxhjw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776701937; a=rsa-sha256; cv=none; b=I5pzM5Nw827T7HUF+VuJImGokTjMBaX9SIC12UkcdtafsgbRqpWuFphFYTK0/Xmi/aJ8vN Pj+3xJVS9CVYbxZxhVkF2z2AW1LDbp/n+zkJAJHKNQmWGFERTWlgb/Owa+/4NZj/0IwSRn J1wmSejzmiKXBZUhANKYMB2pUVSKb5f+JVglIPaK21qZQrqpwok3zaEPVeiL11mEVU6b7R bjrrHDrXcmh9TeQoWyotkk8xCwiZoMV094GXbt/HrT4vT/9j6ojLNk7ydfRGbFhYGE30og uRcSsJh8EoPMOvpqR14g+3UXoNjJV4XZLjgb6+sQue3xS16zvf+TiWkkzm5+xQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776701937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fo9YKLHY5cIRpEY40KMb2KcxAIbPJyVCdy2IA7aqEPY=; b=pgt2q137F7SkiWWTQlPSt6AFJnrr6qKElJmb8xjcGVjy0K4CkX+Pf/QaN0ggpzSSnKUEVv Xy7PuTRFQsDT8uj8FnWXmWi+SHY0C6Vts3/445f6o35fFW+HBxglbQIaI0JrXVmPfJ8all RYCHihD8ll70RCPS+xdq1G1c99X95ufhCDF0KNgKRD9NEcOQoFSGbNtZWLqSKdM+G0JeXu ozhis2RFa6/t6MF0Rb2O6sqqnyS0uwTFiURMWweDNY3NLQMBtr8ux/c+5tw7I9rXkIe1Ez mKkIYAPPg7tpTAc4tRnup9V6nzKvv6r9NX1ImoXtZI8wag6QkCSpcCGmzQRl8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fzrJw67rHz13gy for ; Mon, 20 Apr 2026 16:18:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 390ef by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 20 Apr 2026 16:18:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: 689a8b5532ca - stable/15 - freebsd-base.7: Break examples into subsections List-Id: Commits to the stable branches 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: 689a8b5532ca6822d9efd8d0895771ab07c030dc Auto-Submitted: auto-generated Date: Mon, 20 Apr 2026 16:18:56 +0000 Message-Id: <69e651f0.390ef.69ebed0a@gitrepo.freebsd.org> The branch stable/15 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=689a8b5532ca6822d9efd8d0895771ab07c030dc commit 689a8b5532ca6822d9efd8d0895771ab07c030dc Author: Alexander Ziaee AuthorDate: 2026-04-14 13:20:38 +0000 Commit: Alexander Ziaee CommitDate: 2026-04-20 16:18:41 +0000 freebsd-base.7: Break examples into subsections Break the examples into subsections, so that we can have multi-step examples. MFC after: 3 days (to 15 only) Discussed with: ivy Differential Revision: https://reviews.freebsd.org/D55526 (cherry picked from commit 5f922bd20d81af4b5759b8f104d5c22ee3e5cd1b) --- share/man/man7/freebsd-base.7 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/share/man/man7/freebsd-base.7 b/share/man/man7/freebsd-base.7 index 383808579487..aaa5a875df71 100644 --- a/share/man/man7/freebsd-base.7 +++ b/share/man/man7/freebsd-base.7 @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd December 4, 2025 +.Dd February 26, 2026 .Dt FREEBSD-BASE 7 .Os .Sh NAME @@ -183,13 +183,14 @@ The system test suite, installed in All available system kernels. .El .Sh EXAMPLES +.Ss Install a single piece of userland Install the .Xr vi 1 text editor on the running system: .Bd -literal -offset indent pkg install FreeBSD-vi .Ed -.Pp +.Ss Install userland to a jail Install a new .Xr jail 8 system using the @@ -198,17 +199,17 @@ package set: .Bd -literal -offset indent pkg -r /jails/myjail install FreeBSD-set-minimal-jail .Ed -.Pp +.Ss Install native compilers Install C/C++ compilers on the running system: .Bd -literal -offset indent pkg install FreeBSD-set-devel .Ed -.Pp +.Ss Update the currently running system Apply available updates to the running system: .Bd -literal -offset indent pkg upgrade -r FreeBSD-base .Ed -.Pp +.Ss Install cross compilers Install the development toolchain for FreeBSD/powerpc64le in an alternate root (for example, to support cross-compiling software for a different target than the host system): From nobody Mon Apr 20 16:18:57 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fzrJy2GHXz6WsHp for ; Mon, 20 Apr 2026 16:18:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fzrJx6vgsz3JJc for ; Mon, 20 Apr 2026 16:18:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776701938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sb8LMiC11nE5Ar/bvDFoRqN8y8yqlyTq1m4RrwRinyU=; b=i6W77Wtwr2D6VMSylEMQyhkrecOpNGe/v7HuyHW/AERLGwyD6f0ONSX2bb4YhqnTgvwqkg tvGUvp8N0tsRKGwHDamS0gZsIKE8Mgix/BphmLAHwZGlni1Q4W0/PEfPCTG7jIb9bTfzuA 7qWHh+PVmooW1ddHb+SYAqzSV/yfP9UFCPrtYlRP3dLFkNm3e/bLXiPa8Q0xqyDIrzfIGK BcVqoX3ymDAeFvQYQsfElrJ8Gy0bRzEsaWN38GYW8dZ8YfJmwC3A227CMU3De4NSWZGj0M z/3xLiuvAKOBnwIQ3XBxlEWK9WXbx1cnAfX+fKYT4+4dB5WspfqvUC6J4qyU7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776701938; a=rsa-sha256; cv=none; b=csJrRRtXF7afKGGB5ay2TswGdj9K8fI/YEms2mI4CCQFYBPCzocptEt5E5Hb2yL02iZXzw JZe70FSa+kAx2ir1zckOms+WuuQC/L5d2vaY/iXZOAu5WDKXw3NA6tvL/CsASMUxx3K3jQ ZRb2DzImkJzTWAsdNVvd3D853fN4T0+/d/6X7rQve0m0Xbt7AMM1inwJM6MNb6rWMhITI9 0Qef2RI6m3JvS0iBtDHq+B+Zu2AYMJUIWmYGsc1uDxyLwrdIhLa2pECN6aKNm16yRP1bSQ ES7Xvc9yJPQRlVtKKx+CKkOphLUY+nDEALQEv1IjQuOa5/1wVWypieKYjLuPWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776701938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sb8LMiC11nE5Ar/bvDFoRqN8y8yqlyTq1m4RrwRinyU=; b=v0oGaOeQ6+QKP7DUK6BfYYVQax799i5NlA3ZaTlNwkXWdJZaRf+6nCe7L6kXh9c1AECwu8 /WomW3gDcbiyyZr/TntA5CxF3Cc3tvbYn198BZfPBlwf2UGYuo6pecqkCCK+W3NZYa3vab FjKrPUimLuVyCM1rqAy7nPtvXaWI31erE2MosOAoQ+oknTXt7pcXZBp4sJQfe0OYa/+lkP YwP1fPc6Itlwf8QCndsCewQ3jnhcWGheF92/CqDvguth54K0geg/UUFF2bOLro+MbNCBB1 RBEjur5ZjFTNtuce15ydyWXpefPY/6Og/Rzn+5ySzXyucaG8bmoCYe+JfsOgZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fzrJx6Vvwz13kh for ; Mon, 20 Apr 2026 16:18:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38999 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 20 Apr 2026 16:18:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: abde7fe258c1 - stable/15 - freebsd-base.7: Add an example for unregistering List-Id: Commits to the stable branches 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: abde7fe258c1e010c29ba7212c4f0af275fba64a Auto-Submitted: auto-generated Date: Mon, 20 Apr 2026 16:18:57 +0000 Message-Id: <69e651f1.38999.241b1cfd@gitrepo.freebsd.org> The branch stable/15 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=abde7fe258c1e010c29ba7212c4f0af275fba64a commit abde7fe258c1e010c29ba7212c4f0af275fba64a Author: Alexander Ziaee AuthorDate: 2026-04-14 13:21:50 +0000 Commit: Alexander Ziaee CommitDate: 2026-04-20 16:18:41 +0000 freebsd-base.7: Add an example for unregistering MFC after: 3 days Reviewed by: ivy, emaste Discussed with: bapt, des, emaste, ivy, phk, pi Differential Revision: https://reviews.freebsd.org/D55458 (cherry picked from commit 998d501ae61a3e3c800e6d102d8ab5253c7c1b91) --- share/man/man7/freebsd-base.7 | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/share/man/man7/freebsd-base.7 b/share/man/man7/freebsd-base.7 index aaa5a875df71..c690a7a9e0b9 100644 --- a/share/man/man7/freebsd-base.7 +++ b/share/man/man7/freebsd-base.7 @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd February 26, 2026 +.Dd April 1, 2026 .Dt FREEBSD-BASE 7 .Os .Sh NAME @@ -217,6 +217,39 @@ for a different target than the host system): pkg -r /ppcdev -oABI=FreeBSD:16:powerpc64le \e install FreeBSD-set-devel .Ed +.Ss Unregister a currently running system +Systems managed through +.Xr pkg 8 +can be unregistered from the package manager \(em +for example to upgrade in-place via +.Dq make installworld . +See +.Xr build 7 . +.Pp +To unregister the base system from the package manager: +.Bd -literal -offset indent +pkg unregister -fg 'FreeBSD-\e*' +.Ed +.Pp +Then, disable the base system package repository. +If a configuration file was created in +.Pa /usr/local/etc/pkg/repos/ +to enable base system packages, remove it: +.Bd -literal -offset indent +rm /usr/local/etc/pkg/repos/FreeBSD-base.conf +.Ed +.Pp +Alternatively, if it is desired to keep it, +edit the file and change +.Dq Li enabled: +to +.Dq Li no +to disable the entry. +.Pp +.Sy Warning : +This is a destructive action +which will prevent updating the base system via +.Xr pkg 8 . .Sh SEE ALSO .Xr build 7 , .Xr pkg 8 , @@ -225,3 +258,4 @@ pkg -r /ppcdev -oABI=FreeBSD:16:powerpc64le \e Support for installing the base system as packages was introduced in .Fx 15.0 . Earlier releases supported a subset of this functionality. +Support for unregistering an existing installation appeared in pkg 2.5. From nobody Mon Apr 20 16:18:59 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fzrJz1NJHz6WsbY for ; Mon, 20 Apr 2026 16:18:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fzrJz0ZjSz3Jbg for ; Mon, 20 Apr 2026 16:18:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776701939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s3URvCs4NCi5YuiJ+1WIzH8Y4GCl2nN58obpYFlCalc=; b=YYjRHJiCk6sUy85VXV96WIQGoR3ZkLc8UqV1/4IVwxPKBlNXQDlUcC1dlE8YouXHCIOmy3 S6xtrg6N9hu7AQIwaItuOLaNkgYrQTUExxJ8hbLSi24V+Eil4jP8M+e8Y5mEWCUSdVt1/k OQ8Mzg0EDJoICPvcp3X5FjrmEyBjBTOb3tISzxou+c8wM8TPfNexBz4tUOFS2qab2xPX5z oOXVBmDXP3J9qzmEYAKxG0fvAiYda2OdWkMvuh9E0pSQYa4EK8q5NQ45J6L0DbwfIEanxn mZF8EgmarB4QkbiKqadaHPHuExOcUsY7Q+fjoYjJiWHdAGVdBnbw70YronSLpw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776701939; a=rsa-sha256; cv=none; b=nNt0bjocn/5wd91Jqf9MTyR3WNWme01afRE4dycZD1+5/PIenH0SKFkFC3cKd72HjBkQDR uy0UgYQ7Jr2dX3jSoR2q85E/iiF+PfYB9+4NAs8MmVrEaMLgPKSvLG2Usi38WYAIXrTzlL q5uaAKJpEq9cEguV6p4V0Nb2IuICM/iM7UBHcydslXscKwWcJ+we8FmCKnxf5SdaiQwAIS mn5d7gya1gkWPZvurC9kenfy6e+DUn9TeqLwvClg7udNng1QJpwCF99jU1l+fxQkYqH7aw dprucyKgPR1Aq+FZboc501MSnNuAGv+MM6uCGhUV9BMZg1VG29EMoqcewFVkBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776701939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s3URvCs4NCi5YuiJ+1WIzH8Y4GCl2nN58obpYFlCalc=; b=SmpodObHEgV81XFazXPsu/ih9YWWUn8t+bhoFUaR5Yoj9v6GPueAHVeikqoJLBo3AVVART Ptx99AuN9VlmqLVu3HHpAztAPVmOU704wKPWEvCvLClx67f4djIfJ+lydH7fVrAeqw8YMj bfgprz6E/Xrp/XkcKfTUKphw+EdWsjVxBSQWNgIBf/cXHeCDc/8WBGf2AKfvOTp8xJaOw1 mNOJahmiFToK3TKYh4L7wEPQkKyuSpwTq0ZtOo7FyDqcDoP4DheXJ0E2aWN1XM4unZXA3n Z7rRdvFZoisb4JgEzV2jGrJVSrNzXinxeBzecFDSdbg4OExogx8pVUXZZNZvZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fzrJz09Zgz14SC for ; Mon, 20 Apr 2026 16:18:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38e90 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 20 Apr 2026 16:18:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: c348c928a203 - stable/15 - ntp_adjtime.2: Increase visibility List-Id: Commits to the stable branches 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: c348c928a2034945a7e187a7edbf8ecbb205a4f4 Auto-Submitted: auto-generated Date: Mon, 20 Apr 2026 16:18:59 +0000 Message-Id: <69e651f3.38e90.10f3c89c@gitrepo.freebsd.org> The branch stable/15 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=c348c928a2034945a7e187a7edbf8ecbb205a4f4 commit c348c928a2034945a7e187a7edbf8ecbb205a4f4 Author: Alexander Ziaee AuthorDate: 2026-04-17 00:30:38 +0000 Commit: Alexander Ziaee CommitDate: 2026-04-20 16:18:41 +0000 ntp_adjtime.2: Increase visibility + s/ntp/ntpd/ for correctness + apropos results in document description + silence a linter warning by escaping a period with a zero-width space MFC after: 3 days (cherry picked from commit b49b3ccd40bda02f530c679f23f42ba9e0e4b2e2) --- lib/libsys/ntp_adjtime.2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libsys/ntp_adjtime.2 b/lib/libsys/ntp_adjtime.2 index 5be5194a9c1d..ed43fb79a9f1 100644 --- a/lib/libsys/ntp_adjtime.2 +++ b/lib/libsys/ntp_adjtime.2 @@ -27,13 +27,13 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 13, 2005 +.Dd March 22, 2026 .Dt NTP_ADJTIME 2 .Os .Sh NAME .Nm ntp_adjtime , .Nm ntp_gettime -.Nd Network Time Protocol (NTP) daemon interface system calls +.Nd Network Time Protocol daemon (ntpd) interface system calls .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -59,7 +59,7 @@ The time offset and related variables which are set by are used by .Fn hardclock to adjust the phase and frequency of the phase- or frequency-lock loop -(PLL resp. FLL) which controls the system clock. +(PLL resp\&. FLL) which controls the system clock. .Pp The .Fn ntp_gettime From nobody Tue Apr 21 05:21:16 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g09gf6KYNz6b96K for ; Tue, 21 Apr 2026 05:21:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g09gf0FLdz3pWx for ; Tue, 21 Apr 2026 05:21:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776748878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uvOjtSDBQDNFTXaQXzuQBo7FavZB/jI+cGczPTpMmes=; b=aV0a6xd3nIp0RYepEtA6ytj7+c2AGnqKYXJg+hrNv1x2isDVke2zGGtCivuF4xZU6/2TfX G1SeOhnTtE+6f/g3erSyoWVyJbiw+NVHaNmvnS+gyTnQqfQVaC7bCsBbImlEQPBbbaYI/E chZDngg0zyotq03r5UjGXD2OsHDjZ6Ds43ASeVw516IMtYyqS+S1qHL4HWiAikl8rP1daG 8HH8nNFY8PxmKt0VzKST1Or4CXFvDmYNRnYnk8cD1+/l1qZDZaL3y0YGAjPg1Sn/lhkfqd BylnyjlgMqV1W2uQtmNsuZny/fqR17xatxn7NjCsZAef77agIj+JjhZlmm/mwQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776748878; a=rsa-sha256; cv=none; b=Jvrmf2H2ucP4HDvljWCJvZzRYSrMiKbozaktBvjPD4oVhkOXnYBEagP2eGyKORpPR8t/uL gXoigItnwKcSAF47RBcSpyq4GUAx0/WsfZQED45M6WddqqKHjsxZJVorAUz5fHOguczQ2Y N4eKKi/HUbktEYALUxIM4nuOjTxfj8kycJ8LrDygZ4TFQi6GhDvz6XGy9r8BRe6VmWuVXz GjqAHYgYcR51Y+bhcMlR6rrT7mTi5nf8UJySt72sZwnUM7crRuk7grCu4JudEtXpCYBU9/ tOUfb3ASdKAJpVuwPIxEWDI0/KY8hBkZSYge+xRsBLsGj77kK14mLPmW/wBdKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776748878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uvOjtSDBQDNFTXaQXzuQBo7FavZB/jI+cGczPTpMmes=; b=oIKrq/TEKbJfQ8/0Tute1vnmfK6+MhMJj3c3GWJRlYeb9dICb+eO5VLvXeSf/Omw5EjPjO Ork6sS4VgKOeuOpy8xIp/Io3C2PFtht8SU9/wrZVIIjojIEKJWqy7FERqKkuOsHtyETnw2 ziSxwK8tVyHW4ex/ifBAeHRkdOel1WjbBbT+FErggOa5LGvhS7ly0cb/V7IBYxAyPEQeYP 7ejh83yslMZESO8xpcTpTsDlMcJuhxpwN2Go2dA1BIq1dIQC4SKLLlJqORIgobP474NmK1 Ux+4GR6eR6h3PkigiChu9u05kgJgA07uOIFatys+n6442JniBxXgLnaG14rDdg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g09gd587QzTVn for ; Tue, 21 Apr 2026 05:21:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b798 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 05:21:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Dimitry Andric From: Enji Cooper Subject: git: 5bb741537b80 - stable/14 - mtree: stop creating /usr/share/doc/ncurses List-Id: Commits to the stable branches 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: 5bb741537b80369ac1d09f72e92803582a6a9ed9 Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 05:21:16 +0000 Message-Id: <69e7094c.3b798.4301d35@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=5bb741537b80369ac1d09f72e92803582a6a9ed9 commit 5bb741537b80369ac1d09f72e92803582a6a9ed9 Author: Dimitry Andric AuthorDate: 2026-02-10 14:32:52 +0000 Commit: Enji Cooper CommitDate: 2026-04-21 05:20:58 +0000 mtree: stop creating /usr/share/doc/ncurses In base 68ad2b0d7af2a the ncurses html documentation was removed, and entries added to ObsoleteFiles.inc to get rid of /usr/share/doc/ncurses, but the directory was still being re-created via BSD.usr.dist. Remove it from there too. Fixes: 68ad2b0d7af2a MFC after: 1 month (cherry picked from commit 212272a43767c3d7be3ddb87605612f6164774c1) --- etc/mtree/BSD.usr.dist | 2 -- 1 file changed, 2 deletions(-) diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index 741d0059b57a..07997591a00e 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -232,8 +232,6 @@ clang .. .. - ncurses - .. ntp drivers icons From nobody Tue Apr 21 08:52:04 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0GLr3FPZz6bRrx for ; Tue, 21 Apr 2026 08: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0GLr2cnNz4Nkv for ; Tue, 21 Apr 2026 08: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=1776761524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mj8GKlB+fRIhMO2nAOUnwQJ7nx5J11zaR9G38Y9+Kq0=; b=USSRArssZWmZWspuxJlDJInijGgwCe9Z2nL/f8h5RILs2oaEjluBeFly5ZUTLsH6WHwTog a+2oaSq+YlIKG+mY8awGRLrh0p287Zgo08n8/fkVt2QXKGcNuIn4GsUhG+kb1P9sD1hVHU KWrZ8VvqXcoQhqBPUt3/IleBOXtca43l1DyRx9gdmFFv9c9Hkd8sYOosmRUmcpKGTuSAC3 UIfdcF9Z5uFBsZB/6Cwz6tBpxbmdUT1r+TBQ554Xr5bL3h1eePadgddSnvVpRkF0PN2+xt aZfHCX5OazI4PKXi/WJwRMcsknZeBS9hzHh/BYAUR7pb3CrcJ1qj36Q75KcVQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776761524; a=rsa-sha256; cv=none; b=X94pwOb12pqjiCR4Ls9e3953/tB8QPA72uSkwMIE9X9/98KwJ5sPDkWrmsIpzgrSGOrr6J rIECW14qNu4rfJ/MQUq+IZhUE0nKnbfFyzoeVo2mrKn6UrouiFr1OPsjSslNMq25PcKitO YB0yv/SsRoAk4IDeYo4T7gNejLzeVHF7FG2xzCgq0I5g6PsVZijuxTPwzxtr5eNGvj2aNl 4Ns31GroX0iqDWFQc9hbNizAiaPfnMgtc1uo7t/Jso2TL2fhx9FDfev0w9SSzZO9qKU5hW TICrPmW/MQPPc8NSb9V2H8ZgmFGpzVyd/8Ys0FnlEj+WQmhcjHJIO8rTdFZ53w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776761524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mj8GKlB+fRIhMO2nAOUnwQJ7nx5J11zaR9G38Y9+Kq0=; b=SnG6CNboLLPYdvE+9bGveToK3mzcjctSpv7eDbRv3IyyhJ021WBjNweaKaoM3KDs62c7qZ N4N3xBx9qEvk+J3zL+IpLieluh4zd2azdoGQRpaa2yZJX3UxOiA4f0SDE/4+zPbmRaCK/L 1N1BbMx3DsXxU9dqn9k4T113NfWlTUHliZVJiZcnLCuLraKxSBOZ3ykrZBJverTOseqV53 Ay/PzfNL5vGUTJdIE0CPw04gjZYB6q7TXXCUOr9wniCFQWCdmbtaquhfFUG8JQKfnyDDtd AJSK4kHbiuMnU4geLY4IIZ6o9rDLazZsiB4PGvbA91OFwDMAewZAp6LTeedcWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0GLr2BrPzd7b for ; Tue, 21 Apr 2026 08:52:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 321ac by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 08:52:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Pouria Mousavizadeh Tehrani Subject: git: 43caeea1eac8 - stable/15 - routing: Make ip[6]_tryforward() FIB-aware for local 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: pouria X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 43caeea1eac8e8eaa2dd89479e5a699f786de88f Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 08:52:04 +0000 Message-Id: <69e73ab4.321ac.6e164e0c@gitrepo.freebsd.org> The branch stable/15 has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=43caeea1eac8e8eaa2dd89479e5a699f786de88f commit 43caeea1eac8e8eaa2dd89479e5a699f786de88f Author: Pouria Mousavizadeh Tehrani AuthorDate: 2026-04-11 12:58:28 +0000 Commit: Pouria Mousavizadeh Tehrani CommitDate: 2026-04-21 08:50:36 +0000 routing: Make ip[6]_tryforward() FIB-aware for local traffic `ip_tryforward()` and `ip6_tryforward()` checks whether the destination address is local or not without considering if it belongs to the current FIB. If the destination is local but not in our FIB, forward it instead of returning it to ip_input(). PR: 292319 Reviewed by: zlei MFC after: 1 week MFC to: stable/15 Differential Revision: https://reviews.freebsd.org/D56353 (cherry picked from commit bf41d86df0d9dc4a1342c579f4e72db3c66b3443) --- sys/netinet/ip_fastfwd.c | 4 ++-- sys/netinet6/ip6_fastfwd.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netinet/ip_fastfwd.c b/sys/netinet/ip_fastfwd.c index 51e7c2fbc4b0..c567d28f24f0 100644 --- a/sys/netinet/ip_fastfwd.c +++ b/sys/netinet/ip_fastfwd.c @@ -294,7 +294,7 @@ ip_tryforward(struct mbuf *m) /* * Is it for a local address on this host? */ - if (in_localip(ip->ip_dst)) + if (in_localip_fib(ip->ip_dst, M_GETFIB(m))) return m; IPSTAT_INC(ips_total); @@ -329,7 +329,7 @@ ip_tryforward(struct mbuf *m) /* * Is it now for a local address on this host? */ - if (in_localip(dest)) + if (in_localip_fib(dest, M_GETFIB(m))) goto forwardlocal; /* * Go on with new destination address diff --git a/sys/netinet6/ip6_fastfwd.c b/sys/netinet6/ip6_fastfwd.c index 7139267722b7..8a8468ae7da6 100644 --- a/sys/netinet6/ip6_fastfwd.c +++ b/sys/netinet6/ip6_fastfwd.c @@ -114,7 +114,7 @@ ip6_tryforward(struct mbuf *m) IN6_IS_ADDR_LINKLOCAL(&ip6->ip6_src) || IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_dst) || IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src) || - in6_localip(&ip6->ip6_dst)) + in6_localip_fib(&ip6->ip6_dst, M_GETFIB(m))) return (m); /* * Check that the amount of data in the buffers From nobody Tue Apr 21 09:38:06 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0HN40Kr3z6bVdk for ; Tue, 21 Apr 2026 09:38:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0HN35bvWz3KyC for ; Tue, 21 Apr 2026 09:38:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776764291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gNHLv1a1WoFTaFIGlAYW47g+FSwLzE2duf/RZqsdhQQ=; b=Xiq4mE7++Ypb2lvYmBjDlWlo0FWLSP7gKbPDiIICcRDXHomSMPlCEYzbiHIz98Wjuz0+rw DQMmomBezJOy839TpkEv1rvSagtO6qHgMT5idFM/DeylHZWHe7ySqnay8a9yHEFIJcSPEm rnUGRsV8bL6if16sXWMax0OX41iU241IGTWlsb/XBXuwldr5vPx4EDxSRb6ZHfiWWYVC1N 7AbPZiU+Y2Py8//cEX7lk/MQe7qnjtnTr2nY1UsOnv7e85gQdqhR7iYFmuLtAAi5Li91qS /gfAzllGEsKR+LCtOYtmbZ4pYwM77Ab3ZnJSsNvmkM3+cKJ2LcWF03NAyXsp4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776764291; a=rsa-sha256; cv=none; b=k4bhqnYJ6BNnabAfI2H0qPtML0LcV0SrKcAkyx9hxYVShSd4YngHlGtJVDFq3Z+s0NX8Bh g2WjbVHI9XXWEdZ8LNRBxt1NQhlH8F4aXuKQSI5ETpibBGgka0lfdmOPt6C5R6/AKvVV4c D8TkaQYtPYZ6SgaTHon4jNikazvluJoc1urw0fi5/U3DlTIgiHBIjBvEZJf8S1RJ03OHae G2kXX8sDjbvYOn/W1LsEPDW4SFmijVgsiPu8k7eTM5ZRjDWpPIeRq+m9uBc4D9Pa21eUsC b3jjtLJOa5smlfhNcT9snYfE8VXsaDqk5+xvOJNrHk5czbVcdgKrjpyXb0BgcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776764291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gNHLv1a1WoFTaFIGlAYW47g+FSwLzE2duf/RZqsdhQQ=; b=wjx028hi6COcvGXVlqQLuAxYAWTzHnXrASaf/wznCTyrupJmmRV/mKhFDZXiPTmV+6FwqM ECz1gGF4KOhdOYhOKSCFT1JPlrCzc0mSas7Up/AUcCSSKgpehgetgldWs6+GyMHrmXcHZk nC2n4RiYXbhpDo5XHqTsDGNmj5Tevb303MMKkfHaYTgmeA5kZMZP9D2Z0hES5mitgdT/Rw akFCAE2soVxPaIsffaPfyNqx/E1ZrD/vSwuMYFod+6BQpD0QBvGnE+/NHathUcy8PcHPZC GEOaG8WTIdXp2Z6facr4gk2Loq1ItDWx6UiS8INA+gO0PjIUXKR94CB/gE7kAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0HN34l1ZzfLS for ; Tue, 21 Apr 2026 09:38:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 370eb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 09:38:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Goran=?utf-8?Q? Meki=C4=87?= From: Christos Margiolis Subject: git: c1df496f940a - stable/15 - sound examples: Add mmap example List-Id: Commits to the stable branches 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: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c1df496f940a4035f8a5dbe8e36b2ff95f97dc71 Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 09:38:06 +0000 Message-Id: <69e7457e.370eb.24343295@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=c1df496f940a4035f8a5dbe8e36b2ff95f97dc71 commit c1df496f940a4035f8a5dbe8e36b2ff95f97dc71 Author: Goran Mekić AuthorDate: 2026-04-14 10:57:53 +0000 Commit: Christos Margiolis CommitDate: 2026-04-21 09:37:57 +0000 sound examples: Add mmap example This example opens separate OSS capture and playback channels in mmap mode, places them into a sync group, and starts them together so both ring buffers advance on the same device timeline. It then monitors the capture mmap pointer with SNDCTL_DSP_GETIPTR, converts that pointer into monotonic absolute progress using the reported block count, and copies newly recorded audio from the input ring to the matching region of the output ring. The main loop is driven by an absolute monotonic frame clock rather than a fixed relative usleep delay. Wakeups are scheduled from the sample rate using a small frame step similar to the SOSSO timing model, while the audio path itself stays intentionally simple: just copy input to output, with no explicit xrun recovery or processing beyond ring wraparound handling. MFC after: 1 week Reviewed by: christos Differential Revision: https://reviews.freebsd.org/D53749 (cherry picked from commit 3524d4ebbe1f562dd76dc553c085386aadfd2682) --- share/examples/Makefile | 1 + share/examples/sound/mmap.c | 297 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 298 insertions(+) diff --git a/share/examples/Makefile b/share/examples/Makefile index 0174792d2ecb..d977f2e5a0da 100644 --- a/share/examples/Makefile +++ b/share/examples/Makefile @@ -323,6 +323,7 @@ SE_DIRS+= sound SE_SOUND= \ kqueue.c \ midi.c \ + mmap.c \ oss.h \ poll.c \ select.c \ diff --git a/share/examples/sound/mmap.c b/share/examples/sound/mmap.c new file mode 100644 index 000000000000..7f165d417020 --- /dev/null +++ b/share/examples/sound/mmap.c @@ -0,0 +1,297 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2026 Goran Mekić + * + * 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. + */ + +/* + * This program demonstrates low-latency audio pass-through using mmap. + * Opens input and output audio devices using memory-mapped I/O, + * synchronizes them in a sync group for simultaneous start, + * then continuously copies audio data from input to output. + */ + +#include + +#include "oss.h" + +/* + * Get current time in nanoseconds using monotonic clock. + * Monotonic clock is not affected by system time changes. + */ +static int64_t +gettime_ns(void) +{ + struct timespec ts; + + if (clock_gettime(CLOCK_MONOTONIC, &ts) != 0) + err(1, "clock_gettime failed"); + return ((int64_t)ts.tv_sec * 1000000000LL + ts.tv_nsec); +} + +/* + * Sleep until the specified absolute time (in nanoseconds). + * Uses TIMER_ABSTIME for precise timing synchronization. + */ +static void +sleep_until_ns(int64_t target_ns) +{ + struct timespec ts; + + ts.tv_sec = target_ns / 1000000000LL; + ts.tv_nsec = target_ns % 1000000000LL; + if (clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &ts, NULL) != 0) + err(1, "clock_nanosleep failed"); +} + +/* + * Calculate the number of frames to process per iteration. + * Higher sample rates require larger steps to maintain efficiency. + */ +static unsigned +frame_stepping(unsigned sample_rate) +{ + return (16U * (1U + (sample_rate / 50000U))); +} + +/* + * Update the mmap pointer and calculate progress. + * Returns the absolute progress in bytes. + * + * fd: file descriptor for the audio device + * request: ioctl request (SNDCTL_DSP_GETIPTR or SNDCTL_DSP_GETOPTR) + * map_pointer: current pointer position in the ring buffer + * map_progress: absolute progress in bytes + * buffer_bytes: total size of the ring buffer + * frag_size: size of each fragment + * frame_size: size of one audio frame in bytes + */ +static int64_t +update_map_progress(int fd, unsigned long request, int *map_pointer, + int64_t *map_progress, int buffer_bytes, int frag_size, int frame_size) +{ + count_info info = {}; + unsigned delta, max_bytes, cycles; + int fragments; + + if (ioctl(fd, request, &info) < 0) + err(1, "Failed to get mmap pointer"); + if (info.ptr < 0 || info.ptr >= buffer_bytes) + errx(1, "Pointer out of bounds: %d", info.ptr); + if ((info.ptr % frame_size) != 0) + errx(1, "Pointer %d not aligned to frame size %d", info.ptr, + frame_size); + if (info.blocks < 0) + errx(1, "Invalid block count %d", info.blocks); + + /* + * Calculate delta: how many bytes have been processed since last check. + * Handle ring buffer wraparound using modulo arithmetic. + */ + delta = (info.ptr + buffer_bytes - *map_pointer) % buffer_bytes; + + /* + * Adjust delta based on reported blocks available. + * This accounts for cases where the pointer has wrapped multiple times. + */ + max_bytes = (info.blocks + 1) * frag_size - 1; + if (max_bytes >= delta) { + cycles = max_bytes - delta; + cycles -= cycles % buffer_bytes; + delta += cycles; + } + + /* Verify fragment count matches expected value */ + fragments = delta / frag_size; + if (info.blocks < fragments || info.blocks > fragments + 1) + warnx("Pointer block mismatch: ptr=%d blocks=%d delta=%u", + info.ptr, info.blocks, delta); + + /* Update pointer and progress tracking */ + *map_pointer = info.ptr; + *map_progress += delta; + return (*map_progress); +} + +/* + * Copy data between ring buffers, handling wraparound. + * The copy starts at 'offset' and copies 'length' bytes. + * If the copy crosses the buffer boundary, it wraps to the beginning. + */ +static void +copy_ring(void *dstv, const void *srcv, int buffer_bytes, int offset, + int length) +{ + uint8_t *dst = dstv; + const uint8_t *src = srcv; + int first; + + if (length <= 0) + return; + + /* Calculate bytes to copy before wraparound */ + first = buffer_bytes - offset; + if (first > length) + first = length; + + /* Copy first part (up to buffer end or length) */ + memcpy(dst + offset, src + offset, first); + + /* Copy remaining part from beginning of buffer if needed */ + if (first < length) + memcpy(dst, src, length - first); +} + +int +main(int argc, char *argv[]) +{ + int ch, bytes; + int frag_size, frame_size, verbose = 0; + int map_pointer = 0; + unsigned step_frames; + int64_t frame_ns, start_ns, next_wakeup_ns; + int64_t read_progress = 0, write_progress = 0; + oss_syncgroup sync_group = { 0, 0, { 0 } }; + struct config config_in = { + .device = "/dev/dsp", + .mode = O_RDONLY | O_EXCL | O_NONBLOCK, + .format = AFMT_S32_NE, + .sample_rate = 48000, + .mmap = 1, + }; + struct config config_out = { + .device = "/dev/dsp", + .mode = O_WRONLY | O_EXCL | O_NONBLOCK, + .format = AFMT_S32_NE, + .sample_rate = 48000, + .mmap = 1, + }; + + while ((ch = getopt(argc, argv, "v")) != -1) { + switch (ch) { + case 'v': + verbose = 1; + break; + } + } + argc -= optind; + argv += optind; + + if (!verbose) + printf("Use -v for verbose mode\n"); + + oss_init(&config_in); + oss_init(&config_out); + + /* + * Verify input and output have matching ring-buffer geometry. + * The passthrough loop copies raw bytes at the same offset in both mmap + * buffers, so both devices must expose the same total byte count. + * They must also use the same max_channels because frame_size is + * derived from that value and all mmap pointers/lengths are expected to + * stay aligned to whole frames on both sides. If channels differed, the + * same byte offset could land in the middle of a frame on one device. + */ + if (config_in.buffer_info.bytes != config_out.buffer_info.bytes) + errx(1, + "Input and output configurations have different buffer sizes"); + if (config_in.audio_info.max_channels != + config_out.audio_info.max_channels) + errx(1, + "Input and output configurations have different number of channels"); + + bytes = config_in.buffer_info.bytes; + frag_size = config_in.buffer_info.fragsize; + frame_size = config_in.sample_size * config_in.audio_info.max_channels; + if (frag_size != config_out.buffer_info.fragsize) + errx(1, + "Input and output configurations have different fragment sizes"); + + /* Calculate timing parameters */ + step_frames = frame_stepping(config_in.sample_rate); + frame_ns = 1000000000LL / config_in.sample_rate; + + /* Clear output buffer to prevent noise on startup */ + memset(config_out.buf, 0, bytes); + + /* Configure and start sync group */ + sync_group.mode = PCM_ENABLE_INPUT; + if (ioctl(config_in.fd, SNDCTL_DSP_SYNCGROUP, &sync_group) < 0) + err(1, "Failed to add input to syncgroup"); + sync_group.mode = PCM_ENABLE_OUTPUT; + if (ioctl(config_out.fd, SNDCTL_DSP_SYNCGROUP, &sync_group) < 0) + err(1, "Failed to add output to syncgroup"); + if (ioctl(config_in.fd, SNDCTL_DSP_SYNCSTART, &sync_group.id) < 0) + err(1, "Starting sync group failed"); + + /* Initialize timing and progress tracking */ + start_ns = gettime_ns(); + read_progress = update_map_progress(config_in.fd, SNDCTL_DSP_GETIPTR, + &map_pointer, &read_progress, bytes, frag_size, frame_size); + write_progress = read_progress; + next_wakeup_ns = start_ns; + + /* + * Main processing loop: + * 1. Sleep until next scheduled wakeup + * 2. Check how much new audio data is available + * 3. Copy available data from input to output buffer + * 4. Schedule next wakeup + */ + for (;;) { + sleep_until_ns(next_wakeup_ns); + read_progress = update_map_progress(config_in.fd, + SNDCTL_DSP_GETIPTR, &map_pointer, &read_progress, bytes, + frag_size, frame_size); + + /* Copy new audio data if available */ + if (read_progress > write_progress) { + int offset = write_progress % bytes; + int length = read_progress - write_progress; + + copy_ring(config_out.buf, config_in.buf, bytes, offset, + length); + write_progress = read_progress; + if (verbose) + printf("copied %d bytes at %d (abs %lld)\n", + length, offset, (long long)write_progress); + } + + /* Schedule next wakeup based on frame timing */ + next_wakeup_ns += (int64_t)step_frames * frame_ns; + if (next_wakeup_ns < gettime_ns()) + next_wakeup_ns = gettime_ns(); + } + + if (munmap(config_in.buf, bytes) != 0) + err(1, "Memory unmap failed"); + config_in.buf = NULL; + if (munmap(config_out.buf, bytes) != 0) + err(1, "Memory unmap failed"); + config_out.buf = NULL; + close(config_in.fd); + close(config_out.fd); + + return (0); +} From nobody Tue Apr 21 15:43:03 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0RT4284Yz6WtRb for ; Tue, 21 Apr 2026 15:43: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0RT36pH6z3MFd for ; Tue, 21 Apr 2026 15:43:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SS6xaMzas4peou45vii7wyIJom/7LInYxli2JiDlFio=; b=bFDo+eiKhyJ8xGk8shtbzBwfSyMZ/mJlUxMy9ZOqxFcCeinJDWJoSz6htibuMr7AdMcE/v 8RjHU2Q+G+CiaopsOWI0tKBzFzHvA/YCLKp/7Q1xiDUQ7P4KAqPs0uyle2jco7G/YWO1gF Ir3qCAbMXQ83WA6i8m8li454usbIilXcxZEnIfMwM+vKMSihs3lg/wKiFhLE0cd9N5Bzo/ EVWuC6TWKTEk6VP9ji0eZhE5vDMI22In3Hb9PH4V3etYzrMwi5flm3g+bmInP7XkJUiSSo GtoAx2VlHowLZ7+CMfwCasBR0qjTa7s1hE4R8q5ZMfTBhQnj9d7FopzW7lYDqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776786184; a=rsa-sha256; cv=none; b=F/fonPy6CheE+ShaUbDv0Wa558nL370BwSuUmS4+MMCqfeZHEzn0LrtrbFC6qnIHQRmaea UuNhMZabPK61vW4dFOp5ZoaetmTNK1zkYtTwwTh5sEm+AVHvEy7hxA5sp/DogJQZjUcKE8 WpYhJt7G31DBdj+MShh4y3QjWIrI++1mvOv6ACHWZ5qTcGbe5vj6/Q2W8tr8HYLS8fCUS1 P0MILiHKpAq0/bM44IXVfmhFegniVd3E8d7sLNb6Ovi2yMC9MjTPdy13zfn5sDuYzsRZ7A /2amNRq30sbAbDJ1rhyyfAAgzVMTXF7vxoQ0Q97ABH9o6FR4cLhnQjJvf3xZjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SS6xaMzas4peou45vii7wyIJom/7LInYxli2JiDlFio=; b=c4tXuLlFsUIW//dDhbw8d9CFciI/OVy8XWZrX+gYmZMN6+o4M4qVEEU4q2CSUQWrqictRu VxBJ9R/VgyZaDUoMZWonllGJRSMujRrEOl979oouCmMWe/YrU/lzPNBWI+sTzxnatc+Yls wgtz1SbgiGFOG6xYaDV7kqVIR5IGMtGEVIrbK6ES2MBkPL2hG4FOmSyM3ZOVBpt+zNMQYA qUEqqWa3X/KmmCCaEmZNue+rKixCZTD8JYU32gnakwq9Sh6f4gR8z0Ydjz/yzhXULTAhTm Av3fsLKi5+yFyCDqm8vjIJg+KQIvPOuAhgogcvdpLl9fcEA8SnhoAIApjwNtRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0RT36PXfzqyT for ; Tue, 21 Apr 2026 15:43:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 344d5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 15:43:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 9331e62e8b80 - stable/15 - pkru: Fix handling of 1GB largepage mappings List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 9331e62e8b80b3047470ede2845664d89583302a Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 15:43:03 +0000 Message-Id: <69e79b07.344d5.39410391@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9331e62e8b80b3047470ede2845664d89583302a commit 9331e62e8b80b3047470ede2845664d89583302a Author: Mark Johnston AuthorDate: 2026-03-31 13:37:43 +0000 Commit: Mark Johnston CommitDate: 2026-04-21 15:42:41 +0000 pkru: Fix handling of 1GB largepage mappings pmap_pkru_update_range() did not handle the case where a PDPE has PG_PS set. More generally, the SET_PKRU and CLEAR_PKRU sysarch implementations did not check whether the request covers a "boundary" vm map entry. Fix this, add the missing PG_PS test, and add some tests. Approved by: so Security: FreeBSD-SA-26:11.amd64 Security: CVE-2026-6386 Reported by: Nicholas Carlini Reviewed by: kib, alc Differential Revision: https://reviews.freebsd.org/D56184 --- lib/libsys/x86/pkru.3 | 3 + sys/amd64/amd64/pmap.c | 20 +++- sys/amd64/amd64/sys_machdep.c | 43 +++++++-- sys/vm/vm_map.c | 32 +++++++ sys/vm/vm_map.h | 1 + tests/sys/posixshm/posixshm_test.c | 187 +++++++++++++++++++++++++++++++++++++ 6 files changed, 274 insertions(+), 12 deletions(-) diff --git a/lib/libsys/x86/pkru.3 b/lib/libsys/x86/pkru.3 index 95bc66c979ac..033dc07c4b06 100644 --- a/lib/libsys/x86/pkru.3 +++ b/lib/libsys/x86/pkru.3 @@ -179,6 +179,9 @@ The supplied argument for .Fn x86_pkru_protect_range has reserved bits set. +.It Bq Er EINVAL +The range of the request partially covers a mapping of an object created by +.Xr shm_create_largepage 3 . .It Bq Er EFAULT The supplied address range does not completely fit into the user-managed address range. diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 956e9c5e78d2..497c85c3f0c2 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -11551,7 +11551,7 @@ pmap_pkru_update_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, u_int keyidx) { pml4_entry_t *pml4e; - pdp_entry_t *pdpe; + pdp_entry_t newpdpe, *pdpe; pd_entry_t newpde, ptpaddr, *pde; pt_entry_t newpte, *ptep, pte; vm_offset_t va, va_next; @@ -11577,6 +11577,22 @@ pmap_pkru_update_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, va_next = eva; continue; } + if ((*pdpe & PG_PS) != 0) { + va_next = (va + NBPDP) & ~PDPMASK; + if (va_next < va) + va_next = eva; + KASSERT(va_next <= eva, + ("partial update of non-transparent 1G mapping " + "pdpe %#lx va %#lx eva %#lx va_next %#lx", + *pdpe, va, eva, va_next)); + newpdpe = (*pdpe & ~X86_PG_PKU_MASK) | + X86_PG_PKU(keyidx); + if (newpdpe != *pdpe) { + *pdpe = newpdpe; + changed = true; + } + continue; + } va_next = (va + NBPDR) & ~PDRMASK; if (va_next < va) @@ -11629,8 +11645,6 @@ pmap_pkru_check_uargs(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, if (pmap->pm_type != PT_X86 || keyidx > PMAP_MAX_PKRU_IDX || (flags & ~(AMD64_PKRU_PERSIST | AMD64_PKRU_EXCL)) != 0) return (EINVAL); - if (eva <= sva || eva > VM_MAXUSER_ADDRESS) - return (EFAULT); if ((cpu_stdext_feature2 & CPUID_STDEXT2_PKU) == 0) return (ENOTSUP); return (0); diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c index 51f55687bbcf..1df73a25c05e 100644 --- a/sys/amd64/amd64/sys_machdep.c +++ b/sys/amd64/amd64/sys_machdep.c @@ -30,7 +30,6 @@ * SUCH DAMAGE. */ -#include #include "opt_capsicum.h" #include "opt_ktrace.h" @@ -369,32 +368,58 @@ sysarch(struct thread *td, struct sysarch_args *uap) break; case I386_SET_PKRU: - case AMD64_SET_PKRU: + case AMD64_SET_PKRU: { + vm_offset_t addr, start, end; + vm_size_t len; + + addr = (uintptr_t)a64pkru.addr; + len = a64pkru.len; + /* * Read-lock the map to synchronize with parallel * pmap_vmspace_copy() on fork. */ map = &td->td_proc->p_vmspace->vm_map; vm_map_lock_read(map); - error = pmap_pkru_set(PCPU_GET(curpmap), - (vm_offset_t)a64pkru.addr, (vm_offset_t)a64pkru.addr + - a64pkru.len, a64pkru.keyidx, a64pkru.flags); + if (len == 0 || !vm_map_check_boundary(map, addr, addr + len)) { + vm_map_unlock_read(map); + error = EINVAL; + break; + } + start = trunc_page(addr); + end = round_page(addr + len); + error = pmap_pkru_set(PCPU_GET(curpmap), start, end, + a64pkru.keyidx, a64pkru.flags); vm_map_unlock_read(map); break; + } case I386_CLEAR_PKRU: - case AMD64_CLEAR_PKRU: + case AMD64_CLEAR_PKRU: { + vm_offset_t addr, start, end; + vm_size_t len; + if (a64pkru.flags != 0 || a64pkru.keyidx != 0) { error = EINVAL; break; } + + addr = (uintptr_t)a64pkru.addr; + len = a64pkru.len; + map = &td->td_proc->p_vmspace->vm_map; vm_map_lock_read(map); - error = pmap_pkru_clear(PCPU_GET(curpmap), - (vm_offset_t)a64pkru.addr, - (vm_offset_t)a64pkru.addr + a64pkru.len); + if (len == 0 || !vm_map_check_boundary(map, addr, addr + len)) { + vm_map_unlock_read(map); + error = EINVAL; + break; + } + start = trunc_page(addr); + end = round_page(addr + len); + error = pmap_pkru_clear(PCPU_GET(curpmap), start, end); vm_map_unlock_read(map); break; + } case AMD64_DISABLE_TLSBASE: clear_pcb_flags(pcb, PCB_TLSBASE); diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index b8295bb2108d..63bdce9d60f8 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -4162,6 +4162,38 @@ vm_map_check_protection(vm_map_t map, vm_offset_t start, vm_offset_t end, return (TRUE); } +/* + * Check whether the specified range partially overlaps a map entry with + * fixed boundaries, and return false if so. + * + * The map must be locked. + */ +bool +vm_map_check_boundary(vm_map_t map, vm_offset_t start, vm_offset_t end) +{ + vm_map_entry_t entry; + int bdry_idx; + + if (!vm_map_range_valid(map, start, end)) + return (false); + if (start == end) + return (true); + + if (vm_map_lookup_entry(map, start, &entry)) { + bdry_idx = MAP_ENTRY_SPLIT_BOUNDARY_INDEX(entry); + if (bdry_idx != 0 && + (start & (pagesizes[bdry_idx] - 1)) != 0) + return (false); + } + if (vm_map_lookup_entry(map, end - 1, &entry)) { + bdry_idx = MAP_ENTRY_SPLIT_BOUNDARY_INDEX(entry); + if (bdry_idx != 0 && + (end & (pagesizes[bdry_idx] - 1)) != 0) + return (false); + } + return (true); +} + /* * * vm_map_copy_swap_object: diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index 6af3dba42685..0b0edb24a64d 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -479,6 +479,7 @@ vm_map_entry_read_succ(void *token, struct vm_map_entry *const clone, #endif /* ! _KERNEL */ #ifdef _KERNEL +bool vm_map_check_boundary(vm_map_t, vm_offset_t, vm_offset_t); boolean_t vm_map_check_protection (vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t); int vm_map_delete(vm_map_t, vm_offset_t, vm_offset_t); int vm_map_find(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, vm_size_t, diff --git a/tests/sys/posixshm/posixshm_test.c b/tests/sys/posixshm/posixshm_test.c index 680a443b6eac..8333faa90594 100644 --- a/tests/sys/posixshm/posixshm_test.c +++ b/tests/sys/posixshm/posixshm_test.c @@ -38,10 +38,17 @@ #include #include +#ifdef __amd64__ +#include +#endif + #include #include #include +#include +#include #include +#include #include #include #include @@ -1889,6 +1896,183 @@ ATF_TC_BODY(largepage_pipe, tc) } } +#ifdef __amd64__ +static sigjmp_buf jmpbuf; +static _Atomic(void *) faultaddr; +static _Atomic(int) faultsig; + +#define KEY_RW 1 +#define KEY_RO 2 +#define KEY_WO 3 +#define KEY_NO 4 +#define VAL 0xdeadfacec0debeef +static void +set_keys(void) +{ + int error; + + error = x86_pkru_set_perm(KEY_RW, 1, 1); + ATF_REQUIRE(error == 0); + error = x86_pkru_set_perm(KEY_RO, 1, 0); + ATF_REQUIRE(error == 0); + error = x86_pkru_set_perm(KEY_WO, 0, 1); + ATF_REQUIRE(error == 0); + error = x86_pkru_set_perm(KEY_NO, 0, 0); + ATF_REQUIRE(error == 0); +} + +static void +sigsegv(int sig, siginfo_t *si, void *uc __unused) +{ + faultsig = sig; + faultaddr = si->si_addr; + siglongjmp(jmpbuf, 1); +} + +static bool +try_read(volatile uint64_t *p, uint64_t *outp) +{ + if (sigsetjmp(jmpbuf, 1) == 0) { + *outp = *p; + return (true); + } else { + atomic_signal_fence(memory_order_relaxed); + ATF_REQUIRE(faultsig == SIGSEGV); + ATF_REQUIRE(faultaddr == p); + set_keys(); /* PKRU is not restored by siglongjmp? */ + return (false); + } +} + +static bool +try_write(volatile uint64_t *p, uint64_t val) +{ + if (sigsetjmp(jmpbuf, 1) == 0) { + *p = val; + return (true); + } else { + atomic_signal_fence(memory_order_relaxed); + ATF_REQUIRE(faultsig == SIGSEGV); + ATF_REQUIRE(faultaddr == p); + set_keys(); /* PKRU is not restored by siglongjmp? */ + return (false); + } +} + +ATF_TC_WITHOUT_HEAD(largepage_pkru); +ATF_TC_BODY(largepage_pkru, tc) +{ + size_t ps[MAXPAGESIZES]; + struct sigaction sa; + char *addr, *addr1; + int error, fd, pscnt; + + memset(&sa, 0, sizeof(sa)); + sa.sa_sigaction = sigsegv; + sa.sa_flags = SA_SIGINFO; + sigemptyset(&sa.sa_mask); + error = sigaction(SIGSEGV, &sa, NULL); + ATF_REQUIRE(error == 0); + + pscnt = pagesizes(ps, true); + + for (int i = 1; i < pscnt; i++) { + uint64_t val; + + fd = shm_open_large(i, SHM_LARGEPAGE_ALLOC_DEFAULT, ps[i]); + addr = mmap(NULL, ps[i], PROT_READ | PROT_WRITE, MAP_SHARED, fd, + 0); + ATF_REQUIRE_MSG(addr != MAP_FAILED, + "mmap(%zu bytes) failed; error=%d", ps[i], errno); + + /* + * Ensure that the page is faulted into the pmap. + */ + memset(addr, 0, ps[i]); + + set_keys(); + + /* + * Make sure we can't partially cover a largepage mapping. + */ + error = x86_pkru_protect_range(addr, PAGE_SIZE, KEY_RW, 0); + ATF_REQUIRE_ERRNO(EINVAL, error != 0); + error = x86_pkru_protect_range(addr, ps[i] - PAGE_SIZE, KEY_RW, + 0); + ATF_REQUIRE_ERRNO(EINVAL, error != 0); + error = x86_pkru_protect_range(addr + PAGE_SIZE, ps[i] - PAGE_SIZE, + KEY_RW, 0); + ATF_REQUIRE_ERRNO(EINVAL, error != 0); + error = x86_pkru_protect_range(addr + 1, ps[i], KEY_RW, 0); + ATF_REQUIRE_ERRNO(EINVAL, error != 0); + + /* + * Make sure that protections are honoured. + */ + for (int j = 1; j <= 4; j++) { + volatile uint64_t *addr64; + + error = x86_pkru_protect_range(addr, ps[i], 0, 0); + ATF_REQUIRE(error == 0); + + addr64 = (volatile uint64_t *)(void *)addr; + *addr64 = VAL; + + error = x86_pkru_protect_range(addr, ps[i], j, 0); + ATF_REQUIRE(error == 0); + switch (j) { + case KEY_RW: + ATF_REQUIRE(try_write(addr64, VAL)); + ATF_REQUIRE(try_read(addr64, &val)); + ATF_REQUIRE(val == VAL); + break; + case KEY_RO: + ATF_REQUIRE(try_read(addr64, &val)); + ATF_REQUIRE(val == VAL); + ATF_REQUIRE(!try_write(addr64, VAL)); + break; + case KEY_WO: + /* !access implies !modify */ + case KEY_NO: + ATF_REQUIRE(!try_read(addr64, &val)); + ATF_REQUIRE(!try_write(addr64, VAL)); + break; + default: + __unreachable(); + } + } + error = munmap(addr, ps[i]); + ATF_CHECK(error == 0); + + /* + * Try mapping a large page in a region partially covered by a + * key. + * + * Rather than detecting the mismatch when the logical mapping + * is created, we currently only fail once pmap_enter() is + * called from the fault handler. This is not ideal and might + * be improved in the future. + */ + error = x86_pkru_protect_range(addr, ps[i], 0, 0); + ATF_REQUIRE(error == 0); + error = x86_pkru_protect_range(addr + PAGE_SIZE, + ps[i] - PAGE_SIZE, KEY_RW, 0); + ATF_REQUIRE(error == 0); + + addr1 = mmap(addr, ps[i], PROT_READ | PROT_WRITE, + MAP_SHARED | MAP_FIXED, fd, 0); + ATF_REQUIRE(addr1 != MAP_FAILED); + ATF_REQUIRE(addr == addr1); + ATF_REQUIRE(!try_read((volatile uint64_t *)(void *)addr, &val)); + ATF_REQUIRE(!try_write((volatile uint64_t *)(void *)addr, VAL)); + } +} +#undef KEY_RW +#undef KEY_RO +#undef KEY_WO +#undef KEY_NO +#endif + ATF_TC_WITHOUT_HEAD(largepage_reopen); ATF_TC_BODY(largepage_reopen, tc) { @@ -1979,6 +2163,9 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, largepage_mprotect); ATF_TP_ADD_TC(tp, largepage_minherit); ATF_TP_ADD_TC(tp, largepage_pipe); +#ifdef __amd64__ + ATF_TP_ADD_TC(tp, largepage_pkru); +#endif ATF_TP_ADD_TC(tp, largepage_reopen); return (atf_no_error()); From nobody Tue Apr 21 15:43:02 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0RT26pZzz6WtR5 for ; Tue, 21 Apr 2026 15:43: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0RT265CZz3MJ2 for ; Tue, 21 Apr 2026 15:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uvD+/NNVHHt3iwEcYJBthz2Ufe9GomZgvC9QrMY3Ck8=; b=NwzBKVtXflmdYc79IYVrsOgdl2C6JnZ0B9Fb0Zy7NARCHNHLYodlcVuf9TKIY/aTxoZuFV s1pHJM264cVQ8FOjF6TLerkAjMnYfFFWv4MsYH5hKBfXGzd9pFdfTx43BO5SqowgkFG/gs Zp/dJFH7zB+3pZ5BE+LoZEaS01guKrSxs4b50EuTjlKbinj2LFKHB6eFvQi+mxnWs8vFZ1 L9aigj7Tmqb+ilAMgGDo2nn4dLSbdRmNLCT1kyL+m+sq8BN5w693ucaZBRlzyR/TeSICUw whxSU4KKnPDDCExXPrdd/OF/34Ssr8EAV888xoAx9Re28gf/8lnTO60axMAgug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776786182; a=rsa-sha256; cv=none; b=uI/I0iHPWJ6A3aRM3MJXPQMRge6lsCCXKBhbSuf+bSqMCZF/mpEEoBJukgo7CZYWXYyNEo CThp7VG0I7IPtNHQWhrZHQzQ80IEh9HAditl/60OJpWTFg5lPl0YiGUo6nE6MGx1Uv9mkn x7dBnctuQ0FeUkkkX0i045SR8gvylOBKlOEYam9pE2X19MXq2NKO5UFtlaXcCp0p9BbWo2 uEvj2kSlPQ+cvQdUpYu+ZtosyBUxMxYyOs/wjoj38bqRWz5OiIda+4ny3ZdRXkvtr1/uRT Yfs4WddtDPDjN0ikHHaMplixej1IUa8Ddj4lhkvDyKFT2mtQR8opUnujpPRi6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uvD+/NNVHHt3iwEcYJBthz2Ufe9GomZgvC9QrMY3Ck8=; b=kk0Wr49gznkFZNO1ZjwVo77TYYQ/u6ZzR7oo4yQWF+lnMoNpDBeyyMPwkXpSJ0FwVTai3F kYSY7mntu/e+0X8V9t5I6QHsKGmhEIZFrDg1LRNuwKJK/AdqYNjnaNzbU9ECTtIpGGPQ7o QxQTX+6fg/jQr8D/9YKKapvI18io76h9AHbFQ82Rl2bN/9BL2zCJYssqQooxveLkv4wNhh NGO1j5L9ATwMOXUR/1VqOMCbg4eSqiONpre4COBsh/U/5yhOSfPC7imk3xZGlOs0iGrZSG V06+VMcdIUGjvBLCbb7uLL4/coJQbWU92WRw9+xL8elsAwhwan4Vz4fEUyPg7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0RT25Sm9zqyS for ; Tue, 21 Apr 2026 15:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36017 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 15:43:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 0c6b1e0864b8 - stable/15 - tty: Avoid leaving dangling pointers in tty_drop_ctty() List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 0c6b1e0864b8f2055740b611ab21c73910a73614 Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 15:43:02 +0000 Message-Id: <69e79b06.36017.319febfc@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0c6b1e0864b8f2055740b611ab21c73910a73614 commit 0c6b1e0864b8f2055740b611ab21c73910a73614 Author: Mark Johnston AuthorDate: 2026-03-23 15:22:48 +0000 Commit: Mark Johnston CommitDate: 2026-04-21 15:42:40 +0000 tty: Avoid leaving dangling pointers in tty_drop_ctty() The TIOCNOTTY handler detaches the calling process from its controlling terminal. It clears the link from the session to the tty, but not the pointers from the tty to the session and process group. This means that sess_release() doesn't call tty_rel_sess(), and that pgdelete() doesn't call tty_rel_pgrp(), so the pointers are left dangling. Fix this by clearing pointers in tty_drop_ctty(). Add a standalone regression test. Approved by: so Security: FreeBSD-SA-26:10.tty Security: CVE-2026-5398 Reported by: Nicholas Carlini Reviewed by: kib, kevans Fixes: 1b50b999f9b5 ("tty: implement TIOCNOTTY") Differential Revision: https://reviews.freebsd.org/D56046 --- sys/kern/tty.c | 4 +++ tests/sys/kern/tty/Makefile | 1 + tests/sys/kern/tty/tiocnotty.c | 82 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+) diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 067471eb949a..afba05ec27b4 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1263,6 +1263,10 @@ tty_drop_ctty(struct tty *tp, struct proc *p) session->s_ttydp = NULL; SESS_UNLOCK(session); + if (tp->t_session == session) { + tp->t_session = NULL; + tp->t_pgrp = NULL; + } tp->t_sessioncnt--; p->p_flag &= ~P_CONTROLT; PROC_UNLOCK(p); diff --git a/tests/sys/kern/tty/Makefile b/tests/sys/kern/tty/Makefile index 8628ab79875f..d134b3337a21 100644 --- a/tests/sys/kern/tty/Makefile +++ b/tests/sys/kern/tty/Makefile @@ -5,6 +5,7 @@ PLAIN_TESTS_PORCH+= test_canon PLAIN_TESTS_PORCH+= test_canon_fullbuf PLAIN_TESTS_PORCH+= test_ncanon PLAIN_TESTS_PORCH+= test_recanon +PLAIN_TESTS_C+= tiocnotty ATF_TESTS_C+= test_sti PROGS+= fionread diff --git a/tests/sys/kern/tty/tiocnotty.c b/tests/sys/kern/tty/tiocnotty.c new file mode 100644 index 000000000000..2581f976b2ef --- /dev/null +++ b/tests/sys/kern/tty/tiocnotty.c @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2026 Mark Johnston + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +/* + * A regression test that exercises a bug where TIOCNOTTY would leave some + * dangling pointers behind in the controlling terminal structure. + */ + +#include +#include + +#include +#include +#include +#include +#include + +int +main(void) +{ + int master, slave, status; + pid_t child; + + master = posix_openpt(O_RDWR | O_NOCTTY); + if (master < 0) + err(1, "posix_openpt"); + if (grantpt(master) < 0) + err(1, "grantpt"); + if (unlockpt(master) < 0) + err(1, "unlockpt"); + + child = fork(); + if (child < 0) + err(1, "fork"); + if (child == 0) { + if (setsid() < 0) + err(1, "setsid"); + slave = open(ptsname(master), O_RDWR | O_NOCTTY); + if (slave < 0) + err(2, "open"); + if (ioctl(slave, TIOCSCTTY, 0) < 0) + err(3, "ioctl(TIOCSCTTY)"); + /* Detach ourselves from the controlling terminal. */ + if (ioctl(slave, TIOCNOTTY, 0) < 0) + err(4, "ioctl(TIOCNOTTY)"); + _exit(0); + } + + if (waitpid(child, &status, 0) < 0) + err(1, "waitpid"); + if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) + errx(1, "child exited with status %d", WEXITSTATUS(status)); + + child = fork(); + if (child < 0) + err(1, "fork"); + if (child == 0) { + struct winsize winsz; + + if (setsid() < 0) + err(1, "setsid"); + slave = open(ptsname(master), O_RDWR | O_NOCTTY); + if (slave < 0) + err(2, "open"); + /* Dereferences dangling t_pgrp pointer in the terminal. */ + memset(&winsz, 0xff, sizeof(winsz)); + if (ioctl(slave, TIOCSWINSZ, &winsz) < 0) + err(3, "ioctl(TIOCSWINSZ)"); + /* Dereferences dangling t_session pointer in the terminal. */ + if (ioctl(slave, TIOCSCTTY, 0) < 0) + err(4, "ioctl(TIOCSCTTY)"); + _exit(0); + } + + if (waitpid(child, &status, 0) < 0) + err(1, "waitpid"); + if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) + errx(1, "child exited with status %d", WEXITSTATUS(status)); +} From nobody Tue Apr 21 15:43:13 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0RTF35tPz6WtmF for ; Tue, 21 Apr 2026 15:43:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0RTF0mZ7z3MsK for ; Tue, 21 Apr 2026 15:43:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HH4xZ6t22941TciSU8Mw9snLl7jS2kidscbKwX3yg8g=; b=qI8qJTMa7GYGuwknVhvZAfD+IzE1v381eBy0Z196pqD4zF7LMZO98/M5xv+gZKlvRaATwJ Bju5uiI+zoaXbBaElHsr3Hg747XNMt3dNMJP0Oozt4+5Twgobl/crecpfpBjaULixGLtRK J5vXrmC/khKjAhvxfPmxmSIZtWW+UbRtSun8czydgT4ngGQGIg+HZGhPyH4rchkxxj1mcC zuEooesWGgIIPtCoJXVHYIhYgR0kZc2R0IPfVCKM9KA8TqrnukrtOpn6WjgBSTTO593Nuw nlq3otBBbQcPbHiQ/2xkRPGI4tU8Yl2y0yGJDpsucVdZ2L26FxJnFSjTVopbhA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776786193; a=rsa-sha256; cv=none; b=qeu0vIdcirqOFcSDoc0Xi0YqSTqClWrkfo6piCNt47k6Wk8xck2kMfIr8+mOkDQ0cHDbOd M+RnKSqpAjQbgfuLSZ0W/kmaSNk6CaTUX9DUE68knyooKk2DAelbF/KTSIqDAAKaaWQORe ZcaDPu2W9xahKKihzW+dfUlzFRm2URZo1OI5pQ7dsqTCv93UmkMvMIbeMOZ09n26B6fcbo Zg5GmNZD0d4IM6xrWkZMCHHn/ZtbdD7PuuJHVIxVX64dytgpTyQAVZIUtszMEMe1d0k0Y5 H+DCFdgjXVFiJlsYpuWjFI8DsZzlI2ycTAnzn0+CRaddXLgXgOV0aGCw3xXKzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HH4xZ6t22941TciSU8Mw9snLl7jS2kidscbKwX3yg8g=; b=cDp7G7cpd5gBPyx6V8jElm+2ItdU4s0fx+NCeo17XRhWbBDvNnJn2iRIm7R1XEMbjb1xpZ 9FV/FvLdci/VRJ/ySSOIRCpsmG/4/TxC9tZ4UzBGGmAJb5hwW6G1m9DgBOM5uXmMRGpGa9 zXvE3VVMBhRofN+Jt+d8xJFXEalyJQ55s3kTH7dGOFiVNsSsNLi+2hu7rgE+StCAo+1c6z rfUhcH/AM0SHBRcWqliVTj3zVIoRIJCE8qjjyVxemJ+Tr11Kw6xVJmfnDE9KMzJTUHiXy2 rGvsmsLRUPSh8XV7WVWRPrrTDwEZoN+mfh/TNGRLABY3o8cdx2spV56o26+Cmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0RTF0Mwhzqhb for ; Tue, 21 Apr 2026 15:43:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 360c4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 15:43:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: f46210a7ab32 - stable/14 - tty: Avoid leaving dangling pointers in tty_drop_ctty() List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f46210a7ab3227e71cd1fee16d2ede88b648a2df Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 15:43:13 +0000 Message-Id: <69e79b11.360c4.1e14808d@gitrepo.freebsd.org> The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f46210a7ab3227e71cd1fee16d2ede88b648a2df commit f46210a7ab3227e71cd1fee16d2ede88b648a2df Author: Mark Johnston AuthorDate: 2026-03-23 15:22:48 +0000 Commit: Mark Johnston CommitDate: 2026-04-21 15:43:09 +0000 tty: Avoid leaving dangling pointers in tty_drop_ctty() The TIOCNOTTY handler detaches the calling process from its controlling terminal. It clears the link from the session to the tty, but not the pointers from the tty to the session and process group. This means that sess_release() doesn't call tty_rel_sess(), and that pgdelete() doesn't call tty_rel_pgrp(), so the pointers are left dangling. Fix this by clearing pointers in tty_drop_ctty(). Add a standalone regression test. Approved by: so Security: FreeBSD-SA-26:10.tty Security: CVE-2026-5398 Reported by: Nicholas Carlini Reviewed by: kib, kevans Fixes: 1b50b999f9b5 ("tty: implement TIOCNOTTY") Differential Revision: https://reviews.freebsd.org/D56046 --- sys/kern/tty.c | 4 +++ tests/sys/kern/tty/Makefile | 1 + tests/sys/kern/tty/tiocnotty.c | 82 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+) diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 47f9f25cec37..508fa10fdd62 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1262,6 +1262,10 @@ tty_drop_ctty(struct tty *tp, struct proc *p) session->s_ttydp = NULL; SESS_UNLOCK(session); + if (tp->t_session == session) { + tp->t_session = NULL; + tp->t_pgrp = NULL; + } tp->t_sessioncnt--; p->p_flag &= ~P_CONTROLT; PROC_UNLOCK(p); diff --git a/tests/sys/kern/tty/Makefile b/tests/sys/kern/tty/Makefile index 8628ab79875f..d134b3337a21 100644 --- a/tests/sys/kern/tty/Makefile +++ b/tests/sys/kern/tty/Makefile @@ -5,6 +5,7 @@ PLAIN_TESTS_PORCH+= test_canon PLAIN_TESTS_PORCH+= test_canon_fullbuf PLAIN_TESTS_PORCH+= test_ncanon PLAIN_TESTS_PORCH+= test_recanon +PLAIN_TESTS_C+= tiocnotty ATF_TESTS_C+= test_sti PROGS+= fionread diff --git a/tests/sys/kern/tty/tiocnotty.c b/tests/sys/kern/tty/tiocnotty.c new file mode 100644 index 000000000000..2581f976b2ef --- /dev/null +++ b/tests/sys/kern/tty/tiocnotty.c @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2026 Mark Johnston + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +/* + * A regression test that exercises a bug where TIOCNOTTY would leave some + * dangling pointers behind in the controlling terminal structure. + */ + +#include +#include + +#include +#include +#include +#include +#include + +int +main(void) +{ + int master, slave, status; + pid_t child; + + master = posix_openpt(O_RDWR | O_NOCTTY); + if (master < 0) + err(1, "posix_openpt"); + if (grantpt(master) < 0) + err(1, "grantpt"); + if (unlockpt(master) < 0) + err(1, "unlockpt"); + + child = fork(); + if (child < 0) + err(1, "fork"); + if (child == 0) { + if (setsid() < 0) + err(1, "setsid"); + slave = open(ptsname(master), O_RDWR | O_NOCTTY); + if (slave < 0) + err(2, "open"); + if (ioctl(slave, TIOCSCTTY, 0) < 0) + err(3, "ioctl(TIOCSCTTY)"); + /* Detach ourselves from the controlling terminal. */ + if (ioctl(slave, TIOCNOTTY, 0) < 0) + err(4, "ioctl(TIOCNOTTY)"); + _exit(0); + } + + if (waitpid(child, &status, 0) < 0) + err(1, "waitpid"); + if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) + errx(1, "child exited with status %d", WEXITSTATUS(status)); + + child = fork(); + if (child < 0) + err(1, "fork"); + if (child == 0) { + struct winsize winsz; + + if (setsid() < 0) + err(1, "setsid"); + slave = open(ptsname(master), O_RDWR | O_NOCTTY); + if (slave < 0) + err(2, "open"); + /* Dereferences dangling t_pgrp pointer in the terminal. */ + memset(&winsz, 0xff, sizeof(winsz)); + if (ioctl(slave, TIOCSWINSZ, &winsz) < 0) + err(3, "ioctl(TIOCSWINSZ)"); + /* Dereferences dangling t_session pointer in the terminal. */ + if (ioctl(slave, TIOCSCTTY, 0) < 0) + err(4, "ioctl(TIOCSCTTY)"); + _exit(0); + } + + if (waitpid(child, &status, 0) < 0) + err(1, "waitpid"); + if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) + errx(1, "child exited with status %d", WEXITSTATUS(status)); +} From nobody Tue Apr 21 15:43:14 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0RTG6XdCz6Wtyl for ; Tue, 21 Apr 2026 15:43:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0RTG1qXBz3MwD for ; Tue, 21 Apr 2026 15:43:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=18z3VuW2H17yxFXuqXZNy/Z/KIGRSKHcvoa7TzUrVus=; b=kvt6rdEKslNBuvM7fq4KK7HCUxmnd5mcL2PmnVViss5dSdcvYMGM7O3H4YOOa1kq8RbiWo bixbTV0E9CApP2RWJe+7YV9lzcd+PSWejkUP06ggjM4KlPhq5xr6zL6T0VcdzucTb9eV3Q S8Zro5E5crvnFW1jn6PkT6kyFm33oNQPjrF+TO6EGpidkjDoWCo/7fnMeN08pHM0NtL1RG E3551UQ1BguR/xZrmXQN05VvgB0GlXAQ8sZASSjBUH9mRr98cBotBjev1vnPWfeMx2Kzyh jUw9w0BooZM51i+nRpesRlEK4rR2sPBUQtc0mZ8GLS5DJTFmt+mRda2Wbgw61A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776786194; a=rsa-sha256; cv=none; b=KdycycRssaM0m2Tqcqzg2fAzsN3z8N2Ag3YdRMsqEAmVsXWYfHHsQgAXHL8h3Gf+wy4vfT wIfbcZ5oEsfkmhvqQhP2f5Xni5zSvp++/o7PNbdPsRFwSGSqX0bQd29bmcdmLdNK79ozgW 45Ej4VONU8n5nbN3ouTxH5BJs9QdMZKnLTX+l4rPQWZbykgE+ypKF7UNmRvO2oX25MsjEz ZLfl5LgtqUm7zi5dj/T/NaIBpmUdQObd8Q4x7Wo5MHeUCh30VZGku2f6wEJWk/U42llK/V 3dKayJXCDE60/zpTTpC7ndEJI/ICKyU1FuaOOnnWpwkvwEpdjhW3qQfgCjhv0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=18z3VuW2H17yxFXuqXZNy/Z/KIGRSKHcvoa7TzUrVus=; b=YgSg3UB+iDXt2pvZ5CcOAj9o6dsxmwV1uI86vyGMxcKXOpUJcKG8WhmnN5cnP4YhTyF2O7 /0XdnxsIPR4SMfml4bw8fal0oLf1myuABd01DxcBewaJkBA1gM6KkfQiUP+ZUWI2RNRV50 VuCz9dipc1YhCwJZknLb6uge8Y/PU2P9ZFWQYBaeNBzCicHVGFHLHSJd7jXUTuX0yDbWlK gmw63QfNav/j41KDE6CbCzF64xsSJtS1hMpcGUjKdvYCyS9BVJ8igTOYwA56xsHTZ6oyPi WP1XXZG85CnJTpYGv+whAx4qv3AdPkGTHRtVxfQwQoBLcmrL7tAJZL97uxhu2g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0RTG1HQczqhc for ; Tue, 21 Apr 2026 15:43:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35f92 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 15:43:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 4c0e5e3cc441 - stable/14 - pkru: Fix handling of 1GB largepage mappings List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4c0e5e3cc441cf7354d15361a0903120cdd23fd9 Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 15:43:14 +0000 Message-Id: <69e79b12.35f92.3882be48@gitrepo.freebsd.org> The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4c0e5e3cc441cf7354d15361a0903120cdd23fd9 commit 4c0e5e3cc441cf7354d15361a0903120cdd23fd9 Author: Mark Johnston AuthorDate: 2026-03-31 13:37:43 +0000 Commit: Mark Johnston CommitDate: 2026-04-21 15:43:09 +0000 pkru: Fix handling of 1GB largepage mappings pmap_pkru_update_range() did not handle the case where a PDPE has PG_PS set. More generally, the SET_PKRU and CLEAR_PKRU sysarch implementations did not check whether the request covers a "boundary" vm map entry. Fix this, add the missing PG_PS test, and add some tests. Approved by: so Security: FreeBSD-SA-26:11.amd64 Security: CVE-2026-6386 Reported by: Nicholas Carlini Reviewed by: kib, alc Differential Revision: https://reviews.freebsd.org/D56184 --- lib/libc/x86/sys/pkru.3 | 3 + sys/amd64/amd64/pmap.c | 20 +++- sys/amd64/amd64/sys_machdep.c | 43 +++++++-- sys/vm/vm_map.c | 32 +++++++ sys/vm/vm_map.h | 1 + tests/sys/posixshm/posixshm_test.c | 187 +++++++++++++++++++++++++++++++++++++ 6 files changed, 274 insertions(+), 12 deletions(-) diff --git a/lib/libc/x86/sys/pkru.3 b/lib/libc/x86/sys/pkru.3 index 95bc66c979ac..033dc07c4b06 100644 --- a/lib/libc/x86/sys/pkru.3 +++ b/lib/libc/x86/sys/pkru.3 @@ -179,6 +179,9 @@ The supplied argument for .Fn x86_pkru_protect_range has reserved bits set. +.It Bq Er EINVAL +The range of the request partially covers a mapping of an object created by +.Xr shm_create_largepage 3 . .It Bq Er EFAULT The supplied address range does not completely fit into the user-managed address range. diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 9fd6c4091c95..bae3735eeafe 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -11598,7 +11598,7 @@ pmap_pkru_update_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, u_int keyidx) { pml4_entry_t *pml4e; - pdp_entry_t *pdpe; + pdp_entry_t newpdpe, *pdpe; pd_entry_t newpde, ptpaddr, *pde; pt_entry_t newpte, *ptep, pte; vm_offset_t va, va_next; @@ -11624,6 +11624,22 @@ pmap_pkru_update_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, va_next = eva; continue; } + if ((*pdpe & PG_PS) != 0) { + va_next = (va + NBPDP) & ~PDPMASK; + if (va_next < va) + va_next = eva; + KASSERT(va_next <= eva, + ("partial update of non-transparent 1G mapping " + "pdpe %#lx va %#lx eva %#lx va_next %#lx", + *pdpe, va, eva, va_next)); + newpdpe = (*pdpe & ~X86_PG_PKU_MASK) | + X86_PG_PKU(keyidx); + if (newpdpe != *pdpe) { + *pdpe = newpdpe; + changed = true; + } + continue; + } va_next = (va + NBPDR) & ~PDRMASK; if (va_next < va) @@ -11676,8 +11692,6 @@ pmap_pkru_check_uargs(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, if (pmap->pm_type != PT_X86 || keyidx > PMAP_MAX_PKRU_IDX || (flags & ~(AMD64_PKRU_PERSIST | AMD64_PKRU_EXCL)) != 0) return (EINVAL); - if (eva <= sva || eva > VM_MAXUSER_ADDRESS) - return (EFAULT); if ((cpu_stdext_feature2 & CPUID_STDEXT2_PKU) == 0) return (ENOTSUP); return (0); diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c index a7ee1f49887c..74b182e73dc2 100644 --- a/sys/amd64/amd64/sys_machdep.c +++ b/sys/amd64/amd64/sys_machdep.c @@ -32,7 +32,6 @@ * from: @(#)sys_machdep.c 5.5 (Berkeley) 1/19/91 */ -#include #include "opt_capsicum.h" #include "opt_ktrace.h" @@ -371,32 +370,58 @@ sysarch(struct thread *td, struct sysarch_args *uap) break; case I386_SET_PKRU: - case AMD64_SET_PKRU: + case AMD64_SET_PKRU: { + vm_offset_t addr, start, end; + vm_size_t len; + + addr = (uintptr_t)a64pkru.addr; + len = a64pkru.len; + /* * Read-lock the map to synchronize with parallel * pmap_vmspace_copy() on fork. */ map = &td->td_proc->p_vmspace->vm_map; vm_map_lock_read(map); - error = pmap_pkru_set(PCPU_GET(curpmap), - (vm_offset_t)a64pkru.addr, (vm_offset_t)a64pkru.addr + - a64pkru.len, a64pkru.keyidx, a64pkru.flags); + if (len == 0 || !vm_map_check_boundary(map, addr, addr + len)) { + vm_map_unlock_read(map); + error = EINVAL; + break; + } + start = trunc_page(addr); + end = round_page(addr + len); + error = pmap_pkru_set(PCPU_GET(curpmap), start, end, + a64pkru.keyidx, a64pkru.flags); vm_map_unlock_read(map); break; + } case I386_CLEAR_PKRU: - case AMD64_CLEAR_PKRU: + case AMD64_CLEAR_PKRU: { + vm_offset_t addr, start, end; + vm_size_t len; + if (a64pkru.flags != 0 || a64pkru.keyidx != 0) { error = EINVAL; break; } + + addr = (uintptr_t)a64pkru.addr; + len = a64pkru.len; + map = &td->td_proc->p_vmspace->vm_map; vm_map_lock_read(map); - error = pmap_pkru_clear(PCPU_GET(curpmap), - (vm_offset_t)a64pkru.addr, - (vm_offset_t)a64pkru.addr + a64pkru.len); + if (len == 0 || !vm_map_check_boundary(map, addr, addr + len)) { + vm_map_unlock_read(map); + error = EINVAL; + break; + } + start = trunc_page(addr); + end = round_page(addr + len); + error = pmap_pkru_clear(PCPU_GET(curpmap), start, end); vm_map_unlock_read(map); break; + } case AMD64_DISABLE_TLSBASE: clear_pcb_flags(pcb, PCB_TLSBASE); diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index cf028c0c47ef..631a5e302879 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -4140,6 +4140,38 @@ vm_map_check_protection(vm_map_t map, vm_offset_t start, vm_offset_t end, return (TRUE); } +/* + * Check whether the specified range partially overlaps a map entry with + * fixed boundaries, and return false if so. + * + * The map must be locked. + */ +bool +vm_map_check_boundary(vm_map_t map, vm_offset_t start, vm_offset_t end) +{ + vm_map_entry_t entry; + int bdry_idx; + + if (!vm_map_range_valid(map, start, end)) + return (false); + if (start == end) + return (true); + + if (vm_map_lookup_entry(map, start, &entry)) { + bdry_idx = MAP_ENTRY_SPLIT_BOUNDARY_INDEX(entry); + if (bdry_idx != 0 && + (start & (pagesizes[bdry_idx] - 1)) != 0) + return (false); + } + if (vm_map_lookup_entry(map, end - 1, &entry)) { + bdry_idx = MAP_ENTRY_SPLIT_BOUNDARY_INDEX(entry); + if (bdry_idx != 0 && + (end & (pagesizes[bdry_idx] - 1)) != 0) + return (false); + } + return (true); +} + /* * * vm_map_copy_swap_object: diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index 5d41f892e83d..66a787b0d2d8 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -471,6 +471,7 @@ vm_map_entry_read_succ(void *token, struct vm_map_entry *const clone, #endif /* ! _KERNEL */ #ifdef _KERNEL +bool vm_map_check_boundary(vm_map_t, vm_offset_t, vm_offset_t); boolean_t vm_map_check_protection (vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t); int vm_map_delete(vm_map_t, vm_offset_t, vm_offset_t); int vm_map_find(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, vm_size_t, diff --git a/tests/sys/posixshm/posixshm_test.c b/tests/sys/posixshm/posixshm_test.c index 406ad5011884..b8db1edd5c2d 100644 --- a/tests/sys/posixshm/posixshm_test.c +++ b/tests/sys/posixshm/posixshm_test.c @@ -39,10 +39,17 @@ #include #include +#ifdef __amd64__ +#include +#endif + #include #include #include +#include +#include #include +#include #include #include #include @@ -1890,6 +1897,183 @@ ATF_TC_BODY(largepage_pipe, tc) } } +#ifdef __amd64__ +static sigjmp_buf jmpbuf; +static _Atomic(void *) faultaddr; +static _Atomic(int) faultsig; + +#define KEY_RW 1 +#define KEY_RO 2 +#define KEY_WO 3 +#define KEY_NO 4 +#define VAL 0xdeadfacec0debeef +static void +set_keys(void) +{ + int error; + + error = x86_pkru_set_perm(KEY_RW, 1, 1); + ATF_REQUIRE(error == 0); + error = x86_pkru_set_perm(KEY_RO, 1, 0); + ATF_REQUIRE(error == 0); + error = x86_pkru_set_perm(KEY_WO, 0, 1); + ATF_REQUIRE(error == 0); + error = x86_pkru_set_perm(KEY_NO, 0, 0); + ATF_REQUIRE(error == 0); +} + +static void +sigsegv(int sig, siginfo_t *si, void *uc __unused) +{ + faultsig = sig; + faultaddr = si->si_addr; + siglongjmp(jmpbuf, 1); +} + +static bool +try_read(volatile uint64_t *p, uint64_t *outp) +{ + if (sigsetjmp(jmpbuf, 1) == 0) { + *outp = *p; + return (true); + } else { + atomic_signal_fence(memory_order_relaxed); + ATF_REQUIRE(faultsig == SIGSEGV); + ATF_REQUIRE(faultaddr == p); + set_keys(); /* PKRU is not restored by siglongjmp? */ + return (false); + } +} + +static bool +try_write(volatile uint64_t *p, uint64_t val) +{ + if (sigsetjmp(jmpbuf, 1) == 0) { + *p = val; + return (true); + } else { + atomic_signal_fence(memory_order_relaxed); + ATF_REQUIRE(faultsig == SIGSEGV); + ATF_REQUIRE(faultaddr == p); + set_keys(); /* PKRU is not restored by siglongjmp? */ + return (false); + } +} + +ATF_TC_WITHOUT_HEAD(largepage_pkru); +ATF_TC_BODY(largepage_pkru, tc) +{ + size_t ps[MAXPAGESIZES]; + struct sigaction sa; + char *addr, *addr1; + int error, fd, pscnt; + + memset(&sa, 0, sizeof(sa)); + sa.sa_sigaction = sigsegv; + sa.sa_flags = SA_SIGINFO; + sigemptyset(&sa.sa_mask); + error = sigaction(SIGSEGV, &sa, NULL); + ATF_REQUIRE(error == 0); + + pscnt = pagesizes(ps, true); + + for (int i = 1; i < pscnt; i++) { + uint64_t val; + + fd = shm_open_large(i, SHM_LARGEPAGE_ALLOC_DEFAULT, ps[i]); + addr = mmap(NULL, ps[i], PROT_READ | PROT_WRITE, MAP_SHARED, fd, + 0); + ATF_REQUIRE_MSG(addr != MAP_FAILED, + "mmap(%zu bytes) failed; error=%d", ps[i], errno); + + /* + * Ensure that the page is faulted into the pmap. + */ + memset(addr, 0, ps[i]); + + set_keys(); + + /* + * Make sure we can't partially cover a largepage mapping. + */ + error = x86_pkru_protect_range(addr, PAGE_SIZE, KEY_RW, 0); + ATF_REQUIRE_ERRNO(EINVAL, error != 0); + error = x86_pkru_protect_range(addr, ps[i] - PAGE_SIZE, KEY_RW, + 0); + ATF_REQUIRE_ERRNO(EINVAL, error != 0); + error = x86_pkru_protect_range(addr + PAGE_SIZE, ps[i] - PAGE_SIZE, + KEY_RW, 0); + ATF_REQUIRE_ERRNO(EINVAL, error != 0); + error = x86_pkru_protect_range(addr + 1, ps[i], KEY_RW, 0); + ATF_REQUIRE_ERRNO(EINVAL, error != 0); + + /* + * Make sure that protections are honoured. + */ + for (int j = 1; j <= 4; j++) { + volatile uint64_t *addr64; + + error = x86_pkru_protect_range(addr, ps[i], 0, 0); + ATF_REQUIRE(error == 0); + + addr64 = (volatile uint64_t *)(void *)addr; + *addr64 = VAL; + + error = x86_pkru_protect_range(addr, ps[i], j, 0); + ATF_REQUIRE(error == 0); + switch (j) { + case KEY_RW: + ATF_REQUIRE(try_write(addr64, VAL)); + ATF_REQUIRE(try_read(addr64, &val)); + ATF_REQUIRE(val == VAL); + break; + case KEY_RO: + ATF_REQUIRE(try_read(addr64, &val)); + ATF_REQUIRE(val == VAL); + ATF_REQUIRE(!try_write(addr64, VAL)); + break; + case KEY_WO: + /* !access implies !modify */ + case KEY_NO: + ATF_REQUIRE(!try_read(addr64, &val)); + ATF_REQUIRE(!try_write(addr64, VAL)); + break; + default: + __unreachable(); + } + } + error = munmap(addr, ps[i]); + ATF_CHECK(error == 0); + + /* + * Try mapping a large page in a region partially covered by a + * key. + * + * Rather than detecting the mismatch when the logical mapping + * is created, we currently only fail once pmap_enter() is + * called from the fault handler. This is not ideal and might + * be improved in the future. + */ + error = x86_pkru_protect_range(addr, ps[i], 0, 0); + ATF_REQUIRE(error == 0); + error = x86_pkru_protect_range(addr + PAGE_SIZE, + ps[i] - PAGE_SIZE, KEY_RW, 0); + ATF_REQUIRE(error == 0); + + addr1 = mmap(addr, ps[i], PROT_READ | PROT_WRITE, + MAP_SHARED | MAP_FIXED, fd, 0); + ATF_REQUIRE(addr1 != MAP_FAILED); + ATF_REQUIRE(addr == addr1); + ATF_REQUIRE(!try_read((volatile uint64_t *)(void *)addr, &val)); + ATF_REQUIRE(!try_write((volatile uint64_t *)(void *)addr, VAL)); + } +} +#undef KEY_RW +#undef KEY_RO +#undef KEY_WO +#undef KEY_NO +#endif + ATF_TC_WITHOUT_HEAD(largepage_reopen); ATF_TC_BODY(largepage_reopen, tc) { @@ -1980,6 +2164,9 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, largepage_mprotect); ATF_TP_ADD_TC(tp, largepage_minherit); ATF_TP_ADD_TC(tp, largepage_pipe); +#ifdef __amd64__ + ATF_TP_ADD_TC(tp, largepage_pkru); +#endif ATF_TP_ADD_TC(tp, largepage_reopen); return (atf_no_error()); From nobody Tue Apr 21 15:43:56 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0RV46Ny5z6WtjL for ; Tue, 21 Apr 2026 15:43:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0RV45Jhpz3P5W for ; Tue, 21 Apr 2026 15:43:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=brb7d3yr/w2vVSbtfqovjwreCJID77/P9vu2qHmk3uk=; b=PHk/8B8YGTXOlagIdR2dEPD5G2qeDOmkQTf0VTKUh7nGIx7vjCdC/Xilim1XyIslyoceYZ CFvIHmA3RXL2xz3mBPIpdPsGebTbavYlKb8KMO7e7if9x1ks3VBwh+CQwhfjlrYFKdBgsA evSvm34Bz5UDwsc35dLTFBBJANjiq53/a/yyf+ncfdyMpwKIPMN4XTtkaIZ1G0pLpUi1M7 NRPtQspr9tw68srC+pfzjtmIlLz3F2AvEDf77kMtjRnwdf5ZuwqiLcJHuIySRXgkqsbLbe cfqKbNwKP/0IHc/y/6Ht2+PeUfpDyk4rDA9F9Lwx6OoxU739EtD7/dX7vaJWLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776786236; a=rsa-sha256; cv=none; b=KfTliQCq3YQbkar1BJFoOh43DCwWzSpXaHEclkKvRrU/XJX/Iz/0jMk2WZCims5+t1TVQv k7NX0809+EDqpliHsFejsi8Vuo0pBglXM4B55hy4xVIf6B6ToWygke/JrLRLVHJ8pKhCa7 K/n9dopZtzAFcoYezxtZHfoiCqQyV7eNgIY0z1E28WJFfy0rPjTK7l+zOY1yLSvBouPREU nXzP7XyBjP9kscIkNXYlzwi2cvsyfE9uYN2d9Bib8kf3JgDB+Q6uiMxZFuBZwHd1RMY3jr YF9Yb+smS4edG5iN0vuDlcnLloL+yt3kyKoaH72elfJ0wsWvtFIa6gA1NAF7rw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=brb7d3yr/w2vVSbtfqovjwreCJID77/P9vu2qHmk3uk=; b=dTDtbvuhdAeE4+Poscgoi2TE1qe0VYiGh+HCOvEtKOA9OpCrerBkIlEWuLpmoI4VgS8JkK hstakZDeOSVyZPSfJpUISaW9crQ3GCy5J5UqcTfQcJaD5YOrSBpS8FL60KsN1F+pEJThSr 6e/HMT4fZSOLNf+sfe4royLp7F/ZcPTP8zB1pTMfOy6jnkk05se8Ru2Iavjyc5IHEUIX/z 2PnRY7YyLLPHI0QPJbZU6TgbIeUsLTjIXz4Xm+a2NgKhCB1XvlV5QkJzrrp+pxePPvfn5R qFKl4KP6JEaqMfAPVh8mEAncUzQ8jQ4BphZsGU559MVRAarHmBy6+cDKXTOIPQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0RV44wDhzqQ4 for ; Tue, 21 Apr 2026 15:43:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3406e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 15:43:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 5eae7f23fe0e - stable/13 - tty: Avoid leaving dangling pointers in tty_drop_ctty() List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5eae7f23fe0e189f2d5160772cf6cd4d107dd30a Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 15:43:56 +0000 Message-Id: <69e79b3c.3406e.44befbe6@gitrepo.freebsd.org> The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5eae7f23fe0e189f2d5160772cf6cd4d107dd30a commit 5eae7f23fe0e189f2d5160772cf6cd4d107dd30a Author: Mark Johnston AuthorDate: 2026-03-23 15:22:48 +0000 Commit: Mark Johnston CommitDate: 2026-04-21 15:43:53 +0000 tty: Avoid leaving dangling pointers in tty_drop_ctty() The TIOCNOTTY handler detaches the calling process from its controlling terminal. It clears the link from the session to the tty, but not the pointers from the tty to the session and process group. This means that sess_release() doesn't call tty_rel_sess(), and that pgdelete() doesn't call tty_rel_pgrp(), so the pointers are left dangling. Fix this by clearing pointers in tty_drop_ctty(). Add a standalone regression test. Approved by: so Security: FreeBSD-SA-26:10.tty Security: CVE-2026-5398 Reported by: Nicholas Carlini Reviewed by: kib, kevans Fixes: 1b50b999f9b5 ("tty: implement TIOCNOTTY") Differential Revision: https://reviews.freebsd.org/D56046 --- sys/kern/tty.c | 4 +++ tests/sys/kern/Makefile | 1 + tests/sys/kern/tiocnotty.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+) diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 42862ffb8a45..22f3645092f8 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1262,6 +1262,10 @@ tty_drop_ctty(struct tty *tp, struct proc *p) session->s_ttydp = NULL; SESS_UNLOCK(session); + if (tp->t_session == session) { + tp->t_session = NULL; + tp->t_pgrp = NULL; + } tp->t_sessioncnt--; p->p_flag &= ~P_CONTROLT; PROC_UNLOCK(p); diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index d499fd525222..faf08a352514 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -35,6 +35,7 @@ ATF_TESTS_C+= subr_physmem_test PLAIN_TESTS_C+= subr_unit_test ATF_TESTS_C+= sysctl_kern_proc ATF_TESTS_C+= sys_getrandom +PLAIN_TESTS_C+= tiocnotty ATF_TESTS_C+= tty_pts ATF_TESTS_C+= unix_passfd_test ATF_TESTS_C+= unix_seqpacket_test diff --git a/tests/sys/kern/tiocnotty.c b/tests/sys/kern/tiocnotty.c new file mode 100644 index 000000000000..2581f976b2ef --- /dev/null +++ b/tests/sys/kern/tiocnotty.c @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2026 Mark Johnston + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +/* + * A regression test that exercises a bug where TIOCNOTTY would leave some + * dangling pointers behind in the controlling terminal structure. + */ + +#include +#include + +#include +#include +#include +#include +#include + +int +main(void) +{ + int master, slave, status; + pid_t child; + + master = posix_openpt(O_RDWR | O_NOCTTY); + if (master < 0) + err(1, "posix_openpt"); + if (grantpt(master) < 0) + err(1, "grantpt"); + if (unlockpt(master) < 0) + err(1, "unlockpt"); + + child = fork(); + if (child < 0) + err(1, "fork"); + if (child == 0) { + if (setsid() < 0) + err(1, "setsid"); + slave = open(ptsname(master), O_RDWR | O_NOCTTY); + if (slave < 0) + err(2, "open"); + if (ioctl(slave, TIOCSCTTY, 0) < 0) + err(3, "ioctl(TIOCSCTTY)"); + /* Detach ourselves from the controlling terminal. */ + if (ioctl(slave, TIOCNOTTY, 0) < 0) + err(4, "ioctl(TIOCNOTTY)"); + _exit(0); + } + + if (waitpid(child, &status, 0) < 0) + err(1, "waitpid"); + if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) + errx(1, "child exited with status %d", WEXITSTATUS(status)); + + child = fork(); + if (child < 0) + err(1, "fork"); + if (child == 0) { + struct winsize winsz; + + if (setsid() < 0) + err(1, "setsid"); + slave = open(ptsname(master), O_RDWR | O_NOCTTY); + if (slave < 0) + err(2, "open"); + /* Dereferences dangling t_pgrp pointer in the terminal. */ + memset(&winsz, 0xff, sizeof(winsz)); + if (ioctl(slave, TIOCSWINSZ, &winsz) < 0) + err(3, "ioctl(TIOCSWINSZ)"); + /* Dereferences dangling t_session pointer in the terminal. */ + if (ioctl(slave, TIOCSCTTY, 0) < 0) + err(4, "ioctl(TIOCSCTTY)"); + _exit(0); + } + + if (waitpid(child, &status, 0) < 0) + err(1, "waitpid"); + if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) + errx(1, "child exited with status %d", WEXITSTATUS(status)); +} From nobody Tue Apr 21 15:43:57 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0RV60Zp4z6WtjP for ; Tue, 21 Apr 2026 15:43:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0RV56WvHz3P5X for ; Tue, 21 Apr 2026 15:43:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786237; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6I62J+IFKLodJIEtwb4bQoC1f7LGaVrLCLR+kFEHjAE=; b=sFmhydfJK4qsgvYUYnPZrvfn8L/b2RkW6g8YA9bJJaGGEek0xkBcr4FaeZ5XyafGcsCEY+ NHb/E8WcuRvisUqlcHCFJMBKDRts1hvC64FZbEL9EKZ0nNhGtMLmrpgfcrXG6mmpVyUOI/ Ceqphsm4Pm77Adj6pazOcGSXy8gagPi/W9TIoaRyq70wTmpdVbCDCei54JSf5CP/WwnSqd gen3K637Q30N6HkdxG7c+jEu8r+VTVb7Owsm28u5+QQIgqg7ocCzRD95HvBVYbHNah1K9h javjCsnX5YYkrtCalg6810g6IBhI5+AH3b5z9hPGdvg423aBfqsTaWf+jhJXuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776786237; a=rsa-sha256; cv=none; b=qf7GY/5YcErw9dtwJHpZwGqFJZKqW2ME4RwzESCH+pBdZb51y7/MxGTPkx+Mx2wUpbbWZl vIgh+YFMoJbcmMcouseqs+9q47/tlS0HE2QQZxrBy2KgcbeBS4FdJHaepA9EoyFyV8iNal kHz7anbPzQGAkQinpkAkJOdRjE354L53COrbaqU1acGPpPsc5+a6CEylzBc20jsq8aQM7E 2EB6kOQBae4FtbCTo6kWqlq6HdIbqFjCrE8GvYk5wcR4+mnpzqL+hyoPEghBvP4TnKHDQB 4rZSHDdTCX0jOdzrx/cv5/HjZjINNsINtcox8KmuRPqasKX3AXrctm3wNmi9Jg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786237; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6I62J+IFKLodJIEtwb4bQoC1f7LGaVrLCLR+kFEHjAE=; b=FzoifTbku3UB/aRoKp0L7pmiEib7vvhXLwCM47sqhc0arUbBy4Eoo9Z7B9K8gMdhzk0ERK A8loCWJPDeRiJfd8xWr+v8lgK6t3VRoUGbNg7sZjiZOPI4mCzPxpYZeCXKx53o462vJUEn OCRI7uBZ1ynpnYR7VerP7vsMj9au+M+kFXl4rYR16X48EzPy7fk4sRiHxMI03peR9342MX tUg4jCsWFdFrgEuudgeI6XFQe4RVrUqO5ilVLcJNe6dor8+LqfiF6faBdNh4PmQPwOWvon rSzvFI3RC/QgzE0kTzw8KPLFKb4a3IaTXy439G61h5v4VEn6yu3oMJZ/JCdwvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0RV55wK7zr0r for ; Tue, 21 Apr 2026 15:43:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35f96 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 15:43:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: b8fc56193068 - stable/13 - pkru: Fix handling of 1GB largepage mappings List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b8fc561930689d167d831e79a77f72726302db76 Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 15:43:57 +0000 Message-Id: <69e79b3d.35f96.732a3b65@gitrepo.freebsd.org> The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b8fc561930689d167d831e79a77f72726302db76 commit b8fc561930689d167d831e79a77f72726302db76 Author: Mark Johnston AuthorDate: 2026-03-31 13:37:43 +0000 Commit: Mark Johnston CommitDate: 2026-04-21 15:43:53 +0000 pkru: Fix handling of 1GB largepage mappings pmap_pkru_update_range() did not handle the case where a PDPE has PG_PS set. More generally, the SET_PKRU and CLEAR_PKRU sysarch implementations did not check whether the request covers a "boundary" vm map entry. Fix this, add the missing PG_PS test, and add some tests. Approved by: so Security: FreeBSD-SA-26:11.amd64 Security: CVE-2026-6386 Reported by: Nicholas Carlini Reviewed by: kib, alc Differential Revision: https://reviews.freebsd.org/D56184 --- lib/libc/x86/sys/pkru.3 | 3 + sys/amd64/amd64/pmap.c | 20 +++- sys/amd64/amd64/sys_machdep.c | 43 +++++++-- sys/vm/vm_map.c | 32 +++++++ sys/vm/vm_map.h | 1 + tests/sys/posixshm/posixshm_test.c | 187 +++++++++++++++++++++++++++++++++++++ 6 files changed, 274 insertions(+), 12 deletions(-) diff --git a/lib/libc/x86/sys/pkru.3 b/lib/libc/x86/sys/pkru.3 index 43c6e2423abe..c49eed14c148 100644 --- a/lib/libc/x86/sys/pkru.3 +++ b/lib/libc/x86/sys/pkru.3 @@ -179,6 +179,9 @@ The supplied argument for .Fn x86_pkru_protect_range has reserved bits set. +.It Bq Er EINVAL +The range of the request partially covers a mapping of an object created by +.Xr shm_create_largepage 3 . .It Bq Er EFAULT The supplied address range does not completely fit into the user-managed address range. diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 5d848cdd7aac..bb309d531ff2 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -11255,7 +11255,7 @@ pmap_pkru_update_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, u_int keyidx) { pml4_entry_t *pml4e; - pdp_entry_t *pdpe; + pdp_entry_t newpdpe, *pdpe; pd_entry_t newpde, ptpaddr, *pde; pt_entry_t newpte, *ptep, pte; vm_offset_t va, va_next; @@ -11281,6 +11281,22 @@ pmap_pkru_update_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, va_next = eva; continue; } + if ((*pdpe & PG_PS) != 0) { + va_next = (va + NBPDP) & ~PDPMASK; + if (va_next < va) + va_next = eva; + KASSERT(va_next <= eva, + ("partial update of non-transparent 1G mapping " + "pdpe %#lx va %#lx eva %#lx va_next %#lx", + *pdpe, va, eva, va_next)); + newpdpe = (*pdpe & ~X86_PG_PKU_MASK) | + X86_PG_PKU(keyidx); + if (newpdpe != *pdpe) { + *pdpe = newpdpe; + changed = true; + } + continue; + } va_next = (va + NBPDR) & ~PDRMASK; if (va_next < va) @@ -11333,8 +11349,6 @@ pmap_pkru_check_uargs(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, if (pmap->pm_type != PT_X86 || keyidx > PMAP_MAX_PKRU_IDX || (flags & ~(AMD64_PKRU_PERSIST | AMD64_PKRU_EXCL)) != 0) return (EINVAL); - if (eva <= sva || eva > VM_MAXUSER_ADDRESS) - return (EFAULT); if ((cpu_stdext_feature2 & CPUID_STDEXT2_PKU) == 0) return (ENOTSUP); return (0); diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c index b80d0bc95d70..3fbf44d9e48a 100644 --- a/sys/amd64/amd64/sys_machdep.c +++ b/sys/amd64/amd64/sys_machdep.c @@ -32,7 +32,6 @@ * from: @(#)sys_machdep.c 5.5 (Berkeley) 1/19/91 */ -#include #include "opt_capsicum.h" #include "opt_ktrace.h" @@ -356,32 +355,58 @@ sysarch(struct thread *td, struct sysarch_args *uap) break; case I386_SET_PKRU: - case AMD64_SET_PKRU: + case AMD64_SET_PKRU: { + vm_offset_t addr, start, end; + vm_size_t len; + + addr = (uintptr_t)a64pkru.addr; + len = a64pkru.len; + /* * Read-lock the map to synchronize with parallel * pmap_vmspace_copy() on fork. */ map = &td->td_proc->p_vmspace->vm_map; vm_map_lock_read(map); - error = pmap_pkru_set(PCPU_GET(curpmap), - (vm_offset_t)a64pkru.addr, (vm_offset_t)a64pkru.addr + - a64pkru.len, a64pkru.keyidx, a64pkru.flags); + if (len == 0 || !vm_map_check_boundary(map, addr, addr + len)) { + vm_map_unlock_read(map); + error = EINVAL; + break; + } + start = trunc_page(addr); + end = round_page(addr + len); + error = pmap_pkru_set(PCPU_GET(curpmap), start, end, + a64pkru.keyidx, a64pkru.flags); vm_map_unlock_read(map); break; + } case I386_CLEAR_PKRU: - case AMD64_CLEAR_PKRU: + case AMD64_CLEAR_PKRU: { + vm_offset_t addr, start, end; + vm_size_t len; + if (a64pkru.flags != 0 || a64pkru.keyidx != 0) { error = EINVAL; break; } + + addr = (uintptr_t)a64pkru.addr; + len = a64pkru.len; + map = &td->td_proc->p_vmspace->vm_map; vm_map_lock_read(map); - error = pmap_pkru_clear(PCPU_GET(curpmap), - (vm_offset_t)a64pkru.addr, - (vm_offset_t)a64pkru.addr + a64pkru.len); + if (len == 0 || !vm_map_check_boundary(map, addr, addr + len)) { + vm_map_unlock_read(map); + error = EINVAL; + break; + } + start = trunc_page(addr); + end = round_page(addr + len); + error = pmap_pkru_clear(PCPU_GET(curpmap), start, end); vm_map_unlock_read(map); break; + } default: error = EINVAL; diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 97352ba7b4b7..53d954499e34 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -4116,6 +4116,38 @@ vm_map_check_protection(vm_map_t map, vm_offset_t start, vm_offset_t end, return (TRUE); } +/* + * Check whether the specified range partially overlaps a map entry with + * fixed boundaries, and return false if so. + * + * The map must be locked. + */ +bool +vm_map_check_boundary(vm_map_t map, vm_offset_t start, vm_offset_t end) +{ + vm_map_entry_t entry; + int bdry_idx; + + if (!vm_map_range_valid(map, start, end)) + return (false); + if (start == end) + return (true); + + if (vm_map_lookup_entry(map, start, &entry)) { + bdry_idx = MAP_ENTRY_SPLIT_BOUNDARY_INDEX(entry); + if (bdry_idx != 0 && + (start & (pagesizes[bdry_idx] - 1)) != 0) + return (false); + } + if (vm_map_lookup_entry(map, end - 1, &entry)) { + bdry_idx = MAP_ENTRY_SPLIT_BOUNDARY_INDEX(entry); + if (bdry_idx != 0 && + (end & (pagesizes[bdry_idx] - 1)) != 0) + return (false); + } + return (true); +} + /* * * vm_map_copy_swap_object: diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index 9e4e1db0fd98..9467f39f00d0 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -469,6 +469,7 @@ vm_map_entry_read_succ(void *token, struct vm_map_entry *const clone, #endif /* ! _KERNEL */ #ifdef _KERNEL +bool vm_map_check_boundary(vm_map_t, vm_offset_t, vm_offset_t); boolean_t vm_map_check_protection (vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t); int vm_map_delete(vm_map_t, vm_offset_t, vm_offset_t); int vm_map_find(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, vm_size_t, diff --git a/tests/sys/posixshm/posixshm_test.c b/tests/sys/posixshm/posixshm_test.c index 4a7f95fda4ee..6552b02f9fba 100644 --- a/tests/sys/posixshm/posixshm_test.c +++ b/tests/sys/posixshm/posixshm_test.c @@ -34,10 +34,17 @@ #include #include +#ifdef __amd64__ +#include +#endif + #include #include #include +#include +#include #include +#include #include #include #include @@ -1702,6 +1709,183 @@ ATF_TC_BODY(largepage_pipe, tc) } } +#ifdef __amd64__ +static sigjmp_buf jmpbuf; +static _Atomic(void *) faultaddr; +static _Atomic(int) faultsig; + +#define KEY_RW 1 +#define KEY_RO 2 +#define KEY_WO 3 +#define KEY_NO 4 +#define VAL 0xdeadfacec0debeef +static void +set_keys(void) +{ + int error; + + error = x86_pkru_set_perm(KEY_RW, 1, 1); + ATF_REQUIRE(error == 0); + error = x86_pkru_set_perm(KEY_RO, 1, 0); + ATF_REQUIRE(error == 0); + error = x86_pkru_set_perm(KEY_WO, 0, 1); + ATF_REQUIRE(error == 0); + error = x86_pkru_set_perm(KEY_NO, 0, 0); + ATF_REQUIRE(error == 0); +} + +static void +sigsegv(int sig, siginfo_t *si, void *uc __unused) +{ + faultsig = sig; + faultaddr = si->si_addr; + siglongjmp(jmpbuf, 1); +} + +static bool +try_read(volatile uint64_t *p, uint64_t *outp) +{ + if (sigsetjmp(jmpbuf, 1) == 0) { + *outp = *p; + return (true); + } else { + atomic_signal_fence(memory_order_relaxed); + ATF_REQUIRE(faultsig == SIGSEGV); + ATF_REQUIRE(faultaddr == p); + set_keys(); /* PKRU is not restored by siglongjmp? */ + return (false); + } +} + +static bool +try_write(volatile uint64_t *p, uint64_t val) +{ + if (sigsetjmp(jmpbuf, 1) == 0) { + *p = val; + return (true); + } else { + atomic_signal_fence(memory_order_relaxed); + ATF_REQUIRE(faultsig == SIGSEGV); + ATF_REQUIRE(faultaddr == p); + set_keys(); /* PKRU is not restored by siglongjmp? */ + return (false); + } +} + +ATF_TC_WITHOUT_HEAD(largepage_pkru); +ATF_TC_BODY(largepage_pkru, tc) +{ + size_t ps[MAXPAGESIZES]; + struct sigaction sa; + char *addr, *addr1; + int error, fd, pscnt; + + memset(&sa, 0, sizeof(sa)); + sa.sa_sigaction = sigsegv; + sa.sa_flags = SA_SIGINFO; + sigemptyset(&sa.sa_mask); + error = sigaction(SIGSEGV, &sa, NULL); + ATF_REQUIRE(error == 0); + + pscnt = pagesizes(ps); + + for (int i = 1; i < pscnt; i++) { + uint64_t val; + + fd = shm_open_large(i, SHM_LARGEPAGE_ALLOC_DEFAULT, ps[i]); + addr = mmap(NULL, ps[i], PROT_READ | PROT_WRITE, MAP_SHARED, fd, + 0); + ATF_REQUIRE_MSG(addr != MAP_FAILED, + "mmap(%zu bytes) failed; error=%d", ps[i], errno); + + /* + * Ensure that the page is faulted into the pmap. + */ + memset(addr, 0, ps[i]); + + set_keys(); + + /* + * Make sure we can't partially cover a largepage mapping. + */ + error = x86_pkru_protect_range(addr, PAGE_SIZE, KEY_RW, 0); + ATF_REQUIRE_ERRNO(EINVAL, error != 0); + error = x86_pkru_protect_range(addr, ps[i] - PAGE_SIZE, KEY_RW, + 0); + ATF_REQUIRE_ERRNO(EINVAL, error != 0); + error = x86_pkru_protect_range(addr + PAGE_SIZE, ps[i] - PAGE_SIZE, + KEY_RW, 0); + ATF_REQUIRE_ERRNO(EINVAL, error != 0); + error = x86_pkru_protect_range(addr + 1, ps[i], KEY_RW, 0); + ATF_REQUIRE_ERRNO(EINVAL, error != 0); + + /* + * Make sure that protections are honoured. + */ + for (int j = 1; j <= 4; j++) { + volatile uint64_t *addr64; + + error = x86_pkru_protect_range(addr, ps[i], 0, 0); + ATF_REQUIRE(error == 0); + + addr64 = (volatile uint64_t *)(void *)addr; + *addr64 = VAL; + + error = x86_pkru_protect_range(addr, ps[i], j, 0); + ATF_REQUIRE(error == 0); + switch (j) { + case KEY_RW: + ATF_REQUIRE(try_write(addr64, VAL)); + ATF_REQUIRE(try_read(addr64, &val)); + ATF_REQUIRE(val == VAL); + break; + case KEY_RO: + ATF_REQUIRE(try_read(addr64, &val)); + ATF_REQUIRE(val == VAL); + ATF_REQUIRE(!try_write(addr64, VAL)); + break; + case KEY_WO: + /* !access implies !modify */ + case KEY_NO: + ATF_REQUIRE(!try_read(addr64, &val)); + ATF_REQUIRE(!try_write(addr64, VAL)); + break; + default: + __unreachable(); + } + } + error = munmap(addr, ps[i]); + ATF_CHECK(error == 0); + + /* + * Try mapping a large page in a region partially covered by a + * key. + * + * Rather than detecting the mismatch when the logical mapping + * is created, we currently only fail once pmap_enter() is + * called from the fault handler. This is not ideal and might + * be improved in the future. + */ + error = x86_pkru_protect_range(addr, ps[i], 0, 0); + ATF_REQUIRE(error == 0); + error = x86_pkru_protect_range(addr + PAGE_SIZE, + ps[i] - PAGE_SIZE, KEY_RW, 0); + ATF_REQUIRE(error == 0); + + addr1 = mmap(addr, ps[i], PROT_READ | PROT_WRITE, + MAP_SHARED | MAP_FIXED, fd, 0); + ATF_REQUIRE(addr1 != MAP_FAILED); + ATF_REQUIRE(addr == addr1); + ATF_REQUIRE(!try_read((volatile uint64_t *)(void *)addr, &val)); + ATF_REQUIRE(!try_write((volatile uint64_t *)(void *)addr, VAL)); + } +} +#undef KEY_RW +#undef KEY_RO +#undef KEY_WO +#undef KEY_NO +#endif + ATF_TC_WITHOUT_HEAD(largepage_reopen); ATF_TC_BODY(largepage_reopen, tc) { @@ -1791,6 +1975,9 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, largepage_mprotect); ATF_TP_ADD_TC(tp, largepage_minherit); ATF_TP_ADD_TC(tp, largepage_pipe); +#ifdef __amd64__ + ATF_TP_ADD_TC(tp, largepage_pkru); +#endif ATF_TP_ADD_TC(tp, largepage_reopen); return (atf_no_error()); From nobody Tue Apr 21 15:44:24 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0RVc3Kjxz6Wtcd for ; Tue, 21 Apr 2026 15:44:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0RVc2Ywzz3PnK for ; Tue, 21 Apr 2026 15:44:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xr7mFLLRZfGQGLad6lt9KhesEtekZKfpKYMfJwpXNj8=; b=i4241wlPBS3v7XUPVa1WyIrzlq47yLF34R405QMICEfSA1y/kzeQGhi1/9mAmJXqeLZ9HH skankJ/7Lb/y/SNVpRMFPZXFh+jr9vsZHAgtB3YOrVD8o1Dugo3+uq6FZ0qgY5mImm6LUe BVfllp0zzPp4Mu0VGnEFWYtyeyvt7rzJbbHhE71REZZU2lq997SuWLS8Yig1pEZJ0VMi1V B32C+iMbqbODlaUNKCngEkJjJYM5ikKK5QUSCl80wNIrFnHsosMOMNnx95zf+dbwaDN7yN YPEg8Sqi+J+wK1chmEGotba6uG2jBflqtv+x4EYJ+QTXqpHsw3DxVAfJ5ZWlew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776786264; a=rsa-sha256; cv=none; b=GxgAFin5zWqCfO20zqGh/KGhVwuN4RUxyCYDTGjTdT8NESSzbFFvI9dGOXK2pC0lGcO1Ae zdMZiKl67R7l/Yo7iq0vSxhA6TrpV0D6jpXkcWN/5SMiySzkDsOw1Ekvl/c0ZCaphxx0lS Wy2yqge7Jk8xPW4TxiiVM7YFIREx78QhUT6eAWObIdkF5KYoDuT4/9yUZKWmEy1QglNsCM UQRl8O6THFYubKJop9/kojYWdz6X0U2mPvw/3K2Q6dvnzeydvkwdDfXxOYGlyR77xzujtr erMfOiY4OtwSdVlF1RAfyTHPjyoWB4CqAiHRwZ4SN2Gj5jcvlO+7LFHhPgqzgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xr7mFLLRZfGQGLad6lt9KhesEtekZKfpKYMfJwpXNj8=; b=TqJPFrmHmYQBxOd6grgCYCPD/sT+LbI8qTct3972dfKFR+0P/6RvdJCmNNFru1kDnFaEt/ VHX4ubopn+S1rbW4xus/vO+86mMhzh42rE72hRvhK/aT+yMeaSBNBW8wD/xjdUEOTrFQta KvFw+TcCg6lpQfc0rMiczjMsfJZUV4nkqbecQhyUnw+LR9qJYcxbkPj74UC+a5d2Bv+DJA U5W/pXkYEQnKZ9kZxmOn8+5T1FJR0YTTwhM9iJ5qfqtAo8v9vCAGUASGdQoMSJWaeoqdQ4 BkryP/+DAa5JuJxbA8sewxydSDHaSDIz49rrOZPcod3vnA78PZStmiHHB4lwEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0RVc23Qgzqhf for ; Tue, 21 Apr 2026 15:44:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3648c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 15:44:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: ffb21713d9fd - releng/15.0 - vm_fault: Reset m_needs_zeroing properly List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: ffb21713d9fdaef1e416a4443c7bc234cfb5457d Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 15:44:24 +0000 Message-Id: <69e79b58.3648c.3bc454a8@gitrepo.freebsd.org> The branch releng/15.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ffb21713d9fdaef1e416a4443c7bc234cfb5457d commit ffb21713d9fdaef1e416a4443c7bc234cfb5457d Author: Mark Johnston AuthorDate: 2026-04-08 04:21:09 +0000 Commit: Mark Johnston CommitDate: 2026-04-15 19:02:32 +0000 vm_fault: Reset m_needs_zeroing properly - When allocating a page, we should only consider the PG_ZERO flag when handling the top-level page. - Unconditionally reset the flag when restarting the fault handler. Previously, vm_fault_busy_sleep() would fail to reset it. Approved by: so Security: FreeBSD-EN-26:05.vm PR: 294039 Reviewed by: kib Tested by: Peter Much MFC after: 3 days Fixes: cff67bc43df1 ("vm_fault: only rely on PG_ZERO when the page was newly allocated") Differential Revision: https://reviews.freebsd.org/D56234 (cherry picked from commit 04132e01004316ddd0e0cde6ef15b100b7b1844d) (cherry picked from commit 58718cf365933dc2c75d43f7154371344bf47286) --- sys/vm/vm_fault.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index f9711548e23e..fb9cf250ad5f 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -264,8 +264,6 @@ vm_fault_unlock_vp(struct faultstate *fs) static void vm_fault_deallocate(struct faultstate *fs) { - - fs->m_needs_zeroing = true; vm_fault_page_release(&fs->m_cow); vm_fault_page_release(&fs->m); vm_object_pip_wakeup(fs->object); @@ -1298,7 +1296,8 @@ vm_fault_allocate(struct faultstate *fs, struct pctrie_iter *pages) vm_waitpfault(dset, vm_pfault_oom_wait * hz); return (FAULT_RESTART); } - fs->m_needs_zeroing = (fs->m->flags & PG_ZERO) == 0; + if (fs->object == fs->first_object) + fs->m_needs_zeroing = (fs->m->flags & PG_ZERO) == 0; fs->oom_started = false; return (FAULT_CONTINUE); @@ -1589,7 +1588,6 @@ vm_fault(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, fs.fault_flags = fault_flags; fs.map = map; fs.lookup_still_valid = false; - fs.m_needs_zeroing = true; fs.oom_started = false; fs.nera = -1; fs.can_read_lock = true; @@ -1598,6 +1596,7 @@ vm_fault(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, RetryFault: fs.fault_type = fault_type; + fs.m_needs_zeroing = true; /* * Find the backing store object and offset into it to begin the From nobody Tue Apr 21 15:44:25 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0RVd5nTfz6Wtg4 for ; Tue, 21 Apr 2026 15:44:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0RVd3lV3z3PnW for ; Tue, 21 Apr 2026 15:44:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nM2P9bEXlg3fhSnOyNCiAxESp3Dd/gNMPunnTlE5RCU=; b=aLoclBjAoSVD7S65Mmod3M4OHVatAzVuINURvm1d3at8ZwjrWI8nI08MvlKqt1dK9EAWsT T5wwMqPUJjpyRYchfTTZMt27FEn4oXum761qe9updmflAkzVJvlhWdTqUufO5BtAZp0RdA 8Rx3X0cgnDp0w3y7LVjz4zlbkdJYv5ANDOlhP/d0tUQLYNV5LFUAxP2TbeJeXqns7WEg5+ LhJgyZP4sSMLNhmzRn4S9jghKburmMAyIUFD+sQ+5iWMqaRZMHSsaeSfe8wIOFUGMdLvrO Z4BN7GEBH6GT25+Qd0gZMrte+wA4UfJQgu1csq3KZbW8d0jWGvrPxEsMrR+T2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776786265; a=rsa-sha256; cv=none; b=CZZCIQoABRT8Jw78BUBsYAb0nkLbpm5sUhZVuHnWHnSBJBELhL96gvAHN0GFETzMLXQfWY AYmeB8C63w3EzXyQ3zC1SouqQXqxlT7uOViEpFiXMaDQJwn8yx7lR6Sk54G94PwO9XtpY+ 4qxnrk9JjqvI+I5pLx1cqH6LVeoJLWz/t0jy6X2Ov4zjEYIBsb5LQH4eLgpxqL2eSAKOcn nEAn3Lz2Ze0sa0EIG/lEwwZGsdLr1aPj7JXEFB9aXFeUn8/GpnsEg5K4m+itQegoO4EKJ+ cUmHMFoKfzrIfs794DyLXZXk6cn0iFPATYdmLcOQ6LL+aCeB1EIU3gl3cPVByw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nM2P9bEXlg3fhSnOyNCiAxESp3Dd/gNMPunnTlE5RCU=; b=wnhZIqNpSZnMOeBV4Tjehq5Mf/QDaDU3qg4GhQWPwb3V8F4LvZQ5JQMVQsXwhLfa91aVsx MVtVY3QSDd329vk/ZgfxWpmhQVMnT3q38qylWaMiEVmb4QbSYwFYKKguHf1P7k8AuurH7c ztjFRQzkQHDZqzJjUJ+2gPOIh5gSWhnfdeeLPlrJbYNG948KkYoCe/okTKAllhYViOrrFj sh2bHi15yHuWvWkBDn1CM2zn3WbDHO/g6tlVYDip7JCsjtUtndDxOw5pWXC0cXMsoqY7gg 5rKQMD+V1FIT565nB647OMEQJRl3RjlnWGgtsPL527wbxAoBZyMw39GKTHpTdw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0RVd2bVFzqQ6 for ; Tue, 21 Apr 2026 15:44:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 360c8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 15:44:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jake Freeland From: Mark Johnston Subject: git: b0be1af0c48b - releng/15.0 - timerfd: Fix interval callout scheduling List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: b0be1af0c48b3c326d56fbcb15f57554bf537f53 Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 15:44:25 +0000 Message-Id: <69e79b59.360c8.1c6f6aa0@gitrepo.freebsd.org> The branch releng/15.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b0be1af0c48b3c326d56fbcb15f57554bf537f53 commit b0be1af0c48b3c326d56fbcb15f57554bf537f53 Author: Jake Freeland AuthorDate: 2026-03-20 06:33:03 +0000 Commit: Mark Johnston CommitDate: 2026-04-15 19:02:35 +0000 timerfd: Fix interval callout scheduling When a timerfd interval callout misses its scheduled activation time, a differential is calculated based on the actual activation time and the scheduled activation time. This differential is divided by the timerfd's interval time and the quotient is added to the timerfd's counter. Before this change, the next callout was scheduled to activate at: scheduled activation time + timerfd interval. This change fixes the scheduling of the next callout to activate at: actual activation time + timerfd interval - remainder. Approved by: so Security: FreeBSD-EN-26:06.timerfd Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D55790 MFC after: 2 weeks (cherry picked from commit 85c0f1a87da1fd1eb3e646e86f70e630c48da91a) (cherry picked from commit 9b785380f307e772eae0df017c982acd81d5879e) --- sys/kern/sys_timerfd.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/sys/kern/sys_timerfd.c b/sys/kern/sys_timerfd.c index 565ab3ad6ee6..236dfe8bb96a 100644 --- a/sys/kern/sys_timerfd.c +++ b/sys/kern/sys_timerfd.c @@ -393,23 +393,25 @@ static void timerfd_expire(void *arg) { struct timerfd *tfd = (struct timerfd *)arg; - struct timespec uptime; + sbintime_t exp, interval, now, next, diff; ++tfd->tfd_count; tfd->tfd_expired = true; if (timespecisset(&tfd->tfd_time.it_interval)) { + exp = tstosbt(tfd->tfd_time.it_value); + interval = tstosbt(tfd->tfd_time.it_interval); + now = sbinuptime(); + next = now + interval; + /* Count missed events. */ - nanouptime(&uptime); - if (timespeccmp(&uptime, &tfd->tfd_time.it_value, >)) { - timespecsub(&uptime, &tfd->tfd_time.it_value, &uptime); - tfd->tfd_count += tstosbt(uptime) / - tstosbt(tfd->tfd_time.it_interval); + if (now > exp) { + diff = now - exp; + tfd->tfd_count += diff / interval; + next -= diff % interval; } - timespecadd(&tfd->tfd_time.it_value, - &tfd->tfd_time.it_interval, &tfd->tfd_time.it_value); - callout_schedule_sbt(&tfd->tfd_callout, - tstosbt(tfd->tfd_time.it_value), - 0, C_ABSOLUTE); + + callout_schedule_sbt(&tfd->tfd_callout, next, 0, C_ABSOLUTE); + tfd->tfd_time.it_value = sbttots(next); } else { /* Single shot timer. */ callout_deactivate(&tfd->tfd_callout); From nobody Tue Apr 21 15:44:26 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0RVf6pFRz6Wtck for ; Tue, 21 Apr 2026 15:44: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0RVf3xpBz3Pt8 for ; Tue, 21 Apr 2026 15:44:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Uyp0EASbOytx9YL/CP2tA00mFuIWpo7gALs/x2fPLE=; b=eYT4HTseS7ksfCjODiWsNoZI5YKHNiR/0RsNkwwX9moudsf4EXV9Q4WrU4Ii7SjEr1+ESn ChHXdbOTt9lUuIT9uSX/P0o62zoe5tnmfmBfcpbmtc+Z9LPXGEhH4uUohoaEc05GSpxTsA KyJVoXQVSZsTU3CRkAjKCnp2BoMj2XcigBrEhzOVrsHU/0rANotBCGNoVV4QYiO81mNTB8 KvrRJF3PK/d8ZSv6AcDtx+UyEHjU6JsTljj6oGWdS7XSYsam2Q8nqqgaaf0ZsBc7G0WpBX 0OZVb2CxYBxISyusOl37dTrtMo+gHW+KkBtKcxATZyW2/07jLHZznleVruFE1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776786266; a=rsa-sha256; cv=none; b=qIfCh1Tzp8ws8MyorM2T/8MXQOsrbCVv2FeCJoPt4dvETQpxzY2OELtFOmeT4h0JEpQcnu cVKhcXFouafMoCxvgwBvpbTLaAWDpU3h6dj6Sh4YuwoxcczVdos+hGBYUA3nlmkXjWZjtJ TdqR1YVAStFyUAhF+RmXae+wnkCwrRmwr54HHG+4FIq1x+M/6f91fIzQ3hpYinqwpTsmAR WT3CoIDnG3WfV/FU9ZfPVgPf869teNdl6ocHCV5jWgK15EoKE3vQR6zM8C+GO1H9Pom6qP hvU0p8Z3KSA6EEsX9fuR+2oDiXOW9YFEXCDR3sKE0Y/3ij+8Q5RMAB2pJbdj7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Uyp0EASbOytx9YL/CP2tA00mFuIWpo7gALs/x2fPLE=; b=ZdBvWFe8wUv48Bz7cTS4//wW9bdwWcvdkA7+QEvPy9j6Y+6nk7LlhsxalIxdHNoqNHsy5+ lmoZG/HmMqfJCVHxpbxBdERnwfbbQZLpmJHUJyPE7tGLS24rt31VrDl0QQh7FRlMUFxWS+ 318IluVeL9yegnFUTJfkoL9ANVXxQhcYEDkziXLO2bYERiuhGjwx8LPp6qhJPxB6UadUgy W1YSJEHqMPX/Taz0UlSHJTsj2jbV1qH2QDkayChpw1VfKunnhqmMOW+M5EAkvq49qLIGrj j78Hlq21mHf9XJE7ScrSG85Rae5GWgsUKaJ7ExiTWGu7cuE4TGZzmP27hXKw9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0RVf3R2kzr0t for ; Tue, 21 Apr 2026 15:44:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34072 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 15:44:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Lexi Winter From: Mark Johnston Subject: git: f3bbb238daa1 - releng/15.0 - packages: Fix build with libucl 0.9.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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: f3bbb238daa17cad6a5a6d562686c2e10e9768e5 Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 15:44:26 +0000 Message-Id: <69e79b5a.34072.70f1e08b@gitrepo.freebsd.org> The branch releng/15.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f3bbb238daa17cad6a5a6d562686c2e10e9768e5 commit f3bbb238daa17cad6a5a6d562686c2e10e9768e5 Author: Lexi Winter AuthorDate: 2026-04-06 17:11:22 +0000 Commit: Mark Johnston CommitDate: 2026-04-15 19:02:38 +0000 packages: Fix build with libucl 0.9.3 In libucl 0.9.3, macros and includes are disabled by default when creating a new UCL parser. This breaks the package build, which relies on includes. Fix this by explicitly passing zero flags to ucl.parser(). Approved by: so Security: FreeBSD-EN-26:07.pkgbase MFC after: 3 days Fixes: abda442d92fd ("contrib/libucl: Import libucl 0.9.3") Reviewed by: kevans, bapt Reported by: freebsd@walstatt-de.de Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56266 (cherry picked from commit 63d0e3e3aa2483420f828686336d6615616363d5) (cherry picked from commit 976b2ebf43094076d52e34c8dbeabae032caa6ad) --- release/packages/generate-set-ucl.lua | 2 +- release/packages/generate-ucl.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/release/packages/generate-set-ucl.lua b/release/packages/generate-set-ucl.lua index 9ba7026b75df..7a1cddda7be1 100755 --- a/release/packages/generate-set-ucl.lua +++ b/release/packages/generate-set-ucl.lua @@ -16,7 +16,7 @@ substituted as UCL variables. local ucl = require("ucl") -- This parser is the output UCL we want to build. -local parser = ucl.parser() +local parser = ucl.parser(0) if #arg < 1 then io.stderr:write(arg[0] .. ": missing template filename\n") diff --git a/release/packages/generate-ucl.lua b/release/packages/generate-ucl.lua index 19a9a95d5d38..aaaa4375dd4d 100755 --- a/release/packages/generate-ucl.lua +++ b/release/packages/generate-ucl.lua @@ -124,7 +124,7 @@ local pkgprefix = nil local pkgversion = nil -- This parser is the output UCL we want to build. -local parser = ucl.parser() +local parser = ucl.parser(0) -- Set any $VARIABLES from the command line in the parser. This causes ucl to -- automatically replace them when we load the source ucl. From nobody Tue Apr 21 15:44:27 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0RVh0FSgz6Wv0k for ; Tue, 21 Apr 2026 15:44:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0RVg4f4qz3PtD for ; Tue, 21 Apr 2026 15:44:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n2W1sMKPkBnmEoOlYGE7L+GGisJ0iVYUwqpzD0FJwmo=; b=HP00KuShizORy4uPno8cUL9uYgI2ExcyA3eNw658mbnnzREI7zTb47+Zfjv34Nsx9yACC0 1B6MyCosbpkhhWPEv6AZv1y5rWJEn1FLfknsfNqkQVY04+oTb/Kf00jVwM44TIsucUUw5W lQECuNZDhSik0sJN1iJVmxAi5sqDQLxLgiogobV7jUmx2Nf7tSxqK7qsozQosdfqmp0Y/s x/snVwWCO41G3F123CBHaoW2z/kSoTwZM9a4znUq0N8cyveKwKSeZIf126xWp7OEb/2CiV Np538RDG7GgEi+hSdMYjYTM8icwoFRJbhyMYyj9+o0hZ6OXa7mmGjAgYaunNdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776786267; a=rsa-sha256; cv=none; b=ZIhqJwUc75PLxeBcXrWeaWciAPBQvmE+jS3GZqmrQvnJyF/6SEfEyenAIVWjRR4nT1lJgE f0KU9YoioNDybse+IMfhqRr8XQf32wza7LocrQ+Xa/f0wR/cHlS3QPF8j49/U9MCwNp7fC N9t+I/Cp/UsMpIPVGsiSCI6zwmh5eUmaaW+BoFeHBMxjFD8k+vW805WqHe+4to0E7C55Ls g+UIbnk5rssaoQ8nXF71d6nBZAwdD/lNWlH6EZrN1E9vJCIgFgYo9Kr0Qt31PEfmelesXu QIKgrqZZ28HjpJ87JSEv7xt6maEMEdhg/TxZ4+NVl+xYuqf8+TyxfvnUbqRFew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n2W1sMKPkBnmEoOlYGE7L+GGisJ0iVYUwqpzD0FJwmo=; b=an+b7UuoRKjQ3caCxX1BjIVZjhExN3ujqfdZNoLf0QaZ0yjLeurtGzzVgKGtI0CF6Iy+N5 yLL8ayT/Uw3iChjGPlTewiLfxYVXY4DQQT+6YKbUruxMwazxfdmYATXvL2gS55FHACw/UL 6xXMTj/wXsOqSUDVKzz/HN4TftylUtCj0W2ZPNYsCSjFdTbosKrsX/bCxES5FLjUTcO4YK MN4KnIdrv3jPPpT/zN0kZLTY1M1R5QyPoajNJW8IQceV8wWLmPeMpVrG1X0R4uVxAqK0Os BCVejb7AW+2xSh5jtzWFs0QmFEuUTaTiSXaiJmMLq/cL/ZpmJ9p4F+XJTZmjEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0RVg3yJVzr8H for ; Tue, 21 Apr 2026 15:44:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 344d9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 15:44:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: fdee312d0c97 - releng/15.0 - tty: Avoid leaving dangling pointers in tty_drop_ctty() List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: fdee312d0c97cf6d907eec0b96efd51bfc9a7567 Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 15:44:27 +0000 Message-Id: <69e79b5b.344d9.b6cf70e@gitrepo.freebsd.org> The branch releng/15.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fdee312d0c97cf6d907eec0b96efd51bfc9a7567 commit fdee312d0c97cf6d907eec0b96efd51bfc9a7567 Author: Mark Johnston AuthorDate: 2026-03-23 15:22:48 +0000 Commit: Mark Johnston CommitDate: 2026-04-20 13:19:13 +0000 tty: Avoid leaving dangling pointers in tty_drop_ctty() The TIOCNOTTY handler detaches the calling process from its controlling terminal. It clears the link from the session to the tty, but not the pointers from the tty to the session and process group. This means that sess_release() doesn't call tty_rel_sess(), and that pgdelete() doesn't call tty_rel_pgrp(), so the pointers are left dangling. Fix this by clearing pointers in tty_drop_ctty(). Add a standalone regression test. Approved by: so Security: FreeBSD-SA-26:10.tty Security: CVE-2026-5398 Reported by: Nicholas Carlini Reviewed by: kib, kevans Fixes: 1b50b999f9b5 ("tty: implement TIOCNOTTY") Differential Revision: https://reviews.freebsd.org/D56046 --- sys/kern/tty.c | 4 +++ tests/sys/kern/tty/Makefile | 1 + tests/sys/kern/tty/tiocnotty.c | 82 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+) diff --git a/sys/kern/tty.c b/sys/kern/tty.c index c8e2c561b7cf..356a69682997 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1261,6 +1261,10 @@ tty_drop_ctty(struct tty *tp, struct proc *p) session->s_ttydp = NULL; SESS_UNLOCK(session); + if (tp->t_session == session) { + tp->t_session = NULL; + tp->t_pgrp = NULL; + } tp->t_sessioncnt--; p->p_flag &= ~P_CONTROLT; PROC_UNLOCK(p); diff --git a/tests/sys/kern/tty/Makefile b/tests/sys/kern/tty/Makefile index 8628ab79875f..d134b3337a21 100644 --- a/tests/sys/kern/tty/Makefile +++ b/tests/sys/kern/tty/Makefile @@ -5,6 +5,7 @@ PLAIN_TESTS_PORCH+= test_canon PLAIN_TESTS_PORCH+= test_canon_fullbuf PLAIN_TESTS_PORCH+= test_ncanon PLAIN_TESTS_PORCH+= test_recanon +PLAIN_TESTS_C+= tiocnotty ATF_TESTS_C+= test_sti PROGS+= fionread diff --git a/tests/sys/kern/tty/tiocnotty.c b/tests/sys/kern/tty/tiocnotty.c new file mode 100644 index 000000000000..2581f976b2ef --- /dev/null +++ b/tests/sys/kern/tty/tiocnotty.c @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2026 Mark Johnston + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +/* + * A regression test that exercises a bug where TIOCNOTTY would leave some + * dangling pointers behind in the controlling terminal structure. + */ + +#include +#include + +#include +#include +#include +#include +#include + +int +main(void) +{ + int master, slave, status; + pid_t child; + + master = posix_openpt(O_RDWR | O_NOCTTY); + if (master < 0) + err(1, "posix_openpt"); + if (grantpt(master) < 0) + err(1, "grantpt"); + if (unlockpt(master) < 0) + err(1, "unlockpt"); + + child = fork(); + if (child < 0) + err(1, "fork"); + if (child == 0) { + if (setsid() < 0) + err(1, "setsid"); + slave = open(ptsname(master), O_RDWR | O_NOCTTY); + if (slave < 0) + err(2, "open"); + if (ioctl(slave, TIOCSCTTY, 0) < 0) + err(3, "ioctl(TIOCSCTTY)"); + /* Detach ourselves from the controlling terminal. */ + if (ioctl(slave, TIOCNOTTY, 0) < 0) + err(4, "ioctl(TIOCNOTTY)"); + _exit(0); + } + + if (waitpid(child, &status, 0) < 0) + err(1, "waitpid"); + if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) + errx(1, "child exited with status %d", WEXITSTATUS(status)); + + child = fork(); + if (child < 0) + err(1, "fork"); + if (child == 0) { + struct winsize winsz; + + if (setsid() < 0) + err(1, "setsid"); + slave = open(ptsname(master), O_RDWR | O_NOCTTY); + if (slave < 0) + err(2, "open"); + /* Dereferences dangling t_pgrp pointer in the terminal. */ + memset(&winsz, 0xff, sizeof(winsz)); + if (ioctl(slave, TIOCSWINSZ, &winsz) < 0) + err(3, "ioctl(TIOCSWINSZ)"); + /* Dereferences dangling t_session pointer in the terminal. */ + if (ioctl(slave, TIOCSCTTY, 0) < 0) + err(4, "ioctl(TIOCSCTTY)"); + _exit(0); + } + + if (waitpid(child, &status, 0) < 0) + err(1, "waitpid"); + if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) + errx(1, "child exited with status %d", WEXITSTATUS(status)); +} From nobody Tue Apr 21 15:44:28 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0RVh6fGxz6WtgP for ; Tue, 21 Apr 2026 15:44:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0RVh5MCzz3PgB for ; Tue, 21 Apr 2026 15:44:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YXjiVPP889kiVtV1aJoKX4dcQMrnoYcNE14Ami40g0E=; b=yOXDXAnyrQ6/sg8R9Qg656iKNwBium2znG6vLY7vZFgc009f0X05HYTJ7IhSvelV0QBEGe 67JHYuI/M2AhzlLMLtz43+Rf99Ldp86PwEIXuLzGJcZG7i/UePn+OJ1XMaaRksLwdOpO9/ FXxLwKyO0pOLfLkAceHEWUDbyL7P5oEWnMTf4BP9xxKM8ZZV7y0h+15uRVsVi0YvsfWiZu WFE8kDDiezPQH/Ij0K6DSdsn6D73nGcCJAomGPTtp/uNQrCl/PdiJHHNtZdMD4lVWAqWIu D41snTtrYLZB4R7sxM5pzA0obAqw7sqGbTTCKk82uBLY40IrNyMY8gtv10pTQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776786268; a=rsa-sha256; cv=none; b=Mk0vO/HAg1A7PM+qV5yBXW0y3x1P3zFQKM1XDMBpdSHqCUJ5ZgoVqz5cK51AQ6vXbv/596 uS7vYCMiQgFiqR9dW+qeuRBWjheBCkVnhSQrWmJ6ke1YtqsvNr8zllS/0KlefWHMsUAaDC Ta6JRyGF6hmA9ZQDzBcVhMbzKit2cTfs/dcV+MW7HOX3zBH53v5YUKyVOz/gAqz8aGYFd6 r3BHRzVOfWiQMPO4yzSonKVUaipMXGxQ58WvRFLtH3wLsuKth7tc7RSC5g4z935rIRh6JA qTBTEE34+3t45bwd7AU/ctG/DAfILywKzFOVzlpA5hvLPZAKre/gy9uP6Fqb3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YXjiVPP889kiVtV1aJoKX4dcQMrnoYcNE14Ami40g0E=; b=LWPZv39LXKuIMaDFaplo1a7YZuO6QbMT7Ab3xtm1guAmeoCgMXAQFniWWBzKQk+QLf2rg/ f3Zp08hn8iH/eNLunJTD12TevROfpKHLO6NG4zKB7C/40OmCJv59Ig6bpk0IQtoQRCny6a 1YkSehnZ/3UlwCmvg90mCGNgZF70o2c8F2NjQGAKXlH4+yZ7ICsnlJ5Ae4aYR8N82/wUyk GltU5zbVCfj8FFKt1HpwmuN7h4jsjmNUgrVSum2GkrzFee/9nxX+EmGuFg21KellW65qUQ 5yYNP4qSww/j3ohljtv0vsYZ74VCK2t1OdVsgVP0zL1Bb4sCiQ8vvp31Me3xlA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0RVh4dgtzr8K for ; Tue, 21 Apr 2026 15:44:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35f15 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 15:44:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 649db49403a7 - releng/15.0 - pkru: Fix handling of 1GB largepage mappings List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 649db49403a727739552bf2d546ca2a08df1d944 Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 15:44:28 +0000 Message-Id: <69e79b5c.35f15.651f796d@gitrepo.freebsd.org> The branch releng/15.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=649db49403a727739552bf2d546ca2a08df1d944 commit 649db49403a727739552bf2d546ca2a08df1d944 Author: Mark Johnston AuthorDate: 2026-03-31 13:37:43 +0000 Commit: Mark Johnston CommitDate: 2026-04-20 19:41:17 +0000 pkru: Fix handling of 1GB largepage mappings pmap_pkru_update_range() did not handle the case where a PDPE has PG_PS set. More generally, the SET_PKRU and CLEAR_PKRU sysarch implementations did not check whether the request covers a "boundary" vm map entry. Fix this, add the missing PG_PS test, and add some tests. Approved by: so Security: FreeBSD-SA-26:11.amd64 Security: CVE-2026-6386 Reported by: Nicholas Carlini Reviewed by: kib, alc Differential Revision: https://reviews.freebsd.org/D56184 --- lib/libsys/x86/pkru.3 | 3 + sys/amd64/amd64/pmap.c | 20 +++- sys/amd64/amd64/sys_machdep.c | 43 +++++++-- sys/vm/vm_map.c | 32 +++++++ sys/vm/vm_map.h | 1 + tests/sys/posixshm/posixshm_test.c | 187 +++++++++++++++++++++++++++++++++++++ 6 files changed, 274 insertions(+), 12 deletions(-) diff --git a/lib/libsys/x86/pkru.3 b/lib/libsys/x86/pkru.3 index 95bc66c979ac..033dc07c4b06 100644 --- a/lib/libsys/x86/pkru.3 +++ b/lib/libsys/x86/pkru.3 @@ -179,6 +179,9 @@ The supplied argument for .Fn x86_pkru_protect_range has reserved bits set. +.It Bq Er EINVAL +The range of the request partially covers a mapping of an object created by +.Xr shm_create_largepage 3 . .It Bq Er EFAULT The supplied address range does not completely fit into the user-managed address range. diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 243a6625bece..573f78fe3da4 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -11542,7 +11542,7 @@ pmap_pkru_update_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, u_int keyidx) { pml4_entry_t *pml4e; - pdp_entry_t *pdpe; + pdp_entry_t newpdpe, *pdpe; pd_entry_t newpde, ptpaddr, *pde; pt_entry_t newpte, *ptep, pte; vm_offset_t va, va_next; @@ -11568,6 +11568,22 @@ pmap_pkru_update_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, va_next = eva; continue; } + if ((*pdpe & PG_PS) != 0) { + va_next = (va + NBPDP) & ~PDPMASK; + if (va_next < va) + va_next = eva; + KASSERT(va_next <= eva, + ("partial update of non-transparent 1G mapping " + "pdpe %#lx va %#lx eva %#lx va_next %#lx", + *pdpe, va, eva, va_next)); + newpdpe = (*pdpe & ~X86_PG_PKU_MASK) | + X86_PG_PKU(keyidx); + if (newpdpe != *pdpe) { + *pdpe = newpdpe; + changed = true; + } + continue; + } va_next = (va + NBPDR) & ~PDRMASK; if (va_next < va) @@ -11620,8 +11636,6 @@ pmap_pkru_check_uargs(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, if (pmap->pm_type != PT_X86 || keyidx > PMAP_MAX_PKRU_IDX || (flags & ~(AMD64_PKRU_PERSIST | AMD64_PKRU_EXCL)) != 0) return (EINVAL); - if (eva <= sva || eva > VM_MAXUSER_ADDRESS) - return (EFAULT); if ((cpu_stdext_feature2 & CPUID_STDEXT2_PKU) == 0) return (ENOTSUP); return (0); diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c index 51f55687bbcf..1df73a25c05e 100644 --- a/sys/amd64/amd64/sys_machdep.c +++ b/sys/amd64/amd64/sys_machdep.c @@ -30,7 +30,6 @@ * SUCH DAMAGE. */ -#include #include "opt_capsicum.h" #include "opt_ktrace.h" @@ -369,32 +368,58 @@ sysarch(struct thread *td, struct sysarch_args *uap) break; case I386_SET_PKRU: - case AMD64_SET_PKRU: + case AMD64_SET_PKRU: { + vm_offset_t addr, start, end; + vm_size_t len; + + addr = (uintptr_t)a64pkru.addr; + len = a64pkru.len; + /* * Read-lock the map to synchronize with parallel * pmap_vmspace_copy() on fork. */ map = &td->td_proc->p_vmspace->vm_map; vm_map_lock_read(map); - error = pmap_pkru_set(PCPU_GET(curpmap), - (vm_offset_t)a64pkru.addr, (vm_offset_t)a64pkru.addr + - a64pkru.len, a64pkru.keyidx, a64pkru.flags); + if (len == 0 || !vm_map_check_boundary(map, addr, addr + len)) { + vm_map_unlock_read(map); + error = EINVAL; + break; + } + start = trunc_page(addr); + end = round_page(addr + len); + error = pmap_pkru_set(PCPU_GET(curpmap), start, end, + a64pkru.keyidx, a64pkru.flags); vm_map_unlock_read(map); break; + } case I386_CLEAR_PKRU: - case AMD64_CLEAR_PKRU: + case AMD64_CLEAR_PKRU: { + vm_offset_t addr, start, end; + vm_size_t len; + if (a64pkru.flags != 0 || a64pkru.keyidx != 0) { error = EINVAL; break; } + + addr = (uintptr_t)a64pkru.addr; + len = a64pkru.len; + map = &td->td_proc->p_vmspace->vm_map; vm_map_lock_read(map); - error = pmap_pkru_clear(PCPU_GET(curpmap), - (vm_offset_t)a64pkru.addr, - (vm_offset_t)a64pkru.addr + a64pkru.len); + if (len == 0 || !vm_map_check_boundary(map, addr, addr + len)) { + vm_map_unlock_read(map); + error = EINVAL; + break; + } + start = trunc_page(addr); + end = round_page(addr + len); + error = pmap_pkru_clear(PCPU_GET(curpmap), start, end); vm_map_unlock_read(map); break; + } case AMD64_DISABLE_TLSBASE: clear_pcb_flags(pcb, PCB_TLSBASE); diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 6b09552c5fee..e43a061617ad 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -4146,6 +4146,38 @@ vm_map_check_protection(vm_map_t map, vm_offset_t start, vm_offset_t end, return (TRUE); } +/* + * Check whether the specified range partially overlaps a map entry with + * fixed boundaries, and return false if so. + * + * The map must be locked. + */ +bool +vm_map_check_boundary(vm_map_t map, vm_offset_t start, vm_offset_t end) +{ + vm_map_entry_t entry; + int bdry_idx; + + if (!vm_map_range_valid(map, start, end)) + return (false); + if (start == end) + return (true); + + if (vm_map_lookup_entry(map, start, &entry)) { + bdry_idx = MAP_ENTRY_SPLIT_BOUNDARY_INDEX(entry); + if (bdry_idx != 0 && + (start & (pagesizes[bdry_idx] - 1)) != 0) + return (false); + } + if (vm_map_lookup_entry(map, end - 1, &entry)) { + bdry_idx = MAP_ENTRY_SPLIT_BOUNDARY_INDEX(entry); + if (bdry_idx != 0 && + (end & (pagesizes[bdry_idx] - 1)) != 0) + return (false); + } + return (true); +} + /* * * vm_map_copy_swap_object: diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index 6af3dba42685..0b0edb24a64d 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -479,6 +479,7 @@ vm_map_entry_read_succ(void *token, struct vm_map_entry *const clone, #endif /* ! _KERNEL */ #ifdef _KERNEL +bool vm_map_check_boundary(vm_map_t, vm_offset_t, vm_offset_t); boolean_t vm_map_check_protection (vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t); int vm_map_delete(vm_map_t, vm_offset_t, vm_offset_t); int vm_map_find(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, vm_size_t, diff --git a/tests/sys/posixshm/posixshm_test.c b/tests/sys/posixshm/posixshm_test.c index 55514a5f4bde..1250fcb63a93 100644 --- a/tests/sys/posixshm/posixshm_test.c +++ b/tests/sys/posixshm/posixshm_test.c @@ -38,10 +38,17 @@ #include #include +#ifdef __amd64__ +#include +#endif + #include #include #include +#include +#include #include +#include #include #include #include @@ -1901,6 +1908,183 @@ ATF_TC_BODY(largepage_pipe, tc) } } +#ifdef __amd64__ +static sigjmp_buf jmpbuf; +static _Atomic(void *) faultaddr; +static _Atomic(int) faultsig; + +#define KEY_RW 1 +#define KEY_RO 2 +#define KEY_WO 3 +#define KEY_NO 4 +#define VAL 0xdeadfacec0debeef +static void +set_keys(void) +{ + int error; + + error = x86_pkru_set_perm(KEY_RW, 1, 1); + ATF_REQUIRE(error == 0); + error = x86_pkru_set_perm(KEY_RO, 1, 0); + ATF_REQUIRE(error == 0); + error = x86_pkru_set_perm(KEY_WO, 0, 1); + ATF_REQUIRE(error == 0); + error = x86_pkru_set_perm(KEY_NO, 0, 0); + ATF_REQUIRE(error == 0); +} + +static void +sigsegv(int sig, siginfo_t *si, void *uc __unused) +{ + faultsig = sig; + faultaddr = si->si_addr; + siglongjmp(jmpbuf, 1); +} + +static bool +try_read(volatile uint64_t *p, uint64_t *outp) +{ + if (sigsetjmp(jmpbuf, 1) == 0) { + *outp = *p; + return (true); + } else { + atomic_signal_fence(memory_order_relaxed); + ATF_REQUIRE(faultsig == SIGSEGV); + ATF_REQUIRE(faultaddr == p); + set_keys(); /* PKRU is not restored by siglongjmp? */ + return (false); + } +} + +static bool +try_write(volatile uint64_t *p, uint64_t val) +{ + if (sigsetjmp(jmpbuf, 1) == 0) { + *p = val; + return (true); + } else { + atomic_signal_fence(memory_order_relaxed); + ATF_REQUIRE(faultsig == SIGSEGV); + ATF_REQUIRE(faultaddr == p); + set_keys(); /* PKRU is not restored by siglongjmp? */ + return (false); + } +} + +ATF_TC_WITHOUT_HEAD(largepage_pkru); +ATF_TC_BODY(largepage_pkru, tc) +{ + size_t ps[MAXPAGESIZES]; + struct sigaction sa; + char *addr, *addr1; + int error, fd, pscnt; + + memset(&sa, 0, sizeof(sa)); + sa.sa_sigaction = sigsegv; + sa.sa_flags = SA_SIGINFO; + sigemptyset(&sa.sa_mask); + error = sigaction(SIGSEGV, &sa, NULL); + ATF_REQUIRE(error == 0); + + pscnt = pagesizes(ps); + + for (int i = 1; i < pscnt; i++) { + uint64_t val; + + fd = shm_open_large(i, SHM_LARGEPAGE_ALLOC_DEFAULT, ps[i]); + addr = mmap(NULL, ps[i], PROT_READ | PROT_WRITE, MAP_SHARED, fd, + 0); + ATF_REQUIRE_MSG(addr != MAP_FAILED, + "mmap(%zu bytes) failed; error=%d", ps[i], errno); + + /* + * Ensure that the page is faulted into the pmap. + */ + memset(addr, 0, ps[i]); + + set_keys(); + + /* + * Make sure we can't partially cover a largepage mapping. + */ + error = x86_pkru_protect_range(addr, PAGE_SIZE, KEY_RW, 0); + ATF_REQUIRE_ERRNO(EINVAL, error != 0); + error = x86_pkru_protect_range(addr, ps[i] - PAGE_SIZE, KEY_RW, + 0); + ATF_REQUIRE_ERRNO(EINVAL, error != 0); + error = x86_pkru_protect_range(addr + PAGE_SIZE, ps[i] - PAGE_SIZE, + KEY_RW, 0); + ATF_REQUIRE_ERRNO(EINVAL, error != 0); + error = x86_pkru_protect_range(addr + 1, ps[i], KEY_RW, 0); + ATF_REQUIRE_ERRNO(EINVAL, error != 0); + + /* + * Make sure that protections are honoured. + */ + for (int j = 1; j <= 4; j++) { + volatile uint64_t *addr64; + + error = x86_pkru_protect_range(addr, ps[i], 0, 0); + ATF_REQUIRE(error == 0); + + addr64 = (volatile uint64_t *)(void *)addr; + *addr64 = VAL; + + error = x86_pkru_protect_range(addr, ps[i], j, 0); + ATF_REQUIRE(error == 0); + switch (j) { + case KEY_RW: + ATF_REQUIRE(try_write(addr64, VAL)); + ATF_REQUIRE(try_read(addr64, &val)); + ATF_REQUIRE(val == VAL); + break; + case KEY_RO: + ATF_REQUIRE(try_read(addr64, &val)); + ATF_REQUIRE(val == VAL); + ATF_REQUIRE(!try_write(addr64, VAL)); + break; + case KEY_WO: + /* !access implies !modify */ + case KEY_NO: + ATF_REQUIRE(!try_read(addr64, &val)); + ATF_REQUIRE(!try_write(addr64, VAL)); + break; + default: + __unreachable(); + } + } + error = munmap(addr, ps[i]); + ATF_CHECK(error == 0); + + /* + * Try mapping a large page in a region partially covered by a + * key. + * + * Rather than detecting the mismatch when the logical mapping + * is created, we currently only fail once pmap_enter() is + * called from the fault handler. This is not ideal and might + * be improved in the future. + */ + error = x86_pkru_protect_range(addr, ps[i], 0, 0); + ATF_REQUIRE(error == 0); + error = x86_pkru_protect_range(addr + PAGE_SIZE, + ps[i] - PAGE_SIZE, KEY_RW, 0); + ATF_REQUIRE(error == 0); + + addr1 = mmap(addr, ps[i], PROT_READ | PROT_WRITE, + MAP_SHARED | MAP_FIXED, fd, 0); + ATF_REQUIRE(addr1 != MAP_FAILED); + ATF_REQUIRE(addr == addr1); + ATF_REQUIRE(!try_read((volatile uint64_t *)(void *)addr, &val)); + ATF_REQUIRE(!try_write((volatile uint64_t *)(void *)addr, VAL)); + } +} +#undef KEY_RW +#undef KEY_RO +#undef KEY_WO +#undef KEY_NO +#endif + ATF_TC_WITHOUT_HEAD(largepage_reopen); ATF_TC_BODY(largepage_reopen, tc) { @@ -1991,6 +2175,9 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, largepage_mprotect); ATF_TP_ADD_TC(tp, largepage_minherit); ATF_TP_ADD_TC(tp, largepage_pipe); +#ifdef __amd64__ + ATF_TP_ADD_TC(tp, largepage_pkru); +#endif ATF_TP_ADD_TC(tp, largepage_reopen); return (atf_no_error()); From nobody Tue Apr 21 15:44:29 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0RVk2VfFz6Wtjp for ; Tue, 21 Apr 2026 15:44:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0RVj60b2z3PrZ for ; Tue, 21 Apr 2026 15:44:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=siISYmvQz7ec7TduYXEExxCTLMJujTAjNMT20lrzS4s=; b=bAMr39xTlDRM/pirp9M/aNATD1NcL77fCHJmpqXTXgu9Po34GCxhhTs8EKbnsXC0bAxG/e v9MI8ildP+JcTr4cnNxPN3rvpPvxrYSGEtxVclB/RzCdPfwzXaL5kP8PPcpcJZrmr9jsEa 8Piz+Opu8KcHs2xPa7esZXsidR0cGsPJjRE9M3ZhSdkPpQ03ngg/d8DSnwq9ohOtcxKMKR vg1mRKStRXsoRWw4/tUNHnSuz24MexwA5MIq+GUvn1hPf2cITA4Gk2gYrOreKwekCjBavX 2+C4VPVckw8yHVRSVX5bRZ0YPGILghxUD1JjMqzaerf9rSxa4/eG6VCQlJTqHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776786269; a=rsa-sha256; cv=none; b=a6LU5bgrBv3NDMTAcZ4xQQAcFZlquOJrJFZauz3iGU90RPE7BMO/HkWgywOHBHu7nC0giq x/UNxGFIPoGwyvhzatAPOWthLDlWh2sIs5i/T/o6aICMBUaVd9OL01gHVkbsuNHRyxrWmu dvj8iwVjDkfoIY4H7kczRW80lL9faDZXG2M3wWavT4GORdJRJNnPaycmP2Y2uT0AHJ3I2R QkY9G0GlSxv+JkPEGntd+VpCz6/eM99vMga3OsFvBR5Ylc2LeAAN8FRr7xAyMe4RNORQJq ZT+ZpD7gmF1XTAOYt+C7dZdPaTd7y2mMHCFPdWeM++IiVPiBB+FpIShEDmtE6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=siISYmvQz7ec7TduYXEExxCTLMJujTAjNMT20lrzS4s=; b=X+0m16UY8+gJG6wguVaaX3y7+nBMW0YZOTpMzyUEOYwtore3/sb1P0rhZZr4exqcwnvLj4 py7bGKpDt+TGW02BILl/psq3hZV6pADxdAT0Eqmq1KmlEH6JZ0Nif3VF2lWpLFLPrRw5E9 JnaSpcMsT35O2G6lvZW6ZViR7l/eVh+syWlUYZBieQNLMn0aVpBVpsBuaobL0atBoiJDIi CDQNPUrSO5cjB+AznT6slldX1Ozorpzt7C/3UNoswkZetc0h4ARkr0oIt87WJw3stoJl7J 8J3tHbXkrvnpI31srElsnJn6i+5uKoKkB/sashn6mO4KeAUUjW5N2m07u4CU6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0RVj5Qrmzr0w for ; Tue, 21 Apr 2026 15:44:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36514 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 15:44:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 6b6bc9afa0b0 - releng/15.0 - Add UPDATING entries and bump 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 6b6bc9afa0b09765355f74a2f11cee069e7a37ef Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 15:44:29 +0000 Message-Id: <69e79b5d.36514.39d8665@gitrepo.freebsd.org> The branch releng/15.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6b6bc9afa0b09765355f74a2f11cee069e7a37ef commit 6b6bc9afa0b09765355f74a2f11cee069e7a37ef Author: Mark Johnston AuthorDate: 2026-04-20 13:45:24 +0000 Commit: Mark Johnston CommitDate: 2026-04-20 19:41:20 +0000 Add UPDATING entries and bump version Approved by: so --- UPDATING | 17 +++++++++++++++++ sys/conf/newvers.sh | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index c70721ba8726..f6a6ce827ab8 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,23 @@ 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. +20260421: + 15.0-RELEASE-p6 SA-26:10.tty + SA-26:11.amd64 + EN-26:05.vm + EN-26:06.timerfd + EN-26:07.pkgbase + + Kernel use-after-free bug in the TIOCNOTTY handler. [SA-26:10.tty] + + Missing large page handling in pmap_pkru_update_range(). [SA-26:11.amd64] + + The page fault handler fails to zero memory. [EN-26:05.vm] + + Periodic timerfd(2) timers may produce incorrect results. [EN-26:06.timerfd] + + Base packages fail to build with newer versions of libucl. [EN-26:07.pkgbase] + 20260325: 15.0-RELEASE-p5 SA-26:06.tcp SA-26:07.nvmf diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 6044b7921c52..0e4301c996bb 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -51,7 +51,7 @@ TYPE="FreeBSD" REVISION="15.0" -BRANCH="RELEASE-p5" +BRANCH="RELEASE-p6" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Tue Apr 21 15:45:29 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0RWs3kHpz6Wv1G for ; Tue, 21 Apr 2026 15:45: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0RWs1ZBhz3RTS for ; Tue, 21 Apr 2026 15:45:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oidRvEbF0aG81ePjmIfZiIcj5BRUovCx2PXzrDy/MHM=; b=ZDBKVjR2vlpf2gaW4qHq7YY4zMldNmD5MNUhXkg+1XyZ0+AQRWx8JhpMO+YlsBuMpW6GPX nZIoaGz4JBPwToVfYTZvcV4bIC1dKymp/7qRXJgEn2dMh2uB5uMK6zLqs1z7xA4xU3fkV8 DxNVVf4c9XQTfPs9e+qxi3QGJix8wLL+JOTYN5G2HLOYHp3TurHh90qwgM1Pszz95YVrk3 gWRyMTmP+1Cc1gHprTocNMK5wvRzq9BYGcgp6lwVh3AL7zHNhCi3jsT03pF3iahkyFQjJZ Oygw8U/WiVQVVnJ1tL+dqzIf57kKL0y8pk749aoAOGqixFAUGgMyUrC7TCXPYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776786329; a=rsa-sha256; cv=none; b=eTDhAk+phdS/YIFrT+/H25nS37I1uf3ASl+BoPRlcRUq8UiVlIXMcIYF0P9GOnGDWvU3lh 81TwIXRmLTd/ieiF5etoc8HY8nFVOOlR4DfpG2v5/Z48F05uDYReNOdGTSUd+MLYAHPQA4 aSPE4ENpr7BaAMUYwTnH4P61Rb5DX+uveoMeFOd7e9/LyzrETkpeIm7mBr7xoWNUTirJBX s3I6AX9r7ibwws/XW8/0SiumpYBmdGxWoC1Wr9tcq6eV2/M2tGzd3TKz+SyZmBiWrygzLf KVPFjf8Iv/tqPHQYoPtIUwrOjzOCVPX6QaBPL1tVaFdatZsJE2S14s5QQtum+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oidRvEbF0aG81ePjmIfZiIcj5BRUovCx2PXzrDy/MHM=; b=PKhnLooq4tU/6fwoPVnOiqE+KwpE4SgqyuYJjw3labTjlwq21vQT/KEiIAMMIFunNm+1ql XuRK9Sdaa2bTRnRKhVWzBLLZzM9xBJazL5I5Afh6NP15oPBEzciP/ipbIE9hjfxjCwb83B ZzJu4pf7FPNsVgTHJd8rcX3LoqGroNfAFN/wJpgxoIOTNA/cdOikxFIfSGFxzyVVU/E7Me Y0ah8F+Ul8i+uy12kNccKpkt5YlrHSnfJANYyjgsh6g29LuDCOh5os5DJA1eLdzqOgIMH+ g4yC1BCMwlQ+FElxLpLyqnejf7xRg05/+uhlZxdygUXt0MQ40PzF3H+Jm5g1ZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0RWs19DYzqQB for ; Tue, 21 Apr 2026 15:45:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35f19 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 15:45:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 1abe7ead45c3 - releng/14.4 - vm_fault: Reset m_needs_zeroing properly List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.4 X-Git-Reftype: branch X-Git-Commit: 1abe7ead45c3236e5325f43535e2513697a5705e Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 15:45:29 +0000 Message-Id: <69e79b99.35f19.7b1a6f0a@gitrepo.freebsd.org> The branch releng/14.4 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1abe7ead45c3236e5325f43535e2513697a5705e commit 1abe7ead45c3236e5325f43535e2513697a5705e Author: Mark Johnston AuthorDate: 2026-04-08 04:21:09 +0000 Commit: Mark Johnston CommitDate: 2026-04-21 15:45:02 +0000 vm_fault: Reset m_needs_zeroing properly - When allocating a page, we should only consider the PG_ZERO flag when handling the top-level page. - Unconditionally reset the flag when restarting the fault handler. Previously, vm_fault_busy_sleep() would fail to reset it. Approved by: so Security: FreeBSD-EN-26:05.vm PR: 294039 Reviewed by: kib Tested by: Peter Much MFC after: 3 days Fixes: cff67bc43df1 ("vm_fault: only rely on PG_ZERO when the page was newly allocated") Differential Revision: https://reviews.freebsd.org/D56234 (cherry picked from commit 04132e01004316ddd0e0cde6ef15b100b7b1844d) (cherry picked from commit 9b7c0f4f81f06424899094d4381dede79669b623) --- sys/vm/vm_fault.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 418f39ac2a2b..87deb993402c 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -272,8 +272,6 @@ vm_fault_might_be_cow(struct faultstate *fs) static void vm_fault_deallocate(struct faultstate *fs) { - - fs->m_needs_zeroing = true; vm_fault_page_release(&fs->m_cow); vm_fault_page_release(&fs->m); vm_object_pip_wakeup(fs->object); @@ -1321,7 +1319,8 @@ vm_fault_allocate(struct faultstate *fs) vm_waitpfault(dset, vm_pfault_oom_wait * hz); return (FAULT_RESTART); } - fs->m_needs_zeroing = (fs->m->flags & PG_ZERO) == 0; + if (fs->object == fs->first_object) + fs->m_needs_zeroing = (fs->m->flags & PG_ZERO) == 0; fs->oom_started = false; return (FAULT_CONTINUE); @@ -1653,7 +1652,6 @@ vm_fault(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, fs.fault_flags = fault_flags; fs.map = map; fs.lookup_still_valid = false; - fs.m_needs_zeroing = true; fs.oom_started = false; fs.nera = -1; fs.can_read_lock = true; @@ -1662,6 +1660,7 @@ vm_fault(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, RetryFault: fs.fault_type = fault_type; + fs.m_needs_zeroing = true; /* * Find the backing store object and offset into it to begin the From nobody Tue Apr 21 15:45:30 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0RWt46LBz6Wv83 for ; Tue, 21 Apr 2026 15:45:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0RWt2gBKz3RYM for ; Tue, 21 Apr 2026 15:45:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n3uMALdmiPT8IRxGkDk8g1z+dPymhqTyYA29+Nf5HvQ=; b=Qu5YNtknAakiqfV2Nn4EFzF/rWQ14jJRLGltUalBXe/F+Y5MQVwaN8QEfVBncHPK76Ql0O UvtHERs1NI5iir/tkq+mbxNIukUdHcl5uGLAkyCB2oZpXR6oUUnUKLT8qENKY10HyviKJM O1aK8WAglJJKj2x3QsoOfMhq7D6NA+l2OxdSc2owdyAeGEn38TLwqMJJKSdOVzgPW9kfsE Ng+QBRexTdrxZ1KDKJ1nlgHbntXOEP69OMkLGedl+5KIb6blqUVSZ80XfdCYpViufP7vBL xQE314bSuQNfF87Fpkm8xm8O0tWUD47h1edRzbsE2JbzpZU23Adg5nQ98LtueA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776786330; a=rsa-sha256; cv=none; b=SBff5OR+A4W1+BvWiVDUlsFXBUSg6U/jUZD0H3OCch3lGATSMsWPYNxw3v/FdNUFWtZsKU A4ttx+qlr0iV/+qx8BVuGU9O+xWfktpHyAmfrVoaHwvSS4fTu7z/YMnuU0BbndYlUUz7pQ 5P6vNR+LSjVbPWnOb2QM9Rrj82nSEOReTfaT67pY9YcYpK38edNnCUaT8Wd/Ni4o9KurFU RG9J6HXdpWFGKfQsh1aOlLIxXjJyWnsCOLSAYrwD42cCad0aWJJ6Kax/uIaxXPSuOFPVYS cvkEaZXR1Gj+/kOWuKoXfvlBpHas6Gj0KBjfQnqTOewg6q7UQWp7K+vFWOM7rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n3uMALdmiPT8IRxGkDk8g1z+dPymhqTyYA29+Nf5HvQ=; b=WtdV7UjzPs7tkYzXaOUTqfJBm1BehDHObGKaSJYQOeOcxXAa6gvYPgoraiS1BmKeLh79mR XCdDuTKwZ1idS9dZxynfzz417iouVFk5UJrsEyZ5p9m5n91L8sn+O66J2UpYWhv31jUIe5 VN4Sjg7YOqz4yxQ8/+CDqqTXPCR2HRRp5C5Had+YvMdNvzLthtsRQzSrEAhx5VhhO+hKwu QnkWrt8GTgbUhDxK0bM7ifNqqEvK9FGToqD3eFJ+M6DrmEStsNLGWdTk9gUjXu1wdI89It GaTJGD4/wI8cIjkshPl0LywVGQGF6zSsGCJAggf9pX8Bla8OkDrHxrWQRWimhA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0RWt1zCyzr8N for ; Tue, 21 Apr 2026 15:45:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36694 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 15:45:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jake Freeland From: Mark Johnston Subject: git: df8d2f945028 - releng/14.4 - timerfd: Fix interval callout scheduling List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.4 X-Git-Reftype: branch X-Git-Commit: df8d2f94502890cd2c40705deb70657d475ad8ed Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 15:45:30 +0000 Message-Id: <69e79b9a.36694.629fd11e@gitrepo.freebsd.org> The branch releng/14.4 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=df8d2f94502890cd2c40705deb70657d475ad8ed commit df8d2f94502890cd2c40705deb70657d475ad8ed Author: Jake Freeland AuthorDate: 2026-03-20 06:33:03 +0000 Commit: Mark Johnston CommitDate: 2026-04-21 15:45:06 +0000 timerfd: Fix interval callout scheduling When a timerfd interval callout misses its scheduled activation time, a differential is calculated based on the actual activation time and the scheduled activation time. This differential is divided by the timerfd's interval time and the quotient is added to the timerfd's counter. Before this change, the next callout was scheduled to activate at: scheduled activation time + timerfd interval. This change fixes the scheduling of the next callout to activate at: actual activation time + timerfd interval - remainder. Security: FreeBSD-26:06.timerfd Approved by: so Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D55790 MFC after: 2 weeks (cherry picked from commit 85c0f1a87da1fd1eb3e646e86f70e630c48da91a) (cherry picked from commit 3c00f603a2801fd780666f9e94a26f264a887c90) --- sys/kern/sys_timerfd.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/sys/kern/sys_timerfd.c b/sys/kern/sys_timerfd.c index 565ab3ad6ee6..236dfe8bb96a 100644 --- a/sys/kern/sys_timerfd.c +++ b/sys/kern/sys_timerfd.c @@ -393,23 +393,25 @@ static void timerfd_expire(void *arg) { struct timerfd *tfd = (struct timerfd *)arg; - struct timespec uptime; + sbintime_t exp, interval, now, next, diff; ++tfd->tfd_count; tfd->tfd_expired = true; if (timespecisset(&tfd->tfd_time.it_interval)) { + exp = tstosbt(tfd->tfd_time.it_value); + interval = tstosbt(tfd->tfd_time.it_interval); + now = sbinuptime(); + next = now + interval; + /* Count missed events. */ - nanouptime(&uptime); - if (timespeccmp(&uptime, &tfd->tfd_time.it_value, >)) { - timespecsub(&uptime, &tfd->tfd_time.it_value, &uptime); - tfd->tfd_count += tstosbt(uptime) / - tstosbt(tfd->tfd_time.it_interval); + if (now > exp) { + diff = now - exp; + tfd->tfd_count += diff / interval; + next -= diff % interval; } - timespecadd(&tfd->tfd_time.it_value, - &tfd->tfd_time.it_interval, &tfd->tfd_time.it_value); - callout_schedule_sbt(&tfd->tfd_callout, - tstosbt(tfd->tfd_time.it_value), - 0, C_ABSOLUTE); + + callout_schedule_sbt(&tfd->tfd_callout, next, 0, C_ABSOLUTE); + tfd->tfd_time.it_value = sbttots(next); } else { /* Single shot timer. */ callout_deactivate(&tfd->tfd_callout); From nobody Tue Apr 21 15:45:31 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0RWv68Nbz6Wtgk for ; Tue, 21 Apr 2026 15:45:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0RWv3G6jz3RNg for ; Tue, 21 Apr 2026 15:45:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+qJ7C7dPki2gvEdwrQWIdvxWxjMEvQ6jkPP063ZtQMA=; b=K8wYHEPc8LYdQ/9DKi6yzM+mBbAUPV8KNJvXId5tT3KvpPwTkBp/Mk84plTL05MMA8DKAY mX1BMbHqwqvViJvatOzC1WIK4NGeAp/jUYcw9rM4lzDp+dyNdDsRKQmF2kR/M5XGnPazMR fsLta4E8YXQkSe1qspw8m18fzcyuKopvCMPr8aNE7W0IHZsEkUS7c91NbIrSijGuBVrZFT 3thod2WpK13wzMu4Q4FXvV/Qqz/gVo2iCH1arfqFu7RudnN1fplT7b40t0k2Pmr8DZSoeL cNr44yDyVeyK+InNF+ppArbxs0UnpOHgTe5mp0raDuBTdiHoDusIG3xu9DLgAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776786331; a=rsa-sha256; cv=none; b=RxmNCwV+tDc0YhRmyF2Mk2tNSUc2iaFC9Y3bWGvgKD8cNMI8biIyba5JXhgNIvlR2kTJDN D2fMr97+u7dqEJcPkWI5b/wo4sQXbEULe80y3/q2pjjTCAqdZ0mmoopJ0f0Bbb+6QqhYS9 WCwvrIr4ssVBP8hAy9K4C+zCpBAorZnqHv1dPvzef804/HdbCkb3t1be7ygL6NU27KpD+m HsUmixL1RBiMPxRgmT1uKjQoS2wSNzfoY6CdkeGkkYKiaoD+magetIu/KkDodZ1bwhu5FF CiOzqmAmOSqE4uLkszGLmPT6jg7B2dLMaUmyPL362AUBwiGSDZTRlL2VWUWKZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+qJ7C7dPki2gvEdwrQWIdvxWxjMEvQ6jkPP063ZtQMA=; b=KxmUh2nEhxiOruTHi1k6fNxvdWBub1TGS+EfjmUYliqL4/eG9boacyt0gZxdNPjKSF+p/h iezefQfBwAeu8s4LH5NvJppQs/TQCLgbZ+3y/2nHnVJrpC6qHgPPq+5RTd1p6mMMfpSDEz JB710CyczTUlNGaN3lrCL9rRh1iAhqjyb1Iw6FYIeJKun+TLb+rU7nvgwJNxnznIFzHMWs dc0yjguz+QUTE0SaLdRUUqe2g5cVCXwGTV9Trp3UPagCJAQnZ2BFJY6PNvWYck3iH2NUFp CwwQqkFiJW3HMVN2A+3dlVGH9zxNvVa7j/N+6/vIjZ0ZBBvFpB8eLH0UVHv2PQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0RWv2pxHzqnr for ; Tue, 21 Apr 2026 15:45:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34736 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 15:45:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: af294329c57f - releng/14.4 - tty: Avoid leaving dangling pointers in tty_drop_ctty() List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.4 X-Git-Reftype: branch X-Git-Commit: af294329c57f9bb9874411bc603f4c46a85c68e9 Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 15:45:31 +0000 Message-Id: <69e79b9b.34736.1061de19@gitrepo.freebsd.org> The branch releng/14.4 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=af294329c57f9bb9874411bc603f4c46a85c68e9 commit af294329c57f9bb9874411bc603f4c46a85c68e9 Author: Mark Johnston AuthorDate: 2026-03-23 15:22:48 +0000 Commit: Mark Johnston CommitDate: 2026-04-21 15:45:06 +0000 tty: Avoid leaving dangling pointers in tty_drop_ctty() The TIOCNOTTY handler detaches the calling process from its controlling terminal. It clears the link from the session to the tty, but not the pointers from the tty to the session and process group. This means that sess_release() doesn't call tty_rel_sess(), and that pgdelete() doesn't call tty_rel_pgrp(), so the pointers are left dangling. Fix this by clearing pointers in tty_drop_ctty(). Add a standalone regression test. Approved by: so Security: FreeBSD-SA-26:10.tty Security: CVE-2026-5398 Reported by: Nicholas Carlini Reviewed by: kib, kevans Fixes: 1b50b999f9b5 ("tty: implement TIOCNOTTY") Differential Revision: https://reviews.freebsd.org/D56046 --- sys/kern/tty.c | 4 +++ tests/sys/kern/tty/Makefile | 1 + tests/sys/kern/tty/tiocnotty.c | 82 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+) diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 47f9f25cec37..508fa10fdd62 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1262,6 +1262,10 @@ tty_drop_ctty(struct tty *tp, struct proc *p) session->s_ttydp = NULL; SESS_UNLOCK(session); + if (tp->t_session == session) { + tp->t_session = NULL; + tp->t_pgrp = NULL; + } tp->t_sessioncnt--; p->p_flag &= ~P_CONTROLT; PROC_UNLOCK(p); diff --git a/tests/sys/kern/tty/Makefile b/tests/sys/kern/tty/Makefile index 8628ab79875f..d134b3337a21 100644 --- a/tests/sys/kern/tty/Makefile +++ b/tests/sys/kern/tty/Makefile @@ -5,6 +5,7 @@ PLAIN_TESTS_PORCH+= test_canon PLAIN_TESTS_PORCH+= test_canon_fullbuf PLAIN_TESTS_PORCH+= test_ncanon PLAIN_TESTS_PORCH+= test_recanon +PLAIN_TESTS_C+= tiocnotty ATF_TESTS_C+= test_sti PROGS+= fionread diff --git a/tests/sys/kern/tty/tiocnotty.c b/tests/sys/kern/tty/tiocnotty.c new file mode 100644 index 000000000000..2581f976b2ef --- /dev/null +++ b/tests/sys/kern/tty/tiocnotty.c @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2026 Mark Johnston + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +/* + * A regression test that exercises a bug where TIOCNOTTY would leave some + * dangling pointers behind in the controlling terminal structure. + */ + +#include +#include + +#include +#include +#include +#include +#include + +int +main(void) +{ + int master, slave, status; + pid_t child; + + master = posix_openpt(O_RDWR | O_NOCTTY); + if (master < 0) + err(1, "posix_openpt"); + if (grantpt(master) < 0) + err(1, "grantpt"); + if (unlockpt(master) < 0) + err(1, "unlockpt"); + + child = fork(); + if (child < 0) + err(1, "fork"); + if (child == 0) { + if (setsid() < 0) + err(1, "setsid"); + slave = open(ptsname(master), O_RDWR | O_NOCTTY); + if (slave < 0) + err(2, "open"); + if (ioctl(slave, TIOCSCTTY, 0) < 0) + err(3, "ioctl(TIOCSCTTY)"); + /* Detach ourselves from the controlling terminal. */ + if (ioctl(slave, TIOCNOTTY, 0) < 0) + err(4, "ioctl(TIOCNOTTY)"); + _exit(0); + } + + if (waitpid(child, &status, 0) < 0) + err(1, "waitpid"); + if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) + errx(1, "child exited with status %d", WEXITSTATUS(status)); + + child = fork(); + if (child < 0) + err(1, "fork"); + if (child == 0) { + struct winsize winsz; + + if (setsid() < 0) + err(1, "setsid"); + slave = open(ptsname(master), O_RDWR | O_NOCTTY); + if (slave < 0) + err(2, "open"); + /* Dereferences dangling t_pgrp pointer in the terminal. */ + memset(&winsz, 0xff, sizeof(winsz)); + if (ioctl(slave, TIOCSWINSZ, &winsz) < 0) + err(3, "ioctl(TIOCSWINSZ)"); + /* Dereferences dangling t_session pointer in the terminal. */ + if (ioctl(slave, TIOCSCTTY, 0) < 0) + err(4, "ioctl(TIOCSCTTY)"); + _exit(0); + } + + if (waitpid(child, &status, 0) < 0) + err(1, "waitpid"); + if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) + errx(1, "child exited with status %d", WEXITSTATUS(status)); +} From nobody Tue Apr 21 15:45:32 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0RWw6w7Kz6Wtgp for ; Tue, 21 Apr 2026 15:45:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0RWw4T7Kz3Rbq for ; Tue, 21 Apr 2026 15:45:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=le/YRiUM5wt0dhz9lSBZ3g/YOxT6Jx27p+HlZXGTAKM=; b=AJnRglLtjs4/gxBs9COfKUtAocuVPMk7FFc4C4YABa9knEC3i8J8CFiXoRrO4jLcSzynL4 RD0wIdYp7MKAGenoDQM2ID9mJXFxIQJwyeD1SjQlA02qYEUyjVuc4m9UDcq+/kn5dsrcEW ldL9vkWpVNYgd60xn9j6GzWy+cYEthHRFnciurkc3NOd2J2Akb83nlGUezil68Z2B0R8vL t7bYylhFpx0A3YYh+BPMKFhBRqPdu90L+YBW88tE2K5ZCbUA2eNwSHHpBwGJp+Vzu8Ub7B AyisC0qa+Dvmvp/wc5qmBCeNcJzIxdTgkE37Y1X3kTGl8Ead8Zlpm3kY4JQ07Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776786332; a=rsa-sha256; cv=none; b=KXRRzM0M9R+/euSCGsVwO1vqLl84+0uVkfiNBCs785rhq+U2yjhHIHe4tK58eIlyHFv841 3A9vVmO5mcvUdTvwvSrYLBT548WMSKOLr5FsxG0+xTqXjCwsaPMIgzNoP7z3dvBkxQBdnq OPuszF5xWhMdTtGCPbJtLK1K+Ldy7XRnCbX1rtQQhdntilt47Zo08WmGG8brCWfvshMGOF VfmzV0CbX+ZR2VmbAzSK9XJBAhCOuUA9p2QbQeqTASfsjxrdWG1+JUPEEAt0DlkxKwwNKe suky8ApkT5O2Qx0tHYmjgiWxh9gMWHRDAGcCfm9b6NwtytQQRTLMPLJ9p7zQ+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=le/YRiUM5wt0dhz9lSBZ3g/YOxT6Jx27p+HlZXGTAKM=; b=XAofPvzHqkLKP4wvrPB9eHCHelz59nzVv/ID4TxheaVJtRSOtp8CLu7/CjblsvrcqEob68 F/5zJFXPdAAOzQtnev2oiXChAgNLPLb8zF4au41J8BZ19uvHh2PkP+iYMI/qTSFdI0Jh19 LXOl5yJlzOpOZ7upfESraXjjvqMFruDbBVKgwODCqS4GEyHspnsabl8iCRBL1CA19sb+NT eTRFW3gArFW9/JcEc84gFsFhDPPD6CnqKLVYYVQZdoz21cgIWUdhyX03KXc4R8aWwjK3Gi CLwlnWQWIr9xjnP7rwHcRF3gjPh0+Wn6v61zdjHoJ2vAZD2HquD5QeUAZTuMcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0RWw3mK3zr8Q for ; Tue, 21 Apr 2026 15:45:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 344da by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 15:45:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 5787df30dc3e - releng/14.4 - pkru: Fix handling of 1GB largepage mappings List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.4 X-Git-Reftype: branch X-Git-Commit: 5787df30dc3ee1d8389f2fcfef324d0f6e086779 Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 15:45:32 +0000 Message-Id: <69e79b9c.344da.7240f728@gitrepo.freebsd.org> The branch releng/14.4 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5787df30dc3ee1d8389f2fcfef324d0f6e086779 commit 5787df30dc3ee1d8389f2fcfef324d0f6e086779 Author: Mark Johnston AuthorDate: 2026-03-31 13:37:43 +0000 Commit: Mark Johnston CommitDate: 2026-04-21 15:45:06 +0000 pkru: Fix handling of 1GB largepage mappings pmap_pkru_update_range() did not handle the case where a PDPE has PG_PS set. More generally, the SET_PKRU and CLEAR_PKRU sysarch implementations did not check whether the request covers a "boundary" vm map entry. Fix this, add the missing PG_PS test, and add some tests. Approved by: so Security: FreeBSD-SA-26:11.amd64 Security: CVE-2026-6386 Reported by: Nicholas Carlini Reviewed by: kib, alc Differential Revision: https://reviews.freebsd.org/D56184 --- lib/libc/x86/sys/pkru.3 | 3 + sys/amd64/amd64/pmap.c | 20 +++- sys/amd64/amd64/sys_machdep.c | 43 +++++++-- sys/vm/vm_map.c | 32 +++++++ sys/vm/vm_map.h | 1 + tests/sys/posixshm/posixshm_test.c | 187 +++++++++++++++++++++++++++++++++++++ 6 files changed, 274 insertions(+), 12 deletions(-) diff --git a/lib/libc/x86/sys/pkru.3 b/lib/libc/x86/sys/pkru.3 index 95bc66c979ac..033dc07c4b06 100644 --- a/lib/libc/x86/sys/pkru.3 +++ b/lib/libc/x86/sys/pkru.3 @@ -179,6 +179,9 @@ The supplied argument for .Fn x86_pkru_protect_range has reserved bits set. +.It Bq Er EINVAL +The range of the request partially covers a mapping of an object created by +.Xr shm_create_largepage 3 . .It Bq Er EFAULT The supplied address range does not completely fit into the user-managed address range. diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 9fd6c4091c95..bae3735eeafe 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -11598,7 +11598,7 @@ pmap_pkru_update_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, u_int keyidx) { pml4_entry_t *pml4e; - pdp_entry_t *pdpe; + pdp_entry_t newpdpe, *pdpe; pd_entry_t newpde, ptpaddr, *pde; pt_entry_t newpte, *ptep, pte; vm_offset_t va, va_next; @@ -11624,6 +11624,22 @@ pmap_pkru_update_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, va_next = eva; continue; } + if ((*pdpe & PG_PS) != 0) { + va_next = (va + NBPDP) & ~PDPMASK; + if (va_next < va) + va_next = eva; + KASSERT(va_next <= eva, + ("partial update of non-transparent 1G mapping " + "pdpe %#lx va %#lx eva %#lx va_next %#lx", + *pdpe, va, eva, va_next)); + newpdpe = (*pdpe & ~X86_PG_PKU_MASK) | + X86_PG_PKU(keyidx); + if (newpdpe != *pdpe) { + *pdpe = newpdpe; + changed = true; + } + continue; + } va_next = (va + NBPDR) & ~PDRMASK; if (va_next < va) @@ -11676,8 +11692,6 @@ pmap_pkru_check_uargs(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, if (pmap->pm_type != PT_X86 || keyidx > PMAP_MAX_PKRU_IDX || (flags & ~(AMD64_PKRU_PERSIST | AMD64_PKRU_EXCL)) != 0) return (EINVAL); - if (eva <= sva || eva > VM_MAXUSER_ADDRESS) - return (EFAULT); if ((cpu_stdext_feature2 & CPUID_STDEXT2_PKU) == 0) return (ENOTSUP); return (0); diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c index a7ee1f49887c..74b182e73dc2 100644 --- a/sys/amd64/amd64/sys_machdep.c +++ b/sys/amd64/amd64/sys_machdep.c @@ -32,7 +32,6 @@ * from: @(#)sys_machdep.c 5.5 (Berkeley) 1/19/91 */ -#include #include "opt_capsicum.h" #include "opt_ktrace.h" @@ -371,32 +370,58 @@ sysarch(struct thread *td, struct sysarch_args *uap) break; case I386_SET_PKRU: - case AMD64_SET_PKRU: + case AMD64_SET_PKRU: { + vm_offset_t addr, start, end; + vm_size_t len; + + addr = (uintptr_t)a64pkru.addr; + len = a64pkru.len; + /* * Read-lock the map to synchronize with parallel * pmap_vmspace_copy() on fork. */ map = &td->td_proc->p_vmspace->vm_map; vm_map_lock_read(map); - error = pmap_pkru_set(PCPU_GET(curpmap), - (vm_offset_t)a64pkru.addr, (vm_offset_t)a64pkru.addr + - a64pkru.len, a64pkru.keyidx, a64pkru.flags); + if (len == 0 || !vm_map_check_boundary(map, addr, addr + len)) { + vm_map_unlock_read(map); + error = EINVAL; + break; + } + start = trunc_page(addr); + end = round_page(addr + len); + error = pmap_pkru_set(PCPU_GET(curpmap), start, end, + a64pkru.keyidx, a64pkru.flags); vm_map_unlock_read(map); break; + } case I386_CLEAR_PKRU: - case AMD64_CLEAR_PKRU: + case AMD64_CLEAR_PKRU: { + vm_offset_t addr, start, end; + vm_size_t len; + if (a64pkru.flags != 0 || a64pkru.keyidx != 0) { error = EINVAL; break; } + + addr = (uintptr_t)a64pkru.addr; + len = a64pkru.len; + map = &td->td_proc->p_vmspace->vm_map; vm_map_lock_read(map); - error = pmap_pkru_clear(PCPU_GET(curpmap), - (vm_offset_t)a64pkru.addr, - (vm_offset_t)a64pkru.addr + a64pkru.len); + if (len == 0 || !vm_map_check_boundary(map, addr, addr + len)) { + vm_map_unlock_read(map); + error = EINVAL; + break; + } + start = trunc_page(addr); + end = round_page(addr + len); + error = pmap_pkru_clear(PCPU_GET(curpmap), start, end); vm_map_unlock_read(map); break; + } case AMD64_DISABLE_TLSBASE: clear_pcb_flags(pcb, PCB_TLSBASE); diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index cf028c0c47ef..631a5e302879 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -4140,6 +4140,38 @@ vm_map_check_protection(vm_map_t map, vm_offset_t start, vm_offset_t end, return (TRUE); } +/* + * Check whether the specified range partially overlaps a map entry with + * fixed boundaries, and return false if so. + * + * The map must be locked. + */ +bool +vm_map_check_boundary(vm_map_t map, vm_offset_t start, vm_offset_t end) +{ + vm_map_entry_t entry; + int bdry_idx; + + if (!vm_map_range_valid(map, start, end)) + return (false); + if (start == end) + return (true); + + if (vm_map_lookup_entry(map, start, &entry)) { + bdry_idx = MAP_ENTRY_SPLIT_BOUNDARY_INDEX(entry); + if (bdry_idx != 0 && + (start & (pagesizes[bdry_idx] - 1)) != 0) + return (false); + } + if (vm_map_lookup_entry(map, end - 1, &entry)) { + bdry_idx = MAP_ENTRY_SPLIT_BOUNDARY_INDEX(entry); + if (bdry_idx != 0 && + (end & (pagesizes[bdry_idx] - 1)) != 0) + return (false); + } + return (true); +} + /* * * vm_map_copy_swap_object: diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index 5d41f892e83d..66a787b0d2d8 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -471,6 +471,7 @@ vm_map_entry_read_succ(void *token, struct vm_map_entry *const clone, #endif /* ! _KERNEL */ #ifdef _KERNEL +bool vm_map_check_boundary(vm_map_t, vm_offset_t, vm_offset_t); boolean_t vm_map_check_protection (vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t); int vm_map_delete(vm_map_t, vm_offset_t, vm_offset_t); int vm_map_find(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, vm_size_t, diff --git a/tests/sys/posixshm/posixshm_test.c b/tests/sys/posixshm/posixshm_test.c index a3ce18f855f5..314bf5e3ff5b 100644 --- a/tests/sys/posixshm/posixshm_test.c +++ b/tests/sys/posixshm/posixshm_test.c @@ -39,10 +39,17 @@ #include #include +#ifdef __amd64__ +#include +#endif + #include #include #include +#include +#include #include +#include #include #include #include @@ -1902,6 +1909,183 @@ ATF_TC_BODY(largepage_pipe, tc) } } +#ifdef __amd64__ +static sigjmp_buf jmpbuf; +static _Atomic(void *) faultaddr; +static _Atomic(int) faultsig; + +#define KEY_RW 1 +#define KEY_RO 2 +#define KEY_WO 3 +#define KEY_NO 4 +#define VAL 0xdeadfacec0debeef +static void +set_keys(void) +{ + int error; + + error = x86_pkru_set_perm(KEY_RW, 1, 1); + ATF_REQUIRE(error == 0); + error = x86_pkru_set_perm(KEY_RO, 1, 0); + ATF_REQUIRE(error == 0); + error = x86_pkru_set_perm(KEY_WO, 0, 1); + ATF_REQUIRE(error == 0); + error = x86_pkru_set_perm(KEY_NO, 0, 0); + ATF_REQUIRE(error == 0); +} + +static void +sigsegv(int sig, siginfo_t *si, void *uc __unused) +{ + faultsig = sig; + faultaddr = si->si_addr; + siglongjmp(jmpbuf, 1); +} + +static bool +try_read(volatile uint64_t *p, uint64_t *outp) +{ + if (sigsetjmp(jmpbuf, 1) == 0) { + *outp = *p; + return (true); + } else { + atomic_signal_fence(memory_order_relaxed); + ATF_REQUIRE(faultsig == SIGSEGV); + ATF_REQUIRE(faultaddr == p); + set_keys(); /* PKRU is not restored by siglongjmp? */ + return (false); + } +} + +static bool +try_write(volatile uint64_t *p, uint64_t val) +{ + if (sigsetjmp(jmpbuf, 1) == 0) { + *p = val; + return (true); + } else { + atomic_signal_fence(memory_order_relaxed); + ATF_REQUIRE(faultsig == SIGSEGV); + ATF_REQUIRE(faultaddr == p); + set_keys(); /* PKRU is not restored by siglongjmp? */ + return (false); + } +} + +ATF_TC_WITHOUT_HEAD(largepage_pkru); +ATF_TC_BODY(largepage_pkru, tc) +{ + size_t ps[MAXPAGESIZES]; + struct sigaction sa; + char *addr, *addr1; + int error, fd, pscnt; + + memset(&sa, 0, sizeof(sa)); + sa.sa_sigaction = sigsegv; + sa.sa_flags = SA_SIGINFO; + sigemptyset(&sa.sa_mask); + error = sigaction(SIGSEGV, &sa, NULL); + ATF_REQUIRE(error == 0); + + pscnt = pagesizes(ps); + + for (int i = 1; i < pscnt; i++) { + uint64_t val; + + fd = shm_open_large(i, SHM_LARGEPAGE_ALLOC_DEFAULT, ps[i]); + addr = mmap(NULL, ps[i], PROT_READ | PROT_WRITE, MAP_SHARED, fd, + 0); + ATF_REQUIRE_MSG(addr != MAP_FAILED, + "mmap(%zu bytes) failed; error=%d", ps[i], errno); + + /* + * Ensure that the page is faulted into the pmap. + */ + memset(addr, 0, ps[i]); + + set_keys(); + + /* + * Make sure we can't partially cover a largepage mapping. + */ + error = x86_pkru_protect_range(addr, PAGE_SIZE, KEY_RW, 0); + ATF_REQUIRE_ERRNO(EINVAL, error != 0); + error = x86_pkru_protect_range(addr, ps[i] - PAGE_SIZE, KEY_RW, + 0); + ATF_REQUIRE_ERRNO(EINVAL, error != 0); + error = x86_pkru_protect_range(addr + PAGE_SIZE, ps[i] - PAGE_SIZE, + KEY_RW, 0); + ATF_REQUIRE_ERRNO(EINVAL, error != 0); + error = x86_pkru_protect_range(addr + 1, ps[i], KEY_RW, 0); + ATF_REQUIRE_ERRNO(EINVAL, error != 0); + + /* + * Make sure that protections are honoured. + */ + for (int j = 1; j <= 4; j++) { + volatile uint64_t *addr64; + + error = x86_pkru_protect_range(addr, ps[i], 0, 0); + ATF_REQUIRE(error == 0); + + addr64 = (volatile uint64_t *)(void *)addr; + *addr64 = VAL; + + error = x86_pkru_protect_range(addr, ps[i], j, 0); + ATF_REQUIRE(error == 0); + switch (j) { + case KEY_RW: + ATF_REQUIRE(try_write(addr64, VAL)); + ATF_REQUIRE(try_read(addr64, &val)); + ATF_REQUIRE(val == VAL); + break; + case KEY_RO: + ATF_REQUIRE(try_read(addr64, &val)); + ATF_REQUIRE(val == VAL); + ATF_REQUIRE(!try_write(addr64, VAL)); + break; + case KEY_WO: + /* !access implies !modify */ + case KEY_NO: + ATF_REQUIRE(!try_read(addr64, &val)); + ATF_REQUIRE(!try_write(addr64, VAL)); + break; + default: + __unreachable(); + } + } + error = munmap(addr, ps[i]); + ATF_CHECK(error == 0); + + /* + * Try mapping a large page in a region partially covered by a + * key. + * + * Rather than detecting the mismatch when the logical mapping + * is created, we currently only fail once pmap_enter() is + * called from the fault handler. This is not ideal and might + * be improved in the future. + */ + error = x86_pkru_protect_range(addr, ps[i], 0, 0); + ATF_REQUIRE(error == 0); + error = x86_pkru_protect_range(addr + PAGE_SIZE, + ps[i] - PAGE_SIZE, KEY_RW, 0); + ATF_REQUIRE(error == 0); + + addr1 = mmap(addr, ps[i], PROT_READ | PROT_WRITE, + MAP_SHARED | MAP_FIXED, fd, 0); + ATF_REQUIRE(addr1 != MAP_FAILED); + ATF_REQUIRE(addr == addr1); + ATF_REQUIRE(!try_read((volatile uint64_t *)(void *)addr, &val)); + ATF_REQUIRE(!try_write((volatile uint64_t *)(void *)addr, VAL)); + } +} +#undef KEY_RW +#undef KEY_RO +#undef KEY_WO +#undef KEY_NO +#endif + ATF_TC_WITHOUT_HEAD(largepage_reopen); ATF_TC_BODY(largepage_reopen, tc) { @@ -1992,6 +2176,9 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, largepage_mprotect); ATF_TP_ADD_TC(tp, largepage_minherit); ATF_TP_ADD_TC(tp, largepage_pipe); +#ifdef __amd64__ + ATF_TP_ADD_TC(tp, largepage_pkru); +#endif ATF_TP_ADD_TC(tp, largepage_reopen); return (atf_no_error()); From nobody Tue Apr 21 15:45:33 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0RWy0f56z6WtTr for ; Tue, 21 Apr 2026 15:45:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0RWx50KZz3RJS for ; Tue, 21 Apr 2026 15:45:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zBg7LVsjSqQSA/PjdLNKadCPNWd3sgXL4KwLGYJ2QNk=; b=FV/esJMSHDVtOBD/oZD8H8DrRoPQoOaE0omHNZCtpBdv0moIQ+N/xvvhmuXedxEUvDZmpV IIiuh6fFqAslze8tGfSnlMqly20/g3S6cj8ghacy7dnDjw/lCLJYqOyqkXYeXMlvVle807 kaqea+e6CYSB8wPQkIU5cpaEBAbDoBagLQtXXCjT+IS/h6oYAp+unvAAtN+W5FMVeI6b/h Xp/ye9/bny21RLYKk91m20JIlRJWEnrSmCvO4rYQ6uQeaqOfTs+bim5as5VE2aNagq0Xjk jr/vnWZG3i3xXITyJ53/FxSPGxUQm1AzuebHkecvwHA+iCgSJlCrboM2uTfmew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776786333; a=rsa-sha256; cv=none; b=oKC5F2dJT9pJTED3OBWqDx6h/PL0bATnURgHrt1iNRFhlQF0mNchpEuLDJs/yGnnTgKTWg QOjuu7BC7MlzN42CNF/kNqk8CfvGO+uFXRKnyHq6G6iRKxCg9fZHx4QM1FrnHx7/wgyfgi RTt6j2HKpwfU/Gkus3dL3LoC3LGHlB5zY2bVCJkieNbeHLR/oJ0NNXDyQ0Emp2oxenBKR7 UM2uZMvtM6jqlIGKb7mgXvWCxjNF/58CfuJvJYcW89asVkI9gxz+ys03b1JQUTLq61I/YP 9rulO6RWbtV2qO+duf00e+8YOwHnkesP6ME1cNiCeUGXAZ0dtFhrcfb7h6ZWSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zBg7LVsjSqQSA/PjdLNKadCPNWd3sgXL4KwLGYJ2QNk=; b=CaR5AziOYp43vPJDSeetyaF65YDwaibgHfmh/ttk46wxKeX0p2XIde5e9dP2ivh6X/hReR BAUNdQPAVcA0xpeUus3MSJHJDwjtx7OlX1PU4jdoiXNIsRiIP1w7YEvkCfuzftIIk4T8PB n8OgSa2rQZ1QawaUWRCBfKdIWSZzLnlXxwZwP2yXXiSYZi81Ee6/TfXKLZ2DIYnheUqdn7 TaWhrbfA2AARDCKpBOtcqu+pDUKIDLwOWY+37xm8y0Y4qK9Wa3H5MBhN+apFcM9YIWuSIp lUh1SGmyaNeznWj39rPThmE8Z2i5rDyyILImGoCeBWmdwRlUAcKDqWnd74CGNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0RWx4ZBVzr11 for ; Tue, 21 Apr 2026 15:45:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3601b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 15:45:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 6dc9b78eb75e - releng/14.4 - Add UPDATING entries and bump 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.4 X-Git-Reftype: branch X-Git-Commit: 6dc9b78eb75ed23b1bebd277d3b847cf2837c606 Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 15:45:33 +0000 Message-Id: <69e79b9d.3601b.6e503196@gitrepo.freebsd.org> The branch releng/14.4 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6dc9b78eb75ed23b1bebd277d3b847cf2837c606 commit 6dc9b78eb75ed23b1bebd277d3b847cf2837c606 Author: Mark Johnston AuthorDate: 2026-04-20 13:47:33 +0000 Commit: Mark Johnston CommitDate: 2026-04-21 15:45:06 +0000 Add UPDATING entries and bump version Approved by: so --- UPDATING | 14 ++++++++++++++ sys/conf/newvers.sh | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 37cb107c7947..f311af86ab77 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,20 @@ 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. +20260421: + 14.4-RELEASE-p2 SA-26:10.tty + SA-26:11.amd64 + EN-26:05.vm + EN-26:06.timerfd + + Kernel use-after-free bug in the TIOCNOTTY handler. [SA-26:10.tty] + + Missing large page handling in pmap_pkru_update_range(). [SA-26:11.amd64] + + The page fault handler fails to zero memory. [EN-26:05.vm] + + Periodic timerfd(2) timers may produce incorrect results. [EN-26:06.timerfd] + 20260325: 14.4-RELEASE-p1 SA-26:06.tcp SA-26:08.rpcsec_gss diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 329e4ac3875f..98a10bc4526c 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="14.4" -BRANCH="RELEASE-p1" +BRANCH="RELEASE-p2" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Tue Apr 21 15:45:59 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0RXS2Rchz6WvHG for ; Tue, 21 Apr 2026 15:46:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0RXR6dzFz3Sh1 for ; Tue, 21 Apr 2026 15:45:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B+FtRFA+WXCCsl4VYAdBQuaC6GxFxgjH6LTyamBXKZk=; b=IYGL8qsPHq/yQ7aVf4bmxQzrD9MumKC9+3e21bYr/z1H5xWp5BJmp5LKx26ZRDKzA9BAtf nElCAD9J4h96TqU2ys1BY2wwC7niadopgATBSoUv/XZD4M3r+JwfsowQD36WDaiXRIklKl h2c2J7YRGMFBnHHInUALu/3U5NamAmkUSOS4/QfUpL15uyBisfvWKghhjNUAmU0SQAWFMK N8ixxrT70Jmez/Dt3yeHwHt/iPcqtR4bfFV2K7y9RU8SNn5K2/1X9IjbNiYIFtdsGCFd54 lWSdRu4n3EKH1AfRfczjlB7AlhK3c2NpceWHeEV7Ndoyq1KgIRgyjuuayac6Gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776786360; a=rsa-sha256; cv=none; b=qG/OK8wEV1lT0ELo4mRMTZXXipqJlEXQ82PoGN0D4Jyol69GAqL2cZZrKbKkeeAcq1w1hi SMZlOAu4xrJEauQxGeOdAWKSuFFfmWKJVERiDdk9DAJ561zJwVbDdmaVoInsq3r4sAxcOc 0zF/Tn2+fYNDjjRxoUH2UrOg82AnU0q7lRALKfWW5weMDpu8rnoOfwyJe+nMD/izbGpT9O qgzzFMyvk1xukGpnKLjfn/+9N6sUMpa1bF6ucN6D1gpYvfM08jy6thhsiSUuqIpGp0wAvH lXz3K4eZq1w9rXKeIWx7VCQghsPzGCq2c4N4TNW2WrgK52fW5qb2K9PoBQuR+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B+FtRFA+WXCCsl4VYAdBQuaC6GxFxgjH6LTyamBXKZk=; b=NMtDYa0j+yTuurknXFWXGb5nA0HgTRuFkpxghebtEGm6SDTyCz1UkKEO6bH/Q1tEZaQ7dh WOLJ9/4SffrlLsc9zDRBZvY/lUcZD67cqWQtl0NhzjguKpZXu/pK4ArhfCTQj7Uu8mVNh8 Q3AgKnnXadaBo75yVagUe7djo2+0baE+zjEAmeQTjfGOuRuYL19UZWMA5Ajp/erapTiOcQ 9Cakczlc+aSDxvAIlzw6YRiK0hbiooL14vY2KIKUFxzgx6Z638rbSjuO2R6PdFEJNY/ALN aYs7zyYAvRBcACkDTQ85AOCWe6L4r+uxtf20vilyO7i602Sfx7Djpm/8QHVETQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0RXR5wKtzqhm for ; Tue, 21 Apr 2026 15:45:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36cb2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 15:45:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 4d22b3925df8 - releng/14.3 - vm_fault: Reset m_needs_zeroing properly List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.3 X-Git-Reftype: branch X-Git-Commit: 4d22b3925df828c3d37d7b63820283ed97a78035 Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 15:45:59 +0000 Message-Id: <69e79bb7.36cb2.227e58cd@gitrepo.freebsd.org> The branch releng/14.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4d22b3925df828c3d37d7b63820283ed97a78035 commit 4d22b3925df828c3d37d7b63820283ed97a78035 Author: Mark Johnston AuthorDate: 2026-04-08 04:21:09 +0000 Commit: Mark Johnston CommitDate: 2026-04-21 15:45:46 +0000 vm_fault: Reset m_needs_zeroing properly - When allocating a page, we should only consider the PG_ZERO flag when handling the top-level page. - Unconditionally reset the flag when restarting the fault handler. Previously, vm_fault_busy_sleep() would fail to reset it. Approved by: so Security: FreeBSD-EN-26:05.vm PR: 294039 Reviewed by: kib Tested by: Peter Much MFC after: 3 days Fixes: cff67bc43df1 ("vm_fault: only rely on PG_ZERO when the page was newly allocated") Differential Revision: https://reviews.freebsd.org/D56234 (cherry picked from commit 04132e01004316ddd0e0cde6ef15b100b7b1844d) (cherry picked from commit 9b7c0f4f81f06424899094d4381dede79669b623) --- sys/vm/vm_fault.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 64580c34c0a0..d7f4a478870b 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -265,8 +265,6 @@ vm_fault_unlock_vp(struct faultstate *fs) static void vm_fault_deallocate(struct faultstate *fs) { - - fs->m_needs_zeroing = true; vm_fault_page_release(&fs->m_cow); vm_fault_page_release(&fs->m); vm_object_pip_wakeup(fs->object); @@ -1288,7 +1286,8 @@ vm_fault_allocate(struct faultstate *fs) vm_waitpfault(dset, vm_pfault_oom_wait * hz); return (FAULT_RESTART); } - fs->m_needs_zeroing = (fs->m->flags & PG_ZERO) == 0; + if (fs->object == fs->first_object) + fs->m_needs_zeroing = (fs->m->flags & PG_ZERO) == 0; fs->oom_started = false; return (FAULT_CONTINUE); @@ -1556,7 +1555,6 @@ vm_fault(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, fs.fault_flags = fault_flags; fs.map = map; fs.lookup_still_valid = false; - fs.m_needs_zeroing = true; fs.oom_started = false; fs.nera = -1; fs.can_read_lock = true; @@ -1565,6 +1563,7 @@ vm_fault(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, RetryFault: fs.fault_type = fault_type; + fs.m_needs_zeroing = true; /* * Find the backing store object and offset into it to begin the From nobody Tue Apr 21 15:46:00 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0RXT5xYfz6WvBf for ; Tue, 21 Apr 2026 15:46:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0RXT0ff5z3ShH for ; Tue, 21 Apr 2026 15:46:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xFdbnRb5g1jAzNDbw0kAoso8M9kyxM6F9bQRbR/S0Vo=; b=d35UjDZhVhtX6gKomkHU4l13OOsj1BhMemNzRAOI/lsqVTYYUCE8dH7yNPCVs39PaR5Ft5 mee4OY/KlExA7uGh3Whh97tbLB1SBPlxvf6mEPKl/bSP7BtsFrN0qMcGkCJeomhmm2FiXg 3rcPK9MWRebxozVab+RLxj9kVPyZNnGgOGHjOpRvwu+dmkgDfQ8wmkoFHkr+oKckYjES2i lJydD+jPqAmse+gJkvadIYMyerK4x5NOTMtwc47bhKotk/abdmc5y19vXWwP9G71h7Fsdk M6T6pOsE+HnKNCd8FfSNNa5wBW7M1Qhln3y1QAwL1/avcRsg1BkDrWTG1/lAJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776786361; a=rsa-sha256; cv=none; b=DXBXF0oKcIaiAYTt+BNtgAnr8zRjw7cSFjh5Cb4OA++cR8MCqa/MAk6toBXO/FteFVZPDr Vof6AmLm0CJ637hn/T2FOF3hsbrLxEhqMoQ0IoEfpBpNn8jQA6ofic86izw1GB43wHDqyE BvB2MaJ5fE3BTMRddIVKG3j8ld9j49nPkdtn7nGKTwH48X1aB6bnfQgUBlOqhQGIIG0UOj TIbItTuz86EabcFDSWtvQjhZk3gdcsaSgm3HppFQxu/R8BEstXmDqauw3EeoYrVflF0n/u d9em1Tcu/UxOWRRk+98dfVhd3S5e5MIFNDog0QTHL7s//Y7x5figcHAJhvjVNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xFdbnRb5g1jAzNDbw0kAoso8M9kyxM6F9bQRbR/S0Vo=; b=xUs25m5U99bvBM99D7lczNTCn0nI9MHZrHE5Q6CKadytE7DqP0Kg+/3EgLk6qnrrSZ5p0+ FybkD8qkse6Or8cQyET1qJGHs/YPdlFL7r1URyjmX7r6VO6IEIBjcwnCaWcrz3/4KHHHnh thCCer9Yc2MEdK+zaJkB4otxpmHG67Bp7rkAJQD/q3x4WYQTYC952aN7MCKggvA84/Xilv 9THKpxaGzXf2ma80HJVK5dd+nHzeeQ7h8qIjCvfzGfB4k26kRNCXZ0hFmMveS7tFCNrbl/ 1P54Swht+fo3FIH5n6S/OjQChTzhzHBM/ZuLQjpYeIGK7bDopuj0wdiwhmCeHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0RXS6hkczqyd for ; Tue, 21 Apr 2026 15:46:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 347c9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 15:46:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jake Freeland From: Mark Johnston Subject: git: f37c6e3a133e - releng/14.3 - timerfd: Fix interval callout scheduling List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.3 X-Git-Reftype: branch X-Git-Commit: f37c6e3a133e37c742b23ba646b710492603bc51 Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 15:46:00 +0000 Message-Id: <69e79bb8.347c9.365d6235@gitrepo.freebsd.org> The branch releng/14.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f37c6e3a133e37c742b23ba646b710492603bc51 commit f37c6e3a133e37c742b23ba646b710492603bc51 Author: Jake Freeland AuthorDate: 2026-03-20 06:33:03 +0000 Commit: Mark Johnston CommitDate: 2026-04-21 15:45:50 +0000 timerfd: Fix interval callout scheduling When a timerfd interval callout misses its scheduled activation time, a differential is calculated based on the actual activation time and the scheduled activation time. This differential is divided by the timerfd's interval time and the quotient is added to the timerfd's counter. Before this change, the next callout was scheduled to activate at: scheduled activation time + timerfd interval. This change fixes the scheduling of the next callout to activate at: actual activation time + timerfd interval - remainder. Security: FreeBSD-26:06.timerfd Approved by: so Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D55790 MFC after: 2 weeks (cherry picked from commit 85c0f1a87da1fd1eb3e646e86f70e630c48da91a) (cherry picked from commit 3c00f603a2801fd780666f9e94a26f264a887c90) --- sys/kern/sys_timerfd.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/sys/kern/sys_timerfd.c b/sys/kern/sys_timerfd.c index ab7e048a2ab1..59c554f2dba8 100644 --- a/sys/kern/sys_timerfd.c +++ b/sys/kern/sys_timerfd.c @@ -394,23 +394,25 @@ static void timerfd_expire(void *arg) { struct timerfd *tfd = (struct timerfd *)arg; - struct timespec uptime; + sbintime_t exp, interval, now, next, diff; ++tfd->tfd_count; tfd->tfd_expired = true; if (timespecisset(&tfd->tfd_time.it_interval)) { + exp = tstosbt(tfd->tfd_time.it_value); + interval = tstosbt(tfd->tfd_time.it_interval); + now = sbinuptime(); + next = now + interval; + /* Count missed events. */ - nanouptime(&uptime); - if (timespeccmp(&uptime, &tfd->tfd_time.it_value, >)) { - timespecsub(&uptime, &tfd->tfd_time.it_value, &uptime); - tfd->tfd_count += tstosbt(uptime) / - tstosbt(tfd->tfd_time.it_interval); + if (now > exp) { + diff = now - exp; + tfd->tfd_count += diff / interval; + next -= diff % interval; } - timespecadd(&tfd->tfd_time.it_value, - &tfd->tfd_time.it_interval, &tfd->tfd_time.it_value); - callout_schedule_sbt(&tfd->tfd_callout, - tstosbt(tfd->tfd_time.it_value), - 0, C_ABSOLUTE); + + callout_schedule_sbt(&tfd->tfd_callout, next, 0, C_ABSOLUTE); + tfd->tfd_time.it_value = sbttots(next); } else { /* Single shot timer. */ callout_deactivate(&tfd->tfd_callout); From nobody Tue Apr 21 15:46:01 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0RXV2kd9z6Wv1k for ; Tue, 21 Apr 2026 15:46: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0RXV0gjQz3Sdp for ; Tue, 21 Apr 2026 15:46:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KeYaSyz+CJv2k8daCn+AvvobTcazMuemVHuTgYCrN+A=; b=t+f7fMOllhQZPsWyvpkRHJXj8riKUyT2l+VSWGrITlP2sIvL0bGmIQJOyS4dOXKxRqM0Rt 0bjktuf6227efuSKETKEmaVUXink8qUK/wh58EihzZUo6zLKcCZIW0CVHB/68eWuRbEcja lk9eP/7Grv3O5r8l2vgrmxdgZt1oTxbkbTWyuLwsZu1KkfjuIejOG7g1Q3mYn8O/QTWLDo /fsJNo1/BRP58pzBUUbPTD9Cs/xp/3R/kdi0MhbQvt/D+K/wPtK9c9qDfpRyu01vUzWfvX PkBHRaRuARd/aKaCcaYFrGdiJmQqcp2NDUXq1CN+8721LbvahsY5/CN6PH1fGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776786362; a=rsa-sha256; cv=none; b=I7/RJlIa+78NcJLtHVYw5ldmSGEeRufNMnjSNbPDlHpwW/rziGeSfoSETZiCQUQWWTQrpf 1xmbNguASDbSrtI7RKAIYQL29dJx1UyskiMLcxQRoNiH+yDLSjEkcy7IduTmIdXTZohsxD 61+arSgHvuHEaD7fF0Gk3+yGdnNhe26VeRkzoUmgoA63UYLzJTm6r5p5hMs26fRNIVjaG3 UMcin2ZUsdr6toYvepy57rybNA2bc9EOI1r5XZkG01ERylZ/PXgbMS2ACRhmqv2qiE1WJd YEBzjPmxBocwGziU16hkA1WpbZ2OjZHoBHM+8/iN0WpaYTNKK55Wl04hJQ5Y0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KeYaSyz+CJv2k8daCn+AvvobTcazMuemVHuTgYCrN+A=; b=K4oLaK7Pfq7v0C6zqviM48vduvI1M3lO+vcWih5m4cB/qtLYgN+vpaHCsjOSzrKR8VZbbh aucHUtv01va0YcKpZm60WLB9BiqJr1Agr2mLQTfBQct9L2/wl89Xo9E0rN3D1Tn6IEClXH XI0l6GqXvdtzxmd8ONu9VXEDVQY4vc0hEc7k6lwUiJCeQmnOsXSv7oamBBjFbnIzFfJOXF zn+JV4qC4So6uz78GqKVYhP30jdy+yW9rolvSYH/RTnlh4uOw8H6W9rO8gI7AVXQbYGbkW RBbe3dX/A1rST6bz8jJu7dJK7jNsw3SAk6Q+LEDGWqJqAwfDwTY6p5xbo9e/GA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0RXV07VHzqQG for ; Tue, 21 Apr 2026 15:46:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36490 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 15:46:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 44077c07f19f - releng/14.3 - tty: Avoid leaving dangling pointers in tty_drop_ctty() List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.3 X-Git-Reftype: branch X-Git-Commit: 44077c07f19f5e60593dcd87f7c2c33ea7e5ca69 Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 15:46:01 +0000 Message-Id: <69e79bb9.36490.77ca0740@gitrepo.freebsd.org> The branch releng/14.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=44077c07f19f5e60593dcd87f7c2c33ea7e5ca69 commit 44077c07f19f5e60593dcd87f7c2c33ea7e5ca69 Author: Mark Johnston AuthorDate: 2026-03-23 15:22:48 +0000 Commit: Mark Johnston CommitDate: 2026-04-21 15:45:50 +0000 tty: Avoid leaving dangling pointers in tty_drop_ctty() The TIOCNOTTY handler detaches the calling process from its controlling terminal. It clears the link from the session to the tty, but not the pointers from the tty to the session and process group. This means that sess_release() doesn't call tty_rel_sess(), and that pgdelete() doesn't call tty_rel_pgrp(), so the pointers are left dangling. Fix this by clearing pointers in tty_drop_ctty(). Add a standalone regression test. Approved by: so Security: FreeBSD-SA-26:10.tty Security: CVE-2026-5398 Reported by: Nicholas Carlini Reviewed by: kib, kevans Fixes: 1b50b999f9b5 ("tty: implement TIOCNOTTY") Differential Revision: https://reviews.freebsd.org/D56046 --- sys/kern/tty.c | 4 +++ tests/sys/kern/Makefile | 1 + tests/sys/kern/tiocnotty.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+) diff --git a/sys/kern/tty.c b/sys/kern/tty.c index b1b3b268d0e9..a968762d6167 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1262,6 +1262,10 @@ tty_drop_ctty(struct tty *tp, struct proc *p) session->s_ttydp = NULL; SESS_UNLOCK(session); + if (tp->t_session == session) { + tp->t_session = NULL; + tp->t_pgrp = NULL; + } tp->t_sessioncnt--; p->p_flag &= ~P_CONTROLT; PROC_UNLOCK(p); diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index eb5ea8c3c549..ac7e4898dfa0 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -41,6 +41,7 @@ ATF_TESTS_C+= subr_physmem_test PLAIN_TESTS_C+= subr_unit_test ATF_TESTS_C+= sysctl_kern_proc ATF_TESTS_C+= sys_getrandom +PLAIN_TESTS_C+= tiocnotty ATF_TESTS_C+= tty_pts ATF_TESTS_C+= unix_dgram ATF_TESTS_C+= unix_passfd_dgram diff --git a/tests/sys/kern/tiocnotty.c b/tests/sys/kern/tiocnotty.c new file mode 100644 index 000000000000..2581f976b2ef --- /dev/null +++ b/tests/sys/kern/tiocnotty.c @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2026 Mark Johnston + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +/* + * A regression test that exercises a bug where TIOCNOTTY would leave some + * dangling pointers behind in the controlling terminal structure. + */ + +#include +#include + +#include +#include +#include +#include +#include + +int +main(void) +{ + int master, slave, status; + pid_t child; + + master = posix_openpt(O_RDWR | O_NOCTTY); + if (master < 0) + err(1, "posix_openpt"); + if (grantpt(master) < 0) + err(1, "grantpt"); + if (unlockpt(master) < 0) + err(1, "unlockpt"); + + child = fork(); + if (child < 0) + err(1, "fork"); + if (child == 0) { + if (setsid() < 0) + err(1, "setsid"); + slave = open(ptsname(master), O_RDWR | O_NOCTTY); + if (slave < 0) + err(2, "open"); + if (ioctl(slave, TIOCSCTTY, 0) < 0) + err(3, "ioctl(TIOCSCTTY)"); + /* Detach ourselves from the controlling terminal. */ + if (ioctl(slave, TIOCNOTTY, 0) < 0) + err(4, "ioctl(TIOCNOTTY)"); + _exit(0); + } + + if (waitpid(child, &status, 0) < 0) + err(1, "waitpid"); + if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) + errx(1, "child exited with status %d", WEXITSTATUS(status)); + + child = fork(); + if (child < 0) + err(1, "fork"); + if (child == 0) { + struct winsize winsz; + + if (setsid() < 0) + err(1, "setsid"); + slave = open(ptsname(master), O_RDWR | O_NOCTTY); + if (slave < 0) + err(2, "open"); + /* Dereferences dangling t_pgrp pointer in the terminal. */ + memset(&winsz, 0xff, sizeof(winsz)); + if (ioctl(slave, TIOCSWINSZ, &winsz) < 0) + err(3, "ioctl(TIOCSWINSZ)"); + /* Dereferences dangling t_session pointer in the terminal. */ + if (ioctl(slave, TIOCSCTTY, 0) < 0) + err(4, "ioctl(TIOCSCTTY)"); + _exit(0); + } + + if (waitpid(child, &status, 0) < 0) + err(1, "waitpid"); + if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) + errx(1, "child exited with status %d", WEXITSTATUS(status)); +} From nobody Tue Apr 21 15:46:03 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0RXW3mlFz6Wv93 for ; Tue, 21 Apr 2026 15:46: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0RXW1PVNz3Skj for ; Tue, 21 Apr 2026 15:46:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lm/a4T/uZRzO3dezwESm07l/YNzcBguzCZmp6Dg9htA=; b=HgMDDNAtTykTKh5oDkGJj2RbsK5YWavbiXhGD/uTMYFNSzUWJCwbDbFTy+iRJlDs/oZrN4 B+eZVBYpypSbGQhjDbLq1ROKOFtnCse7+zCfkUKGMCmKa0YY+4fCxTt+iFboE64a5d2iPe xIlMglgwQhDEwkJWjZqNPMGURCTE7SRYfCNkvTEXQ+PSgvPAKTfjTudO4yZHZcrPQVVusG KyiR/ubOZm/P2FHPzqyk6RHGHti9zwhuhGUZS7QQwlDa/KV4UbhG2bDAnIURiu8lovKd9X 9LwjEPhtdaZ+VYmQeJ8iYKlGT4IWoKx45fc/gvSUkockOtBveHmum6JiZ3iKqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776786363; a=rsa-sha256; cv=none; b=mX6jFMj8EsamLospjjpucn+Wcib57kmB2t8tE3QIq4MW1zUCxL5Y+ucFNrAAoYSVhKoHEU 4xCXJn/JZxa5T/foz7Wblbb6yBZ24zoOIIcTKMYjAtUCItVQUWHrJt3qrBsN54WTnWC+Uy Zt8nZaxMDI2c+WHkW7rIVIiW57iI611wjrIuK1gXkBksfcFVPtizaA4N8auLJaXlKzdrx0 uaM+AuSD0qcpMiZOkxCNr6KmuO8uHL0cnBPSYNz1qfo5u4Kk4ElwnNh62JeNEcsJcT0hYD 5vIyEkFnl9MEtOMnA9fMCR3kb3oEUHgZLIT2I9Y2NEhiSw8DMNgKuhX3nhL52w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lm/a4T/uZRzO3dezwESm07l/YNzcBguzCZmp6Dg9htA=; b=MxqBirTjwDhKRld8fY5GcYGRjPgCsU2tphD+Y2dRQx+9oezC7DCyZgIzHSlkj3gXwewt/k 3Q4ei+Dgi748KoesxFBJUu1ls1rIksOslqk8RFiUOaTVlz6mTo8knbkMTLnKjf29GxgcFc R/AYLwpChnW51Y7PmIMzL8xZ7YuEz2/p5ZepyAz1xqmG7trFlOaddQhQPSklKjevrt/ckL xsjWqb5xGTY2ae65T0Z0dfPGrKdH0yrlgg1ywcIyNEy1iELv1aJkno6y+aTm0tCrG5T8VV hh/PlIVD67M967Wx2pbc9EXspDHMt2H1HJcKpwIMbAXqeHH5me6JH36WloIcgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0RXW0xvRzqhn for ; Tue, 21 Apr 2026 15:46:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35f1d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 15:46:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 979e645dd25e - releng/14.3 - pkru: Fix handling of 1GB largepage mappings List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.3 X-Git-Reftype: branch X-Git-Commit: 979e645dd25e8b9df065ca2bf3059c269224fec6 Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 15:46:03 +0000 Message-Id: <69e79bbb.35f1d.4408352b@gitrepo.freebsd.org> The branch releng/14.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=979e645dd25e8b9df065ca2bf3059c269224fec6 commit 979e645dd25e8b9df065ca2bf3059c269224fec6 Author: Mark Johnston AuthorDate: 2026-03-31 13:37:43 +0000 Commit: Mark Johnston CommitDate: 2026-04-21 15:45:50 +0000 pkru: Fix handling of 1GB largepage mappings pmap_pkru_update_range() did not handle the case where a PDPE has PG_PS set. More generally, the SET_PKRU and CLEAR_PKRU sysarch implementations did not check whether the request covers a "boundary" vm map entry. Fix this, add the missing PG_PS test, and add some tests. Approved by: so Security: FreeBSD-SA-26:11.amd64 Security: CVE-2026-6386 Reported by: Nicholas Carlini Reviewed by: kib, alc Differential Revision: https://reviews.freebsd.org/D56184 --- lib/libc/x86/sys/pkru.3 | 3 + sys/amd64/amd64/pmap.c | 20 +++- sys/amd64/amd64/sys_machdep.c | 43 +++++++-- sys/vm/vm_map.c | 32 +++++++ sys/vm/vm_map.h | 1 + tests/sys/posixshm/posixshm_test.c | 187 +++++++++++++++++++++++++++++++++++++ 6 files changed, 274 insertions(+), 12 deletions(-) diff --git a/lib/libc/x86/sys/pkru.3 b/lib/libc/x86/sys/pkru.3 index 95bc66c979ac..033dc07c4b06 100644 --- a/lib/libc/x86/sys/pkru.3 +++ b/lib/libc/x86/sys/pkru.3 @@ -179,6 +179,9 @@ The supplied argument for .Fn x86_pkru_protect_range has reserved bits set. +.It Bq Er EINVAL +The range of the request partially covers a mapping of an object created by +.Xr shm_create_largepage 3 . .It Bq Er EFAULT The supplied address range does not completely fit into the user-managed address range. diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 406ff7744e5b..fb899f1b39fd 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -11544,7 +11544,7 @@ pmap_pkru_update_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, u_int keyidx) { pml4_entry_t *pml4e; - pdp_entry_t *pdpe; + pdp_entry_t newpdpe, *pdpe; pd_entry_t newpde, ptpaddr, *pde; pt_entry_t newpte, *ptep, pte; vm_offset_t va, va_next; @@ -11570,6 +11570,22 @@ pmap_pkru_update_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, va_next = eva; continue; } + if ((*pdpe & PG_PS) != 0) { + va_next = (va + NBPDP) & ~PDPMASK; + if (va_next < va) + va_next = eva; + KASSERT(va_next <= eva, + ("partial update of non-transparent 1G mapping " + "pdpe %#lx va %#lx eva %#lx va_next %#lx", + *pdpe, va, eva, va_next)); + newpdpe = (*pdpe & ~X86_PG_PKU_MASK) | + X86_PG_PKU(keyidx); + if (newpdpe != *pdpe) { + *pdpe = newpdpe; + changed = true; + } + continue; + } va_next = (va + NBPDR) & ~PDRMASK; if (va_next < va) @@ -11622,8 +11638,6 @@ pmap_pkru_check_uargs(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, if (pmap->pm_type != PT_X86 || keyidx > PMAP_MAX_PKRU_IDX || (flags & ~(AMD64_PKRU_PERSIST | AMD64_PKRU_EXCL)) != 0) return (EINVAL); - if (eva <= sva || eva > VM_MAXUSER_ADDRESS) - return (EFAULT); if ((cpu_stdext_feature2 & CPUID_STDEXT2_PKU) == 0) return (ENOTSUP); return (0); diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c index 39c89e2aad87..157d380f0fa2 100644 --- a/sys/amd64/amd64/sys_machdep.c +++ b/sys/amd64/amd64/sys_machdep.c @@ -32,7 +32,6 @@ * from: @(#)sys_machdep.c 5.5 (Berkeley) 1/19/91 */ -#include #include "opt_capsicum.h" #include "opt_ktrace.h" @@ -355,32 +354,58 @@ sysarch(struct thread *td, struct sysarch_args *uap) break; case I386_SET_PKRU: - case AMD64_SET_PKRU: + case AMD64_SET_PKRU: { + vm_offset_t addr, start, end; + vm_size_t len; + + addr = (uintptr_t)a64pkru.addr; + len = a64pkru.len; + /* * Read-lock the map to synchronize with parallel * pmap_vmspace_copy() on fork. */ map = &td->td_proc->p_vmspace->vm_map; vm_map_lock_read(map); - error = pmap_pkru_set(PCPU_GET(curpmap), - (vm_offset_t)a64pkru.addr, (vm_offset_t)a64pkru.addr + - a64pkru.len, a64pkru.keyidx, a64pkru.flags); + if (len == 0 || !vm_map_check_boundary(map, addr, addr + len)) { + vm_map_unlock_read(map); + error = EINVAL; + break; + } + start = trunc_page(addr); + end = round_page(addr + len); + error = pmap_pkru_set(PCPU_GET(curpmap), start, end, + a64pkru.keyidx, a64pkru.flags); vm_map_unlock_read(map); break; + } case I386_CLEAR_PKRU: - case AMD64_CLEAR_PKRU: + case AMD64_CLEAR_PKRU: { + vm_offset_t addr, start, end; + vm_size_t len; + if (a64pkru.flags != 0 || a64pkru.keyidx != 0) { error = EINVAL; break; } + + addr = (uintptr_t)a64pkru.addr; + len = a64pkru.len; + map = &td->td_proc->p_vmspace->vm_map; vm_map_lock_read(map); - error = pmap_pkru_clear(PCPU_GET(curpmap), - (vm_offset_t)a64pkru.addr, - (vm_offset_t)a64pkru.addr + a64pkru.len); + if (len == 0 || !vm_map_check_boundary(map, addr, addr + len)) { + vm_map_unlock_read(map); + error = EINVAL; + break; + } + start = trunc_page(addr); + end = round_page(addr + len); + error = pmap_pkru_clear(PCPU_GET(curpmap), start, end); vm_map_unlock_read(map); break; + } default: error = EINVAL; diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 28cf309f86c3..9df3fa44ba18 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -4135,6 +4135,38 @@ vm_map_check_protection(vm_map_t map, vm_offset_t start, vm_offset_t end, return (TRUE); } +/* + * Check whether the specified range partially overlaps a map entry with + * fixed boundaries, and return false if so. + * + * The map must be locked. + */ +bool +vm_map_check_boundary(vm_map_t map, vm_offset_t start, vm_offset_t end) +{ + vm_map_entry_t entry; + int bdry_idx; + + if (!vm_map_range_valid(map, start, end)) + return (false); + if (start == end) + return (true); + + if (vm_map_lookup_entry(map, start, &entry)) { + bdry_idx = MAP_ENTRY_SPLIT_BOUNDARY_INDEX(entry); + if (bdry_idx != 0 && + (start & (pagesizes[bdry_idx] - 1)) != 0) + return (false); + } + if (vm_map_lookup_entry(map, end - 1, &entry)) { + bdry_idx = MAP_ENTRY_SPLIT_BOUNDARY_INDEX(entry); + if (bdry_idx != 0 && + (end & (pagesizes[bdry_idx] - 1)) != 0) + return (false); + } + return (true); +} + /* * * vm_map_copy_swap_object: diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index 5d41f892e83d..66a787b0d2d8 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -471,6 +471,7 @@ vm_map_entry_read_succ(void *token, struct vm_map_entry *const clone, #endif /* ! _KERNEL */ #ifdef _KERNEL +bool vm_map_check_boundary(vm_map_t, vm_offset_t, vm_offset_t); boolean_t vm_map_check_protection (vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t); int vm_map_delete(vm_map_t, vm_offset_t, vm_offset_t); int vm_map_find(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, vm_size_t, diff --git a/tests/sys/posixshm/posixshm_test.c b/tests/sys/posixshm/posixshm_test.c index a3ce18f855f5..314bf5e3ff5b 100644 --- a/tests/sys/posixshm/posixshm_test.c +++ b/tests/sys/posixshm/posixshm_test.c @@ -39,10 +39,17 @@ #include #include +#ifdef __amd64__ +#include +#endif + #include #include #include +#include +#include #include +#include #include #include #include @@ -1902,6 +1909,183 @@ ATF_TC_BODY(largepage_pipe, tc) } } +#ifdef __amd64__ +static sigjmp_buf jmpbuf; +static _Atomic(void *) faultaddr; +static _Atomic(int) faultsig; + +#define KEY_RW 1 +#define KEY_RO 2 +#define KEY_WO 3 +#define KEY_NO 4 +#define VAL 0xdeadfacec0debeef +static void +set_keys(void) +{ + int error; + + error = x86_pkru_set_perm(KEY_RW, 1, 1); + ATF_REQUIRE(error == 0); + error = x86_pkru_set_perm(KEY_RO, 1, 0); + ATF_REQUIRE(error == 0); + error = x86_pkru_set_perm(KEY_WO, 0, 1); + ATF_REQUIRE(error == 0); + error = x86_pkru_set_perm(KEY_NO, 0, 0); + ATF_REQUIRE(error == 0); +} + +static void +sigsegv(int sig, siginfo_t *si, void *uc __unused) +{ + faultsig = sig; + faultaddr = si->si_addr; + siglongjmp(jmpbuf, 1); +} + +static bool +try_read(volatile uint64_t *p, uint64_t *outp) +{ + if (sigsetjmp(jmpbuf, 1) == 0) { + *outp = *p; + return (true); + } else { + atomic_signal_fence(memory_order_relaxed); + ATF_REQUIRE(faultsig == SIGSEGV); + ATF_REQUIRE(faultaddr == p); + set_keys(); /* PKRU is not restored by siglongjmp? */ + return (false); + } +} + +static bool +try_write(volatile uint64_t *p, uint64_t val) +{ + if (sigsetjmp(jmpbuf, 1) == 0) { + *p = val; + return (true); + } else { + atomic_signal_fence(memory_order_relaxed); + ATF_REQUIRE(faultsig == SIGSEGV); + ATF_REQUIRE(faultaddr == p); + set_keys(); /* PKRU is not restored by siglongjmp? */ + return (false); + } +} + +ATF_TC_WITHOUT_HEAD(largepage_pkru); +ATF_TC_BODY(largepage_pkru, tc) +{ + size_t ps[MAXPAGESIZES]; + struct sigaction sa; + char *addr, *addr1; + int error, fd, pscnt; + + memset(&sa, 0, sizeof(sa)); + sa.sa_sigaction = sigsegv; + sa.sa_flags = SA_SIGINFO; + sigemptyset(&sa.sa_mask); + error = sigaction(SIGSEGV, &sa, NULL); + ATF_REQUIRE(error == 0); + + pscnt = pagesizes(ps); + + for (int i = 1; i < pscnt; i++) { + uint64_t val; + + fd = shm_open_large(i, SHM_LARGEPAGE_ALLOC_DEFAULT, ps[i]); + addr = mmap(NULL, ps[i], PROT_READ | PROT_WRITE, MAP_SHARED, fd, + 0); + ATF_REQUIRE_MSG(addr != MAP_FAILED, + "mmap(%zu bytes) failed; error=%d", ps[i], errno); + + /* + * Ensure that the page is faulted into the pmap. + */ + memset(addr, 0, ps[i]); + + set_keys(); + + /* + * Make sure we can't partially cover a largepage mapping. + */ + error = x86_pkru_protect_range(addr, PAGE_SIZE, KEY_RW, 0); + ATF_REQUIRE_ERRNO(EINVAL, error != 0); + error = x86_pkru_protect_range(addr, ps[i] - PAGE_SIZE, KEY_RW, + 0); + ATF_REQUIRE_ERRNO(EINVAL, error != 0); + error = x86_pkru_protect_range(addr + PAGE_SIZE, ps[i] - PAGE_SIZE, + KEY_RW, 0); + ATF_REQUIRE_ERRNO(EINVAL, error != 0); + error = x86_pkru_protect_range(addr + 1, ps[i], KEY_RW, 0); + ATF_REQUIRE_ERRNO(EINVAL, error != 0); + + /* + * Make sure that protections are honoured. + */ + for (int j = 1; j <= 4; j++) { + volatile uint64_t *addr64; + + error = x86_pkru_protect_range(addr, ps[i], 0, 0); + ATF_REQUIRE(error == 0); + + addr64 = (volatile uint64_t *)(void *)addr; + *addr64 = VAL; + + error = x86_pkru_protect_range(addr, ps[i], j, 0); + ATF_REQUIRE(error == 0); + switch (j) { + case KEY_RW: + ATF_REQUIRE(try_write(addr64, VAL)); + ATF_REQUIRE(try_read(addr64, &val)); + ATF_REQUIRE(val == VAL); + break; + case KEY_RO: + ATF_REQUIRE(try_read(addr64, &val)); + ATF_REQUIRE(val == VAL); + ATF_REQUIRE(!try_write(addr64, VAL)); + break; + case KEY_WO: + /* !access implies !modify */ + case KEY_NO: + ATF_REQUIRE(!try_read(addr64, &val)); + ATF_REQUIRE(!try_write(addr64, VAL)); + break; + default: + __unreachable(); + } + } + error = munmap(addr, ps[i]); + ATF_CHECK(error == 0); + + /* + * Try mapping a large page in a region partially covered by a + * key. + * + * Rather than detecting the mismatch when the logical mapping + * is created, we currently only fail once pmap_enter() is + * called from the fault handler. This is not ideal and might + * be improved in the future. + */ + error = x86_pkru_protect_range(addr, ps[i], 0, 0); + ATF_REQUIRE(error == 0); + error = x86_pkru_protect_range(addr + PAGE_SIZE, + ps[i] - PAGE_SIZE, KEY_RW, 0); + ATF_REQUIRE(error == 0); + + addr1 = mmap(addr, ps[i], PROT_READ | PROT_WRITE, + MAP_SHARED | MAP_FIXED, fd, 0); + ATF_REQUIRE(addr1 != MAP_FAILED); + ATF_REQUIRE(addr == addr1); + ATF_REQUIRE(!try_read((volatile uint64_t *)(void *)addr, &val)); + ATF_REQUIRE(!try_write((volatile uint64_t *)(void *)addr, VAL)); + } +} +#undef KEY_RW +#undef KEY_RO +#undef KEY_WO +#undef KEY_NO +#endif + ATF_TC_WITHOUT_HEAD(largepage_reopen); ATF_TC_BODY(largepage_reopen, tc) { @@ -1992,6 +2176,9 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, largepage_mprotect); ATF_TP_ADD_TC(tp, largepage_minherit); ATF_TP_ADD_TC(tp, largepage_pipe); +#ifdef __amd64__ + ATF_TP_ADD_TC(tp, largepage_pkru); +#endif ATF_TP_ADD_TC(tp, largepage_reopen); return (atf_no_error()); From nobody Tue Apr 21 15:46:04 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0RXY0074z6WvHP for ; Tue, 21 Apr 2026 15:46: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0RXX2PFCz3Sn2 for ; Tue, 21 Apr 2026 15:46:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3gO3oBq/9Pfwy/kIuJzp089n0YfPEdCDvIGsaaKyQmQ=; b=EyrOHBL0JKJMAb8lSF74CbX+ybBJfdIMVEFeJ95RzczFYljTPNQUtxbgsVfTJtBObfnBs1 RvKpaiUG3lf0Z9j/A7bGOGdOmJqJIji0Yh7XAiVJFS85k8klJdNffzuNPqo3KghsNdnVis 2DxjjeoiTecpIMVfvhVGiRxuu8vXXO9ZGlmOkF4rU9Rp5KWara97B4/I53Pc7Le3odKvUG /3Pw2QSgJUNc68sEOgUj7hl1A78aOl6cY91tgcDZNpuDNW/3PcNDqaMomKBJjtKqPwpqp+ K7uFNW+EUttaTfLnT6ATQT+Qg3xfXkZAXxnQ8C/tmXwlmGli6+Up9sH4FCg3Zg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776786364; a=rsa-sha256; cv=none; b=Xo7MN9s1LxQdKTYbFg8Tv+kD9hiaGUhawO1W2threLLeeehYYKuRYgN9XMLiAgFMqhHCsk p5Je3HKyrWeUbwWEBp99HSfnFk75mfaGoEAn6uNpzGgiZNJmWuE0oF3UFKwHVA8YxjDQOh CRfZXRNVtIHsN3zTQ7w6H5AG5OtTlIJ865bZqIJNpgWP5cSKWTWgK94Wg7H7K58KYd83Lk yUR5afZUjP6ec+I/YW924ALmNg9fuBGj22gO2XeJcOjnYv6osoUUMliGRbFUBK84Eh/2q4 Yff3r4XZkVWedHjM1GBNo4TZmbXb03a/XAMvlux87dx2XmUOMTdg5XlzlURuEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3gO3oBq/9Pfwy/kIuJzp089n0YfPEdCDvIGsaaKyQmQ=; b=eNcOUyLUR6hsx1uBvrd4zA7ADftGbKRxivgHQse/l3gMcbMBqvJpPfG457+U8uifukWneu 1nb3VUnKmgF1mg6rIyd5HG0okG4bSbwchTkWn8ziiA2x7bXKZY3M4Y/0d3R29LWe0GZPXb Q1lhyBrvdgs82BySVbXrn1ry04FytVHE038Vf10m3lDZpsdhzxvrtRz44ry1EvAunu3Xuq 8KX4oYhk7y1rUWZFA6oryIdvIE4ryz6C0Kcx6nQsTV4nXfR+S3lazUrCGUereqi2mouM5G vp8thbqv40Fv2LqYu7pXIOJ3kp2n85qEM3LWXgM8RnhOLctaxP2rnO4ekVR+UA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0RXX1mQRzqyf for ; Tue, 21 Apr 2026 15:46:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36494 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 15:46:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 0224acf7f7db - releng/14.3 - Add UPDATING entries and bump 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.3 X-Git-Reftype: branch X-Git-Commit: 0224acf7f7db159f290eca918f50d2e4f6730705 Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 15:46:04 +0000 Message-Id: <69e79bbc.36494.128a97bf@gitrepo.freebsd.org> The branch releng/14.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0224acf7f7db159f290eca918f50d2e4f6730705 commit 0224acf7f7db159f290eca918f50d2e4f6730705 Author: Mark Johnston AuthorDate: 2026-04-20 13:48:45 +0000 Commit: Mark Johnston CommitDate: 2026-04-21 15:45:50 +0000 Add UPDATING entries and bump version Approved by: so --- UPDATING | 14 ++++++++++++++ sys/conf/newvers.sh | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 20c41179af63..2481d0187180 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,20 @@ 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. +20260421: + 14.3-RELEASE-p11 SA-26:10.tty + SA-26:11.amd64 + EN-26:05.vm + EN-26:06.timerfd + + Kernel use-after-free bug in the TIOCNOTTY handler. [SA-26:10.tty] + + Missing large page handling in pmap_pkru_update_range(). [SA-26:11.amd64] + + The page fault handler fails to zero memory. [EN-26:05.vm] + + Periodic timerfd(2) timers may produce incorrect results. [EN-26:06.timerfd] + 20260325: 14.3-RELEASE-p10 SA-26:06.tcp SA-26:08.rpcsec_gss diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 7c77782c1c00..e4d9bf1b464b 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="14.3" -BRANCH="RELEASE-p10" +BRANCH="RELEASE-p11" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Tue Apr 21 15:47:06 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0RYk3mqBz6WvGM for ; Tue, 21 Apr 2026 15:47:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0RYk2s4bz3VVw for ; Tue, 21 Apr 2026 15:47:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LDF5Np6Bw9CUNU2kOx4gZxinmT3HES/cPQ5Y1IhgCu0=; b=UCWskPnTdOCqVeLZL7Gi6ak95790z4UYNXEgJvXhfr4g72TXgi6lp+/63GqXj8b+bgGwiD NoHtjFAKQoCfhAD6LQFcHluwPpIKYp8A8+Zc96rFTSZIQZKQOJzIMAJOvtRa9yMOmhNrkU v4E+EfmFMnQ/AgK/lRF/7E9SzApUkgLVhNA0zg+2JFOBPef3PPkHC+AgCo9O4kDBqghudi 8s+Ke6jr8EI3TzbwTY1f2ZjcLp7skqMD0WhHDiqdVIF5xSNoMGpAkzmhVzsuMDwcpIKDWX iE8PI7NXSBGLPOqwrcU22p+pvbnZOXhTQKztQSKpFSiD2StbXUQKLceOY9Qllw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776786426; a=rsa-sha256; cv=none; b=wT5IkyqJmJXws4O31FnU7UlxL/tFWl1Fdl/EeZx8ESvpcJbry+7vIal1UgBze87FCfm61d 2h8hKhtYRJeXTd0M/f2x+Be2UaUn7K5c6ini+nlWXGRMHCNtwX1aMkMT/SyuO93dcXcwwV dnsjavyCzXHBolBsCaO7SCGLOJgXV1pOmK3o9eqVJaVhtZR6nVBVSJI49dpBRVGqTOUgqo ie7VTs4kiPwqqG2a/biuimI6DvgwYD03eA+YeqHzpXizyBnZyoFQSxLl4BsYHd/YqY5s3c oaNuSkh7LrFIGW4DstijyuqET4HanIJLcIg6KHNHzQg+QcvWo7i8RGfQU33rOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LDF5Np6Bw9CUNU2kOx4gZxinmT3HES/cPQ5Y1IhgCu0=; b=I7jbYf7oZBuInAMtU2fGqIIZXSg3iMFdlreOG+ZGjiCTD0ByrX5oA63CFv33uaglL2fvP1 tcSX+OL2rgSzHZmjjAzsW2z0xADj5icRpk9DCfr3A1dsTNNwO9/IVL8yqnJepsumBb4cdy HCFvnrL7HdLaBhNEdzNx5Oz0ui5gV3pa1drJxVWsBnWxP1pLDIWlPEKCo7ORaTk7bHMA7W 5h8BWP13AnKwUitZAoZ55Qdb6YvzOAtPhTaI1rf+MZD/0y684qeO/nIOJmvxCtKlzKmVEs SFvqYCbbq5oq0CIsjPWxLczuezo0sBa4WEQcL7rW79C0cWrRNSp5ExL9sTQxnw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0RYk2MGqzr1F for ; Tue, 21 Apr 2026 15:47:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 345bb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 15:47:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 6c9dd7528350 - releng/13.5 - vm_fault: Reset m_needs_zeroing properly List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.5 X-Git-Reftype: branch X-Git-Commit: 6c9dd75283503091c202cda1606a539f65bda85f Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 15:47:06 +0000 Message-Id: <69e79bfa.345bb.10fb0c33@gitrepo.freebsd.org> The branch releng/13.5 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6c9dd75283503091c202cda1606a539f65bda85f commit 6c9dd75283503091c202cda1606a539f65bda85f Author: Mark Johnston AuthorDate: 2026-04-08 04:21:09 +0000 Commit: Mark Johnston CommitDate: 2026-04-21 15:46:57 +0000 vm_fault: Reset m_needs_zeroing properly - When allocating a page, we should only consider the PG_ZERO flag when handling the top-level page. - Unconditionally reset the flag when restarting the fault handler. Previously, vm_fault_busy_sleep() would fail to reset it. Approved by: so Security: FreeBSD-EN-26:05.vm PR: 294039 Reviewed by: kib Tested by: Peter Much MFC after: 3 days Fixes: cff67bc43df1 ("vm_fault: only rely on PG_ZERO when the page was newly allocated") Differential Revision: https://reviews.freebsd.org/D56234 (cherry picked from commit 04132e01004316ddd0e0cde6ef15b100b7b1844d) (cherry picked from commit 50f7b62f0862f764215cee98547d5b8c0979ec26) --- sys/vm/vm_fault.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 605f677aecd5..614cba69002e 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -242,8 +242,6 @@ unlock_vp(struct faultstate *fs) static void fault_deallocate(struct faultstate *fs) { - - fs->m_needs_zeroing = true; fault_page_release(&fs->m_cow); fault_page_release(&fs->m); vm_object_pip_wakeup(fs->object); @@ -1202,7 +1200,8 @@ vm_fault_allocate(struct faultstate *fs) vm_waitpfault(dset, vm_pfault_oom_wait * hz); return (FAULT_RESTART); } - fs->m_needs_zeroing = (fs->m->flags & PG_ZERO) == 0; + if (fs->object == fs->first_object) + fs->m_needs_zeroing = (fs->m->flags & PG_ZERO) == 0; fs->oom_started = false; return (FAULT_CONTINUE); @@ -1462,7 +1461,6 @@ vm_fault(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, fs.fault_flags = fault_flags; fs.map = map; fs.lookup_still_valid = false; - fs.m_needs_zeroing = true; fs.oom_started = false; fs.nera = -1; faultcount = 0; @@ -1470,6 +1468,7 @@ vm_fault(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, RetryFault: fs.fault_type = fault_type; + fs.m_needs_zeroing = true; /* * Find the backing store object and offset into it to begin the From nobody Tue Apr 21 15:47:07 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0RYl5MKNz6WvK5 for ; Tue, 21 Apr 2026 15:47:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0RYl3sXYz3VQv for ; Tue, 21 Apr 2026 15:47:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3z8MqUXUatwsAVJeReZh74O8E9uO+eOgb4jyg6gqBjg=; b=nmTvblPkXnnJTB8cSdUQuNiTzmVq4wicJP9vAg6Ec1A7ssEJnWaUtr0b/ySHjFWZJd5TRL pRJUG7qKo4WvSRUwgDHgyT64+q0UyAeDwIuTviomoN3ReZ1GvWDATPrT/nj4nVX6CCknil FKysEOKP2EyguBstXvX9jXhqkeQUbUREB+zAkdVsG8Zz4ADDXnHxgjX/qI6y0uiyqajNQd OMlmglDOZDSUPqPFRzFEEb1c4hcBuMUPTJHFwQYbUwBZPvgWtSUL25o/SA7EuIr2BcrFI5 djqQHMmgYyW+cug1KXoZHqvineJQTiqBBvITqLBtyGeX/EFkO0MMan6JVQXYVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776786427; a=rsa-sha256; cv=none; b=SKvtVuRx2j8qqicdc1FE6slduqTAu2BNbzUDIXDf3MMaNlWEaGGtiwLxr7DeXhPRjtD4iF oqKYG8k7dGrW8NVUHGIsJx7+P+nz+U4CWN6RSzAU77Fmx6WqRvyIqFFAMnwCMpUCb2kwC6 /vGztDWqaZWChl9NSnKgmAaRyNlIcK45FBsUzHwnudTetCgFdavJ287Tae5cbnclOnh8LE NVkxj3b4GfWgYyIzsVMc7n6akgni8f2XZdfOw+2ki6p6sxU1eMvvSrvqhr0Kxz3XOBm/th EnZuuMP1txz+lZKXEaMSRlyECxKLH+S09ZqH2JycQogxvDMogStj1KYXc+T7Iw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3z8MqUXUatwsAVJeReZh74O8E9uO+eOgb4jyg6gqBjg=; b=E6p+b6Qbshr6fHDLKeqWkksKhVuq3J94lXIzWLM/lRUPxC9l4eA2QpnKKtPvM0X7mZHfbK x90a1qE9j8EoKzIO0lbl3KLYJoWpy3Axn5yb5iRrCNqeJOfigCj/4RBrRdQQ4NdOJ3x6vB 1/XuVuI4DU6X+ZoY5UvzC2u3rL7gbGf6J6G488ZZWNnzA92WstWvEiG+XDmX+xyVgibFD7 aINJQVqKI8rX3m6Pnru8cjT74zTdtLu3GFMQdjEDLmUX8LUWa1lYw073+BXPbv5OmOk0kK a5bi+D7zdVDQ6lvnNEcS9kguVbiwGobeFlqTWuqB6oDd+FZNhP9hvQEFXsFaOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0RYl3Dx6zqcH for ; Tue, 21 Apr 2026 15:47:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32ff4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 15:47:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 2862a33bdd1c - releng/13.5 - tty: Avoid leaving dangling pointers in tty_drop_ctty() List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.5 X-Git-Reftype: branch X-Git-Commit: 2862a33bdd1c2ddb9ba79020c82514c31cab6221 Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 15:47:07 +0000 Message-Id: <69e79bfb.32ff4.6d5a1e43@gitrepo.freebsd.org> The branch releng/13.5 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2862a33bdd1c2ddb9ba79020c82514c31cab6221 commit 2862a33bdd1c2ddb9ba79020c82514c31cab6221 Author: Mark Johnston AuthorDate: 2026-03-23 15:22:48 +0000 Commit: Mark Johnston CommitDate: 2026-04-21 15:47:00 +0000 tty: Avoid leaving dangling pointers in tty_drop_ctty() The TIOCNOTTY handler detaches the calling process from its controlling terminal. It clears the link from the session to the tty, but not the pointers from the tty to the session and process group. This means that sess_release() doesn't call tty_rel_sess(), and that pgdelete() doesn't call tty_rel_pgrp(), so the pointers are left dangling. Fix this by clearing pointers in tty_drop_ctty(). Add a standalone regression test. Approved by: so Security: FreeBSD-SA-26:10.tty Security: CVE-2026-5398 Reported by: Nicholas Carlini Reviewed by: kib, kevans Fixes: 1b50b999f9b5 ("tty: implement TIOCNOTTY") Differential Revision: https://reviews.freebsd.org/D56046 --- sys/kern/tty.c | 4 +++ tests/sys/kern/Makefile | 1 + tests/sys/kern/tiocnotty.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+) diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 42862ffb8a45..22f3645092f8 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1262,6 +1262,10 @@ tty_drop_ctty(struct tty *tp, struct proc *p) session->s_ttydp = NULL; SESS_UNLOCK(session); + if (tp->t_session == session) { + tp->t_session = NULL; + tp->t_pgrp = NULL; + } tp->t_sessioncnt--; p->p_flag &= ~P_CONTROLT; PROC_UNLOCK(p); diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index d499fd525222..faf08a352514 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -35,6 +35,7 @@ ATF_TESTS_C+= subr_physmem_test PLAIN_TESTS_C+= subr_unit_test ATF_TESTS_C+= sysctl_kern_proc ATF_TESTS_C+= sys_getrandom +PLAIN_TESTS_C+= tiocnotty ATF_TESTS_C+= tty_pts ATF_TESTS_C+= unix_passfd_test ATF_TESTS_C+= unix_seqpacket_test diff --git a/tests/sys/kern/tiocnotty.c b/tests/sys/kern/tiocnotty.c new file mode 100644 index 000000000000..2581f976b2ef --- /dev/null +++ b/tests/sys/kern/tiocnotty.c @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2026 Mark Johnston + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +/* + * A regression test that exercises a bug where TIOCNOTTY would leave some + * dangling pointers behind in the controlling terminal structure. + */ + +#include +#include + +#include +#include +#include +#include +#include + +int +main(void) +{ + int master, slave, status; + pid_t child; + + master = posix_openpt(O_RDWR | O_NOCTTY); + if (master < 0) + err(1, "posix_openpt"); + if (grantpt(master) < 0) + err(1, "grantpt"); + if (unlockpt(master) < 0) + err(1, "unlockpt"); + + child = fork(); + if (child < 0) + err(1, "fork"); + if (child == 0) { + if (setsid() < 0) + err(1, "setsid"); + slave = open(ptsname(master), O_RDWR | O_NOCTTY); + if (slave < 0) + err(2, "open"); + if (ioctl(slave, TIOCSCTTY, 0) < 0) + err(3, "ioctl(TIOCSCTTY)"); + /* Detach ourselves from the controlling terminal. */ + if (ioctl(slave, TIOCNOTTY, 0) < 0) + err(4, "ioctl(TIOCNOTTY)"); + _exit(0); + } + + if (waitpid(child, &status, 0) < 0) + err(1, "waitpid"); + if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) + errx(1, "child exited with status %d", WEXITSTATUS(status)); + + child = fork(); + if (child < 0) + err(1, "fork"); + if (child == 0) { + struct winsize winsz; + + if (setsid() < 0) + err(1, "setsid"); + slave = open(ptsname(master), O_RDWR | O_NOCTTY); + if (slave < 0) + err(2, "open"); + /* Dereferences dangling t_pgrp pointer in the terminal. */ + memset(&winsz, 0xff, sizeof(winsz)); + if (ioctl(slave, TIOCSWINSZ, &winsz) < 0) + err(3, "ioctl(TIOCSWINSZ)"); + /* Dereferences dangling t_session pointer in the terminal. */ + if (ioctl(slave, TIOCSCTTY, 0) < 0) + err(4, "ioctl(TIOCSCTTY)"); + _exit(0); + } + + if (waitpid(child, &status, 0) < 0) + err(1, "waitpid"); + if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) + errx(1, "child exited with status %d", WEXITSTATUS(status)); +} From nobody Tue Apr 21 15:47:08 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0RYm6CdCz6WvK6 for ; Tue, 21 Apr 2026 15:47:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0RYm4cXCz3VLT for ; Tue, 21 Apr 2026 15:47:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786428; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CPs6g+uSrTZ9590cOCsCiE+vuhJ3w73/GItePRN0v3g=; b=r5sRJoU70egjE3VhAvNYIjEK9KnJhZ+GwXFvVX4yPgPTAVqENqgcxLZYZHXqBgDyCW26m5 NJyF67+EwcFBlw+f34ajM+XETWZJ01qAwFW4jRgacusDAfRCoqwf9uCYRrbcx0PKDstQiD rnZ3nsdpNEFwsCj8mU56R9KMlZ93R5LqmCdGR8BPm4lNPIpAEqXh/OPrYZqun2yJGJnf1P GGYe/dSabAWl/aneOUVhHA3rgWj8a8mJlA/JLEpqG2M8khccLx0+LMYllxUSo5KXi5rY0u ks1eGAIWRakJnA02L2O9AOXRAT5ylL8Yn9wjB01T/MlsAAGqzMH41CTsc6ofBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776786428; a=rsa-sha256; cv=none; b=h1JlJbSk6Taynf9NxY4uluCAtP6+yo24Eb18XUyI1HRNfhNJtxtioSK5keouzT7RFJ6cdV kxAHsRCVYVtUYaLe2bWY2F2KUMtvcXrfL7ATfcry6b/7z2Ccm6B8z1vzB1piLM88gela6n 748VEkk4pkd2EIufLIWaIdtFdR1U2dtqHwoqXS/k83FFRjz5/9wUmKWKjocedxsTSIuMYC IWEF6IW6La7rzTe2TNMOtC0X9f9JVqwcaNgunPHHTOQv/C6ptrrKogIExe41HfYTgQDvUG CIr0GMc/bh6SdVI3tZ30PvXrXR3fzwdKfpQ+IaFTlL+6pIJJCFbAadfAOS5sZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786428; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CPs6g+uSrTZ9590cOCsCiE+vuhJ3w73/GItePRN0v3g=; b=qySnaR/sWDwfSB3PFDD2otx39zVF8VWPU1HumXC+gUxI4iuhULptgfXc4QQ05uL1CW8G43 LSFttXJfRdt0UxFWRb3fUbDnuokzc5Gd+P4t01+M/nlM7oDZm4DM8FR/OrHmSyiSCdprKh 6GwfAcxiFIH2ScWQh5UHd/dncM+TBetQRdq/NSuuGBcbVP9P/4ur6SMDxqBG1kEZZj4htE ILmKJkHyy1cGO/TihSrwrbCy9aoSL1E+NazRYbOpt2WyA2zxQbvM7T4R8OanwaELmkRzXV kVM1mYoJYtgcazYSYAQwcqAh3WrvAoFKzGQ120AUuRek+pNMrKBLd9fCU9XXhQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0RYm4Cwnzr1G for ; Tue, 21 Apr 2026 15:47:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36498 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 15:47:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: a2f6f2d00125 - releng/13.5 - pkru: Fix handling of 1GB largepage mappings List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.5 X-Git-Reftype: branch X-Git-Commit: a2f6f2d00125ade4727143b7a4ae93ea3e16f7e1 Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 15:47:08 +0000 Message-Id: <69e79bfc.36498.6a0bb40e@gitrepo.freebsd.org> The branch releng/13.5 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a2f6f2d00125ade4727143b7a4ae93ea3e16f7e1 commit a2f6f2d00125ade4727143b7a4ae93ea3e16f7e1 Author: Mark Johnston AuthorDate: 2026-03-31 13:37:43 +0000 Commit: Mark Johnston CommitDate: 2026-04-21 15:47:00 +0000 pkru: Fix handling of 1GB largepage mappings pmap_pkru_update_range() did not handle the case where a PDPE has PG_PS set. More generally, the SET_PKRU and CLEAR_PKRU sysarch implementations did not check whether the request covers a "boundary" vm map entry. Fix this, add the missing PG_PS test, and add some tests. Approved by: so Security: FreeBSD-SA-26:11.amd64 Security: CVE-2026-6386 Reported by: Nicholas Carlini Reviewed by: kib, alc Differential Revision: https://reviews.freebsd.org/D56184 --- lib/libc/x86/sys/pkru.3 | 3 + sys/amd64/amd64/pmap.c | 20 +++- sys/amd64/amd64/sys_machdep.c | 43 +++++++-- sys/vm/vm_map.c | 32 +++++++ sys/vm/vm_map.h | 1 + tests/sys/posixshm/posixshm_test.c | 187 +++++++++++++++++++++++++++++++++++++ 6 files changed, 274 insertions(+), 12 deletions(-) diff --git a/lib/libc/x86/sys/pkru.3 b/lib/libc/x86/sys/pkru.3 index 2bcb6a64baaa..f74a25c14b6f 100644 --- a/lib/libc/x86/sys/pkru.3 +++ b/lib/libc/x86/sys/pkru.3 @@ -179,6 +179,9 @@ The supplied argument for .Fn x86_pkru_protect_range has reserved bits set. +.It Bq Er EINVAL +The range of the request partially covers a mapping of an object created by +.Xr shm_create_largepage 3 . .It Bq Er EFAULT The supplied address range does not completely fit into the user-managed address range. diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 5d848cdd7aac..bb309d531ff2 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -11255,7 +11255,7 @@ pmap_pkru_update_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, u_int keyidx) { pml4_entry_t *pml4e; - pdp_entry_t *pdpe; + pdp_entry_t newpdpe, *pdpe; pd_entry_t newpde, ptpaddr, *pde; pt_entry_t newpte, *ptep, pte; vm_offset_t va, va_next; @@ -11281,6 +11281,22 @@ pmap_pkru_update_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, va_next = eva; continue; } + if ((*pdpe & PG_PS) != 0) { + va_next = (va + NBPDP) & ~PDPMASK; + if (va_next < va) + va_next = eva; + KASSERT(va_next <= eva, + ("partial update of non-transparent 1G mapping " + "pdpe %#lx va %#lx eva %#lx va_next %#lx", + *pdpe, va, eva, va_next)); + newpdpe = (*pdpe & ~X86_PG_PKU_MASK) | + X86_PG_PKU(keyidx); + if (newpdpe != *pdpe) { + *pdpe = newpdpe; + changed = true; + } + continue; + } va_next = (va + NBPDR) & ~PDRMASK; if (va_next < va) @@ -11333,8 +11349,6 @@ pmap_pkru_check_uargs(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, if (pmap->pm_type != PT_X86 || keyidx > PMAP_MAX_PKRU_IDX || (flags & ~(AMD64_PKRU_PERSIST | AMD64_PKRU_EXCL)) != 0) return (EINVAL); - if (eva <= sva || eva > VM_MAXUSER_ADDRESS) - return (EFAULT); if ((cpu_stdext_feature2 & CPUID_STDEXT2_PKU) == 0) return (ENOTSUP); return (0); diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c index b80d0bc95d70..3fbf44d9e48a 100644 --- a/sys/amd64/amd64/sys_machdep.c +++ b/sys/amd64/amd64/sys_machdep.c @@ -32,7 +32,6 @@ * from: @(#)sys_machdep.c 5.5 (Berkeley) 1/19/91 */ -#include #include "opt_capsicum.h" #include "opt_ktrace.h" @@ -356,32 +355,58 @@ sysarch(struct thread *td, struct sysarch_args *uap) break; case I386_SET_PKRU: - case AMD64_SET_PKRU: + case AMD64_SET_PKRU: { + vm_offset_t addr, start, end; + vm_size_t len; + + addr = (uintptr_t)a64pkru.addr; + len = a64pkru.len; + /* * Read-lock the map to synchronize with parallel * pmap_vmspace_copy() on fork. */ map = &td->td_proc->p_vmspace->vm_map; vm_map_lock_read(map); - error = pmap_pkru_set(PCPU_GET(curpmap), - (vm_offset_t)a64pkru.addr, (vm_offset_t)a64pkru.addr + - a64pkru.len, a64pkru.keyidx, a64pkru.flags); + if (len == 0 || !vm_map_check_boundary(map, addr, addr + len)) { + vm_map_unlock_read(map); + error = EINVAL; + break; + } + start = trunc_page(addr); + end = round_page(addr + len); + error = pmap_pkru_set(PCPU_GET(curpmap), start, end, + a64pkru.keyidx, a64pkru.flags); vm_map_unlock_read(map); break; + } case I386_CLEAR_PKRU: - case AMD64_CLEAR_PKRU: + case AMD64_CLEAR_PKRU: { + vm_offset_t addr, start, end; + vm_size_t len; + if (a64pkru.flags != 0 || a64pkru.keyidx != 0) { error = EINVAL; break; } + + addr = (uintptr_t)a64pkru.addr; + len = a64pkru.len; + map = &td->td_proc->p_vmspace->vm_map; vm_map_lock_read(map); - error = pmap_pkru_clear(PCPU_GET(curpmap), - (vm_offset_t)a64pkru.addr, - (vm_offset_t)a64pkru.addr + a64pkru.len); + if (len == 0 || !vm_map_check_boundary(map, addr, addr + len)) { + vm_map_unlock_read(map); + error = EINVAL; + break; + } + start = trunc_page(addr); + end = round_page(addr + len); + error = pmap_pkru_clear(PCPU_GET(curpmap), start, end); vm_map_unlock_read(map); break; + } default: error = EINVAL; diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 97352ba7b4b7..53d954499e34 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -4116,6 +4116,38 @@ vm_map_check_protection(vm_map_t map, vm_offset_t start, vm_offset_t end, return (TRUE); } +/* + * Check whether the specified range partially overlaps a map entry with + * fixed boundaries, and return false if so. + * + * The map must be locked. + */ +bool +vm_map_check_boundary(vm_map_t map, vm_offset_t start, vm_offset_t end) +{ + vm_map_entry_t entry; + int bdry_idx; + + if (!vm_map_range_valid(map, start, end)) + return (false); + if (start == end) + return (true); + + if (vm_map_lookup_entry(map, start, &entry)) { + bdry_idx = MAP_ENTRY_SPLIT_BOUNDARY_INDEX(entry); + if (bdry_idx != 0 && + (start & (pagesizes[bdry_idx] - 1)) != 0) + return (false); + } + if (vm_map_lookup_entry(map, end - 1, &entry)) { + bdry_idx = MAP_ENTRY_SPLIT_BOUNDARY_INDEX(entry); + if (bdry_idx != 0 && + (end & (pagesizes[bdry_idx] - 1)) != 0) + return (false); + } + return (true); +} + /* * * vm_map_copy_swap_object: diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index 9e4e1db0fd98..9467f39f00d0 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -469,6 +469,7 @@ vm_map_entry_read_succ(void *token, struct vm_map_entry *const clone, #endif /* ! _KERNEL */ #ifdef _KERNEL +bool vm_map_check_boundary(vm_map_t, vm_offset_t, vm_offset_t); boolean_t vm_map_check_protection (vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t); int vm_map_delete(vm_map_t, vm_offset_t, vm_offset_t); int vm_map_find(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, vm_size_t, diff --git a/tests/sys/posixshm/posixshm_test.c b/tests/sys/posixshm/posixshm_test.c index 4a7f95fda4ee..6552b02f9fba 100644 --- a/tests/sys/posixshm/posixshm_test.c +++ b/tests/sys/posixshm/posixshm_test.c @@ -34,10 +34,17 @@ #include #include +#ifdef __amd64__ +#include +#endif + #include #include #include +#include +#include #include +#include #include #include #include @@ -1702,6 +1709,183 @@ ATF_TC_BODY(largepage_pipe, tc) } } +#ifdef __amd64__ +static sigjmp_buf jmpbuf; +static _Atomic(void *) faultaddr; +static _Atomic(int) faultsig; + +#define KEY_RW 1 +#define KEY_RO 2 +#define KEY_WO 3 +#define KEY_NO 4 +#define VAL 0xdeadfacec0debeef +static void +set_keys(void) +{ + int error; + + error = x86_pkru_set_perm(KEY_RW, 1, 1); + ATF_REQUIRE(error == 0); + error = x86_pkru_set_perm(KEY_RO, 1, 0); + ATF_REQUIRE(error == 0); + error = x86_pkru_set_perm(KEY_WO, 0, 1); + ATF_REQUIRE(error == 0); + error = x86_pkru_set_perm(KEY_NO, 0, 0); + ATF_REQUIRE(error == 0); +} + +static void +sigsegv(int sig, siginfo_t *si, void *uc __unused) +{ + faultsig = sig; + faultaddr = si->si_addr; + siglongjmp(jmpbuf, 1); +} + +static bool +try_read(volatile uint64_t *p, uint64_t *outp) +{ + if (sigsetjmp(jmpbuf, 1) == 0) { + *outp = *p; + return (true); + } else { + atomic_signal_fence(memory_order_relaxed); + ATF_REQUIRE(faultsig == SIGSEGV); + ATF_REQUIRE(faultaddr == p); + set_keys(); /* PKRU is not restored by siglongjmp? */ + return (false); + } +} + +static bool +try_write(volatile uint64_t *p, uint64_t val) +{ + if (sigsetjmp(jmpbuf, 1) == 0) { + *p = val; + return (true); + } else { + atomic_signal_fence(memory_order_relaxed); + ATF_REQUIRE(faultsig == SIGSEGV); + ATF_REQUIRE(faultaddr == p); + set_keys(); /* PKRU is not restored by siglongjmp? */ + return (false); + } +} + +ATF_TC_WITHOUT_HEAD(largepage_pkru); +ATF_TC_BODY(largepage_pkru, tc) +{ + size_t ps[MAXPAGESIZES]; + struct sigaction sa; + char *addr, *addr1; + int error, fd, pscnt; + + memset(&sa, 0, sizeof(sa)); + sa.sa_sigaction = sigsegv; + sa.sa_flags = SA_SIGINFO; + sigemptyset(&sa.sa_mask); + error = sigaction(SIGSEGV, &sa, NULL); + ATF_REQUIRE(error == 0); + + pscnt = pagesizes(ps); + + for (int i = 1; i < pscnt; i++) { + uint64_t val; + + fd = shm_open_large(i, SHM_LARGEPAGE_ALLOC_DEFAULT, ps[i]); + addr = mmap(NULL, ps[i], PROT_READ | PROT_WRITE, MAP_SHARED, fd, + 0); + ATF_REQUIRE_MSG(addr != MAP_FAILED, + "mmap(%zu bytes) failed; error=%d", ps[i], errno); + + /* + * Ensure that the page is faulted into the pmap. + */ + memset(addr, 0, ps[i]); + + set_keys(); + + /* + * Make sure we can't partially cover a largepage mapping. + */ + error = x86_pkru_protect_range(addr, PAGE_SIZE, KEY_RW, 0); + ATF_REQUIRE_ERRNO(EINVAL, error != 0); + error = x86_pkru_protect_range(addr, ps[i] - PAGE_SIZE, KEY_RW, + 0); + ATF_REQUIRE_ERRNO(EINVAL, error != 0); + error = x86_pkru_protect_range(addr + PAGE_SIZE, ps[i] - PAGE_SIZE, + KEY_RW, 0); + ATF_REQUIRE_ERRNO(EINVAL, error != 0); + error = x86_pkru_protect_range(addr + 1, ps[i], KEY_RW, 0); + ATF_REQUIRE_ERRNO(EINVAL, error != 0); + + /* + * Make sure that protections are honoured. + */ + for (int j = 1; j <= 4; j++) { + volatile uint64_t *addr64; + + error = x86_pkru_protect_range(addr, ps[i], 0, 0); + ATF_REQUIRE(error == 0); + + addr64 = (volatile uint64_t *)(void *)addr; + *addr64 = VAL; + + error = x86_pkru_protect_range(addr, ps[i], j, 0); + ATF_REQUIRE(error == 0); + switch (j) { + case KEY_RW: + ATF_REQUIRE(try_write(addr64, VAL)); + ATF_REQUIRE(try_read(addr64, &val)); + ATF_REQUIRE(val == VAL); + break; + case KEY_RO: + ATF_REQUIRE(try_read(addr64, &val)); + ATF_REQUIRE(val == VAL); + ATF_REQUIRE(!try_write(addr64, VAL)); + break; + case KEY_WO: + /* !access implies !modify */ + case KEY_NO: + ATF_REQUIRE(!try_read(addr64, &val)); + ATF_REQUIRE(!try_write(addr64, VAL)); + break; + default: + __unreachable(); + } + } + error = munmap(addr, ps[i]); + ATF_CHECK(error == 0); + + /* + * Try mapping a large page in a region partially covered by a + * key. + * + * Rather than detecting the mismatch when the logical mapping + * is created, we currently only fail once pmap_enter() is + * called from the fault handler. This is not ideal and might + * be improved in the future. + */ + error = x86_pkru_protect_range(addr, ps[i], 0, 0); + ATF_REQUIRE(error == 0); + error = x86_pkru_protect_range(addr + PAGE_SIZE, + ps[i] - PAGE_SIZE, KEY_RW, 0); + ATF_REQUIRE(error == 0); + + addr1 = mmap(addr, ps[i], PROT_READ | PROT_WRITE, + MAP_SHARED | MAP_FIXED, fd, 0); + ATF_REQUIRE(addr1 != MAP_FAILED); + ATF_REQUIRE(addr == addr1); + ATF_REQUIRE(!try_read((volatile uint64_t *)(void *)addr, &val)); + ATF_REQUIRE(!try_write((volatile uint64_t *)(void *)addr, VAL)); + } +} +#undef KEY_RW +#undef KEY_RO +#undef KEY_WO +#undef KEY_NO +#endif + ATF_TC_WITHOUT_HEAD(largepage_reopen); ATF_TC_BODY(largepage_reopen, tc) { @@ -1791,6 +1975,9 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, largepage_mprotect); ATF_TP_ADD_TC(tp, largepage_minherit); ATF_TP_ADD_TC(tp, largepage_pipe); +#ifdef __amd64__ + ATF_TP_ADD_TC(tp, largepage_pkru); +#endif ATF_TP_ADD_TC(tp, largepage_reopen); return (atf_no_error()); From nobody Tue Apr 21 15:47:09 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0RYp2xNPz6WvRf for ; Tue, 21 Apr 2026 15: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0RYn55ySz3VR4 for ; Tue, 21 Apr 2026 15: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=1776786429; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OAU9je5H+5a0PVj7tor9+hKfjVii4lbsg+f6snDXmt8=; b=ATtcJfqSgCCjb8W5d1EnSM0LkJs1Y6gl951uaKu1Y3E8/Uh/bLY+7Iz8aqHG/q2rpp2ulF vndOroB8iIZ5kDN/CBZusq+FJ9zKDIJ+3j8e4lneeNqgfqGgp1q+DLkBRZwuStTNMzHhbN DZTTFJtyK2SUR3P3Axe3eH7Js7YhHSqoG/9tua2wr6GNjpPLUkyom1GEsDtn+z1bmQiFGC kHAxQStiP3FxYnK8UrL1i2PTQM9IB9+jiFRtj/H+CcolHR47vqXPvMqucHXei7lT0fUGb4 8e0qPSKm48M+JbYfR+8qYmrG7ABGW6QhojWVBQRzpU32wRsx2k6wTpXp0VGXHQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776786429; a=rsa-sha256; cv=none; b=Ar9933sVl0QdV480ULSiegDLKHwxy+AEJcbsZERGCJXCu6+798JYc9IyvOYz59+1aj5OCX kjEZz/WJI8vzl8yyY5PMJ3PzexuXhEt1SH0+3SKmmqj/kn0iSD4QcYJItPEplZsN14bFEB 7aS5oJ1mSiZ5w/Q0U0CSylSYB+htTVdTcL/53l8Pm24oLYdrDropDZxWMfU6lyh7AT0uZn 4HxQUYwFDlbOtAFDVrKwenBruY4xi/8uaXfKiOAjI6DydZzgkNGbbdKh8XmZLTVXh7qzth iuOK2jtcG6HPeWL5eUH+g/4ObFNLcsCsPtWZaB6CFc8GYiXn7bVw3KD5DFPerA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776786429; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OAU9je5H+5a0PVj7tor9+hKfjVii4lbsg+f6snDXmt8=; b=FG1SCCjwkM1xdlMW4+TsOhZCL/QhrYTqUkTZCg3LZDyT5NwcsEeljdP+rJwIJlh3N/s+Om 61hwdiHdShboTVZ+pHinBjhn/kW2DAs1+y/uFKsAj7uRNKrLpH3n/MLDsM6I/tLDmk8lcw cZDfU4+VyA9Pq2o2tyqe2hRnl0KE2Ko0lXiqdRiPpsWOgjGa72y5GoOlNuXlDgU+ssW6Fu +SyPfOWyxh44DdzY88CihCzL15tPnFvf7Wr2JsUCtEUuuG54QE33zugf1MThkBVV3yBMIr 4S21/ee4PBmJ4B4FdFuN9yTS0X7nXWJ6CwLChInjwV6ZiiDdAhp3kPj8Fp5QUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0RYn4cY6zr1H for ; Tue, 21 Apr 2026 15:47:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 342c7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 15:47:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 6c36e5dd0ce4 - releng/13.5 - Add UPDATING entries and bump 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.5 X-Git-Reftype: branch X-Git-Commit: 6c36e5dd0ce44a6a9fa19ccea2e5c4d005444991 Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 15:47:09 +0000 Message-Id: <69e79bfd.342c7.605f7910@gitrepo.freebsd.org> The branch releng/13.5 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6c36e5dd0ce44a6a9fa19ccea2e5c4d005444991 commit 6c36e5dd0ce44a6a9fa19ccea2e5c4d005444991 Author: Mark Johnston AuthorDate: 2026-04-20 13:51:07 +0000 Commit: Mark Johnston CommitDate: 2026-04-21 15:47:00 +0000 Add UPDATING entries and bump version Approved by: so --- UPDATING | 11 +++++++++++ sys/conf/newvers.sh | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index da2cb44b6e3d..036cd2bca339 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,17 @@ 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. +20260421: + 13.5-RELEASE-p12 SA-26:10.tty + SA-26:11.amd64 + EN-26:05.vm + + Kernel use-after-free bug in the TIOCNOTTY handler. [SA-26:10.tty] + + Missing large page handling in pmap_pkru_update_range(). [SA-26:11.amd64] + + The page fault handler fails to zero memory. [EN-26:05.vm] + 20260325: 13.5-RELEASE-p11 SA-26:08.rpcsec_gss diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 353695cf896c..5c1cfaf7410f 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="13.5" -BRANCH="RELEASE-p11" +BRANCH="RELEASE-p12" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Tue Apr 21 16:07:39 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0S1R4f92z6WxXx for ; Tue, 21 Apr 2026 16:07:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0S1R3Sghz3flx for ; Tue, 21 Apr 2026 16:07:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776787659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tiJyO2os1JPjHuvaluYBYXjDp4vHufWYPINiogEGgEk=; b=KHLwiVMzkluN0I1cO8f+doHiwAvzve1PW5DBMKn2MAtBeP3YAJCYZnl16hBt89psAwc0fB hQH5t64wHwR3+/IE7FbqQMP6ckyUEifPKo1kXa493JeS6QIKJiQGnmTv1tUJLP9sU647FW QRC4NTPBd/bpJSAcxq0+qYhkwTfUoJ9V6EoGJJaWi/oKDnOX7r+DIdcKBRBUDotVeoUs2H lOrHzOI2JJV03iek0d2PvfI7F3FbhX2Ni3LADDAmS4Q6TMYdN0rTRHed2v1GH2TVjqjYy3 u0jepxAY/xqKObaeIICO6/4B/vMw/UyFgYCWD/u0NmrrS3NVVsRaEJYr2DhlCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776787659; a=rsa-sha256; cv=none; b=coyo0G/xxFoPxjndOCGzRdwiNaJW7VdgSk9dtFQ/PaFIyG1KtGbZEDoG6cRUAI76uCpNo7 8aokohvEEoz4+xqXFJ31efiXgPqpCKP5k3ijEvIce+rtCTKHkTDjL/0ZEX67EBrXJOOQWz oIE3fbS3yfn7sS/2dupafxT0dSKdEbwHILIE0BCAUNvO5BkyE1mXK4g+4tNLLrIIhdA5L0 f1nkY/yIfnhfyPDF2wjGwln1tNDiKmVWHdjra+/gwtBFDiA1q3xlTgb3PX2nLPO52iMTYt OkYATUqSw7W37kLtlfuAoGee33rzaMFYozdfa4A49HJhPrabKyqNcmIz3qpn6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776787659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tiJyO2os1JPjHuvaluYBYXjDp4vHufWYPINiogEGgEk=; b=iWEcOx3XHCJ7tMuN4WDwdGhtymYlflkmlVF3kEsV+D0tlIOZamrbklJmB0DGQ0DVp9f5zq XjQ5rkQPdsdWO1Nqo3BYiGlayAdpSu29+pSf7vxwv3bR884KOa98OmWShMqFdlVlz/y1s5 ZAGvkRcmBc4sREE1I7MVFihcXRHBE5+iiRYZayNRhteNH7RTX47EyqFb00VTUqhunYJU52 9zEigxlmA1bGETihriiQ1FrfkRJalo3B2vY9wvwvjGBEv/1yzMjR5xCk/yow/Q+yvwKSZc wMuAH3CWpI66QJIKLbm563LLGfVUNkTraL6Mcj/55A6N8irFP516mKcjUSbF5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0S1R2W90zrTh for ; Tue, 21 Apr 2026 16:07:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38423 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 16:07:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: eb71ea92ab95 - Create tag release/13.5.0-p12 List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/tags/release/13.5.0-p12 X-Git-Reftype: annotated tag X-Git-Commit: eb71ea92ab953a127621d20240975d5741037ed1 Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 16:07:39 +0000 Message-Id: <69e7a0cb.38423.12729a@gitrepo.freebsd.org> The annotated tag release/13.5.0-p12 has been created by markj: URL: https://cgit.FreeBSD.org/src/tag/?h=release/13.5.0-p12 tag release/13.5.0-p12 Tagger: Mark Johnston TaggerDate: 2026-04-21 15:52:10 +0000 Tag FreeBSD 13.5-RELEASE-p12 commit 6c36e5dd0ce44a6a9fa19ccea2e5c4d005444991 Author: Mark Johnston AuthorDate: 2026-04-20 13:51:07 +0000 Commit: Mark Johnston CommitDate: 2026-04-21 15:47:00 +0000 Add UPDATING entries and bump version Approved by: so From nobody Tue Apr 21 16:09:10 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0S3C0PHFz6WxTZ for ; Tue, 21 Apr 2026 16:09:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0S3B3z8fz3fpt for ; Tue, 21 Apr 2026 16:09:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776787750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IJdzv4Wcgl8XLqMqfg65bcS70JapPnuoVzX6mQu/RgI=; b=H/ykcbd8ewSiLiHgY+zR758gcoOh0hC+or+MK8emP8303ro5GCEEEZIRIWIh5UrwX6doZL vc/vJZJJym8PryFBgl5joNUGTLZQ1WqIC+EjOfynt9/43X48tvBg2UT3SSnqBdY+RDd9Tk jgDKDfXk94vZYHXhWiqJF9JF0vQ0No0mhf7v/wakY0PumDAFPngh0T1dC7eOF8NK2w/8K5 C5XhXjT9p1zatcplrYDchPr+0VoFMAm462zMTb/TLjUWBnl8zJEFzlcZJ5/RRUy74vK2sJ ErdHuBnP1JT6A4SPuMo9z1MIqNoUmIZ1xWjmwgYH2xAHeRREwZtIYdXJm2eKYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776787750; a=rsa-sha256; cv=none; b=BQPPWGQRnEREuVYLEvxq80+EGaytEx9hnEXoJG1yreGv9iIcyOL4OrKQ1KYcKjNgG9K/Vq PjATpEqAwOr6NYoQnkCEw66Mhden7z+cw8YGdyjP86zbVBvDgXP3Wcw35Ncg7ZOzvf3llf fqeiEmUvij8iZ/Voz+5bgXWEeNPIBKmLZ2Xivrm2n9KFrAtDAHsS2w0XHrFERZsAw5PKQZ PMQLPC2wPDFxdEnQIevzMI1sA3j5P7zdxbQaySyWzhBm/DIwNLRVaq89oaE7ar03R1JADg IOUahbbfRFokQfWc00doJBJUAoIxNeha2ZTIjge/uwLQ2gTE62w+gADqam7mRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776787750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IJdzv4Wcgl8XLqMqfg65bcS70JapPnuoVzX6mQu/RgI=; b=M0PnEW9vBOtGh0nAai/mX9tt+1WR9Fbg9bHs3IsQAkmK9OskpSJwH4mAYUL+bvBomku+YX iJyI4J6Ekh6SFhPTbMIG3hW9E4lwwt8UQqiN6NC+0gnGsi1qyHERJJ8iVGpVhIAw0KdJYP V6ec5Yr43cDbii3fvh4PBoRBC6LndwWxK+6pQ61DndSueYimLNdv8+FCVcQatp2RlT96tT FB+nUkJIcqNvIQReJfNt0cXE2wlUqWL0suukoOOYClOCQcBj5NN+4DQGKKJnDkrMwp4pDh /efDRVWVjriBd7Mg639JZEp8cnknpFLc+WhtK2OBUjFtHpc8cjRPJGipdmc8rA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0S3B38sqzrTj for ; Tue, 21 Apr 2026 16:09:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 370cc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 16:09:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: b2f0ab2b64f2 - Create tag release/14.3.0-p11 List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/tags/release/14.3.0-p11 X-Git-Reftype: annotated tag X-Git-Commit: b2f0ab2b64f266509b2ea72d87f18aef1a392dbf Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 16:09:10 +0000 Message-Id: <69e7a126.370cc.1f1be044@gitrepo.freebsd.org> The annotated tag release/14.3.0-p11 has been created by markj: URL: https://cgit.FreeBSD.org/src/tag/?h=release/14.3.0-p11 tag release/14.3.0-p11 Tagger: Mark Johnston TaggerDate: 2026-04-21 16:08:58 +0000 Tag FreeBSD 14.3-RELEASE-p11 commit 0224acf7f7db159f290eca918f50d2e4f6730705 Author: Mark Johnston AuthorDate: 2026-04-20 13:48:45 +0000 Commit: Mark Johnston CommitDate: 2026-04-21 15:45:50 +0000 Add UPDATING entries and bump version Approved by: so From nobody Tue Apr 21 16:09:38 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0S3k3LQjz6WxRf for ; Tue, 21 Apr 2026 16:09:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0S3k2glSz3gJV for ; Tue, 21 Apr 2026 16:09:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776787778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a+H1gCQv5AnEOxNzH7O4DFfbcZYCVUSxv1X9lud5N5E=; b=GRD+VCDjiBE31oOAqnmjTgxPDgZXcWf1n3tQfUoKOpsMMZIygDnOTB1Ti8L9yVyhdxTeQn T/TIdf/6ocEQ/tp3+MvFCrNBkryciCWBa1MGfCbSI8Apw5WROw3NhDKHO4O2b7mid1Te4V 0+vAeN6y9/0fsnrRLczF//n+fQgjR2hmizQ8UU1w/VCSsDbRB6Bpk2+JtmcKfXFTHzalgy ynrZZrYXK54DYz5otOBL2akgxuRMC2M4vFtsKUPGprCFTty6tHSgShLQN1Vcu/mnzCG5d/ AGak4QWaaeuM4ah+tIlU5QHq2rWxsn+9VKXVNJ+KDmqOVVdMg+rV5RdyTI7G+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776787778; a=rsa-sha256; cv=none; b=D0TuR8EvFpEF+B6RZ8QSk+SZb3ACBBmWeXF40zFL+to3ZlC3xXGVkeURbEiHj3vI3Dz4SB v7RWhEKK7BPTis24XEtrhJbMFBszoqngKS0yxDxRFw6f8U7NBCH4iomvP0vNCmmRX3pLG9 aWkcfziNoWyTVsP8IYqjXTlW8IRuChZYUtYvwsIwunEm0QPFS1UhxBK+CCGbEn7/VifIwI O3hiTy3XhkJEwiMsi5nIE/9DDxNbe79ZKkqGyxHTm8o7OVACTtld84aB0E5nhvW6eFZKuP hrG6c6N75kUvDa5gSlxX9b+EkOOZt/apBwoIhwp55I3XOnKs8nFhQmAtdHgnKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776787778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a+H1gCQv5AnEOxNzH7O4DFfbcZYCVUSxv1X9lud5N5E=; b=YGgdE7CXVW4fBsO6kUYrzz2q6CIcJQJkQveZNnyl/NqM0Hwx6uuLfjbfswpI4eSthjRIgq /s/qXeCLXGOJnxLoGaPdebEA34vG3ktJl951621/PPfgMsBlzMqBWa5cUqGH5Lx0XRg/R+ gbxgyGAGiUBPkILGOQrCACyOG4ms3U8N4z43o88ie2fHd0s8S8aUj4laBqjJBc11Ol8qml 7WBRsoSDCkdjK9xUCYOkyXRXuPkDJR8b9XZULQ0/FvPhaVAAjZgBeK+vMWanZp1Ru0IVnP mI5EiIdBK5Dq7mdB9LKCGZ66iOSGY+H/OLYggV8C9e466wK1DQsOmBWefbB0WA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0S3k1mWTzrFG for ; Tue, 21 Apr 2026 16:09:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 380ae by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 16:09:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 7bb1b155c83f - Create tag release/14.4.0-p2 List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/tags/release/14.4.0-p2 X-Git-Reftype: annotated tag X-Git-Commit: 7bb1b155c83f00f502e87fc8f9eba3d4ff23a1f1 Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 16:09:38 +0000 Message-Id: <69e7a142.380ae.665a5339@gitrepo.freebsd.org> The annotated tag release/14.4.0-p2 has been created by markj: URL: https://cgit.FreeBSD.org/src/tag/?h=release/14.4.0-p2 tag release/14.4.0-p2 Tagger: Mark Johnston TaggerDate: 2026-04-21 16:09:25 +0000 Tag FreeBSD 14.4-RELEASE-p2 commit 6dc9b78eb75ed23b1bebd277d3b847cf2837c606 Author: Mark Johnston AuthorDate: 2026-04-20 13:47:33 +0000 Commit: Mark Johnston CommitDate: 2026-04-21 15:45:06 +0000 Add UPDATING entries and bump version Approved by: so From nobody Tue Apr 21 16:10:16 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0S4T0Q2yz6WxTq for ; Tue, 21 Apr 2026 16:10:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0S4S6m6Rz3gbd for ; Tue, 21 Apr 2026 16:10:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776787817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R8ccsol+SuJ9yXnjMGYcBcSfzGTRprrhQ1BNNz/IT20=; b=cgaXD9nVoycHYzJs9eAb42B6uCkXm3uSFmXi2LW/G2D47KSTaAP03BEAd0fk+a9weBQGS/ WkMpH9mXZY9+TJpA9CVjp08ktFYRRY/JWuy9UhNpme7q5aSKibM9tdle4UTK7v/iNrYfRj 4rjfOwYfYyHi2j9UQkBvoPjh8vZTQVoKomgrYBISMdWjR2RXW9T8hOmrzebowZKHzFcZIu 8eELMty63my631MZM1LY5U49Te1K0lbu7FpnZGzSq2LPJQUGkkEx7FDDvBXcLDhfMmizMe 0KOS9eLwc0jP0M0XR4S+zr73s8tx5s3gQmvaEJtYz/7o3i4KII3udw2VvYGf8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776787817; a=rsa-sha256; cv=none; b=M9INNE7MSG18Usb/GL7Ehd5mkdn/gOaUD04egW/43WbZBd6iI/z38I6wCa0K64LpCx1vr6 eoICcWyfkmuwubQbJkKDvPpMcUZfOvchMHylasohQpkyArpBlGqwC4kRcY9RSPa4Y2vFu8 NYdcEkM62s/8PzUs8VRAV3HsdZz7umqGHS2lefVgNgUh+36gDaJY+lFbCaeR7bN1U1vxor TQ0+e6JzZpNMdkYlpP+3Ce/YSgJQBTfJYyFqETlNEVOk80Qg+uA2FSj5/chSst5Mz8qDok bUnC5prM9Uvv2/cBtrw4fHsriZTofwnIJT8KN7WZpf0F55u+sHZHqo4fqPhdQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776787817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R8ccsol+SuJ9yXnjMGYcBcSfzGTRprrhQ1BNNz/IT20=; b=DqZQ2ggm4iEGEwmSLRFlNFHGmRfggnkburAcP3rLD6fw6toZet00xq4cCX3OnVG295lHoa fu2KbohNHkMS5uxRmCSwlsWBm3CISWuyar976ugQdLbHH8E8k+qudJXI2LG+cZvQjVzFWt XgE1tw9tlNJQtlI4X07zDAlaUO8L5heMHstxgZhkYqc5V9Cc3z9gGKjtsxwtZtCgruroYF XTEnKoiGTxkmem6wKa2Ru1qOVrwOSXo+8kGJzmTDAg0Use3vjaMsfi78XC65RvlYzWzoGk rITI4dJD3QcJ+2Bjfu38IIcJjiyRTsxxgVfQflTJCbIEttMd86SPi31IJkJV1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0S4S5yY2zrCk for ; Tue, 21 Apr 2026 16:10:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38c37 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 16:10:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: fe322dff322b - Create tag release/15.0.0-p6 List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/tags/release/15.0.0-p6 X-Git-Reftype: annotated tag X-Git-Commit: fe322dff322b99596f7c1619609c8c04285f2f28 Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 16:10:16 +0000 Message-Id: <69e7a168.38c37.105a0c64@gitrepo.freebsd.org> The annotated tag release/15.0.0-p6 has been created by markj: URL: https://cgit.FreeBSD.org/src/tag/?h=release/15.0.0-p6 tag release/15.0.0-p6 Tagger: Mark Johnston TaggerDate: 2026-04-21 16:10:04 +0000 Tag FreeBSD 15.0-RELEASE-p6 commit 6b6bc9afa0b09765355f74a2f11cee069e7a37ef Author: Mark Johnston AuthorDate: 2026-04-20 13:45:24 +0000 Commit: Mark Johnston CommitDate: 2026-04-20 19:41:20 +0000 Add UPDATING entries and bump version Approved by: so From nobody Tue Apr 21 20:32:04 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0Ytd30PYz6ZXQ9 for ; Tue, 21 Apr 2026 20:32:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0Ytd2Yy4z3Dx3 for ; Tue, 21 Apr 2026 20:32:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776803529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VA5XdgFk6jdKx93aqQ7N0ELvrTMRI9LAKOteetTqDuQ=; b=Y9VRiIrMLMfnwIfaAE7aNS20yOpBDAcxe1AaiFDcBZhOexfaNLtJDCVGTRrMTl1u7/YarY qCWByyNA3ac9cpG64PIlmzZzDrkdyJbRGCJ3nI5mgJ/ZSXEUKuPK9sI6zyxUUZDapY2fE0 bVnwO+uSuEgpGpkUOP91bS0niKeyOlDSACQ81sPZRzOuvQfIg5+s21+1FFwuj1OqTAo4bs wHAY/a6uJwL7XFB4POtKYO5o71S3tbJgVDsntEfGLeWKIs7rtwN6kd2El8bZYdUwYtgXW0 KWRUBND58vxQvX6HUFm/NgKeJwOJj2K28keo62P1ENYpJX9Fc5H8fzf7YPaAnw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776803529; a=rsa-sha256; cv=none; b=pAmYkZTcbilINh/56kp+ydxDbEyLs6tdOV/f1Ll55FQmWAiFt+6bv01H6ivSK9rWkt8fY2 VufosjZSUQdl3GcvO7VXL38cKgX8r3L2XzEgHxbBx6Z3lxDJ0vFzzGdPPyoh1uNHc8EMh1 vYH4xW1dATJgJc3d26llyne8CXMZxyNS7GcfV57gGbY+BjXE5clmTun+KgfjM3U4NS1c3P G+cOSAjCH+gqyX3YVhAv4AJdeR/2qja4n3KPSf5Iq6qoeOfKbngbaPVlu5MK3sMrdiCBp6 aTbf1LG8B9dV35Yr7eaWHdJNwcJngqRXlAsLzbWvEYxDDHSRUyirG2ZIqBXA7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776803529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VA5XdgFk6jdKx93aqQ7N0ELvrTMRI9LAKOteetTqDuQ=; b=Dwt761n63vyBXTpvQSazA7bHn9Hlce7fsY1BMVgYv0or7Wefnb8Slko79WHkxLM9u9l8Ed 1BfQxpckQNL75NUtJN50hI2AY4x1HvVuq1wGVo2cFTmYuat1s80QknSYTg7mSWhk7k+BGm +3cfcv9Ur08K8fwHvd2cQkom6VdeQCsEh/qCpGO/kW0UOjH88BE9EUaEZEV1Taqvy45sBe zqj8smMM3rQjhj1oWGOh0po5XYOLqvQwx4kc0O7zUEPNp12ZhTxyVyns53uav5tzH04O6X vTjfyU9wrsKqLygni/Z/HJk/r0URImHJA1RxhEgF2iAGuAENj+WqlhNQwITH/w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0Ytd1ybRz10C7 for ; Tue, 21 Apr 2026 20:32:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24c80 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Apr 2026 20:32:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Bhosale, Yogesh From: Krzysztof Galazka Subject: git: e9d3512bb587 - stable/15 - ix(4): Add support for firmware logging for E610 adapters List-Id: Commits to the stable branches 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: kgalazka X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: e9d3512bb587e0cb11e4dd0eb55cfaba841e4ffe Auto-Submitted: auto-generated Date: Tue, 21 Apr 2026 20:32:04 +0000 Message-Id: <69e7dec4.24c80.788e1edf@gitrepo.freebsd.org> The branch stable/15 has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=e9d3512bb587e0cb11e4dd0eb55cfaba841e4ffe commit e9d3512bb587e0cb11e4dd0eb55cfaba841e4ffe Author: Bhosale, Yogesh AuthorDate: 2026-04-09 18:05:29 +0000 Commit: Krzysztof Galazka CommitDate: 2026-04-21 20:22:50 +0000 ix(4): Add support for firmware logging for E610 adapters This is part 3 of the support for the new Intel Ethernet E610 family of devices The ix driver now enables firmware logging on Intel E610 devices for debugging with Customer Support. Logs are enabled by default and generated in binary format that requires decoding by support teams. The collected data is firmware and hardware related for debugging purposes only. When the driver loads, it creates a fw_log sysctl node under the debug section. Events are organized into categories (modules) for targeted logging, and users can adjust verbosity levels as needed. This adds sysctl support for the firmware logging feature and updates the ix(4) manual page with documentation. Signed-off-by: Yogesh Bhosale Co-developed-by: Krzysztof Galazka Reviewed by: ziaee, kbowling Tested by: Mateusz Moga Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D53973 (cherry picked from commit 6b58d10fc6d51ddcf5ee81628ead74d3dadb9bf6) --- share/man/man4/ix.4 | 34 ++- sys/conf/files | 2 + sys/dev/ixgbe/if_ix.c | 22 +- sys/dev/ixgbe/ixgbe.h | 5 + sys/dev/ixgbe/ixgbe_e610.c | 486 +++++++++++++++++++++++++++++++++++++++ sys/dev/ixgbe/ixgbe_e610.h | 13 ++ sys/dev/ixgbe/ixgbe_features.h | 1 + sys/dev/ixgbe/ixgbe_fw_logging.c | 467 +++++++++++++++++++++++++++++++++++++ sys/dev/ixgbe/ixgbe_osdep.c | 36 +++ sys/dev/ixgbe/ixgbe_osdep.h | 3 + sys/modules/ix/Makefile | 1 + sys/modules/ixv/Makefile | 1 + 12 files changed, 1066 insertions(+), 5 deletions(-) diff --git a/share/man/man4/ix.4 b/share/man/man4/ix.4 index 09af85f5c4a7..39ed49aa8dfc 100644 --- a/share/man/man4/ix.4 +++ b/share/man/man4/ix.4 @@ -138,7 +138,7 @@ The driver supports the following .Xr sysctl 8 variables: -.Bl -tag -width "dev.ix.?.debug.dump.clusters" +.Bl -tag -width "dev.ix.?.debug.fw_log.severity." .It Va dev.ix.?.debug.dump.clusters Specify a bitmask to select firmware event clusters to be included in the debug dump. @@ -160,6 +160,38 @@ Output must be redirected to a file and decoded by Intel Customer Support. .Pp This feature is only supported on E610. +.It Va dev.ix.?.debug.fw_log.severity. +Specify firmware logging verbosity level for the specified module. +Available levels include: +.Pp +.Bl -tag -compact +.It 0 +none +.It 1 +error +.It 2 +warning +.It 3 +normal +.It 4 +verbose +.El +.Pp +Supported modules: general, ctrl, link, link_topo, dnl, i2c, sdp, mdio, +adminq, hdma, lldp, dcbx, dcb, xlr, nvm, auth, vpd, iosf, parser, sw, +scheduler, txq, acl, post, watchdog, task_dispatch, mng, synce, health, +tsdrv, pfreg, mdlver. +.Pp +This feature is only supported on E610 devices. +.It Va dev.ix.?.debug.fw_log.register +Specify 1 to apply per-device firmware logging configuration. +.Pp +This feature is only supported on E610 devices. +.It Va dev.ix.?.debug.fw_log.on_load +Enable firmware logging during driver initialization when set via +.Xr kenv 1 . +.Pp +This feature is only supported on E610 devices. .El .Sh DIAGNOSTICS .Bl -diag diff --git a/sys/conf/files b/sys/conf/files index 12c7485d197b..39feccfb827e 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -2303,6 +2303,8 @@ dev/ixgbe/ixgbe_api.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_common.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/ixgbe_fw_logging.c optional ix inet | ixv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_mbx.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_vf.c optional ix inet | ixv inet \ diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index adc3458cedd6..05448da71604 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -1122,10 +1122,13 @@ ixgbe_if_attach_pre(if_ctx_t ctx) break; } - /* Check the FW API version */ - if (hw->mac.type == ixgbe_mac_E610 && ixgbe_check_fw_api_version(sc)) { - error = EIO; - goto err_pci; + /* Check the FW API version and enable FW logging support for E610 */ + if (hw->mac.type == ixgbe_mac_E610) { + if (ixgbe_check_fw_api_version(sc)) { + error = EIO; + goto err_pci; + } + ixgbe_fwlog_set_support_ena(hw); } /* Most of the iflib initialization... */ @@ -3401,6 +3404,9 @@ ixgbe_add_debug_sysctls(struct ixgbe_softc *sc) if (sc->feat_en & IXGBE_FEATURE_DBG_DUMP) ixgbe_add_debug_dump_sysctls(sc); + + if (sc->feat_en & IXGBE_FEATURE_FW_LOGGING) + ixgbe_add_fw_logging_tunables(sc, sc->debug_sysctls); } /* ixgbe_add_debug_sysctls */ /************************************************************************ @@ -4497,6 +4503,10 @@ ixgbe_handle_fw_event(void *context) sc->task_requests |= IXGBE_REQUEST_TASK_LSC; break; + case ixgbe_aci_opc_fw_logs_event: + ixgbe_fwlog_event_dump(&sc->hw, &event.desc, event.msg_buf); + break; + case ixgbe_aci_opc_temp_tca_event: if (hw->adapter_stopped == FALSE) ixgbe_if_stop(ctx); @@ -5733,6 +5743,7 @@ ixgbe_init_device_features(struct ixgbe_softc *sc) case ixgbe_mac_E610: sc->feat_cap |= IXGBE_FEATURE_RECOVERY_MODE; sc->feat_cap |= IXGBE_FEATURE_DBG_DUMP; + sc->feat_cap |= IXGBE_FEATURE_FW_LOGGING; error = ixgbe_get_caps(&sc->hw); if (error == 0 && sc->hw.func_caps.common_cap.eee_support != 0) sc->feat_cap |= IXGBE_FEATURE_EEE; @@ -5760,6 +5771,9 @@ ixgbe_init_device_features(struct ixgbe_softc *sc) /* FW Debug Dump */ if (sc->feat_cap & IXGBE_FEATURE_DBG_DUMP) sc->feat_en |= IXGBE_FEATURE_DBG_DUMP; + /* FW Logging */ + if (sc->feat_cap & IXGBE_FEATURE_FW_LOGGING) + sc->feat_en |= IXGBE_FEATURE_FW_LOGGING; /* Enabled via global sysctl... */ /* Flow Director */ diff --git a/sys/dev/ixgbe/ixgbe.h b/sys/dev/ixgbe/ixgbe.h index 624b71acabea..9120ca5a37ff 100644 --- a/sys/dev/ixgbe/ixgbe.h +++ b/sys/dev/ixgbe/ixgbe.h @@ -607,6 +607,11 @@ int ixgbe_setup_receive_structures(struct ixgbe_softc *); void ixgbe_free_receive_structures(struct ixgbe_softc *); int ixgbe_get_regs(SYSCTL_HANDLER_ARGS); +void ixgbe_add_fw_logging_tunables(struct ixgbe_softc *sc, + struct sysctl_oid *parent); + +#define IXGBE_STR_BUF_LEN 32 + #include "ixgbe_bypass.h" #include "ixgbe_fdir.h" #include "ixgbe_rss.h" diff --git a/sys/dev/ixgbe/ixgbe_e610.c b/sys/dev/ixgbe/ixgbe_e610.c index b76d96814933..21066f95a16e 100644 --- a/sys/dev/ixgbe/ixgbe_e610.c +++ b/sys/dev/ixgbe/ixgbe_e610.c @@ -3829,6 +3829,492 @@ s32 ixgbe_handle_nvm_access(struct ixgbe_hw *hw, } } +/** + * ixgbe_fwlog_cache_cfg - Cache FW logging config + * @hw: pointer to the HW structure + * @cfg: config to cache + * + * Cache FW logging config. + */ +static void ixgbe_fwlog_cache_cfg(struct ixgbe_hw *hw, + struct ixgbe_fwlog_cfg *cfg) +{ + hw->fwlog_cfg = *cfg; +} + +/** + * ixgbe_fwlog_valid_module_entries - validate all the module entry IDs and + * log levels + * @hw: pointer to the HW structure + * @entries: entries to validate + * @num_entries: number of entries to validate + * + * Checks if all the module entry IDs and log levels are valid. + * + * Return: true if all the module entry IDs and log levels are valid, + * otherwise false. + */ +static bool ixgbe_fwlog_valid_module_entries(struct ixgbe_hw *hw, + struct ixgbe_fwlog_module_entry *entries, + u16 num_entries) +{ + u16 i; + + UNREFERENCED_1PARAMETER(hw); + + if (!entries) { + return false; + } + + if (!num_entries) { + return false; + } + + for (i = 0; i < num_entries; i++) { + struct ixgbe_fwlog_module_entry *entry = &entries[i]; + + if (entry->module_id >= IXGBE_ACI_FW_LOG_ID_MAX) { + return false; + } + + if (entry->log_level >= IXGBE_FWLOG_LEVEL_INVALID) { + return false; + } + } + + return true; +} + +/** + * ixgbe_fwlog_valid_cfg - validate configuration + * @hw: pointer to the HW structure + * @cfg: config to validate + * + * Validate the entire configuration. + * + * Return: true if the entire configuration is valid, otherwise false. + */ +static bool ixgbe_fwlog_valid_cfg(struct ixgbe_hw *hw, + struct ixgbe_fwlog_cfg *cfg) +{ + if (!cfg) { + return false; + } + + if (cfg->log_resolution < IXGBE_ACI_FW_LOG_MIN_RESOLUTION || + cfg->log_resolution > IXGBE_ACI_FW_LOG_MAX_RESOLUTION) { + return false; + } + + if (!ixgbe_fwlog_valid_module_entries(hw, cfg->module_entries, + IXGBE_ACI_FW_LOG_ID_MAX)) + return false; + + return true; +} + +/** + * ixgbe_fwlog_init - Initialize cached structures for tracking FW logging + * @hw: pointer to the HW structure + * @cfg: config used to initialize the cached structures + * + * Initialize cached structures for tracking FW logging + * Called on driver initialization and before calling + * ixgbe_init_hw(). Firmware logging will be configured based on these settings + * and also the PF will be registered on init. + * + * Return: the exit code of the operation. + */ +s32 ixgbe_fwlog_init(struct ixgbe_hw *hw, struct ixgbe_fwlog_cfg *cfg) +{ + if (!ixgbe_fwlog_valid_cfg(hw, cfg)) + return IXGBE_ERR_PARAM; + + ixgbe_fwlog_cache_cfg(hw, cfg); + + return IXGBE_SUCCESS; +} + +/** + * ixgbe_aci_fwlog_set - Set FW logging configuration + * @hw: pointer to the HW structure + * @entries: entries to configure + * @num_entries: number of @entries + * @options: options from ixgbe_fwlog_cfg->options structure + * @log_resolution: logging resolution + * + * Set FW logging configuration using ACI command (0xFF30). + * + * Return: the exit code of the operation. + */ +static s32 ixgbe_aci_fwlog_set(struct ixgbe_hw *hw, + struct ixgbe_fwlog_module_entry *entries, + u16 num_entries, u16 options, u16 log_resolution) +{ + struct ixgbe_aci_cmd_fw_log_cfg_resp fw_modules[IXGBE_ACI_FW_LOG_ID_MAX]; + struct ixgbe_aci_cmd_fw_log *cmd; + struct ixgbe_aci_desc desc; + s32 status; + u16 i; + + if (num_entries > IXGBE_ACI_FW_LOG_ID_MAX) + return IXGBE_ERR_PARAM; + + for (i = 0; i < num_entries; i++) { + fw_modules[i].module_identifier = + IXGBE_CPU_TO_LE16(entries[i].module_id); + fw_modules[i].log_level = entries[i].log_level; + } + + ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_fw_logs_config); + desc.flags |= IXGBE_CPU_TO_LE16(IXGBE_ACI_FLAG_RD); + + cmd = &desc.params.fw_log; + + cmd->cmd_flags = IXGBE_ACI_FW_LOG_CONF_SET_VALID; + cmd->ops.cfg.log_resolution = IXGBE_CPU_TO_LE16(log_resolution); + cmd->ops.cfg.mdl_cnt = IXGBE_CPU_TO_LE16(num_entries); + + if (options & IXGBE_FWLOG_OPTION_ARQ_ENA) + cmd->cmd_flags |= IXGBE_ACI_FW_LOG_CONF_AQ_EN; + if (options & IXGBE_FWLOG_OPTION_UART_ENA) + cmd->cmd_flags |= IXGBE_ACI_FW_LOG_CONF_UART_EN; + + status = ixgbe_aci_send_cmd(hw, &desc, fw_modules, + sizeof(*fw_modules) * num_entries); + + return status; +} + +/** + * ixgbe_fwlog_supported - Cached for whether FW supports FW logging or not + * @hw: pointer to the HW structure + * + * This will always return false if called before ixgbe_init_hw(), so it must be + * called after ixgbe_init_hw(). + * + * Return: true if FW supports FW logging. + * If this function is called before ixgbe_init_hw(), return false. + */ +bool ixgbe_fwlog_supported(struct ixgbe_hw *hw) +{ + return hw->fwlog_support_ena; +} + +/** + * ixgbe_fwlog_set - Set the firmware logging settings + * @hw: pointer to the HW structure + * @cfg: config used to set firmware logging + * + * Call this function whenever the driver needs to set the firmware + * logging configuration. It can be called on initialization, reset, or during + * runtime. + * + * If the PF wishes to receive FW logging then it must register via + * ixgbe_fwlog_register. Note, that ixgbe_fwlog_register does not need to + * be called for init. + * + * Return: the exit code of the operation. + */ +s32 ixgbe_fwlog_set(struct ixgbe_hw *hw, struct ixgbe_fwlog_cfg *cfg) +{ + s32 status; + + if (!ixgbe_fwlog_supported(hw)) + return IXGBE_ERR_NOT_SUPPORTED; + + if (!ixgbe_fwlog_valid_cfg(hw, cfg)) + return IXGBE_ERR_PARAM; + + status = ixgbe_aci_fwlog_set(hw, cfg->module_entries, + IXGBE_ACI_FW_LOG_ID_MAX, cfg->options, + cfg->log_resolution); + if (!status) + ixgbe_fwlog_cache_cfg(hw, cfg); + + return status; +} + +/** + * ixgbe_fwlog_update_cached_entries - Update module entries in cached + * FW logging config + * @hw: pointer to the HW structure + * @entries: entries to cache + * @num_entries: number of @entries + * + * Update module entries in cached FW logging config. + */ +static void ixgbe_fwlog_update_cached_entries(struct ixgbe_hw *hw, + struct ixgbe_fwlog_module_entry *entries, + u16 num_entries) +{ + u16 i; + + for (i = 0; i < num_entries; i++) { + struct ixgbe_fwlog_module_entry *updated = &entries[i]; + u16 j; + + for (j = 0; j < IXGBE_ACI_FW_LOG_ID_MAX; j++) { + struct ixgbe_fwlog_module_entry *cached = + &hw->fwlog_cfg.module_entries[j]; + + if (cached->module_id == updated->module_id) { + cached->log_level = updated->log_level; + break; + } + } + } +} + +/** + * ixgbe_fwlog_update_modules - Update the log level 1 or more + * FW logging modules + * @hw: pointer to the HW structure + * @entries: array of ixgbe_fwlog_module_entry(s) + * @num_entries: number of entries + * + * Update the log level of 1 or more FW logging modules via module ID. + * + * Only the entries passed in will be affected. All other firmware logging + * settings will be unaffected. + * + * Return: the exit code of the operation. + */ +s32 ixgbe_fwlog_update_modules(struct ixgbe_hw *hw, + struct ixgbe_fwlog_module_entry *entries, + u16 num_entries) +{ + struct ixgbe_fwlog_cfg cfg; + s32 status; + + if (!ixgbe_fwlog_supported(hw)) + return IXGBE_ERR_NOT_SUPPORTED; + + if (num_entries > IXGBE_ACI_FW_LOG_ID_MAX) + return IXGBE_ERR_PARAM; + + if (!ixgbe_fwlog_valid_module_entries(hw, entries, num_entries)) + return IXGBE_ERR_PARAM; + + status = ixgbe_fwlog_get(hw, &cfg); + if (status) + goto status_out; + + status = ixgbe_aci_fwlog_set(hw, entries, num_entries, cfg.options, + cfg.log_resolution); + if (!status) + ixgbe_fwlog_update_cached_entries(hw, entries, num_entries); + +status_out: + return status; +} + +/** + * ixgbe_aci_fwlog_register - Register PF for firmware logging events. + * @hw: pointer to the HW structure + * @reg: true to register and false to unregister + * + * Register a PF for firmware logging events using ACI command (0xFF31). + * + * Return: the exit code of the operation. + */ +static s32 ixgbe_aci_fwlog_register(struct ixgbe_hw *hw, bool reg) +{ + struct ixgbe_aci_desc desc; + + ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_fw_logs_register); + + if (reg) + desc.params.fw_log.cmd_flags = IXGBE_ACI_FW_LOG_AQ_REGISTER; + + return ixgbe_aci_send_cmd(hw, &desc, NULL, 0); +} + +/** + * ixgbe_fwlog_register - Register the PF for firmware logging + * @hw: pointer to the HW structure + * + * After this call the PF will start to receive firmware logging based on the + * configuration set in ixgbe_fwlog_set. + * + * Return: the exit code of the operation. + */ +s32 ixgbe_fwlog_register(struct ixgbe_hw *hw) +{ + s32 status; + + if (!ixgbe_fwlog_supported(hw)) + return IXGBE_ERR_NOT_SUPPORTED; + + status = ixgbe_aci_fwlog_register(hw, true); + + if (!status) + hw->fwlog_cfg.options |= IXGBE_FWLOG_OPTION_IS_REGISTERED; + + return status; +} + +/** + * ixgbe_fwlog_unregister - Unregister the PF from firmware logging + * @hw: pointer to the HW structure + * + * Make an attempt to unregister the PF from firmware logging. + * + * Return: the exit code of the operation. + */ +s32 ixgbe_fwlog_unregister(struct ixgbe_hw *hw) +{ + s32 status; + + if (!ixgbe_fwlog_supported(hw)) + return IXGBE_ERR_NOT_SUPPORTED; + + status = ixgbe_aci_fwlog_register(hw, false); + if (!status) + hw->fwlog_cfg.options &= ~IXGBE_FWLOG_OPTION_IS_REGISTERED; + + return status; +} + +/** + * ixgbe_aci_fwlog_get - Get the current firmware logging configuration + * @hw: pointer to the HW structure + * @cfg: firmware logging configuration to populate + * + * Make an attempt to get the current firmware logging + * configuration using ACI command (0xFF32). + * + * Return: the exit code of the operation. + */ +static s32 ixgbe_aci_fwlog_get(struct ixgbe_hw *hw, struct ixgbe_fwlog_cfg *cfg) +{ + struct ixgbe_aci_cmd_fw_log_cfg_resp *fw_modules; + struct ixgbe_aci_cmd_fw_log *cmd; + struct ixgbe_aci_desc desc; + u16 i, module_id_cnt; + u8 *buf = NULL; + s32 status; + + memset(cfg, 0, sizeof(*cfg)); + + ixgbe_fill_dflt_direct_cmd_desc(&desc, ixgbe_aci_opc_fw_logs_query); + cmd = &desc.params.fw_log; + + cmd->cmd_flags = IXGBE_ACI_FW_LOG_AQ_QUERY; + + buf = (u8 *)ixgbe_malloc(hw, IXGBE_ACI_MAX_BUFFER_SIZE); + if (!buf) + return IXGBE_ERR_OUT_OF_MEM; + + status = ixgbe_aci_send_cmd(hw, &desc, buf, IXGBE_ACI_MAX_BUFFER_SIZE); + if (status) { + goto status_out; + } + + module_id_cnt = IXGBE_LE16_TO_CPU(cmd->ops.cfg.mdl_cnt); + if (module_id_cnt > IXGBE_ACI_FW_LOG_ID_MAX) { + module_id_cnt = IXGBE_ACI_FW_LOG_ID_MAX; + } + + cfg->log_resolution = (u8)IXGBE_LE16_TO_CPU(cmd->ops.cfg.log_resolution); + if (cmd->cmd_flags & IXGBE_ACI_FW_LOG_CONF_AQ_EN) + cfg->options |= IXGBE_FWLOG_OPTION_ARQ_ENA; + if (cmd->cmd_flags & IXGBE_ACI_FW_LOG_CONF_UART_EN) + cfg->options |= IXGBE_FWLOG_OPTION_UART_ENA; + if (cmd->cmd_flags & IXGBE_ACI_FW_LOG_QUERY_REGISTERED) + cfg->options |= IXGBE_FWLOG_OPTION_IS_REGISTERED; + + fw_modules = (struct ixgbe_aci_cmd_fw_log_cfg_resp *)buf; + + for (i = 0; i < module_id_cnt; i++) { + struct ixgbe_aci_cmd_fw_log_cfg_resp *fw_module = &fw_modules[i]; + + cfg->module_entries[i].module_id = + IXGBE_LE16_TO_CPU(fw_module->module_identifier); + cfg->module_entries[i].log_level = fw_module->log_level; + } + +status_out: + if (buf) + ixgbe_free(hw, buf); + return status; +} + +/** + * ixgbe_fwlog_set_support_ena - Set if FW logging is supported by FW + * @hw: pointer to the HW struct + * + * If FW returns success to the ixgbe_aci_fwlog_get call then it supports FW + * logging, else it doesn't. Set the fwlog_support_ena flag accordingly. + * + * This function is only meant to be called during driver init to determine if + * the FW support FW logging. + * + * Return: the exit code of the operation. + */ +void ixgbe_fwlog_set_support_ena(struct ixgbe_hw *hw) +{ + struct ixgbe_fwlog_cfg cfg; + s32 status; + + hw->fwlog_support_ena = false; + + /* don't call ixgbe_fwlog_get() because that would overwrite the cached + * configuration from the call to ixgbe_fwlog_init(), which is expected + * to be called prior to this function + */ + status = ixgbe_aci_fwlog_get(hw, &cfg); + if (!status) + hw->fwlog_support_ena = true; +} + +/** + * ixgbe_fwlog_get - Get the firmware logging settings + * @hw: pointer to the HW structure + * @cfg: config to populate based on current firmware logging settings + * + * Get the current firmware logging settings. + * + * Return: the exit code of the operation. + */ +s32 ixgbe_fwlog_get(struct ixgbe_hw *hw, struct ixgbe_fwlog_cfg *cfg) +{ + s32 status; + + if (!ixgbe_fwlog_supported(hw)) + return IXGBE_ERR_NOT_SUPPORTED; + + if (!cfg) + return IXGBE_ERR_PARAM; + + status = ixgbe_aci_fwlog_get(hw, cfg); + if (status) + return status; + + ixgbe_fwlog_cache_cfg(hw, cfg); + + return IXGBE_SUCCESS; +} + +/** + * ixgbe_fwlog_event_dump - Dump the event received over the Admin Receive Queue + * @hw: pointer to the HW structure + * @desc: Admin Receive Queue descriptor + * @buf: buffer that contains the FW log event data + * + * If the driver receives the ixgbe_aci_opc_fw_logs_event on the Admin Receive + * Queue, then it should call this function to dump the FW log data. + */ +void ixgbe_fwlog_event_dump(struct ixgbe_hw *hw, + struct ixgbe_aci_desc *desc, void *buf) +{ + if (!ixgbe_fwlog_supported(hw)) + return; + + ixgbe_info_fwlog(hw, 32, 1, (u8 *)buf, + IXGBE_LE16_TO_CPU(desc->datalen)); +} + /** * ixgbe_aci_set_health_status_config - Configure FW health events * @hw: pointer to the HW struct diff --git a/sys/dev/ixgbe/ixgbe_e610.h b/sys/dev/ixgbe/ixgbe_e610.h index 94e600139499..7af5506d85e8 100644 --- a/sys/dev/ixgbe/ixgbe_e610.h +++ b/sys/dev/ixgbe/ixgbe_e610.h @@ -169,6 +169,19 @@ s32 ixgbe_handle_nvm_access(struct ixgbe_hw *hw, s32 ixgbe_aci_set_health_status_config(struct ixgbe_hw *hw, u8 event_source); +s32 ixgbe_fwlog_init(struct ixgbe_hw *hw, struct ixgbe_fwlog_cfg *cfg); +bool ixgbe_fwlog_supported(struct ixgbe_hw *hw); +s32 ixgbe_fwlog_set(struct ixgbe_hw *hw, struct ixgbe_fwlog_cfg *cfg); +s32 ixgbe_fwlog_update_modules(struct ixgbe_hw *hw, + struct ixgbe_fwlog_module_entry *entries, + u16 num_entries); +s32 ixgbe_fwlog_register(struct ixgbe_hw *hw); +s32 ixgbe_fwlog_unregister(struct ixgbe_hw *hw); +void ixgbe_fwlog_set_support_ena(struct ixgbe_hw *hw); +s32 ixgbe_fwlog_get(struct ixgbe_hw *hw, struct ixgbe_fwlog_cfg *cfg); +void ixgbe_fwlog_event_dump(struct ixgbe_hw *hw, + struct ixgbe_aci_desc *desc, void *buf); + /* E610 operations */ s32 ixgbe_init_ops_E610(struct ixgbe_hw *hw); s32 ixgbe_reset_hw_E610(struct ixgbe_hw *hw); diff --git a/sys/dev/ixgbe/ixgbe_features.h b/sys/dev/ixgbe/ixgbe_features.h index bee9040319d8..bbc7507b29ac 100644 --- a/sys/dev/ixgbe/ixgbe_features.h +++ b/sys/dev/ixgbe/ixgbe_features.h @@ -58,6 +58,7 @@ #define IXGBE_FEATURE_NEEDS_CTXD (u32)(1 << 13) #define IXGBE_FEATURE_RECOVERY_MODE (u32)(1 << 15) #define IXGBE_FEATURE_DBG_DUMP (u32)(1 << 16) +#define IXGBE_FEATURE_FW_LOGGING (u32)(1 << 17) /* Check for OS support. Undefine features if not included in the OS */ #ifndef PCI_IOV diff --git a/sys/dev/ixgbe/ixgbe_fw_logging.c b/sys/dev/ixgbe/ixgbe_fw_logging.c new file mode 100644 index 000000000000..6202d504423f --- /dev/null +++ b/sys/dev/ixgbe/ixgbe_fw_logging.c @@ -0,0 +1,467 @@ +/** + * @file ixgbe_fw_logging.c + * @brief firmware logging sysctls + * + * Contains sysctls to enable and configure firmware logging debug support. + */ + + #include "ixgbe.h" + + /** + * ixgbe_reconfig_fw_log - Re-program firmware logging configuration + * @sc: private softc structure + * @cfg: firmware log configuration to latch + * + * If the adminq is currently active, ask firmware to update the logging + * configuration. If the adminq is currently down, then do nothing. In this + * case, ixgbe_init_hw() will re-configure firmware logging as soon as it brings + * up the adminq. + */ + static int + ixgbe_reconfig_fw_log(struct ixgbe_softc *sc, struct ixgbe_fwlog_cfg *cfg) + { + int status; + + ixgbe_fwlog_init(&sc->hw, cfg); + + if (!ixgbe_fwlog_supported(&sc->hw)) + return (0); + + status = ixgbe_fwlog_set(&sc->hw, cfg); + if (status != IXGBE_SUCCESS) { + DEBUGOUT1("Failed to reconfigure firmware logging, status %d\n", + status); + return (ENODEV); + } + + return (0); + } + + /** + * ixgbe_sysctl_fwlog_set_cfg_options - Sysctl for setting fwlog cfg options + * @oidp: sysctl oid structure + * @arg1: private softc structure + * @arg2: option to adjust + * @req: sysctl request pointer + * + * On read: displays whether firmware logging was reported during attachment + * On write: enables/disables firmware logging during attach phase + * + * This has no effect on the legacy (V1) version of firmware logging. + */ + static int + ixgbe_sysctl_fwlog_set_cfg_options(SYSCTL_HANDLER_ARGS) + { + struct ixgbe_softc *sc = (struct ixgbe_softc *)arg1; + struct ixgbe_fwlog_cfg *cfg = &sc->hw.fwlog_cfg; + int error; + u16 option = (u16)arg2; + bool enabled; + + enabled = !!(cfg->options & option); + + error = sysctl_handle_bool(oidp, &enabled, 0, req); + if ((error) || (req->newptr == NULL)) + return (error); + + if (enabled) + cfg->options |= option; + else + cfg->options &= ~option; + + return ixgbe_reconfig_fw_log(sc, cfg); + } + + /** + * ixgbe_sysctl_fwlog_log_resolution - Sysctl for setting log message resolution + * @oidp: sysctl oid structure + * @arg1: private softc structure + * @arg2: __unused__ + * @req: sysctl request pointer + * + * On read: displays message queue limit before posting + * On write: sets message queue limit before posting + * + * This has no effect on the legacy (V1) version of firmware logging. + */ + static int + ixgbe_sysctl_fwlog_log_resolution(SYSCTL_HANDLER_ARGS) + { + struct ixgbe_softc *sc = (struct ixgbe_softc *)arg1; + struct ixgbe_fwlog_cfg *cfg = &sc->hw.fwlog_cfg; + int error; + u8 resolution; + + UNREFERENCED_PARAMETER(arg2); + + resolution = cfg->log_resolution; + + error = sysctl_handle_8(oidp, &resolution, 0, req); + if ((error) || (req->newptr == NULL)) + return (error); + + if ((resolution < IXGBE_ACI_FW_LOG_MIN_RESOLUTION) || + (resolution > IXGBE_ACI_FW_LOG_MAX_RESOLUTION)) { + DEBUGOUT("Log resolution out-of-bounds\n"); + return (EINVAL); + } + + cfg->log_resolution = resolution; + + return ixgbe_reconfig_fw_log(sc, cfg); + } + + /** + * ixgbe_sysctl_fwlog_register - Sysctl for (de)registering firmware logs + * @oidp: sysctl oid structure + * @arg1: private softc structure + * @arg2: __unused__ + * @req: sysctl request pointer + * + * On read: displays whether firmware logging is registered + * On write: (de)registers firmware logging. + */ + static int + ixgbe_sysctl_fwlog_register(SYSCTL_HANDLER_ARGS) + { + struct ixgbe_softc *sc = (struct ixgbe_softc *)arg1; + struct ixgbe_fwlog_cfg *cfg = &sc->hw.fwlog_cfg; + int status; + int error; + u8 enabled; + + UNREFERENCED_PARAMETER(arg2); + + if (cfg->options & IXGBE_FWLOG_OPTION_IS_REGISTERED) + enabled = true; + else + enabled = false; + + error = sysctl_handle_bool(oidp, &enabled, 0, req); + if ((error) || (req->newptr == NULL)) + return (error); + + if (enabled) { + status = ixgbe_fwlog_register(&sc->hw); + if (status == IXGBE_SUCCESS) + sc->feat_en |= IXGBE_FEATURE_FW_LOGGING; + } else { + status = ixgbe_fwlog_unregister(&sc->hw); + if (status == IXGBE_SUCCESS) + sc->feat_en &= ~IXGBE_FEATURE_FW_LOGGING; + } + + if (status != IXGBE_SUCCESS) + return (EIO); + + return (0); + } + + /** + * ixgbe_log_sev_str - Convert log level to a string + * @log_level: the log level to convert + * + * Convert the u8 log level of a FW logging module into a readable + * string for outputting in a sysctl. + */ + struct ixgbe_str_buf { + char str[IXGBE_STR_BUF_LEN]; + }; + + static struct ixgbe_str_buf + _ixgbe_log_sev_str(u8 log_level) + { + struct ixgbe_str_buf buf = { .str = "" }; + const char *str = NULL; + + switch (log_level) { + case IXGBE_FWLOG_LEVEL_NONE: + str = "none"; + break; + case IXGBE_FWLOG_LEVEL_ERROR: + str = "error"; + break; + case IXGBE_FWLOG_LEVEL_WARNING: + str = "warning"; + break; + case IXGBE_FWLOG_LEVEL_NORMAL: + str = "normal"; + break; + case IXGBE_FWLOG_LEVEL_VERBOSE: + str = "verbose"; + break; + default: + break; + } + + if (str) + snprintf(buf.str, IXGBE_STR_BUF_LEN, "%s", str); + else + snprintf(buf.str, IXGBE_STR_BUF_LEN, "%u", log_level); + + return buf; + } + + #define ixgbe_log_sev_str(log_level) _ixgbe_log_sev_str(log_level).str + + /** + * ixgbe_sysctl_fwlog_module_log_severity - Add tunables for a FW logging module + * @oidp: sysctl oid structure + * @arg1: private softc structure + * @arg2: index to logging module + * @req: sysctl request pointer + */ + static int + ixgbe_sysctl_fwlog_module_log_severity(SYSCTL_HANDLER_ARGS) + { + struct ixgbe_softc *sc = (struct ixgbe_softc *)arg1; + struct ixgbe_fwlog_cfg *cfg = &sc->hw.fwlog_cfg; + struct sbuf *sbuf; + char *sev_str_end; + enum ixgbe_aci_fw_logging_mod module = (enum ixgbe_aci_fw_logging_mod)arg2; + int error, ll_num; + u8 log_level; + char sev_str[16]; + bool sev_set = false; + + log_level = cfg->module_entries[module].log_level; + sbuf = sbuf_new(NULL, sev_str, sizeof(sev_str), SBUF_FIXEDLEN); + sbuf_printf(sbuf, "%d<%s>", log_level, ixgbe_log_sev_str(log_level)); + sbuf_finish(sbuf); + sbuf_delete(sbuf); + + error = sysctl_handle_string(oidp, sev_str, sizeof(sev_str), req); + if ((error) || (req->newptr == NULL)) + return (error); + + if (strcasecmp(ixgbe_log_sev_str(IXGBE_FWLOG_LEVEL_VERBOSE), sev_str) == 0) { + log_level = IXGBE_FWLOG_LEVEL_VERBOSE; + sev_set = true; + } else if (strcasecmp(ixgbe_log_sev_str(IXGBE_FWLOG_LEVEL_NORMAL), sev_str) == 0) { + log_level = IXGBE_FWLOG_LEVEL_NORMAL; + sev_set = true; + } else if (strcasecmp(ixgbe_log_sev_str(IXGBE_FWLOG_LEVEL_WARNING), sev_str) == 0) { + log_level = IXGBE_FWLOG_LEVEL_WARNING; + sev_set = true; + } else if (strcasecmp(ixgbe_log_sev_str(IXGBE_FWLOG_LEVEL_ERROR), sev_str) == 0) { + log_level = IXGBE_FWLOG_LEVEL_ERROR; + sev_set = true; + } else if (strcasecmp(ixgbe_log_sev_str(IXGBE_FWLOG_LEVEL_NONE), sev_str) == 0) { + log_level = IXGBE_FWLOG_LEVEL_NONE; + sev_set = true; + } + *** 295 LINES SKIPPED *** From nobody Wed Apr 22 00:25:54 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0g4M0xnfz6Zy8B for ; Wed, 22 Apr 2026 00:25:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0g4L4wPYz3gKj for ; Wed, 22 Apr 2026 00:25:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776817554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9uXirDYJ9nXKhr6x1F+gmEkMwL17QV6f6b56YRWghbk=; b=DvfSuAoXL5OWD7h9kkQjJNtDzXg7f4NsDPY7gvklkpalUVFNLX5cVNowoc2NfGc5YkhbKi EUSPphVZf/TUBVmsSh2B04kVqw3UMwALstwIZozfzS7+64JwQt9s5KwoayHqVfaZgYbTF5 QBo8Nd1bfvqPuv1ExBKMLZYa8v80rDZrx17igC8Lx3NzhFeVvfcd+rxAbdSUf5VRY0P60Z e6Z0MJrJF78Mj2DTEX1Bi1V+7OdBuHAuNXCr23xctmcElr5H2usqHjApeZrd81IoGJOEwp 3IsL4CCafaagZFZa4GLXYK0QB55z0wCfjSAa9QrkTJeVYjyEbBCt340Jrln5mQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776817554; a=rsa-sha256; cv=none; b=qmeHJe9J7wHDMAPKZDoKySE2IgNN2fWoNJ7dX8ZVZ452Hn2Gq2MdFPs+kTzkwa8jSNzT3P ra6r1JvxT4aDsydaeELPnJPDambU6WDTqb2MGFAWXcbzRbWuthDd8SqBdLMDp8y6KRa9cU JiixCs+Zv97CowwDJEwDQxr6+aC+6j0SaBQLTvnW4gBn/swhjwM1dvSC9NGVp+oREUPAAz Ve+Mr0NFdRUg5THz+0BeiS9Pbgz5n0oPkuYBKMbKHHKAWDLOrd5bkfXYVsiVG+CkP4KYiM ifUQbYoHcQ9M0tPqEdH9+zEsAt0jndYOOBPZ6vvQ9yOIN2t21eCLmBgS+leMmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776817554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9uXirDYJ9nXKhr6x1F+gmEkMwL17QV6f6b56YRWghbk=; b=KLkNXDx8GtjFM0ukNbybvFSz1FOh5SbAq1f53YZAaoKfNhB6WxzhxrHV3aeG+QJjygqIJD cHNpfweFi/XXhJsbNLwmeImHvF4XM2pM7D7G0yXIIx6aIev7TubEHZ9/I4AljK86OAPE+d NkiC7tWq1r33IQVDnEUNG9pygMpwPuX/ju94Rc3/o3CXWw65j000O2RDm+n67HdHrQ3G5y LnbemigW37CzXVvr04y2vYdtKQe8qEtde5GuyG0j2VnxbSFhDy/F1tV1YkTeCpqEyQXWtn RzfdAUrXUR6/uxj/+5vakAxiSOcbs7p6Z1hYImHLFSF7Yb3FMes+XQRUibAkCQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0g4L3DR7z16LD for ; Wed, 22 Apr 2026 00:25:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1d56b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 00:25:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Ed Maste Subject: git: 901aec0a855b - stable/15 - linuxkpi: Handle bin attributes in sysfs attribute 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 901aec0a855b5c69b327e423558fbcc001781805 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 00:25:54 +0000 Message-Id: <69e81592.1d56b.77724fe1@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=901aec0a855b5c69b327e423558fbcc001781805 commit 901aec0a855b5c69b327e423558fbcc001781805 Author: Jean-Sébastien Pédron AuthorDate: 2026-02-08 10:11:39 +0000 Commit: Ed Maste CommitDate: 2026-04-22 00:25:27 +0000 linuxkpi: Handle bin attributes in sysfs attribute groups For instance, this is used by DRM drivers to declare the EDID property of an GPU output connector: sysctl -b sys.device.drmn1.card0.card0-DP-1.edid | edid-decode ... Block 0, Base EDID: EDID Structure Version & Revision: 1.4 Vendor & Product Identification: Manufacturer: SAM Model: 29814 Serial Number: 810635354 (0x3051505a) Made in: week 15 of 2025 ... Reviewed by: bz, emaste, wulf Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55176 (cherry picked from commit 5bb0f63020669bd3675c651ba7745fc4356edc1a) --- sys/compat/linuxkpi/common/include/linux/sysfs.h | 34 +++++++++++++++++------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/sysfs.h b/sys/compat/linuxkpi/common/include/linux/sysfs.h index 470c224a9778..7c8c4e2e32b9 100644 --- a/sys/compat/linuxkpi/common/include/linux/sysfs.h +++ b/sys/compat/linuxkpi/common/include/linux/sysfs.h @@ -43,13 +43,6 @@ struct sysfs_ops { size_t); }; -struct attribute_group { - const char *name; - mode_t (*is_visible)(struct kobject *, - struct attribute *, int); - struct attribute **attrs; -}; - struct bin_attribute { struct attribute attr; size_t size; @@ -59,6 +52,14 @@ struct bin_attribute { struct bin_attribute *, char *, loff_t, size_t); }; +struct attribute_group { + const char *name; + mode_t (*is_visible)(struct kobject *, + struct attribute *, int); + struct attribute **attrs; + struct bin_attribute **bin_attrs; +}; + #define __ATTR(_name, _mode, _show, _store) { \ .attr = { .name = __stringify(_name), .mode = _mode }, \ .show = _show, .store = _store, \ @@ -370,6 +371,7 @@ static inline int sysfs_create_group(struct kobject *kobj, const struct attribute_group *grp) { struct attribute **attr; + struct bin_attribute **bin_attr; struct sysctl_oid *oidp; /* Don't create the group node if grp->name is undefined. */ @@ -378,11 +380,19 @@ sysfs_create_group(struct kobject *kobj, const struct attribute_group *grp) OID_AUTO, grp->name, CTLFLAG_RD|CTLFLAG_MPSAFE, NULL, grp->name); else oidp = kobj->oidp; - for (attr = grp->attrs; *attr != NULL; attr++) { + for (attr = grp->attrs; attr != NULL && *attr != NULL; attr++) { SYSCTL_ADD_OID(NULL, SYSCTL_CHILDREN(oidp), OID_AUTO, (*attr)->name, CTLTYPE_STRING|CTLFLAG_RW|CTLFLAG_MPSAFE, kobj, (uintptr_t)*attr, sysctl_handle_attr, "A", ""); } + for (bin_attr = grp->bin_attrs; + bin_attr != NULL && *bin_attr != NULL; + bin_attr++) { + SYSCTL_ADD_OID(NULL, SYSCTL_CHILDREN(oidp), OID_AUTO, + (*bin_attr)->attr.name, + CTLTYPE_OPAQUE|CTLFLAG_RW|CTLFLAG_MPSAFE, + kobj, (uintptr_t)*bin_attr, sysctl_handle_bin_attr, "", ""); + } return (0); } @@ -434,14 +444,20 @@ static inline void sysfs_unmerge_group(struct kobject *kobj, const struct attribute_group *grp) { struct attribute **attr; + struct bin_attribute **bin_attr; struct sysctl_oid *oidp; SYSCTL_FOREACH(oidp, SYSCTL_CHILDREN(kobj->oidp)) { if (strcmp(oidp->oid_name, grp->name) != 0) continue; - for (attr = grp->attrs; *attr != NULL; attr++) { + for (attr = grp->attrs; attr != NULL && *attr != NULL; attr++) { sysctl_remove_name(oidp, (*attr)->name, 1, 1); } + for (bin_attr = grp->bin_attrs; + bin_attr != NULL && *bin_attr != NULL; + bin_attr++) { + sysctl_remove_name(oidp, (*bin_attr)->attr.name, 1, 1); + } } } From nobody Wed Apr 22 08:07:53 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0sKQ2MdKz6bhyK for ; Wed, 22 Apr 2026 08:07:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0sKQ0V7mz3Zl7 for ; Wed, 22 Apr 2026 08:07:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776845274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qfwi6TDKmTrCcoOM40JF0ri74tsDhcRX3csbeCNRHnU=; b=Clpaa4IoKUskxAKJBY6+uCkj9Kl4BK4r9Z2XewdbkfLskD3l36EzU5mUe9j7LZUSvm2HK3 whitO5Kr33o27NWYge1D+lMfb8bgvbfm4QUVkpvWVEhIbLSGJFfowF9akkuoeFEeDiw970 QuxZ83mC3KNd3vTciXPCJhD+jq3noJNCOQB2eyLoTyLWQOfkmAHBZ1y9DlFcMaGAA7/+9D 4+FzKjHnrqWWoZtY/CKUd7M8q0SzgxBqDB5bsfbXxjnSyWH6eYdcR9wKdf9fhxDKC5252X cYCkRR6do2382P/dF4xC796+/rilLE0iV0ehG1pcxjR4t4nBUbKPHULrx05PJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776845274; a=rsa-sha256; cv=none; b=rZe/DUqD9Nz++eB/EUoHVCZQMz5nOKdmInp7j+Aq3+4WQNmKgW3vKl2mNCi9T1mrbilldR UT72v2M+U7w1H0RVM15+XprXD2PT6VIBYtmpchbJFsMwK6V8j1vylufArE6iHQlX0chEjP wJT9Ps4GV10XEJRSyTEpdjBFn9q6YoZRBForvVzFYOvuMNOyaOY0xzklrrfmxZH+yMTk0P /L54z9Vjf+cPjrys54QpuqyiDi4fnYoXdb0WImaBNWP+FxhRvLxKxOnkTT7RLnHDOIa4pW FYLEDAHPSSAHJ0cRPQBrctVCvgAEWjXuBz2Pl9kV+sG/vCNvfZRFE+J+D5cgLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776845274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qfwi6TDKmTrCcoOM40JF0ri74tsDhcRX3csbeCNRHnU=; b=mQs1INHc5aYz1IVaOOVLrybEoS1LiNjJqhRkkMmaJHlHk7I1ll4Ckyd7CUVOTRkQpiVF0K dtY5HwZbK8YDAyFXzvdolbh4rFhZZ1fZWDr0DGJv+D58T8OO/wYlt1c9HsaMrC8IjrgEzr tG+6HubUgGdP6h8xUC/Ms8+Sv5V23kDFG5jbE61ND7V6k9oO9fiSZgJ974u5KmRKerUQf+ nixxuqLv7CGpnxNfD3LRuj/iQqqV+eY2yjqHUpBlpBdrR8QeZDL42dSlZYdEaBvsot629+ 4ouH2ilIPZRtaHAlaKFHDVWIpZ1rdOJhfBh2/WydfOSACjEv+RMDRh68PxuU1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0sKQ056Qz6Vk for ; Wed, 22 Apr 2026 08:07:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2673b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 08:07:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Salychev Subject: git: f241c07ca87c - stable/15 - dpaa2: Extract frame-specific routines to dpaa2_frame.[h,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: dsl X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f241c07ca87c58ffb36b5069c6e2f1381d5ef9bc Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 08:07:53 +0000 Message-Id: <69e881d9.2673b.1d8b687e@gitrepo.freebsd.org> The branch stable/15 has been updated by dsl: URL: https://cgit.FreeBSD.org/src/commit/?id=f241c07ca87c58ffb36b5069c6e2f1381d5ef9bc commit f241c07ca87c58ffb36b5069c6e2f1381d5ef9bc Author: Dmitry Salychev AuthorDate: 2026-01-25 16:53:57 +0000 Commit: Dmitry Salychev CommitDate: 2026-04-22 08:06:12 +0000 dpaa2: Extract frame-specific routines to dpaa2_frame.[h,c] As soon as we need information from the hardware frame annotation to make sure that checksums of the ingress frames were verified by the DPAA2 HW, I've decided to make a preparation and extracted all of the frame related routines into the separate dpaa2_frame.[h,c] along with some clean up and improvements, e.g. no more dpaa2_fa, but dpaa2_swa and dpaa2_hwa structures to describe software and hardware frame annotations respectively, dpaa2_fa_get_swa/dpaa2_fa_get_hwa to obtain those annotations from the frame descriptor. The next step is to implement dpaa2_fa_get_hwa. PR: 292006 Approved by: tuexen MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56315 (cherry picked from commit 8e994533806d8aa0ae4582a52d811ede2b19bb26) --- sys/conf/files.arm64 | 1 + sys/dev/dpaa2/dpaa2_buf.c | 9 +- sys/dev/dpaa2/dpaa2_buf.h | 2 + sys/dev/dpaa2/dpaa2_frame.c | 165 ++++++++++++++++++++++++++++++++++ sys/dev/dpaa2/dpaa2_frame.h | 174 ++++++++++++++++++++++++++++++++++++ sys/dev/dpaa2/dpaa2_ni.c | 210 ++++++++++++++------------------------------ sys/dev/dpaa2/dpaa2_ni.h | 3 +- sys/dev/dpaa2/dpaa2_swp.h | 51 +---------- sys/dev/dpaa2/dpaa2_types.h | 5 ++ sys/modules/dpaa2/Makefile | 1 + 10 files changed, 420 insertions(+), 201 deletions(-) diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 0ae122332e1f..df64e812716e 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -255,6 +255,7 @@ dev/dpaa2/dpaa2_channel.c optional soc_nxp_ls dpaa2 dev/dpaa2/dpaa2_cmd_if.m optional soc_nxp_ls dpaa2 dev/dpaa2/dpaa2_con.c optional soc_nxp_ls dpaa2 dev/dpaa2/dpaa2_console.c optional soc_nxp_ls dpaa2 fdt +dev/dpaa2/dpaa2_frame.c optional soc_nxp_ls dpaa2 dev/dpaa2/dpaa2_io.c optional soc_nxp_ls dpaa2 dev/dpaa2/dpaa2_mac.c optional soc_nxp_ls dpaa2 dev/dpaa2/dpaa2_mc.c optional soc_nxp_ls dpaa2 diff --git a/sys/dev/dpaa2/dpaa2_buf.c b/sys/dev/dpaa2/dpaa2_buf.c index 8505b074fe4f..228e4448210d 100644 --- a/sys/dev/dpaa2/dpaa2_buf.c +++ b/sys/dev/dpaa2/dpaa2_buf.c @@ -42,6 +42,7 @@ #include "dpaa2_swp.h" #include "dpaa2_swp_if.h" #include "dpaa2_ni.h" +#include "dpaa2_frame.h" MALLOC_DEFINE(M_DPAA2_RXB, "dpaa2_rxb", "DPAA2 DMA-mapped buffer (Rx)"); @@ -129,7 +130,7 @@ dpaa2_buf_seed_rxb(device_t dev, struct dpaa2_buf *buf, int size, struct mtx *dma_mtx) { struct dpaa2_ni_softc *sc = device_get_softc(dev); - struct dpaa2_fa *fa; + struct dpaa2_swa *swa; bool map_created = false; bool mbuf_alloc = false; int error; @@ -179,9 +180,9 @@ dpaa2_buf_seed_rxb(device_t dev, struct dpaa2_buf *buf, int size, buf->vaddr = buf->m->m_data; /* Populate frame annotation for future use */ - fa = (struct dpaa2_fa *)buf->vaddr; - fa->magic = DPAA2_MAGIC; - fa->buf = buf; + swa = (struct dpaa2_swa *)buf->vaddr; + swa->magic = DPAA2_MAGIC; + swa->buf = buf; bus_dmamap_sync(buf->dmat, buf->dmap, BUS_DMASYNC_PREREAD); diff --git a/sys/dev/dpaa2/dpaa2_buf.h b/sys/dev/dpaa2/dpaa2_buf.h index 853a4fa78d3a..16ea7e1905ac 100644 --- a/sys/dev/dpaa2/dpaa2_buf.h +++ b/sys/dev/dpaa2/dpaa2_buf.h @@ -33,6 +33,8 @@ #include #include #include +#include +#include #include diff --git a/sys/dev/dpaa2/dpaa2_frame.c b/sys/dev/dpaa2/dpaa2_frame.c new file mode 100644 index 000000000000..4a155f7cb32f --- /dev/null +++ b/sys/dev/dpaa2/dpaa2_frame.c @@ -0,0 +1,165 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright © 2026 Dmitry Salychev + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#include +#include + +#include +#include + +#include + +#include "dpaa2_types.h" +#include "dpaa2_frame.h" +#include "dpaa2_buf.h" +#include "dpaa2_swp.h" + +/** + * @brief Build a DPAA2 frame descriptor. + */ +int +dpaa2_fd_build(device_t dev, const uint16_t tx_data_off, struct dpaa2_buf *buf, + bus_dma_segment_t *segs, const int nsegs, struct dpaa2_fd *fd) +{ + struct dpaa2_buf *sgt = buf->sgt; + struct dpaa2_sg_entry *sge; + struct dpaa2_swa *swa; + int i, error; + + if (buf == NULL || segs == NULL || nsegs == 0 || fd == NULL) + return (EINVAL); + + KASSERT(nsegs <= DPAA2_TX_SEGLIMIT, ("%s: too many segments", __func__)); + KASSERT(buf->opt != NULL, ("%s: no Tx ring?", __func__)); + KASSERT(sgt != NULL, ("%s: no S/G table?", __func__)); + KASSERT(sgt->vaddr != NULL, ("%s: no S/G vaddr?", __func__)); + + memset(fd, 0, sizeof(*fd)); + + /* Populate and map S/G table */ + if (__predict_true(nsegs <= DPAA2_TX_SEGLIMIT)) { + sge = (struct dpaa2_sg_entry *)sgt->vaddr + tx_data_off; + for (i = 0; i < nsegs; i++) { + sge[i].addr = (uint64_t)segs[i].ds_addr; + sge[i].len = (uint32_t)segs[i].ds_len; + sge[i].offset_fmt = 0u; + } + sge[i-1].offset_fmt |= 0x8000u; /* set final entry flag */ + + KASSERT(sgt->paddr == 0, ("%s: paddr(%#jx) != 0", __func__, + sgt->paddr)); + + error = bus_dmamap_load(sgt->dmat, sgt->dmap, sgt->vaddr, + DPAA2_TX_SGT_SZ, dpaa2_dmamap_oneseg_cb, &sgt->paddr, + BUS_DMA_NOWAIT); + if (__predict_false(error != 0)) { + device_printf(dev, "%s: bus_dmamap_load() failed: " + "error=%d\n", __func__, error); + return (error); + } + + buf->paddr = sgt->paddr; + buf->vaddr = sgt->vaddr; + } else { + return (EINVAL); + } + + swa = (struct dpaa2_swa *)sgt->vaddr; + swa->magic = DPAA2_MAGIC; + swa->buf = buf; + + fd->addr = buf->paddr; + fd->data_length = (uint32_t)buf->m->m_pkthdr.len; + fd->bpid_ivp_bmt = 0; + fd->offset_fmt_sl = 0x2000u | tx_data_off; + fd->ctrl = (0x4u & DPAA2_FD_PTAC_MASK) << DPAA2_FD_PTAC_SHIFT; + + return (0); +} + +int +dpaa2_fd_err(struct dpaa2_fd *fd) +{ + return ((fd->ctrl >> DPAA2_FD_ERR_SHIFT) & DPAA2_FD_ERR_MASK); +} + +uint32_t +dpaa2_fd_data_len(struct dpaa2_fd *fd) +{ + if (dpaa2_fd_short_len(fd)) { + return (fd->data_length & DPAA2_FD_LEN_MASK); + } + return (fd->data_length); +} + +int +dpaa2_fd_format(struct dpaa2_fd *fd) +{ + return ((enum dpaa2_fd_format)((fd->offset_fmt_sl >> + DPAA2_FD_FMT_SHIFT) & DPAA2_FD_FMT_MASK)); +} + +bool +dpaa2_fd_short_len(struct dpaa2_fd *fd) +{ + return (((fd->offset_fmt_sl >> DPAA2_FD_SL_SHIFT) + & DPAA2_FD_SL_MASK) == 1); +} + +int +dpaa2_fd_offset(struct dpaa2_fd *fd) +{ + return (fd->offset_fmt_sl & DPAA2_FD_OFFSET_MASK); +} + +int +dpaa2_fa_get_swa(struct dpaa2_fd *fd, struct dpaa2_swa **swa) +{ + int rc; + + if (fd == NULL || swa == NULL) + return (EINVAL); + + if (((fd->ctrl >> DPAA2_FD_PTAC_SHIFT) & DPAA2_FD_PTAC_MASK) >= 0x4u) { + *swa = (struct dpaa2_swa *)PHYS_TO_DMAP((bus_addr_t)fd->addr); + rc = 0; + } else { + *swa = NULL; + rc = ENOENT; + } + + return (rc); +} + +int +dpaa2_fa_get_hwa(struct dpaa2_fd *fd, struct dpaa2_hwa **hwa) +{ + /* TODO: To be implemented next. */ + return (ENOENT); +} diff --git a/sys/dev/dpaa2/dpaa2_frame.h b/sys/dev/dpaa2/dpaa2_frame.h new file mode 100644 index 000000000000..0b2a5a7d8e74 --- /dev/null +++ b/sys/dev/dpaa2/dpaa2_frame.h @@ -0,0 +1,174 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright © 2026 Dmitry Salychev + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _DPAA2_FRAME_H +#define _DPAA2_FRAME_H + +#include +#include +#include + +#include "dpaa2_types.h" +#include "dpaa2_buf.h" + +/* + * Helper routines for the DPAA2 frames (e.g. descriptors, software/hardware + * annotations, etc.). + */ + +/* + * DPAA2 frame descriptor size, field offsets and masks. + * + * See 3.1.1 Frame descriptor format, + * 4.2.1.2.2 Structure of Frame Descriptors (FDs), + * LX2160A DPAA2 Low-Level Hardware Reference Manual, Rev. 0, 06/2020 + */ +#define DPAA2_FD_SIZE 32u +#define DPAA2_FD_FMT_MASK (0x3u) +#define DPAA2_FD_FMT_SHIFT (12) +#define DPAA2_FD_ERR_MASK (0xFFu) +#define DPAA2_FD_ERR_SHIFT (0) +#define DPAA2_FD_SL_MASK (0x1u) +#define DPAA2_FD_SL_SHIFT (14) +#define DPAA2_FD_LEN_MASK (0x3FFFFu) +#define DPAA2_FD_OFFSET_MASK (0x0FFFu) +#define DPAA2_FD_PTAC_MASK (0x7u) +#define DPAA2_FD_PTAC_SHIFT (21) + +/* + * DPAA2 frame annotation sizes + * + * NOTE: Accelerator-specific (HWA) annotation length is described in the 64-byte + * units by the FD[ASAL] bits and can be as big as 960 bytes. Current + * values describe what is actually supported by the DPAA2 drivers. + * + * See 3.1.1 Frame descriptor format, + * LX2160A DPAA2 Low-Level Hardware Reference Manual, Rev. 0 + */ +#define DPAA2_FA_SIZE 192u /* DPAA2 frame annotation */ +#define DPAA2_FA_SWA_SIZE 64u /* SW frame annotation */ +#define DPAA2_FA_HWA_SIZE 128u /* HW frame annotation */ +#define DPAA2_FA_WRIOP_SIZE 128u /* WRIOP HW annotation */ + +/** + * @brief DPAA2 frame descriptor. + * + * addr: Memory address of the start of the buffer holding the + * frame data or the buffer containing the scatter/gather + * list. + * data_length: Length of the frame data (in bytes). + * bpid_ivp_bmt: Buffer pool ID (14 bit + BMT bit + IVP bit) + * offset_fmt_sl: Frame data offset, frame format and short-length fields. + * frame_ctx: Frame context. This field allows the sender of a frame + * to communicate some out-of-band information to the + * receiver of the frame. + * ctrl: Control bits (ERR, CBMT, ASAL, PTAC, DROPP, SC, DD). + * flow_ctx: Frame flow context. Associates the frame with a flow + * structure. QMan may use the FLC field for 3 purposes: + * stashing control, order definition point identification, + * and enqueue replication control. + * + * See 3.1.1 Frame descriptor format, + * 4.2.1.2.2 Structure of Frame Descriptors (FDs), + * LX2160A DPAA2 Low-Level Hardware Reference Manual, Rev. 0, 06/2020 + */ +struct dpaa2_fd { + uint64_t addr; + uint32_t data_length; + uint16_t bpid_ivp_bmt; + uint16_t offset_fmt_sl; + uint32_t frame_ctx; + uint32_t ctrl; + uint64_t flow_ctx; +} __packed; +CTASSERT(sizeof(struct dpaa2_fd) == DPAA2_FD_SIZE); + +/** + * @brief WRIOP hardware frame annotation. + * + * See 7.34.2 WRIOP hardware frame annotation (FA), + * LX2160A DPAA2 Low-Level Hardware Reference Manual, Rev. 0, 06/2020 + */ +struct dpaa2_hwa_wriop { + union { + struct { + uint64_t fas; + uint64_t timestamp; + /* XXX-DSL: more to add here... */ + } __packed; + uint8_t raw[128]; + }; +} __packed; +CTASSERT(sizeof(struct dpaa2_hwa_wriop) == DPAA2_FA_WRIOP_SIZE); + +/** + * @brief DPAA2 hardware frame annotation (accelerator-specific annotation). + * + * See 3.4.1.2 Accelerator-specific annotation, + * LX2160A DPAA2 Low-Level Hardware Reference Manual, Rev. 0, 06/2020 + */ +struct dpaa2_hwa { + union { + struct dpaa2_hwa_wriop wriop; + }; +} __packed; +CTASSERT(sizeof(struct dpaa2_hwa) == DPAA2_FA_HWA_SIZE); + +/** + * @brief DPAA2 software frame annotation (pass-through annotation). + * + * See 3.4.1.1 Pass-through annotation, + * LX2160A DPAA2 Low-Level Hardware Reference Manual, Rev. 0, 06/2020 + */ +struct dpaa2_swa { + union { + struct { + uint32_t magic; + struct dpaa2_buf *buf; + }; + struct { + uint8_t pta1[32]; + uint8_t pta2[32]; + }; + uint8_t raw[64]; + }; +} __packed; +CTASSERT(sizeof(struct dpaa2_swa) == DPAA2_FA_SWA_SIZE); + +int dpaa2_fd_build(device_t, const uint16_t, struct dpaa2_buf *, + bus_dma_segment_t *, const int, struct dpaa2_fd *); + +int dpaa2_fd_err(struct dpaa2_fd *); +uint32_t dpaa2_fd_data_len(struct dpaa2_fd *); +int dpaa2_fd_format(struct dpaa2_fd *); +bool dpaa2_fd_short_len(struct dpaa2_fd *); +int dpaa2_fd_offset(struct dpaa2_fd *); + +int dpaa2_fa_get_swa(struct dpaa2_fd *, struct dpaa2_swa **); +int dpaa2_fa_get_hwa(struct dpaa2_fd *, struct dpaa2_hwa **); + +#endif /* _DPAA2_FRAME_H */ diff --git a/sys/dev/dpaa2/dpaa2_ni.c b/sys/dev/dpaa2/dpaa2_ni.c index 9389c6fff31a..f173bff6e65f 100644 --- a/sys/dev/dpaa2/dpaa2_ni.c +++ b/sys/dev/dpaa2/dpaa2_ni.c @@ -96,6 +96,7 @@ #include "dpaa2_ni.h" #include "dpaa2_channel.h" #include "dpaa2_buf.h" +#include "dpaa2_frame.h" #define BIT(x) (1ul << (x)) #define WRIOP_VERSION(x, y, z) ((x) << 10 | (y) << 5 | (z) << 0) @@ -156,10 +157,6 @@ MALLOC_DEFINE(M_DPAA2_TXB, "dpaa2_txb", "DPAA2 DMA-mapped buffer (Tx)"); #define DPAA2_RX_BUFRING_SZ (4096u) #define DPAA2_RXE_BUFRING_SZ (1024u) #define DPAA2_TXC_BUFRING_SZ (4096u) -#define DPAA2_TX_SEGLIMIT (16u) /* arbitrary number */ -#define DPAA2_TX_SEG_SZ (PAGE_SIZE) -#define DPAA2_TX_SEGS_MAXSZ (DPAA2_TX_SEGLIMIT * DPAA2_TX_SEG_SZ) -#define DPAA2_TX_SGT_SZ (PAGE_SIZE) /* bytes */ /* Size of a buffer to keep a QoS table key configuration. */ #define ETH_QOS_KCFG_BUF_SIZE (PAGE_SIZE) @@ -186,15 +183,6 @@ MALLOC_DEFINE(M_DPAA2_TXB, "dpaa2_txb", "DPAA2 DMA-mapped buffer (Tx)"); #define DPAA2_NI_TXBUF_IDX_MASK (0xFFu) #define DPAA2_NI_TXBUF_IDX_SHIFT (49) -#define DPAA2_NI_FD_FMT_MASK (0x3u) -#define DPAA2_NI_FD_FMT_SHIFT (12) -#define DPAA2_NI_FD_ERR_MASK (0xFFu) -#define DPAA2_NI_FD_ERR_SHIFT (0) -#define DPAA2_NI_FD_SL_MASK (0x1u) -#define DPAA2_NI_FD_SL_SHIFT (14) -#define DPAA2_NI_FD_LEN_MASK (0x3FFFFu) -#define DPAA2_NI_FD_OFFSET_MASK (0x0FFFu) - /* Enables TCAM for Flow Steering and QoS look-ups. */ #define DPNI_OPT_HAS_KEY_MASKING 0x10 @@ -421,15 +409,6 @@ static int dpaa2_ni_set_mac_addr(device_t); static int dpaa2_ni_set_hash(device_t, uint64_t); static int dpaa2_ni_set_dist_key(device_t, enum dpaa2_ni_dist_mode, uint64_t); -/* Frame descriptor routines */ -static int dpaa2_ni_build_fd(struct dpaa2_ni_softc *, struct dpaa2_ni_tx_ring *, - struct dpaa2_buf *, bus_dma_segment_t *, int, struct dpaa2_fd *); -static int dpaa2_ni_fd_err(struct dpaa2_fd *); -static uint32_t dpaa2_ni_fd_data_len(struct dpaa2_fd *); -static int dpaa2_ni_fd_format(struct dpaa2_fd *); -static bool dpaa2_ni_fd_short_len(struct dpaa2_fd *); -static int dpaa2_ni_fd_offset(struct dpaa2_fd *); - /* Various subroutines */ static int dpaa2_ni_cmp_api_version(struct dpaa2_ni_softc *, uint16_t, uint16_t); static int dpaa2_ni_prepare_key_cfg(struct dpkg_profile_cfg *, uint8_t *); @@ -2998,13 +2977,14 @@ dpaa2_ni_tx(struct dpaa2_ni_softc *sc, struct dpaa2_channel *ch, } } - error = dpaa2_ni_build_fd(sc, tx, buf, segs, nsegs, &fd); + error = dpaa2_fd_build(dev, sc->tx_data_off, buf, segs, nsegs, &fd); if (__predict_false(error != 0)) { device_printf(dev, "%s: failed to build frame descriptor: " "error=%d\n", __func__, error); fq->chan->tx_dropped++; goto err_unload; - } + } else + sc->tx_sg_frames++; /* for sysctl(9) */ bus_dmamap_sync(buf->dmat, buf->dmap, BUS_DMASYNC_PREWRITE); bus_dmamap_sync(sgt->dmat, sgt->dmap, BUS_DMASYNC_PREWRITE); @@ -3127,14 +3107,14 @@ dpaa2_ni_consume_frames(struct dpaa2_channel *chan, struct dpaa2_ni_fq **src, * @brief Receive frames. */ static int -dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, struct dpaa2_fd *fd, - struct dpaa2_ni_rx_ctx *ctx) +dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, + struct dpaa2_fd *fd, struct dpaa2_ni_rx_ctx *ctx) { - bus_addr_t paddr = (bus_addr_t)fd->addr; - struct dpaa2_fa *fa = (struct dpaa2_fa *)PHYS_TO_DMAP(paddr); - struct dpaa2_buf *buf = fa->buf; - struct dpaa2_channel *bch = (struct dpaa2_channel *)buf->opt; - struct dpaa2_ni_softc *sc = device_get_softc(bch->ni_dev); + bus_addr_t paddr; + struct dpaa2_swa *swa; + struct dpaa2_buf *buf; + struct dpaa2_channel *bch; + struct dpaa2_ni_softc *sc; struct dpaa2_bp_softc *bpsc; struct mbuf *m; device_t bpdev; @@ -3142,7 +3122,17 @@ dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, struct dpaa2_fd *f void *buf_data; int buf_len, error, released_n = 0; - KASSERT(fa->magic == DPAA2_MAGIC, ("%s: wrong magic", __func__)); + error = dpaa2_fa_get_swa(fd, &swa); + if (__predict_false(error != 0)) + panic("%s: frame has no software annotation: error=%d", + __func__, error); + + paddr = (bus_addr_t)fd->addr; + buf = swa->buf; + bch = (struct dpaa2_channel *)buf->opt; + sc = device_get_softc(bch->ni_dev); + + KASSERT(swa->magic == DPAA2_MAGIC, ("%s: wrong magic", __func__)); /* * NOTE: Current channel might not be the same as the "buffer" channel * and it's fine. It must not be NULL though. @@ -3154,7 +3144,7 @@ dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, struct dpaa2_fd *f __func__, paddr, buf->paddr); } - switch (dpaa2_ni_fd_err(fd)) { + switch (dpaa2_fd_err(fd)) { case 1: /* Enqueue rejected by QMan */ sc->rx_enq_rej_frames++; break; @@ -3164,7 +3154,7 @@ dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, struct dpaa2_fd *f default: break; } - switch (dpaa2_ni_fd_format(fd)) { + switch (dpaa2_fd_format(fd)) { case DPAA2_FD_SINGLE: sc->rx_single_buf_frames++; break; @@ -3180,9 +3170,11 @@ dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, struct dpaa2_fd *f bus_dmamap_sync(buf->dmat, buf->dmap, BUS_DMASYNC_POSTREAD); bus_dmamap_unload(buf->dmat, buf->dmap); + m = buf->m; - buf_len = dpaa2_ni_fd_data_len(fd); - buf_data = (uint8_t *)buf->vaddr + dpaa2_ni_fd_offset(fd); + buf_len = dpaa2_fd_data_len(fd); + buf_data = (uint8_t *)buf->vaddr + dpaa2_fd_offset(fd); + /* Prepare buffer to be re-cycled */ buf->m = NULL; buf->paddr = 0; @@ -3269,16 +3261,26 @@ static int dpaa2_ni_rx_err(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, struct dpaa2_fd *fd) { - bus_addr_t paddr = (bus_addr_t)fd->addr; - struct dpaa2_fa *fa = (struct dpaa2_fa *)PHYS_TO_DMAP(paddr); - struct dpaa2_buf *buf = fa->buf; - struct dpaa2_channel *bch = (struct dpaa2_channel *)buf->opt; - struct dpaa2_ni_softc *sc = device_get_softc(bch->ni_dev); + bus_addr_t paddr; + struct dpaa2_swa *swa; + struct dpaa2_buf *buf; + struct dpaa2_channel *bch; + struct dpaa2_ni_softc *sc; device_t bpdev; struct dpaa2_bp_softc *bpsc; int error; - KASSERT(fa->magic == DPAA2_MAGIC, ("%s: wrong magic", __func__)); + error = dpaa2_fa_get_swa(fd, &swa); + if (__predict_false(error != 0)) + panic("%s: frame has no software annotation: error=%d", + __func__, error); + + paddr = (bus_addr_t)fd->addr; + buf = swa->buf; + bch = (struct dpaa2_channel *)buf->opt; + sc = device_get_softc(bch->ni_dev); + + KASSERT(swa->magic == DPAA2_MAGIC, ("%s: wrong magic", __func__)); /* * NOTE: Current channel might not be the same as the "buffer" channel * and it's fine. It must not be NULL though. @@ -3312,14 +3314,26 @@ static int dpaa2_ni_tx_conf(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, struct dpaa2_fd *fd) { - bus_addr_t paddr = (bus_addr_t)fd->addr; - struct dpaa2_fa *fa = (struct dpaa2_fa *)PHYS_TO_DMAP(paddr); - struct dpaa2_buf *buf = fa->buf; - struct dpaa2_buf *sgt = buf->sgt; - struct dpaa2_ni_tx_ring *tx = (struct dpaa2_ni_tx_ring *)buf->opt; - struct dpaa2_channel *bch = tx->fq->chan; - - KASSERT(fa->magic == DPAA2_MAGIC, ("%s: wrong magic", __func__)); + bus_addr_t paddr; + struct dpaa2_swa *swa; + struct dpaa2_buf *buf; + struct dpaa2_buf *sgt; + struct dpaa2_ni_tx_ring *tx; + struct dpaa2_channel *bch; + int error; + + error = dpaa2_fa_get_swa(fd, &swa); + if (__predict_false(error != 0)) + panic("%s: frame has no software annotation: error=%d", + __func__, error); + + paddr = (bus_addr_t)fd->addr; + buf = swa->buf; + sgt = buf->sgt; + tx = (struct dpaa2_ni_tx_ring *)buf->opt; + bch = tx->fq->chan; + + KASSERT(swa->magic == DPAA2_MAGIC, ("%s: wrong magic", __func__)); KASSERT(tx != NULL, ("%s: Tx ring is NULL", __func__)); KASSERT(sgt != NULL, ("%s: S/G table is NULL", __func__)); /* @@ -3367,102 +3381,6 @@ dpaa2_ni_cmp_api_version(struct dpaa2_ni_softc *sc, uint16_t major, return sc->api_major - major; } -/** - * @brief Build a DPAA2 frame descriptor. - */ -static int -dpaa2_ni_build_fd(struct dpaa2_ni_softc *sc, struct dpaa2_ni_tx_ring *tx, - struct dpaa2_buf *buf, bus_dma_segment_t *segs, int nsegs, struct dpaa2_fd *fd) -{ - struct dpaa2_buf *sgt = buf->sgt; - struct dpaa2_sg_entry *sge; - struct dpaa2_fa *fa; - int i, error; - - KASSERT(nsegs <= DPAA2_TX_SEGLIMIT, ("%s: too many segments", __func__)); - KASSERT(buf->opt != NULL, ("%s: no Tx ring?", __func__)); - KASSERT(sgt != NULL, ("%s: no S/G table?", __func__)); - KASSERT(sgt->vaddr != NULL, ("%s: no S/G vaddr?", __func__)); - - memset(fd, 0, sizeof(*fd)); - - /* Populate and map S/G table */ - if (__predict_true(nsegs <= DPAA2_TX_SEGLIMIT)) { - sge = (struct dpaa2_sg_entry *)sgt->vaddr + sc->tx_data_off; - for (i = 0; i < nsegs; i++) { - sge[i].addr = (uint64_t)segs[i].ds_addr; - sge[i].len = (uint32_t)segs[i].ds_len; - sge[i].offset_fmt = 0u; - } - sge[i-1].offset_fmt |= 0x8000u; /* set final entry flag */ - - KASSERT(sgt->paddr == 0, ("%s: paddr(%#jx) != 0", __func__, - sgt->paddr)); - - error = bus_dmamap_load(sgt->dmat, sgt->dmap, sgt->vaddr, - DPAA2_TX_SGT_SZ, dpaa2_dmamap_oneseg_cb, &sgt->paddr, - BUS_DMA_NOWAIT); - if (__predict_false(error != 0)) { - device_printf(sc->dev, "%s: bus_dmamap_load() failed: " - "error=%d\n", __func__, error); - return (error); - } - - buf->paddr = sgt->paddr; - buf->vaddr = sgt->vaddr; - sc->tx_sg_frames++; /* for sysctl(9) */ - } else { - return (EINVAL); - } - - fa = (struct dpaa2_fa *)sgt->vaddr; - fa->magic = DPAA2_MAGIC; - fa->buf = buf; - - fd->addr = buf->paddr; - fd->data_length = (uint32_t)buf->m->m_pkthdr.len; - fd->bpid_ivp_bmt = 0; - fd->offset_fmt_sl = 0x2000u | sc->tx_data_off; - fd->ctrl = 0x00800000u; - - return (0); -} - -static int -dpaa2_ni_fd_err(struct dpaa2_fd *fd) -{ - return ((fd->ctrl >> DPAA2_NI_FD_ERR_SHIFT) & DPAA2_NI_FD_ERR_MASK); -} - -static uint32_t -dpaa2_ni_fd_data_len(struct dpaa2_fd *fd) -{ - if (dpaa2_ni_fd_short_len(fd)) { - return (fd->data_length & DPAA2_NI_FD_LEN_MASK); - } - return (fd->data_length); -} - -static int -dpaa2_ni_fd_format(struct dpaa2_fd *fd) -{ - return ((enum dpaa2_fd_format)((fd->offset_fmt_sl >> - DPAA2_NI_FD_FMT_SHIFT) & DPAA2_NI_FD_FMT_MASK)); -} - -static bool -dpaa2_ni_fd_short_len(struct dpaa2_fd *fd) -{ - return (((fd->offset_fmt_sl >> DPAA2_NI_FD_SL_SHIFT) - & DPAA2_NI_FD_SL_MASK) == 1); -} - -static int -dpaa2_ni_fd_offset(struct dpaa2_fd *fd) -{ - return (fd->offset_fmt_sl & DPAA2_NI_FD_OFFSET_MASK); -} - /** * @brief Collect statistics of the network interface. */ diff --git a/sys/dev/dpaa2/dpaa2_ni.h b/sys/dev/dpaa2/dpaa2_ni.h index 6fb0673fac09..fcd37501ebd0 100644 --- a/sys/dev/dpaa2/dpaa2_ni.h +++ b/sys/dev/dpaa2/dpaa2_ni.h @@ -490,8 +490,9 @@ struct dpaa2_ni_softc { struct dpaa2_channel *channels[DPAA2_MAX_CHANNELS]; struct dpaa2_ni_fq rxe_queue; /* one per DPNI */ + /* sysctl(9) */ struct dpaa2_atomic buf_num; - struct dpaa2_atomic buf_free; /* for sysctl(9) only */ + struct dpaa2_atomic buf_free; int irq_rid[DPAA2_NI_MSI_COUNT]; struct resource *irq_res; diff --git a/sys/dev/dpaa2/dpaa2_swp.h b/sys/dev/dpaa2/dpaa2_swp.h index 1b1383b4241f..20980c6b71b7 100644 --- a/sys/dev/dpaa2/dpaa2_swp.h +++ b/sys/dev/dpaa2/dpaa2_swp.h @@ -35,6 +35,7 @@ #include "dpaa2_types.h" #include "dpaa2_buf.h" #include "dpaa2_bp.h" +#include "dpaa2_frame.h" /* * DPAA2 QBMan software portal. @@ -200,10 +201,8 @@ #define DPAA2_EQ_DESC_SIZE 32u /* Enqueue Command Descriptor */ #define DPAA2_FDR_DESC_SIZE 32u /* Descriptor of the FDR */ -#define DPAA2_FD_SIZE 32u /* Frame Descriptor */ #define DPAA2_FDR_SIZE 64u /* Frame Dequeue Response */ #define DPAA2_SCN_SIZE 16u /* State Change Notification */ -#define DPAA2_FA_SIZE 64u /* SW Frame Annotation */ #define DPAA2_SGE_SIZE 16u /* S/G table entry */ #define DPAA2_DQ_SIZE 64u /* Dequeue Response */ #define DPAA2_SWP_CMD_SIZE 64u /* SWP Command */ @@ -284,54 +283,6 @@ struct dpaa2_scn { } __packed; CTASSERT(sizeof(struct dpaa2_scn) == DPAA2_SCN_SIZE); -/** - * @brief DPAA2 frame descriptor. - * - * addr: Memory address of the start of the buffer holding the - * frame data or the buffer containing the scatter/gather - * list. - * data_length: Length of the frame data (in bytes). - * bpid_ivp_bmt: Buffer pool ID (14 bit + BMT bit + IVP bit) - * offset_fmt_sl: Frame data offset, frame format and short-length fields. - * frame_ctx: Frame context. This field allows the sender of a frame - * to communicate some out-of-band information to the - * receiver of the frame. - * ctrl: Control bits (ERR, CBMT, ASAL, PTAC, DROPP, SC, DD). - * flow_ctx: Frame flow context. Associates the frame with a flow - * structure. QMan may use the FLC field for 3 purposes: - * stashing control, order definition point identification, - * and enqueue replication control. - */ -struct dpaa2_fd { - uint64_t addr; - uint32_t data_length; - uint16_t bpid_ivp_bmt; - uint16_t offset_fmt_sl; - uint32_t frame_ctx; - uint32_t ctrl; - uint64_t flow_ctx; -} __packed; -CTASSERT(sizeof(struct dpaa2_fd) == DPAA2_FD_SIZE); - -/** - * @brief DPAA2 frame annotation. - */ -struct dpaa2_fa { - uint32_t magic; - struct dpaa2_buf *buf; -#ifdef __notyet__ - union { - struct { /* Tx frame annotation */ - struct dpaa2_ni_tx_ring *tx; - }; - struct { /* Rx frame annotation */ - uint64_t _notused; - }; - }; -#endif -} __packed; -CTASSERT(sizeof(struct dpaa2_fa) <= DPAA2_FA_SIZE); - /** * @brief DPAA2 scatter/gather entry. */ diff --git a/sys/dev/dpaa2/dpaa2_types.h b/sys/dev/dpaa2/dpaa2_types.h index dbfac9ce0a40..dc1c232c09c2 100644 --- a/sys/dev/dpaa2/dpaa2_types.h +++ b/sys/dev/dpaa2/dpaa2_types.h @@ -40,6 +40,11 @@ #define DPAA2_MAX_CHANNELS 16 /* CPU cores */ #define DPAA2_MAX_TCS 8 /* Traffic classes */ +#define DPAA2_TX_SEGLIMIT (16u) /* for 64 KiB frames */ +#define DPAA2_TX_SEG_SZ (PAGE_SIZE) +#define DPAA2_TX_SEGS_MAXSZ (DPAA2_TX_SEGLIMIT * DPAA2_TX_SEG_SZ) +#define DPAA2_TX_SGT_SZ (PAGE_SIZE) /* in bytes */ + /** * @brief Types of the DPAA2 devices. */ diff --git a/sys/modules/dpaa2/Makefile b/sys/modules/dpaa2/Makefile index 816d6fa5cf4a..388303eed0c7 100644 --- a/sys/modules/dpaa2/Makefile +++ b/sys/modules/dpaa2/Makefile @@ -14,6 +14,7 @@ SRCS+= dpaa2_con.c SRCS+= dpaa2_buf.c SRCS+= dpaa2_channel.c SRCS+= dpaa2_types.c +SRCS+= dpaa2_frame.c SRCS+= dpaa2_cmd_if.c dpaa2_cmd_if.h SRCS+= dpaa2_swp_if.c dpaa2_swp_if.h From nobody Wed Apr 22 08:07:55 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0sKR6kgjz6bhgP for ; Wed, 22 Apr 2026 08:07: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0sKR446Bz3ZFT for ; Wed, 22 Apr 2026 08:07:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776845275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7doIy8hQlQnlyTgWQIL992NU2ua1tmMY7uzvHVNx/UE=; b=Kx/WygctS1087mBxY9mAEz9mdUBUgpQiJoC9d93J44QrFdD7ck/xnH5Fa2I3Nmxua4bg7H UvUbEUDTj0miMOZ5kF8Rbx/rskrydkDg9v6zcIuEK1TNPpKJ9W96/ZSrcsFjoVTFDsFn/F VcQZdjgisEtQb+Y6dERM3hIwKUllOGQJH/I3aZ1krUYPxqUb/1SRau3cA03HtKVEKtpkGt H0dfiT195Chk5U+fOWPTUTydx5sHQo6bOt7FYFm0zTFV7Oz3Qjk8DIgas8W6jNjG18+fLW piDL0TBQ+qKVxSk3AMqgAsWnHqiiaKmul5X6MTRyO6mfBWvIqD0ctQpE5hGQmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776845275; a=rsa-sha256; cv=none; b=RPf7+BYXp+8522ArIwgCDVUKHKpysZTumyJ1f7ar6RQ5Pbnc3ltw5XewYnJtD3NeqAVgJx mdWpnP/ZYNxXQQykb7g0/toyzloYS3QaKQMwggvDnRjgBX9SaF9Jwdg/to1fQVWjDq/g6X gPeGgt9t4dBVzQR3+XR4K+gNaMEzi+x41cBz18ri7UAcGR+5l9aZyogxBmfHGp+91ky0hm YI4wpPIC+4rmf4uGdt/1akCbbVMS+rXb5K3B+M3hrsQLupI7f3Bl+UrqoKYgBnss4Skp+q XZb10xXUAlPlAZu1LbHzwXxrLH+nKbLT/meklJbwaXyrV+6CeDJVyzyvgSOUXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776845275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7doIy8hQlQnlyTgWQIL992NU2ua1tmMY7uzvHVNx/UE=; b=bB6XuZnKlyG2KKvN011j0u7fTxfPGew5lQQ3j+J7dzQek1T+dSLs1xlvG7u8RqHcCrg+Sn kwfkudubOH0Lcib6y7agDj8Pv0LdTCRV8b8HwaHb9zH4Cpm8tY//yOizEs2DxyCZokrae/ crMMn7R1W1ovHSGO+lLVnX+6QelPfQx2/c0ZcwFySpYl43YApB9AmfiAHlBNb3HzIkrkiK ANtk331E15ul4oXC+T0z0loG7E1Vtxv9mjeJ2qNzyZYo0NAkiBxzGD/lkW0eTl486BF6FO UkxtghpSIZzTAXHfAnzqBg5l7bo5Ipa6na3yIQxoAPhJzJ63Vlq/bFs04s1T1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0sKR1tmRz6Yg for ; Wed, 22 Apr 2026 08:07:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 261d9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 08:07:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Salychev Subject: git: 150ac95e4a56 - stable/15 - dpaa2: Extract checksum statuses on ingress List-Id: Commits to the stable branches 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: dsl X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 150ac95e4a56855e7ffaa1014d7a82e9eda89f65 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 08:07:55 +0000 Message-Id: <69e881db.261d9.ee86653@gitrepo.freebsd.org> The branch stable/15 has been updated by dsl: URL: https://cgit.FreeBSD.org/src/commit/?id=150ac95e4a56855e7ffaa1014d7a82e9eda89f65 commit 150ac95e4a56855e7ffaa1014d7a82e9eda89f65 Author: Dmitry Salychev AuthorDate: 2026-04-13 12:46:49 +0000 Commit: Dmitry Salychev CommitDate: 2026-04-22 08:06:26 +0000 dpaa2: Extract checksum statuses on ingress In order to enable RX checksum offloading we need to check the meta-information for the (good) frames to see if the L3/4 checksums were calculated and if there was an error. The way the buffere are setup, the needed frame meta-information is already requested. All we have to do is make sure it is really part of the RX frame, that it is valid, and if the respective bits are set. Also do not forget to set the (dummy) csum_data as otherwise upper layers will just be cranky. An artefact of the past which likely should disappear. PR: 292006 Reviewed by: bz, tuexen Tested by: bz, tuexen Approved by: tuexen Obtained from: bz (initial version, D55320) MFC after: 3 days Sponsored by: Traverse Technologies (providing Ten64 HW for testing) Differential Revision: https://reviews.freebsd.org/D56383 (cherry picked from commit 4a6d7fc1a00b69925b3edc39acef0391487a8e3e) --- sys/dev/dpaa2/dpaa2_frame.c | 100 ++++++++++++++++++++++++++++++++++++++------ sys/dev/dpaa2/dpaa2_frame.h | 63 +++++++++++++++++++++++++++- sys/dev/dpaa2/dpaa2_ni.c | 76 ++++++++++++++++++++++++++++++++- sys/dev/dpaa2/dpaa2_ni.h | 6 ++- 4 files changed, 227 insertions(+), 18 deletions(-) diff --git a/sys/dev/dpaa2/dpaa2_frame.c b/sys/dev/dpaa2/dpaa2_frame.c index 4a155f7cb32f..005708228058 100644 --- a/sys/dev/dpaa2/dpaa2_frame.c +++ b/sys/dev/dpaa2/dpaa2_frame.c @@ -1,7 +1,8 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright © 2026 Dmitry Salychev + * Copyright (c) 2026 Dmitry Salychev + * Copyright (c) 2026 Bjoern A. Zeeb * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -29,6 +30,7 @@ #include #include +#include #include #include @@ -138,28 +140,102 @@ dpaa2_fd_offset(struct dpaa2_fd *fd) return (fd->offset_fmt_sl & DPAA2_FD_OFFSET_MASK); } +uint32_t +dpaa2_fd_get_frc(struct dpaa2_fd *fd) +{ + /* TODO: Convert endiannes in the other functions as well. */ + return (le32toh(fd->frame_ctx)); +} + +#ifdef _not_yet_ +void +dpaa2_fd_set_frc(struct dpaa2_fd *fd, uint32_t frc) +{ + /* TODO: Convert endiannes in the other functions as well. */ + fd->frame_ctx = htole32(frc); +} +#endif + int dpaa2_fa_get_swa(struct dpaa2_fd *fd, struct dpaa2_swa **swa) { - int rc; - - if (fd == NULL || swa == NULL) + if (__predict_false(fd == NULL || swa == NULL)) return (EINVAL); - if (((fd->ctrl >> DPAA2_FD_PTAC_SHIFT) & DPAA2_FD_PTAC_MASK) >= 0x4u) { - *swa = (struct dpaa2_swa *)PHYS_TO_DMAP((bus_addr_t)fd->addr); - rc = 0; - } else { + if (((fd->ctrl >> DPAA2_FD_PTAC_SHIFT) & DPAA2_FD_PTAC_PTA_MASK) == 0u) { *swa = NULL; - rc = ENOENT; + return (ENOENT); } - return (rc); + *swa = (struct dpaa2_swa *)PHYS_TO_DMAP((bus_addr_t)fd->addr); + + return (0); } int dpaa2_fa_get_hwa(struct dpaa2_fd *fd, struct dpaa2_hwa **hwa) { - /* TODO: To be implemented next. */ - return (ENOENT); + uint8_t *buf; + uint32_t hwo; /* HW annotation offset */ + + if (__predict_false(fd == NULL || hwa == NULL)) + return (EINVAL); + + /* + * As soon as the ASAL is in the 64-byte units, we don't need to + * calculate the exact length, but make sure that it isn't 0. + */ + if (((fd->ctrl >> DPAA2_FD_ASAL_SHIFT) & DPAA2_FD_ASAL_MASK) == 0u) { + *hwa = NULL; + return (ENOENT); + } + + buf = (uint8_t *)PHYS_TO_DMAP((bus_addr_t)fd->addr); + hwo = ((fd->ctrl >> DPAA2_FD_PTAC_SHIFT) & DPAA2_FD_PTAC_PTA_MASK) > 0u + ? DPAA2_FA_SWA_SIZE : 0u; + *hwa = (struct dpaa2_hwa *)(buf + hwo); + + return (0); +} + +int +dpaa2_fa_get_fas(struct dpaa2_fd *fd, struct dpaa2_hwa_fas *fas) +{ + struct dpaa2_hwa *hwa; + struct dpaa2_hwa_fas *fasp; + int rc; + + if (__predict_false(fd == NULL || fas == NULL)) + return (EINVAL); + + rc = dpaa2_fa_get_hwa(fd, &hwa); + if (__predict_false(rc != 0)) + return (rc); + + fasp = (struct dpaa2_hwa_fas *)&hwa->fas; + *fas = *fasp; + + return (rc); +} + +#ifdef _not_yet_ +int +dpaa2_fa_set_fas(struct dpaa2_fd *fd, struct dpaa2_hwa_fas *fas) +{ + struct dpaa2_hwa *hwa; + uint64_t *valp; + int rc; + + if (__predict_false(fd == NULL || fas == NULL)) + return (EINVAL); + + rc = dpaa2_fa_get_hwa(fd, &hwa); + if (__predict_false(rc != 0)) + return (rc); + + valp = (uint64_t *)fas; + hwa->fas = *valp; + + return (rc); } +#endif diff --git a/sys/dev/dpaa2/dpaa2_frame.h b/sys/dev/dpaa2/dpaa2_frame.h index 0b2a5a7d8e74..ab83b402efa4 100644 --- a/sys/dev/dpaa2/dpaa2_frame.h +++ b/sys/dev/dpaa2/dpaa2_frame.h @@ -1,7 +1,8 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright © 2026 Dmitry Salychev + * Copyright (c) 2026 Dmitry Salychev + * Copyright (c) 2026 Bjoern A. Zeeb * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -56,8 +57,13 @@ #define DPAA2_FD_SL_SHIFT (14) #define DPAA2_FD_LEN_MASK (0x3FFFFu) #define DPAA2_FD_OFFSET_MASK (0x0FFFu) +#define DPAA2_FD_PTAC_PTV2_MASK (0x1u) +#define DPAA2_FD_PTAC_PTV1_MASK (0x2u) +#define DPAA2_FD_PTAC_PTA_MASK (0x4u) #define DPAA2_FD_PTAC_MASK (0x7u) #define DPAA2_FD_PTAC_SHIFT (21) +#define DPAA2_FD_ASAL_MASK (0xFu) +#define DPAA2_FD_ASAL_SHIFT (16) /* * DPAA2 frame annotation sizes @@ -73,6 +79,31 @@ #define DPAA2_FA_SWA_SIZE 64u /* SW frame annotation */ #define DPAA2_FA_HWA_SIZE 128u /* HW frame annotation */ #define DPAA2_FA_WRIOP_SIZE 128u /* WRIOP HW annotation */ +#define DPAA2_FA_HWA_FAS_SIZE 8u /* Frame annotation status */ + +/* + * DPAA2 annotation valid bits in FD[FRC]. + * + * See 7.31.2 WRIOP FD frame context (FRC), + * LX2160A DPAA2 Low-Level Hardware Reference Manual, Rev. 0, 06/2020 + */ +#define DPAA2_FD_FRC_FASV (1 << 15) +#define DPAA2_FD_FRC_FAEADV (1 << 14) +#define DPAA2_FD_FRC_FAPRV (1 << 13) +#define DPAA2_FD_FRC_FAIADV (1 << 12) +#define DPAA2_FD_FRC_FASWOV (1 << 11) +#define DPAA2_FD_FRC_FAICFDV (1 << 10) + +/* + * DPAA2 Frame annotation status word. + * + * See 7.34.3 Frame annotation status word (FAS), + * LX2160A DPAA2 Low-Level Hardware Reference Manual, Rev. 0, 06/2020 + */ +#define DPAA2_FAS_L3CV (1 << 3) /* L3 csum validated */ +#define DPAA2_FAS_L3CE (1 << 2) /* L3 csum error */ +#define DPAA2_FAS_L4CV (1 << 1) /* L4 csum validated*/ +#define DPAA2_FAS_L4CE (1 << 0) /* L4 csum error */ /** * @brief DPAA2 frame descriptor. @@ -126,13 +157,18 @@ struct dpaa2_hwa_wriop { CTASSERT(sizeof(struct dpaa2_hwa_wriop) == DPAA2_FA_WRIOP_SIZE); /** - * @brief DPAA2 hardware frame annotation (accelerator-specific annotation). + * @brief DPAA2 hardware frame annotation. * * See 3.4.1.2 Accelerator-specific annotation, * LX2160A DPAA2 Low-Level Hardware Reference Manual, Rev. 0, 06/2020 */ struct dpaa2_hwa { union { + /* Keep fields common to all accelerators at the top. */ + struct { + uint64_t fas; + } __packed; + /* Keep accelerator-specific annotations below. */ struct dpaa2_hwa_wriop wriop; }; } __packed; @@ -159,6 +195,20 @@ struct dpaa2_swa { } __packed; CTASSERT(sizeof(struct dpaa2_swa) == DPAA2_FA_SWA_SIZE); +/** + * @brief Frame annotation status word. + * + * See 7.34.3 Frame annotation status word (FAS), + * LX2160A DPAA2 Low-Level Hardware Reference Manual, Rev. 0, 06/2020 + */ +struct dpaa2_hwa_fas { + uint8_t _reserved1; + uint8_t ppid; + uint16_t ifpid; + uint32_t status; +} __packed; +CTASSERT(sizeof(struct dpaa2_hwa_fas) == DPAA2_FA_HWA_FAS_SIZE); + int dpaa2_fd_build(device_t, const uint16_t, struct dpaa2_buf *, bus_dma_segment_t *, const int, struct dpaa2_fd *); @@ -168,7 +218,16 @@ int dpaa2_fd_format(struct dpaa2_fd *); bool dpaa2_fd_short_len(struct dpaa2_fd *); int dpaa2_fd_offset(struct dpaa2_fd *); +uint32_t dpaa2_fd_get_frc(struct dpaa2_fd *); +#ifdef _not_yet_ +void dpaa2_fd_set_frc(struct dpaa2_fd *, uint32_t); +#endif + int dpaa2_fa_get_swa(struct dpaa2_fd *, struct dpaa2_swa **); int dpaa2_fa_get_hwa(struct dpaa2_fd *, struct dpaa2_hwa **); +int dpaa2_fa_get_fas(struct dpaa2_fd *, struct dpaa2_hwa_fas *); +#ifdef _not_yet_ +int dpaa2_fa_set_fas(struct dpaa2_fd *, struct dpaa2_hwa_fas *); +#endif #endif /* _DPAA2_FRAME_H */ diff --git a/sys/dev/dpaa2/dpaa2_ni.c b/sys/dev/dpaa2/dpaa2_ni.c index f173bff6e65f..5f9282e120e4 100644 --- a/sys/dev/dpaa2/dpaa2_ni.c +++ b/sys/dev/dpaa2/dpaa2_ni.c @@ -1,8 +1,9 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright © 2021-2023 Dmitry Salychev - * Copyright © 2022 Mathew McBride + * Copyright (c) 2021-2026 Dmitry Salychev + * Copyright (c) 2022 Mathew McBride + * Copyright (c) 2026 Bjoern A. Zeeb * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -412,6 +413,7 @@ static int dpaa2_ni_set_dist_key(device_t, enum dpaa2_ni_dist_mode, uint64_t); /* Various subroutines */ static int dpaa2_ni_cmp_api_version(struct dpaa2_ni_softc *, uint16_t, uint16_t); static int dpaa2_ni_prepare_key_cfg(struct dpkg_profile_cfg *, uint8_t *); +static int dpaa2_ni_update_csum_flags(struct dpaa2_fd *, struct mbuf *); /* Network interface routines */ static void dpaa2_ni_init(void *); @@ -491,6 +493,7 @@ dpaa2_ni_attach(device_t dev) sc->rx_sg_buf_frames = 0; sc->rx_enq_rej_frames = 0; sc->rx_ieoi_err_frames = 0; + sc->rx_other_err_frames = 0; sc->tx_single_buf_frames = 0; sc->tx_sg_frames = 0; @@ -1737,6 +1740,9 @@ dpaa2_ni_setup_sysctls(struct dpaa2_ni_softc *sc) SYSCTL_ADD_UQUAD(ctx, parent, OID_AUTO, "rx_ieoi_err_frames", CTLFLAG_RD, &sc->rx_ieoi_err_frames, "QMan IEOI error"); + SYSCTL_ADD_UQUAD(ctx, parent, OID_AUTO, "rx_other_err_frames", + CTLFLAG_RD, &sc->rx_other_err_frames, + "Other Rx frames with errors"); SYSCTL_ADD_UQUAD(ctx, parent, OID_AUTO, "tx_single_buf_frames", CTLFLAG_RD, &sc->tx_single_buf_frames, "Tx single buffer frames"); @@ -3121,6 +3127,7 @@ dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, bus_addr_t released[DPAA2_SWP_BUFS_PER_CMD]; void *buf_data; int buf_len, error, released_n = 0; + bool update_csum_flags; error = dpaa2_fa_get_swa(fd, &swa); if (__predict_false(error != 0)) @@ -3131,6 +3138,7 @@ dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, buf = swa->buf; bch = (struct dpaa2_channel *)buf->opt; sc = device_get_softc(bch->ni_dev); + update_csum_flags = true; KASSERT(swa->magic == DPAA2_MAGIC, ("%s: wrong magic", __func__)); /* @@ -3145,6 +3153,14 @@ dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, } switch (dpaa2_fd_err(fd)) { + case 0: + /* + * FD[ERR] = 0 value is reserved to indicate that there is no + * error encoded in this field. See 3.4.5 Error handling, + * LX2160A DPAA2 Low-Level Hardware Reference Manual, Rev. 0, + * 06/2020. + */ + break; case 1: /* Enqueue rejected by QMan */ sc->rx_enq_rej_frames++; break; @@ -3152,8 +3168,10 @@ dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, sc->rx_ieoi_err_frames++; break; default: + sc->rx_other_err_frames++; break; } + switch (dpaa2_fd_format(fd)) { case DPAA2_FD_SINGLE: sc->rx_single_buf_frames++; @@ -3162,6 +3180,7 @@ dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, sc->rx_sg_buf_frames++; break; default: + update_csum_flags = false; break; } @@ -3193,6 +3212,14 @@ dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, m->m_pkthdr.flowid = fq->fqid; M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); + if (update_csum_flags && ((if_getcapenable(sc->ifp) & (IFCAP_RXCSUM | + IFCAP_RXCSUM_IPV6)) != 0)) { + error = dpaa2_ni_update_csum_flags(fd, m); + if (error != 0) + device_printf(sc->dev, "%s: failed to update checksum " + "flags: error=%d\n", __func__, error); + } + if (ctx->head == NULL) { KASSERT(ctx->tail == NULL, ("%s: tail already given?", __func__)); ctx->head = m; @@ -3634,6 +3661,51 @@ dpaa2_ni_prepare_key_cfg(struct dpkg_profile_cfg *cfg, uint8_t *key_cfg_buf) return (0); } +static int +dpaa2_ni_update_csum_flags(struct dpaa2_fd *fd, struct mbuf *m) +{ + struct dpaa2_hwa_fas fas; + uint32_t status; + int rc; + + if (__predict_false((dpaa2_fd_get_frc(fd) & DPAA2_FD_FRC_FASV)) == 0u) + return (EINVAL); + + /* + * XXX-DSL: Frame context of the frame descriptor (FD[FRC]) contains + * an Accelerator ID in the MSbits on some SoCs (e.g. LS1088A), + * but a frame ParseSummary on the others (e.g. LX2160A). + * However, frame annotation valid bits seem to be at the + * same offsets. This is the reason why different accelerators + * are treated the same here. It isn't clear whether this is + * a hardware limitation of the SoCs, version of the firmware + * or DPL configuration. + */ + + rc = dpaa2_fa_get_fas(fd, &fas); + if (rc != 0) + return (rc); + + status = le32toh(fas.status); + rc = 0; + + /* L3 */ + if ((status & DPAA2_FAS_L3CV) != 0) { + m->m_pkthdr.csum_flags |= CSUM_L3_CALC; + if ((status & DPAA2_FAS_L3CE) == 0) + m->m_pkthdr.csum_flags |= CSUM_L3_VALID; + } + /* L4 */ + if ((status & DPAA2_FAS_L4CV) != 0) { + m->m_pkthdr.csum_flags |= CSUM_L4_CALC; + m->m_pkthdr.csum_data = 0xffff; + if ((status & DPAA2_FAS_L4CE) == 0) + m->m_pkthdr.csum_flags |= CSUM_L4_VALID; + } + + return (rc); +} + static device_method_t dpaa2_ni_methods[] = { /* Device interface */ DEVMETHOD(device_probe, dpaa2_ni_probe), diff --git a/sys/dev/dpaa2/dpaa2_ni.h b/sys/dev/dpaa2/dpaa2_ni.h index fcd37501ebd0..9b1397fc544d 100644 --- a/sys/dev/dpaa2/dpaa2_ni.h +++ b/sys/dev/dpaa2/dpaa2_ni.h @@ -1,8 +1,9 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright © 2021-2023 Dmitry Salychev - * Copyright © 2022 Mathew McBride + * Copyright (c) 2021-2023 Dmitry Salychev + * Copyright (c) 2022 Mathew McBride + * Copyright (c) 2026 Bjoern A. Zeeb * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -466,6 +467,7 @@ struct dpaa2_ni_softc { uint64_t rx_sg_buf_frames; uint64_t rx_enq_rej_frames; uint64_t rx_ieoi_err_frames; + uint64_t rx_other_err_frames; uint64_t tx_single_buf_frames; uint64_t tx_sg_frames; From nobody Wed Apr 22 08:13:17 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0sRd3gZZz6bjph for ; Wed, 22 Apr 2026 08:13:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0sRd34fZz3bxM for ; Wed, 22 Apr 2026 08:13:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776845597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i7tE9dLUrZekvKtU5Wqwg+veo+Vhg4nqNfjwY8iS+Rk=; b=fut3oVOxWaF8fXIVEU75DL2WUSMXiqMtUWEdSNEoB/7h1KASMHgSAtg3TfSrpfPoYU43ye hToGoblZ1YJxLuHrMdka+1x9d2WWuNgnU6zLMU1sQyDllu9I7Lfl+L1rTIuixXNBMzmu5G XhOFPFN3QN3OkGG56aH6y5LKBClgfXmJ5kttbkGJsgyOduCPZHV7ixF1n0u8L2ZVoCjhDK q84Wd6PNzAfxBLh8eEaFV2Y/urf7NbneJGvqkPk9vmAQjto+bg8+JMSFnCBxVxVC64n/BL m01SpIlQXHH5BztElTPS+95Pq+eP14o+YofBr14TVkki7ifzeZ5H6N5pzPfaYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776845597; a=rsa-sha256; cv=none; b=p5eCdytEBOAK90VJuFbtV4Xff2E/SBSaCbnm+xmzY4fZiJ5NGRjh5PpiGW1aA3gP6McXvZ BtZuZDu2z0GFi/XjB0+wRcAvHlqvS3DxsBJn1UL4lwcxTSs/pta7BpxzGN++lQiw7RIVcg +TCzUtasuyvp0bWIPZxPazLVceyhAQ0vUda5RgAb+G7DI0uKfYu2s03MmY0geVp6bi38fs /DsHKQjCASn155ZsxuUUxvsxgoLjOsDWqDmJyZ/YBzMrgxcWPQiG/+A8ZL+w0x4HzkGjZP tg7M2JDn1LMayA2hpolH1Sdv4+M/Fk3hq53kfIS09omzt7SOOqY61x/T+25Kdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776845597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i7tE9dLUrZekvKtU5Wqwg+veo+Vhg4nqNfjwY8iS+Rk=; b=kgXuP0108VHVdW5o18kTYYH6wb1bKTKFkPCNmkYxZoDchkk4gQ7bwgCAW9UqZyVdwaQV7g kEn3dItotw0Znbfww25kU6hsU4UCeUqjBD5du1Y47VIChThJzMal5QYyu4y9eH8fvSp27G 8eJcg2rqkVEvmYf7aEew35G3oLTvHAU0v8ckM/RPIdBHP1lHL5I7vikDABUBJLw9n++LoL QKxMdwYQi8NEV6nDp4eOq/eJaVBjeRMy8e9x3NuOTQk3m+BR9s1zxcHV4vmE3EAXC1F/Kq MKAS26bEOv3GC86il9NYfAjcWUu65SWow5lnOFDcc3h/1I5d1glBFFRu0jvl2g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0sRd2ZMHz6WJ for ; Wed, 22 Apr 2026 08:13:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27312 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 08:13:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Salychev Subject: git: 2b3799b6608e - stable/14 - dpaa2: Extract frame-specific routines to dpaa2_frame.[h,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: dsl X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2b3799b6608e27e91a123c784c6c88b191892fcc Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 08:13:17 +0000 Message-Id: <69e8831d.27312.5860b13c@gitrepo.freebsd.org> The branch stable/14 has been updated by dsl: URL: https://cgit.FreeBSD.org/src/commit/?id=2b3799b6608e27e91a123c784c6c88b191892fcc commit 2b3799b6608e27e91a123c784c6c88b191892fcc Author: Dmitry Salychev AuthorDate: 2026-01-25 16:53:57 +0000 Commit: Dmitry Salychev CommitDate: 2026-04-22 08:12:57 +0000 dpaa2: Extract frame-specific routines to dpaa2_frame.[h,c] As soon as we need information from the hardware frame annotation to make sure that checksums of the ingress frames were verified by the DPAA2 HW, I've decided to make a preparation and extracted all of the frame related routines into the separate dpaa2_frame.[h,c] along with some clean up and improvements, e.g. no more dpaa2_fa, but dpaa2_swa and dpaa2_hwa structures to describe software and hardware frame annotations respectively, dpaa2_fa_get_swa/dpaa2_fa_get_hwa to obtain those annotations from the frame descriptor. The next step is to implement dpaa2_fa_get_hwa. PR: 292006 Approved by: tuexen MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56315 (cherry picked from commit 8e994533806d8aa0ae4582a52d811ede2b19bb26) --- sys/conf/files.arm64 | 1 + sys/dev/dpaa2/dpaa2_buf.c | 9 +- sys/dev/dpaa2/dpaa2_buf.h | 2 + sys/dev/dpaa2/dpaa2_frame.c | 165 ++++++++++++++++++++++++++++++++++ sys/dev/dpaa2/dpaa2_frame.h | 174 ++++++++++++++++++++++++++++++++++++ sys/dev/dpaa2/dpaa2_ni.c | 210 ++++++++++++++------------------------------ sys/dev/dpaa2/dpaa2_ni.h | 3 +- sys/dev/dpaa2/dpaa2_swp.h | 51 +---------- sys/dev/dpaa2/dpaa2_types.h | 5 ++ sys/modules/dpaa2/Makefile | 1 + 10 files changed, 420 insertions(+), 201 deletions(-) diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 1b7566deb28a..7d31a92c530e 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -209,6 +209,7 @@ dev/dpaa2/dpaa2_channel.c optional soc_nxp_ls dpaa2 dev/dpaa2/dpaa2_cmd_if.m optional soc_nxp_ls dpaa2 dev/dpaa2/dpaa2_con.c optional soc_nxp_ls dpaa2 dev/dpaa2/dpaa2_console.c optional soc_nxp_ls dpaa2 fdt +dev/dpaa2/dpaa2_frame.c optional soc_nxp_ls dpaa2 dev/dpaa2/dpaa2_io.c optional soc_nxp_ls dpaa2 dev/dpaa2/dpaa2_mac.c optional soc_nxp_ls dpaa2 dev/dpaa2/dpaa2_mc.c optional soc_nxp_ls dpaa2 diff --git a/sys/dev/dpaa2/dpaa2_buf.c b/sys/dev/dpaa2/dpaa2_buf.c index 7739eda5d8de..1ea9df257c28 100644 --- a/sys/dev/dpaa2/dpaa2_buf.c +++ b/sys/dev/dpaa2/dpaa2_buf.c @@ -42,6 +42,7 @@ #include "dpaa2_swp.h" #include "dpaa2_swp_if.h" #include "dpaa2_ni.h" +#include "dpaa2_frame.h" MALLOC_DEFINE(M_DPAA2_RXB, "dpaa2_rxb", "DPAA2 DMA-mapped buffer (Rx)"); @@ -129,7 +130,7 @@ dpaa2_buf_seed_rxb(device_t dev, struct dpaa2_buf *buf, int size, struct mtx *dma_mtx) { struct dpaa2_ni_softc *sc = device_get_softc(dev); - struct dpaa2_fa *fa; + struct dpaa2_swa *swa; bool map_created = false; bool mbuf_alloc = false; int error; @@ -178,9 +179,9 @@ dpaa2_buf_seed_rxb(device_t dev, struct dpaa2_buf *buf, int size, buf->vaddr = buf->m->m_data; /* Populate frame annotation for future use */ - fa = (struct dpaa2_fa *)buf->vaddr; - fa->magic = DPAA2_MAGIC; - fa->buf = buf; + swa = (struct dpaa2_swa *)buf->vaddr; + swa->magic = DPAA2_MAGIC; + swa->buf = buf; bus_dmamap_sync(buf->dmat, buf->dmap, BUS_DMASYNC_PREREAD); diff --git a/sys/dev/dpaa2/dpaa2_buf.h b/sys/dev/dpaa2/dpaa2_buf.h index 853a4fa78d3a..16ea7e1905ac 100644 --- a/sys/dev/dpaa2/dpaa2_buf.h +++ b/sys/dev/dpaa2/dpaa2_buf.h @@ -33,6 +33,8 @@ #include #include #include +#include +#include #include diff --git a/sys/dev/dpaa2/dpaa2_frame.c b/sys/dev/dpaa2/dpaa2_frame.c new file mode 100644 index 000000000000..4a155f7cb32f --- /dev/null +++ b/sys/dev/dpaa2/dpaa2_frame.c @@ -0,0 +1,165 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright © 2026 Dmitry Salychev + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#include +#include + +#include +#include + +#include + +#include "dpaa2_types.h" +#include "dpaa2_frame.h" +#include "dpaa2_buf.h" +#include "dpaa2_swp.h" + +/** + * @brief Build a DPAA2 frame descriptor. + */ +int +dpaa2_fd_build(device_t dev, const uint16_t tx_data_off, struct dpaa2_buf *buf, + bus_dma_segment_t *segs, const int nsegs, struct dpaa2_fd *fd) +{ + struct dpaa2_buf *sgt = buf->sgt; + struct dpaa2_sg_entry *sge; + struct dpaa2_swa *swa; + int i, error; + + if (buf == NULL || segs == NULL || nsegs == 0 || fd == NULL) + return (EINVAL); + + KASSERT(nsegs <= DPAA2_TX_SEGLIMIT, ("%s: too many segments", __func__)); + KASSERT(buf->opt != NULL, ("%s: no Tx ring?", __func__)); + KASSERT(sgt != NULL, ("%s: no S/G table?", __func__)); + KASSERT(sgt->vaddr != NULL, ("%s: no S/G vaddr?", __func__)); + + memset(fd, 0, sizeof(*fd)); + + /* Populate and map S/G table */ + if (__predict_true(nsegs <= DPAA2_TX_SEGLIMIT)) { + sge = (struct dpaa2_sg_entry *)sgt->vaddr + tx_data_off; + for (i = 0; i < nsegs; i++) { + sge[i].addr = (uint64_t)segs[i].ds_addr; + sge[i].len = (uint32_t)segs[i].ds_len; + sge[i].offset_fmt = 0u; + } + sge[i-1].offset_fmt |= 0x8000u; /* set final entry flag */ + + KASSERT(sgt->paddr == 0, ("%s: paddr(%#jx) != 0", __func__, + sgt->paddr)); + + error = bus_dmamap_load(sgt->dmat, sgt->dmap, sgt->vaddr, + DPAA2_TX_SGT_SZ, dpaa2_dmamap_oneseg_cb, &sgt->paddr, + BUS_DMA_NOWAIT); + if (__predict_false(error != 0)) { + device_printf(dev, "%s: bus_dmamap_load() failed: " + "error=%d\n", __func__, error); + return (error); + } + + buf->paddr = sgt->paddr; + buf->vaddr = sgt->vaddr; + } else { + return (EINVAL); + } + + swa = (struct dpaa2_swa *)sgt->vaddr; + swa->magic = DPAA2_MAGIC; + swa->buf = buf; + + fd->addr = buf->paddr; + fd->data_length = (uint32_t)buf->m->m_pkthdr.len; + fd->bpid_ivp_bmt = 0; + fd->offset_fmt_sl = 0x2000u | tx_data_off; + fd->ctrl = (0x4u & DPAA2_FD_PTAC_MASK) << DPAA2_FD_PTAC_SHIFT; + + return (0); +} + +int +dpaa2_fd_err(struct dpaa2_fd *fd) +{ + return ((fd->ctrl >> DPAA2_FD_ERR_SHIFT) & DPAA2_FD_ERR_MASK); +} + +uint32_t +dpaa2_fd_data_len(struct dpaa2_fd *fd) +{ + if (dpaa2_fd_short_len(fd)) { + return (fd->data_length & DPAA2_FD_LEN_MASK); + } + return (fd->data_length); +} + +int +dpaa2_fd_format(struct dpaa2_fd *fd) +{ + return ((enum dpaa2_fd_format)((fd->offset_fmt_sl >> + DPAA2_FD_FMT_SHIFT) & DPAA2_FD_FMT_MASK)); +} + +bool +dpaa2_fd_short_len(struct dpaa2_fd *fd) +{ + return (((fd->offset_fmt_sl >> DPAA2_FD_SL_SHIFT) + & DPAA2_FD_SL_MASK) == 1); +} + +int +dpaa2_fd_offset(struct dpaa2_fd *fd) +{ + return (fd->offset_fmt_sl & DPAA2_FD_OFFSET_MASK); +} + +int +dpaa2_fa_get_swa(struct dpaa2_fd *fd, struct dpaa2_swa **swa) +{ + int rc; + + if (fd == NULL || swa == NULL) + return (EINVAL); + + if (((fd->ctrl >> DPAA2_FD_PTAC_SHIFT) & DPAA2_FD_PTAC_MASK) >= 0x4u) { + *swa = (struct dpaa2_swa *)PHYS_TO_DMAP((bus_addr_t)fd->addr); + rc = 0; + } else { + *swa = NULL; + rc = ENOENT; + } + + return (rc); +} + +int +dpaa2_fa_get_hwa(struct dpaa2_fd *fd, struct dpaa2_hwa **hwa) +{ + /* TODO: To be implemented next. */ + return (ENOENT); +} diff --git a/sys/dev/dpaa2/dpaa2_frame.h b/sys/dev/dpaa2/dpaa2_frame.h new file mode 100644 index 000000000000..0b2a5a7d8e74 --- /dev/null +++ b/sys/dev/dpaa2/dpaa2_frame.h @@ -0,0 +1,174 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright © 2026 Dmitry Salychev + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _DPAA2_FRAME_H +#define _DPAA2_FRAME_H + +#include +#include +#include + +#include "dpaa2_types.h" +#include "dpaa2_buf.h" + +/* + * Helper routines for the DPAA2 frames (e.g. descriptors, software/hardware + * annotations, etc.). + */ + +/* + * DPAA2 frame descriptor size, field offsets and masks. + * + * See 3.1.1 Frame descriptor format, + * 4.2.1.2.2 Structure of Frame Descriptors (FDs), + * LX2160A DPAA2 Low-Level Hardware Reference Manual, Rev. 0, 06/2020 + */ +#define DPAA2_FD_SIZE 32u +#define DPAA2_FD_FMT_MASK (0x3u) +#define DPAA2_FD_FMT_SHIFT (12) +#define DPAA2_FD_ERR_MASK (0xFFu) +#define DPAA2_FD_ERR_SHIFT (0) +#define DPAA2_FD_SL_MASK (0x1u) +#define DPAA2_FD_SL_SHIFT (14) +#define DPAA2_FD_LEN_MASK (0x3FFFFu) +#define DPAA2_FD_OFFSET_MASK (0x0FFFu) +#define DPAA2_FD_PTAC_MASK (0x7u) +#define DPAA2_FD_PTAC_SHIFT (21) + +/* + * DPAA2 frame annotation sizes + * + * NOTE: Accelerator-specific (HWA) annotation length is described in the 64-byte + * units by the FD[ASAL] bits and can be as big as 960 bytes. Current + * values describe what is actually supported by the DPAA2 drivers. + * + * See 3.1.1 Frame descriptor format, + * LX2160A DPAA2 Low-Level Hardware Reference Manual, Rev. 0 + */ +#define DPAA2_FA_SIZE 192u /* DPAA2 frame annotation */ +#define DPAA2_FA_SWA_SIZE 64u /* SW frame annotation */ +#define DPAA2_FA_HWA_SIZE 128u /* HW frame annotation */ +#define DPAA2_FA_WRIOP_SIZE 128u /* WRIOP HW annotation */ + +/** + * @brief DPAA2 frame descriptor. + * + * addr: Memory address of the start of the buffer holding the + * frame data or the buffer containing the scatter/gather + * list. + * data_length: Length of the frame data (in bytes). + * bpid_ivp_bmt: Buffer pool ID (14 bit + BMT bit + IVP bit) + * offset_fmt_sl: Frame data offset, frame format and short-length fields. + * frame_ctx: Frame context. This field allows the sender of a frame + * to communicate some out-of-band information to the + * receiver of the frame. + * ctrl: Control bits (ERR, CBMT, ASAL, PTAC, DROPP, SC, DD). + * flow_ctx: Frame flow context. Associates the frame with a flow + * structure. QMan may use the FLC field for 3 purposes: + * stashing control, order definition point identification, + * and enqueue replication control. + * + * See 3.1.1 Frame descriptor format, + * 4.2.1.2.2 Structure of Frame Descriptors (FDs), + * LX2160A DPAA2 Low-Level Hardware Reference Manual, Rev. 0, 06/2020 + */ +struct dpaa2_fd { + uint64_t addr; + uint32_t data_length; + uint16_t bpid_ivp_bmt; + uint16_t offset_fmt_sl; + uint32_t frame_ctx; + uint32_t ctrl; + uint64_t flow_ctx; +} __packed; +CTASSERT(sizeof(struct dpaa2_fd) == DPAA2_FD_SIZE); + +/** + * @brief WRIOP hardware frame annotation. + * + * See 7.34.2 WRIOP hardware frame annotation (FA), + * LX2160A DPAA2 Low-Level Hardware Reference Manual, Rev. 0, 06/2020 + */ +struct dpaa2_hwa_wriop { + union { + struct { + uint64_t fas; + uint64_t timestamp; + /* XXX-DSL: more to add here... */ + } __packed; + uint8_t raw[128]; + }; +} __packed; +CTASSERT(sizeof(struct dpaa2_hwa_wriop) == DPAA2_FA_WRIOP_SIZE); + +/** + * @brief DPAA2 hardware frame annotation (accelerator-specific annotation). + * + * See 3.4.1.2 Accelerator-specific annotation, + * LX2160A DPAA2 Low-Level Hardware Reference Manual, Rev. 0, 06/2020 + */ +struct dpaa2_hwa { + union { + struct dpaa2_hwa_wriop wriop; + }; +} __packed; +CTASSERT(sizeof(struct dpaa2_hwa) == DPAA2_FA_HWA_SIZE); + +/** + * @brief DPAA2 software frame annotation (pass-through annotation). + * + * See 3.4.1.1 Pass-through annotation, + * LX2160A DPAA2 Low-Level Hardware Reference Manual, Rev. 0, 06/2020 + */ +struct dpaa2_swa { + union { + struct { + uint32_t magic; + struct dpaa2_buf *buf; + }; + struct { + uint8_t pta1[32]; + uint8_t pta2[32]; + }; + uint8_t raw[64]; + }; +} __packed; +CTASSERT(sizeof(struct dpaa2_swa) == DPAA2_FA_SWA_SIZE); + +int dpaa2_fd_build(device_t, const uint16_t, struct dpaa2_buf *, + bus_dma_segment_t *, const int, struct dpaa2_fd *); + +int dpaa2_fd_err(struct dpaa2_fd *); +uint32_t dpaa2_fd_data_len(struct dpaa2_fd *); +int dpaa2_fd_format(struct dpaa2_fd *); +bool dpaa2_fd_short_len(struct dpaa2_fd *); +int dpaa2_fd_offset(struct dpaa2_fd *); + +int dpaa2_fa_get_swa(struct dpaa2_fd *, struct dpaa2_swa **); +int dpaa2_fa_get_hwa(struct dpaa2_fd *, struct dpaa2_hwa **); + +#endif /* _DPAA2_FRAME_H */ diff --git a/sys/dev/dpaa2/dpaa2_ni.c b/sys/dev/dpaa2/dpaa2_ni.c index 9389c6fff31a..f173bff6e65f 100644 --- a/sys/dev/dpaa2/dpaa2_ni.c +++ b/sys/dev/dpaa2/dpaa2_ni.c @@ -96,6 +96,7 @@ #include "dpaa2_ni.h" #include "dpaa2_channel.h" #include "dpaa2_buf.h" +#include "dpaa2_frame.h" #define BIT(x) (1ul << (x)) #define WRIOP_VERSION(x, y, z) ((x) << 10 | (y) << 5 | (z) << 0) @@ -156,10 +157,6 @@ MALLOC_DEFINE(M_DPAA2_TXB, "dpaa2_txb", "DPAA2 DMA-mapped buffer (Tx)"); #define DPAA2_RX_BUFRING_SZ (4096u) #define DPAA2_RXE_BUFRING_SZ (1024u) #define DPAA2_TXC_BUFRING_SZ (4096u) -#define DPAA2_TX_SEGLIMIT (16u) /* arbitrary number */ -#define DPAA2_TX_SEG_SZ (PAGE_SIZE) -#define DPAA2_TX_SEGS_MAXSZ (DPAA2_TX_SEGLIMIT * DPAA2_TX_SEG_SZ) -#define DPAA2_TX_SGT_SZ (PAGE_SIZE) /* bytes */ /* Size of a buffer to keep a QoS table key configuration. */ #define ETH_QOS_KCFG_BUF_SIZE (PAGE_SIZE) @@ -186,15 +183,6 @@ MALLOC_DEFINE(M_DPAA2_TXB, "dpaa2_txb", "DPAA2 DMA-mapped buffer (Tx)"); #define DPAA2_NI_TXBUF_IDX_MASK (0xFFu) #define DPAA2_NI_TXBUF_IDX_SHIFT (49) -#define DPAA2_NI_FD_FMT_MASK (0x3u) -#define DPAA2_NI_FD_FMT_SHIFT (12) -#define DPAA2_NI_FD_ERR_MASK (0xFFu) -#define DPAA2_NI_FD_ERR_SHIFT (0) -#define DPAA2_NI_FD_SL_MASK (0x1u) -#define DPAA2_NI_FD_SL_SHIFT (14) -#define DPAA2_NI_FD_LEN_MASK (0x3FFFFu) -#define DPAA2_NI_FD_OFFSET_MASK (0x0FFFu) - /* Enables TCAM for Flow Steering and QoS look-ups. */ #define DPNI_OPT_HAS_KEY_MASKING 0x10 @@ -421,15 +409,6 @@ static int dpaa2_ni_set_mac_addr(device_t); static int dpaa2_ni_set_hash(device_t, uint64_t); static int dpaa2_ni_set_dist_key(device_t, enum dpaa2_ni_dist_mode, uint64_t); -/* Frame descriptor routines */ -static int dpaa2_ni_build_fd(struct dpaa2_ni_softc *, struct dpaa2_ni_tx_ring *, - struct dpaa2_buf *, bus_dma_segment_t *, int, struct dpaa2_fd *); -static int dpaa2_ni_fd_err(struct dpaa2_fd *); -static uint32_t dpaa2_ni_fd_data_len(struct dpaa2_fd *); -static int dpaa2_ni_fd_format(struct dpaa2_fd *); -static bool dpaa2_ni_fd_short_len(struct dpaa2_fd *); -static int dpaa2_ni_fd_offset(struct dpaa2_fd *); - /* Various subroutines */ static int dpaa2_ni_cmp_api_version(struct dpaa2_ni_softc *, uint16_t, uint16_t); static int dpaa2_ni_prepare_key_cfg(struct dpkg_profile_cfg *, uint8_t *); @@ -2998,13 +2977,14 @@ dpaa2_ni_tx(struct dpaa2_ni_softc *sc, struct dpaa2_channel *ch, } } - error = dpaa2_ni_build_fd(sc, tx, buf, segs, nsegs, &fd); + error = dpaa2_fd_build(dev, sc->tx_data_off, buf, segs, nsegs, &fd); if (__predict_false(error != 0)) { device_printf(dev, "%s: failed to build frame descriptor: " "error=%d\n", __func__, error); fq->chan->tx_dropped++; goto err_unload; - } + } else + sc->tx_sg_frames++; /* for sysctl(9) */ bus_dmamap_sync(buf->dmat, buf->dmap, BUS_DMASYNC_PREWRITE); bus_dmamap_sync(sgt->dmat, sgt->dmap, BUS_DMASYNC_PREWRITE); @@ -3127,14 +3107,14 @@ dpaa2_ni_consume_frames(struct dpaa2_channel *chan, struct dpaa2_ni_fq **src, * @brief Receive frames. */ static int -dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, struct dpaa2_fd *fd, - struct dpaa2_ni_rx_ctx *ctx) +dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, + struct dpaa2_fd *fd, struct dpaa2_ni_rx_ctx *ctx) { - bus_addr_t paddr = (bus_addr_t)fd->addr; - struct dpaa2_fa *fa = (struct dpaa2_fa *)PHYS_TO_DMAP(paddr); - struct dpaa2_buf *buf = fa->buf; - struct dpaa2_channel *bch = (struct dpaa2_channel *)buf->opt; - struct dpaa2_ni_softc *sc = device_get_softc(bch->ni_dev); + bus_addr_t paddr; + struct dpaa2_swa *swa; + struct dpaa2_buf *buf; + struct dpaa2_channel *bch; + struct dpaa2_ni_softc *sc; struct dpaa2_bp_softc *bpsc; struct mbuf *m; device_t bpdev; @@ -3142,7 +3122,17 @@ dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, struct dpaa2_fd *f void *buf_data; int buf_len, error, released_n = 0; - KASSERT(fa->magic == DPAA2_MAGIC, ("%s: wrong magic", __func__)); + error = dpaa2_fa_get_swa(fd, &swa); + if (__predict_false(error != 0)) + panic("%s: frame has no software annotation: error=%d", + __func__, error); + + paddr = (bus_addr_t)fd->addr; + buf = swa->buf; + bch = (struct dpaa2_channel *)buf->opt; + sc = device_get_softc(bch->ni_dev); + + KASSERT(swa->magic == DPAA2_MAGIC, ("%s: wrong magic", __func__)); /* * NOTE: Current channel might not be the same as the "buffer" channel * and it's fine. It must not be NULL though. @@ -3154,7 +3144,7 @@ dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, struct dpaa2_fd *f __func__, paddr, buf->paddr); } - switch (dpaa2_ni_fd_err(fd)) { + switch (dpaa2_fd_err(fd)) { case 1: /* Enqueue rejected by QMan */ sc->rx_enq_rej_frames++; break; @@ -3164,7 +3154,7 @@ dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, struct dpaa2_fd *f default: break; } - switch (dpaa2_ni_fd_format(fd)) { + switch (dpaa2_fd_format(fd)) { case DPAA2_FD_SINGLE: sc->rx_single_buf_frames++; break; @@ -3180,9 +3170,11 @@ dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, struct dpaa2_fd *f bus_dmamap_sync(buf->dmat, buf->dmap, BUS_DMASYNC_POSTREAD); bus_dmamap_unload(buf->dmat, buf->dmap); + m = buf->m; - buf_len = dpaa2_ni_fd_data_len(fd); - buf_data = (uint8_t *)buf->vaddr + dpaa2_ni_fd_offset(fd); + buf_len = dpaa2_fd_data_len(fd); + buf_data = (uint8_t *)buf->vaddr + dpaa2_fd_offset(fd); + /* Prepare buffer to be re-cycled */ buf->m = NULL; buf->paddr = 0; @@ -3269,16 +3261,26 @@ static int dpaa2_ni_rx_err(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, struct dpaa2_fd *fd) { - bus_addr_t paddr = (bus_addr_t)fd->addr; - struct dpaa2_fa *fa = (struct dpaa2_fa *)PHYS_TO_DMAP(paddr); - struct dpaa2_buf *buf = fa->buf; - struct dpaa2_channel *bch = (struct dpaa2_channel *)buf->opt; - struct dpaa2_ni_softc *sc = device_get_softc(bch->ni_dev); + bus_addr_t paddr; + struct dpaa2_swa *swa; + struct dpaa2_buf *buf; + struct dpaa2_channel *bch; + struct dpaa2_ni_softc *sc; device_t bpdev; struct dpaa2_bp_softc *bpsc; int error; - KASSERT(fa->magic == DPAA2_MAGIC, ("%s: wrong magic", __func__)); + error = dpaa2_fa_get_swa(fd, &swa); + if (__predict_false(error != 0)) + panic("%s: frame has no software annotation: error=%d", + __func__, error); + + paddr = (bus_addr_t)fd->addr; + buf = swa->buf; + bch = (struct dpaa2_channel *)buf->opt; + sc = device_get_softc(bch->ni_dev); + + KASSERT(swa->magic == DPAA2_MAGIC, ("%s: wrong magic", __func__)); /* * NOTE: Current channel might not be the same as the "buffer" channel * and it's fine. It must not be NULL though. @@ -3312,14 +3314,26 @@ static int dpaa2_ni_tx_conf(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, struct dpaa2_fd *fd) { - bus_addr_t paddr = (bus_addr_t)fd->addr; - struct dpaa2_fa *fa = (struct dpaa2_fa *)PHYS_TO_DMAP(paddr); - struct dpaa2_buf *buf = fa->buf; - struct dpaa2_buf *sgt = buf->sgt; - struct dpaa2_ni_tx_ring *tx = (struct dpaa2_ni_tx_ring *)buf->opt; - struct dpaa2_channel *bch = tx->fq->chan; - - KASSERT(fa->magic == DPAA2_MAGIC, ("%s: wrong magic", __func__)); + bus_addr_t paddr; + struct dpaa2_swa *swa; + struct dpaa2_buf *buf; + struct dpaa2_buf *sgt; + struct dpaa2_ni_tx_ring *tx; + struct dpaa2_channel *bch; + int error; + + error = dpaa2_fa_get_swa(fd, &swa); + if (__predict_false(error != 0)) + panic("%s: frame has no software annotation: error=%d", + __func__, error); + + paddr = (bus_addr_t)fd->addr; + buf = swa->buf; + sgt = buf->sgt; + tx = (struct dpaa2_ni_tx_ring *)buf->opt; + bch = tx->fq->chan; + + KASSERT(swa->magic == DPAA2_MAGIC, ("%s: wrong magic", __func__)); KASSERT(tx != NULL, ("%s: Tx ring is NULL", __func__)); KASSERT(sgt != NULL, ("%s: S/G table is NULL", __func__)); /* @@ -3367,102 +3381,6 @@ dpaa2_ni_cmp_api_version(struct dpaa2_ni_softc *sc, uint16_t major, return sc->api_major - major; } -/** - * @brief Build a DPAA2 frame descriptor. - */ -static int -dpaa2_ni_build_fd(struct dpaa2_ni_softc *sc, struct dpaa2_ni_tx_ring *tx, - struct dpaa2_buf *buf, bus_dma_segment_t *segs, int nsegs, struct dpaa2_fd *fd) -{ - struct dpaa2_buf *sgt = buf->sgt; - struct dpaa2_sg_entry *sge; - struct dpaa2_fa *fa; - int i, error; - - KASSERT(nsegs <= DPAA2_TX_SEGLIMIT, ("%s: too many segments", __func__)); - KASSERT(buf->opt != NULL, ("%s: no Tx ring?", __func__)); - KASSERT(sgt != NULL, ("%s: no S/G table?", __func__)); - KASSERT(sgt->vaddr != NULL, ("%s: no S/G vaddr?", __func__)); - - memset(fd, 0, sizeof(*fd)); - - /* Populate and map S/G table */ - if (__predict_true(nsegs <= DPAA2_TX_SEGLIMIT)) { - sge = (struct dpaa2_sg_entry *)sgt->vaddr + sc->tx_data_off; - for (i = 0; i < nsegs; i++) { - sge[i].addr = (uint64_t)segs[i].ds_addr; - sge[i].len = (uint32_t)segs[i].ds_len; - sge[i].offset_fmt = 0u; - } - sge[i-1].offset_fmt |= 0x8000u; /* set final entry flag */ - - KASSERT(sgt->paddr == 0, ("%s: paddr(%#jx) != 0", __func__, - sgt->paddr)); - - error = bus_dmamap_load(sgt->dmat, sgt->dmap, sgt->vaddr, - DPAA2_TX_SGT_SZ, dpaa2_dmamap_oneseg_cb, &sgt->paddr, - BUS_DMA_NOWAIT); - if (__predict_false(error != 0)) { - device_printf(sc->dev, "%s: bus_dmamap_load() failed: " - "error=%d\n", __func__, error); - return (error); - } - - buf->paddr = sgt->paddr; - buf->vaddr = sgt->vaddr; - sc->tx_sg_frames++; /* for sysctl(9) */ - } else { - return (EINVAL); - } - - fa = (struct dpaa2_fa *)sgt->vaddr; - fa->magic = DPAA2_MAGIC; - fa->buf = buf; - - fd->addr = buf->paddr; - fd->data_length = (uint32_t)buf->m->m_pkthdr.len; - fd->bpid_ivp_bmt = 0; - fd->offset_fmt_sl = 0x2000u | sc->tx_data_off; - fd->ctrl = 0x00800000u; - - return (0); -} - -static int -dpaa2_ni_fd_err(struct dpaa2_fd *fd) -{ - return ((fd->ctrl >> DPAA2_NI_FD_ERR_SHIFT) & DPAA2_NI_FD_ERR_MASK); -} - -static uint32_t -dpaa2_ni_fd_data_len(struct dpaa2_fd *fd) -{ - if (dpaa2_ni_fd_short_len(fd)) { - return (fd->data_length & DPAA2_NI_FD_LEN_MASK); - } - return (fd->data_length); -} - -static int -dpaa2_ni_fd_format(struct dpaa2_fd *fd) -{ - return ((enum dpaa2_fd_format)((fd->offset_fmt_sl >> - DPAA2_NI_FD_FMT_SHIFT) & DPAA2_NI_FD_FMT_MASK)); -} - -static bool -dpaa2_ni_fd_short_len(struct dpaa2_fd *fd) -{ - return (((fd->offset_fmt_sl >> DPAA2_NI_FD_SL_SHIFT) - & DPAA2_NI_FD_SL_MASK) == 1); -} - -static int -dpaa2_ni_fd_offset(struct dpaa2_fd *fd) -{ - return (fd->offset_fmt_sl & DPAA2_NI_FD_OFFSET_MASK); -} - /** * @brief Collect statistics of the network interface. */ diff --git a/sys/dev/dpaa2/dpaa2_ni.h b/sys/dev/dpaa2/dpaa2_ni.h index 6fb0673fac09..fcd37501ebd0 100644 --- a/sys/dev/dpaa2/dpaa2_ni.h +++ b/sys/dev/dpaa2/dpaa2_ni.h @@ -490,8 +490,9 @@ struct dpaa2_ni_softc { struct dpaa2_channel *channels[DPAA2_MAX_CHANNELS]; struct dpaa2_ni_fq rxe_queue; /* one per DPNI */ + /* sysctl(9) */ struct dpaa2_atomic buf_num; - struct dpaa2_atomic buf_free; /* for sysctl(9) only */ + struct dpaa2_atomic buf_free; int irq_rid[DPAA2_NI_MSI_COUNT]; struct resource *irq_res; diff --git a/sys/dev/dpaa2/dpaa2_swp.h b/sys/dev/dpaa2/dpaa2_swp.h index 1b1383b4241f..20980c6b71b7 100644 --- a/sys/dev/dpaa2/dpaa2_swp.h +++ b/sys/dev/dpaa2/dpaa2_swp.h @@ -35,6 +35,7 @@ #include "dpaa2_types.h" #include "dpaa2_buf.h" #include "dpaa2_bp.h" +#include "dpaa2_frame.h" /* * DPAA2 QBMan software portal. @@ -200,10 +201,8 @@ #define DPAA2_EQ_DESC_SIZE 32u /* Enqueue Command Descriptor */ #define DPAA2_FDR_DESC_SIZE 32u /* Descriptor of the FDR */ -#define DPAA2_FD_SIZE 32u /* Frame Descriptor */ #define DPAA2_FDR_SIZE 64u /* Frame Dequeue Response */ #define DPAA2_SCN_SIZE 16u /* State Change Notification */ -#define DPAA2_FA_SIZE 64u /* SW Frame Annotation */ #define DPAA2_SGE_SIZE 16u /* S/G table entry */ #define DPAA2_DQ_SIZE 64u /* Dequeue Response */ #define DPAA2_SWP_CMD_SIZE 64u /* SWP Command */ @@ -284,54 +283,6 @@ struct dpaa2_scn { } __packed; CTASSERT(sizeof(struct dpaa2_scn) == DPAA2_SCN_SIZE); -/** - * @brief DPAA2 frame descriptor. - * - * addr: Memory address of the start of the buffer holding the - * frame data or the buffer containing the scatter/gather - * list. - * data_length: Length of the frame data (in bytes). - * bpid_ivp_bmt: Buffer pool ID (14 bit + BMT bit + IVP bit) - * offset_fmt_sl: Frame data offset, frame format and short-length fields. - * frame_ctx: Frame context. This field allows the sender of a frame - * to communicate some out-of-band information to the - * receiver of the frame. - * ctrl: Control bits (ERR, CBMT, ASAL, PTAC, DROPP, SC, DD). - * flow_ctx: Frame flow context. Associates the frame with a flow - * structure. QMan may use the FLC field for 3 purposes: - * stashing control, order definition point identification, - * and enqueue replication control. - */ -struct dpaa2_fd { - uint64_t addr; - uint32_t data_length; - uint16_t bpid_ivp_bmt; - uint16_t offset_fmt_sl; - uint32_t frame_ctx; - uint32_t ctrl; - uint64_t flow_ctx; -} __packed; -CTASSERT(sizeof(struct dpaa2_fd) == DPAA2_FD_SIZE); - -/** - * @brief DPAA2 frame annotation. - */ -struct dpaa2_fa { - uint32_t magic; - struct dpaa2_buf *buf; -#ifdef __notyet__ - union { - struct { /* Tx frame annotation */ - struct dpaa2_ni_tx_ring *tx; - }; - struct { /* Rx frame annotation */ - uint64_t _notused; - }; - }; -#endif -} __packed; -CTASSERT(sizeof(struct dpaa2_fa) <= DPAA2_FA_SIZE); - /** * @brief DPAA2 scatter/gather entry. */ diff --git a/sys/dev/dpaa2/dpaa2_types.h b/sys/dev/dpaa2/dpaa2_types.h index dbfac9ce0a40..dc1c232c09c2 100644 --- a/sys/dev/dpaa2/dpaa2_types.h +++ b/sys/dev/dpaa2/dpaa2_types.h @@ -40,6 +40,11 @@ #define DPAA2_MAX_CHANNELS 16 /* CPU cores */ #define DPAA2_MAX_TCS 8 /* Traffic classes */ +#define DPAA2_TX_SEGLIMIT (16u) /* for 64 KiB frames */ +#define DPAA2_TX_SEG_SZ (PAGE_SIZE) +#define DPAA2_TX_SEGS_MAXSZ (DPAA2_TX_SEGLIMIT * DPAA2_TX_SEG_SZ) +#define DPAA2_TX_SGT_SZ (PAGE_SIZE) /* in bytes */ + /** * @brief Types of the DPAA2 devices. */ diff --git a/sys/modules/dpaa2/Makefile b/sys/modules/dpaa2/Makefile index 816d6fa5cf4a..388303eed0c7 100644 --- a/sys/modules/dpaa2/Makefile +++ b/sys/modules/dpaa2/Makefile @@ -14,6 +14,7 @@ SRCS+= dpaa2_con.c SRCS+= dpaa2_buf.c SRCS+= dpaa2_channel.c SRCS+= dpaa2_types.c +SRCS+= dpaa2_frame.c SRCS+= dpaa2_cmd_if.c dpaa2_cmd_if.h SRCS+= dpaa2_swp_if.c dpaa2_swp_if.h From nobody Wed Apr 22 08:13:18 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0sRf509zz6bjYG for ; Wed, 22 Apr 2026 08:13:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0sRf3xNgz3blY for ; Wed, 22 Apr 2026 08:13:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776845598; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qFl0CMwaGlPs/yKVKrTLGmUPSB+OY4tmLkQOC9i2PrE=; b=G5RH/GKVm8rBZqQd3nxLRLlMesOPDvv+TSAgX2nMcmAuUUOW7ljLnpzzxx1kQJXHqvAVjo gqayF3bw2OHpoGj1E4BeZdq0FARrFa8gKw0mf9sgMItd78BLrVpLKDVxzIIz8O+P9+n6xY QhYqDCEicPkyZA9O8c39gDKYq84y2PKqwC3E9xnSuaTaJJAwmQFf93Um/3wEn/pgqUHdeq EHRYT64i1A4Po5d0CGeCclXnCHBt7oFOt3Q+c7p6l5fyXQJMxDl95hlYHsGayMkqUUAZ5N d8tjjrzvLZ/ILkKN5KkO/A08RatcSyQHJ8R3NoLGDsicbd6Wda2so8rWSkJjUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776845598; a=rsa-sha256; cv=none; b=Y76LiHhDgf3hvJzAtW3xwjGUGNTMz1YWoL6TeZCjqy/ZUi8lAdBhngeWykeTRC8YK+tAt+ OKPDPijcqCgBWer/iE6sGb4bx+NmtuvlthwxTQtt5VgnAP+82XCr3jgAY0zMw8b6BjmyZX GpqneZwbN25hXwR9OINJ5QnM3QMiV5GYycduFkNt61dfGRSglphuIN3T2g7dNhsjKaYxNl M644G24Z/QI0jUzJPuFcHCsa48gmQ0ZdeeGThL/17AQIA3SOwSdXSQR6whgXr/B3F7Ux+Z 1zTGtfIsoN+AIafkaodsfLZxBNvYMj915YY8MoKYaHULCkmR95i5degdM7yPmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776845598; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qFl0CMwaGlPs/yKVKrTLGmUPSB+OY4tmLkQOC9i2PrE=; b=gGPlE3L9FQk29gXHb/um4jODJdBycLQ+d/y4Z7qn+vpNXx76wB9uu43F8GXF02Q4QViUWD 80FsAEfK/ZQl0wSvQug1nWV2Q+XB2YWzToslSRVsvypAX2PyJxrYMy6RwnrZD+JPtY6X2V 2yvwbAV6O6AXuy4eLpNhLcgHy5nny17oJQpuNRrD8yJreZu3rcqubwcsHKdKq/EumML/5q oyj5QalIIWS4OEH4YtHn5CvG9JLdJqbJNcRpTDXU2AaPf6AjSiNUJF2VQJwfOrtCNu6Tt9 Bcqh5ZNwrKdQs7Ye+zLHLHTYfZwaCXuDzkyv9RljfYd9hNfbDvcPnbIXS5WYHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0sRf3NQ8z6Qd for ; Wed, 22 Apr 2026 08:13:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26921 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 08:13:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Salychev Subject: git: e27255a7f9e4 - stable/14 - dpaa2: Extract checksum statuses on ingress List-Id: Commits to the stable branches 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: dsl X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e27255a7f9e45dab9935b916d759498a093e36e5 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 08:13:18 +0000 Message-Id: <69e8831e.26921.375b254a@gitrepo.freebsd.org> The branch stable/14 has been updated by dsl: URL: https://cgit.FreeBSD.org/src/commit/?id=e27255a7f9e45dab9935b916d759498a093e36e5 commit e27255a7f9e45dab9935b916d759498a093e36e5 Author: Dmitry Salychev AuthorDate: 2026-04-13 12:46:49 +0000 Commit: Dmitry Salychev CommitDate: 2026-04-22 08:13:07 +0000 dpaa2: Extract checksum statuses on ingress In order to enable RX checksum offloading we need to check the meta-information for the (good) frames to see if the L3/4 checksums were calculated and if there was an error. The way the buffere are setup, the needed frame meta-information is already requested. All we have to do is make sure it is really part of the RX frame, that it is valid, and if the respective bits are set. Also do not forget to set the (dummy) csum_data as otherwise upper layers will just be cranky. An artefact of the past which likely should disappear. PR: 292006 Reviewed by: bz, tuexen Tested by: bz, tuexen Approved by: tuexen Obtained from: bz (initial version, D55320) MFC after: 3 days Sponsored by: Traverse Technologies (providing Ten64 HW for testing) Differential Revision: https://reviews.freebsd.org/D56383 (cherry picked from commit 4a6d7fc1a00b69925b3edc39acef0391487a8e3e) --- sys/dev/dpaa2/dpaa2_frame.c | 100 ++++++++++++++++++++++++++++++++++++++------ sys/dev/dpaa2/dpaa2_frame.h | 63 +++++++++++++++++++++++++++- sys/dev/dpaa2/dpaa2_ni.c | 76 ++++++++++++++++++++++++++++++++- sys/dev/dpaa2/dpaa2_ni.h | 6 ++- 4 files changed, 227 insertions(+), 18 deletions(-) diff --git a/sys/dev/dpaa2/dpaa2_frame.c b/sys/dev/dpaa2/dpaa2_frame.c index 4a155f7cb32f..005708228058 100644 --- a/sys/dev/dpaa2/dpaa2_frame.c +++ b/sys/dev/dpaa2/dpaa2_frame.c @@ -1,7 +1,8 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright © 2026 Dmitry Salychev + * Copyright (c) 2026 Dmitry Salychev + * Copyright (c) 2026 Bjoern A. Zeeb * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -29,6 +30,7 @@ #include #include +#include #include #include @@ -138,28 +140,102 @@ dpaa2_fd_offset(struct dpaa2_fd *fd) return (fd->offset_fmt_sl & DPAA2_FD_OFFSET_MASK); } +uint32_t +dpaa2_fd_get_frc(struct dpaa2_fd *fd) +{ + /* TODO: Convert endiannes in the other functions as well. */ + return (le32toh(fd->frame_ctx)); +} + +#ifdef _not_yet_ +void +dpaa2_fd_set_frc(struct dpaa2_fd *fd, uint32_t frc) +{ + /* TODO: Convert endiannes in the other functions as well. */ + fd->frame_ctx = htole32(frc); +} +#endif + int dpaa2_fa_get_swa(struct dpaa2_fd *fd, struct dpaa2_swa **swa) { - int rc; - - if (fd == NULL || swa == NULL) + if (__predict_false(fd == NULL || swa == NULL)) return (EINVAL); - if (((fd->ctrl >> DPAA2_FD_PTAC_SHIFT) & DPAA2_FD_PTAC_MASK) >= 0x4u) { - *swa = (struct dpaa2_swa *)PHYS_TO_DMAP((bus_addr_t)fd->addr); - rc = 0; - } else { + if (((fd->ctrl >> DPAA2_FD_PTAC_SHIFT) & DPAA2_FD_PTAC_PTA_MASK) == 0u) { *swa = NULL; - rc = ENOENT; + return (ENOENT); } - return (rc); + *swa = (struct dpaa2_swa *)PHYS_TO_DMAP((bus_addr_t)fd->addr); + + return (0); } int dpaa2_fa_get_hwa(struct dpaa2_fd *fd, struct dpaa2_hwa **hwa) { - /* TODO: To be implemented next. */ - return (ENOENT); + uint8_t *buf; + uint32_t hwo; /* HW annotation offset */ + + if (__predict_false(fd == NULL || hwa == NULL)) + return (EINVAL); + + /* + * As soon as the ASAL is in the 64-byte units, we don't need to + * calculate the exact length, but make sure that it isn't 0. + */ + if (((fd->ctrl >> DPAA2_FD_ASAL_SHIFT) & DPAA2_FD_ASAL_MASK) == 0u) { + *hwa = NULL; + return (ENOENT); + } + + buf = (uint8_t *)PHYS_TO_DMAP((bus_addr_t)fd->addr); + hwo = ((fd->ctrl >> DPAA2_FD_PTAC_SHIFT) & DPAA2_FD_PTAC_PTA_MASK) > 0u + ? DPAA2_FA_SWA_SIZE : 0u; + *hwa = (struct dpaa2_hwa *)(buf + hwo); + + return (0); +} + +int +dpaa2_fa_get_fas(struct dpaa2_fd *fd, struct dpaa2_hwa_fas *fas) +{ + struct dpaa2_hwa *hwa; + struct dpaa2_hwa_fas *fasp; + int rc; + + if (__predict_false(fd == NULL || fas == NULL)) + return (EINVAL); + + rc = dpaa2_fa_get_hwa(fd, &hwa); + if (__predict_false(rc != 0)) + return (rc); + + fasp = (struct dpaa2_hwa_fas *)&hwa->fas; + *fas = *fasp; + + return (rc); +} + +#ifdef _not_yet_ +int +dpaa2_fa_set_fas(struct dpaa2_fd *fd, struct dpaa2_hwa_fas *fas) +{ + struct dpaa2_hwa *hwa; + uint64_t *valp; + int rc; + + if (__predict_false(fd == NULL || fas == NULL)) + return (EINVAL); + + rc = dpaa2_fa_get_hwa(fd, &hwa); + if (__predict_false(rc != 0)) + return (rc); + + valp = (uint64_t *)fas; + hwa->fas = *valp; + + return (rc); } +#endif diff --git a/sys/dev/dpaa2/dpaa2_frame.h b/sys/dev/dpaa2/dpaa2_frame.h index 0b2a5a7d8e74..ab83b402efa4 100644 --- a/sys/dev/dpaa2/dpaa2_frame.h +++ b/sys/dev/dpaa2/dpaa2_frame.h @@ -1,7 +1,8 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright © 2026 Dmitry Salychev + * Copyright (c) 2026 Dmitry Salychev + * Copyright (c) 2026 Bjoern A. Zeeb * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -56,8 +57,13 @@ #define DPAA2_FD_SL_SHIFT (14) #define DPAA2_FD_LEN_MASK (0x3FFFFu) #define DPAA2_FD_OFFSET_MASK (0x0FFFu) +#define DPAA2_FD_PTAC_PTV2_MASK (0x1u) +#define DPAA2_FD_PTAC_PTV1_MASK (0x2u) +#define DPAA2_FD_PTAC_PTA_MASK (0x4u) #define DPAA2_FD_PTAC_MASK (0x7u) #define DPAA2_FD_PTAC_SHIFT (21) +#define DPAA2_FD_ASAL_MASK (0xFu) +#define DPAA2_FD_ASAL_SHIFT (16) /* * DPAA2 frame annotation sizes @@ -73,6 +79,31 @@ #define DPAA2_FA_SWA_SIZE 64u /* SW frame annotation */ #define DPAA2_FA_HWA_SIZE 128u /* HW frame annotation */ #define DPAA2_FA_WRIOP_SIZE 128u /* WRIOP HW annotation */ +#define DPAA2_FA_HWA_FAS_SIZE 8u /* Frame annotation status */ + +/* + * DPAA2 annotation valid bits in FD[FRC]. + * + * See 7.31.2 WRIOP FD frame context (FRC), + * LX2160A DPAA2 Low-Level Hardware Reference Manual, Rev. 0, 06/2020 + */ +#define DPAA2_FD_FRC_FASV (1 << 15) +#define DPAA2_FD_FRC_FAEADV (1 << 14) +#define DPAA2_FD_FRC_FAPRV (1 << 13) +#define DPAA2_FD_FRC_FAIADV (1 << 12) +#define DPAA2_FD_FRC_FASWOV (1 << 11) +#define DPAA2_FD_FRC_FAICFDV (1 << 10) + +/* + * DPAA2 Frame annotation status word. + * + * See 7.34.3 Frame annotation status word (FAS), + * LX2160A DPAA2 Low-Level Hardware Reference Manual, Rev. 0, 06/2020 + */ +#define DPAA2_FAS_L3CV (1 << 3) /* L3 csum validated */ +#define DPAA2_FAS_L3CE (1 << 2) /* L3 csum error */ +#define DPAA2_FAS_L4CV (1 << 1) /* L4 csum validated*/ +#define DPAA2_FAS_L4CE (1 << 0) /* L4 csum error */ /** * @brief DPAA2 frame descriptor. @@ -126,13 +157,18 @@ struct dpaa2_hwa_wriop { CTASSERT(sizeof(struct dpaa2_hwa_wriop) == DPAA2_FA_WRIOP_SIZE); /** - * @brief DPAA2 hardware frame annotation (accelerator-specific annotation). + * @brief DPAA2 hardware frame annotation. * * See 3.4.1.2 Accelerator-specific annotation, * LX2160A DPAA2 Low-Level Hardware Reference Manual, Rev. 0, 06/2020 */ struct dpaa2_hwa { union { + /* Keep fields common to all accelerators at the top. */ + struct { + uint64_t fas; + } __packed; + /* Keep accelerator-specific annotations below. */ struct dpaa2_hwa_wriop wriop; }; } __packed; @@ -159,6 +195,20 @@ struct dpaa2_swa { } __packed; CTASSERT(sizeof(struct dpaa2_swa) == DPAA2_FA_SWA_SIZE); +/** + * @brief Frame annotation status word. + * + * See 7.34.3 Frame annotation status word (FAS), + * LX2160A DPAA2 Low-Level Hardware Reference Manual, Rev. 0, 06/2020 + */ +struct dpaa2_hwa_fas { + uint8_t _reserved1; + uint8_t ppid; + uint16_t ifpid; + uint32_t status; +} __packed; +CTASSERT(sizeof(struct dpaa2_hwa_fas) == DPAA2_FA_HWA_FAS_SIZE); + int dpaa2_fd_build(device_t, const uint16_t, struct dpaa2_buf *, bus_dma_segment_t *, const int, struct dpaa2_fd *); @@ -168,7 +218,16 @@ int dpaa2_fd_format(struct dpaa2_fd *); bool dpaa2_fd_short_len(struct dpaa2_fd *); int dpaa2_fd_offset(struct dpaa2_fd *); +uint32_t dpaa2_fd_get_frc(struct dpaa2_fd *); +#ifdef _not_yet_ +void dpaa2_fd_set_frc(struct dpaa2_fd *, uint32_t); +#endif + int dpaa2_fa_get_swa(struct dpaa2_fd *, struct dpaa2_swa **); int dpaa2_fa_get_hwa(struct dpaa2_fd *, struct dpaa2_hwa **); +int dpaa2_fa_get_fas(struct dpaa2_fd *, struct dpaa2_hwa_fas *); +#ifdef _not_yet_ +int dpaa2_fa_set_fas(struct dpaa2_fd *, struct dpaa2_hwa_fas *); +#endif #endif /* _DPAA2_FRAME_H */ diff --git a/sys/dev/dpaa2/dpaa2_ni.c b/sys/dev/dpaa2/dpaa2_ni.c index f173bff6e65f..5f9282e120e4 100644 --- a/sys/dev/dpaa2/dpaa2_ni.c +++ b/sys/dev/dpaa2/dpaa2_ni.c @@ -1,8 +1,9 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright © 2021-2023 Dmitry Salychev - * Copyright © 2022 Mathew McBride + * Copyright (c) 2021-2026 Dmitry Salychev + * Copyright (c) 2022 Mathew McBride + * Copyright (c) 2026 Bjoern A. Zeeb * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -412,6 +413,7 @@ static int dpaa2_ni_set_dist_key(device_t, enum dpaa2_ni_dist_mode, uint64_t); /* Various subroutines */ static int dpaa2_ni_cmp_api_version(struct dpaa2_ni_softc *, uint16_t, uint16_t); static int dpaa2_ni_prepare_key_cfg(struct dpkg_profile_cfg *, uint8_t *); +static int dpaa2_ni_update_csum_flags(struct dpaa2_fd *, struct mbuf *); /* Network interface routines */ static void dpaa2_ni_init(void *); @@ -491,6 +493,7 @@ dpaa2_ni_attach(device_t dev) sc->rx_sg_buf_frames = 0; sc->rx_enq_rej_frames = 0; sc->rx_ieoi_err_frames = 0; + sc->rx_other_err_frames = 0; sc->tx_single_buf_frames = 0; sc->tx_sg_frames = 0; @@ -1737,6 +1740,9 @@ dpaa2_ni_setup_sysctls(struct dpaa2_ni_softc *sc) SYSCTL_ADD_UQUAD(ctx, parent, OID_AUTO, "rx_ieoi_err_frames", CTLFLAG_RD, &sc->rx_ieoi_err_frames, "QMan IEOI error"); + SYSCTL_ADD_UQUAD(ctx, parent, OID_AUTO, "rx_other_err_frames", + CTLFLAG_RD, &sc->rx_other_err_frames, + "Other Rx frames with errors"); SYSCTL_ADD_UQUAD(ctx, parent, OID_AUTO, "tx_single_buf_frames", CTLFLAG_RD, &sc->tx_single_buf_frames, "Tx single buffer frames"); @@ -3121,6 +3127,7 @@ dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, bus_addr_t released[DPAA2_SWP_BUFS_PER_CMD]; void *buf_data; int buf_len, error, released_n = 0; + bool update_csum_flags; error = dpaa2_fa_get_swa(fd, &swa); if (__predict_false(error != 0)) @@ -3131,6 +3138,7 @@ dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, buf = swa->buf; bch = (struct dpaa2_channel *)buf->opt; sc = device_get_softc(bch->ni_dev); + update_csum_flags = true; KASSERT(swa->magic == DPAA2_MAGIC, ("%s: wrong magic", __func__)); /* @@ -3145,6 +3153,14 @@ dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, } switch (dpaa2_fd_err(fd)) { + case 0: + /* + * FD[ERR] = 0 value is reserved to indicate that there is no + * error encoded in this field. See 3.4.5 Error handling, + * LX2160A DPAA2 Low-Level Hardware Reference Manual, Rev. 0, + * 06/2020. + */ + break; case 1: /* Enqueue rejected by QMan */ sc->rx_enq_rej_frames++; break; @@ -3152,8 +3168,10 @@ dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, sc->rx_ieoi_err_frames++; break; default: + sc->rx_other_err_frames++; break; } + switch (dpaa2_fd_format(fd)) { case DPAA2_FD_SINGLE: sc->rx_single_buf_frames++; @@ -3162,6 +3180,7 @@ dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, sc->rx_sg_buf_frames++; break; default: + update_csum_flags = false; break; } @@ -3193,6 +3212,14 @@ dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, m->m_pkthdr.flowid = fq->fqid; M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); + if (update_csum_flags && ((if_getcapenable(sc->ifp) & (IFCAP_RXCSUM | + IFCAP_RXCSUM_IPV6)) != 0)) { + error = dpaa2_ni_update_csum_flags(fd, m); + if (error != 0) + device_printf(sc->dev, "%s: failed to update checksum " + "flags: error=%d\n", __func__, error); + } + if (ctx->head == NULL) { KASSERT(ctx->tail == NULL, ("%s: tail already given?", __func__)); ctx->head = m; @@ -3634,6 +3661,51 @@ dpaa2_ni_prepare_key_cfg(struct dpkg_profile_cfg *cfg, uint8_t *key_cfg_buf) return (0); } +static int +dpaa2_ni_update_csum_flags(struct dpaa2_fd *fd, struct mbuf *m) +{ + struct dpaa2_hwa_fas fas; + uint32_t status; + int rc; + + if (__predict_false((dpaa2_fd_get_frc(fd) & DPAA2_FD_FRC_FASV)) == 0u) + return (EINVAL); + + /* + * XXX-DSL: Frame context of the frame descriptor (FD[FRC]) contains + * an Accelerator ID in the MSbits on some SoCs (e.g. LS1088A), + * but a frame ParseSummary on the others (e.g. LX2160A). + * However, frame annotation valid bits seem to be at the + * same offsets. This is the reason why different accelerators + * are treated the same here. It isn't clear whether this is + * a hardware limitation of the SoCs, version of the firmware + * or DPL configuration. + */ + + rc = dpaa2_fa_get_fas(fd, &fas); + if (rc != 0) + return (rc); + + status = le32toh(fas.status); + rc = 0; + + /* L3 */ + if ((status & DPAA2_FAS_L3CV) != 0) { + m->m_pkthdr.csum_flags |= CSUM_L3_CALC; + if ((status & DPAA2_FAS_L3CE) == 0) + m->m_pkthdr.csum_flags |= CSUM_L3_VALID; + } + /* L4 */ + if ((status & DPAA2_FAS_L4CV) != 0) { + m->m_pkthdr.csum_flags |= CSUM_L4_CALC; + m->m_pkthdr.csum_data = 0xffff; + if ((status & DPAA2_FAS_L4CE) == 0) + m->m_pkthdr.csum_flags |= CSUM_L4_VALID; + } + + return (rc); +} + static device_method_t dpaa2_ni_methods[] = { /* Device interface */ DEVMETHOD(device_probe, dpaa2_ni_probe), diff --git a/sys/dev/dpaa2/dpaa2_ni.h b/sys/dev/dpaa2/dpaa2_ni.h index fcd37501ebd0..9b1397fc544d 100644 --- a/sys/dev/dpaa2/dpaa2_ni.h +++ b/sys/dev/dpaa2/dpaa2_ni.h @@ -1,8 +1,9 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright © 2021-2023 Dmitry Salychev - * Copyright © 2022 Mathew McBride + * Copyright (c) 2021-2023 Dmitry Salychev + * Copyright (c) 2022 Mathew McBride + * Copyright (c) 2026 Bjoern A. Zeeb * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -466,6 +467,7 @@ struct dpaa2_ni_softc { uint64_t rx_sg_buf_frames; uint64_t rx_enq_rej_frames; uint64_t rx_ieoi_err_frames; + uint64_t rx_other_err_frames; uint64_t tx_single_buf_frames; uint64_t tx_sg_frames; From nobody Wed Apr 22 08:21:06 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0scf25MVz6bkJQ for ; Wed, 22 Apr 2026 08:21:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0scf0vzCz3g7Q for ; Wed, 22 Apr 2026 08:21:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776846066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cGQZ9hJbawDZ9TBICjDN75GQ7ggurLXkR5O2UcAcPzY=; b=f+wQNO+tvgHtyg2Yl7YaHObwT7ZXGvYqU0U9kwcFw2Wr8zUTTHY+ennkXxAD3w9I8oRINT 5WebcMNuoTIlS8FGqYK0P6OnKM8yoh8gl42w6yR6qWEYD/YrBb14k9Z84e3XSvyiJcpCiB 7knwpdixyn3vEFlAKRb0c3iTP4gJwXWXQ4ChvJnHiSx/hMm/Fp9KmY8D1iSb4SdoPe8Y2Z jtBWoFEpgsIditf8Xi4WSRpQ/+b61wmuUSRUCZ4uO3AQhpLe9N/mJimC/UULNcYaqmRs2x M+OuMhH0qhBhiiFQ9Siu88qTgYU1eG3WAXYgWFzpcjleqVX3aukUrte+vuMKlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776846066; a=rsa-sha256; cv=none; b=jce3tmI7b3OLu0a9VZkZJq3HRQ+h2BiDxpVkrkDjpDLmGFtvOHeuc7/7A4q0ndDWL5sIcp X2xBuCvgDPxTQVXXU7emZxhnmcvJswnrgRHQhfRJ3x2R+KpE1gBv6QAHnmYpz4s/kPFP6s aF/vnIzJiahHHcvrJHI2E8SiPD7wO0U2LarzN2Xn9AZ0Rv+lpoKy28V+s/p0GCy3iVSCLB WOynEaESolS0z2t04mAtjAnXZ7DnLnNfW01Gxewuj6nx5EBx+co2m8E7tcatyC0S4roULZ j2ArAiwHw/sx8Eb1NOgoanJqtm6FP/3Iykl0ZvJqe9p6fhpwOGOBvGmFM+gWoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776846066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cGQZ9hJbawDZ9TBICjDN75GQ7ggurLXkR5O2UcAcPzY=; b=LalfoKDY3XpGMfBOSzVbKsbsV2f/EFK1b6GImbvk0gzOPHFfLKiafLg/iNgPvHrBgQUB18 ihDpKvS/dlZD3iX/DjNX775jmKE97CusZqiZtBk+THTnTubjgKZrvOTG800o0CTj+ap1je aYjvIYxIfbHgWBy2kx3dmQ64GMgfUtdwi2DvQt2HdC16Meio0XvSf7vqKo3vMCPw3fXSW3 mn29kGqrR+lAhXHCQLY8sK8i8xncPQUvuI/7GwbV1mqvn2kzp7IIuK+aPy5kVnzSk89eiu 9bKuJC/7MRjt5WAh97GLRUVy4ZcCdPadWQbLxMK1BfDXXaKzcDC4zFLlKD2/FQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0scf0GyDz72x for ; Wed, 22 Apr 2026 08:21:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26bb3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 08:21:06 +0000 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=B8rg?=rav Subject: git: 54a4e4cdbf3b - stable/15 - du: Complete libxo transition List-Id: Commits to the stable branches 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: 54a4e4cdbf3bd629b5f882c74076cf7a8c2167ac Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 08:21:06 +0000 Message-Id: <69e884f2.26bb3.11ecd5b5@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=54a4e4cdbf3bd629b5f882c74076cf7a8c2167ac commit 54a4e4cdbf3bd629b5f882c74076cf7a8c2167ac Author: Dag-Erling Smørgrav AuthorDate: 2026-04-15 14:12:30 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-04-22 08:20:45 +0000 du: Complete libxo transition * Use xo_warn() / xo_err() instead of warn() / err(). * Add a test case for the POSIX-mandated stdout error check. * While here, don't assume the size of off_t, address some style issues, and broaden the use of bool instead of int. * Reorder SEE ALSO section. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D56402 (cherry picked from commit 6c18dd3eb42b50fddb6d9605ddde1362ae9c504a) --- usr.bin/du/du.1 | 4 ++-- usr.bin/du/du.c | 50 +++++++++++++++++++++++---------------------- usr.bin/du/tests/du_test.sh | 18 ++++++++++++++++ 3 files changed, 46 insertions(+), 26 deletions(-) diff --git a/usr.bin/du/du.1 b/usr.bin/du/du.1 index 1b6d800b0285..3b330de7bc5b 100644 --- a/usr.bin/du/du.1 +++ b/usr.bin/du/du.1 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 16, 2025 +.Dd April 15, 2026 .Dt DU 1 .Os .Sh NAME @@ -225,8 +225,8 @@ Also display a grand total at the end: .Xr chflags 2 , .Xr fts 3 , .Xr libxo 3 , -.Xr xo_options 7 , .Xr symlink 7 , +.Xr xo_options 7 , .Xr quot 8 .Sh STANDARDS The diff --git a/usr.bin/du/du.c b/usr.bin/du/du.c index 16ca05fa9edc..bf138b1b5e36 100644 --- a/usr.bin/du/du.c +++ b/usr.bin/du/du.c @@ -35,7 +35,7 @@ #include #include #include -#include + #include #include #include @@ -67,8 +67,8 @@ struct ignentry { static bool check_threshold(FTSENT *); static void ignoreadd(const char *); static void ignoreclean(void); -static int ignorep(FTSENT *); -static int linkchk(FTSENT *); +static bool ignorep(FTSENT *); +static bool linkchk(FTSENT *); static void print_file_size(FTSENT *); static void prthumanval(const char *, int64_t); static void record_file_size(FTSENT *); @@ -91,6 +91,7 @@ main(int argc, char *argv[]) { FTS *fts; FTSENT *p; + int64_t num; off_t savednumber; int ftsoptions; int depth; @@ -189,11 +190,12 @@ main(int argc, char *argv[]) case 'r': /* Compatibility. */ break; case 't': - if (expand_number(optarg, &threshold) != 0 || - threshold == 0) { + if (expand_number(optarg, &num) != 0 || num == 0) { xo_warnx("invalid threshold: %s", optarg); usage(); - } else if (threshold < 0) + } + threshold = num; + if (threshold < 0) threshold_sign = -1; break; case 'x': @@ -239,7 +241,7 @@ main(int argc, char *argv[]) if (sflag) depth = 0; - if (!*argv) { + if (argc == 0) { argv = save; argv[0] = dot; argv[1] = NULL; @@ -262,13 +264,12 @@ main(int argc, char *argv[]) (void)signal(SIGINFO, siginfo); if ((fts = fts_open(argv, ftsoptions, NULL)) == NULL) - err(1, "fts_open"); - + xo_err(1, "fts_open"); xo_set_version(DU_XO_VERSION); xo_open_container("disk-usage-information"); xo_open_list("paths"); - while (errno = 0, (p = fts_read(fts)) != NULL) { + for (errno = 0; (p = fts_read(fts)) != NULL; errno = 0) { switch (p->fts_info) { case FTS_D: /* Ignore. */ if (ignorep(p)) @@ -313,7 +314,7 @@ main(int argc, char *argv[]) } xo_close_list("paths"); - if (errno) + if (errno != 0) xo_err(1, "fts_read"); if (cflag) { @@ -334,7 +335,7 @@ main(int argc, char *argv[]) exit(rval); } -static int +static bool linkchk(FTSENT *p) { struct links_entry { @@ -362,7 +363,7 @@ linkchk(FTSENT *p) number_buckets = links_hash_initial_size; buckets = malloc(number_buckets * sizeof(buckets[0])); if (buckets == NULL) - errx(1, "No memory for hardlink detection"); + xo_errx(1, "No memory for hardlink detection"); for (i = 0; i < number_buckets; i++) buckets[i] = NULL; } @@ -433,12 +434,12 @@ linkchk(FTSENT *p) free_list = le; } } - return (1); + return (true); } } if (stop_allocating) - return (0); + return (false); /* Add this entry to the links cache. */ if (free_list != NULL) { @@ -451,7 +452,7 @@ linkchk(FTSENT *p) if (le == NULL) { stop_allocating = 1; xo_warnx("No more memory for tracking hard links"); - return (0); + return (false); } le->dev = st->st_dev; le->ino = st->st_ino; @@ -462,7 +463,7 @@ linkchk(FTSENT *p) if (buckets[hash] != NULL) buckets[hash]->previous = le; buckets[hash] = le; - return (0); + return (false); } static void @@ -500,10 +501,10 @@ ignoreadd(const char *mask) ign = calloc(1, sizeof(*ign)); if (ign == NULL) - errx(1, "cannot allocate memory"); + xo_errx(1, "cannot allocate memory"); ign->mask = strdup(mask); if (ign->mask == NULL) - errx(1, "cannot allocate memory"); + xo_errx(1, "cannot allocate memory"); SLIST_INSERT_HEAD(&ignores, ign, next); } @@ -520,17 +521,18 @@ ignoreclean(void) } } -static int +static bool ignorep(FTSENT *ent) { struct ignentry *ign; if (nodumpflag && (ent->fts_statp->st_flags & UF_NODUMP)) - return (1); - SLIST_FOREACH(ign, &ignores, next) + return (true); + SLIST_FOREACH(ign, &ignores, next) { if (fnmatch(ign->mask, ent->fts_name, 0) != FNM_NOMATCH) - return (1); - return (0); + return (true); + } + return (false); } static void diff --git a/usr.bin/du/tests/du_test.sh b/usr.bin/du/tests/du_test.sh index 27076be8dc3e..dec01245fbad 100755 --- a/usr.bin/du/tests/du_test.sh +++ b/usr.bin/du/tests/du_test.sh @@ -295,6 +295,23 @@ t_flag_body() sort du.out } +atf_test_case stdout +stdout_head() +{ + atf_set "descr" "Failure to write to stdout" +} +stdout_body() +{ + ( + trap "" PIPE + sleep 1 + du 2>stderr + echo $? >result + ) | true + atf_check -o inline:"1\n" cat result + atf_check -o match:"stdout" cat stderr +} + atf_init_test_cases() { atf_add_test_case A_flag @@ -314,4 +331,5 @@ atf_init_test_cases() atf_add_test_case s_flag atf_add_test_case si_flag atf_add_test_case t_flag + atf_add_test_case stdout } From nobody Wed Apr 22 08:21:07 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0scg6Glhz6bkRG for ; Wed, 22 Apr 2026 08:21:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0scg1Q2Yz3g7S for ; Wed, 22 Apr 2026 08:21:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776846067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=byPYSeql/T1hlIEQDwzDzqc/xlfAeqbiD7R8P/jToq0=; b=ClUPbpKZHv4c5p/Hn6pn1U8OM9VNCKy0Ko7gw3E36Jjg0pQ1nTYeTrONkgGJzSYgRHmYJA 1T/rAl+j4QLbl7v74oKqpv/wDjFfxFvCXxMn5ILCNpLUHE/Znueu0x47wGgdqLrsLsZIFG B15FHh7FriyYNDYF2Res9Nd5ZGGY6uOzWzkHivOAWrCE3KjheBvud8tTwdpP1hzboINdDR /IRy6Ky0HnQhHQMTD8Umxz11yq/6kJEpZcXRyfySV8R1LV95YA52pKmxDDReT9Mp0OnXrz VFDD6TBY8YXVZ7YDsPfK+hltIVoHtfFwE3TvN+TtGmD+pWyQ3fnTQc7B0en6qQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776846067; a=rsa-sha256; cv=none; b=R+8peAQh4pBjh2qLQUh+qEtv5UU5o/pAEZ2m5DyV/ksaFvfv0B6uN7XwyR1DtMDztFkbX2 WIoIl2VVlCc5zkz4WoTeOipj2eg8W3/I89nii8oTM//d3Oisc2vJqgOPL9IiMmobvwcn3C kCGhS44SwwRnOfqlX0bhUleNuQzQhu/mwIUUN5FG6Q0iQolHFJF3DW5qY1bcHZnqjVX05x Ov46uw5R+qXZwPFZN/X0N6FIa9Y4hMLWm8C97KAtD9KvHve/dJFw03NzuVSFXCXN3y3Y3O j76jqIt6TlpwOBPvGWabcZBh69QQ1kYLzDmGxeOQpN3b4GFBPSjs5AL/AECFeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776846067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=byPYSeql/T1hlIEQDwzDzqc/xlfAeqbiD7R8P/jToq0=; b=DIhABnjI+XRDrRQ55fQKln9aLadpB/5oK3z7S69Jp6jXgFy6PvaB6RlrglyVU/Jr/wFfPw +JDsqrZVG+5RfZuf+sa807Msl6gAEZLUdwSF6k3GJJovxjJdsD02XZgxUGwJ4nwTJvdqnB EGMEjvDruh4IOuw6O6qqZ+gYDp3JXdBjDUKRbRaYJF7cE+C+OJoFM51YvckPKH3TIVeUba ZCWYqHqxxT8ygKzOuArzk6GvxLOPnezp/q6WK+ZA1sKaxM8rH3CDLoRll8KM/jw2vXlN6L 9o1c/EZAMyWhGwLRn0E2rFxzdgqCHw7mMurEyz8p/ToauadyOM4rZCQYb2tlIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0scg0kpRz6Wb for ; Wed, 22 Apr 2026 08:21:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27f15 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 08:21:07 +0000 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=B8rg?=rav Subject: git: 571317251807 - stable/15 - du: Fix t_flag test case List-Id: Commits to the stable branches 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: 571317251807adb7ee3519ee1a3dba11344b1619 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 08:21:07 +0000 Message-Id: <69e884f3.27f15.ff24838@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=571317251807adb7ee3519ee1a3dba11344b1619 commit 571317251807adb7ee3519ee1a3dba11344b1619 Author: Dag-Erling Smørgrav AuthorDate: 2026-04-15 14:50:32 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-04-22 08:20:45 +0000 du: Fix t_flag test case MFC after: 1 week Fixes: 3e5550d25c6d ("du: Add regression tests") Sponsored by: Klara, Inc. (cherry picked from commit e99b3f5e318626b45510e29993aabca1d161bfa0) --- usr.bin/du/tests/du_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/du/tests/du_test.sh b/usr.bin/du/tests/du_test.sh index dec01245fbad..58ff1c3ecbd8 100755 --- a/usr.bin/du/tests/du_test.sh +++ b/usr.bin/du/tests/du_test.sh @@ -276,7 +276,7 @@ si_flag_body() atf_check -o inline:'1.5M\tA\n1.6M\tB\n' du -A --si A B } -atf_add_test_case t_flag +atf_test_case t_flag t_flag_head() { atf_set "descr" "Verify -t output" From nobody Wed Apr 22 08:21:10 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0scl5TrVz6bk8X for ; Wed, 22 Apr 2026 08:21:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0sck25nVz3g3L for ; Wed, 22 Apr 2026 08:21:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776846070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eKNCKET+hwz2uDEtQs4Q8ankT++vQLrhJC05UNx3ovQ=; b=EWr3FPRyrt4Y/CHAvtiZo5Lg5qT3fkYWgZSqEwMlEiXyIbHsY5n/MmgGXii292W1kIFhLU rWRjv7EIzrBeN84907EO0d4n/cS5JHJkAxoMvTqIzorWTH/QaNV05Wo84VdiZMdjdFVN5Y 81sQNoJP5HIM/HXq1ezKf53FkyIu1DRwd3RrceV2w6K5r0CiU0IJmBR0s/yxvLDYNcOKWZ 1PXYmePKRP0fLrb9f5q5X7LqYO4npPu+KrawEI0XFG05wzUXNdZtIsDSO5O6loVj07x6Lq N5YE071bCPEVlFRx2CbPbsmcWiPw5SYWRKboBQxvmGCxgciVhu3VUUSzevb+jg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776846070; a=rsa-sha256; cv=none; b=XfZVfFB6sQ+6ApDz2c6Bbg5rXKoATSPB6mju3TT7U796elN/P8pMJJko2jjXfi0FUlHn6U /ekUu0L4iROHFWic7nt2X+gnLoHMefPHgRt2ZwL1H+jsbhGPgLgduVcWe9GF63IpV+IwXW JZuJAqJV2jJVf2ykWLCA2mSmiv5c8Y6BxmKRL2rw6HpZaT+YL995p9QgHIWSjeS/jjkiw6 XmaJiOf/i7YaGC1kkh17IjWLfOo++0jh6J0Eand4zaUrfA/f5TWdQk8523Kw37Q8H0oNjE RF6JdPwqStg7lBYdfhNCuyO9rgitwmNuRJ/5FopgZTYjHX1i1i12bvXBOMNNGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776846070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eKNCKET+hwz2uDEtQs4Q8ankT++vQLrhJC05UNx3ovQ=; b=x9q/iqQjXCy5FMgcsgEZl/pmVrUfgMi1nyjZx1soy/13Tx1xPbLB9WG9fh52z8JtMAgi4z iyLCFxmoWdD/Ajjr5BvsbGe54Qf81JcHkkZxfDXTXBwBT7x3z/NIxmpPZGCb12kR8CPkMU 51R1/1YxPbphiDQsxnYH3wMmI/qqPE4Qr4ynUi1yd2CvxbNLshAwOejDeAq2NKiESdG1Nb uCUkCnAOS+V8hmCwT6pSzW9/8EW1zQIc393IxyI/HwgfQ9GHBGq6mJdfGdHJ4icN5U3CBG 7BzQTlXC0x6FwNUilLZrOIs6FhSQbTU/tGihArDro08GgZ+H6ITd96px2czg+w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0sck1bNgz6f2 for ; Wed, 22 Apr 2026 08:21:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27be1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 08:21:10 +0000 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=B8rg?=rav Subject: git: a1f848a8d9b8 - stable/14 - du: Fix t_flag test case List-Id: Commits to the stable branches 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: a1f848a8d9b8f4efdfdf9be47804ac0662ab6372 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 08:21:10 +0000 Message-Id: <69e884f6.27be1.7369d147@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a1f848a8d9b8f4efdfdf9be47804ac0662ab6372 commit a1f848a8d9b8f4efdfdf9be47804ac0662ab6372 Author: Dag-Erling Smørgrav AuthorDate: 2026-04-15 14:50:32 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-04-22 08:20:53 +0000 du: Fix t_flag test case MFC after: 1 week Fixes: 3e5550d25c6d ("du: Add regression tests") Sponsored by: Klara, Inc. (cherry picked from commit e99b3f5e318626b45510e29993aabca1d161bfa0) --- usr.bin/du/tests/du_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/du/tests/du_test.sh b/usr.bin/du/tests/du_test.sh index 27076be8dc3e..b60433da7dc0 100755 --- a/usr.bin/du/tests/du_test.sh +++ b/usr.bin/du/tests/du_test.sh @@ -276,7 +276,7 @@ si_flag_body() atf_check -o inline:'1.5M\tA\n1.6M\tB\n' du -A --si A B } -atf_add_test_case t_flag +atf_test_case t_flag t_flag_head() { atf_set "descr" "Verify -t output" From nobody Wed Apr 22 08:21:11 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0scm715vz6bk8c for ; Wed, 22 Apr 2026 08:21:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0scl68d6z3g3N for ; Wed, 22 Apr 2026 08:21:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776846071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nJCuOXp+2NpfQ7ehRkOb7itNL7EYzYAon1OfUhM0vug=; b=sbogum21glT+gV1ufPlHJ+9R9o0L7qIs1BbaC2halEDG7vwuPQTFxnYEPRA3G6pvAWo9m1 0DrTbwQOr/XnsPe1tK7/bKmcb6xtb2+auWOxL1TOk6VaYeaPoiNAT/FYz7EhSpCnGf3y7a ag8rdLDPVt3jhUnCONBjkqV46EU1MgGK5WmBPr0TlvweG1+KkPmRcbaWMvy7dszZvf0Y/T nUwlMJu3c233HxK0A3Mec2TVTjIU9BnSi9tMdk3mcRTXhuVuBfvCjhGo/X1OcH5khgRod7 h9lxMa2KWT1CHkc2kBfVck/tXAzF96miLx/asQx6d7JTSsV0HFp2JnCEMsO9Gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776846071; a=rsa-sha256; cv=none; b=IodqRe+VRc1GpFsrIdXL0ZrxTvUhi4NxpxwnquWYUOz9BP/0w9BLJ7cuorOp9qOeF0XDNm Sf7d3fMaDnfbTgoOUx3GqF3q7J6Q7UpUct1HaiXwdrxrI803qi0P1r6yylZ/XUFCyln8ha VLsPGsgtUXcH8Ml7GJ9iJuqWtBPBaR7g9qDk/Mg/cRpcBStB8k28Ymh54Oeb+votqzh4Ob IVy59pGA6iu+kTrxzEzGMm5FwIVNopRab25kOj0Oy5L8+IysC3Gl+Ba/ONDh7tHVS1Zjjp H3h4hj0Z+jwKvEeRVuaxxLpamwFYH3SggQohTOt2H7iaZPKC9ebEb33NgwItCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776846071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nJCuOXp+2NpfQ7ehRkOb7itNL7EYzYAon1OfUhM0vug=; b=HztfYiv0QgfWAOH2+nukLQAzuHpBL8ACuGHeMsFnOH/5ZUEAk0J61+3YusxMe7z/9QhizO I29TGNqNfnD4aiEWrRCwu067ICR7fWGcd84lY+ymKVZUU1I/WpC6fZWJsFNC7G4kDRTtpS HSHM+ov08vLPXXBvCMy9yOXazZB7oYrFkfgCY8KYrqRk0LVrxscuVHpW8/jYvVKFbUw7Um 0jsAFyCN4agzvVCTP58KLFvtBB/KryTKqHUrREV6gurlp2XFGtLhKC9oq4qy1Q/ExAbeUD Z3OrWZDRSjgsgStK2O+PJS5yuFbHF+JiYUuKqTmcVTopLF0mPa0600Z4l6Tjxg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0scl2SlHz6Rv for ; Wed, 22 Apr 2026 08:21:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 273c2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 08:21:11 +0000 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=B8rg?=rav Subject: git: 10ed7115165e - stable/14 - du: Set BLOCKSIZE before running 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: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 10ed7115165eb967b65231d447db52cfce1fb872 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 08:21:11 +0000 Message-Id: <69e884f7.273c2.18bf8bbd@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=10ed7115165eb967b65231d447db52cfce1fb872 commit 10ed7115165eb967b65231d447db52cfce1fb872 Author: Dag-Erling Smørgrav AuthorDate: 2026-04-18 12:48:04 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-04-22 08:20:53 +0000 du: Set BLOCKSIZE before running tests Several testcases assume BLOCKSIZE=K, so set it at the top of the script. This fixes an issue where the tests would sometimes fail when run under sudo. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D56476 (cherry picked from commit d618ba314d1452c1cb4360e15ae1c80adac48306) --- usr.bin/du/tests/du_test.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.bin/du/tests/du_test.sh b/usr.bin/du/tests/du_test.sh index b60433da7dc0..ca2cc92ceb93 100755 --- a/usr.bin/du/tests/du_test.sh +++ b/usr.bin/du/tests/du_test.sh @@ -23,6 +23,10 @@ # SUCH DAMAGE. # +# This is the default in a FreeBSD login session, but may be unset if +# run under sudo or in a different environment. +export BLOCKSIZE=K + require_sparse_file_support() { if ! getconf MIN_HOLE_SIZE "$(pwd)"; then From nobody Wed Apr 22 08:21:08 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0scj2wTkz6bkPP for ; Wed, 22 Apr 2026 08:21:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0sch1m7Qz3fv1 for ; Wed, 22 Apr 2026 08:21:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776846068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s0VbfCsLzXvDNQJJ2dz5OWp8gZhvMebqMTFHFMG8hBY=; b=M21NI91QOactG7asIaaEGGAHEnrpSaAhnAvsi2yWbygW8iEh2VAIlTAaNtWoe65k6R30Tc pKQxz8g+Cbl66LEICOEjWDg454PMaXi0MJWPW5e8HPH+c9i0bbr8Am71udwET3UQPrcpQV vFCGzvVOHgrzrreJMtJ1E7KoWnzBiiGDkoFyS4Bd4ly8MYKmSb9Hjz/USxa4vh4Xrete7I Jc/mEJANjNEsT5zuAi3e9O9tQA+rEwwXeKG3wWmdoTnBVAcDnQtXdeV7DkLFo34xLvLwZ8 aPBiales1IQt1hAE5w/MhgAguKLeoKifXnZaZ6FeBxQxkSo0LcZgGZjvpvzwuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776846068; a=rsa-sha256; cv=none; b=guVf51Q7EU/0Ou5l87LUDUSRH5gKSwlfAJbXi7ZE/r0Cvu0MUbGRhVOOewnixbIB8aa7fx AykrGUjGLk8cBxkvtCpz82W/miE/6+8ULtfYbyrcA3k0Yt6gdPnnEvv+uIQJz8+y4luFdB LIJh/bbDpcijcVZfwlnYGvf2df3Bvr5tpPGBZEMfMteDGMLYjdTeolo9fWEku/FNHmNAu3 iqzseKNAxfISWAUoVhODW2gdHevPpZDS2q+xkMgRlA0s9Nb6bj6P9RfiOOhmG7HVEa1xPO DVJt9FuMiiDvNSWgGTx00RVUfeBI+yWjyW5pIGiBaS5UWC0z9tydwhEaFRIFsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776846068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s0VbfCsLzXvDNQJJ2dz5OWp8gZhvMebqMTFHFMG8hBY=; b=lqz+RexgKVjqmgS0LhjCoE61RocRGUkT/gYLLAvkmZOMEfzwqKwW48mZ608CjpfK+67mv4 S1RsQcVRmrZTHKjHVDNIoekx/Yhb41s0Lw3krIZ9MqfzeYvqbYaDdUeJiqNzlmwxPzTqMK +RsAQDSmzZ79gkRJl3J9OzaOMMoW2cSMzLaZLrp2n4kPb3zEOCGBCUG3szPWEYNuLkh76E XKK8Z1mBeBC2LbdcPloB5lVL+pxYko1wuaukmEYLpSh/EaTJqLVtTYHW6C62Dxf/6qDb1D b5N61fgRuHRMvyRmVoGqgmCsk1jDGpsQJAnOK1VNb1j/ORwF78W15EoxHCMwZw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0sch1M9Wz72y for ; Wed, 22 Apr 2026 08:21:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25a79 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 08:21:08 +0000 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=B8rg?=rav Subject: git: 41ba2e3cb443 - stable/15 - du: Set BLOCKSIZE before running 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: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 41ba2e3cb443e46bbeb01d72d9078a4739c9f0bb Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 08:21:08 +0000 Message-Id: <69e884f4.25a79.6191ac75@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=41ba2e3cb443e46bbeb01d72d9078a4739c9f0bb commit 41ba2e3cb443e46bbeb01d72d9078a4739c9f0bb Author: Dag-Erling Smørgrav AuthorDate: 2026-04-18 12:48:04 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-04-22 08:20:46 +0000 du: Set BLOCKSIZE before running tests Several testcases assume BLOCKSIZE=K, so set it at the top of the script. This fixes an issue where the tests would sometimes fail when run under sudo. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D56476 (cherry picked from commit d618ba314d1452c1cb4360e15ae1c80adac48306) --- usr.bin/du/tests/du_test.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.bin/du/tests/du_test.sh b/usr.bin/du/tests/du_test.sh index 58ff1c3ecbd8..16accdcb42a1 100755 --- a/usr.bin/du/tests/du_test.sh +++ b/usr.bin/du/tests/du_test.sh @@ -23,6 +23,10 @@ # SUCH DAMAGE. # +# This is the default in a FreeBSD login session, but may be unset if +# run under sudo or in a different environment. +export BLOCKSIZE=K + require_sparse_file_support() { if ! getconf MIN_HOLE_SIZE "$(pwd)"; then From nobody Wed Apr 22 08:21:23 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0scz4SQfz6bkRR for ; Wed, 22 Apr 2026 08:21: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0scz1VDcz3g8l for ; Wed, 22 Apr 2026 08:21:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776846083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2X/4DHFapf4bYnsvozm6QBg8YcmH1zyYxbkB3jQ54nE=; b=vWqTCKsGtke6ATxw2csSxZqVrBkm5RhQ6a1Me++SmJG+LVYe0c4Gea8ahmFOxTaY3ujfib ZAUjj8O7r8J6z8LkcJ0lD75auiqigOnkwZ6Yc2KUqd0cNUVaGc/oYqqhxmfXMK/8uNgZy8 PTbKhoDajW1OSXfXwP1BpS7s9p5S8hkHWABP5Azr1np2xagOWIRgQr+qUJlJId5XjUhO36 2iRLOYtJ73yMP7Lf+Y+MqFM+KRtM+RJwXhi6SUE9Vz55sl2EEpim7QuNZWEuva3Jlg09VQ RP2g/DW6ul++abbT0z0N40aQsn4EKzAhSIUBhSQb0LrC9RiD5V6uSEPOVchTjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776846083; a=rsa-sha256; cv=none; b=bsMHAVQXyQQRHH48WOl46AVux46u4QU0qHM4NpbVKMSViMveBXvr6ZUmRm9cqilMGLMGss ZWlhlMm7pkknRH+2y1XNuouDbfhx4Lylsbwapnf9pD3/v8Pbh1rhiBIS+VR7Wi/Lx/HQ0q ZVNp7h9R9+p7OFyCYAZbLrCz26IU37LwfbkUkA8YpLh6nkjsXi92oz4+qSJGJDVsXiQZth l62nlZ3OjGDJIi1xU9iID/dKclTXMl5uaOkyiOgTBE++P7vXBHAQii/KGp5P4Pcph2nsSJ o4Fm4ewJ5zg49jToQf96+ZcBujbe+gxEyRHtfjk9/d4SeQMTnue3DXfcAFj1nQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776846083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2X/4DHFapf4bYnsvozm6QBg8YcmH1zyYxbkB3jQ54nE=; b=AE4NyWSsoJvs0kVdFC+CnY++muFnZvjPX0ra8aba4kxMD0Li8+66ENSA+fq1wtj9czG61I NhmhE+oiqmEkyaMZTZkLOE+xBa57vkwXa3IqP+29AY5vXBkZ8bXh92rnV2BiveaWzYXgOc T86UxIV1LVCTg9RPollp72Dyhvwlw8Ns0slaJ4rjJ/hygg+PiiNYvzWDONq584N0b5JRP/ KluBnMLRQpRcZE7Pq9LZfoGOyrGE5cx5OyQIbpnxAmBNUORWuC5n9g5h0Nn7a2G3v+ecdW pKz2sypZfvhg+wpST9y+ozaTxFf2z5lpnupXWK7tf49ktKk7Rmc9BtxSfysMgg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0scz11n8z6Rx for ; Wed, 22 Apr 2026 08:21:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25b4e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 08:21:23 +0000 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=B8rg?=rav Subject: git: c2b8a5769704 - stable/13 - du: Set BLOCKSIZE before running 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: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c2b8a57697046b35200977672d67760b4a40fa91 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 08:21:23 +0000 Message-Id: <69e88503.25b4e.974c015@gitrepo.freebsd.org> The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c2b8a57697046b35200977672d67760b4a40fa91 commit c2b8a57697046b35200977672d67760b4a40fa91 Author: Dag-Erling Smørgrav AuthorDate: 2026-04-18 12:48:04 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-04-22 08:21:14 +0000 du: Set BLOCKSIZE before running tests Several testcases assume BLOCKSIZE=K, so set it at the top of the script. This fixes an issue where the tests would sometimes fail when run under sudo. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D56476 (cherry picked from commit d618ba314d1452c1cb4360e15ae1c80adac48306) --- usr.bin/du/tests/du_test.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.bin/du/tests/du_test.sh b/usr.bin/du/tests/du_test.sh index 0d7fc404b437..a4d8c780b74f 100755 --- a/usr.bin/du/tests/du_test.sh +++ b/usr.bin/du/tests/du_test.sh @@ -23,6 +23,10 @@ # SUCH DAMAGE. # +# This is the default in a FreeBSD login session, but may be unset if +# run under sudo or in a different environment. +export BLOCKSIZE=K + require_sparse_file_support() { if ! getconf MIN_HOLE_SIZE "$(pwd)"; then From nobody Wed Apr 22 09:22:19 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0tzH6KTRz6bqF4 for ; Wed, 22 Apr 2026 09:22:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0tzH53x2z3q0l for ; Wed, 22 Apr 2026 09:22:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776849739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fnXvxzaiFZB9rYnzN/uN9asm8dEICh5QbqJOjQ1n9nU=; b=ScbGjUipo+9ff211mwE3bQ+A9WQIKofJkp2rj1bAlzpXpMBy+ZKjGYcRHBzB0Zy92/P1H7 ZV8+ED35GcnKvG/TbfoGPAvl55TztU2bcua1KUHC7fP7m6R17nHHwhYDAEkizXKF9DPww6 oj9Z/7I9VsjoC4MjOhne+dwNWfVSi4m8Msx9PoPSPLoF6b0ilOnqj9y2ZOgUsAdCUD9dBX actxTEH5DwoRhikAqWJ9A/5K8++YUXLELPdFpFg0/Rf31VyQjcGkn7cpz5kh7foTClqrvx 1jc7/n52IB0Z46C983oqWnICt0t+OA3FOi7Bst0TqgMFfpFowiprFu7RclUC+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776849739; a=rsa-sha256; cv=none; b=F86F5nvTEDBpoAz1cyPsM34ymObhIlRfwtQtlbH0EQHz+yEn18OKS2LNqodm4YaiY5uAE3 B8tlzc6+t/te7nk/W7N82vvyr08lybUNAK5CHESqae9UVcHRKgAcwxttUM1Dq621jcgJ6T wtUWxDrxnhne+3fynJk5gZuoPNiEfRmoK0k/29bWJ3uSXjlXAecgZN6EEkOqj7EmvMPP2y kECVWPmLS+o7/LA1etaiXhs930zir27DfHeTsQiMkXVdRYMBssSwQ+WTL6XrOWyuoG01WF 1Ai/4wFJVFSW9GlHBQS8T/uQpBpCem/Yj5HiwXAxrrq21mQk9xGT0WgCxawQTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776849739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fnXvxzaiFZB9rYnzN/uN9asm8dEICh5QbqJOjQ1n9nU=; b=cBBrDZdHpj+fN/O3aN1AVDrpEaEx7iLOSU19QqOyEKEW2Jlfa6voZWR7xNUL/T5QZSkdFg xl2fs4qVwt5Erx9LUFKdiSxdxOvoTFFoK9kx5xJPU+NvhZ4OLdyUTOL4SRcAGCHo78LBnB 7FxLtPc99FxIYaNns23x98b9ZtdzsYFhFwFhV3+SrU4ygfM+EqkV6oSeIxK4U/SeJyOTQY J27k+zwCEt5Xn4H5zBXnvvBmW5rO36bh/amEruDnOliYm4te7kvXfFVjYqO7twLvKL4wQc DvQQcY0OTfbKeJ+VhNemOU1SjZzvu83VIdjyf71LUDJssuLJSWtHRM9wDvLtnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0tzH4bgrz8bm for ; Wed, 22 Apr 2026 09:22:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3680c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 09:22:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 15578e21ea52 - stable/15 - librpcsec_gss: Fix a typo in a source code 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 15578e21ea5283994516ebeb80170abcd1877840 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 09:22:19 +0000 Message-Id: <69e8934b.3680c.3464ee53@gitrepo.freebsd.org> The branch stable/15 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=15578e21ea5283994516ebeb80170abcd1877840 commit 15578e21ea5283994516ebeb80170abcd1877840 Author: Gordon Bergling AuthorDate: 2026-04-19 07:57:03 +0000 Commit: Gordon Bergling CommitDate: 2026-04-22 09:21:01 +0000 librpcsec_gss: Fix a typo in a source code comment - s/verfier/verifier/ (cherry picked from commit 59dacd7f008f54a335ec49e747bb8ddac67b0a83) --- lib/librpcsec_gss/rpcsec_gss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librpcsec_gss/rpcsec_gss.c b/lib/librpcsec_gss/rpcsec_gss.c index 4a0de8b70b67..276fa1423b0f 100644 --- a/lib/librpcsec_gss/rpcsec_gss.c +++ b/lib/librpcsec_gss/rpcsec_gss.c @@ -100,7 +100,7 @@ struct rpc_gss_data { rpc_gss_options_req_t gd_options; /* GSS context options */ enum rpcsec_gss_state gd_state; /* connection state */ gss_buffer_desc gd_verf; /* save GSS_S_COMPLETE - * NULL RPC verfier to + * NULL RPC verifier to * process at end of * context negotiation */ CLIENT *gd_clnt; /* client handle */ From nobody Wed Apr 22 09:22:20 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0tzK2l0kz6bqBm for ; Wed, 22 Apr 2026 09:22:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0tzJ61kCz3pgd for ; Wed, 22 Apr 2026 09:22:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776849740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IAMe4zk2RKQDZCuehCoMOgGLBgVPzBojhge5m7cQW4A=; b=IKLsJd3hbc1yI9bS5dYF2kTbJJurA6sBE/60m+lCMEkldsONp+OOHN02IxEYjTw5E1pK+m UGQRytCiMNCNQ4+v/YBz/hObVVKpQNfM4EE9dJwK3lIUAt7YYxLsBZMtMLRSLQRZeUHSXm Duuwt8glcUmovjf/VvTI6w3m4Vv8QaMroX97E7/Xe8ddw0TdCyr2rzkrOdI4FhJ817G/uD MZYXAdJjclCK0vW/7Bkt2fFYzRPlryiQU/SPAvyPAxFkK32sn180ffVXW3uM0r133VWR3C M+YvvOkb27P/bMrZXS/A1VKe3DJsy85FBVNkjg59XBhG/GCkUdjYIPCyvthx9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776849740; a=rsa-sha256; cv=none; b=mdRxhYhuvLjWgoMuSTARhw/3/0gHCchdGtLQdn62NoUnZ7VegCIejuSMgNmF0U+VNzMquX TXOKPE9+Ahy5NCcoCd3KdzMwh4RIpn1OPnZJzwmW5TPjSBVEWFxp7O9w5T0jHbB0jtiLeN +inpaqHEFY+6Ff5eDEAnQrG3VYv6kjcuIw3Z/DYztIH+NNCZawXY6awiVrBwSuuaxIuDGx z3B3iKs9DZTABlOeRtCNr9lBGlHhGaByjLUYSK7m0Wbuc4TNh7oKvNbY30KXy5NFoT3+tT ylKxxVMQtlha723CwaxvQAKkFdWJPjvMrmy30Qj/U8KRW88c2fp+4898bOZEVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776849740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IAMe4zk2RKQDZCuehCoMOgGLBgVPzBojhge5m7cQW4A=; b=gMoM3qJvLA+UJ8gT+39XxykqE/SVE//o28tcT3c9TI1rUyGkc+gjAaioBBSWMkmSzk5Jey Ta6hAtC22iVn5Sz9lmTyZc5o3u9+VbtVI5Lz0lwm8YMz5MYnDbq2boSYxFHwu5hwR4zdHq mM0GrfZxYFRJzGpmt6mTjdPlaksYClBsQSH1ZVYmjS2ptzvAQw8JBPUCDppA9kYZOxDVoJ 9VZO4P81FuIhvL2S8GbyekaqaMm3CPhYy0p8iY7qqW38SrkmAmO1k9HZyO/4mpj2WQpWmJ sr1mh6x1L/d6qhvHk86E9hJmx5I+BNuv7/XrzBvfsUEuizVDjcXIoUKKMg9vBg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0tzJ5RJRz8rC for ; Wed, 22 Apr 2026 09:22:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36887 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 09:22:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 47e007667573 - stable/15 - stand/powerpc: Fix a typo in a source code 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 47e00766757312229f84e07e76acd55f5b2ec805 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 09:22:20 +0000 Message-Id: <69e8934c.36887.672b5948@gitrepo.freebsd.org> The branch stable/15 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=47e00766757312229f84e07e76acd55f5b2ec805 commit 47e00766757312229f84e07e76acd55f5b2ec805 Author: Gordon Bergling AuthorDate: 2026-04-19 08:01:18 +0000 Commit: Gordon Bergling CommitDate: 2026-04-22 09:21:23 +0000 stand/powerpc: Fix a typo in a source code comment - s/limitiations/limitations/ (cherry picked from commit 4177af3b0e2db36238bbd6f973943f830d1ff46f) --- stand/powerpc/boot1.chrp/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/powerpc/boot1.chrp/Makefile b/stand/powerpc/boot1.chrp/Makefile index e67414584bc8..b91c0117b5a7 100644 --- a/stand/powerpc/boot1.chrp/Makefile +++ b/stand/powerpc/boot1.chrp/Makefile @@ -10,7 +10,7 @@ SRCS= boot1.c ashldi3.c syncicache.c memset.c CFLAGS+=-I${LDRSRC} # Load boot1.elf below kernel. # -# Due to limitiations in the way we load stuff, we have to avoid reusing +# Due to limitations in the way we load stuff, we have to avoid reusing # memory until the kernel MMU code has taken over. # # 0x38000 is high enough to not interfere with the trap area, but low From nobody Wed Apr 22 09:22:21 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0tzL1RTGz6bqF7 for ; Wed, 22 Apr 2026 09:22:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0tzK6fGKz3q0p for ; Wed, 22 Apr 2026 09:22:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776849741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5tUhvKVPI+wG//kcN8g4cddYBVfUQhFiqBBGP4N/tu4=; b=iX7ZAGARqQa9XQfcQA1gO94SKyKZvLiwmIJrOTYdl/RT+qxMxdDh9fGC+j0Iise8yCMs3I OTzgkT4N7UQXTy+WWTpYKr9tQC5EC9rOgjSarZo5lUhOmxTr7f6AV1CgkOkxwszTAsUVfZ PhNgUUSOkIToAaYrvA8Fx3je6bjB2qmhzqjVq1KvZeqXeteL8I5GhujzylXFomZEpf6dn/ 76hyPgMf23wlfamdKZZQqNnM85eJY2FOpNClkm4sgVQQwztJA76jtammIZHJV59jd7Gp1y zfJ6ZReMCKAUV2qjTL2aujNfxfo1fAd2gjE3lrlZUFU7u2IOVjMpz9AkJv04iw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776849741; a=rsa-sha256; cv=none; b=fegGHGPps+RYIz0+PqCm0qHezlnri3hfpwV03gl/NaPmZQFi6R1yupSwh3IkljWDsJVwca JdTuCeNZqAlwlzqUtg5CMAcD5bOSSB/ovs1JrTp0udCTuT+3VZyUNV9JuHhqJveW6ic490 oPg+ayG+UZrYmXBBiwqaRjSdHeEl5o0m0ZKkGoVnMpcxbG2tbgLFy9C3DK64kNbPqwmDs7 PDDikrSsD+Lhb/hYldMjyQFdysdx3fV4YmmOujge6lrlEtONpdGjowy3ih+H0PyIu9nAZa ekaTYnez9aKNN9d4zmFoAegX/TXueao9tRHN7NjWfFCanHUozrCYEuUYaGroiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776849741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5tUhvKVPI+wG//kcN8g4cddYBVfUQhFiqBBGP4N/tu4=; b=O34XXo8e49Kg9NyhFf+rsR9QAY8WNijdgsTT+XT2py6+kNBAKaSH5WJ7c3y97ozEaxFJhL HM2Nc/MyJVOyuH9GHNPTPYD6Rlu7iIoCxq1S79ERKvbHwysFact6vxieYicg/FSIFSkhWV ClNsLSTVMZHWJ41oQ+O52gWxObXGTvd/qFnaf5Exh1jfA+lp62kb6MygupZVIEj8jhENq7 AI0v+tLIhBffImtyfTtBOP+xYVnZDllQXoweZW+dJF0eKDIx2tMWk+uY0FLVN/OhH4sQ52 SI3S535vyqdiT7X7oQNHJ7SBRpsJjaJFn1v+2fH9gmvG9OFxHYZKUIBhd1kcyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0tzK6GHbz8ZJ for ; Wed, 22 Apr 2026 09:22:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35bf4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 09:22:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 5cb5254e5c54 - stable/15 - msdosfs(4): Fix two typos in source code comments List-Id: Commits to the stable branches 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5cb5254e5c54af0c85fd1a854e4b0f69d85b61a2 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 09:22:21 +0000 Message-Id: <69e8934d.35bf4.3fdf1705@gitrepo.freebsd.org> The branch stable/15 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=5cb5254e5c54af0c85fd1a854e4b0f69d85b61a2 commit 5cb5254e5c54af0c85fd1a854e4b0f69d85b61a2 Author: Gordon Bergling AuthorDate: 2026-04-19 08:06:45 +0000 Commit: Gordon Bergling CommitDate: 2026-04-22 09:21:43 +0000 msdosfs(4): Fix two typos in source code comments - s/unititialized/uninitialized/ (cherry picked from commit 96246330c1c47ea06b7e781ddd87de45d541494f) --- sys/fs/msdosfs/msdosfs_fat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/fs/msdosfs/msdosfs_fat.c b/sys/fs/msdosfs/msdosfs_fat.c index bfaff417f677..ef8496d21a48 100644 --- a/sys/fs/msdosfs/msdosfs_fat.c +++ b/sys/fs/msdosfs/msdosfs_fat.c @@ -134,7 +134,7 @@ pcbmap(struct denode *dep, u_long findcn, daddr_t *bnp, u_long *cnp, int *sp) int error; u_long i; u_long cn; - u_long prevcn = 0; /* XXX: prevcn could be used unititialized */ + u_long prevcn = 0; /* XXX: prevcn could be used uninitialized */ u_long byteoffset; u_long bn; u_long bo; @@ -761,7 +761,7 @@ clusteralloc1(struct msdosfsmount *pmp, u_long start, u_long count, { u_long idx; u_long len, newst, foundl, cn, l; - u_long foundcn = 0; /* XXX: foundcn could be used unititialized */ + u_long foundcn = 0; /* XXX: foundcn could be used uninitialized */ u_int map; MSDOSFS_ASSERT_MP_LOCKED(pmp); From nobody Wed Apr 22 09:22:43 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0tzl5nFlz6bqX0 for ; Wed, 22 Apr 2026 09:22:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0tzl482dz3ql0 for ; Wed, 22 Apr 2026 09:22:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776849763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i34OsXre9pfIMIeQVrmCQIDOh99Yt/uCf3KK5v0i3xQ=; b=fH8N9qZXkv+NQWuogxSK7aa1yFvduwPxS3WPxU/PQRWdJKqm6LD/engeundaNjvWj8/iK/ 5eFpYQlzJ4sC1N4iaRBcTVXniuXRKS67THGQ0F7jW6bPeyjVYuxsKHdjsgdUQt8yTZ/+Rx qBJB+2BMgntwmE0EwwPUQLcAFVEKYwmCidFG427npxLsgbbzylzd34tDAA4VpWQYjEqjCC nxC3jfNrxuLFNRlgng6F495VjMCit1hY1COAlItpfqMs84QbDtQN9HhxBKaq1czCZvgw8B Lekz26y/qflKKTFOBbIC5R71u5Zjd4767tSjA/M3IlXgcx0LxXNWg2Yrh/mdNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776849763; a=rsa-sha256; cv=none; b=n/njDWQ7dQahvkIT168TBK1dgZMFS7G5Rjs8bi+XhgBZLQRmz3sRcUHPXgiHShwIPDdiJa a+dA3xbjzprGST8Dh1wijBow73qR0uMU+TOWQsMFXxrYBdbDNZdRmYgBDHdfEV4ukbCLFx blDCt0TVGvh82n+TCo7ZwtIwtLRAMYvd9fDnuMGwtOi199HLnPC+HBq4qQjhH5Erdd5FsD iAUf+H5d6w4+JuB1jFDDP0zWqMCmL5zQRu+Hy7QN/DIDPbWoY/8jg8PKchiT8yIE4ZwFvq vA9f7XUvuhiNz0HhK3RlRVK3qAVZNIlauuHnvvZSsbhKTEbLiA2MUU/BTn5jEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776849763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i34OsXre9pfIMIeQVrmCQIDOh99Yt/uCf3KK5v0i3xQ=; b=foHLqyZeFdoP/7m6FrCnIRWorN8vo9AoODTiGshv9IT6wexHBuOswFCREyrgePDL8LCKM+ hwKc/keKkHxdnzMjK9laRkV9+w4QTy0nJA0XL1GVAtfQoJnKES6JulhGkbrxWzfTG760V6 o8iI0lV4ndT2oZDIhMVRr5uY3fD2lPtjIJDHEeokAYkSyqjE1lcZCdhzvf4oLXAItp2JAS x91y/RWpCQ49Kv0t81HUjqIIH/qtiqrqWvkhLwtd9MThBOBliacNWFXDOS9o/ee/jxJMkX R3bMohF6/OmBRC86wHbcQuhhRAsbQIPoCMLKX6VJT5YlIzge5gVd06yY99kwUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0tzl3dFjz8ZR for ; Wed, 22 Apr 2026 09:22:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 364bd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 09:22:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 1914750cb4c6 - stable/15 - rpcsec_gss(3): Fix a typo in a source code 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 1914750cb4c6badee429531b14f339099a3a054b Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 09:22:43 +0000 Message-Id: <69e89363.364bd.79a30722@gitrepo.freebsd.org> The branch stable/15 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=1914750cb4c6badee429531b14f339099a3a054b commit 1914750cb4c6badee429531b14f339099a3a054b Author: Gordon Bergling AuthorDate: 2026-04-19 08:08:56 +0000 Commit: Gordon Bergling CommitDate: 2026-04-22 09:22:30 +0000 rpcsec_gss(3): Fix a typo in a source code comment - s/verfier/verifier/ (cherry picked from commit 6323e2be6102e2a152b4420db272f7e880017cf0) --- sys/rpc/rpcsec_gss/rpcsec_gss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/rpc/rpcsec_gss/rpcsec_gss.c b/sys/rpc/rpcsec_gss/rpcsec_gss.c index 89d1c56f7cc2..4d5c53e2545e 100644 --- a/sys/rpc/rpcsec_gss/rpcsec_gss.c +++ b/sys/rpc/rpcsec_gss/rpcsec_gss.c @@ -128,7 +128,7 @@ struct rpc_gss_data { rpc_gss_options_req_t gd_options; /* GSS context options */ enum rpcsec_gss_state gd_state; /* connection state */ gss_buffer_desc gd_verf; /* save GSS_S_COMPLETE - * NULL RPC verfier to + * NULL RPC verifier to * process at end of * context negotiation */ CLIENT *gd_clnt; /* client handle */ From nobody Wed Apr 22 09:23:42 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0v0t2t6Bz6bqXX for ; Wed, 22 Apr 2026 09:23:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0v0t1Jqmz3r5q for ; Wed, 22 Apr 2026 09:23:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776849822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EeqkerkHpVT4ledLpS5NEwpcz5BlSE66NC51jcxil34=; b=xLv1YBdDWmuwbwXdypaj+3F/4+xoA7TWg7ZPDCokk+mK51nxpFrZEVnriJELjuoHUabrcl 4ytns51eVb+lRg9UHqiMZYTd7drrxhkUqZMFp9LA/uDKS74ANtgAX7twTLEUeUphAsPqfb 2teh5vB010zkO4peleXc8uOch1CnbtLnFLAhkTKfX7b+TfLUCFSE/rNKeCfTbU36JvjtSA 6gVD1WKSpvMMeErJ89P9BoC1pHVsz4EOqgxUfe3SXgfdX9SDvIY3Hf1emrQkRy1iX7aDGe EYFCS5b31c0EjL10V9R6LqZBHX/+Odvs6mJC4/ueshhoGfodwXi8YvuIDEfmtA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776849822; a=rsa-sha256; cv=none; b=a7lyLQvuxjRp9QatlIaMPA+xLfq1EY0gMqFLt3km51BYDiovs9ZSm2CummC0WvWQte9Fvv IYy1HBR3gcEbd8DrVgatU1t6oYCO6cqDYIV+QGV4gy6aCmUzPcv8vtltLBEKU3bDNykKm1 xUS/t3iCAfDpqXP4vxRIO/yk98H73bDKIBJbpH7odx/zhmzwZGZcdfjZUDDVA33nbQfLWY AE92Mm3Tp55Lm+A2caYVWIunTkmWZBuBVy2l4mMTsm3JQCpEgeKxN1OkNkcKpRO9JU0rWW ab8o/w1XcJdSLgwuTWgmO0NbJfm8EUaGqtQMdPgihV4ESIoui6JhmR8UFx2z8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776849822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EeqkerkHpVT4ledLpS5NEwpcz5BlSE66NC51jcxil34=; b=MrUA1ydWR4kf1wejrMGBVuMYSkFMnTtqrqho1GholkUdzCmIGVoYuGxmEyI9PBEzzi8vvp 5/z4AUg73Lq+2EhDlfGOdytWIMgxFosVghumlVH4qrcdBZdsXsBIjfh2rfxj4lWDHev7JT nSD6MwGgXRZP2qGwKHoOuc+YC14fS7Xu6iUMdcJBrRMowwRIFZDKwz4cNaYT5ze0i0M/Oh mp9SZA2rfDxnAPxX1IMpB4Bf/PTVYxVT1+1poH7Pnaaw/cJXPx53fiVfbVHJ311CPxA7AQ l8qrdmGuxjTXY22hBEEYpndIeyhHc7j+jC0uSd9RJwx+yDi7+kgzHl9vrn33Sg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0v0t0gY4z8ZS for ; Wed, 22 Apr 2026 09:23:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35bf8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 09:23:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 4b73f0ac8d44 - stable/14 - librpcsec_gss: Fix a typo in a source code 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4b73f0ac8d441ca922b366414be146d46bc2649e Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 09:23:42 +0000 Message-Id: <69e8939e.35bf8.4440a150@gitrepo.freebsd.org> The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=4b73f0ac8d441ca922b366414be146d46bc2649e commit 4b73f0ac8d441ca922b366414be146d46bc2649e Author: Gordon Bergling AuthorDate: 2026-04-19 07:57:03 +0000 Commit: Gordon Bergling CommitDate: 2026-04-22 09:22:57 +0000 librpcsec_gss: Fix a typo in a source code comment - s/verfier/verifier/ (cherry picked from commit 59dacd7f008f54a335ec49e747bb8ddac67b0a83) --- lib/librpcsec_gss/rpcsec_gss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librpcsec_gss/rpcsec_gss.c b/lib/librpcsec_gss/rpcsec_gss.c index 4a0de8b70b67..276fa1423b0f 100644 --- a/lib/librpcsec_gss/rpcsec_gss.c +++ b/lib/librpcsec_gss/rpcsec_gss.c @@ -100,7 +100,7 @@ struct rpc_gss_data { rpc_gss_options_req_t gd_options; /* GSS context options */ enum rpcsec_gss_state gd_state; /* connection state */ gss_buffer_desc gd_verf; /* save GSS_S_COMPLETE - * NULL RPC verfier to + * NULL RPC verifier to * process at end of * context negotiation */ CLIENT *gd_clnt; /* client handle */ From nobody Wed Apr 22 09:23:44 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0v0w4gl6z6bqdD for ; Wed, 22 Apr 2026 09:23:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0v0w2VT9z3r4Q for ; Wed, 22 Apr 2026 09:23:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776849824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wtOnnX4OyaeCn9n1aOKxSpYk9dx7BJ9CY3F4pPdEpA0=; b=JGJNlxaU6LyEfNLP+Am1lH3WrMKqWb1e1RvwPuu1/jr4v9ea+9eaikMbnekC2bQmoXoTTE lXh3ZT6B1HEbExX8MyPwYAf88A4cdStfIrYeit3r8p4Vc+wyhXQlS3BGTSeXpaQbFqXFIQ c17qh6nuRur1D+QEsxgzfFSHPCBUTPWv7nWKwa58byg7Dzt7ZPtdV4unRwr7sQXHF1CKH9 kKRRVTvMDHUrGXark0TkgwE2pGTmbr2HqCqyLj+SWIG5O+n7Ed8kIjBwxFX858/HRpVbWP FV3XIzM+eudtGA3pYelWYLV8TraK01EmxPuOU96E3lmbb8D1rPhsCvRQQwuDbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776849824; a=rsa-sha256; cv=none; b=Ys965eBAj9wL0NX5Gmw/Gu/6uDCtJ5cEahrhh8VIrM6EPEND28e0Q5GVsnQp97Iq/JJJzF bUm7obppyoybw25An81bSZlQfNLKNekwquoqRx9oX3D/wBxX/qiKVS8eki0Gv3ThD5e3SO 5QVT2jHBWRPHBLUmF6NwpcDZZ/+HvBaY5SquAVon33anxjigTK/nMapjty0RZMF1Cz/5xz bXmzGvx9KSN16f8nCl9OS1Mu7ViXeeo26xrerngDxS7os6NhKgYTVHzi7bIEOk30zs0zu5 XcX6X3JG1YK37HdzEAITuq2sugyN5xYthQSXuY8u6C9b5yh/nqscTC2bd9W0Ag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776849824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wtOnnX4OyaeCn9n1aOKxSpYk9dx7BJ9CY3F4pPdEpA0=; b=E1jReeRcTHA9s232/I7gOVM8xR68fXg7ukMEDw6p+2TpnccNJrOzq4S3gb6ekdvsG044BI lDjLzECU06r8q4S0xPCt7CLLhLFAXWpMgHWf9uZFq8SDVO9CxY1/8fwkJAXiM5ojS8xrQs J7vkoFNEIzfngmHgdDu/CPgX0AIyJsnpMPLKSzuZCMFjRmuKtWsgccvZs0jvqyQBFUIDjv EUsGnA5I2nSXuBQojvXO0k53kos55vFyAQe4dXg6xyYo7fSQ69A3BuvX7TLlHk1FyrD3OY qFktRXJ/+W7ZpWiRUMqcDe8d7EMb8yT0ZWs+w5kqYq8YfILzHUMQ8qGeP7pMwg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0v0w21sVz8Tc for ; Wed, 22 Apr 2026 09:23:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 374c4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 09:23:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 3911c2a18aa3 - stable/14 - msdosfs(4): Fix two typos in source code comments List-Id: Commits to the stable branches 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3911c2a18aa3cd89732ac1764b9f90f58f23c965 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 09:23:44 +0000 Message-Id: <69e893a0.374c4.7f9664ac@gitrepo.freebsd.org> The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=3911c2a18aa3cd89732ac1764b9f90f58f23c965 commit 3911c2a18aa3cd89732ac1764b9f90f58f23c965 Author: Gordon Bergling AuthorDate: 2026-04-19 08:06:45 +0000 Commit: Gordon Bergling CommitDate: 2026-04-22 09:23:21 +0000 msdosfs(4): Fix two typos in source code comments - s/unititialized/uninitialized/ (cherry picked from commit 96246330c1c47ea06b7e781ddd87de45d541494f) --- sys/fs/msdosfs/msdosfs_fat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/fs/msdosfs/msdosfs_fat.c b/sys/fs/msdosfs/msdosfs_fat.c index bfaff417f677..ef8496d21a48 100644 --- a/sys/fs/msdosfs/msdosfs_fat.c +++ b/sys/fs/msdosfs/msdosfs_fat.c @@ -134,7 +134,7 @@ pcbmap(struct denode *dep, u_long findcn, daddr_t *bnp, u_long *cnp, int *sp) int error; u_long i; u_long cn; - u_long prevcn = 0; /* XXX: prevcn could be used unititialized */ + u_long prevcn = 0; /* XXX: prevcn could be used uninitialized */ u_long byteoffset; u_long bn; u_long bo; @@ -761,7 +761,7 @@ clusteralloc1(struct msdosfsmount *pmp, u_long start, u_long count, { u_long idx; u_long len, newst, foundl, cn, l; - u_long foundcn = 0; /* XXX: foundcn could be used unititialized */ + u_long foundcn = 0; /* XXX: foundcn could be used uninitialized */ u_int map; MSDOSFS_ASSERT_MP_LOCKED(pmp); From nobody Wed Apr 22 09:23:43 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0v0v39s9z6bqb9 for ; Wed, 22 Apr 2026 09:23:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0v0v1vdXz3r1x for ; Wed, 22 Apr 2026 09:23:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776849823; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L4cctFIcq1REXhdXcfr91sC1jalGiwSs7V/1rItiEY8=; b=aYLoyzzutHCyrJ4tv1eZRZ2aqYrxAkWhcufq5IBFneRLcbysCJo59LT/2lISXPD9btbyLt 7L+87LhsJrxD8smEEU9n2JzXyoP6vxHCewODDDCor5SwF1jCll9YtZi7CTyFB2dakG+qdV yjnj5y2YFfeEwoQViijS/PdGJAP+6vR3bFjqJn3rT8A7/hgwbPU4FpzT3sd25ah6jMNE7K wc0H7Ft9X0KUYgRwc7EuDGpEVsD/AdcI9JG7CXzU1gzOTvDYA9LJ1neLrXBtOR64GT0ESG wuf+0AQz+9lLlQY83HaxgUlaHVjMroDdMSqVy5sUNYp+mpBm/Zh2S6EFJSw8ig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776849823; a=rsa-sha256; cv=none; b=MgX3ObnjHo1Xke1It927sP8oYkBXFoqp5XIKzK8ft6dHwE1mBEbf77NU7u1Ja8REzEJX96 FVEEKYotZgQOV+LoOEng3HTT2sPaSNx45U8QXlx8cORYYYYuGotLjT4MM4z5VmeB7otj+m YPOE8nohurQYR2NqVyZ+OwWbrRM/BnZSqee7yEGgX0S8e0vdyoRP9VmptPcRz2HTqa66Vn 7GynSPHJ/rVJfOY84SyMjNHVPhEiCxC+jtFRQihwuE1arS1z/LXrgJZwOmstmTpbjtGagj NW4UeY8xwarkKxbTCv2pl3O75aqdRBUUwshFHv3Ns0bMTLtacAxDLkNEYiociQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776849823; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L4cctFIcq1REXhdXcfr91sC1jalGiwSs7V/1rItiEY8=; b=hO7rlLogoGqvBAhkyloWsosTROd14KFpl658pcc1TG5jeTyWBpmRAUWi6GlA45PNnmQGAM 0TQimxonoeL+Y1ih62aSKIGAPD+qiMznuvyKmiwnUdoT/ZoaDmSG2sHi1YLH/+3hqNlM7Y ZUK6PKUkeLq2cTo2vVE7FZlVammvJ5CPizw3BHpho4aELXl1h8g7e29W1d72OsQsTfECl/ gajch5GhTekYY84YkBUxhU7GEEIqN4CutuZ3rMb0Eu60IYeiwdlHQrdNmA+JD/vj7JOTX6 RjhGXTDku/fBIX9WktcVTMG5uwXJNff31ioxxdmNn2miLJzSx/9nFK+L/zUjEA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0v0v1ByKz8fK for ; Wed, 22 Apr 2026 09:23:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3465e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 09:23:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 393ac01945b9 - stable/14 - stand/powerpc: Fix a typo in a source code 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 393ac01945b90183225ccc4bf274008ef6aa5eed Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 09:23:43 +0000 Message-Id: <69e8939f.3465e.10ea820c@gitrepo.freebsd.org> The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=393ac01945b90183225ccc4bf274008ef6aa5eed commit 393ac01945b90183225ccc4bf274008ef6aa5eed Author: Gordon Bergling AuthorDate: 2026-04-19 08:01:18 +0000 Commit: Gordon Bergling CommitDate: 2026-04-22 09:23:07 +0000 stand/powerpc: Fix a typo in a source code comment - s/limitiations/limitations/ (cherry picked from commit 4177af3b0e2db36238bbd6f973943f830d1ff46f) --- stand/powerpc/boot1.chrp/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/powerpc/boot1.chrp/Makefile b/stand/powerpc/boot1.chrp/Makefile index 22a3f983affd..94c150e22ead 100644 --- a/stand/powerpc/boot1.chrp/Makefile +++ b/stand/powerpc/boot1.chrp/Makefile @@ -11,7 +11,7 @@ SRCS= boot1.c ashldi3.c syncicache.c CFLAGS+=-I${LDRSRC} # Load boot1.elf below kernel. # -# Due to limitiations in the way we load stuff, we have to avoid reusing +# Due to limitations in the way we load stuff, we have to avoid reusing # memory until the kernel MMU code has taken over. # # 0x38000 is high enough to not interfere with the trap area, but low From nobody Wed Apr 22 09:23:45 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0v0x5wzLz6bqSC for ; Wed, 22 Apr 2026 09:23:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0v0x3PMrz3r8L for ; Wed, 22 Apr 2026 09:23:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776849825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k/3dGzBLM8+KDAlUIsyXnb7Gs7wrBWHh0lnCORUM/j8=; b=guNonMxRS7W3AjcDPKIZCXwE4MQduqNUlimF6nFcPEHPWoC89GYJODG2F1gEiw/Sc2ISbJ yoXsE9XL4/Rpd06UXNbq5hQz4qTigEVXhNag6qoW1Ap4uauNx9uNg7y7/0JqH6oOF0ysqH F76MxglONLtxVddAL0g7iIOvCKOHzhC5VmnWdhe2TTGwdAoWX8z7vl1T7693ekvCuyAmGB BTIs0md6pSeAgGqVt3pLQutiZlg8kfebPpoHDIXK/KV+2cup8RtbMcFu5Zl3d2BWUWzn+p 2zXgCiXdp8lccUvEotjJcbS8sLux5xt9VHAZAZOxb3+pWlPReUtf7Xc/5Zq9KA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776849825; a=rsa-sha256; cv=none; b=FxedBuyLBE8iahWu9u6u1tzr+2r3179WWrrAnBZB1PqrFqIn8qDQr3jZQCAryH4mkH6QQ7 Nql1SDcnCMaDzxBEWPYcLHkj1IeH8enMexStIBZMRVFC0EybMY7PSsPiP264QmMDqkQEzn Z8KmIElpD8Q26klg7NZjbEoos9/UkjzA/WYjcCwEKEYKAfgMEaZe9idUuzHwl3kKtKNHKI aklE70ctJQTM1Pfnz5bcBF/JkKTEQzQL2nars8IMcSdzQk/KSuRhYNQpg8Bq1n7uEplfEd 9Tg6ItcFBmNKBHbF4CV/TUvAcQtd1JdQbYF9X2qlKS+F6XVAZE6j+YaX0CorOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776849825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k/3dGzBLM8+KDAlUIsyXnb7Gs7wrBWHh0lnCORUM/j8=; b=WdMpMama850BKmbax59exe14wEMH/szhOXOTOuZzc+4muaVlF1miBEuTM7/I6itAJmk36r JnDNr2eSpP1uhmk+Lca5vpCw/OnzZBBc1xDV24VO9/VerAA+xRyw8/6kbA7Jss3fHC9GZr /N7Yv+pY05NESrC6nZAKiD5bfgCM505VCB8C6BukFvbwKdnzhK0s7AzYUp8WFN1XhS3NC7 NwA4ss3rFQx4pmcpLHOxmFs70fE3FLhkhQGxcS9JFLP2Z2q+AUY9ss+QYFwqb5v4gnvqhf bwnPWKtA6ElqV/Q83PT9sNw7XcHhk9ld+N1wAVYqaJNv5ZCDwIfakkVrr1SFbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0v0x2sW5z8jr for ; Wed, 22 Apr 2026 09:23:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36932 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 09:23:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 5f7148131efc - stable/14 - rpcsec_gss(3): Fix a typo in a source code 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5f7148131efc423e09270d93d6f2e36d53b2b293 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 09:23:45 +0000 Message-Id: <69e893a1.36932.6297c748@gitrepo.freebsd.org> The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=5f7148131efc423e09270d93d6f2e36d53b2b293 commit 5f7148131efc423e09270d93d6f2e36d53b2b293 Author: Gordon Bergling AuthorDate: 2026-04-19 08:08:56 +0000 Commit: Gordon Bergling CommitDate: 2026-04-22 09:23:33 +0000 rpcsec_gss(3): Fix a typo in a source code comment - s/verfier/verifier/ (cherry picked from commit 6323e2be6102e2a152b4420db272f7e880017cf0) --- sys/rpc/rpcsec_gss/rpcsec_gss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/rpc/rpcsec_gss/rpcsec_gss.c b/sys/rpc/rpcsec_gss/rpcsec_gss.c index 4b0a962070ad..cf68edefb409 100644 --- a/sys/rpc/rpcsec_gss/rpcsec_gss.c +++ b/sys/rpc/rpcsec_gss/rpcsec_gss.c @@ -128,7 +128,7 @@ struct rpc_gss_data { rpc_gss_options_req_t gd_options; /* GSS context options */ enum rpcsec_gss_state gd_state; /* connection state */ gss_buffer_desc gd_verf; /* save GSS_S_COMPLETE - * NULL RPC verfier to + * NULL RPC verifier to * process at end of * context negotiation */ CLIENT *gd_clnt; /* client handle */ From nobody Wed Apr 22 09:31:01 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0v9L0sKVz6bqs1 for ; Wed, 22 Apr 2026 09:31: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0v9K72nWz3slx for ; Wed, 22 Apr 2026 09:31:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776850262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pb/Og5KGk0zi0VD9FgwVpkwlpP+CKD/LlF5/N56DC0g=; b=mQdDKxESKFarh2Ejn8QlxVYBy9sMsYRPzPF+O0bc02MFkONQNEMChAzHytU4KjJWsABXZY BaCcqmuCsvwTX5s10pKLHnNMZxyFHTLa0QS8+LNg9ok6VN+2tZ5npW6v/HqTM+hrTTY2TR KHw/3oX/1hZ4VYh3GklGZJxqif+c7OJoKMz9okPvcnjQIWouWnrRntfwckv7pqz2FoG7wc iD164sod6bldwBaTB/OD5QcseA4HZ43aWSHEYi3oN69j/nO2wg+TD+dy+WAJgxbdtggvOS do7rvGQGkJ++AmupOlLxAfh/tWxwly2a7UfT849/TGawc8ZnxBG3lodrD37DnA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776850262; a=rsa-sha256; cv=none; b=c8nsWgCq7T1lM5uLq8ZEjxppUPrmIDsHtDxAai0PvjnQhwCbsqpK9NpbpsQJ7W1YZYXf2C VgPg2XCw+2YTWH9Pxyw00c61andpXO7tI4ujUY+kw5Fw/5B6KvByn0a+h5OLoVKRvmN86H RwXes4AUa1RO6ux/a+AMoSk04MmfrpL1jqtYoXNCH0ccXxFu8UQz9gnBv2smOSiWftcLIN 9QRPMMR+QsqBZaR9COemtDP+Mr4JNDeD8R8A1aibXwzrn9c2tGFMSFqqtrFKw7xmJxpHUl 2stI/G5/TxSuZGuzO2wFRXsQP6GtHihyqHa3KwkxMpg1XvXVNDLSn2CwcA4HIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776850262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pb/Og5KGk0zi0VD9FgwVpkwlpP+CKD/LlF5/N56DC0g=; b=CmJTKJr7PkvoJNI/TwB0QFB0HAWx0x6/zUCWSn8Trc9l9zHoMXQShZg3KM0rCFTPdAjsZC NBVgcvWrUlEfomqPkfMytPVQMSJITNSF8WTXLFTK3muVuhkurkL5KAcSUTN1DLu/Vc+wyY v2xyswSFksWY0FOskLecVXnXTvNSHT7/eZrC+kHTa10lUmS/RFQbGvOkqHx2GM4Zsx3++u 1GT/+G2Oe3bRG5rXGsC+F1qtXav9HqiLD4NL72omhqCcEghC6eQpy2T+25GbMc4iDWIIVc w5T9iBPJy6pkxMK/JOJHV0dIIuYwL5BH6rCqM50IkjDfI2Ex0J+pKkZLfkfUBg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0v9K6Zvdz8Tv for ; Wed, 22 Apr 2026 09:31:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3663f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 09:31:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Osipov Subject: git: c93e8b63d62b - stable/15 - glabel(8): Fix debug message for already existing labels List-Id: Commits to the stable branches 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: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c93e8b63d62b4d4dc4cb5386afe63d5a517b8b4b Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 09:31:01 +0000 Message-Id: <69e89555.3663f.603b722b@gitrepo.freebsd.org> The branch stable/15 has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=c93e8b63d62b4d4dc4cb5386afe63d5a517b8b4b commit c93e8b63d62b4d4dc4cb5386afe63d5a517b8b4b Author: Michael Osipov AuthorDate: 2026-04-14 08:38:59 +0000 Commit: Michael Osipov CommitDate: 2026-04-22 09:30:27 +0000 glabel(8): Fix debug message for already existing labels Remove the duplicate (incorrect) name. PR: 294542 Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56400 (cherry picked from commit 92c69c791c436eb966fab806393b70e53cde6874) --- sys/geom/label/g_label.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/geom/label/g_label.c b/sys/geom/label/g_label.c index acb17d40914e..0942bedd2380 100644 --- a/sys/geom/label/g_label.c +++ b/sys/geom/label/g_label.c @@ -251,8 +251,8 @@ g_label_create(struct gctl_req *req, struct g_class *mp, struct g_provider *pp, if ((pp2->flags & G_PF_ORPHAN) != 0) continue; if (strcmp(pp2->name, name) == 0) { - G_LABEL_DEBUG(1, "Label %s(%s) already exists (%s).", - label, name, pp->name); + G_LABEL_DEBUG(1, "Label %s (%s) already exists.", + label, name); if (req != NULL) { gctl_error(req, "Provider %s already exists.", name); From nobody Wed Apr 22 09:31:53 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0vBL1Qs9z6bqs7 for ; Wed, 22 Apr 2026 09:31:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0vBK6r6Tz3ttc for ; Wed, 22 Apr 2026 09:31:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776850314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EsyM7jIBqI50hhIhp1b8o+pkx9jrSEb5G8BFXgWuiwM=; b=OFE8okX5iAZkeqw9utcig0qqa/uxlOpnIKj0mOh0jKdoR6Z1jUGmjjivuTo8i7xZkv85Lh mpXqPePpi1uvB55bLdIqfAHBjgbM30zoI9H/4KZK8Gp9L4IYob4QtsY1ON2dUjLLRPMZlE Qz3Sr75K4y+tukS+5SfEeys0bSbmjsnNk/ZLOdD/EvCGDQfhDn9BoSO5HtUCva/gMcj7Vr UD+wDMFQLpqRODp15txVvUqH6aSE8fNoet3zKwHa4TWrV7O0KYwl6BrAx7bvsEiNpAPwli lax7t7Zlq1BczZHxjQhFwxVoVSj+fiZmDp4CBy1fNPc4EvQjc4ErtfmwVe6V4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776850314; a=rsa-sha256; cv=none; b=btaoMcjow+rzlvq2cmGCwzPvRLfC2NoIAwaXV6nDnRqIbe1zzs8BJFIqYO1H7yzRIysFbp Xu4EjmNY+nKqcmahsYM0P2SIFMZfe8UaQvU+L40dX4USG7ekrvcrBViMQvAB/7gLpOfeCR IUXkWKIvVsUMN7MpZ9XwCB1EEK4cGgdwph9cBroZuP7393oM4masDlCDkgoODLPyeO/6dq tzXvUSUiOM2PbGintjtpe04/wD1PCzJWPaC5JiuLCoTDTFBXzfXNTIFicDEVj+xyMg9Gsc /QK9LIc8R+LmBnchpaOdp0TVMwOGJHTaiZ5JsBLlaO1VuG4FhDoP66YoOnJ40Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776850314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EsyM7jIBqI50hhIhp1b8o+pkx9jrSEb5G8BFXgWuiwM=; b=ryKQYIj/o31bCiEgU49OgyyIJAO/MDppigofPzbfReAxXMJ0IXXYT1p8xg0GYSqv7b1/tJ qu40ny1flFfYtk+QSr5D2EMLb6KpOe8TQUdMfxUvdhY9bez++USeNX8jVLSdhj6hbGvdMM S59E8l996jVspOTvGe+VLxokaw+qoHWrfUoiAp18THA0uncDexfw5lS0dA8LJgYWwg/Qj6 faJjCXD1V4awai3CCktod1QuJjKkt2ll2pymDUwkYTCaqeM4iIHgn8jHFreGpg1Ac7NqYT xedT5Xh8TQrsXPQgxKofeCzEIOk4TqdrGbKBQA8M+nHnD+YONoXIxWP7YOTuiw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0vBK5yvZz930 for ; Wed, 22 Apr 2026 09:31:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3790d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 09:31:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Osipov Subject: git: 5131d206877c - stable/14 - glabel(8): Fix debug message for already existing labels List-Id: Commits to the stable branches 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: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5131d206877c7926cc8c887d8d91e2dbb65ca1e5 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 09:31:53 +0000 Message-Id: <69e89589.3790d.46543241@gitrepo.freebsd.org> The branch stable/14 has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=5131d206877c7926cc8c887d8d91e2dbb65ca1e5 commit 5131d206877c7926cc8c887d8d91e2dbb65ca1e5 Author: Michael Osipov AuthorDate: 2026-04-14 08:38:59 +0000 Commit: Michael Osipov CommitDate: 2026-04-22 09:31:41 +0000 glabel(8): Fix debug message for already existing labels Remove the duplicate (incorrect) name. PR: 294542 Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56400 (cherry picked from commit 92c69c791c436eb966fab806393b70e53cde6874) --- sys/geom/label/g_label.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/geom/label/g_label.c b/sys/geom/label/g_label.c index a38ed8294202..f8a3c67fc5d9 100644 --- a/sys/geom/label/g_label.c +++ b/sys/geom/label/g_label.c @@ -251,8 +251,8 @@ g_label_create(struct gctl_req *req, struct g_class *mp, struct g_provider *pp, if ((pp2->flags & G_PF_ORPHAN) != 0) continue; if (strcmp(pp2->name, name) == 0) { - G_LABEL_DEBUG(1, "Label %s(%s) already exists (%s).", - label, name, pp->name); + G_LABEL_DEBUG(1, "Label %s (%s) already exists.", + label, name); if (req != NULL) { gctl_error(req, "Provider %s already exists.", name); From nobody Wed Apr 22 09:34:46 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0vFf4gRTz6brRD for ; Wed, 22 Apr 2026 09:34:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0vFf3xdRz3vby for ; Wed, 22 Apr 2026 09:34:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776850486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7hoJhM3OXMDJEksX3kIc/qHDrVKb7xuT0hqhuI/qEVk=; b=KlTIY6I9EEhBZHYXap4qOApOtiv9lRjT1IxfrqpbUxSoH7EJKdkVq3/G4BcovmZEdYCleP NVva5WlqD86AXrWgATOX1DObfg7eoK82pAifV9o/EUcJAl1i8ieuv40JwVBC9BZV+mybYJ SLOS1EY7BMGpv+QFsno3IKFimyZaOTe57rXKHqG8dOJFhnuQV71vPWqTDJIFgfTKATk5R1 fR29JnZQXBe/xxL3QlO9pi0+PdVfbN9MHI/JHJ/QHdYZ37VGd0guCMAbAQV8BI9wMPZ738 oQw+DqUxu1X8FS/8bxw4bsUpFI3SVFb+H6U+NpO6PQbfrMgsmZXvv7Ln/qZ5DA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776850486; a=rsa-sha256; cv=none; b=Gb0dwCK+5tfKqF8rxEJeIsrC8WXSbMLUSJgd2Kf1hKqeNz+v2xNHLWRnCiLxyKnT4RbsLk Jsmlp4IPNv0MD5SkGy/utupedfTDmRIdEeondeZ4OvYISZ+w8mwxhoWnCCyaRTiT07ifyA SRpB7au9nd55qKhQODpm5VeBSxr2GQtx6inPv2M/zbL09NLWmlkAiiEvPlNX/UeJUgvF2B 44xwq87popDyrVYa1IKIc6WEY/KByQTGg41GINn1FrU+/380tpSl+tp7+0+gshGDaV0Nq7 TC0byqjXLj01tIqq/tJygYPvb1L8uqSpFL7r0/oXYM4LJZY8s22Ov/tkVSZHLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776850486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7hoJhM3OXMDJEksX3kIc/qHDrVKb7xuT0hqhuI/qEVk=; b=gklOm8eoJF3+7aAuAZZiQ2PBqtKf2Rug40mNsAN3PWKxSRnxaMpYX3MAiJW2izsAq1+oNl N3z47SNQohnKNIKRNRtHKOnPsF1z7U3mgaWB1qgGKR4kXSCDjFlY1+fRTfdFHd6rsQmthi ivvb2U5w6S/4b3tvX/NB1RlkEGMlUDQ6sR39FdUWZlW3TWhr0Edsphqo+mzvDxOp+z7U1C zzbP4l4gFGNvK+mPokhvn8VViUXWoFgzWMO3i8aptFNaFNUjCC9MSkYJybFavKlsYh/YYU H9xZiRnwaBhUvHb7+JmkCMJhIRiOLkXfQMXTaKUiztI1NaKsqOXULprBluAR/A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0vFf3K1vz95Z for ; Wed, 22 Apr 2026 09:34:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 364f4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 09:34:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Osipov Subject: git: 0fda88fa010f - stable/13 - glabel(8): Fix debug message for already existing labels List-Id: Commits to the stable branches 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: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0fda88fa010fab36cfa4e1965c6b84d6f5ca5655 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 09:34:46 +0000 Message-Id: <69e89636.364f4.2719b70f@gitrepo.freebsd.org> The branch stable/13 has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=0fda88fa010fab36cfa4e1965c6b84d6f5ca5655 commit 0fda88fa010fab36cfa4e1965c6b84d6f5ca5655 Author: Michael Osipov AuthorDate: 2026-04-14 08:38:59 +0000 Commit: Michael Osipov CommitDate: 2026-04-22 09:34:30 +0000 glabel(8): Fix debug message for already existing labels Remove the duplicate (incorrect) name. PR: 294542 Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56400 (cherry picked from commit 92c69c791c436eb966fab806393b70e53cde6874) --- sys/geom/label/g_label.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/geom/label/g_label.c b/sys/geom/label/g_label.c index a38ed8294202..f8a3c67fc5d9 100644 --- a/sys/geom/label/g_label.c +++ b/sys/geom/label/g_label.c @@ -251,8 +251,8 @@ g_label_create(struct gctl_req *req, struct g_class *mp, struct g_provider *pp, if ((pp2->flags & G_PF_ORPHAN) != 0) continue; if (strcmp(pp2->name, name) == 0) { - G_LABEL_DEBUG(1, "Label %s(%s) already exists (%s).", - label, name, pp->name); + G_LABEL_DEBUG(1, "Label %s (%s) already exists.", + label, name); if (req != NULL) { gctl_error(req, "Provider %s already exists.", name); From nobody Wed Apr 22 12:37:23 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0zJM5g8Xz6ZRjN for ; Wed, 22 Apr 2026 12:37: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0zJM57HCz3GMT for ; Wed, 22 Apr 2026 12:37:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776861443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zQmuSIjtcMSAMK6md8rhdBWS4NNLjEEUaVg4aTAQwRc=; b=qRHtNtxFgoNsuYzvQ6XvK9CSsEYzHRzB/e+ICDsMfFie/fESDpEZPhXOQxsVF9XcRz7T+I JJ9MWHwELJMB5L8LqV6RslvtHGv7AR7YDX2JTfayQPGfJVUJsUF30P5GtoxZ/nUZStiaMV Ia/vGoCmTR6bty0ywo6h7Jt2wQV97RawcoN5IBK9Tmx61NelWXYA7wRB0pHXg/o87lWK4P Xr0wu0BLByRM5D+aXKR+9KOno0y1lojK8YfWgfijzv1di1npY5zSMXvVy2a3fJGDg32TSV 0064Ew5Kht1XuGdjoC+IqlwBPOZNDucQ2migAeJHCoeo7OUkshNF93vDh4e8Gg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776861443; a=rsa-sha256; cv=none; b=GY4ftFmHaJgjrR9OZdK3L0FdshqN7d92CZUtUb1K9DRHzkvmzZmRtv3DqAruff+XTD/9NZ Nx0KKFHjbOt6aUZmzINDBJiQxCDZVyLN59wszIXopuWvF3VFa5yFMp/Qn79P7qTXUDUqmg I87nqIFVAQftj5ZPhxjzu0XE/fnDedo2i8x9szEUx4MFNlpCX1K1ArII0G+jBrz/3zr+AR hpAwaObXGac2HgIqRKXc1KWYFtsYV79Qre0QMHxtThNiPHzfC8RZzlG5qW3MCtQSYniaUS ca+1387jYFAvLhDRi3/6q5IiXL2+BH2yo6LY2Se6qEfJfz4mYyKH6v+HMdlD3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776861443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zQmuSIjtcMSAMK6md8rhdBWS4NNLjEEUaVg4aTAQwRc=; b=c0yLAWkOQb4HmZMEish5q0GAwNuwIz1IXTgenGVgxd6HYRWQtcSKdLKifHVVB1IDmSPa+0 rzb9owt2+DVe/drt7oBDrpy9JJQLXzTtI3uPVwd0l8wu3HVDYvVm7HtaWWN/z6uIr7njtv OsRpqiOqyWqfmel0G8oBJGo/XUeouMcNMIw2k45y7L66B528WGeyzknIhj1aaqxc2JfNir i1W0VuFVKwcNVL5TTwQ4PoFTFp1RF/T6u6TmfknJIu/OXEpSU7bRZKaNt+21QfMnsejfU/ APXRXAej3hHkOIgGiYhKJZ8pS0z2lQUVguwlfcMclxjmc0um/5vq/6OZ18GBhQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0zJM4cGnzVpl for ; Wed, 22 Apr 2026 12:37:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 47ecf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 12:37:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: a9309a37671e - stable/15 - in_mcast: Fix a lock leak in inp_set_source_filters() List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a9309a37671e2b220d4aadab455a600875751faa Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 12:37:23 +0000 Message-Id: <69e8c103.47ecf.34047741@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a9309a37671e2b220d4aadab455a600875751faa commit a9309a37671e2b220d4aadab455a600875751faa Author: Mark Johnston AuthorDate: 2026-04-16 19:57:57 +0000 Commit: Mark Johnston CommitDate: 2026-04-22 12:36:54 +0000 in_mcast: Fix a lock leak in inp_set_source_filters() MFC after: 3 days Reported by: Claude Opus 4.6 (cherry picked from commit bebc1a5b09e358b420077a1b5c0f85f8e7f0812f) --- sys/netinet/in_mcast.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c index 6f8920aa69b8..08c536bc71c0 100644 --- a/sys/netinet/in_mcast.c +++ b/sys/netinet/in_mcast.c @@ -2601,6 +2601,7 @@ inp_set_source_filters(struct inpcb *inp, struct sockopt *sopt) error = copyin(msfr.msfr_srcs, kss, sizeof(struct sockaddr_storage) * msfr.msfr_nsrcs); if (error) { + IN_MULTI_UNLOCK(); free(kss, M_TEMP); return (error); } From nobody Wed Apr 22 12:37:24 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0zJP0yZLz6ZRdt for ; Wed, 22 Apr 2026 12:37:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0zJN5tFSz3GlT for ; Wed, 22 Apr 2026 12:37:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776861444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sXszAcPUgN7jcfp1EL56giQKbWVxGItHcqbH82c4VWY=; b=U6bqai5cLDwezk1mg1VfHfzY9SdcRG9M0iDPeMA7/BcEkerbHNFCuL3HOLgfv40fEPIyFV EknqrsnYgE0MXfrx46UWIjFRLurEuVyjWkNxWJfXHF6HZL4CuSq9n3QTYux9ZRLw70SKoN GzOYobGHgX6htYW/7uY07BexWqItpyeRO8hgwINMdYDuUZlctySiFBTVVSZc+epIxIR6xa iJawDObS4nMlFfBSbglDsqlT8wGlcGccqMF9yPzgZEUkwPMOVR7d9kRLN1rJ8e/oZyjHoz QuI3SirVKRkhaTw5Gz46QI10X96IppcEompYbdV902meI34cMnyRn83969UPfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776861444; a=rsa-sha256; cv=none; b=Z0f7lF5MdF7YQtQntbFfADgeZWyc9qtmH3iWaHBo+T1YPmNypt+5mJuubKgCNKVPn9T4dF L/IW6M6oRj09yQyZtDHSZp+1NWjTZIvHd7rlqVFfiVdpwfuwdVd2Zjv10XvYtJ3wGdBuuq h4649vOvpPSRaLe4njmBihgJtVHUrI1KYJ9Xi1MIahPy/KcZjchypdy8Yw1GT/6F7eOSdf UWPcBaZFWG8tbLzMzmEeIa1z6fC2CaBTcUHtU/JIwmvlMSxc0YPv6xfWsmDzr+x12w4KL8 WmKlgjW8kMLqJMe1l8UzH1aZR7wDQY2wKhDRuVKFLYPOa/HkqAUiLIqVbtZkyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776861444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sXszAcPUgN7jcfp1EL56giQKbWVxGItHcqbH82c4VWY=; b=KXzoc+KtfnI2wjXnnTPqanMlUWiDECkLfiXjtehXn3qbJcxIYKkZ8kZRPczaAfOiXXnXO/ nAk7toxBOKu5tinWoYBnYh4IADy0OtQdWI/LcQr9NDYluI1TiUpPHYEEvrpeK0QB/1Db1/ wiVJFAxWa56FgilVtj94ExafEVx9/qW6JGQ/4x65MXOrYdsrBUYcIehtnWN20OAr4Fm1fH tmIuQ+Uq7zZpbs/AEg3OOzie/X8+D71w8u9DCpDP92MnltHozaz8VekyFL8/ZYZ2nv1lIP IzaxpcOf9TjTqPO/fcb665QRMh64K+oUrgHVV5wcpz+gGvC9EFLDBHTherpNEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0zJN5RW0zVXZ for ; Wed, 22 Apr 2026 12:37:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 47fb6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 12:37:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 827dccf3ff5c - stable/15 - linuxkpi: Fix an off-by-one error in the kfifo implementation List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 827dccf3ff5c48b2f62378a44f58bf287fe99550 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 12:37:24 +0000 Message-Id: <69e8c104.47fb6.2e7d9faf@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=827dccf3ff5c48b2f62378a44f58bf287fe99550 commit 827dccf3ff5c48b2f62378a44f58bf287fe99550 Author: Mark Johnston AuthorDate: 2026-04-15 13:33:04 +0000 Commit: Mark Johnston CommitDate: 2026-04-22 12:37:07 +0000 linuxkpi: Fix an off-by-one error in the kfifo implementation "total" is the number of slots in the array, so wraparound needs to be done when "first" or "last" is greater than or equal to the number of slots. Note that no consumers of the code are currently connected to the kernel build. Reported by: Stanislav Fort Reviewed by: bz, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56371 (cherry picked from commit 52d2fc702b85d56b35f8828fe7efca3cde0d25b7) --- sys/compat/linuxkpi/common/include/linux/kfifo.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/kfifo.h b/sys/compat/linuxkpi/common/include/linux/kfifo.h index d2f570781661..b9f6ecacd3d1 100644 --- a/sys/compat/linuxkpi/common/include/linux/kfifo.h +++ b/sys/compat/linuxkpi/common/include/linux/kfifo.h @@ -71,7 +71,7 @@ (_kf)->head[(_kf)->last] = (_e); \ (_kf)->count++; \ (_kf)->last++; \ - if ((_kf)->last > (_kf)->total) \ + if ((_kf)->last >= (_kf)->total) \ (_kf)->last = 0; \ _rc = true; \ } \ @@ -89,7 +89,7 @@ *(_e) = (_kf)->head[(_kf)->first]; \ (_kf)->count--; \ (_kf)->first++; \ - if ((_kf)->first > (_kf)->total) \ + if ((_kf)->first >= (_kf)->total) \ (_kf)->first = 0; \ _rc = true; \ } \ From nobody Wed Apr 22 12:37:22 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0zJS0LqCz6ZRPP for ; Wed, 22 Apr 2026 12:37:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0zJR5sT7z3Ggp for ; Wed, 22 Apr 2026 12:37:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776861447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LwH7dLYt2NTTHlUBLiZMTKU8d2YCN8ls53Td6ewvNPo=; b=UXxNzxUgT1FHoAWsqQDrwmHp8ldr07gGtYsC3HaaMTrEv2XOF4BXM21UQKJg1KwcDw5qpF g+m6UjyfbxPukwjh8FqPx1SYsJvgbjoDIj0N3WDzJ6Ehfeu/fVsVZ3sjfo4r3Q1pyPJeXr LTClZ9Xh7XsUQFdY3JACWINL9AyG/8I+xCtsvYacJhP3RbF/f5K0ro/8Nw7NmyAg1imMmE vu8MLbQm0kvy6hv9FkDQrFtEZrgkcsC0/IvmmDchuLpvteaOZprK75wGs17Zm6LQsY3ib9 aCf4CGUOo0FfsdxmXvIpvMYio+16b7wWSKGPQr4QrY9FalP57xFd+hRhgTtnRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776861447; a=rsa-sha256; cv=none; b=rqcJtBLO3ngRSIe/3xXEwcLGJjogMgkkqyUUfS/4wuQaD92i2vI5lLsNrLbCe8saMiqlsW SNM5r+uAESeiopjf0AtdcmoHvJauUSpdGipyna3g8X1GimDWm+2tb+J/s9wWOXVRKtB1U8 e9qeoZLNBzGdpe5zFD2xYCHc9PAo0ZxoRAu3jfM7ydSrGyXQGjFItuVL2lTNWgUlrHBfOm LNNrm2StZ/ynO9Xjct/w0aV6TMVCdR1naifiKNsorWTZ6TZatNgQEQghKDtXr1frSUqWRV h7khKWj/8Q6DvXRWJnK9Ya0KMTR+4VpVBHk9L/Io0t2T48ZsQ2epy+3qwKnOyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776861447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LwH7dLYt2NTTHlUBLiZMTKU8d2YCN8ls53Td6ewvNPo=; b=v+9boPE8DzTOJQxZJWd1a5KaxI0s2GFzg8RhFxmS8CWARkG+/HnHBxBAx+yOLl3uVwfE8A SAmfdW8mm+r5shvyzmzVZcmKLier1cunaHnfy2L1kO/of10TUM/l372EM4D/9ayC+wqhlB H7JxgOYOnfNFqsHTqT7FK7ZVFUkrPO+Kq+F2LtkedH+4qozpGxwghz3EJCA1b7cnu0JmaK fjWKjmRcS4nBBWdVcGWQ/LWqwf7tzN3hJTRrAg63Kr9ojv46A99l2zcOB3rFf5cQhQAKM8 7nZZEIdj+WRnaJJeBou+xc6rRFkmMe4UybS4JPgCnQ2cXYvWJWyQT7NJoNP+Uw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0zJR504hzVl3 for ; Wed, 22 Apr 2026 12:37:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 19565 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 12:37:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Siva Mahadevan From: Mark Johnston Subject: git: 848ae2336eb7 - stable/15 - tests/lorder_test: Add require.progs for nm and cc List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 848ae2336eb74c212b3ec2e28bd5543ebbc0876d Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 12:37:22 +0000 Message-Id: <69e8c102.19565.3744c72f@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=848ae2336eb74c212b3ec2e28bd5543ebbc0876d commit 848ae2336eb74c212b3ec2e28bd5543ebbc0876d Author: Siva Mahadevan AuthorDate: 2025-09-26 17:46:19 +0000 Commit: Mark Johnston CommitDate: 2026-04-22 12:36:54 +0000 tests/lorder_test: Add require.progs for nm and cc Signed-off-by: Siva Mahadevan Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/1858 (cherry picked from commit 66d2816407c32a0da0f039c4edb4f19b280f9bb5) --- usr.bin/lorder/tests/Makefile | 2 ++ usr.bin/lorder/tests/lorder_test.sh | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/usr.bin/lorder/tests/Makefile b/usr.bin/lorder/tests/Makefile index 21207f413a8d..a7920b82c90a 100644 --- a/usr.bin/lorder/tests/Makefile +++ b/usr.bin/lorder/tests/Makefile @@ -1,4 +1,6 @@ PACKAGE= tests ATF_TESTS_SH= lorder_test +TEST_METADATA+= required_programs="nm" + .include diff --git a/usr.bin/lorder/tests/lorder_test.sh b/usr.bin/lorder/tests/lorder_test.sh index a4276b2dcfe6..9c2db08e1718 100644 --- a/usr.bin/lorder/tests/lorder_test.sh +++ b/usr.bin/lorder/tests/lorder_test.sh @@ -16,6 +16,7 @@ noargs_body() { atf_test_case onearg onearg_head() { atf_set descr "One argument" + atf_set require.progs "cc" } onearg_body() { echo "void a(void) { }" >a.c @@ -28,6 +29,7 @@ onearg_body() { atf_test_case dashdash dashdash_head() { atf_set descr "One argument" + atf_set require.progs "cc" } dashdash_body() { echo "void a(void) { }" >a.c @@ -59,6 +61,7 @@ invalid_body() { atf_test_case objects objects_head() { atf_set descr "Order objects" + atf_set require.progs "cc" } objects_body() { echo "void a(void) { }" >a.c @@ -77,6 +80,7 @@ objects_body() { atf_test_case archives archives_head() { atf_set descr "Order archives" + atf_set require.progs "cc" } archives_body() { echo "void a(void) { }" >a.c From nobody Wed Apr 22 12:37:45 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0zJn2L5Qz6ZRTl for ; Wed, 22 Apr 2026 12:37:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0zJn0Z2nz3HHH for ; Wed, 22 Apr 2026 12:37:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776861465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8I1ccxr56T35x0G/l9rnFK9h46o//E1y8gvo3AoujVo=; b=I+GWcd2S560FtquI+pToa/bXJk+KZaeYpHh89F331vHrF+cZN3BwYgHRzgZy9i6LmV8kfX e+SFv0bAdEjWk25ZBXQ3RxGsCiV0pwyIb7Pt4J0SfNCreshR24WXRQ89VKPhUhLlGJuOJ/ w8IH5N/gsUdr32rjOoAH4Mo56E05jc4mY/sVj1I+Ulq9D1ZqTbEguj8IK2jJR/35tuj8r8 VGPvtB0QEvkyaSmURX4g3e6RqOXK2BOjHrzTEZ/5Umrdh7scRw+jb9eeWhC3LGvBNT2W18 /pLbGnfi8coe44aWlRZ1/mrZLuocnfk30YFrPgzPz9iZ4Wc/O4m6OrESomPwCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776861465; a=rsa-sha256; cv=none; b=HfFAvXNv2qEKKBWsukRNAmwGJgg6d4oDI1wTUl9UMqeiiHgRY/UFixc9U1VavxbsQ7aQtA FxOOiI6P1+FV/IgGq7ewIZqPFgHWMLnBHuHj2I4aN9ah9XUyk1xXWyH0Sp2qyWfhuMeVhS i6eNA9skyi13oqEr7+IKtj1ehb0ixWakJZfIsE+ZnhmPas4/RJ3fbe9VUPsjMbmu32/D8V DLmlukHKnJaNCO10eTBz23NAl7E3v+Uz6QQed4L7xQwhzQr+5p/3Ry9sDhks62qrgrMJbJ 8ddNB/0OLYZ4mUzyPaET18V3T6J5DWfNo4ytThj0l6Pz3VfOK6zjIxIalcoOVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776861465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8I1ccxr56T35x0G/l9rnFK9h46o//E1y8gvo3AoujVo=; b=dJjZcOZHkVGw07Iux7uNeocUQunuwS3Xhf/T6KVrxZuX2oLZX116tYr0p1iejEtmorrsJO pjXLyLSsmrE8PMACOaE75SC8rtib08QVTYid7p7Y0gCY6r6Y2QzxfqQdcz6TJNUSr6Ab1W HIfqZ+oeZv950sNTORtby7JS/Bl4G8uWCF0FycSow8IJxkXtMmMW6PZp//zY6sHCGm4z26 Ur6wLtIYvtn+2jTgEnCwh4ZQg2aEKFOrG0/iT/bKLe22KkNgEvJPbRj+/jEXVu82vefcQD J7QObDrJ5z8lUPti1wYZXlhLoFnJNSdwF7cqfyjLjFiKGJx1K7akYM0YnWiapQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0zJn03R7zVpq for ; Wed, 22 Apr 2026 12:37:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 185e0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 12:37:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 12e61434db07 - stable/14 - in_mcast: Fix a lock leak in inp_set_source_filters() List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 12e61434db0792f58bb91f3f4ac28b411513ffae Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 12:37:45 +0000 Message-Id: <69e8c119.185e0.717d0adb@gitrepo.freebsd.org> The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=12e61434db0792f58bb91f3f4ac28b411513ffae commit 12e61434db0792f58bb91f3f4ac28b411513ffae Author: Mark Johnston AuthorDate: 2026-04-16 19:57:57 +0000 Commit: Mark Johnston CommitDate: 2026-04-22 12:37:32 +0000 in_mcast: Fix a lock leak in inp_set_source_filters() MFC after: 3 days Reported by: Claude Opus 4.6 (cherry picked from commit bebc1a5b09e358b420077a1b5c0f85f8e7f0812f) --- sys/netinet/in_mcast.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c index 3dc4fa271683..b0be48b65437 100644 --- a/sys/netinet/in_mcast.c +++ b/sys/netinet/in_mcast.c @@ -2601,6 +2601,7 @@ inp_set_source_filters(struct inpcb *inp, struct sockopt *sopt) error = copyin(msfr.msfr_srcs, kss, sizeof(struct sockaddr_storage) * msfr.msfr_nsrcs); if (error) { + IN_MULTI_UNLOCK(); free(kss, M_TEMP); return (error); } From nobody Wed Apr 22 12:37:46 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g0zJp59cdz6ZRdy for ; Wed, 22 Apr 2026 12:37:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g0zJp1LKXz3HXs for ; Wed, 22 Apr 2026 12:37:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776861466; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ql2pdj4VxL7K0P1kknCGLxN1pvzpHJR/tkuHMdxYsZs=; b=G299btI3Xd8kK0VmYChNpv27h8vL1UfWUaFqaDdu25coCluXmnlA9WdhF5dzUDHaPujGgG ffdoVHeFCctSigrq+UGw7yWjXUhMIlbsoxFbqXvDJ5qSmjRIhqm7tXyR7p0AO+VIrZWOBq M4NlQ0HQMA7oatVdu9tljCY49LVNKTaCaVsej0wckMwUdnGvNR6l5g2w7fEfb4fzzZLqPS +d4hNEZGBwnardjM8VRq0MbntcwV2Z/0YbFLOTTKVhNWmwbhSMhF+cRIcekIHd4mMnhDRK cYg4zCmFLnlqFyZsnQZmW8XztYjnu5iv2pfBcfB+3s9RV6s2EytyjMkmZ820EQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776861466; a=rsa-sha256; cv=none; b=Ni7erceJ7nq6KD3R1iLgXKrhAuR0q2GOSXMb8jqdiRYxqJ+P/W4u0RTe4Qd2nq+xhPNM9i NwENpAbi16dHnl+MHWjFFc7bsObk3gZqMW8XZHp1gsLCDxpvKQVt6iDMFoatF81zDOjqcx 2geZ3EdSv22PcDXawyDW1aogKM1lf2pnVgKZjqqra7+5qSDHEanLK1yoAMzAQ6D5LFgPJZ Tu66AvCQRVURPhxe345qFFdaVnlZAuWkIuLxorXSZVHEdq7QmNsdx7/1ypAz6+l6QdACu9 UUxrYPt6Wbv6Jb5lYyrD4Diz/ZU4BvgvhdFrVQxm0sTl3bAz/jS3KFUABeNN+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776861466; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ql2pdj4VxL7K0P1kknCGLxN1pvzpHJR/tkuHMdxYsZs=; b=e/63DtPxAKkri1+IPzZx2PxCmGJZbYJTsj0JcugkKhx0aDg16tCH+aUilYaEsSYQYtJ8Uq yLy+LeS7fM8f8j/bSAltmMhdbcW4/b1QgcPZ8zubOHUIuDEn6chYt02cXNejh/PBzFXDwf NO8yJi5rTGQwBZvrkkhTDCDslkIq1AS1gYzpjMrAQh6D6aUNx8Zaqg8pOyeIE5wYzbB7II d2wQgPO6Qh3oHoVibyzMxX7LUzLohSPEqZ/O9oDEI7O9QA1KAHou4sfMSBDReK/vKmg9ig o7Fr8QgPTgVs0XyOnfwq7Qf9OZcG15/VrTsGfZ0aZaMKvNxsbf1fil7be7wIpw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g0zJp0vHBzVd5 for ; Wed, 22 Apr 2026 12:37:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 19098 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 12:37:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 8fe3978146d5 - stable/14 - linuxkpi: Fix an off-by-one error in the kfifo implementation List-Id: Commits to the stable branches 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8fe3978146d5b694693bfabd4d72ba02f44eccab Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 12:37:46 +0000 Message-Id: <69e8c11a.19098.26e183c7@gitrepo.freebsd.org> The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8fe3978146d5b694693bfabd4d72ba02f44eccab commit 8fe3978146d5b694693bfabd4d72ba02f44eccab Author: Mark Johnston AuthorDate: 2026-04-15 13:33:04 +0000 Commit: Mark Johnston CommitDate: 2026-04-22 12:37:34 +0000 linuxkpi: Fix an off-by-one error in the kfifo implementation "total" is the number of slots in the array, so wraparound needs to be done when "first" or "last" is greater than or equal to the number of slots. Note that no consumers of the code are currently connected to the kernel build. Reported by: Stanislav Fort Reviewed by: bz, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56371 (cherry picked from commit 52d2fc702b85d56b35f8828fe7efca3cde0d25b7) --- sys/compat/linuxkpi/common/include/linux/kfifo.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/kfifo.h b/sys/compat/linuxkpi/common/include/linux/kfifo.h index d2f570781661..b9f6ecacd3d1 100644 --- a/sys/compat/linuxkpi/common/include/linux/kfifo.h +++ b/sys/compat/linuxkpi/common/include/linux/kfifo.h @@ -71,7 +71,7 @@ (_kf)->head[(_kf)->last] = (_e); \ (_kf)->count++; \ (_kf)->last++; \ - if ((_kf)->last > (_kf)->total) \ + if ((_kf)->last >= (_kf)->total) \ (_kf)->last = 0; \ _rc = true; \ } \ @@ -89,7 +89,7 @@ *(_e) = (_kf)->head[(_kf)->first]; \ (_kf)->count--; \ (_kf)->first++; \ - if ((_kf)->first > (_kf)->total) \ + if ((_kf)->first >= (_kf)->total) \ (_kf)->first = 0; \ _rc = true; \ } \ From nobody Wed Apr 22 13:17:35 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g10Bm2CC8z6ZWpY for ; Wed, 22 Apr 2026 13:17:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g10Bm1PmTz3St7 for ; Wed, 22 Apr 2026 13:17:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776863856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HbSmPdzkpgMpwjkNQxO1kG/UE4dA9CZF/kc1J1JV6EM=; b=cK1JeJjd5QYd/q9ERojxcQpTgzYd/59UBQooLoIrq0EXQpJMWkjrE8iHC3juRs5/wL2IDM Bup24rrJyZ79TigYLJfaB8Q4vA5kVn5zu/xHPRAtREP3HDeCIvvFOHkDVum7z9auUm5CIH P3wVrv74r4V+hmoJBBZm5xfQlF1FGQg3wXl5qMbRTQ6zcC/UP973xvsoo2xK6Tsu7JQGdi /83pWIQveaEYqL6Chr1feQSso6Qr1I52EtOvCGFjhUxE3mJ/jkRy/4OaQV9JXT9LbQkIXh /zRsEmdpPs8BuBECQqEgTVtaIQ+/5UsXrAERXipYJ6wzRl5Aia1J3rSw7pe0aQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776863856; a=rsa-sha256; cv=none; b=ihM8vP9x6Qqm2YBQ6RhEhLGELK13j39xByUJRREiNQb/EwwXVHWKgYwBSpB/C7FfdKK/Du IYE+h2eZAPif1gq79Cx5RrusUPHTuz8knUWXhjx/OQCjksu8oYlrSDUyC449EQyaTEzn+k Eetx32sNks/FemiOypmSqGpDhwe+1d6KwX17b2cANSO1JP+GLUyuNIO1SGdx5jYstcD1Cm EvDjoy0jz1kGn94I63frzIJJBZ6Vl2uVYutRNZqSIeGYgdq/oc4ibfOAh/iUQJ+uHQ0yks eKiLOYaaTz1RzTF8Vay91pcJvHY2dLYYyE0tORwJTx1BNB6rIzPh7xtw5BXhkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776863856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HbSmPdzkpgMpwjkNQxO1kG/UE4dA9CZF/kc1J1JV6EM=; b=laSc1UkpPdINLPSbrpBak/MHCRO/Ml0S9dM3PcYXzuNolQGPYU7hP4Ry+icVOOJjoGl3P9 bKguF5Di321gTaz5K1Tz9oo8hXT1kdgLwDnNvvVQOhQZm+ExtW/cr0g3A/0npJej12DEAt 9NdDt2tu3w/fC+peMzdin1TtzAEYCrD0G/7D/SBXAJytb9pF8yitlAAo+7J4EC9a666Mub D8t3zVq3Ivx/+m6chqRMN5jWVoI+70jrGWAhuj7fHJ0NANkorhWWyVGkid2DC/UzuIFKAF Kkr3xll9Bfk60SNlpdtsfJCuRVj/gVpKWIqBtCGNY0zaj9HEloUFTrqbsPPEag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g10Bm0QyvzXbx for ; Wed, 22 Apr 2026 13:17:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e4a3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 13:17:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: edcfb3df7d13 - stable/15 - lesspipe: Use zstdcat List-Id: Commits to the stable branches 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: edcfb3df7d13352df8274fb29fdf817125a1dedb Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 13:17:35 +0000 Message-Id: <69e8ca6f.1e4a3.2b277525@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=edcfb3df7d13352df8274fb29fdf817125a1dedb commit edcfb3df7d13352df8274fb29fdf817125a1dedb Author: Ed Maste AuthorDate: 2026-02-23 18:59:55 +0000 Commit: Ed Maste CommitDate: 2026-04-22 13:17:24 +0000 lesspipe: Use zstdcat zstdcat is equivalent to zstd -dcf, and matches our intention. Suggested by: delphij (in D55101) Sponsored by: The FreeBSD Foundation (cherry picked from commit 34d7f100c1d9e6f21d2f79097e891f7a17749d1b) --- usr.bin/less/lesspipe.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/less/lesspipe.sh b/usr.bin/less/lesspipe.sh index 6fc6cc471638..7992cc4e2e3d 100644 --- a/usr.bin/less/lesspipe.sh +++ b/usr.bin/less/lesspipe.sh @@ -21,7 +21,7 @@ case "$1" in exec lzma -d -c "$1" 2>/dev/null ;; *.zst) - exec zstd -d -q -c -f "$1" 2>/dev/null + exec zstdcat -q "$1" 2>/dev/null ;; *) exec cat "$1" 2>/dev/null ;; From nobody Wed Apr 22 13:44:17 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g10nY27Qvz6ZZ3k for ; Wed, 22 Apr 2026 13:44:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g10nY1wFsz3WKZ for ; Wed, 22 Apr 2026 13:44:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776865457; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=APoW2M8nM+U+neYCTNDJA9oRVZN6Vku52883Y74XyX0=; b=fBUaNsUvilZGGF9ljG6N6ShEAGdHBROaAYztHr/FRT/rzJzJ8lvI1vs0SsDUA1Ts013u+Z OpBnivFRqOJx5upOzd/K4cZSaUDgHqU6n4YzdtMJLLYji+gykwKdsyZpAmw/QAMOrBUTTt 1O2anc6IyxVghCiJ1gX5dNj8j7cGxVPCudT4bKWcEtCtomW1MpAtwNt9kZhYCQJ1A6B5Wt 5StEKl3ASsBBZAmzpuw9LnGMVhuK/7t/sWTwsMchDrEfS/1tMoIubtAnfwj3goAugDr5Td c+7L1+uK7Ij0im6t2qOiKtcNt3XOVqmFrCXKQ5EpVvHqUOaXKsZljMCbfzFccA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776865457; a=rsa-sha256; cv=none; b=IisleT186I4+tB9VySr1e8g2iZQS5DOBEcTrcTr3SKkLo/pquv/+3xx8/IzO+cvQN+1GLd PotlHuyNauCQLg3B739GWmn9KqtfKI+UFRhKsjy6pSe8TvDQnHKBULOhNiNiwVInQjrXJj 9YUZQTGWL+clY4cyesune3fRLpouOJeZTm9uMqCXl0VZUGKK0gZJCpFy9L5lfO1TIDkqWG 4asQNlhqXq/DWdfjEtd74MqRIgyX3bwVQ+1J2hwRWW/LxFhv/sujk8sOM+Q53grE5FsT1i ZUzYXfdGocJR7DrX3/O6SKI75K1RK4rHyK5yz8G5POZ3txMOfLJBgswhSp6sJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776865457; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=APoW2M8nM+U+neYCTNDJA9oRVZN6Vku52883Y74XyX0=; b=vujEJR4dr+t3r4f4ddG6Nynek+Ddo3/Wt/UJ7g3962LP6UbWvJ1+5ScX/cp3AG6YiuW5Fd PaO8hKdPjI7aLJrSLZOlYywQMb2VHJVQ/zsLwUdUSyBiPqp3HLNL5/wbpaviFMUoe/xRIi EdGi1vCcij9ZaK1llpgCq4Ux3jmKFVOz7XVlj2Fsc2vEKA6phg75b+p2gtzZeletQUVdDR fy7Jh7RfvMA97W5gt8vnoPsDS7aFwz2jTpxKYAX1cn3HvZKbEtI/P895qJ3ni4eu/wdEbG TIbCPQp3+9X0m3dJEU3XvhStmLTbEmsV2CUEMA84gnp6O1wlc/eOqf0YsSiaJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g10nY1S4nzZFC for ; Wed, 22 Apr 2026 13:44:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21ffa by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 13:44:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Martin Matuska Subject: git: e60d2d53ed83 - stable/15 - libarchive: merge from vendor branch List-Id: Commits to the stable branches 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: mm X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: e60d2d53ed838ac50d25080abc415e387b404f09 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 13:44:17 +0000 Message-Id: <69e8d0b1.21ffa.3c2d786f@gitrepo.freebsd.org> The branch stable/15 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=e60d2d53ed838ac50d25080abc415e387b404f09 commit e60d2d53ed838ac50d25080abc415e387b404f09 Author: Martin Matuska AuthorDate: 2026-04-13 13:47:17 +0000 Commit: Martin Matuska CommitDate: 2026-04-22 13:43:16 +0000 libarchive: merge from vendor branch libarchive 3.8.7 Important bugfixes: #2871 libarchive: fix handling of option failures #2897 iso9660: fix undefined behavior #2898 RAR: fix LZSS window size mismatch after PPMd block #2900 CAB: fix NULL pointer dereference during skip #2911 libarchive: do not continue with truncated numbers #2919 CAB: Fix Heap OOB Write in CAB LZX decoder #2934 iso9660: fix posibble heap buffer overflow on 32-bit systems #2939 cpio: Fix -R memory leak #2947 libarchive: lzop and grzip filter support Important bugfixes between 3.8.5 and 3.8.6: #2860 bsdunzip: fix ISO week year and Gregorian year confusion #2864 7zip: ix SEGV in check_7zip_header_in_sfx via ELF offset validation #2875 7zip: fix out-of-bounds access on ELF 64-bit header #2877 RAR5 reader: fix infinite loop in rar5 decompression #2878 mtree reader: Fix file descriptor leak in mtree parser cleanup (CWE-775) #2892 RAR5 reader: fix potential memory leak #2893 RAR5: fix SIGSEGV when archive_read_support_format_rar5 is called twice #2895 CAB reader: fix memory leak on repeated calls to archive_read_support_format_cab Obtained from: libarchive Vendor commit: ded82291ab41d5e355831b96b0e1ff49e24d8939 MFC after: 1 week (cherry picked from commit eb5165bb491138f60d9004bc4c781490016d9288) --- contrib/libarchive/NEWS | 4 + contrib/libarchive/README.md | 9 +- contrib/libarchive/cpio/cmdline.c | 15 +- contrib/libarchive/cpio/cpio.c | 123 ++- contrib/libarchive/cpio/cpio.h | 2 - contrib/libarchive/cpio/test/test_format_newc.c | 7 + contrib/libarchive/libarchive/archive.h | 4 +- contrib/libarchive/libarchive/archive_acl.c | 6 +- .../libarchive/libarchive/archive_check_magic.c | 4 +- .../libarchive/archive_cryptor_private.h | 4 + contrib/libarchive/libarchive/archive_entry.h | 2 +- contrib/libarchive/libarchive/archive_hmac.c | 6 + contrib/libarchive/libarchive/archive_options.c | 4 +- contrib/libarchive/libarchive/archive_pathmatch.c | 4 +- contrib/libarchive/libarchive/archive_ppmd8.c | 22 +- .../libarchive/libarchive/archive_ppmd8_private.h | 25 - contrib/libarchive/libarchive/archive_read.c | 12 +- .../libarchive/archive_read_append_filter.c | 4 + .../libarchive/archive_read_disk_posix.c | 6 +- .../libarchive/archive_read_open_filename.c | 7 +- .../libarchive/archive_read_support_filter_grzip.c | 2 +- .../libarchive/archive_read_support_filter_lz4.c | 4 +- .../libarchive/archive_read_support_filter_lzop.c | 2 +- .../archive_read_support_filter_program.c | 2 + .../libarchive/archive_read_support_format_7zip.c | 24 +- .../libarchive/archive_read_support_format_cab.c | 24 +- .../libarchive/archive_read_support_format_cpio.c | 4 +- .../archive_read_support_format_iso9660.c | 26 +- .../libarchive/archive_read_support_format_lha.c | 11 +- .../libarchive/archive_read_support_format_mtree.c | 7 +- .../libarchive/archive_read_support_format_rar.c | 73 +- .../libarchive/archive_read_support_format_rar5.c | 45 +- .../libarchive/archive_read_support_format_tar.c | 6 +- .../libarchive/archive_read_support_format_xar.c | 14 +- .../libarchive/archive_read_support_format_zip.c | 22 +- contrib/libarchive/libarchive/archive_string.c | 16 +- contrib/libarchive/libarchive/archive_write.c | 2 +- .../archive_write_add_filter_b64encode.c | 22 +- .../libarchive/archive_write_add_filter_bzip2.c | 7 +- .../libarchive/archive_write_add_filter_gzip.c | 12 +- .../libarchive/archive_write_add_filter_lrzip.c | 21 +- .../libarchive/archive_write_add_filter_lz4.c | 14 +- .../libarchive/archive_write_add_filter_lzop.c | 7 +- .../libarchive/archive_write_add_filter_uuencode.c | 22 +- .../libarchive/archive_write_add_filter_xz.c | 27 +- .../libarchive/archive_write_add_filter_zstd.c | 52 +- .../libarchive/archive_write_disk_posix.c | 30 +- .../libarchive/archive_write_set_format_7zip.c | 9 +- .../archive_write_set_format_cpio_binary.c | 4 +- .../archive_write_set_format_cpio_newc.c | 2 +- .../libarchive/archive_write_set_format_cpio_odc.c | 2 +- .../libarchive/archive_write_set_format_gnutar.c | 34 +- .../libarchive/archive_write_set_format_iso9660.c | 18 +- .../libarchive/archive_write_set_format_mtree.c | 2 +- .../libarchive/archive_write_set_format_pax.c | 6 +- .../libarchive/archive_write_set_format_ustar.c | 27 +- .../libarchive/archive_write_set_format_v7tar.c | 27 +- .../libarchive/archive_write_set_format_xar.c | 6 +- .../libarchive/archive_write_set_format_zip.c | 49 +- contrib/libarchive/libarchive/test/test_acl_text.c | 23 + .../libarchive/test/test_archive_pathmatch.c | 18 + .../test/test_archive_string_conversion.c | 135 +++ .../test/test_gnutar_filename_encoding.c | 40 + .../libarchive/test/test_read_format_7zip.c | 26 + .../test/test_read_format_7zip_malformed.c | 17 + .../test/test_read_format_7zip_malformed3.7z.uu | 24 + .../test_read_format_7zip_sfx_elf64trunc.elf.uu | 5 + .../libarchive/test/test_read_format_cab_lzx_oob.c | 45 + .../test/test_read_format_cab_lzx_oob.cab.uu | 11 + .../test/test_read_format_cab_skip_malformed.c | 41 + .../test_read_format_cab_skip_malformed.cab.uu | 95 ++ .../test/test_read_format_iso_zisofs_overflow.c | 104 ++ .../test_read_format_iso_zisofs_overflow.iso.uu | 1096 ++++++++++++++++++++ .../test/test_read_format_lha_oversize_header.c | 50 + .../test_read_format_lha_oversize_header.lzh.uu | 60 ++ .../test/test_read_format_rar5_loop_bug.c | 53 + .../test/test_read_format_rar5_loop_bug.rar.uu | 189 ++++ .../libarchive/test/test_read_set_format.c | 34 + .../libarchive/test/test_ustar_filename_encoding.c | 40 + .../libarchive/test/test_v7tar_filename_encoding.c | 67 ++ .../test/test_warn_missing_hardlink_target.c | 2 +- .../libarchive/libarchive/test/test_write_disk.c | 29 + .../libarchive/test/test_write_disk_perms.c | 11 +- .../libarchive/test/test_zip_filename_encoding.c | 40 + .../la_getline.c => libarchive_fe/lafe_getline.c} | 11 +- .../la_getline.h => libarchive_fe/lafe_getline.h} | 15 +- contrib/libarchive/tar/bsdtar.c | 20 +- contrib/libarchive/tar/read.c | 2 +- contrib/libarchive/tar/util.c | 8 +- contrib/libarchive/tar/write.c | 16 +- contrib/libarchive/test_utils/test_common.h | 4 + contrib/libarchive/test_utils/test_main.c | 85 +- contrib/libarchive/unzip/bsdunzip.c | 6 +- lib/libarchive/tests/Makefile | 13 + usr.bin/unzip/Makefile | 2 +- 95 files changed, 3019 insertions(+), 372 deletions(-) diff --git a/contrib/libarchive/NEWS b/contrib/libarchive/NEWS index be14de445b57..d5e9769771e2 100644 --- a/contrib/libarchive/NEWS +++ b/contrib/libarchive/NEWS @@ -1,3 +1,7 @@ +Apr 13, 2026: libarchive 3.8.7 released + +Mar 10, 2026: libarchive 3.8.6 released + Jan 05, 2026: libarchive 3.8.5 released Dec 01, 2025: libarchive 3.8.4 released diff --git a/contrib/libarchive/README.md b/contrib/libarchive/README.md index e9691f1b710b..3009e1b54d18 100644 --- a/contrib/libarchive/README.md +++ b/contrib/libarchive/README.md @@ -37,10 +37,13 @@ The top-level directory contains the following information files: * **CMakeLists.txt** - input for "cmake" build tool, see INSTALL * **configure** - configuration script, see INSTALL for details. If your copy of the source lacks a `configure` script, you can try to construct it by running the script in `build/autogen.sh` (or use `cmake`). -The following files in the top-level directory are used by the 'configure' script: +The following files in the top-level directory are related to the 'configure' script and are only needed by maintainers: -* `Makefile.am`, `aclocal.m4`, `configure.ac` - used to build this distribution, only needed by maintainers -* `Makefile.in`, `config.h.in` - templates used by configure script +* `configure.ac` - used (by autoconf) to build the configure script and related files +* `Makefile.am` - used (by automake) to generate Makefile.in +* `aclocal.m4` - auto-generated file (created by aclocal) used to build the configure script +* `Makefile.in` - auto-generated template (created by automake) used by the configure script to create Makefile +* `config.h.in` - auto-generated template (created by autoheader) used by the configure script to create config.h ## Documentation diff --git a/contrib/libarchive/cpio/cmdline.c b/contrib/libarchive/cpio/cmdline.c index db06c03c011d..a3d029c65161 100644 --- a/contrib/libarchive/cpio/cmdline.c +++ b/contrib/libarchive/cpio/cmdline.c @@ -11,6 +11,9 @@ #ifdef HAVE_ERRNO_H #include #endif +#ifdef HAVE_LIMITS_H +#include +#endif #ifdef HAVE_GRP_H #include #endif @@ -347,9 +350,10 @@ owner_parse(const char *spec, struct cpio_owner *owner, const char **errmsg) owner->gid = pwent->pw_gid; } else { char *end; + unsigned long val; errno = 0; - owner->uid = (int)strtoul(user, &end, 10); - if (errno || *end != '\0') { + val = strtoul(user, &end, 10); + if (errno || *end != '\0' || val > (unsigned)INT_MAX) { snprintf(errbuff, sizeof(errbuff), "Couldn't lookup user ``%s''", user); errbuff[sizeof(errbuff) - 1] = '\0'; @@ -357,6 +361,7 @@ owner_parse(const char *spec, struct cpio_owner *owner, const char **errmsg) *errmsg = errbuff; return (-1); } + owner->uid = (int)val; } free(user); } @@ -373,15 +378,17 @@ owner_parse(const char *spec, struct cpio_owner *owner, const char **errmsg) } } else { char *end; + unsigned long val; errno = 0; - owner->gid = (int)strtoul(g, &end, 10); - if (errno || *end != '\0') { + val = strtoul(g, &end, 10); + if (errno || *end != '\0' || val > (unsigned)INT_MAX) { snprintf(errbuff, sizeof(errbuff), "Couldn't lookup group ``%s''", g); errbuff[sizeof(errbuff) - 1] = '\0'; *errmsg = errbuff; return (-1); } + owner->gid = (int)val; } } return (0); diff --git a/contrib/libarchive/cpio/cpio.c b/contrib/libarchive/cpio/cpio.c index 77eefe809f37..6e6c2c3356c0 100644 --- a/contrib/libarchive/cpio/cpio.c +++ b/contrib/libarchive/cpio/cpio.c @@ -8,6 +8,8 @@ #include "cpio_platform.h" +#include "lafe_getline.h" + #include #include #include @@ -33,6 +35,9 @@ #ifdef HAVE_LOCALE_H #include #endif +#ifdef HAVE_LIMITS_H +#include +#endif #ifdef HAVE_PWD_H #include #endif @@ -83,7 +88,7 @@ struct name_cache { static int extract_data(struct archive *, struct archive *); const char * cpio_i64toa(int64_t); -static const char *cpio_rename(const char *name); +static void cpio_rename(struct archive_entry *); static int entry_to_archive(struct cpio *, struct archive_entry *); static int file_to_archive(struct cpio *, const char *); static void free_cache(struct name_cache *cache); @@ -110,19 +115,16 @@ static void passphrase_free(char *); int main(int argc, char *argv[]) { - static char buff[16384]; struct cpio _cpio; /* Allocated on stack. */ struct cpio *cpio; struct cpio_owner owner; const char *errmsg; char *tptr; - int opt, t; + int opt; + long t; cpio = &_cpio; memset(cpio, 0, sizeof(*cpio)); - cpio->buff = buff; - cpio->buff_size = sizeof(buff); - #if defined(HAVE_SIGACTION) { @@ -204,13 +206,13 @@ main(int argc, char *argv[]) case 'C': /* NetBSD/OpenBSD */ errno = 0; tptr = NULL; - t = (int)strtol(cpio->argument, &tptr, 10); - if (errno || t <= 0 || *(cpio->argument) == '\0' || + t = strtol(cpio->argument, &tptr, 10); + if (errno || t <= 0 || t > INT_MAX || *(cpio->argument) == '\0' || tptr == NULL || *tptr != '\0') { lafe_errc(1, 0, "Invalid blocksize: %s", cpio->argument); } - cpio->bytes_per_block = t; + cpio->bytes_per_block = (int)t; break; case 'c': /* POSIX 1997 */ cpio->format = "odc"; @@ -222,7 +224,7 @@ main(int argc, char *argv[]) if (archive_match_include_pattern_from_file( cpio->matching, cpio->argument, cpio->option_null) != ARCHIVE_OK) - lafe_errc(1, 0, "Error : %s", + lafe_errc(1, 0, "%s", archive_error_string(cpio->matching)); break; case 'F': /* NetBSD/OpenBSD/GNU cpio */ @@ -231,7 +233,7 @@ main(int argc, char *argv[]) case 'f': /* POSIX 1997 */ if (archive_match_exclude_pattern(cpio->matching, cpio->argument) != ARCHIVE_OK) - lafe_errc(1, 0, "Error : %s", + lafe_errc(1, 0, "%s", archive_error_string(cpio->matching)); break; case OPTION_GRZIP: @@ -247,7 +249,7 @@ main(int argc, char *argv[]) cpio->filename = cpio->argument; break; case 'i': /* POSIX 1997 */ - if (cpio->mode != '\0') + if (cpio->mode != '\0' && cpio->mode != opt) lafe_errc(1, 0, "Cannot use both -i and -%c", cpio->mode); cpio->mode = opt; @@ -289,13 +291,13 @@ main(int argc, char *argv[]) cpio->filename = cpio->argument; break; case 'o': /* POSIX 1997 */ - if (cpio->mode != '\0') + if (cpio->mode != '\0' && cpio->mode != opt) lafe_errc(1, 0, "Cannot use both -o and -%c", cpio->mode); cpio->mode = opt; break; case 'p': /* POSIX 1997 */ - if (cpio->mode != '\0') + if (cpio->mode != '\0' && cpio->mode != opt) lafe_errc(1, 0, "Cannot use both -p and -%c", cpio->mode); cpio->mode = opt; @@ -316,17 +318,21 @@ main(int argc, char *argv[]) if (owner_parse(cpio->argument, &owner, &errmsg) != 0) { if (!errmsg) errmsg = "Error parsing owner"; - lafe_warnc(-1, "%s", errmsg); + lafe_warnc(0, "%s", errmsg); usage(); } if (owner.uid != -1) cpio->uid_override = owner.uid; - if (owner.uname != NULL) + if (owner.uname != NULL) { + free(cpio->uname_override); cpio->uname_override = owner.uname; + } if (owner.gid != -1) cpio->gid_override = owner.gid; - if (owner.gname != NULL) + if (owner.gname != NULL) { + free(cpio->gname_override); cpio->gname_override = owner.gname; + } break; case 'r': /* POSIX 1997 */ cpio->option_rename = 1; @@ -409,7 +415,7 @@ main(int argc, char *argv[]) while (*cpio->argv != NULL) { if (archive_match_include_pattern(cpio->matching, *cpio->argv) != ARCHIVE_OK) - lafe_errc(1, 0, "Error : %s", + lafe_errc(1, 0, "%s", archive_error_string(cpio->matching)); --cpio->argc; ++cpio->argv; @@ -427,7 +433,7 @@ main(int argc, char *argv[]) break; default: lafe_errc(1, 0, - "Must specify at least one of -i, -o, or -p"); + "Must specify one of -i, -o, or -p"); } archive_match_free(cpio->matching); @@ -524,7 +530,7 @@ mode_out(struct cpio *cpio) int r; if (cpio->option_append) - lafe_errc(1, 0, "Append mode not yet supported."); + lafe_errc(1, 0, "Append mode not yet supported"); cpio->archive_read_disk = archive_read_disk_new(); if (cpio->archive_read_disk == NULL) @@ -638,7 +644,7 @@ mode_out(struct cpio *cpio) int64_t blocks = (archive_filter_bytes(cpio->archive, 0) + 511) / 512; - fprintf(stderr, "%lu %s\n", (unsigned long)blocks, + fprintf(stderr, "%lld %s\n", (long long)blocks, blocks == 1 ? "block" : "blocks"); } archive_write_free(cpio->archive); @@ -696,7 +702,6 @@ remove_leading_slash(const char *p) static int file_to_archive(struct cpio *cpio, const char *srcpath) { - const char *destpath; struct archive_entry *entry, *spare; size_t len; int r; @@ -738,7 +743,6 @@ file_to_archive(struct cpio *cpio, const char *srcpath) * pass mode or the name that will go into the archive in * output mode. */ - destpath = srcpath; if (cpio->destdir) { len = cpio->destdir_len + strlen(srcpath) + 8; if (len >= cpio->pass_destpath_alloc) { @@ -754,15 +758,17 @@ file_to_archive(struct cpio *cpio, const char *srcpath) } strcpy(cpio->pass_destpath, cpio->destdir); strcat(cpio->pass_destpath, remove_leading_slash(srcpath)); - destpath = cpio->pass_destpath; + archive_entry_set_pathname(entry, cpio->pass_destpath); + } else { + archive_entry_set_pathname(entry, srcpath); } if (cpio->option_rename) - destpath = cpio_rename(destpath); - if (destpath == NULL) { + cpio_rename(entry); + + if (archive_entry_pathname(entry) == NULL) { archive_entry_free(entry); return (0); } - archive_entry_copy_pathname(entry, destpath); /* * If we're trying to preserve hardlinks, match them here. @@ -791,7 +797,6 @@ entry_to_archive(struct cpio *cpio, struct archive_entry *entry) const char *destpath = archive_entry_pathname(entry); const char *srcpath = archive_entry_sourcepath(entry); int fd = -1; - ssize_t bytes_read; int r; /* Print out the destination name to the user. */ @@ -869,21 +874,23 @@ entry_to_archive(struct cpio *cpio, struct archive_entry *entry) exit(1); if (r >= ARCHIVE_WARN && archive_entry_size(entry) > 0 && fd >= 0) { - bytes_read = read(fd, cpio->buff, (unsigned)cpio->buff_size); + static char buff[16384]; + ssize_t bytes_read; + + bytes_read = read(fd, buff, sizeof(buff)); while (bytes_read > 0) { ssize_t bytes_write; bytes_write = archive_write_data(cpio->archive, - cpio->buff, bytes_read); + buff, bytes_read); if (bytes_write < 0) lafe_errc(1, archive_errno(cpio->archive), "%s", archive_error_string(cpio->archive)); if (bytes_write < bytes_read) { lafe_warnc(0, "Truncated write; file may have " - "grown while being archived."); + "grown while being archived"); } - bytes_read = read(fd, cpio->buff, - (unsigned)cpio->buff_size); + bytes_read = read(fd, buff, sizeof(buff)); } } @@ -997,11 +1004,9 @@ mode_in(struct cpio *cpio) } if (archive_match_path_excluded(cpio->matching, entry)) continue; - if (cpio->option_rename) { - destpath = cpio_rename(archive_entry_pathname(entry)); - archive_entry_set_pathname(entry, destpath); - } else - destpath = archive_entry_pathname(entry); + if (cpio->option_rename) + cpio_rename(entry); + destpath = archive_entry_pathname(entry); if (destpath == NULL) continue; if (cpio->verbose) @@ -1040,7 +1045,7 @@ mode_in(struct cpio *cpio) if (!cpio->quiet) { int64_t blocks = (archive_filter_bytes(a, 0) + 511) / 512; - fprintf(stderr, "%lu %s\n", (unsigned long)blocks, + fprintf(stderr, "%lld %s\n", (long long)blocks, blocks == 1 ? "block" : "blocks"); } archive_read_free(a); @@ -1125,7 +1130,7 @@ mode_list(struct cpio *cpio) if (!cpio->quiet) { int64_t blocks = (archive_filter_bytes(a, 0) + 511) / 512; - fprintf(stderr, "%lu %s\n", (unsigned long)blocks, + fprintf(stderr, "%lld %s\n", (long long)blocks, blocks == 1 ? "block" : "blocks"); } archive_read_free(a); @@ -1292,54 +1297,60 @@ mode_pass(struct cpio *cpio, const char *destdir) * that an input of '.' means the name should be unchanged. GNU cpio * treats '.' as a literal new name. */ -static const char * -cpio_rename(const char *name) +void +cpio_rename(struct archive_entry *entry) { - static char buff[1024]; + char *buff = NULL, *p, *ret = NULL; FILE *t; - char *p, *ret; + size_t n = 0; + ssize_t r; #if defined(_WIN32) && !defined(__CYGWIN__) FILE *to; t = fopen("CONIN$", "r"); if (t == NULL) - return (name); + return; to = fopen("CONOUT$", "w"); if (to == NULL) { fclose(t); - return (name); + return; } - fprintf(to, "%s (Enter/./(new name))? ", name); + fprintf(to, "%s (Enter/./(new name))? ", archive_entry_pathname(entry)); fclose(to); #else t = fopen("/dev/tty", "r+"); if (t == NULL) - return (name); - fprintf(t, "%s (Enter/./(new name))? ", name); + return; + fprintf(t, "%s (Enter/./(new name))? ", archive_entry_pathname(entry)); fflush(t); #endif - p = fgets(buff, sizeof(buff), t); + r = getline(&buff, &n, t); fclose(t); - if (p == NULL) + if (r < 1) /* End-of-file is a blank line. */ - return (NULL); + goto done; + p = buff; while (*p == ' ' || *p == '\t') ++p; if (*p == '\n' || *p == '\0') /* Empty line. */ - return (NULL); - if (*p == '.' && p[1] == '\n') + goto done; + if (*p == '.' && p[1] == '\n') { /* Single period preserves original name. */ - return (name); + free(buff); + return; + } ret = p; /* Trim the final newline. */ while (*p != '\0' && *p != '\n') ++p; /* Overwrite the final \n with a null character. */ *p = '\0'; - return (ret); +done: + archive_entry_set_pathname(entry, ret); + free(buff); } static void diff --git a/contrib/libarchive/cpio/cpio.h b/contrib/libarchive/cpio/cpio.h index 9bc631b544fe..2621a4c3dda3 100644 --- a/contrib/libarchive/cpio/cpio.h +++ b/contrib/libarchive/cpio/cpio.h @@ -71,8 +71,6 @@ struct cpio { /* Work data. */ struct archive *matching; - char *buff; - size_t buff_size; char *ppbuff; }; diff --git a/contrib/libarchive/cpio/test/test_format_newc.c b/contrib/libarchive/cpio/test/test_format_newc.c index 33aa16d07a81..9d4e4e9fb674 100644 --- a/contrib/libarchive/cpio/test/test_format_newc.c +++ b/contrib/libarchive/cpio/test/test_format_newc.c @@ -6,6 +6,13 @@ */ #include "test.h" +#ifdef HAVE_GETEUID +#define getuid() geteuid() +#endif +#ifdef HAVE_GETEGID +#define getgid() getegid() +#endif + /* Number of bytes needed to pad 'n' to multiple of 'block', assuming * that 'block' is a power of two. This trick can be more easily * remembered as -n & (block - 1), but many compilers quite reasonably diff --git a/contrib/libarchive/libarchive/archive.h b/contrib/libarchive/libarchive/archive.h index a9d34beb4f5a..41a5440cac75 100644 --- a/contrib/libarchive/libarchive/archive.h +++ b/contrib/libarchive/libarchive/archive.h @@ -34,7 +34,7 @@ * assert that ARCHIVE_VERSION_NUMBER >= 2012108. */ /* Note: Compiler will complain if this does not match archive_entry.h! */ -#define ARCHIVE_VERSION_NUMBER 3008005 +#define ARCHIVE_VERSION_NUMBER 3008007 #include #include /* for wchar_t */ @@ -177,7 +177,7 @@ __LA_DECL int archive_version_number(void); /* * Textual name/version of the library, useful for version displays. */ -#define ARCHIVE_VERSION_ONLY_STRING "3.8.5" +#define ARCHIVE_VERSION_ONLY_STRING "3.8.7" #define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING __LA_DECL const char * archive_version_string(void); diff --git a/contrib/libarchive/libarchive/archive_acl.c b/contrib/libarchive/libarchive/archive_acl.c index 362e3308f43f..ab601833def6 100644 --- a/contrib/libarchive/libarchive/archive_acl.c +++ b/contrib/libarchive/libarchive/archive_acl.c @@ -1256,8 +1256,12 @@ archive_acl_from_text_w(struct archive_acl *acl, const wchar_t *text, tag = 0; s = field[n].start; - st = field[n].start + 1; len = field[n].end - field[n].start; + if (len == 0) { + ret = ARCHIVE_WARN; + continue; + } + st = s + 1; switch (*s) { case L'u': diff --git a/contrib/libarchive/libarchive/archive_check_magic.c b/contrib/libarchive/libarchive/archive_check_magic.c index 6b8e0c5595f4..b6e1257949e1 100644 --- a/contrib/libarchive/libarchive/archive_check_magic.c +++ b/contrib/libarchive/libarchive/archive_check_magic.c @@ -148,14 +148,14 @@ __archive_check_magic(struct archive *a, unsigned int magic, if (!handle_type) { errmsg("PROGRAMMER ERROR: Function "); errmsg(function); - errmsg(" invoked with invalid archive handle.\n"); + errmsg(" invoked with invalid archive handle\n"); diediedie(); } if (a->magic != magic) { archive_set_error(a, -1, "PROGRAMMER ERROR: Function '%s' invoked" - " on '%s' archive object, which is not supported.", + " on '%s' archive object, which is not supported", function, handle_type); a->state = ARCHIVE_STATE_FATAL; diff --git a/contrib/libarchive/libarchive/archive_cryptor_private.h b/contrib/libarchive/libarchive/archive_cryptor_private.h index 272f2f84b9c9..1f9298ffdc46 100644 --- a/contrib/libarchive/libarchive/archive_cryptor_private.h +++ b/contrib/libarchive/libarchive/archive_cryptor_private.h @@ -109,6 +109,10 @@ typedef struct { #include #define ARCHIVE_CRYPTOR_USE_NETTLE 1 +#ifndef AES_MAX_KEY_SIZE +#define AES_MAX_KEY_SIZE AES256_KEY_SIZE +#endif + typedef struct { #if NETTLE_VERSION_MAJOR < 3 struct aes_ctx ctx; diff --git a/contrib/libarchive/libarchive/archive_entry.h b/contrib/libarchive/libarchive/archive_entry.h index b43435692c27..7122a74ed007 100644 --- a/contrib/libarchive/libarchive/archive_entry.h +++ b/contrib/libarchive/libarchive/archive_entry.h @@ -28,7 +28,7 @@ #define ARCHIVE_ENTRY_H_INCLUDED /* Note: Compiler will complain if this does not match archive.h! */ -#define ARCHIVE_VERSION_NUMBER 3008005 +#define ARCHIVE_VERSION_NUMBER 3008007 /* * Note: archive_entry.h is for use outside of libarchive; the diff --git a/contrib/libarchive/libarchive/archive_hmac.c b/contrib/libarchive/libarchive/archive_hmac.c index 210cca70744d..458092f41b29 100644 --- a/contrib/libarchive/libarchive/archive_hmac.c +++ b/contrib/libarchive/libarchive/archive_hmac.c @@ -198,6 +198,7 @@ static void __hmac_sha1_cleanup(archive_hmac_sha1_ctx *ctx) } #elif defined(HAVE_LIBNETTLE) && defined(HAVE_NETTLE_HMAC_H) +#include static int __hmac_sha1_init(archive_hmac_sha1_ctx *ctx, const uint8_t *key, size_t key_len) @@ -216,7 +217,12 @@ __hmac_sha1_update(archive_hmac_sha1_ctx *ctx, const uint8_t *data, static void __hmac_sha1_final(archive_hmac_sha1_ctx *ctx, uint8_t *out, size_t *out_len) { +#if NETTLE_VERSION_MAJOR < 4 hmac_sha1_digest(ctx, (unsigned)*out_len, out); +#else + hmac_sha1_digest(ctx, out); + *out_len = SHA1_DIGEST_SIZE; +#endif } static void diff --git a/contrib/libarchive/libarchive/archive_options.c b/contrib/libarchive/libarchive/archive_options.c index 6e2c0d2a5971..66491bd4183b 100644 --- a/contrib/libarchive/libarchive/archive_options.c +++ b/contrib/libarchive/libarchive/archive_options.c @@ -90,7 +90,9 @@ _archive_set_either_option(struct archive *a, const char *m, const char *o, cons if (r2 == ARCHIVE_FATAL) return (ARCHIVE_FATAL); - if (r2 == ARCHIVE_WARN - 1) + if (r1 == ARCHIVE_WARN - 1) + return r2; + if (r2 == ARCHIVE_WARN -1) return r1; return r1 > r2 ? r1 : r2; } diff --git a/contrib/libarchive/libarchive/archive_pathmatch.c b/contrib/libarchive/libarchive/archive_pathmatch.c index 19e0889ffe55..db0d2b791adf 100644 --- a/contrib/libarchive/libarchive/archive_pathmatch.c +++ b/contrib/libarchive/libarchive/archive_pathmatch.c @@ -202,7 +202,7 @@ pm(const char *p, const char *s, int flags) if (*p == '\0') return (1); while (*s) { - if (archive_pathmatch(p, s, flags)) + if (pm(p, s, flags)) return (1); ++s; } @@ -307,7 +307,7 @@ pm_w(const wchar_t *p, const wchar_t *s, int flags) if (*p == L'\0') return (1); while (*s) { - if (archive_pathmatch_w(p, s, flags)) + if (pm_w(p, s, flags)) return (1); ++s; } diff --git a/contrib/libarchive/libarchive/archive_ppmd8.c b/contrib/libarchive/libarchive/archive_ppmd8.c index 30196d64a9f5..04b1c0c3e165 100644 --- a/contrib/libarchive/libarchive/archive_ppmd8.c +++ b/contrib/libarchive/libarchive/archive_ppmd8.c @@ -61,7 +61,7 @@ typedef struct CPpmd8_Node_ #define EMPTY_NODE 0xFFFFFFFF -void Ppmd8_Construct(CPpmd8 *p) +static void Ppmd8_Construct(CPpmd8 *p) { unsigned i, k, m; @@ -89,14 +89,14 @@ void Ppmd8_Construct(CPpmd8 *p) } } -void Ppmd8_Free(CPpmd8 *p) +static void Ppmd8_Free(CPpmd8 *p) { free(p->Base); p->Size = 0; p->Base = 0; } -Bool Ppmd8_Alloc(CPpmd8 *p, UInt32 size) +static Bool Ppmd8_Alloc(CPpmd8 *p, UInt32 size) { if (p->Base == 0 || p->Size != size) { @@ -407,7 +407,7 @@ static void RestartModel(CPpmd8 *p) } } -void Ppmd8_Init(CPpmd8 *p, unsigned maxOrder, unsigned restoreMethod) +static void Ppmd8_Init(CPpmd8 *p, unsigned maxOrder, unsigned restoreMethod) { p->MaxOrder = maxOrder; p->RestoreMethod = restoreMethod; @@ -1042,7 +1042,7 @@ static void Rescale(CPpmd8 *p) p->FoundState = STATS(p->MinContext); } -CPpmd_See *Ppmd8_MakeEscFreq(CPpmd8 *p, unsigned numMasked1, UInt32 *escFreq) +static CPpmd_See *Ppmd8_MakeEscFreq(CPpmd8 *p, unsigned numMasked1, UInt32 *escFreq) { CPpmd_See *see; if (p->MinContext->NumStats != 0xFF) @@ -1078,7 +1078,7 @@ static void NextContext(CPpmd8 *p) } } -void Ppmd8_Update1(CPpmd8 *p) +static void Ppmd8_Update1(CPpmd8 *p) { CPpmd_State *s = p->FoundState; s->Freq += 4; @@ -1093,7 +1093,7 @@ void Ppmd8_Update1(CPpmd8 *p) NextContext(p); } -void Ppmd8_Update1_0(CPpmd8 *p) +static void Ppmd8_Update1_0(CPpmd8 *p) { p->PrevSuccess = (2 * p->FoundState->Freq >= p->MinContext->SummFreq); p->RunLength += p->PrevSuccess; @@ -1103,7 +1103,7 @@ void Ppmd8_Update1_0(CPpmd8 *p) NextContext(p); } -void Ppmd8_UpdateBin(CPpmd8 *p) +static void Ppmd8_UpdateBin(CPpmd8 *p) { p->FoundState->Freq = (Byte)(p->FoundState->Freq + (p->FoundState->Freq < 196)); p->PrevSuccess = 1; @@ -1111,7 +1111,7 @@ void Ppmd8_UpdateBin(CPpmd8 *p) NextContext(p); } -void Ppmd8_Update2(CPpmd8 *p) +static void Ppmd8_Update2(CPpmd8 *p) { p->MinContext->SummFreq += 4; if ((p->FoundState->Freq += 4) > MAX_FREQ) @@ -1127,7 +1127,7 @@ This code is based on: PPMd var.I (2002): Dmitry Shkarin : Public domain Carryless rangecoder (1999): Dmitry Subbotin : Public domain */ -Bool Ppmd8_RangeDec_Init(CPpmd8 *p) +static Bool Ppmd8_RangeDec_Init(CPpmd8 *p) { unsigned i; p->Low = 0; @@ -1161,7 +1161,7 @@ static void RangeDec_Decode(CPpmd8 *p, UInt32 start, UInt32 size) #define MASK(sym) ((signed char *)charMask)[sym] -int Ppmd8_DecodeSymbol(CPpmd8 *p) +static int Ppmd8_DecodeSymbol(CPpmd8 *p) { size_t charMask[256 / sizeof(size_t)]; if (p->MinContext->NumStats != 0) diff --git a/contrib/libarchive/libarchive/archive_ppmd8_private.h b/contrib/libarchive/libarchive/archive_ppmd8_private.h index 454b75f41f25..f0493de04623 100644 --- a/contrib/libarchive/libarchive/archive_ppmd8_private.h +++ b/contrib/libarchive/libarchive/archive_ppmd8_private.h @@ -83,12 +83,6 @@ typedef struct UInt16 BinSumm[25][64]; } CPpmd8; -void Ppmd8_Construct(CPpmd8 *p); -Bool Ppmd8_Alloc(CPpmd8 *p, UInt32 size); -void Ppmd8_Free(CPpmd8 *p); -void Ppmd8_Init(CPpmd8 *p, unsigned maxOrder, unsigned restoreMethod); -#define Ppmd8_WasAllocated(p) ((p)->Base != NULL) - /* ---------- Internal Functions ---------- */ @@ -104,30 +98,11 @@ extern const Byte PPMD8_kExpEscape[16]; #define Ppmd8_GetStats(p, ctx) ((CPpmd_State *)Ppmd8_GetPtr((p), ((ctx)->Stats))) #endif -void Ppmd8_Update1(CPpmd8 *p); -void Ppmd8_Update1_0(CPpmd8 *p); -void Ppmd8_Update2(CPpmd8 *p); -void Ppmd8_UpdateBin(CPpmd8 *p); - #define Ppmd8_GetBinSumm(p) \ &p->BinSumm[p->NS2Indx[Ppmd8Context_OneState(p->MinContext)->Freq - 1]][ \ p->NS2BSIndx[Ppmd8_GetContext(p, p->MinContext->Suffix)->NumStats] + \ p->PrevSuccess + p->MinContext->Flags + ((p->RunLength >> 26) & 0x20)] -CPpmd_See *Ppmd8_MakeEscFreq(CPpmd8 *p, unsigned numMasked, UInt32 *scale); - - -/* ---------- Decode ---------- */ - -Bool Ppmd8_RangeDec_Init(CPpmd8 *p); -#define Ppmd8_RangeDec_IsFinishedOK(p) ((p)->Code == 0) -int Ppmd8_DecodeSymbol(CPpmd8 *p); /* returns: -1 as EndMarker, -2 as DataError */ - -/* ---------- Encode ---------- */ - -#define Ppmd8_RangeEnc_Init(p) { (p)->Low = 0; (p)->Range = 0xFFFFFFFF; } -void Ppmd8_RangeEnc_FlushData(CPpmd8 *p); -void Ppmd8_EncodeSymbol(CPpmd8 *p, int symbol); /* symbol = -1 means EndMarker */ typedef struct { diff --git a/contrib/libarchive/libarchive/archive_read.c b/contrib/libarchive/libarchive/archive_read.c index c9b9d5981516..e5f89bdc8772 100644 --- a/contrib/libarchive/libarchive/archive_read.c +++ b/contrib/libarchive/libarchive/archive_read.c @@ -171,7 +171,7 @@ static int64_t client_skip_proxy(struct archive_read_filter *self, int64_t request) { if (request < 0) - __archive_errx(1, "Negative skip requested."); + __archive_errx(1, "Negative skip requested"); if (request == 0) return 0; @@ -379,7 +379,7 @@ archive_read_set_callback_data2(struct archive *_a, void *client_data, if (a->client.dataset == NULL) { archive_set_error(&a->archive, ENOMEM, - "No memory."); + "No memory"); return ARCHIVE_FATAL; } a->client.nodes = 1; @@ -388,7 +388,7 @@ archive_read_set_callback_data2(struct archive *_a, void *client_data, if (iindex > a->client.nodes - 1) { archive_set_error(&a->archive, EINVAL, - "Invalid index specified."); + "Invalid index specified"); return ARCHIVE_FATAL; } a->client.dataset[iindex].data = client_data; @@ -409,14 +409,14 @@ archive_read_add_callback_data(struct archive *_a, void *client_data, "archive_read_add_callback_data"); if (iindex > a->client.nodes) { archive_set_error(&a->archive, EINVAL, - "Invalid index specified."); + "Invalid index specified"); return ARCHIVE_FATAL; } p = realloc(a->client.dataset, sizeof(*a->client.dataset) * (++(a->client.nodes))); if (p == NULL) { archive_set_error(&a->archive, ENOMEM, - "No memory."); + "No memory"); return ARCHIVE_FATAL; } a->client.dataset = (struct archive_read_data_node *)p; @@ -625,7 +625,7 @@ _archive_read_next_header2(struct archive *_a, struct archive_entry *entry) r1 = archive_read_data_skip(&a->archive); if (r1 == ARCHIVE_EOF) archive_set_error(&a->archive, EIO, - "Premature end-of-file."); + "Premature end-of-file"); if (r1 == ARCHIVE_EOF || r1 == ARCHIVE_FATAL) { a->archive.state = ARCHIVE_STATE_FATAL; return (ARCHIVE_FATAL); diff --git a/contrib/libarchive/libarchive/archive_read_append_filter.c b/contrib/libarchive/libarchive/archive_read_append_filter.c index cd88df119906..d578b06fe714 100644 --- a/contrib/libarchive/libarchive/archive_read_append_filter.c +++ b/contrib/libarchive/libarchive/archive_read_append_filter.c @@ -104,6 +104,10 @@ archive_read_append_filter(struct archive *_a, int code) strcpy(str, "lrzip"); r1 = archive_read_support_filter_lrzip(_a); break; + case ARCHIVE_FILTER_GRZIP: *** 5263 LINES SKIPPED *** From nobody Wed Apr 22 13:44:18 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g10nZ3qXdz6ZZ19 for ; Wed, 22 Apr 2026 13:44:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g10nZ31bfz3WKb for ; Wed, 22 Apr 2026 13:44:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776865458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o8HAG5gxvIg/JbxV1aqawrmGY7Q5rPerjMP5vPSBZa4=; b=gsmXtkcgb/n3G1r6+BHT90RKQYRixg2qzCSRACvgq4PJgMKxIfobEGc5eeb+zC6SXsI49z 5rzXxTKKhKa/n/mjvuI7GETIaGT8jUc6cOH4HAI6xxuzW7WpnZg5vMtTqsC2JHg1J3M2It GbuyCmWLII3xahSFW4Shkbti3BHu5M92K0+ZtmLNQbm1G0eU1oG7O5FpgxgahDBs36ERw2 7LmliljySgAphpO7Xl2ePn5OshvkBOFpoJ7aUBhmSuaycdBg57dLFx0st29x3dI5pXD9mq w+nte/eo25HmTeoQaUk+8dgwKgxvngKJ5mwZN76H0qdgPSHENXtG5fh3ekl6mA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776865458; a=rsa-sha256; cv=none; b=eXoVrvA7zs7rHAOgmBtkEOHDkjSEU6tXlz9njKWpgfKVKV/Amvtv8/xKXpqNjxERSLIT7V BP5DxI5kfp9IjRPrZIjq2F2nv5qcaDcPdKn6feDNuYNSLrtgOBnRIalM4kiSrjgTjmuKqI JEsz7QMwVPjrgBl9eUZ9zoAECdvv6HGj0ppxe02RycHxpeCn+enYHGKLeILtgVWWRn2K6k zKXC482aKcDubjXNQ9ESF/Kw2GGGaZOIZeQC03MG5dklowmFMd9lj/lr3SiqwRmvlyl9u8 JEuRzx27EVjgqbAjz7hCPv7IHj4gJctL0xe6XDzeI0AeRfeGBj9jW1sMTISp2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776865458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o8HAG5gxvIg/JbxV1aqawrmGY7Q5rPerjMP5vPSBZa4=; b=N7US8tGxBwLpLp03TL49QVfaclFqM74C92AJH29PdiLewACVzGAKMftszZYlLOoeHgewvU w5OuOLGOPBg6F/nSaPQt0wzjG6Z0OJsag4G/xH+7LvQSoSMBQUAe9YVfLz1ZNwKQaRBh1U Ud7xc8uP7LUj0WGW8Eq7ZpkT41M5AiU150fGRz5ZIrPcue+xehTGad0OPjxRWjlGd9i7NP X5tROwvBhsAx7oRgOc3nKbJGAQ4BKPcWo8/JEZ5PkTdAd6UYlrjSDlB3qKas5u7kXsxNa0 203WpAliRmUxtOy7azRsl1MgzvciLnWRH9YwD29vX9iEfgPFcCqk7s/NkFA8YQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g10nZ2HqzzZJ2 for ; Wed, 22 Apr 2026 13:44:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2191f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 13:44:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav From: Martin Matuska Subject: git: b9e19901eedf - stable/15 - libarchive: Update configuration List-Id: Commits to the stable branches 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: mm X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b9e19901eedfdde9b7092b3338e6c1b8737aa41e Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 13:44:18 +0000 Message-Id: <69e8d0b2.2191f.bd3cbe0@gitrepo.freebsd.org> The branch stable/15 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=b9e19901eedfdde9b7092b3338e6c1b8737aa41e commit b9e19901eedfdde9b7092b3338e6c1b8737aa41e Author: Dag-Erling Smørgrav AuthorDate: 2026-04-18 08:25:31 +0000 Commit: Martin Matuska CommitDate: 2026-04-22 13:43:33 +0000 libarchive: Update configuration PR: 294577 MFC after: 1 week Reviewed by: mm Differential Revision: https://reviews.freebsd.org/D56468 (cherry picked from commit 05bbe5e3883492dd2afa52039da1fac45c5059a0) --- lib/libarchive/config_freebsd.h | 126 ++++++++++++++++++++++++++++------------ 1 file changed, 89 insertions(+), 37 deletions(-) diff --git a/lib/libarchive/config_freebsd.h b/lib/libarchive/config_freebsd.h index 1601adddd0de..41d91cea9bd3 100644 --- a/lib/libarchive/config_freebsd.h +++ b/lib/libarchive/config_freebsd.h @@ -26,30 +26,11 @@ */ #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 -#include - -/* FreeBSD 5.0 and later has ACL and extattr support. */ -#if __FreeBSD__ > 4 -#define ARCHIVE_ACL_FREEBSD 1 -#define ARCHIVE_XATTR_FREEBSD 1 -#define HAVE_ACL_GET_PERM_NP 1 -#define HAVE_ARC4RANDOM_BUF 1 -#define HAVE_STRUCT_XVFSCONF 1 -#define HAVE_SYS_ACL_H 1 -#define HAVE_SYS_EXTATTR_H 1 -#if __FreeBSD__ > 7 -/* FreeBSD 8.0 and later has NFSv4 ACL support */ -#define ARCHIVE_ACL_FREEBSD_NFS4 1 -#define HAVE_ACL_GET_LINK_NP 1 -#define HAVE_ACL_IS_TRIVIAL_NP 1 -#define HAVE_ACL_SET_LINK_NP 1 -#endif /* __FreeBSD__ > 7 */ -#endif /* __FreeBSD__ > 4 */ - #ifdef WITH_OPENSSL #define HAVE_LIBCRYPTO 1 #define HAVE_OPENSSL_EVP_H 1 #define HAVE_OPENSSL_MD5_H 1 +#define HAVE_OPENSSL_OPENSSLV_H 1 #define HAVE_OPENSSL_RIPEMD_H 1 #define HAVE_OPENSSL_SHA_H 1 #define HAVE_OPENSSL_SHA256_INIT 1 @@ -75,13 +56,59 @@ #define HAVE_SHA512_INIT 1 #endif +#define ARCHIVE_ACL_FREEBSD 1 +#define ARCHIVE_ACL_FREEBSD_NFS4 1 +#define ARCHIVE_XATTR_FREEBSD 1 +#define HAVE_ACL_ADD_FLAG_NP 1 +#define HAVE_ACL_ADD_PERM 1 +#define HAVE_ACL_CLEAR_FLAGS_NP 1 +#define HAVE_ACL_CLEAR_PERMS 1 +#define HAVE_ACL_CREATE_ENTRY 1 +#define HAVE_ACL_DELETE_DEF_FILE 1 +#define HAVE_ACL_ENTRY_T 1 +#define HAVE_ACL_FREE 1 +#define HAVE_ACL_GET_BRAND_NP 1 +#define HAVE_ACL_GET_ENTRY 1 +#define HAVE_ACL_GET_ENTRY_TYPE_NP 1 +#define HAVE_ACL_GET_FD 1 +#define HAVE_ACL_GET_FD_NP 1 +#define HAVE_ACL_GET_FILE 1 +#define HAVE_ACL_GET_FLAGSET_NP 1 +#define HAVE_ACL_GET_FLAG_NP 1 +#define HAVE_ACL_GET_LINK_NP 1 +#define HAVE_ACL_GET_PERMSET 1 +#define HAVE_ACL_GET_PERM_NP 1 +#define HAVE_ACL_GET_QUALIFIER 1 +#define HAVE_ACL_GET_TAG_TYPE 1 +#define HAVE_ACL_INIT 1 +#define HAVE_ACL_IS_TRIVIAL_NP 1 +#define HAVE_ACL_PERMSET_T 1 +#define HAVE_ACL_SET_ENTRY_TYPE_NP 1 +#define HAVE_ACL_SET_FD 1 +#define HAVE_ACL_SET_FD_NP 1 +#define HAVE_ACL_SET_FILE 1 +#define HAVE_ACL_SET_LINK_NP 1 +#define HAVE_ACL_SET_QUALIFIER 1 +#define HAVE_ACL_SET_TAG_TYPE 1 +#define HAVE_ACL_T 1 +#define HAVE_ACL_TAG_T 1 +#define HAVE_ARC4RANDOM_BUF 1 #define HAVE_BSDXML_H 1 #define HAVE_BZLIB_H 1 #define HAVE_CHFLAGS 1 #define HAVE_CHOWN 1 #define HAVE_CHROOT 1 +#define HAVE_CLOSEFROM 1 +#define HAVE_CLOSE_RANGE 1 #define HAVE_CTIME_R 1 #define HAVE_CTYPE_H 1 +#ifndef __linux__ +#define HAVE_D_MD_ORDER 1 +#endif +#define HAVE_DECL_ACL_SYNCHRONIZE 1 +#define HAVE_DECL_ACL_TYPE_EXTENDED 0 +#define HAVE_DECL_ACL_TYPE_NFS4 1 +#define HAVE_DECL_ACL_USER 1 #define HAVE_DECL_EXTATTR_NAMESPACE_USER 1 #define HAVE_DECL_INT32_MAX 1 #define HAVE_DECL_INT32_MIN 1 @@ -95,15 +122,21 @@ #define HAVE_DECL_UINT32_MAX 1 #define HAVE_DECL_UINT64_MAX 1 #define HAVE_DECL_UINTMAX_MAX 1 +#define HAVE_DECL_XATTR_NOFOLLOW 0 #define HAVE_DIRENT_H 1 #define HAVE_DIRFD 1 #define HAVE_DLFCN_H 1 -#ifndef __linux__ -#define HAVE_D_MD_ORDER 1 -#endif #define HAVE_EFTYPE 1 #define HAVE_EILSEQ 1 #define HAVE_ERRNO_H 1 +#define HAVE_EXTATTR_GET_FD 1 +#define HAVE_EXTATTR_GET_FILE 1 +#define HAVE_EXTATTR_GET_LINK 1 +#define HAVE_EXTATTR_LIST_FD 1 +#define HAVE_EXTATTR_LIST_FILE 1 +#define HAVE_EXTATTR_LIST_LINK 1 +#define HAVE_EXTATTR_SET_FD 1 +#define HAVE_EXTATTR_SET_LINK 1 #define HAVE_FCHDIR 1 #define HAVE_FCHFLAGS 1 #define HAVE_FCHMOD 1 @@ -120,26 +153,33 @@ #define HAVE_FSTATFS 1 #define HAVE_FSTATVFS 1 #define HAVE_FTRUNCATE 1 +#define HAVE_FUTIMENS 1 #define HAVE_FUTIMES 1 #define HAVE_FUTIMESAT 1 +#define HAVE_GETEGID 1 #define HAVE_GETEUID 1 #define HAVE_GETGRGID_R 1 #define HAVE_GETGRNAM_R 1 #define HAVE_GETLINE 1 -#define HAVE_GETOPT_OPTRESET 1 #define HAVE_GETPID 1 #define HAVE_GETPWNAM_R 1 #define HAVE_GETPWUID_R 1 +#define HAVE_GETRESGID 1 +#define HAVE_GETRESUID 1 #define HAVE_GETVFSBYNAME 1 #define HAVE_GMTIME_R 1 #define HAVE_GRP_H 1 #define HAVE_INTMAX_T 1 #define HAVE_INTTYPES_H 1 +#define HAVE_ISSETUGID 1 #define HAVE_LANGINFO_H 1 #define HAVE_LCHFLAGS 1 #define HAVE_LCHMOD 1 #define HAVE_LCHOWN 1 +#define HAVE_LIBBZ2 1 +#define HAVE_LIBLZMA 1 #define HAVE_LIBZ 1 +#define HAVE_LIBZSTD 1 #define HAVE_LIMITS_H 1 #define HAVE_LINK 1 #define HAVE_LINKAT 1 @@ -148,9 +188,10 @@ #define HAVE_LONG_LONG_INT 1 #define HAVE_LSTAT 1 #define HAVE_LUTIMES 1 +#define HAVE_LZMA_H 1 +#define HAVE_LZMA_STREAM_ENCODER_MT 1 #define HAVE_MBRTOWC 1 #define HAVE_MEMMOVE 1 -#define HAVE_MEMORY_H 1 #define HAVE_MEMSET 1 #define HAVE_MKDIR 1 #define HAVE_MKFIFO 1 @@ -162,7 +203,16 @@ #define HAVE_PIPE 1 #define HAVE_POLL 1 #define HAVE_POLL_H 1 +#if 0 +/* + * FreeBSD does have posix_spawn() and posix_spawnp(), but they are + * wrappers around fork() + execve() and fork() + execvp() respectively, + * so there is no reason to prefer them to the simpler alternatives, + * unlike e.g. Darwin where posix_spawn() is a system call. + */ +#define HAVE_POSIX_SPAWN 1 #define HAVE_POSIX_SPAWNP 1 +#endif #define HAVE_PTHREAD_H 1 #define HAVE_PWD_H 1 #define HAVE_READLINK 1 @@ -182,6 +232,7 @@ #define HAVE_STATVFS 1 #define HAVE_STDARG_H 1 #define HAVE_STDINT_H 1 +#define HAVE_STDIO_H 1 #define HAVE_STDLIB_H 1 #define HAVE_STRCHR 1 #define HAVE_STRDUP 1 @@ -192,6 +243,8 @@ #define HAVE_STRING_H 1 #define HAVE_STRNLEN 1 #define HAVE_STRRCHR 1 +#define HAVE_STRUCT_STATFS 1 +#define HAVE_STRUCT_STATFS_F_IOSIZE 1 #define HAVE_STRUCT_STATFS_F_NAMEMAX 1 #define HAVE_STRUCT_STAT_ST_BIRTHTIME 1 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1 @@ -200,13 +253,17 @@ #define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1 #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 #define HAVE_STRUCT_TM_TM_GMTOFF 1 +#define HAVE_STRUCT_VFSCONF 1 +#define HAVE_STRUCT_XVFSCONF 1 #define HAVE_SYMLINK 1 +#define HAVE_SYSCONF 1 +#define HAVE_SYS_ACL_H 1 #define HAVE_SYS_CDEFS_H 1 +#define HAVE_SYS_EXTATTR_H 1 #define HAVE_SYS_IOCTL_H 1 #define HAVE_SYS_MOUNT_H 1 #define HAVE_SYS_PARAM_H 1 #define HAVE_SYS_POLL_H 1 -#define HAVE_SYS_QUEUE_H 1 #define HAVE_SYS_SELECT_H 1 #define HAVE_SYS_STATVFS_H 1 #define HAVE_SYS_STAT_H 1 @@ -214,6 +271,8 @@ #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_UTSNAME_H 1 #define HAVE_SYS_WAIT_H 1 +#define HAVE_TCGETATTR 1 +#define HAVE_TCSETATTR 1 #define HAVE_TIMEGM 1 #define HAVE_TIME_H 1 #define HAVE_TZSET 1 @@ -224,6 +283,7 @@ #define HAVE_UNSIGNED_LONG_LONG 1 #define HAVE_UNSIGNED_LONG_LONG_INT 1 #define HAVE_UTIME 1 +#define HAVE_UTIMENSAT 1 #define HAVE_UTIMES 1 #define HAVE_UTIME_H 1 #define HAVE_VFORK 1 @@ -240,19 +300,11 @@ #define HAVE_WMEMCPY 1 #define HAVE_WMEMMOVE 1 #define HAVE_ZLIB_H 1 +#define HAVE_ZSTD_H 1 +#define HAVE_ZSTD_compressStream 1 +#define HAVE_ZSTD_minCLevel 1 #define TIME_WITH_SYS_TIME 1 -#if __FreeBSD_version >= 1100056 -#define HAVE_FUTIMENS 1 -#define HAVE_UTIMENSAT 1 -#endif - -/* FreeBSD 4 and earlier lack intmax_t/uintmax_t */ -#if __FreeBSD__ < 5 -#define intmax_t int64_t -#define uintmax_t uint64_t -#endif - /* FreeBSD defines for archive_hash.h */ #ifdef WITH_OPENSSL #define ARCHIVE_CRYPTO_MD5_OPENSSL 1 From nobody Wed Apr 22 13:44:19 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g10nb75fjz6ZZQR for ; Wed, 22 Apr 2026 13:44:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g10nb3V9rz3WWq for ; Wed, 22 Apr 2026 13:44:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776865459; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N86kCS23U3khi2NKKdSMGUocrBxmpJz473bDc5GnHGs=; b=JySZYEDEqjSaJzvxM4GTNuKJ9fGVMRhiFPE7sbx/Zj2ZvdN9r3AYVkUyyj4g6b+GtP+lc0 j4mAYC6BtjRUw4naZzFfqG3s8rUiIFm4c7bBZcSj0kWazFphQ6BsNsx7rHE2MEkZd3sT06 7tNeIHNLdaOodQDHnSPaWrI4Wx3xVLpOPtLf66T0aFxXefXdsC7Ybv5zLKJleWUaziBHit 0QIq1iepruIVdCSv5Z7odlx89Upbr1PLnyRlwOzniWiFqHNAq3HQURBjfDrWdIShhWEklG wWvfSrnfRjnQ10uZGnDkJu17JDeUm5LIOFk4vyVrnV1qmROLO+WuS0zYeJ6HmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776865459; a=rsa-sha256; cv=none; b=lQmTGeoLGdJrmZdcDwUWOFRKJxnng74QzlzhDIKf1NZLtfDXrvWA5NP97eUDzJlWZheTzk ictAZtGVpdBO+C1WTojGbVwy77PZblWnffiFd8CPVYNSP2ZHXcjul9E6bbjQfj78+Dh5PY CghfELSNFe9JVsGdkAJBbDvn61sXrYMtCOz9BPzhVwHt40veSdwNkSfzeDvA7+VDL8aXvP uP1KVHTfzJHLGmgqkchZVwdBNqj6YCQtQ/B50u2YVHPFg0IGSwWiK5F2sTE7gEkDkioF10 YnMsdku9Y+KPn7fYOA9G+0ia6ytOw1AiSG49UDCv3A2sBLrPVUF93wP3daphOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776865459; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N86kCS23U3khi2NKKdSMGUocrBxmpJz473bDc5GnHGs=; b=EzmFk/NlZD9u9QfK7UgJuc5KBHFhoHCQE+Dhh72SwkaHo41ke0UgEn6CfIlbLlN8EMKS2c wz38orx86t4mFX1JdVKc5rsUSH98qucSyZxdc37+vjL2Pin/1wNLOeXKjrArWJFFWSycbH H+nV8BmqOgkrqzvPiAruI4MFJ+l2qJeuqy5NUJbse7Wyyz71XcHhaRuhUjE7zL8OW0ZlxR y+8lImCk2DVm7r+/oNUaBP1ThvMrG/rgBpKzH0RZVql9H5DWo7l3isy0k0vCDt79PaNZax b8+APAvzA/utJtj4dUKtscHjkDcTB0x0HKVdrK46v3IHuC8RGikFLt5cEZAl8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g10nb2yKTzZJ5 for ; Wed, 22 Apr 2026 13:44:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 220da by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 13:44:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav From: Martin Matuska Subject: git: f2ce8d6d5335 - stable/15 - libarchive: Staticize some variables List-Id: Commits to the stable branches 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: mm X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f2ce8d6d53355b50f3f1c1887a58839fb598a497 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 13:44:19 +0000 Message-Id: <69e8d0b3.220da.74bc27a6@gitrepo.freebsd.org> The branch stable/15 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=f2ce8d6d53355b50f3f1c1887a58839fb598a497 commit f2ce8d6d53355b50f3f1c1887a58839fb598a497 Author: Dag-Erling Smørgrav AuthorDate: 2026-04-18 08:25:35 +0000 Commit: Martin Matuska CommitDate: 2026-04-22 13:43:40 +0000 libarchive: Staticize some variables This code was not being built due to errors in our libarchive configuration. Now that those have been addressed, staticize some variables that trip a “no previous extern declaration” error. This is a subset of upstream PR 2962. MFC after: 1 week Reviewed by: mm Differential Revision: https://reviews.freebsd.org/D56471 (cherry picked from commit 7e9d974bc023755161742f66c8c77546bab88586) --- contrib/libarchive/test_utils/test_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/libarchive/test_utils/test_main.c b/contrib/libarchive/test_utils/test_main.c index 1f641bbe8db7..f7364c0ba4e8 100644 --- a/contrib/libarchive/test_utils/test_main.c +++ b/contrib/libarchive/test_utils/test_main.c @@ -187,10 +187,10 @@ const char *testprog; #ifdef RUN_TEST_UNPRIV /* Unprivileged user to run as */ -const char *tuser = "nobody"; +static const char *tuser = "nobody"; /* Original and test credentials */ -uid_t ouid, tuid; -uid_t ogid, tgid; +static uid_t ouid, tuid; +static uid_t ogid, tgid; #endif #if defined(_WIN32) && !defined(__CYGWIN__) From nobody Wed Apr 22 13:47:57 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g10st5wzQz6ZZcH for ; Wed, 22 Apr 2026 13:48: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g10st30CNz3Zky for ; Wed, 22 Apr 2026 13:48:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776865682; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FGuNfRJ/29HBDek9d33Dsm/JSKymbI+AdUgXGhSoBRk=; b=GvtbcIO2wUQEb9L2OhWoZC/vLxZImk38cdqZp9/Nw2hT8YufsRvrpwULoIK38pB/gCC23p gtrXHcDTTE2Tgy4s0xEdqOP+8m6X0sE6XohBhRItgWBM/ozpqN3fp6rAzm8+ARHkSGQ6CT OoVEMDL5DutIVv+5aQW13387n8GBhmMuuKnpxrLApretdorQCKBmYzIf9iCjNYyFn7Helg 3/anD7FLk3MxuDuNoRFA5l5vWbK3GwQpC7VM0+XrGUiO/0xwDpmCP9MCVE9BN3sR9tO4pt lpl7BJ/y8dPQX39CjL/IsKuMnXN8n2a9chKi8ueXRvD2Tk6/V0Spdc8h/LdkEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776865682; a=rsa-sha256; cv=none; b=LHlTrk9vuMd73yWP7k4ozE46VWVebRGagWivf+xqP79S/okk+Av5zYAJfRtCcHGXU5uLWT DQcmE2RqJI9XrmFPyx4ELljL5O+wBV/R122K09jcW5CMgtvCxY+/lyESTVWddfpVJJr/56 IE7zDsIB4FMSZtVTkhqpzExZuDc6FRfeep1P8K8UicqADwsRgHCN8Ms/VzGv02YHkwSs6C xD/XPRccqurKhXyPpyVsKgNxEUVAXn0k0P5QLhghaYu/5pT+P4G1VKLRwAgMXkEnsQ2d14 OESbGs/gcL58b2lGh95kj867xRtifVRwSUsfqF0tXRK+ULNBiNQsY3u9jFeI4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776865682; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FGuNfRJ/29HBDek9d33Dsm/JSKymbI+AdUgXGhSoBRk=; b=kl1Wam39WhLsyxxgxyWq+8o3UAAvZU8C6VasknNJEFOAvSm+yoCo09Ef3o2MzMUlKQKJNW q65sTNEzYVnpCvgB+x19gtrZb7Xs2rH8I8wFwAhfDgO+Pyl188AgO7dnE42ZoMyc5dc++0 NFaDDi7tiIT+zIM618b5MgVOB785MlwfURCWZ3ONsvF0Ei439r0R+tX4w3+2HrKMHr+PWN n8fvTF5dMkXMo2Tb4HeYRRK/hMTMe/N7L0eEvUm88nfbHNUWfkzXGSYdue31OdSQP8bxwQ K++Yce9vxIi6FTcE0JwLMtx1vwqd2fLpfWSHHc7KxvBhZ/0zldJXiVZ0cMpG9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g10st2L7mzYsV for ; Wed, 22 Apr 2026 13:48:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2172e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 13:47:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Isaac Freund From: Ed Maste Subject: git: 6395bf5988ee - stable/15 - pkgbase: remove incorrect clang shlib requires List-Id: Commits to the stable branches 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: 6395bf5988ee92bc91040a07a4cacb6026d800a3 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 13:47:57 +0000 Message-Id: <69e8d18d.2172e.749ca75e@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6395bf5988ee92bc91040a07a4cacb6026d800a3 commit 6395bf5988ee92bc91040a07a4cacb6026d800a3 Author: Isaac Freund AuthorDate: 2026-01-20 14:57:17 +0000 Commit: Ed Maste CommitDate: 2026-04-22 13:47:39 +0000 pkgbase: remove incorrect clang shlib requires The FreeBSD-clang package contains a 32-bit shared object at /usr/lib/clang/19/lib/freebsd/libclang_rt.asan-i386.so This is expected, since clang uses this object when compiling for i386 targets with asan enabled. What is not expected is that the FreeBSD-clang package currently depends on 32-bit libc packages due to pkg's shared library analysis, making it impossible to install pkgbase on x86_64 without any lib32 packages. This commit leverages a new pkg feature implemented in [1], but could be landed before a pkg version including that feature is released without any ill effects. Unknown keys in package manifests are ignored. [1]: https://github.com/freebsd/pkg/pull/2594 Reviewed by: ivy Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54792 (cherry picked from commit 2018ae4e3b6a2d7c147933cb36642f6a54830907) --- release/packages/ucl/clang.ucl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/release/packages/ucl/clang.ucl b/release/packages/ucl/clang.ucl index 3c15d9b7ef03..deee636dc0a7 100644 --- a/release/packages/ucl/clang.ucl +++ b/release/packages/ucl/clang.ucl @@ -7,3 +7,8 @@ deps { version = "${VERSION}" } } + +shlibs_required_ignore: [ + "libc.so.7:32", + "libgcc_s.so.1:32", +] From nobody Wed Apr 22 14:24:16 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g11gh4q7bz6Zdjd for ; Wed, 22 Apr 2026 14:24:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g11gh2gr0z3gP3 for ; Wed, 22 Apr 2026 14:24:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776867856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bOJUryEElY/kjmk4K7uqZ4wRVP6N+WRXPowb9wfygWU=; b=NVLOFbfAK2pOezc4CWDp0njogH3t0HC4FjW1adjbAQgktLq+xzb/NN/aOeiBmqFjPhP/xt h62mY0ddbW/bn311DgwYCdjU6N1NRO60JdR0rVBY/8Kk9KArZLy9EGbKOICZspNQZrTv1l 9vXPIxhVePi2veB4fA3WmRA+cUBvJZtk7b+QH7dt6JgnnZMxmb43AnaKzXDAUdXfIEDQ5o kDm4nc7y3dGiaoXq/aKdYWt1p1cQ9xLFmYbn+kRjlmLKDd9rs+N4uAwWl40XJrTs+MpknC USJrSwvx5600WUQ2SXnMnD7Axdpdax85O0Fp1akapP2VXi2ZOnkzhLcSxHzdnA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776867856; a=rsa-sha256; cv=none; b=Pr+1ruK1MPPbwH90S8Hyh6JNmXkNaOMS1JBAIprsaYpBD5EzOZPY3xvyJceQSVJyS1Dlxw OMPmOnHMremEBNAun9CwXiWpobe6TaH3ooMnA8meinItiGRr5OvtQ81PFfEkL4I13YXlNg jEFJgO6ksvdTzrJL4frTVLJ+BERgCH41jWTeV9qQMFdBe05kDUBvgzYIEcv62dRRrfjmuE Uoz+qXUOz5Bjc7OedtLNd2tqFkpcCveJQh+CR8Na3oUbNA/+lvuqmmCZdNVrvguLwxkV40 KTufFhWXDiG/QJJoMhwskK1TzxOC/nQVF8/ZgpFAciYLE+iC6DC8V6fTBcsAEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776867856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bOJUryEElY/kjmk4K7uqZ4wRVP6N+WRXPowb9wfygWU=; b=khMPkJ1heXVXUzh9BKqDxOps6zv2gWl2R1GEfvRxKkdLRaVeNLXsmzBUSb2IIlx8bToWmz SfJqoaoDxgHfVvt5gIdJVhdXSJjZZOFKm6ty1J5grFz3HFDA8mYXPq84A61mF5EP6S9MvP bYfWumZjnO1k9eMF9srfYKsP9y+9X8X5S/0Ge7DErUbh72TPDiTwBaCpCP8Nlc4Kgn/e0l TeZE64OSj8bczk/xsKOIWpPnNQE38YHqPaIel9Y9rZuc8jv364mp3pTklAgwVPzxouekdr kWhH+gO+rX9WnQxyLZoqTpJ7o+hyKXuPmaMjGIooCYrbFIbSL02sjIDA38Pt7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g11gh1m8szbQt for ; Wed, 22 Apr 2026 14:24:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25b94 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 14:24:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 9b8f4cfea456 - stable/15 - INIT_ALL: Fix typo in option description List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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: 9b8f4cfea45631b3c236e5b8e69e21ec085bd0be Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 14:24:16 +0000 Message-Id: <69e8da10.25b94.6975e51e@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=9b8f4cfea45631b3c236e5b8e69e21ec085bd0be commit 9b8f4cfea45631b3c236e5b8e69e21ec085bd0be Author: Ed Maste AuthorDate: 2026-03-04 18:31:29 +0000 Commit: Ed Maste CommitDate: 2026-04-22 14:23:13 +0000 INIT_ALL: Fix typo in option description From GitHub pull request #2035; the change needs to be applied to the source file for the option description, not the generated src.conf.5. (cherry picked from commit c9f3de0ba95b8da31d35fa92e0a54cf6f3d3f1dd) --- tools/build/options/INIT_ALL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build/options/INIT_ALL b/tools/build/options/INIT_ALL index 3ca70337b8f1..af7be9e407c4 100644 --- a/tools/build/options/INIT_ALL +++ b/tools/build/options/INIT_ALL @@ -17,5 +17,5 @@ Build the base system or kernel with stack variables initialized to zero on function entry. This value is converted to .Li none -for amd64 kernel builds due to incompatability with ifunc memset. +for amd64 kernel builds due to incompatibility with ifunc memset. .El From nobody Wed Apr 22 14:24:17 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g11gj4tFkz6ZddR for ; Wed, 22 Apr 2026 14:24:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g11gj3WzTz3gYk for ; Wed, 22 Apr 2026 14:24:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776867857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2gHXlSzUe8alIxXTmd99MmTtvPnIg7P68VF9jQHS9X0=; b=BFOOQ0SGxpOOVx8kRw9gwqoiiNpxVmFkLEj9RHEe5WoRABxAtmxT3OvQVsGmjkbwDmzFTh VTyx2uPa2Ak0nw1gA+GFFrkyiN0oWRXB47ecvh7fBQRJqfXeAKkU2C/qXI6ngbdzLMkWQT M+0EMEePof3pMun2MhsjVJ8LqXhD78xs51jWFd87UbYIhIcdQtAsu4YXKIphhsNqUEWBtn sEEoJpEe2qLUq2dx/EvU5lx8iaVJY4oDY2Ru9prDAQhc0EnH9xg++A622t9u6MiXFHHXOB jHe9RI2zwS3tFdqT/peJ5YKEkVGJHf7hiSChcW9PlrlnIRGM59lJzGzay5eGvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776867857; a=rsa-sha256; cv=none; b=lowdCNlIILt/pL7d7qxpDv34El28UHliyst+Gz76mZ7fNAxelhf3O/G+3GzeH591am/TH+ WbsIe4oLMG2SN4b1hSwUGXKpLIgh4B8IRY/AW4KzjcappbWSQM58VGhU7/JZFOfC7vbS3x 3E5iNT6bl2hJwVGqMpYfN1HbiuiDOA+DbIFnIwW2iNAp2WpBmUP1gq/aqYsNeCBjuShxDk L8cT149jFGzDpu4wWH7gkswG1Px42ycZU0Avjq2RBVciB+Re6y7WPEbNq1ChqvuMVDUvfJ NCcIaBHcmF7mhPk+ZuGJS9CYHRm6FLtvcLhsPD6kBKJyHg12Tn1fn7gbRCXTIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776867857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2gHXlSzUe8alIxXTmd99MmTtvPnIg7P68VF9jQHS9X0=; b=e6BH+x73O/eYEoUnh584493S8ikuijJGGOV2KObuBeZ42Tj0qP3RAFB748gCtjk27Uga9F 1y1023KRxa/GD0GJmRUEz+qoExaoz63dVJ6bGqeP9r3P9gYBFwPn/HlT+ql5ZI2rdsm2xY lCYkd2HR98SfoTUFx3//E/V4lca5OylKiipk/EGm2x9SojFII8YaCshAAf+2AzXZQUBoKB HExWZTApB+svrPFlowIb2/qPTEWmlG3/qp0zuRqbhy0F0A+BQ/Uoq1hKX0IU0bgU5FTi+y 4+no/R12wZfiG03MFfKmootCj8ZuYlWv624bPOHMlHKR7j95D5I0rAUFrRlnXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g11gj35sszZpd for ; Wed, 22 Apr 2026 14:24:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23c68 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 14:24:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 967186fe0a54 - stable/15 - libcbor: Update to 0.13.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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 967186fe0a54faf0681a49f78701c20afb3aa0ff Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 14:24:17 +0000 Message-Id: <69e8da11.23c68.5477a938@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=967186fe0a54faf0681a49f78701c20afb3aa0ff commit 967186fe0a54faf0681a49f78701c20afb3aa0ff Author: Ed Maste AuthorDate: 2026-03-23 15:41:51 +0000 Commit: Ed Maste CommitDate: 2026-04-22 14:24:02 +0000 libcbor: Update to 0.13.0 Sponsored by: The FreeBSD Foundation (cherry picked from commit b5b9517bfe394e55088f5a05882eabae7e9b7b29) --- contrib/libcbor/.circleci/config.yml | 93 +++-- contrib/libcbor/.cirrus.yml | 9 +- contrib/libcbor/.clang-format | 2 +- contrib/libcbor/.github/workflows/fuzz-pr.yml | 2 +- contrib/libcbor/.github/workflows/fuzz.yml | 2 +- contrib/libcbor/.gitignore | 6 +- contrib/libcbor/.vscode/settings.json | 6 + contrib/libcbor/BUILD | 58 +++ contrib/libcbor/Bazel.md | 100 ----- contrib/libcbor/CHANGELOG.md | 81 +++- contrib/libcbor/CMakeLists.txt | 341 +++++++++++------ contrib/libcbor/CONTRIBUTING.md | 17 + contrib/libcbor/Doxyfile | 2 +- contrib/libcbor/MODULE.bazel | 1 + contrib/libcbor/README.md | 53 ++- contrib/libcbor/doc/source/api.rst | 14 +- .../doc/source/api/item_reference_counting.rst | 1 + .../libcbor/doc/source/api/streaming_encoding.rst | 2 +- .../api/{type_0_1.rst => type_0_1_integers.rst} | 0 .../api/{type_2.rst => type_2_byte_strings.rst} | 2 +- .../source/api/{type_3.rst => type_3_strings.rst} | 2 +- .../source/api/{type_4.rst => type_4_arrays.rst} | 2 +- .../doc/source/api/{type_5.rst => type_5_maps.rst} | 0 .../doc/source/api/{type_6.rst => type_6_tags.rst} | 7 +- .../api/{type_7.rst => type_7_floats_ctrls.rst} | 9 +- contrib/libcbor/doc/source/conf.py | 4 +- contrib/libcbor/doc/source/development.rst | 18 +- contrib/libcbor/doc/source/getting_started.rst | 76 +++- contrib/libcbor/doc/source/index.rst | 4 +- contrib/libcbor/doc/source/internal.rst | 6 +- contrib/libcbor/doc/source/requirements.in | 5 + contrib/libcbor/doc/source/requirements.txt | 114 ++++-- .../libcbor/doc/source/standard_conformance.rst | 2 +- contrib/libcbor/doc/source/tutorial.rst | 66 ++++ contrib/libcbor/doc/source/using.rst | 174 --------- contrib/libcbor/examples/CMakeLists.txt | 19 +- contrib/libcbor/examples/bazel/MODULE.bazel | 13 + contrib/libcbor/examples/bazel/WORKSPACE | 19 - contrib/libcbor/examples/bazel/src/BUILD | 10 +- contrib/libcbor/examples/bazel/src/hello_test.cc | 10 +- .../examples/bazel/third_party/libcbor.BUILD | 21 -- .../bazel/third_party/libcbor/cbor/configuration.h | 2 +- contrib/libcbor/examples/cbor2cjson.c | 3 +- contrib/libcbor/examples/cbor_sequence.c | 109 ++++++ contrib/libcbor/examples/cjson2cbor.c | 32 +- contrib/libcbor/examples/crash_course.c | 183 +++++++++ contrib/libcbor/examples/sort.c | 12 +- contrib/libcbor/examples/streaming_array.c | 3 +- contrib/libcbor/examples/streaming_parser.c | 8 +- contrib/libcbor/misc/asan_suppressions.osx.supp | 3 + contrib/libcbor/misc/hooks/pre-commit | 9 +- contrib/libcbor/misc/update_version.py | 14 +- contrib/libcbor/oss-fuzz/build.sh | 10 +- contrib/libcbor/oss-fuzz/cbor_load_fuzzer.cc | 2 +- contrib/libcbor/release.sh | 20 +- contrib/libcbor/src/CMakeLists.txt | 108 ++++-- contrib/libcbor/src/cbor.c | 196 ++++++++-- contrib/libcbor/src/cbor.h | 11 + contrib/libcbor/src/cbor/arrays.c | 53 +-- contrib/libcbor/src/cbor/arrays.h | 3 +- contrib/libcbor/src/cbor/bytestrings.c | 44 +-- contrib/libcbor/src/cbor/bytestrings.h | 26 +- contrib/libcbor/src/cbor/callbacks.c | 86 ++--- contrib/libcbor/src/cbor/callbacks.h | 68 ++-- contrib/libcbor/src/cbor/common.c | 82 ++-- contrib/libcbor/src/cbor/common.h | 138 ++++--- contrib/libcbor/src/cbor/encoding.c | 80 ++-- contrib/libcbor/src/cbor/encoding.h | 71 ++-- contrib/libcbor/src/cbor/floats_ctrls.c | 94 ++--- contrib/libcbor/src/cbor/floats_ctrls.h | 53 +-- .../libcbor/src/cbor/internal/builder_callbacks.c | 160 ++++---- .../libcbor/src/cbor/internal/builder_callbacks.h | 54 +-- contrib/libcbor/src/cbor/internal/encoders.c | 47 +-- contrib/libcbor/src/cbor/internal/encoders.h | 10 +- contrib/libcbor/src/cbor/internal/loaders.c | 16 +- contrib/libcbor/src/cbor/internal/loaders.h | 8 +- contrib/libcbor/src/cbor/internal/stack.c | 10 +- contrib/libcbor/src/cbor/internal/stack.h | 10 +- contrib/libcbor/src/cbor/ints.c | 98 ++--- contrib/libcbor/src/cbor/ints.h | 48 +-- contrib/libcbor/src/cbor/maps.c | 36 +- contrib/libcbor/src/cbor/maps.h | 26 +- contrib/libcbor/src/cbor/serialization.c | 75 ++-- contrib/libcbor/src/cbor/serialization.h | 31 +- contrib/libcbor/src/cbor/streaming.c | 11 +- contrib/libcbor/src/cbor/strings.c | 56 +-- contrib/libcbor/src/cbor/strings.h | 37 +- contrib/libcbor/src/cbor/tags.c | 26 +- contrib/libcbor/src/cbor/tags.h | 48 +-- contrib/libcbor/src/libcborConfig.cmake.in | 3 + contrib/libcbor/test/CMakeLists.txt | 36 +- contrib/libcbor/test/array_encoders_test.c | 14 +- contrib/libcbor/test/array_test.c | 50 +-- contrib/libcbor/test/bad_inputs_test.c | 20 +- contrib/libcbor/test/bytestring_encoders_test.c | 6 +- contrib/libcbor/test/bytestring_test.c | 46 +-- contrib/libcbor/test/callbacks_test.c | 75 ++-- contrib/libcbor/test/cbor_serialize_test.c | 272 +++++++------- contrib/libcbor/test/cbor_stream_decode_test.c | 110 +++--- contrib/libcbor/test/copy_test.c | 411 +++++++++++++++++++-- contrib/libcbor/test/float_ctrl_encoders_test.c | 34 +- contrib/libcbor/test/float_ctrl_test.c | 41 +- contrib/libcbor/test/fuzz_test.c | 12 +- contrib/libcbor/test/map_encoders_test.c | 6 +- contrib/libcbor/test/map_test.c | 76 ++-- contrib/libcbor/test/memory_utils_test.c | 10 +- contrib/libcbor/test/negint_encoders_test.c | 12 +- contrib/libcbor/test/negint_test.c | 14 +- contrib/libcbor/test/pretty_printer_test.c | 64 ++-- contrib/libcbor/test/stack_over_limit_test.c | 8 +- contrib/libcbor/test/stream_expectations.c | 50 +-- contrib/libcbor/test/stream_expectations.h | 50 +-- contrib/libcbor/test/string_encoders_test.c | 6 +- contrib/libcbor/test/string_test.c | 62 ++-- contrib/libcbor/test/tag_encoders_test.c | 4 +- contrib/libcbor/test/tag_test.c | 36 +- contrib/libcbor/test/test_allocator.c | 16 +- contrib/libcbor/test/test_allocator.h | 8 +- contrib/libcbor/test/uint_encoders_test.c | 12 +- contrib/libcbor/test/uint_test.c | 22 +- contrib/libcbor/test/unicode_test.c | 4 +- 121 files changed, 3254 insertions(+), 2039 deletions(-) diff --git a/contrib/libcbor/.circleci/config.yml b/contrib/libcbor/.circleci/config.yml index 4391ad8d1e9c..ea030d6b7b8e 100644 --- a/contrib/libcbor/.circleci/config.yml +++ b/contrib/libcbor/.circleci/config.yml @@ -3,30 +3,50 @@ version: 2.1 commands: linux-setup: steps: - - run: sudo apt-get update - # NEEDRESTART_MODE prevents automatic restarts which seem to hang. - - run: sudo NEEDRESTART_MODE=l apt-get install -y cmake ${TOOLCHAIN_PACKAGES} - - run: sudo NEEDRESTART_MODE=l apt-get install -y libcmocka-dev libcjson-dev + - run: sudo apt-get update + # NEEDRESTART_MODE prevents automatic restarts which seem to hang. + - run: sudo NEEDRESTART_MODE=l apt-get install -y cmake ${TOOLCHAIN_PACKAGES} + - run: sudo NEEDRESTART_MODE=l apt-get install -y libcmocka-dev libcjson-dev + build-with-cmocka-from-source: + # For whatever reason, cmocka find stopped working on dockercross at some point. + steps: + - run: git clone https://git.cryptomilk.org/projects/cmocka.git ~/cmocka + - run: > + cd $(mktemp -d /tmp/build.XXXX) && + cmake ~/cmocka && + make && + sudo make install + - run: > + cmake -DWITH_TESTS=ON \ + -DWITH_EXAMPLES=ON \ + -DCMAKE_BUILD_TYPE=Debug \ + -DSANITIZE=OFF \ + -DCOVERAGE="${CMAKE_COVERAGE:='OFF'}" \ + -DCMOCKA_INCLUDE_DIR=/usr/local/include \ + -DCMOCKA_LIBRARIES=/usr/local/lib/libcmocka.so + - run: make -j 16 VERBOSE=1 build: steps: - - run: > - cmake -DWITH_TESTS=ON \ - -DWITH_EXAMPLES=ON \ - -DCMAKE_BUILD_TYPE=Debug \ - -DSANITIZE=OFF \ - -DCOVERAGE="${CMAKE_COVERAGE:='OFF'}" \ - . - - run: make -j 16 VERBOSE=1 + - run: > + cmake -DWITH_TESTS=ON \ + -DWITH_EXAMPLES=ON \ + -DCMAKE_BUILD_TYPE=Debug \ + -DSANITIZE=OFF \ + -DCOVERAGE="${CMAKE_COVERAGE:='OFF'}" \ + . + - run: make -j 16 VERBOSE=1 build-release: steps: - - run: > - cmake -DWITH_TESTS=ON \ - -DCMAKE_BUILD_TYPE=Release \ - . - - run: make -j 16 VERBOSE=1 + - run: > + cmake -DWITH_TESTS=ON \ + -DCMAKE_BUILD_TYPE=Release \ + . + - run: make -j 16 VERBOSE=1 test: steps: - - run: ctest -VV + - run: ctest -VV --output-junit ctest_out.xml + - store_test_results: + path: ctest_out.xml orbs: codecov: codecov/codecov@3.2.2 @@ -34,7 +54,7 @@ orbs: jobs: static-test: machine: &default-machine - image: ubuntu-2204:2023.07.2 + image: ubuntu-2204:current environment: TOOLCHAIN_PACKAGES: g++ steps: @@ -159,7 +179,7 @@ jobs: build-bazel: machine: - image: ubuntu-2204:2023.07.2 + <<: *default-machine environment: TOOLCHAIN_PACKAGES: g++ steps: @@ -178,7 +198,7 @@ jobs: build-and-test-osx: macos: - xcode: 12.5.1 + xcode: 16.0.0 steps: - checkout - run: bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" @@ -203,7 +223,33 @@ jobs: - run: /c/Program\ Files/Cmake/bin/cmake --build libcbor_build - run: > export PATH="$(pwd)/cmocka_build/src/Debug/:$PATH" && - /c/Program\ Files/Cmake/bin/ctest.exe --test-dir libcbor_build --output-on-failure + /c/Program\ Files/Cmake/bin/ctest.exe --test-dir libcbor_build -C Debug --output-on-failure + + build-and-test-mips: &dockcross-job + docker: + - image: dockcross/linux-mips-lts + steps: + - checkout + - attach_workspace: + at: /home/circleci/project + - build-with-cmocka-from-source + - test + + build-and-test-mipsel: + <<: *dockcross-job + docker: + - image: dockcross/linux-mipsel-lts + + + build-and-test-riscv64: &dockcross-job + docker: + - image: dockcross/linux-riscv64 + steps: + - checkout + - attach_workspace: + at: /home/circleci/project + - build-with-cmocka-from-source + - test workflows: build-and-test: @@ -215,6 +261,9 @@ workflows: - build-and-test-release-clang - build-and-test-arm - build-and-test-win + - build-and-test-mips + - build-and-test-mipsel + - build-and-test-riscv64 - build-bazel - llvm-coverage # OSX builds are expensive, run only on master diff --git a/contrib/libcbor/.cirrus.yml b/contrib/libcbor/.cirrus.yml index 948ae23b4a98..beaea2a0b6ee 100644 --- a/contrib/libcbor/.cirrus.yml +++ b/contrib/libcbor/.cirrus.yml @@ -5,7 +5,6 @@ freebsd_task: - mkdir build - cd build - cmake -GNinja -DWITH_TESTS=ON - -DCBOR_CUSTOM_ALLOC=ON -DCMAKE_BUILD_TYPE=Debug -DSANITIZE=OFF .. @@ -15,12 +14,12 @@ freebsd_task: - ctest -VV matrix: # From gcloud compute images list --project freebsd-org-cloud-dev --no-standard-images - - name: freebsd-13-2 + - name: freebsd-13-4 freebsd_instance: - image_family: freebsd-13-2 - - name: freebsd-14-0 + image_family: freebsd-13-4 + - name: freebsd-14-2 freebsd_instance: - image_family: freebsd-14-0 + image_family: freebsd-14-2 - name: freebsd-15-0-snap freebsd_instance: image_family: freebsd-15-0-snap diff --git a/contrib/libcbor/.clang-format b/contrib/libcbor/.clang-format index de0dc5e77907..09a8bc907ac8 100644 --- a/contrib/libcbor/.clang-format +++ b/contrib/libcbor/.clang-format @@ -52,7 +52,7 @@ ConstructorInitializerAllOnOneLineOrOnePerLine: true ConstructorInitializerIndentWidth: 4 ContinuationIndentWidth: 4 Cpp11BracedListStyle: true -DerivePointerAlignment: true +DerivePointerAlignment: false DisableFormat: false ExperimentalAutoDetectBinPacking: false FixNamespaceComments: true diff --git a/contrib/libcbor/.github/workflows/fuzz-pr.yml b/contrib/libcbor/.github/workflows/fuzz-pr.yml index 0e3c4fde4e02..aba933e193f3 100644 --- a/contrib/libcbor/.github/workflows/fuzz-pr.yml +++ b/contrib/libcbor/.github/workflows/fuzz-pr.yml @@ -18,7 +18,7 @@ jobs: fuzz-seconds: 10 dry-run: false - name: Upload Crash - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 if: failure() with: name: artifacts diff --git a/contrib/libcbor/.github/workflows/fuzz.yml b/contrib/libcbor/.github/workflows/fuzz.yml index 8603cc2f338e..8a95cdff76db 100644 --- a/contrib/libcbor/.github/workflows/fuzz.yml +++ b/contrib/libcbor/.github/workflows/fuzz.yml @@ -18,7 +18,7 @@ jobs: fuzz-seconds: 14400 # 4 hours dry-run: false - name: Upload Crash - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 if: failure() with: name: artifacts diff --git a/contrib/libcbor/.gitignore b/contrib/libcbor/.gitignore index 61f88a874965..cfc2f906bd0a 100644 --- a/contrib/libcbor/.gitignore +++ b/contrib/libcbor/.gitignore @@ -1,4 +1,3 @@ -build *~ nbproject .idea @@ -7,10 +6,13 @@ doxygen_docs cmake-build-debug venv **.DS_Store -.vscode +.vscode/tmp +.vscode/c_cpp_properties.json +doc/build # No top-level requirements, see doc/source requirements.txt examples/bazel/bazel-bazel examples/bazel/bazel-bin examples/bazel/bazel-out examples/bazel/bazel-testlogs +**MODULE.bazel.lock diff --git a/contrib/libcbor/.vscode/settings.json b/contrib/libcbor/.vscode/settings.json new file mode 100644 index 000000000000..1efd1526d101 --- /dev/null +++ b/contrib/libcbor/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "C_Cpp.clang_format_style": "file", + "editor.formatOnSave": true, + "cmake.configureOnOpen": true, + "cmake.buildDirectory": "${workspaceFolder}/.vscode/tmp/build_${buildType}", +} \ No newline at end of file diff --git a/contrib/libcbor/BUILD b/contrib/libcbor/BUILD new file mode 100644 index 000000000000..5035c90f756b --- /dev/null +++ b/contrib/libcbor/BUILD @@ -0,0 +1,58 @@ +genrule( + name = "cbor_cmake", + srcs = glob(["**"]), + outs = [ + "libcbor.a", + "cbor.h", + "cbor/arrays.h", + "cbor/bytestrings.h", + "cbor/callbacks.h", + "cbor/cbor_export.h", + "cbor/common.h", + "cbor/configuration.h", + "cbor/data.h", + "cbor/encoding.h", + "cbor/floats_ctrls.h", + "cbor/ints.h", + "cbor/maps.h", + "cbor/serialization.h", + "cbor/streaming.h", + "cbor/strings.h", + "cbor/tags.h", + ], + cmd = " && ".join([ + # Remember where output should go. + "INITIAL_WD=`pwd`", + "cd `dirname $(location CMakeLists.txt)`", + "cmake -DCMAKE_BUILD_TYPE=Release .", + "cmake --build .", + # Export the .a and .h files for cbor rule, below. + "cp -R src/* $$INITIAL_WD/$(RULEDIR)", + "cp cbor/configuration.h $$INITIAL_WD/$(RULEDIR)/cbor", + ]), + visibility = ["//visibility:private"], +) + +cc_import( + name = "cbor", + hdrs = [ + "cbor.h", + "cbor/arrays.h", + "cbor/bytestrings.h", + "cbor/callbacks.h", + "cbor/cbor_export.h", + "cbor/common.h", + "cbor/configuration.h", + "cbor/data.h", + "cbor/encoding.h", + "cbor/floats_ctrls.h", + "cbor/ints.h", + "cbor/maps.h", + "cbor/serialization.h", + "cbor/streaming.h", + "cbor/strings.h", + "cbor/tags.h", + ], + static_library = "libcbor.a", + visibility = ["//visibility:public"], +) diff --git a/contrib/libcbor/Bazel.md b/contrib/libcbor/Bazel.md deleted file mode 100644 index 9fa2081f58fc..000000000000 --- a/contrib/libcbor/Bazel.md +++ /dev/null @@ -1,100 +0,0 @@ -# Use as a Bazel Dependency - -To use libcbor in your -[Baze](https://bazel.build/) -project, first add the following section to your project's `WORKSPACE` file. -Note the location of the `third_party/libcbor.BUILD` file - you may use a -different location if you wish, but you the file must be make available to -`WORKSPACE`. - -## WORKSPACE - -Note, this imports version `0.8.0` - you may need to update the version and -the sha256 hash. - -```python -# libcbor -http_archive( - name = "libcbor", - build_file = "//third_party:libcbor.BUILD", - sha256 = "dd04ea1a7df484217058d389e027e7a0143a4f245aa18a9f89a5dd3e1a4fcc9a", - strip_prefix = "libcbor-0.8.0", - urls = ["https://github.com/PJK/libcbor/archive/refs/tags/v0.8.0.zip"], -) -``` - -## third_party/libcbor.BUILD - -Bazel will unzip the libcbor zip file, then copy this file in as `BUILD`. -Bazel will then use this file to compile libcbor. -[Cmake](https://cmake.org/) -is used in two passes: to create the Makefiles, and then to invoke Make to build -the `libcbor.a` static library. `libcbor.a` and the `.h` files are then made -available for other packages to use. - -```python -genrule( - name = "cbor_cmake", - srcs = glob(["**"]), - outs = ["libcbor.a", "cbor.h", "cbor/arrays.h", "cbor/bytestrings.h", - "cbor/callbacks.h", "cbor/cbor_export.h", "cbor/common.h", "cbor/configuration.h", "cbor/data.h", - "cbor/encoding.h", "cbor/floats_ctrls.h", "cbor/ints.h", "cbor/maps.h", - "cbor/serialization.h", "cbor/streaming.h", "cbor/strings.h", "cbor/tags.h"], - cmd = " && ".join([ - # Remember where output should go. - "INITIAL_WD=`pwd`", - # Build libcbor library. - "cd `dirname $(location CMakeLists.txt)`", - "cmake -DCMAKE_BUILD_TYPE=Release .", - "cmake --build .", - # Export the .a and .h files for cbor rule, below. - "cp src/libcbor.a src/cbor.h $$INITIAL_WD/$(RULEDIR)", - "cp src/cbor/*h cbor/configuration.h $$INITIAL_WD/$(RULEDIR)/cbor"]), - visibility = ["//visibility:private"], -) - -cc_import( - name = "cbor", - hdrs = ["cbor.h", "cbor/arrays.h", "cbor/bytestrings.h", - "cbor/callbacks.h", "cbor/cbor_export.h", "cbor/common.h", "cbor/configuration.h", "cbor/data.h", - "cbor/encoding.h", "cbor/floats_ctrls.h", "cbor/ints.h", "cbor/maps.h", - "cbor/serialization.h", "cbor/streaming.h", "cbor/strings.h", "cbor/tags.h"], - static_library = "libcbor.a", - visibility = ["//visibility:public"], -) -``` - -## third_party/BUILD - -The `libcbor.BUILD` file must be make available to the top-level `WORKSPACE` -file: - -```python -exports_files(["libcbor.BUILD"])) -``` - -## Your BUILD File - -Add libcbor dependency to your package's `BUILD` file like so: - -```python -cc_library( - name = "...", - srcs = [ ... ], - hdrs = [ ... ], - deps = [ - ... - "@libcbor//:cbor", - ], -) -``` - -## Your C File - -Now you may simply include `cbor.h`: - -```c -#include "cbor.h" - -static const uint8_t version = cbor_major_version; -``` diff --git a/contrib/libcbor/CHANGELOG.md b/contrib/libcbor/CHANGELOG.md index 3c331f9266ab..7509569b414f 100644 --- a/contrib/libcbor/CHANGELOG.md +++ b/contrib/libcbor/CHANGELOG.md @@ -1,40 +1,76 @@ Template: + - [Fix issue X in feature Y](https://github.com/PJK/libcbor/pull/XXX) (by [YYY](https://github.com/YYY)) Next --------------------- +0.13.0 (2025-08-30) +--------------------- + +- [Fix `cbor_is_null`, `cbor_is_undef`, `cbor_is_bool` assertion failing on non-ctrl floats in debug mode](https://github.com/PJK/libcbor/issues/352) (bug discovered by ) +- [Add an example for handling of CBOR Sequences](https://github.com/PJK/libcbor/pull/358) +- [Use C23/c2x if available](https://github.com/PJK/libcbor/pull/361) + - libcbor remains C99 compatible + - When the compiler does not support new standard, C99 will be used, so the change should be backwards compatible +- [Improved introduction documentation and examples](https://github.com/PJK/libcbor/pull/363) +- [Add cbor_copy_definite to turn indefinite items into definite equivalents](https://github.com/PJK/libcbor/pull/364/files) (proposed by Jacob Teplitsky) +- BUILD BREAKING: [Minimum CMake version set to 3.5](https://github.com/PJK/libcbor/pull/355) to [be compatible with CMake 4](https://github.com/eclipse-ecal/ecal/issues/2041) ([suggestion](https://github.com/PJK/libcbor/commit/1183292d4695300785b272532c1e02d68840e4b8#commitcomment-164507943) by ) + - See for support; the vast majority of users should not be affected. + +0.12.0 (2025-03-16) +--------------------- + +- BUILD BREAKING: [Respect `INTERPROCEDURAL_OPTIMIZATION` and use the default value](https://github.com/PJK/libcbor/issues/315) +- BREAKING: Changes to NaN encoding + - [Fix NaN encoding on Windows](https://github.com/PJK/libcbor/issues/271) + - [Fix NaN encoding on mips/mipsel](https://github.com/PJK/libcbor/issues/329) + - [Signaling NaNs will from now on be encoded as canonical quiet NaNs](https://github.com/PJK/libcbor/pull/335). This was already the existing behavior for half-precision floats + - Decoding is unchanged + - Please note that this is an intermediate state and likely to be revisited () +- [Make build compatible with CMake FetchContent](https://github.com/PJK/libcbor/pull/341) (by [Jan200101](https://github.com/Jan200101)) +- [Support Bzlmod for Bazel builds](https://github.com/PJK/libcbor/pull/340) + - This should significantly simplify including libcbor as a dependency/module in Bazel projects, see +- Code quality improvements + - [Fix compiler pragmas](https://github.com/PJK/libcbor/pull/347) (by [brooksdavis](https://github.com/brooksdavis)) + - [Fix code style issues](https://github.com/PJK/libcbor/pull/321) +- [Fixed bug in cbor2cjson example](https://github.com/PJK/libcbor/pull/338) (by [whitehse](https://github.com/whitehse)) + 0.11.0 (2024-02-04) --------------------- + - [Updated documentation to refer to RFC 8949](https://github.com/PJK/libcbor/issues/269) - Improvements to `cbor_describe` - - [Bytestring data will now be printed as well](https://github.com/PJK/libcbor/pull/281) by [akallabeth](https://github.com/akallabeth) + - [Bytestring data will now be printed as well](https://github.com/PJK/libcbor/pull/281) by [akallabeth](https://github.com/akallabeth) - [Formatting consistency and clarity improvements](https://github.com/PJK/libcbor/pull/285) - [Fix `cbor_string_set_handle` not setting the codepoint count](https://github.com/PJK/libcbor/pull/286) - BREAKING: [`cbor_load` will no longer fail on input strings that are well-formed but not valid UTF-8](https://github.com/PJK/libcbor/pull/286) - - If you were relying on the validation, please check the result using `cbor_string_codepoint_count` instead + - If you were relying on the validation, please check the result using `cbor_string_codepoint_count` instead - BREAKING: [All decoders like `cbor_load` and `cbor_stream_decode` will accept all well-formed tag values](https://github.com/PJK/libcbor/pull/308) (bug discovered by [dskern-github](https://github.com/dskern-github)) - Previously, decoding of certain values would fail with `CBOR_ERR_MALFORMATED` or `CBOR_DECODER_ERROR` - This also makes decoding symmetrical with serialization, which already accepts all values 0.10.2 (2023-01-31) --------------------- + - [Fixed minor test bug causing failures for x86 Linux](https://github.com/PJK/libcbor/pull/266) (discovered by [trofi](https://github.com/PJK/libcbor/issues/263)) - Actual libcbor functionality not affected, bug was in the test suite - [Made tests platform-independent](https://github.com/PJK/libcbor/pull/272) 0.10.1 (2022-12-30) --------------------- + - [Fix a regression in `cbor_serialize_alloc` that caused serialization of zero-length strings and bytestrings or byte/strings with zero-length chunks to fail](https://github.com/PJK/libcbor/pull/260) (discovered by [martelletto](https://github.com/martelletto)) 0.10.0 (2022-12-29) --------------------- + - Make the buffer_size optional in `cbor_serialize_alloc` [[#205]](https://github.com/PJK/libcbor/pull/205) (by [hughsie](https://github.com/hughsie)) - BREAKING: Improved half-float encoding for denormalized numbers. [[#208]](https://github.com/PJK/libcbor/pull/208) (by [ranvis](https://github.com/ranvis)) - Denormalized half-floats will now preserve data in the mantissa - - Note: Half-float NaNs still lose data (https://github.com/PJK/libcbor/issues/215) + - Note: Half-float NaNs still lose data () - BUILD BREAKING: Minimum CMake version is 3.0 [[#201]](https://github.com/PJK/libcbor/pull/201) (by [thewtex@](https://github.com/thewtex)) - - See https://repology.org/project/cmake/versions for support; the vast majority of users should not be affected. + - See for support; the vast majority of users should not be affected. - Fix a potential memory leak when the allocator fails during array or map decoding [[#224]](https://github.com/PJK/libcbor/pull/224) (by [James-ZHANG](https://github.com/James-ZHANG)) - [Fix a memory leak when the allocator fails when adding chunks to indefinite bytestrings.](https://github.com/PJK/libcbor/pull/242) ([discovered](https://github.com/PJK/libcbor/pull/228) by [James-ZHANG](https://github.com/James-ZHANG)) - [Fix a memory leak when the allocator fails when adding chunks to indefinite strings](https://github.com/PJK/libcbor/pull/246) @@ -53,57 +89,62 @@ Next 0.9.0 (2021-11-14) --------------------- + - Improved pkg-config paths handling [[#164]](https://github.com/PJK/libcbor/pull/164) (by [jtojnar@](https://github.com/jtojnar)) - Use explicit math.h linkage [[#170]](https://github.com/PJK/libcbor/pull/170) - BREAKING: Fixed handling of items that exceed the host size_t range [[#186]](https://github.com/PJK/libcbor/pull/186hg) - - Callbacks for bytestrings, strings, arrays, and maps use uint64_t instead of size_t to allow handling of large items that exceed size_t even if size_t < uint64_t - - cbor_decode explicitly checks size to avoid overflows (previously broken, potentially resulting in erroneous decoding on affected systems) - - The change should be a noop for 64b systems + - Callbacks for bytestrings, strings, arrays, and maps use uint64_t instead of size_t to allow handling of large items that exceed size_t even if size_t < uint64_t + - cbor_decode explicitly checks size to avoid overflows (previously broken, potentially resulting in erroneous decoding on affected systems) + - The change should be a noop for 64b systems - Added a [Bazel](https://bazel.build/) build example [[#196]](https://github.com/PJK/libcbor/pull/196) (by [andyjgf@](https://github.com/andyjgf)) 0.8.0 (2020-09-20) --------------------- + - BUILD BREAKING: Use BUILD_SHARED_LIBS to determine how to build libraries (fixed Windows linkage) [[#148]](https://github.com/PJK/libcbor/pull/148) (by [intelligide@](https://github.com/intelligide)) - BREAKING: Fix `cbor_tag_item` not increasing the reference count on the tagged item reference it returns [[Fixes #109](https://github.com/PJK/libcbor/issues/109)] (discovered bt [JohnGilmour](https://github.com/JohnGilmour)) - If you have previously relied on the broken behavior, you can use `cbor_move` to emulate as long as the returned handle is an "rvalue" - BREAKING: [`CBOR_DECODER_EBUFFER` removed from `cbor_decoder_status`](https://github.com/PJK/libcbor/pull/156) - - `cbor_stream_decode` will set `CBOR_DECODER_NEDATA` instead if the input buffer is empty + - `cbor_stream_decode` will set `CBOR_DECODER_NEDATA` instead if the input buffer is empty - [Fix `cbor_stream_decode`](https://github.com/PJK/libcbor/pull/156) to set `cbor_decoder_result.required` to the minimum number of input bytes necessary to receive the next callback (as long as at least one byte was passed) (discovered by [woefulwabbit](https://github.com/woefulwabbit)) - Fixed several minor manpage issues [[#159]](https://github.com/PJK/libcbor/pull/159) (discovered by [kloczek@](https://github.com/kloczek)) 0.7.0 (2020-04-25) --------------------- + - Fix bad encoding of NaN half-floats [[Fixes #53]](https://github.com/PJK/libcbor/issues/53) (discovered by [BSipos-RKF](https://github.com/BSipos-RKF)) - - **Warning**: Previous versions encoded NaNs as `0xf9e700` instead of `0xf97e00`; if you rely on the broken behavior, this will be a breaking change + - **Warning**: Previous versions encoded NaNs as `0xf9e700` instead of `0xf97e00`; if you rely on the broken behavior, this will be a breaking change - Fix potentially bad encoding of negative half-float with exponent < -14 [[Fixes #112]](https://github.com/PJK/libcbor/issues/112) (discovered by [yami36](https://github.com/yami36)) - BREAKING: Improved bool support [[Fixes #63]](https://github.com/PJK/libcbor/issues/63) - - Rename `cbor_ctrl_is_bool` to `cbor_get_bool` and fix the behavior - - Add `cbor_set_bool` + - Rename `cbor_ctrl_is_bool` to `cbor_get_bool` and fix the behavior + - Add `cbor_set_bool` - Fix memory_allocation_test breaking the build without CBOR_CUSTOM_ALLOC [[Fixes #128]](https://github.com/PJK/libcbor/issues/128) (by [panlinux](https://github.com/panlinux)) - [Fix a potential build issue where cJSON includes may be misconfigured](https://github.com/PJK/libcbor/pull/132) - Breaking: [Add a limit on the size of the decoding context stack](https://github.com/PJK/libcbor/pull/138) (by [James-ZHANG](https://github.com/James-ZHANG)) - - If your usecase requires parsing very deeply nested structures, you might need to increase the default 2k limit via `CBOR_MAX_STACK_SIZE` + - If your usecase requires parsing very deeply nested structures, you might need to increase the default 2k limit via `CBOR_MAX_STACK_SIZE` - Enable LTO/IPO based on [CheckIPOSupported](https://cmake.org/cmake/help/latest/module/CheckIPOSupported.html#module:CheckIPOSupported) [[#143]](https://github.com/PJK/libcbor/pull/143) (by [xanderlent](https://github.com/xanderlent)) - - If you rely on LTO being enabled and use CMake version older than 3.9, you will need to re-enable it manually or upgrade your CMake + - If you rely on LTO being enabled and use CMake version older than 3.9, you will need to re-enable it manually or upgrade your CMake 0.6.1 (2020-03-26) --------------------- + - [Fix bad shared library version number](https://github.com/PJK/libcbor/pull/131) - - **Warning**: Shared library built from the 0.6.0 release is erroneously marked as version "0.6.0", which makes it incompatible with future releases *including the v0.6.X line* even though they may be compatible API/ABI-wise. Refer to the documentation for the new SO versioning scheme. + - **Warning**: Shared library built from the 0.6.0 release is erroneously marked as version "0.6.0", which makes it incompatible with future releases *including the v0.6.X line* even though they may be compatible API/ABI-wise. Refer to the documentation for the new SO versioning scheme. 0.6.0 (2020-03-15) --------------------- -- Correctly set .so version [[Fixes #52]](https://github.com/PJK/libcbor/issues/52). - - **Warning**: All previous releases will be identified as 0.0 by the linker. + +- Correctly set .so version [[Fixes #52]](https://github.com/PJK/libcbor/issues/52). + - **Warning**: All previous releases will be identified as 0.0 by the linker. - Fix & prevent heap overflow error in example code [[#74]](https://github.com/PJK/libcbor/pull/74) [[#76]](https://github.com/PJK/libcbor/pull/76) (by @nevun) - Correctly set OSX dynamic library version [[Fixes #75]](https://github.com/PJK/libcbor/issues/75) - [Fix misplaced 0xFF bytes in maps possibly causing memory corruption](https://github.com/PJK/libcbor/pull/82) - BREAKING: Fix handling & cleanup of failed memory allocation in constructor and builder helper functions [[Fixes #84]](https://github.com/PJK/libcbor/issues/84) - - All cbor_new_* and cbor_build_* functions will now explicitly return NULL when memory allocation fails + - All cbor_new_*and cbor_build_* functions will now explicitly return NULL when memory allocation fails - It is up to the client to handle such cases - Globally enforced code style [[Fixes #83]](https://github.com/PJK/libcbor/issues/83) -- Fix issue possible memory corruption bug on repeated +- Fix issue possible memory corruption bug on repeated cbor_(byte)string_add_chunk calls with intermittently failing realloc calls - Fix possibly misaligned reads and writes when endian.h is uses or when running on a big-endian machine [[Fixes #99](https://github.com/PJK/libcbor/issues/99), [#100](https://github.com/PJK/libcbor/issues/100)] @@ -112,6 +153,7 @@ Next 0.5.0 (2017-02-06) --------------------- + - Remove cmocka from the subtree (always rely on system or user-provided version) - Windows CI - Only build tests if explicitly enabled (`-DWITH_TESTS=ON`) @@ -127,6 +169,7 @@ Next 0.4.0 (2015-12-25) --------------------- + Breaks build & header compatibility due to: - Improved build configuration and feature check macros @@ -137,6 +180,7 @@ Breaks build & header compatibility due to: 0.3.1 (2015-05-21) --------------------- + - documentation and comments improvements, mostly for the API reference 0.3.0 (2015-05-21) @@ -152,6 +196,7 @@ Breaks build & header compatibility due to: 0.2.1 (2015-05-17) --------------------- + - C99 support 0.2.0 (2015-05-17) diff --git a/contrib/libcbor/CMakeLists.txt b/contrib/libcbor/CMakeLists.txt index 16b9f0875d33..a7e133a3e888 100644 --- a/contrib/libcbor/CMakeLists.txt +++ b/contrib/libcbor/CMakeLists.txt @@ -1,16 +1,19 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) -project(libcbor) -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/") +project(libcbor LANGUAGES C CXX) +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} + "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/") include(CTest) include(GNUInstallDirs) # Provides CMAKE_INSTALL_ variables -SET(CBOR_VERSION_MAJOR "0") -SET(CBOR_VERSION_MINOR "11") -SET(CBOR_VERSION_PATCH "0") -SET(CBOR_VERSION ${CBOR_VERSION_MAJOR}.${CBOR_VERSION_MINOR}.${CBOR_VERSION_PATCH}) +set(CBOR_VERSION_MAJOR "0") +set(CBOR_VERSION_MINOR "13") +set(CBOR_VERSION_PATCH "0") +set(CBOR_VERSION + ${CBOR_VERSION_MAJOR}.${CBOR_VERSION_MINOR}.${CBOR_VERSION_PATCH}) -option(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY "cmake --build --target install does not depend on cmake --build" true) +option(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY + "cmake --build --target install does not depend on cmake --build" true) option(BUILD_SHARED_LIBS "Build as a shared library" false) include(CheckIncludeFiles) @@ -18,42 +21,51 @@ include(CheckIncludeFiles) include(TestBigEndian) test_big_endian(BIG_ENDIAN) if(BIG_ENDIAN) - add_definitions(-DIS_BIG_ENDIAN) + add_definitions(-DIS_BIG_ENDIAN) endif() option(CBOR_CUSTOM_ALLOC "Custom, dynamically defined allocator support" OFF) if(CBOR_CUSTOM_ALLOC) - message(WARNING - "CBOR_CUSTOM_ALLOC has been deprecated. Custom allocators are now enabled by default." - "The flag is a no-op and will be removed in the next version. " - "Please remove CBOR_CUSTOM_ALLOC from your build configuration.") -endif(CBOR_CUSTOM_ALLOC) + message( + WARNING + "CBOR_CUSTOM_ALLOC has been deprecated. \ + Custom allocators are now enabled by default. \ + The flag is a no-op and will be removed in the next version. \ + Please remove CBOR_CUSTOM_ALLOC from your build configuration.") +endif() option(CBOR_PRETTY_PRINTER "Include a pretty-printing routine" ON) -set(CBOR_BUFFER_GROWTH "2" CACHE STRING "Factor for buffer growth & shrinking") -set(CBOR_MAX_STACK_SIZE "2048" CACHE STRING "maximum size for decoding context stack") +set(CBOR_BUFFER_GROWTH + "2" + CACHE STRING "Factor for buffer growth & shrinking") +set(CBOR_MAX_STACK_SIZE + "2048" + CACHE STRING "maximum size for decoding context stack") option(WITH_TESTS "[TEST] Build unit tests (requires CMocka)" OFF) if(WITH_TESTS) - add_definitions(-DWITH_TESTS) -endif(WITH_TESTS) + add_definitions(-DWITH_TESTS) +endif() option(WITH_EXAMPLES "Build examples" ON) -option(HUGE_FUZZ "[TEST] Fuzz through 8GB of data in the test. Do not use with memory instrumentation!" OFF) +option(HUGE_FUZZ "[TEST] Fuzz through 8GB of data in the test.\ + Do not use with memory instrumentation!" OFF) if(HUGE_FUZZ) - add_definitions(-DHUGE_FUZZ) -endif(HUGE_FUZZ) + add_definitions(-DHUGE_FUZZ) +endif() -option(SANE_MALLOC "[TEST] Assume that malloc will not allocate multi-GB blocks. Tests only, platform specific" OFF) +option(SANE_MALLOC + "[TEST] Assume that malloc will not allocate multi-GB blocks.\ + Tests only, platform specific" OFF) if(SANE_MALLOC) - add_definitions(-DSANE_MALLOC) -endif(SANE_MALLOC) + add_definitions(-DSANE_MALLOC) +endif() option(PRINT_FUZZ "[TEST] Print the fuzzer input" OFF) if(PRINT_FUZZ) - add_definitions(-DPRINT_FUZZ) -endif(PRINT_FUZZ) + add_definitions(-DPRINT_FUZZ) +endif() option(SANITIZE "Enable ASan & a few compatible sanitizers in Debug mode" ON) @@ -67,119 +79,218 @@ set(CPACK_PACKAGE_VERSION_PATCH ${CBOR_VERSION_PATCH}) include(CPack) +# +# Configure compilation flags and language features +# + +include(CheckCSourceCompiles) + +check_c_source_compiles(" + #include + [[nodiscard]] int f(void) { return 42; } + int main(void) { return f(); } +" HAS_NODISCARD_ATTRIBUTE) + +if (HAS_NODISCARD_ATTRIBUTE) + message(STATUS "[[nodiscard]] is supported.") + add_definitions(-D_CBOR_HAS_NODISCARD_ATTRIBUTE) + # Assume that if we have [[nodiscard]], we have some C23 support. May fail. + if(NOT DEFINED CMAKE_C_STANDARD) + message(STATUS "Switching to C23-like mode. To prevent this, pass -DCMAKE_C_STANDARD explicitly.") + # On Clang 16, this is resolved to -std=c2x + set(CMAKE_C_STANDARD 23 CACHE STRING "C language standard") + endif() +endif() + if(MINGW) - # https://github.com/PJK/libcbor/issues/13 - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99") + # https://github.com/PJK/libcbor/issues/13 + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99") elseif(NOT MSVC) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -pedantic") + # Default to C99 + if(NOT DEFINED CMAKE_C_STANDARD) + set(CMAKE_C_STANDARD 99 CACHE STRING "C language standard") + endif() + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic") endif() +# CMAKE_C_STANDARD set above +set(CMAKE_C_STANDARD_REQUIRED ON) +set(CMAKE_C_EXTENSIONS OFF) + if(MSVC) - # This just doesn't work right -- https://msdn.microsoft.com/en-us/library/5ft82fed.aspx - set(CBOR_RESTRICT_SPECIFIER "") + # This just doesn't work right -- + # https://msdn.microsoft.com/en-us/library/5ft82fed.aspx + set(CBOR_RESTRICT_SPECIFIER "") + # Safe stdio is only available in C11 + add_definitions(-D_CRT_SECURE_NO_WARNINGS) + + set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /sdl") else() - set(CBOR_RESTRICT_SPECIFIER "restrict") + set(CBOR_RESTRICT_SPECIFIER "restrict") - set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -Wall -g -ggdb -DDEBUG=true") - set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -Wall -DNDEBUG") + set(CMAKE_C_FLAGS_DEBUG + "${CMAKE_C_FLAGS_DEBUG} -O0 -Wall -Wextra -g -ggdb -DDEBUG=true") + set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -Wall -Wextra -DNDEBUG") - if(SANITIZE) - set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} \ + if(SANITIZE) + set(CMAKE_C_FLAGS_DEBUG + "${CMAKE_C_FLAGS_DEBUG} \ -fsanitize=undefined -fsanitize=address \ -fsanitize=bounds -fsanitize=alignment") - endif() -endif() - -set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-g") + endif() + set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-g") +endif() include(CheckTypeSize) check_type_size("size_t" SIZEOF_SIZE_T) if(SIZEOF_SIZE_T LESS 8) - message(WARNING "Your size_t is less than 8 bytes. Decoding of huge items that would exceed the memory address space will always fail. Consider implementing a custom streaming decoder if you need to deal with huge items.") + message( + WARNING + "Your size_t is less than 8 bytes. \ + Decoding of huge items that would exceed the memory address space \ + will always fail. Consider implementing a custom streaming \ + decoder if you need to deal with huge items.") +else() + add_definitions(-DEIGHT_BYTE_SIZE_T) +endif() + +check_c_source_compiles(" + int main() { + __builtin_unreachable(); + return 0; + } +" HAS_BUILTIN_UNREACHABLE) + +if (HAS_BUILTIN_UNREACHABLE) + add_definitions(-D_CBOR_HAS_BUILTIN_UNREACHABLE) +endif() + +# CMake >= 3.9.0 enables LTO for GCC and Clang with INTERPROCEDURAL_OPTIMIZATION +# Policy CMP0069 enables this behavior when we set the minimum CMake version < +# 3.9.0 Checking for LTO support before setting INTERPROCEDURAL_OPTIMIZATION is +# mandatory with CMP0069 set to NEW. +set(LTO_SUPPORTED FALSE) +if(${CMAKE_VERSION} VERSION_GREATER "3.9.0" OR ${CMAKE_VERSION} VERSION_EQUAL + "3.9.0") + cmake_policy(SET CMP0069 NEW) + # Require LTO support to build libcbor with newer CMake versions + include(CheckIPOSupported) + check_ipo_supported(RESULT LTO_SUPPORTED) +endif() + +if(NOT DEFINED CMAKE_INTERPROCEDURAL_OPTIMIZATION) + set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON) +endif() + +if(LTO_SUPPORTED) + message( + STATUS + "LTO is supported and CMAKE_INTERPROCEDURAL_OPTIMIZATION=${CMAKE_INTERPROCEDURAL_OPTIMIZATION}" + ) else() - add_definitions(-DEIGHT_BYTE_SIZE_T) + message(STATUS "LTO is not supported") endif() *** 10870 LINES SKIPPED *** From nobody Wed Apr 22 14:24:18 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g11gk6VFCz6Zdjj for ; Wed, 22 Apr 2026 14:24:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g11gk4tgqz3gWT for ; Wed, 22 Apr 2026 14:24:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776867858; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zyMBY6nRDHKvhyPdANQdt9ywZ1d457xqUGvDf7TiOoU=; b=Ij7nydxWS84Te4lF965hrlg6goVlGNA9/SZjSfwNLtyhEaxtF7nLWwzy6BKaGMnog7A6ad eOLUj8TEbF0vXn0PBUuxx7olUbdTrYoQEHUA+lvZRehbBp/34UFc0/9qrX02gBrdLVUdGd 1KbrxtR4Ucbhd3t4eQc18vhGh/NGsRneI+MDz8SErCVBrkPIrq1rjnDZFu5IodqBtMDsPD NC8VtMfoCTny94cURJufC9+QMWr0PugGmihzeCSWDxoKWPVAexzSVOsKUD/fn3NltZjMFT IehlCljbywStdQDFA49rkR2AcAMWdd4s339nbHVjYQtAoRq7dBZobgkRtCH7Hg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776867858; a=rsa-sha256; cv=none; b=s9bSc8TU6vXdwS3R1k5hwJamzv5ZVSbJoYIgBhqFIWU4dFd2FZzFvORqMle48i4y+uilz8 mNeWu6cdz/mA2G17paUp029Sv0TGEr3DLiAhKN4PqQ210+gw0au5PAmilFO9viiarCffr8 HU0PvRG/PrKyhbbX5IquNjiNQxNhqUK/IH7VlVnpI1UuC7DdHk3bdMkzx66LCqL5KSaJXm yCI7DghVpSmlw0Uh95W06upOR4yF/whkZMNUm4BblYTnVEKcKfxjCO5QJCjlxRwthtPumg grwUSqFonpcgJuEJ641EVjL8+R/o3UQuOEi6xqFxvDpSX+mHEJ/1usPYk7Qdiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776867858; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zyMBY6nRDHKvhyPdANQdt9ywZ1d457xqUGvDf7TiOoU=; b=G6Mx8q6/3C0FIKRP044KXHT86zp6FayQ/pBp0fu0lXjkgNNHsZ1nE9tpsJ42sSpOFwSQ1c z5c/dcL2gmaTZcA+mxCZtMuPnBc/qyUe5cVq0t2sAyhmrromBmW+ETlu8xz73ZsbCscAN8 Y+qmxMz9FS/O0VhSFvrrXKQ4IsgT7fY2hNbEUtZWop1b4rawxmk8tdeeREvmW3BIZ9j/Q9 tz0lM26F+SJYN2jCDCXqNOFCRxCDmss9DAPZJxIuUeT3HMAPC5Gi5iqmycRlk4fHI98rZf gp9ZWUGT5S+FQK1QAtpWCroAb2844Jc4D3fBCLIaygD1i4/qwH5S8faikIlZDw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g11gk4Tr8zbBl for ; Wed, 22 Apr 2026 14:24:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26904 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 14:24:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: a54428834b9d - stable/15 - libfido2: Update to 1.16.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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a54428834b9d82e9e297664d21b84993a491da0d Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 14:24:18 +0000 Message-Id: <69e8da12.26904.1c021271@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a54428834b9d82e9e297664d21b84993a491da0d commit a54428834b9d82e9e297664d21b84993a491da0d Author: Ed Maste AuthorDate: 2026-04-07 13:14:41 +0000 Commit: Ed Maste CommitDate: 2026-04-22 14:24:02 +0000 libfido2: Update to 1.16.0 Sponsored by: The FreeBSD Foundation (cherry picked from commit febb0da5bf4bc99828ebede7abcb039514ac367a) --- contrib/libfido2/.actions/build-bsd | 6 +- .../.actions/build-linux-i686-w64-mingw32-gcc | 6 +- .../libfido2/.actions/build-linux-openssl3-clang | 6 +- contrib/libfido2/.actions/build-linux-openssl3-gcc | 6 +- .../build-linux-openssl3-i686-w64-mingw32-gcc | 10 +- contrib/libfido2/.actions/build-osx-clang | 3 +- contrib/libfido2/.actions/fuzz-linux | 13 +- contrib/libfido2/.actions/run-shellcheck | 25 + .../libfido2/.github/workflows/alpine_builds.yml | 4 +- contrib/libfido2/.github/workflows/bsd_builds.yml | 9 +- contrib/libfido2/.github/workflows/cifuzz_oss.yml | 6 +- .../libfido2/.github/workflows/codeql-analysis.yml | 8 +- .../libfido2/.github/workflows/linux_builds.yml | 15 +- contrib/libfido2/.github/workflows/linux_fuzz.yml | 6 +- .../libfido2/.github/workflows/macos_builds.yml | 4 +- contrib/libfido2/.github/workflows/openssl3.yml | 14 +- contrib/libfido2/.github/workflows/shellcheck.yml | 27 + contrib/libfido2/CMakeLists.txt | 12 +- contrib/libfido2/LICENSE | 2 +- contrib/libfido2/NEWS | 28 +- contrib/libfido2/README.adoc | 6 +- contrib/libfido2/SECURITY.md | 2 +- contrib/libfido2/examples/README.adoc | 3 +- contrib/libfido2/examples/cred.c | 29 +- contrib/libfido2/fuzz/CMakeLists.txt | 13 +- contrib/libfido2/fuzz/Dockerfile | 2 +- contrib/libfido2/fuzz/Makefile | 6 +- contrib/libfido2/fuzz/export.gnu | 6 + contrib/libfido2/fuzz/functions.txt | 1096 ++++++++++---------- contrib/libfido2/fuzz/fuzz_attobj.c | 333 ++++++ contrib/libfido2/fuzz/fuzz_cred.c | 13 +- contrib/libfido2/fuzz/libfuzzer.c | 1 + contrib/libfido2/fuzz/mutator_aux.c | 6 + contrib/libfido2/fuzz/report.tgz | Bin 361946 -> 372600 bytes contrib/libfido2/fuzz/summary.txt | 94 +- contrib/libfido2/man/CMakeLists.txt | 8 +- contrib/libfido2/man/check.sh | 1 + contrib/libfido2/man/fido2-assert.1 | 6 +- contrib/libfido2/man/fido2-cred.1 | 14 +- contrib/libfido2/man/fido_cred_new.3 | 54 +- contrib/libfido2/man/fido_cred_set_authdata.3 | 48 +- contrib/libfido2/regress/CMakeLists.txt | 31 +- contrib/libfido2/regress/cred.c | 1068 +++++++++++++++++-- contrib/libfido2/regress/dev.c | 234 +---- contrib/libfido2/regress/extern.h | 17 + contrib/libfido2/regress/mock.c | 182 ++++ contrib/libfido2/src/CMakeLists.txt | 8 +- contrib/libfido2/src/aes256.c | 6 +- contrib/libfido2/src/bio.c | 11 +- contrib/libfido2/src/cbor.c | 105 +- contrib/libfido2/src/cred.c | 143 ++- contrib/libfido2/src/credman.c | 11 +- contrib/libfido2/src/dev.c | 11 +- contrib/libfido2/src/export.gnu | 6 + contrib/libfido2/src/export.llvm | 6 + contrib/libfido2/src/export.msvc | 6 + contrib/libfido2/src/extern.h | 24 +- contrib/libfido2/src/fido.h | 8 +- contrib/libfido2/src/fido/param.h | 9 +- contrib/libfido2/src/fido/types.h | 20 +- contrib/libfido2/src/hid_linux.c | 36 +- contrib/libfido2/src/hid_netbsd.c | 6 +- contrib/libfido2/src/hid_osx.c | 40 +- contrib/libfido2/src/nfc.c | 98 +- contrib/libfido2/src/pin.c | 2 + contrib/libfido2/src/random.c | 12 +- contrib/libfido2/src/rs1.c | 53 +- contrib/libfido2/src/rs256.c | 53 +- contrib/libfido2/src/u2f.c | 1 + contrib/libfido2/src/winhello.c | 58 +- contrib/libfido2/tools/cred_make.c | 14 +- contrib/libfido2/tools/credman.c | 7 +- contrib/libfido2/tools/fido2-cred.c | 4 +- contrib/libfido2/tools/fido2-unprot.sh | 39 +- contrib/libfido2/tools/include_check.sh | 17 +- contrib/libfido2/tools/test.sh | 145 +-- contrib/libfido2/tools/token.c | 9 + contrib/libfido2/udev/check.sh | 4 +- contrib/libfido2/windows/build.ps1 | 41 +- contrib/libfido2/windows/const.ps1 | 17 +- contrib/libfido2/windows/cygwin.ps1 | 11 +- contrib/libfido2/windows/release.ps1 | 22 +- 82 files changed, 3140 insertions(+), 1406 deletions(-) diff --git a/contrib/libfido2/.actions/build-bsd b/contrib/libfido2/.actions/build-bsd index 66fc4e3ba281..c56f084a3a84 100755 --- a/contrib/libfido2/.actions/build-bsd +++ b/contrib/libfido2/.actions/build-bsd @@ -15,7 +15,7 @@ cat > "${MANIFEST}" <<- EOF image: ${IMAGE} packages: - cmake - - llvm + - llvm${LLVM_VERSION:+%${LLVM_VERSION}} - pcsc-lite EOF @@ -38,7 +38,7 @@ tasks: else SUDO=sudo fi - SCAN="/usr/local/bin/scan-build --use-cc=/usr/bin/cc --status-bugs" + SCAN="/usr/local/bin/scan-build${LLVM_VERSION:+-${LLVM_VERSION}} --use-cc=/usr/bin/cc --status-bugs" cd libfido2 for T in Debug Release; do mkdir build-\$T @@ -60,6 +60,7 @@ q() { } submit_job() { + # shellcheck disable=SC3043 local manifest="$1" jq \ --compact-output --null-input \ @@ -71,6 +72,7 @@ submit_job() { } job_status() { + # shellcheck disable=SC3043 local id="$1" jq \ --compact-output --null-input \ diff --git a/contrib/libfido2/.actions/build-linux-i686-w64-mingw32-gcc b/contrib/libfido2/.actions/build-linux-i686-w64-mingw32-gcc index a89578da0886..6bcfe6348a69 100755 --- a/contrib/libfido2/.actions/build-linux-i686-w64-mingw32-gcc +++ b/contrib/libfido2/.actions/build-linux-i686-w64-mingw32-gcc @@ -1,6 +1,6 @@ #!/bin/sh -eux -# Copyright (c) 2022-2023 Yubico AB. All rights reserved. +# Copyright (c) 2022-2024 Yubico AB. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # SPDX-License-Identifier: BSD-2-Clause @@ -23,7 +23,7 @@ SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) EOF # Build and install libcbor. -git clone --depth=1 https://github.com/pjk/libcbor -b v0.10.1 +git clone --depth=1 https://github.com/pjk/libcbor -b v0.12.0 cd libcbor mkdir build (cd build && cmake -DCMAKE_TOOLCHAIN_FILE=/tmp/mingw.cmake \ @@ -42,7 +42,7 @@ sudo make install_sw cd .. # Build and install zlib. -git clone --depth=1 https://github.com/madler/zlib -b v1.3 +git clone --depth=1 https://github.com/madler/zlib -b v1.3.1 cd zlib make -fwin32/Makefile.gcc PREFIX=i686-w64-mingw32- sudo make -fwin32/Makefile.gcc PREFIX=i686-w64-mingw32- DESTDIR=/fakeroot \ diff --git a/contrib/libfido2/.actions/build-linux-openssl3-clang b/contrib/libfido2/.actions/build-linux-openssl3-clang index 2383e51ad8f5..4b805793bf39 100755 --- a/contrib/libfido2/.actions/build-linux-openssl3-clang +++ b/contrib/libfido2/.actions/build-linux-openssl3-clang @@ -1,6 +1,6 @@ #!/bin/sh -eux -# Copyright (c) 2022 Yubico AB. All rights reserved. +# Copyright (c) 2022-2024 Yubico AB. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # SPDX-License-Identifier: BSD-2-Clause @@ -12,8 +12,8 @@ FAKEROOT="$(mktemp -d)" # Check exports. (cd src && ./diff_exports.sh) -# Build and install OpenSSL 3.0.12. -git clone --branch openssl-3.0.12 \ +# Build and install OpenSSL 3.0.15. +git clone --branch openssl-3.0.15 \ --depth=1 https://github.com/openssl/openssl cd openssl ./Configure linux-x86_64-clang --prefix="${FAKEROOT}" \ diff --git a/contrib/libfido2/.actions/build-linux-openssl3-gcc b/contrib/libfido2/.actions/build-linux-openssl3-gcc index 344fc12bce8c..91ccd48ffe28 100755 --- a/contrib/libfido2/.actions/build-linux-openssl3-gcc +++ b/contrib/libfido2/.actions/build-linux-openssl3-gcc @@ -1,6 +1,6 @@ #!/bin/sh -eux -# Copyright (c) 2022 Yubico AB. All rights reserved. +# Copyright (c) 2022-2024 Yubico AB. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # SPDX-License-Identifier: BSD-2-Clause @@ -8,8 +8,8 @@ ${CC} --version FAKEROOT="$(mktemp -d)" -# Build and install OpenSSL 3.0.12. -git clone --branch openssl-3.0.12 \ +# Build and install OpenSSL 3.0.15. +git clone --branch openssl-3.0.15 \ --depth=1 https://github.com/openssl/openssl cd openssl ./Configure linux-x86_64 --prefix="${FAKEROOT}" \ diff --git a/contrib/libfido2/.actions/build-linux-openssl3-i686-w64-mingw32-gcc b/contrib/libfido2/.actions/build-linux-openssl3-i686-w64-mingw32-gcc index 3bbb141dad0d..a9ba2e2b56d8 100755 --- a/contrib/libfido2/.actions/build-linux-openssl3-i686-w64-mingw32-gcc +++ b/contrib/libfido2/.actions/build-linux-openssl3-i686-w64-mingw32-gcc @@ -1,6 +1,6 @@ #!/bin/sh -eux -# Copyright (c) 2022-2023 Yubico AB. All rights reserved. +# Copyright (c) 2022-2024 Yubico AB. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # SPDX-License-Identifier: BSD-2-Clause @@ -23,7 +23,7 @@ SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) EOF # Build and install libcbor. -git clone --depth=1 https://github.com/pjk/libcbor -b v0.10.1 +git clone --depth=1 https://github.com/pjk/libcbor -b v0.12.0 cd libcbor mkdir build (cd build && cmake -DCMAKE_TOOLCHAIN_FILE=/tmp/mingw.cmake \ @@ -32,8 +32,8 @@ make -j"$(nproc)" -C build sudo make -C build install cd .. -# Build and install OpenSSL 3.0.11. -git clone --branch openssl-3.0.12 \ +# Build and install OpenSSL 3.0.15. +git clone --branch openssl-3.0.15 \ --depth=1 https://github.com/openssl/openssl cd openssl ./Configure mingw --prefix=/fakeroot --openssldir=/fakeroot/openssl \ @@ -43,7 +43,7 @@ sudo make install_sw cd .. # Build and install zlib. -git clone --depth=1 https://github.com/madler/zlib -b v1.3 +git clone --depth=1 https://github.com/madler/zlib -b v1.3.1 cd zlib make -fwin32/Makefile.gcc PREFIX=i686-w64-mingw32- sudo make -fwin32/Makefile.gcc PREFIX=i686-w64-mingw32- DESTDIR=/fakeroot \ diff --git a/contrib/libfido2/.actions/build-osx-clang b/contrib/libfido2/.actions/build-osx-clang index b4beea221315..552e99f83e58 100755 --- a/contrib/libfido2/.actions/build-osx-clang +++ b/contrib/libfido2/.actions/build-osx-clang @@ -5,7 +5,8 @@ # license that can be found in the LICENSE file. # SPDX-License-Identifier: BSD-2-Clause -export PKG_CONFIG_PATH="$(brew --prefix openssl@3.0)/lib/pkgconfig" +PKG_CONFIG_PATH="$(brew --prefix openssl@3.0)/lib/pkgconfig" +export PKG_CONFIG_PATH SCAN="$(brew --prefix llvm)/bin/scan-build" # Build, analyze, and install libfido2. diff --git a/contrib/libfido2/.actions/fuzz-linux b/contrib/libfido2/.actions/fuzz-linux index 3f57ac40ff4b..e404c8e7b4c6 100755 --- a/contrib/libfido2/.actions/fuzz-linux +++ b/contrib/libfido2/.actions/fuzz-linux @@ -1,18 +1,18 @@ #!/bin/sh -eux -# Copyright (c) 2020-2022 Yubico AB. All rights reserved. +# Copyright (c) 2020-2024 Yubico AB. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # SPDX-License-Identifier: BSD-2-Clause LIBCBOR_URL="https://github.com/pjk/libcbor" -LIBCBOR_TAG="v0.10.2" +LIBCBOR_TAG="v0.12.0" LIBCBOR_ASAN="address alignment bounds" LIBCBOR_MSAN="memory" OPENSSL_URL="https://github.com/openssl/openssl" -OPENSSL_TAG="openssl-3.0.12" +OPENSSL_TAG="openssl-3.0.15" ZLIB_URL="https://github.com/madler/zlib" -ZLIB_TAG="v1.3" +ZLIB_TAG="v1.3.1" ZLIB_ASAN="address alignment bounds undefined" ZLIB_MSAN="memory" FIDO2_ASAN="address bounds fuzzer-no-link implicit-conversion leak" @@ -63,6 +63,7 @@ git clone --depth=1 "${OPENSSL_URL}" -b "${OPENSSL_TAG}" cd openssl ./Configure linux-x86_64-clang "enable-$1" --prefix="${FAKEROOT}" \ --openssldir="${FAKEROOT}/openssl" --libdir=lib +make -j"$(nproc)" build_sw make install_sw cd - @@ -71,7 +72,7 @@ git clone --depth=1 "${ZLIB_URL}" -b "${ZLIB_TAG}" cd zlib CFLAGS="${ZLIB_CFLAGS}" LDFLAGS="${ZLIB_CFLAGS}" ./configure \ --prefix="${FAKEROOT}" -make install +make -j"$(nproc)" install cd - # libfido2 @@ -87,7 +88,7 @@ mkdir corpus curl -s https://storage.googleapis.com/yubico-libfido2/corpus.tgz | tar -C corpus -zxf - export UBSAN_OPTIONS ASAN_OPTIONS MSAN_OPTIONS -for f in assert bio cred credman hid largeblob mgmt netlink pcsc; do +for f in assert attobj bio cred credman hid largeblob mgmt netlink pcsc; do build/fuzz/fuzz_${f} -use_value_profile=1 -reload=30 -print_pcs=1 \ -print_funcs=30 -timeout=10 -runs=1 corpus/fuzz_${f} done diff --git a/contrib/libfido2/.actions/run-shellcheck b/contrib/libfido2/.actions/run-shellcheck new file mode 100755 index 000000000000..063a5e0d1f1a --- /dev/null +++ b/contrib/libfido2/.actions/run-shellcheck @@ -0,0 +1,25 @@ +#!/bin/sh -u + +# Copyright (c) 2024 Google LLC. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. +# SPDX-License-Identifier: BSD-2-Clause + +LIST="$(mktemp)" +trap 'rm -- $LIST' EXIT + +git ls-files | while read -r file; do + if head -n1 "$file" | grep -q '^#!.*sh'; then + if ! shellcheck -Cnever --norc "$file"; then + echo "$file" >> "$LIST" + fi + fi +done + +[ -s "$LIST" ] && { + echo "The following files contain errors:" + cat "$LIST" + exit 1 +} 1>&2 + +exit 0 diff --git a/contrib/libfido2/.github/workflows/alpine_builds.yml b/contrib/libfido2/.github/workflows/alpine_builds.yml index c6d826f39835..874f7104539f 100644 --- a/contrib/libfido2/.github/workflows/alpine_builds.yml +++ b/contrib/libfido2/.github/workflows/alpine_builds.yml @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2023 Yubico AB. All rights reserved. +# Copyright (c) 2022-2024 Yubico AB. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # SPDX-License-Identifier: BSD-2-Clause @@ -16,7 +16,7 @@ on: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 container: alpine:latest strategy: fail-fast: false diff --git a/contrib/libfido2/.github/workflows/bsd_builds.yml b/contrib/libfido2/.github/workflows/bsd_builds.yml index 366ea2141aca..a4dcf0073251 100644 --- a/contrib/libfido2/.github/workflows/bsd_builds.yml +++ b/contrib/libfido2/.github/workflows/bsd_builds.yml @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Yubico AB. All rights reserved. +# Copyright (c) 2022-2024 Yubico AB. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # SPDX-License-Identifier: BSD-2-Clause @@ -14,11 +14,13 @@ on: jobs: build: if: github.repository == 'Yubico/libfido2' - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: - image: [freebsd/13.x, openbsd/7.2] + include: + - { image: freebsd/14.x } + - { image: openbsd/7.6, llvm_version: 16 } steps: - uses: actions/checkout@v4 - name: dependencies @@ -27,6 +29,7 @@ jobs: sudo apt install -q -y curl jq - name: build env: + LLVM_VERSION: ${{ matrix.llvm_version }} IMAGE: ${{ matrix.image }} SOURCEHUT_TOKEN: ${{ secrets.SOURCEHUT_TOKEN }} run: ./.actions/build-bsd diff --git a/contrib/libfido2/.github/workflows/cifuzz_oss.yml b/contrib/libfido2/.github/workflows/cifuzz_oss.yml index 556d5ad36f7c..7d621c644786 100644 --- a/contrib/libfido2/.github/workflows/cifuzz_oss.yml +++ b/contrib/libfido2/.github/workflows/cifuzz_oss.yml @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Yubico AB. All rights reserved. +# Copyright (c) 2022-2024 Yubico AB. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # SPDX-License-Identifier: BSD-2-Clause @@ -17,7 +17,7 @@ on: jobs: fuzzing: if: github.repository == 'Yubico/libfido2' - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: @@ -39,7 +39,7 @@ jobs: fuzz-seconds: 600 dry-run: false - name: upload crash - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: failure() with: name: ${{ matrix.sanitizer }}-artifacts diff --git a/contrib/libfido2/.github/workflows/codeql-analysis.yml b/contrib/libfido2/.github/workflows/codeql-analysis.yml index a3a8d54d2daa..486dd900e5bc 100644 --- a/contrib/libfido2/.github/workflows/codeql-analysis.yml +++ b/contrib/libfido2/.github/workflows/codeql-analysis.yml @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Yubico AB. All rights reserved. +# Copyright (c) 2022-2024 Yubico AB. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # SPDX-License-Identifier: BSD-2-Clause @@ -22,14 +22,14 @@ permissions: jobs: codeql-build: if: github.repository == 'Yubico/libfido2' - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: checkout uses: actions/checkout@v4 with: fetch-depth: 2 - name: init codeql - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 - name: build env: CC: gcc @@ -39,4 +39,4 @@ jobs: libpcsclite-dev ./.actions/build-linux-gcc - name: perform codeql analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 diff --git a/contrib/libfido2/.github/workflows/linux_builds.yml b/contrib/libfido2/.github/workflows/linux_builds.yml index ec911cb92d92..a1e007daf404 100644 --- a/contrib/libfido2/.github/workflows/linux_builds.yml +++ b/contrib/libfido2/.github/workflows/linux_builds.yml @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Yubico AB. All rights reserved. +# Copyright (c) 2022-2024 Yubico AB. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # SPDX-License-Identifier: BSD-2-Clause @@ -21,17 +21,16 @@ jobs: fail-fast: false matrix: include: - - { os: ubuntu-20.04, cc: gcc-8 } - - { os: ubuntu-22.04, cc: gcc-9 } - { os: ubuntu-22.04, cc: gcc-10 } - { os: ubuntu-22.04, cc: gcc-11 } - - { os: ubuntu-22.04, cc: gcc-12 } - - { os: ubuntu-22.04, cc: clang-13 } - - { os: ubuntu-22.04, cc: clang-14 } - - { os: ubuntu-22.04, cc: clang-15 } + - { os: ubuntu-24.04, cc: gcc-12 } + - { os: ubuntu-24.04, cc: gcc-13 } - { os: ubuntu-22.04, cc: clang-16 } - - { os: ubuntu-20.04, cc: i686-w64-mingw32-gcc-9 } + - { os: ubuntu-22.04, cc: clang-17 } + - { os: ubuntu-24.04, cc: clang-18 } + - { os: ubuntu-24.04, cc: clang-19 } - { os: ubuntu-22.04, cc: i686-w64-mingw32-gcc-10 } + - { os: ubuntu-24.04, cc: i686-w64-mingw32-gcc-11 } steps: - uses: actions/checkout@v4 - name: dependencies diff --git a/contrib/libfido2/.github/workflows/linux_fuzz.yml b/contrib/libfido2/.github/workflows/linux_fuzz.yml index 296c0d9fab23..ea2d3833dca2 100644 --- a/contrib/libfido2/.github/workflows/linux_fuzz.yml +++ b/contrib/libfido2/.github/workflows/linux_fuzz.yml @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Yubico AB. All rights reserved. +# Copyright (c) 2022-2024 Yubico AB. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # SPDX-License-Identifier: BSD-2-Clause @@ -20,8 +20,8 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-22.04 ] - cc: [ clang-16 ] + os: [ ubuntu-24.04 ] + cc: [ clang-19 ] sanitizer: [ asan, msan ] steps: - uses: actions/checkout@v4 diff --git a/contrib/libfido2/.github/workflows/macos_builds.yml b/contrib/libfido2/.github/workflows/macos_builds.yml index 7d84a750ac37..90466550ee69 100644 --- a/contrib/libfido2/.github/workflows/macos_builds.yml +++ b/contrib/libfido2/.github/workflows/macos_builds.yml @@ -20,11 +20,13 @@ jobs: strategy: fail-fast: false matrix: - os: [ macos-13, macos-12 ] + os: [ macos-15, macos-14, macos-13 ] cc: [ clang ] steps: - uses: actions/checkout@v4 - name: dependencies + env: + HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 run: brew install libcbor llvm mandoc openssl@3.0 pkg-config zlib - name: build env: diff --git a/contrib/libfido2/.github/workflows/openssl3.yml b/contrib/libfido2/.github/workflows/openssl3.yml index ee70c087d285..b51685dff102 100644 --- a/contrib/libfido2/.github/workflows/openssl3.yml +++ b/contrib/libfido2/.github/workflows/openssl3.yml @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Yubico AB. All rights reserved. +# Copyright (c) 2022-2024 Yubico AB. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # SPDX-License-Identifier: BSD-2-Clause @@ -21,12 +21,12 @@ jobs: fail-fast: false matrix: include: - - os: ubuntu-22.04 - cc: gcc-11 - - os: ubuntu-22.04 - cc: clang-16 - - os: ubuntu-22.04 - cc: i686-w64-mingw32-gcc-10 + - os: ubuntu-24.04 + cc: gcc-13 + - os: ubuntu-24.04 + cc: clang-19 + - os: ubuntu-24.04 + cc: i686-w64-mingw32-gcc-11 steps: - uses: actions/checkout@v4 - name: dependencies diff --git a/contrib/libfido2/.github/workflows/shellcheck.yml b/contrib/libfido2/.github/workflows/shellcheck.yml new file mode 100644 index 000000000000..cdda760ae2b6 --- /dev/null +++ b/contrib/libfido2/.github/workflows/shellcheck.yml @@ -0,0 +1,27 @@ +# Copyright (c) 2024 Google LLC. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. +# SPDX-License-Identifier: BSD-2-Clause + +name: shellcheck + +on: + pull_request: + branches: + - main + push: + branches: + - main + - '*-ci' + +jobs: + build: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - name: dependencies + run: | + sudo apt -q update + sudo apt install -q -y shellcheck + - name: build + run: ./.actions/run-shellcheck diff --git a/contrib/libfido2/CMakeLists.txt b/contrib/libfido2/CMakeLists.txt index c4f7b1b7b51e..2630e263ecd2 100644 --- a/contrib/libfido2/CMakeLists.txt +++ b/contrib/libfido2/CMakeLists.txt @@ -28,8 +28,10 @@ endif() set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_COLOR_MAKEFILE OFF) set(CMAKE_VERBOSE_MAKEFILE ON) +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + set(FIDO_MAJOR "1") -set(FIDO_MINOR "14") +set(FIDO_MINOR "16") set(FIDO_PATCH "0") set(FIDO_VERSION ${FIDO_MAJOR}.${FIDO_MINOR}.${FIDO_PATCH}) @@ -190,6 +192,9 @@ if(MSVC) if(NOT CRYPTO_LIBRARIES) set(CRYPTO_LIBRARIES crypto) endif() + if(NOT CRYPTO_DLL) + set(CRYPTO_DLL crypto) + endif() set(MSVC_DISABLED_WARNINGS_LIST "C4152" # nonstandard extension used: function/data pointer @@ -435,6 +440,9 @@ message(STATUS "CRYPTO_LIBRARY_DIRS: ${CRYPTO_LIBRARY_DIRS}") if(BUILD_TESTS) message(STATUS "CRYPTO_BIN_DIRS: ${CRYPTO_BIN_DIRS}") endif() +if(MSVC) + message(STATUS "CRYPTO_DLL: ${CRYPTO_DLL}") +endif() message(STATUS "CRYPTO_VERSION: ${CRYPTO_VERSION}") message(STATUS "FIDO_VERSION: ${FIDO_VERSION}") message(STATUS "FUZZ: ${FUZZ}") @@ -484,7 +492,7 @@ endif() if(BUILD_TOOLS) add_subdirectory(tools) endif() -if(BUILD_MANPAGES) +if(BUILD_MANPAGES AND NOT MSVC) add_subdirectory(man) endif() diff --git a/contrib/libfido2/LICENSE b/contrib/libfido2/LICENSE index ad0e13358930..bfafcbe13129 100644 --- a/contrib/libfido2/LICENSE +++ b/contrib/libfido2/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2018-2023 Yubico AB. All rights reserved. +Copyright (c) 2018-2024 Yubico AB. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are diff --git a/contrib/libfido2/NEWS b/contrib/libfido2/NEWS index 58387ffd72bf..9f7c1563ba87 100644 --- a/contrib/libfido2/NEWS +++ b/contrib/libfido2/NEWS @@ -1,12 +1,34 @@ +* Version 1.16.0 (2025-05-06) + ** Added support for enterprise attestation. + ** Improved handling of invalid key handles in U2F key lookup; gh#819. + ** Fixed issue where storing small CTAP 2.1 largeBlobs failed; gh#826. + ** Fixed APDU chaining issues for certain authenticators; gh#818, gh#855. + ** Improved documentation and examples. + ** New API calls: + - fido_cred_entattest; + - fido_cred_set_entattest. + +* Version 1.15.0 (2024-06-13) + ** 1.15.0 will be the last release to support OpenSSL 1.1. + ** bio, credman: improved CTAP 2.1 support. + ** hid_osx: fix issue where fido_hid_read() may block unnecessarily; gh#757. + ** fido2-token -I: print maxcredbloblen. + ** hid_linux: improved support for uhid devices. + ** New API calls: + - fido_cred_set_attobj; + - fido_cred_x5c_list_count; + - fido_cred_x5c_list_len; + - fido_cred_x5c_list_ptr. + * Version 1.14.0 (2023-11-13) ** fido2-cred -M, fido2-token -G: support raw client data via -w flag. ** winhello: support U2F AppID extension for assertions. ** winhello: fix restrictive parsing of the hmac-secret on assertions. ** winhello: translate NTE_USER_CANCELLED to FIDO_ERR_OPERATION_DENIED; gh#685. ** New API calls: - ** fido_assert_authdata_raw_len; - ** fido_assert_authdata_raw_ptr; - ** fido_assert_set_winhello_appid. + - fido_assert_authdata_raw_len; + - fido_assert_authdata_raw_ptr; + - fido_assert_set_winhello_appid. * Version 1.13.0 (2023-02-20) ** Support for linking against OpenSSL on Windows; gh#668. diff --git a/contrib/libfido2/README.adoc b/contrib/libfido2/README.adoc index fb6f3d3eb004..38e882598ab3 100644 --- a/contrib/libfido2/README.adoc +++ b/contrib/libfido2/README.adoc @@ -38,7 +38,7 @@ is also available. === Releases -The current release of *libfido2* is 1.14.0. Signed release tarballs are +The current release of *libfido2* is 1.16.0. Signed release tarballs are available at Yubico's https://developers.yubico.com/libfido2/Releases[release page]. @@ -52,11 +52,11 @@ required. === Installation -==== Fedora 35 and 34 +==== Fedora 34 and later $ sudo dnf install libfido2 libfido2-devel fido2-tools -==== Ubuntu 22.04 (Jammy) and 20.04 (Focal) +==== Ubuntu 20.04 (Focal) and later $ sudo apt install libfido2-1 libfido2-dev libfido2-doc fido2-tools diff --git a/contrib/libfido2/SECURITY.md b/contrib/libfido2/SECURITY.md index e12a48a847ba..8071bc9a460a 100644 --- a/contrib/libfido2/SECURITY.md +++ b/contrib/libfido2/SECURITY.md @@ -2,4 +2,4 @@ To report security issues in libfido2, please contact security@yubico.com. A PGP public key can be found at -https://www.yubico.com/support/security-advisories/issue-rating-system/. +https://www.yubico.com/support/issue-rating-system/. diff --git a/contrib/libfido2/examples/README.adoc b/contrib/libfido2/examples/README.adoc index 6151b70bd91e..1249366f3e0f 100644 --- a/contrib/libfido2/examples/README.adoc +++ b/contrib/libfido2/examples/README.adoc @@ -64,7 +64,8 @@ The following examples are provided: The -T option may be used to enforce a timeout of . If the option -b is specified, the credential's "largeBlob" key is stored in . If the option -c is specified the the generated credential - will be bound by the specified protection policy. + will be bound by the specified protection policy. If the option -a is + specified, enterprise attestation will be requested. - assert [-t es256|es384|rs256|eddsa] [-a cred_id] [-h hmac_secret] [-P pin] [-s hmac_salt] [-T seconds] [-b blobkey] [-puv] diff --git a/contrib/libfido2/examples/cred.c b/contrib/libfido2/examples/cred.c index 5a2a27fd7771..4fb07868b4e7 100644 --- a/contrib/libfido2/examples/cred.c +++ b/contrib/libfido2/examples/cred.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2023 Yubico AB. All rights reserved. + * Copyright (c) 2018-2024 Yubico AB. All rights reserved. * Use of this source code is governed by a BSD-style * license that can be found in the LICENSE file. * SPDX-License-Identifier: BSD-2-Clause @@ -36,7 +36,8 @@ static void usage(void) { fprintf(stderr, "usage: cred [-t es256|es384|rs256|eddsa] [-k pubkey] " - "[-ei cred_id] [-P pin] [-T seconds] [-b blobkey] [-c cred_protect] [-hruv] " + "[-ei cred_id] [-P pin] [-T seconds] [-b blobkey] [-c cred_protect] " + "[-a mode] [-hruv] " "\n"); exit(EXIT_FAILURE); } @@ -106,9 +107,13 @@ verify_cred(int type, const char *fmt, const unsigned char *authdata_ptr, if (r != FIDO_OK) errx(1, "fido_cred_set_attstmt: %s (0x%x)", fido_strerr(r), r); - r = fido_cred_verify(cred); - if (r != FIDO_OK) - errx(1, "fido_cred_verify: %s (0x%x)", fido_strerr(r), r); + if (fido_cred_x5c_ptr(cred) == NULL) { + if ((r = fido_cred_verify_self(cred)) != FIDO_OK) + errx(1, "fido_cred_verify_self: %s (0x%x)", fido_strerr(r), r); + } else { + if ((r = fido_cred_verify(cred)) != FIDO_OK) + errx(1, "fido_cred_verify: %s (0x%x)", fido_strerr(r), r); + } out: if (key_out != NULL) { @@ -166,11 +171,12 @@ main(int argc, char **argv) int ch; int r; long long cred_protect = 0; + long long ea = 0; if ((cred = fido_cred_new()) == NULL) errx(1, "fido_cred_new"); - while ((ch = getopt(argc, argv, "P:T:b:e:hi:k:rt:uvc:")) != -1) { + while ((ch = getopt(argc, argv, "P:T:a:b:e:hi:k:rt:uvc:")) != -1) { switch (ch) { case 'P': pin = optarg; @@ -182,6 +188,12 @@ main(int argc, char **argv) errx(1, "-T: %s must be in (0,30]", optarg); ms *= 1000; /* seconds to milliseconds */ break; + case 'a': + if (base10(optarg, &ea) < 0) + errx(1, "base10: %s", optarg); + if (ea <= 0 || ea > 2) + errx(1, "-a: %s must be in (0,2]", optarg); + break; case 'b': ext |= FIDO_EXT_LARGEBLOB_KEY; blobkey_out = optarg; @@ -203,7 +215,7 @@ main(int argc, char **argv) if (base10(optarg, &cred_protect) < 0) errx(1, "base10: %s", optarg); if (cred_protect <= 0 || cred_protect > 3) - errx(1, "-c: %s must be in (1,3)", optarg); + errx(1, "-c: %s must be in (0,3]", optarg); ext |= FIDO_EXT_CRED_PROTECT; break; case 'i': @@ -293,6 +305,9 @@ main(int argc, char **argv) if (cred_protect != 0 && (r = fido_cred_set_prot(cred, (int)cred_protect)) != FIDO_OK) errx(1, "fido_cred_set_prot: %s (0x%x)", fido_strerr(r), r); + + if (ea != 0 && (r = fido_cred_set_entattest(cred, (int)ea)) != FIDO_OK) + errx(1, "fido_cred_set_entattest: %s (0x%x)", fido_strerr(r), r); /* timeout */ if (ms != 0 && (r = fido_dev_set_timeout(dev, (int)ms)) != FIDO_OK) diff --git a/contrib/libfido2/fuzz/CMakeLists.txt b/contrib/libfido2/fuzz/CMakeLists.txt index cc30baae88f2..0bf4bfbf05a5 100644 --- a/contrib/libfido2/fuzz/CMakeLists.txt +++ b/contrib/libfido2/fuzz/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2023 Yubico AB. All rights reserved. +# Copyright (c) 2019-2024 Yubico AB. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # SPDX-License-Identifier: BSD-2-Clause @@ -18,6 +18,10 @@ set(FUZZ_LINKER_LANGUAGE "C" CACHE STRING "Linker language for fuzz harnesses") mark_as_advanced(FUZZ_LINKER_LANGUAGE) enable_language(${FUZZ_LINKER_LANGUAGE}) +if(NOT FUZZ_LDFLAGS) + message(FATAL_ERROR "Please define FUZZ_LDFLAGS") +endif() + # fuzz_cred add_executable(fuzz_cred fuzz_cred.c ${COMMON_SOURCES} ${COMPAT_SOURCES}) set_target_properties(fuzz_cred PROPERTIES @@ -80,3 +84,10 @@ set_target_properties(fuzz_pcsc PROPERTIES LINK_FLAGS ${FUZZ_LDFLAGS} LINKER_LANGUAGE ${FUZZ_LINKER_LANGUAGE}) target_link_libraries(fuzz_pcsc fido2_shared) + +# fuzz_attobj +add_executable(fuzz_attobj fuzz_attobj.c ${COMMON_SOURCES} ${COMPAT_SOURCES}) +set_target_properties(fuzz_attobj PROPERTIES + LINK_FLAGS ${FUZZ_LDFLAGS} + LINKER_LANGUAGE ${FUZZ_LINKER_LANGUAGE}) +target_link_libraries(fuzz_attobj fido2_shared) diff --git a/contrib/libfido2/fuzz/Dockerfile b/contrib/libfido2/fuzz/Dockerfile index 7b26e6ec3b19..1ab14c33da75 100644 --- a/contrib/libfido2/fuzz/Dockerfile +++ b/contrib/libfido2/fuzz/Dockerfile @@ -10,7 +10,7 @@ RUN apk -q update RUN apk add build-base clang clang-analyzer cmake compiler-rt coreutils RUN apk add eudev-dev git linux-headers llvm openssl-dev pcsc-lite-dev RUN apk add sudo tar zlib-dev -RUN git clone --branch v0.10.2 --depth=1 https://github.com/PJK/libcbor +RUN git clone --branch v0.12.0 --depth=1 https://github.com/PJK/libcbor RUN git clone --depth=1 https://github.com/yubico/libfido2 WORKDIR /libfido2 RUN ./fuzz/build-coverage /libcbor /libfido2 diff --git a/contrib/libfido2/fuzz/Makefile b/contrib/libfido2/fuzz/Makefile index 55a506bc8312..a7ac24c0da58 100644 --- a/contrib/libfido2/fuzz/Makefile +++ b/contrib/libfido2/fuzz/Makefile @@ -3,12 +3,12 @@ # license that can be found in the LICENSE file. # SPDX-License-Identifier: BSD-2-Clause -IMAGE := libfido2-coverage:1.14.0 +IMAGE := libfido2-coverage:1.16.0 RUNNER := libfido2-runner PROFDATA := llvm-profdata COV := llvm-cov -TARGETS := fuzz_assert fuzz_bio fuzz_cred fuzz_credman fuzz_hid \ - fuzz_largeblob fuzz_netlink fuzz_mgmt fuzz_pcsc +TARGETS := fuzz_assert fuzz_attobj fuzz_bio fuzz_cred fuzz_credman \ + fuzz_hid fuzz_largeblob fuzz_netlink fuzz_mgmt fuzz_pcsc CORPORA := $(foreach f,${TARGETS},${f}/corpus) MINIFY := $(foreach f,${TARGETS},/minify/${f}/corpus) REMOTE := gs://libfido2-corpus.clusterfuzz-external.appspot.com diff --git a/contrib/libfido2/fuzz/export.gnu b/contrib/libfido2/fuzz/export.gnu index bc25dd66cba7..62dfda926944 100644 --- a/contrib/libfido2/fuzz/export.gnu +++ b/contrib/libfido2/fuzz/export.gnu @@ -127,6 +127,7 @@ fido_cred_clientdata_hash_len; fido_cred_clientdata_hash_ptr; fido_cred_display_name; + fido_cred_entattest; fido_cred_exclude; fido_cred_flags; fido_cred_largeblob_key_len; @@ -166,11 +167,13 @@ fido_cred_rp_id; fido_cred_rp_name; fido_cred_set_attstmt; + fido_cred_set_attobj; fido_cred_set_authdata; fido_cred_set_authdata_raw; fido_cred_set_blob; fido_cred_set_clientdata; fido_cred_set_clientdata_hash; + fido_cred_set_entattest; fido_cred_set_extensions; fido_cred_set_fmt; fido_cred_set_id; @@ -193,6 +196,9 @@ fido_cred_verify; fido_cred_verify_self; fido_cred_x5c_len; + fido_cred_x5c_list_count; + fido_cred_x5c_list_len; + fido_cred_x5c_list_ptr; fido_cred_x5c_ptr; fido_dev_build; fido_dev_cancel; diff --git a/contrib/libfido2/fuzz/functions.txt b/contrib/libfido2/fuzz/functions.txt index 4ad5a0c83f5c..5dab11c62d50 100644 --- a/contrib/libfido2/fuzz/functions.txt +++ b/contrib/libfido2/fuzz/functions.txt @@ -1,31 +1,31 @@ File '/libfido2/src/aes256.c': Name Regions Miss Cover Lines Miss Cover --------------------------------------------------------------------------------------------------------- +------------------------------------------------------------------------------ aes256_cbc_enc 4 0 100.00% 4 0 100.00% aes256_cbc_dec 4 0 100.00% 4 0 100.00% aes256_gcm_enc 1 0 100.00% 3 0 100.00% aes256_gcm_dec 1 0 100.00% 3 0 100.00% -aes256.c:aes256_cbc_fips 26 1 96.15% 42 4 90.48% -aes256.c:aes256_cbc 29 1 96.55% 36 3 91.67% +aes256.c:aes256_cbc_fips 29 1 96.55% 42 4 90.48% +aes256.c:aes256_cbc 37 1 97.30% 36 3 91.67% aes256.c:aes256_cbc_proto1 1 0 100.00% 5 0 100.00% -aes256.c:aes256_gcm 52 1 98.08% 60 4 93.33% --------------------------------------------------------------------------------------------------------- -TOTAL 118 3 97.46% 157 11 92.99% +aes256.c:aes256_gcm 73 3 95.89% 64 10 84.38% +------------------------------------------------------------------------------ +TOTAL 150 5 96.67% 161 17 89.44% File '/libfido2/src/assert.c': Name Regions Miss Cover Lines Miss Cover ------------------------------------------------------------------------------------------------------------------ -fido_dev_get_assert 40 0 100.00% 35 0 100.00% +--------------------------------------------------------------------------------------- +fido_dev_get_assert 50 0 100.00% 35 0 100.00% fido_check_flags 13 0 100.00% 15 0 100.00% -fido_get_signed_hash 20 1 95.00% 34 3 91.18% -fido_assert_verify 50 4 92.00% 70 7 90.00% +fido_get_signed_hash 27 1 96.30% 34 3 91.18% +fido_assert_verify 59 4 93.22% 70 7 90.00% fido_assert_set_clientdata 12 12 0.00% 11 11 0.00% fido_assert_set_clientdata_hash 8 0 100.00% 6 0 100.00% fido_assert_set_hmac_salt 10 0 100.00% 6 0 100.00% fido_assert_set_hmac_secret 12 12 0.00% 7 7 0.00% -fido_assert_set_rp 12 0 100.00% 11 0 100.00% +fido_assert_set_rp 16 0 100.00% 11 0 100.00% fido_assert_set_winhello_appid 2 2 0.00% 5 5 0.00% -fido_assert_allow_cred 13 2 84.62% 22 3 86.36% +fido_assert_allow_cred 16 2 87.50% 22 3 86.36% fido_assert_empty_allow_list 2 0 100.00% 5 0 100.00% fido_assert_set_extensions 14 0 100.00% 10 0 100.00% fido_assert_set_options 8 8 0.00% 5 5 0.00% @@ -34,71 +34,71 @@ fido_assert_set_uv 2 0 100.00% 4 0 fido_assert_clientdata_hash_ptr 1 0 100.00% 3 0 100.00% fido_assert_clientdata_hash_len 1 0 100.00% 3 0 100.00% *** 6320 LINES SKIPPED *** From nobody Wed Apr 22 16:01:38 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g13r81rSxz6ZpH2 for ; Wed, 22 Apr 2026 16: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g13r75zMyz3tRS for ; Wed, 22 Apr 2026 16: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=1776873703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BpQw3iJf2zUvqu7j9HDGbBdFQS9/2AVwhZWNy99QYNg=; b=SYuiqR/M7hhG8uzQdDTnmH91VODph6lJlxmF+7ulC5e+qiCIvkVY6Tb694ecDmwO70IYhI CQipFCXPIeZ3sSCbEbVH0azF0D2FkNqRze1XZkovb1DHnlx+KEiKFaHQmH6c7D76qD/nIa ZHjvkO7sH30EmLCYpA9uCwrj3oEagR1dekv+7J1XQDmvm2AfIod+TAboU8MQgcqD/887zX gMyOCcNGqqV0C53hOEUMIhYFbuWjegIIC+7C96Nzepu5a+hvhw+iu5/CVVaQnYRrg1GZbk 3917JALTFV1si7agaZADhAGCn1IxJIk0/HDEDEVoInIDFofm9OBmd2Db/1HMjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776873703; a=rsa-sha256; cv=none; b=XTejmVNVogyfFglJbbI5Muf1DGVt9nsHE3yGs6clsU/X1B97liafvuIhHI2pFNUIoJ4axM MhrZPHhOYde7lUac8PM5rA96tgxXz+2wA/QleFTk3uVS1j/hBZV3VQQvmp+DAfbU/0JtXZ VpljWtgePfk8lRoRM/diHcYSt6X+aZpZPBre7mIr0k6QP3jVWSjDq3wLhWBlNwY/ZUrSuQ Y4/SxW5A8IU044iENlVFquEx25Ig61RU4y06mRVUMgJOBrBlQkT2GdxXwsPfcyQNVpIAAB 3w4eIDrsQCO5Z/8jouMkxrvukhovY1hKUK4uOaguSJGIqz5VMD+sVW48d8NMVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776873703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BpQw3iJf2zUvqu7j9HDGbBdFQS9/2AVwhZWNy99QYNg=; b=hmpKl9VtWOuZJ8EdC8xUpPr5OG7iDfHlU1vmRDVW/5fXfNJXNW4zqfVbc7mLHWJAZ2fWYB mqc6irC+cI9x+sSQMRoYs/zeKFJblEy1PTpL5HAcEWr+T6Nmz2UVWnfUYyGfDGZMKC7753 135MifLjTDqIZsIEZtGOvLtqoT6xjurrSJXsWEl/j4XXCX5kPzsuu23r3VAoIA9N6j0POn O48w94nb5WAJM0ER/1uPxJ/qe681cTemsYW1oSwBOVB9ZllYhhcR96pqaqKH1JhjZVa80T Q870FOjy+9y3Zt5LtD16eKZSvjrlVWKApKx3NJS7+wCSp9tOz/LlkKvYPQsbfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g13r75ZHhzdYf for ; Wed, 22 Apr 2026 16:01:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34a71 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 16:01:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Gleb Smirnoff From: Zhenlei Huang Subject: git: 588bb16e7bb8 - stable/15 - jail: fix crash with startup commands on a jail without name List-Id: Commits to the stable branches 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: 588bb16e7bb842a1ad551c7814eb96978245995a Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 16:01:38 +0000 Message-Id: <69e8f0e2.34a71.34fc6e8b@gitrepo.freebsd.org> The branch stable/15 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=588bb16e7bb842a1ad551c7814eb96978245995a commit 588bb16e7bb842a1ad551c7814eb96978245995a Author: Gleb Smirnoff AuthorDate: 2026-03-13 20:21:26 +0000 Commit: Zhenlei Huang CommitDate: 2026-04-22 15:59:32 +0000 jail: fix crash with startup commands on a jail without name Jail name is optional, thus don't try setenv(NULL). Fixes: d8f021add40c321c4578da55dae52fb93c7ccb5f (cherry picked from commit 78c4f821f43d530ba1f2a6308a64a8483208ebe3) --- usr.sbin/jail/command.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/jail/command.c b/usr.sbin/jail/command.c index 9da4fe51673a..8a1d281eff4f 100644 --- a/usr.sbin/jail/command.c +++ b/usr.sbin/jail/command.c @@ -814,8 +814,8 @@ run_command(struct cfjail *j) if (!injail) { if (string_param(j->intparams[KP_JID])) setenv("JID", string_param(j->intparams[KP_JID]), 1); - setenv("JNAME", string_param(j->intparams[KP_NAME]), 1); - + if (string_param(j->intparams[KP_NAME])) + setenv("JNAME", string_param(j->intparams[KP_NAME]), 1); path = string_param(j->intparams[KP_PATH]); setenv("JPATH", path ? path : "", 1); } From nobody Wed Apr 22 16:48:53 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g14tY3yZyz6Zv1K for ; Wed, 22 Apr 2026 16:48:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g14tY22Rtz40Pq for ; Wed, 22 Apr 2026 16:48:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776876533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4e10dUz4ELBwVjdaQN5W0WCtY8CwA2U0XdLH1JFeprI=; b=titIh9fK+EhJO6qJwBQ34G3ro3aHjaQfIcU9XtvkiP1t/El2UTChn/DDKmN3VsUBGAaOzA Vipu+NsqZOSarwH9NgM48DySYiCjb73sFtmCDkzasebgxbwmTRtLALxTrDd+wcrHwy0Y7D euHAa2FeH2v2r8UdeNFx9XKeQUAmciDpWUWcUCso4vpz3+ber+Ev1tMES0IDFtIQJPeVV3 BmHB8Gu80qJG29YB8sydLdAbufweHAIf3q8sWB+KVoJXWmQt8L8+wTlSAC2jzygURgMoOc 6x7QWdtjgQAm3YVFjyl+IVS1lw6uRXm6Ema3pP7vL1PZ54uRNnJFsIwpOqQQxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776876533; a=rsa-sha256; cv=none; b=LT1XKo5jIFCEX+PPjEFcv0eD6wd2jSYLgdmWBFeDXmbw45ZJxDW4EbtewvZLhu052EnLFq hVqpky069pmJ5uOLL9FMxzdecJ16YjhBK0DVSU5mXpDbGHdMhXGWDMvFdwOYr44zz3kVzY rRfruatOJDYwgIcJTNxmH+xeU81hHG43pXZqXmkkFkVwGb9Q4KVTYnwyMNUmWz7swYx8vP OBarG7/tHE8ncnGBJBWomwuZhTdygWF+Bq/vEKyB531M70xFUIkWO1yLmEd1jj0IPNBTDU zpFSV+KY+MUqHNUsrgLEYvjzri9EJK/LiaZZ0Nq1R75xxSj9Fazsh5Ka9E28jg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776876533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4e10dUz4ELBwVjdaQN5W0WCtY8CwA2U0XdLH1JFeprI=; b=EEY1gXw2qYSdMCNwvZ+llRpcZ9Yh8rZmsG5/k1h838I5m9yiZxR/Zw83LldiPtvdBMCTrL 1xyzt13bu5OoZVJIicCXVZXRHk1p4uJMy/uv0B413XSob6MZ42tZi8xPfsXRIk3TzYiQYe PRSsktZXU70/nZgcZ/2Wu15NKZl4pfUPFnCBf8bDnra9I95sNtQExJSkn+3ENOKjTbrLjG 6izBMH+/vGm9A13ciqo6i+5KU9NHoCUQDbqd2ZsblIb/D66gEcmOgxUotmMgX7J+XOecP8 7NxcuGdNDvFCi+JiZkUeA4dCxxqcpUw3RLA4r2FKwpsY/3zxkt3Qh7eKLEfI4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g14tY0Cy8zfsm for ; Wed, 22 Apr 2026 16:48:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c62a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 16:48:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: YAO, Xin From: Ed Maste Subject: git: a2765dadb340 - stable/15 - linux: add sysfs filetype support for Linux statfs() List-Id: Commits to the stable branches 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: a2765dadb34040d9a7362fe30a92d8e724d1425a Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 16:48:53 +0000 Message-Id: <69e8fbf5.3c62a.39523494@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a2765dadb34040d9a7362fe30a92d8e724d1425a commit a2765dadb34040d9a7362fe30a92d8e724d1425a Author: YAO, Xin AuthorDate: 2026-04-04 14:02:59 +0000 Commit: Ed Maste CommitDate: 2026-04-22 16:48:35 +0000 linux: add sysfs filetype support for Linux statfs() Added MAGIC number below and map to linsysfs in bsd_to_linux_ftype() This maps: - `linsysfs` -> `LINUX_SYSFS_MAGIC` (`0x62656572`) Signed-off-by: YAO, Xin Reviewed by: emaste Pull request: https://github.com/freebsd/freebsd-src/pull/2119 (cherry picked from commit a3c457398f269c913aaa4d9dedcc72a70c02e845) --- sys/compat/linux/linux_stats.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index 03783d466211..6f96a219003b 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -295,26 +295,28 @@ struct l_statfs { #define LINUX_ZFS_SUPER_MAGIC 0x2FC12FC1 #define LINUX_DEVFS_SUPER_MAGIC 0x1373L #define LINUX_SHMFS_MAGIC 0x01021994 +#define LINUX_SYSFS_MAGIC 0x62656572 static long bsd_to_linux_ftype(const char *fstypename) { int i; static struct {const char *bsd_name; long linux_type;} b2l_tbl[] = { - {"ufs", LINUX_UFS_SUPER_MAGIC}, - {"zfs", LINUX_ZFS_SUPER_MAGIC}, - {"cd9660", LINUX_ISOFS_SUPER_MAGIC}, - {"nfs", LINUX_NFS_SUPER_MAGIC}, - {"ext2fs", LINUX_EXT2_SUPER_MAGIC}, - {"procfs", LINUX_PROC_SUPER_MAGIC}, - {"msdosfs", LINUX_MSDOS_SUPER_MAGIC}, - {"ntfs", LINUX_NTFS_SUPER_MAGIC}, - {"nwfs", LINUX_NCP_SUPER_MAGIC}, - {"hpfs", LINUX_HPFS_SUPER_MAGIC}, - {"coda", LINUX_CODA_SUPER_MAGIC}, - {"devfs", LINUX_DEVFS_SUPER_MAGIC}, - {"tmpfs", LINUX_SHMFS_MAGIC}, - {NULL, 0L}}; + {"ufs", LINUX_UFS_SUPER_MAGIC}, + {"zfs", LINUX_ZFS_SUPER_MAGIC}, + {"cd9660", LINUX_ISOFS_SUPER_MAGIC}, + {"nfs", LINUX_NFS_SUPER_MAGIC}, + {"ext2fs", LINUX_EXT2_SUPER_MAGIC}, + {"procfs", LINUX_PROC_SUPER_MAGIC}, + {"msdosfs", LINUX_MSDOS_SUPER_MAGIC}, + {"ntfs", LINUX_NTFS_SUPER_MAGIC}, + {"nwfs", LINUX_NCP_SUPER_MAGIC}, + {"hpfs", LINUX_HPFS_SUPER_MAGIC}, + {"coda", LINUX_CODA_SUPER_MAGIC}, + {"devfs", LINUX_DEVFS_SUPER_MAGIC}, + {"tmpfs", LINUX_SHMFS_MAGIC}, + {"linsysfs", LINUX_SYSFS_MAGIC}, + {NULL, 0L}}; for (i = 0; b2l_tbl[i].bsd_name != NULL; i++) if (strcmp(b2l_tbl[i].bsd_name, fstypename) == 0) From nobody Wed Apr 22 16:48:51 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g14td4ts0z6Zv65 for ; Wed, 22 Apr 2026 16:48:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g14td0pBTz401R for ; Wed, 22 Apr 2026 16:48:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776876537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ViwXKwrHM+fQgO9isngFE8KBaWMkSHKP2PA3cdLNEz0=; b=NPe/fPx+yQ7FhADS5Jhf+rzk0ZDc8cAV3/xTSqZNkoUbMimPJqa0F9ODpxR/tJUTf9RNoB d7IjM2XbhkRK5PuuAna1ZHigTkmnFGvHjM9151mNKsZxUObsb7LjRTuzTZMmqZbe5/RMnh YYGZUPVqF4Kju8BZfPAmS+wyXjJzoqmh5wkToayY7xaegeKspIJFRYcxlrRf9PkHXYJRHJ hDJKA66ewSdyMfXQYVNjGHUARiIgim1a2C0rCEeYBvemlxx8RU07LvUnsc2UC9t5zDojNp SmT3JzoyA3bqJUT1B3wNvBzfqGyeqMeujVtRdAMPbH4SKxXy4txsj+gXkafaCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776876537; a=rsa-sha256; cv=none; b=xRBjew4XO5cA2QEPbdcRYVFj6F7cuwFBJnpc76L7hj2lsUjjSGHAGIZGCYBUgViIf21m7v HpAJiZvKZepMkAiQMPaOgIFhCQE+zol8DglUo+2j+mmlwMNQ7OSp3cZqPwluX2gV9OvfrF Hi/R89lnWr/T3qeh1Q3rNpumPcKhN+2Mw+WHwht7sJ5O7Aw+sfr6UXl7TwsME/VI5oXjPN caMMDPgRoZdw8d4rWH/zZ3oFn3i9t2wfkQqmM9KYOlPc8OVtSuRZauAVKuy3Vh91ii1NXP HK8PuOFJmk72ccSuBnLTD/nQ207UVLQap+sE+O7tmw7n7UvoyByBqSLFymvsuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776876537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ViwXKwrHM+fQgO9isngFE8KBaWMkSHKP2PA3cdLNEz0=; b=Ru32KIFmY0/Vl2FeGNiXV7aX8HIWXod3jE8JgD9L8MmpP8PxTLfMQESZ2IKCIsWaQ6F/zK ljYSHl/Oc9o80TBZkMyHlwCUwao8EPb9xMnwREH3JZX0ZESDEpdy552TVZSmkW7kO1RxiK LhGleV4QodmuzUIk8ABi9CIWa8iBuhyRBQ+jMd2B0gwDlsvmNHVgjWurMmW7UhBcWR0ZW3 X+zHZasYXCYoAu3eJDjxxkA3gSf8Ezm77VcfFPzMYPNrVtMcQshrqTKQbdOQgUgl+UsrYF YKniEQNvfJkNGbAp2Q9PBC1sOn5WnI5NPFU5QVjRZyIrDP1OgC686dJsWht1nw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g14td0PKgzdhB for ; Wed, 22 Apr 2026 16:48:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c88a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 16:48:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Abdelkader Boudih From: Ed Maste Subject: git: 7faa082b0c50 - stable/15 - cam (scsi): silence "Medium not present" SCSI sense logging for removable media List-Id: Commits to the stable branches 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: 7faa082b0c50db575aab3aef3a9c19ff2d2f68e3 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 16:48:51 +0000 Message-Id: <69e8fbf3.3c88a.5d05746@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7faa082b0c50db575aab3aef3a9c19ff2d2f68e3 commit 7faa082b0c50db575aab3aef3a9c19ff2d2f68e3 Author: Abdelkader Boudih AuthorDate: 2026-03-20 15:28:42 +0000 Commit: Ed Maste CommitDate: 2026-04-22 16:48:35 +0000 cam (scsi): silence "Medium not present" SCSI sense logging for removable media Change SS_FATAL to SS_FAIL for SCSI sense code 0x3A (Medium not present) to suppress console spam when card readers or other removable media devices have no media inserted. The error is still returned to callers (ENXIO), but no longer prints to dmesg during boot/probe. Verified with Apple SD Card Reader - reduced boot messages from 4 to 2. Reviewed by: emaste, imp Differential Revision: https://reviews.freebsd.org/D55287 (cherry picked from commit 3d218b6289cf4675abdeef17a4489e71f8e1935e) --- sys/cam/scsi/scsi_all.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/cam/scsi/scsi_all.c b/sys/cam/scsi/scsi_all.c index fd128e69f1f1..b28ec2671d4a 100644 --- a/sys/cam/scsi/scsi_all.c +++ b/sys/cam/scsi/scsi_all.c @@ -2194,13 +2194,13 @@ static struct asc_table_entry asc_table[] = { { SST(0x39, 0x00, SS_RDEF, "Saving parameters not supported") }, /* DTL WROM BK */ - { SST(0x3A, 0x00, SS_FATAL | ENXIO, + { SST(0x3A, 0x00, SS_FAIL | ENXIO, "Medium not present") }, /* DT WROM BK */ - { SST(0x3A, 0x01, SS_FATAL | ENXIO, + { SST(0x3A, 0x01, SS_FAIL | ENXIO, "Medium not present - tray closed") }, /* DT WROM BK */ - { SST(0x3A, 0x02, SS_FATAL | ENXIO, + { SST(0x3A, 0x02, SS_FAIL | ENXIO, "Medium not present - tray open") }, /* DT WROM B */ { SST(0x3A, 0x03, SS_RDEF, /* XXX TBD */ From nobody Wed Apr 22 20:08:02 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g19JL3nGwz6bDb0 for ; Wed, 22 Apr 2026 20:08:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g19JL33zGz3LnG for ; Wed, 22 Apr 2026 20:08:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776888482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+J+CODFJ2OAChR3gkgzYX/HDd1H7Jh++ZHPd6xoxYpE=; b=hlilBltCozoFdsny5Rg/A9Qnb3FLCSvbaZzgI4a5XLYGcUPToCttBKU+aYhJM5OKuj2OIP /4MgydflSnjDlsZoNk4XXG4+67MqYLgzzAuGK6WtOmvRnyhcO1F6zBKgPu0uFVy697Nrx9 EHKT4JaZixKt3TzjKiAibaQlBKbW3bXxqg8l1wm4I40h6HL9DF2F6PC5lcJM6jN3O2ZWcM AEwA8vAvX1Ue88vKO5R87KELblyg1ivL9Yshlevhkag9w1wq9I5+WxlvDDaoIPMDiLTf5n STg42vzBAjx8Z+o+1xs9YLLJbBRbJZT2G6LXSOS2NKd4ZAKFyX4gugooBRin6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776888482; a=rsa-sha256; cv=none; b=SuFmIHK3bbSRropeUoEkcEqg/tqyW91oBn3nxDMGZ4Hkrgr02TXD0Px+vWNyJCT1+jQNF2 tlZSwo0OXEHZseuDe0ZJGm82fo4HhUdycl50uXl5GmKjCZWnlYLbDLmmtcrGob3WUQTPfk OQiheK46A4yAFAm10xXESGLkROn/YYN6pZ5whsz0YqzFrY0tUd8s8DYofFIlDgaHtqVX8i UfJVe7qFZq0XXKiAp2vVfLBmXIfMq7pRVXrqdyfvzoPbtQViwX7wkxnoKtSgO+xkFMdZg4 cDl1aDcKPZ++UiqbzovFXIpIHHUfOHM7pvEaXILQKEEYFXzHAU/+KmlKSebWLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776888482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+J+CODFJ2OAChR3gkgzYX/HDd1H7Jh++ZHPd6xoxYpE=; b=EzOwP1fBKvuSORPdJB1HbUzNqiz/OQvImrXOlwYlM5gvENXg6WDKNbGsGm2JVRvmE+f01f 2DhvcfpP02DnIzO733eLq8O2oRioM6D3OwymQNuBh3M7LiKQR5L5QBXGfEbYyzyWQkYGkC 13lsBvXICZEL1LX34dfpJeXA8+hbUe5hz4k9HSyRzpLn7m74DwZUdfMXwa1Dp3WJvJHT3C /MfM9ZifanmOZiv4QUg3ypilbXn6w0+tGvvHYlQTWXFP0fmRCtiWvWnHQEmyBMIUFmqDH/ B7DK47j6pJ/VmLONYlI+jjvstddlRznhiv8tRQH2EkpvoeUflYig70w0x6+i2A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g19JL2gP9zlFP for ; Wed, 22 Apr 2026 20:08:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 20665 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 20:08:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 537159a58760 - stable/15 - psm(4): Add middle button support for Elantech V4 touchpads List-Id: Commits to the stable branches 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: 537159a587600a214698ea32fc7179c86b1afba3 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 20:08:02 +0000 Message-Id: <69e92aa2.20665.120cc3c6@gitrepo.freebsd.org> The branch stable/15 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=537159a587600a214698ea32fc7179c86b1afba3 commit 537159a587600a214698ea32fc7179c86b1afba3 Author: Vladimir Kondratyev AuthorDate: 2026-02-10 22:59:06 +0000 Commit: Vladimir Kondratyev CommitDate: 2026-04-22 19:59:01 +0000 psm(4): Add middle button support for Elantech V4 touchpads based on firmware version. PR: 291262 MFC after: 1 month (cherry picked from commit 3d85dcd1a9aa2e1b903935062500cb15b1a700f8) --- sys/dev/atkbdc/psm.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c index d36396df0fa0..95acf43a3bc6 100644 --- a/sys/dev/atkbdc/psm.c +++ b/sys/dev/atkbdc/psm.c @@ -352,6 +352,8 @@ typedef struct elantechhw { int dptracey; int issemimt; int isclickpad; + int hassmbusnotify; + int has3buttons; int hascrc; int hastrackpoint; int haspressure; @@ -417,7 +419,7 @@ enum { ((pb)->ipacket[0] & 0x0c) == 0x0c && ((pb)->ipacket[3] & 0xce) == 0x0c) #define ELANTECH_PKT_IS_V4(pb, hascrc) ((hascrc) ? \ ((pb)->ipacket[3] & 0x08) == 0x00 : \ - ((pb)->ipacket[0] & 0x0c) == 0x04 && ((pb)->ipacket[3] & 0x1c) == 0x10) + ((pb)->ipacket[0] & 0x08) == 0x00 && ((pb)->ipacket[3] & 0x1c) == 0x10) typedef struct elantechaction { finger_t fingers[ELANTECH_MAX_FINGERS]; @@ -1930,8 +1932,11 @@ psm_register_elantech(device_t dev) evdev_support_key(evdev_a, BTN_TOUCH); evdev_support_nfingers(evdev_a, ELANTECH_MAX_FINGERS); evdev_support_key(evdev_a, BTN_LEFT); - if (!sc->elanhw.isclickpad) + if (!sc->elanhw.isclickpad) { evdev_support_key(evdev_a, BTN_RIGHT); + if (sc->elanhw.has3buttons) + evdev_support_key(evdev_a, BTN_MIDDLE); + } psm_support_abs_bulk(evdev_a, elantech_absinfo); error = evdev_register_mtx(evdev_a, &Giant); @@ -4755,6 +4760,9 @@ proc_elantech(struct psm_softc *sc, packetbuf_t *pb, mousestatus_t *ms, touchpad_button = ((pb->ipacket[0] & 0x01) ? MOUSE_BUTTON1DOWN : 0) | ((pb->ipacket[0] & 0x02) ? MOUSE_BUTTON3DOWN : 0); + if (sc->elanhw.has3buttons) + touchpad_button |= + ((pb->ipacket[0] & 0x04) ? MOUSE_BUTTON2DOWN : 0); } #ifdef EVDEV_SUPPORT @@ -7347,6 +7355,9 @@ enable_elantech(struct psm_softc *sc, enum probearg arg) elanhw.hwversion = hwversion; elanhw.issemimt = hwversion == 2; elanhw.isclickpad = (resp[1] & 0x10) != 0; + elanhw.hassmbusnotify = + icversion == 0x0f && (resp[1] & 0x20) != 0 && resp[2] != 0; + elanhw.has3buttons = elanhw.hassmbusnotify; elanhw.hascrc = (resp[1] & 0x40) != 0; elanhw.haspressure = elanhw.fwversion >= 0x020800; From nobody Wed Apr 22 20:08:03 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g19JM5Cxlz6bDhX for ; Wed, 22 Apr 2026 20:08:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g19JM3x65z3Lkd for ; Wed, 22 Apr 2026 20:08:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776888483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cwz2+4zXs4HZNTACFx+dqRycgx4nz3VGRUcUFrk2J7o=; b=e68u55abDw92IJbm+bSI3i6jEVe8lqwh5cZBEqEakovVeJjF8P84ouyOFDEJbWURzG3swK bFgiR3drQKEWfrGLgmVLKQ8+qZeMLhviOpmuE3MhVIH164EZBQNdJzEXdV26pSyjx570h9 j6mpnEPzgpgpZb+I7JEAnMBVN6JsSLoFtwAg5I/B34NPf88dVcmRdSbi1f91ZOLHjZ33/2 FD/uECcd5A8wkMlQlTqQXQe7kyhKXn9aN8Qn+hHaKDrSvOWIBiZcfwDjpacmXUHJrQXGlE YzmSjYPhj8phvkfEt9e7OZ5WZ3/4zS+ibshtjU0YCXE+etmxErOvfyJJAM5ZSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776888483; a=rsa-sha256; cv=none; b=VnY3Z5weWZMHynD1m55ZLhNpRQRJTxw9QhGuYv44PkvAj9zzPfeqH9YNULC/x6BSS49eCJ OmGJ+9ceWp/s0VsmYgAOkYR7s/MxmXsF0Fd+AcnGDJOuAfj1EwhLCVAOriChWy0SoGTZ/d HSXjqy0MBW3Pmxgv2LuDNR4uX2Cjf1iAvm00fBWp8BErMtlDyZYArZnk4q8azOVsZayymF K+lhlT3WJhCN8ixivM3QPGK7iP2aAzt44tF04vNg3uIpeQA1lewl8ICx5lWuBEHgBd+bh8 lGpZuYIAu+jmiJg/pJh62R2POyL4JKF3WE/FxLw2w4iQY++Joxfbgb7qnM8HBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776888483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cwz2+4zXs4HZNTACFx+dqRycgx4nz3VGRUcUFrk2J7o=; b=niSeF7oIoCNbpn/OI5WqlrQRHhRcPzXnRXFfHm+CWmdo8wG2+aOKTCb6EMevsVJVQWV/gA 8Im1CklHl+ceMw1oaTxG4B1RKIZdsHcJklRQI7LZw3LMfPnDi3gWk1jf4WaPmrc++ewTkI oRIgc+t3LUfEfmhnDt8fV0XwTg8kl6QoupTQGzHNzsxMLxAEJDRN2pe1yPM3q9W9y6XXoL J1AJwe/XWgmUW4+4mXrtXaDYa4cuoDau9HcwBTjogBr9B4+VOLC6cpHOX85sAY3TNGfhvk g1HAiahdF00rwaPJNM5o7T7DWK/WtjgrjSuq7HtLugvO3Rwzkt6HXnIhyUnnAg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g19JM3VLPzlxY for ; Wed, 22 Apr 2026 20:08:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2212d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 20:08:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Christos Longros From: Vladimir Kondratyev Subject: git: 5138ea094d35 - stable/15 - bluetooth: add device IDs for Intel AX411 and BE200 adapters List-Id: Commits to the stable branches 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: 5138ea094d350054a2be9ada9d679000ed5bc55c Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 20:08:03 +0000 Message-Id: <69e92aa3.2212d.7048c1a2@gitrepo.freebsd.org> The branch stable/15 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=5138ea094d350054a2be9ada9d679000ed5bc55c commit 5138ea094d350054a2be9ada9d679000ed5bc55c Author: Christos Longros AuthorDate: 2026-03-29 13:16:57 +0000 Commit: Vladimir Kondratyev CommitDate: 2026-04-22 19:59:02 +0000 bluetooth: add device IDs for Intel AX411 and BE200 adapters Add USB product IDs for Intel AX411 (0x0035) and BE200 (0x0036) Bluetooth adapters to ng_ubt_intel, ng_ubt, iwmbtfw, and iwmbtfw.conf. Both chips use the same TLV-based firmware protocol as the existing 9260/9560 entries. Newer Blazar-generation chips (BE201, BE202, Whale Peak 2) are omitted as they require IML support not yet implemented in iwmbtfw. Signed-off-by: Christos Longros Reviewed by: wulf MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56122 (cherry picked from commit d82bcf5681dd180177d78fdcd1b8bbde5eadc29b) --- sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c | 7 ++----- sys/netgraph/bluetooth/drivers/ubt/ng_ubt_intel.c | 2 ++ usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 | 4 ++-- usr.sbin/bluetooth/iwmbtfw/iwmbtfw.conf | 2 +- usr.sbin/bluetooth/iwmbtfw/main.c | 2 ++ 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c index def589107725..934a5d4d37f6 100644 --- a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c +++ b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c @@ -436,13 +436,10 @@ static const STRUCT_USB_HOST_ID ubt_ignore_devs[] = { USB_VPI(USB_VENDOR_INTEL2, 0x0025, 0) }, { USB_VPI(USB_VENDOR_INTEL2, 0x0026, 0) }, { USB_VPI(USB_VENDOR_INTEL2, 0x0029, 0) }, - - /* - * Some Intel controllers are not yet supported by ng_ubt_intel and - * should be ignored. - */ { USB_VPI(USB_VENDOR_INTEL2, 0x0032, 0) }, { USB_VPI(USB_VENDOR_INTEL2, 0x0033, 0) }, + { USB_VPI(USB_VENDOR_INTEL2, 0x0035, 0) }, + { USB_VPI(USB_VENDOR_INTEL2, 0x0036, 0) }, /* MediaTek MT7925 */ { USB_VPI(USB_VENDOR_AZUREWAVE, 0x3602, 0) }, diff --git a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_intel.c b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_intel.c index c4410b7b2c80..290c04790a46 100644 --- a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_intel.c +++ b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_intel.c @@ -101,6 +101,8 @@ static const STRUCT_USB_HOST_ID ubt_intel_devs[] = /* Intel Wireless 9260/9560 and successors */ { USB_VPI(USB_VENDOR_INTEL2, 0x0032, UBT_INTEL_DEVICE_9260) }, { USB_VPI(USB_VENDOR_INTEL2, 0x0033, UBT_INTEL_DEVICE_9260) }, + { USB_VPI(USB_VENDOR_INTEL2, 0x0035, UBT_INTEL_DEVICE_9260) }, + { USB_VPI(USB_VENDOR_INTEL2, 0x0036, UBT_INTEL_DEVICE_9260) }, }; /* diff --git a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 index ac32a675aa63..fd0118655a67 100644 --- a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 +++ b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 @@ -48,8 +48,8 @@ device. .Pp This utility will .Em only -work with Intel Wireless 7260/8260/9260 chip based Bluetooth USB devices -and some of their successors. +work with Intel Wireless 7260/8260/9260 and newer chip based Bluetooth +USB devices, including AX and BE series wireless adapters. The identification is currently based on USB vendor ID/product ID pair. The vendor ID should be 0x8087 .Pq Dv USB_VENDOR_INTEL2 diff --git a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.conf b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.conf index e30a3c15ccaa..d48206827f90 100644 --- a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.conf +++ b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.conf @@ -7,6 +7,6 @@ notify 100 { match "subsystem" "DEVICE"; match "type" "ATTACH"; match "vendor" "0x8087"; - match "product" "(0x07dc|0x0a2a|0x0aa7|0x0a2b|0x0aaa|0x0025|0x0026|0x0029|0x0032|0x0033)"; + match "product" "(0x07dc|0x0a2a|0x0aa7|0x0a2b|0x0aaa|0x0025|0x0026|0x0029|0x0032|0x0033|0x0035|0x0036)"; action "/usr/sbin/iwmbtfw -d $cdev -f /usr/local/share/iwmbt-firmware"; }; diff --git a/usr.sbin/bluetooth/iwmbtfw/main.c b/usr.sbin/bluetooth/iwmbtfw/main.c index b27c5ad62239..1e11cc468015 100644 --- a/usr.sbin/bluetooth/iwmbtfw/main.c +++ b/usr.sbin/bluetooth/iwmbtfw/main.c @@ -81,6 +81,8 @@ static struct iwmbt_devid iwmbt_list[] = { /* Intel Wireless 9260/9560 and successors */ { .vendor_id = 0x8087, .product_id = 0x0032, .device = IWMBT_DEVICE_9260 }, { .vendor_id = 0x8087, .product_id = 0x0033, .device = IWMBT_DEVICE_9260 }, + { .vendor_id = 0x8087, .product_id = 0x0035, .device = IWMBT_DEVICE_9260 }, + { .vendor_id = 0x8087, .product_id = 0x0036, .device = IWMBT_DEVICE_9260 }, }; static enum iwmbt_device From nobody Wed Apr 22 20:08:04 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g19JP07Qtz6bDf9 for ; Wed, 22 Apr 2026 20:08:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g19JN5lKZz3LTK for ; Wed, 22 Apr 2026 20:08:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776888484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZjhICS6Jz7yiCSQQKFzNxAOt+MFz+Yl4JYZIRnT+YzU=; b=ajDpHo2kUs3rhJi1Z1lrRf72GjXMfy9TRRHWm0W9WmxYokCl4GPQdAN4BR3YKH0tOtQRq9 QAy04N6CaEDbVdEcwg6WyldpMfAWriHPXB2U2rbeO5W7578dlGT/rDpanuaFolxSMcHUEy jFFsODk0h4yu9aM1zvts0GrWbRXG8v7IGAEKk0SWoMQXlFdWWWfZzNIZ6PzReaDVLRcbxN VL6vK2nHcXOpUaVRwLeM5bjIhDC2DuD9H44V8z8ONkktqsLrm8REJHXsdj/I6yMnDmC15Q XcTdF1FqMTEnSZfURIsTWtMgFWdRz3uapKHiu3Wq7KQ+03nLo+uzYNldy39GDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776888484; a=rsa-sha256; cv=none; b=ibMxfbIuzMCFyBnS0jyqH0eVa0JISOBx5spYJoWohur3Tj3twi/JN64tIS6O4G73VfZvKl +XggkfkR63XKJoSN/xIPP1NcOHpXWl8CtMTTa9jkjt1G4iU3ya6pL2izLY3DQqwzfuZZD5 gjifUNsxXKA/dP/Co23+x34zu7wLscbg/xHka9dpYNEWjsJjsAAd6NsOTjwboHAh9budeU D6O8VHO8PkheuPKVuCVVxATtNB9jXlYLr7QMneEB29Lt7lB4iHaOimDPB88sWYWSpN/wzj tyGVmo3bEow+OSKHpoRrMBMhT7Iez6UDWJ2rQJPbh6wtfC7KMDd0JwHHL1hPDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776888484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZjhICS6Jz7yiCSQQKFzNxAOt+MFz+Yl4JYZIRnT+YzU=; b=N9bHVhR8V7j6/VPht3SbI4NiGLDd6ey33lUB5QuVuEF2W/c8fSq7wPivSMBYmlE95LT4ka aprxl/GsjboafZOdHvDuMo4aRRqKmTToFnld50X+dUjAn6yVF6jLpKF9+QGW/zvmVEqNST vf1bP7St4aExRZPzspZAvK1cnIK7guGxk8KGzXOFk6EEDh0cjPZfhHuh6al1oFymsH1C0k 2FkPyZWMwtAyQahU4I7j5dnpfpJBNM995e4xrXQy4OqOXZyazlEbWT9A66FGgvuIpa+E1m pxJKmdRFagMZTkE/TkmSQGCe9AUoWbJywOEyZ2pQHNTH2+NCSaINa+b0PBF2Xw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g19JN4nlCzlFQ for ; Wed, 22 Apr 2026 20:08:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1fd75 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 20:08:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Ying Xu From: Vladimir Kondratyev Subject: git: 26408151bb1d - stable/15 - rtlbtfw(8): Add support for Realtek 8852CE List-Id: Commits to the stable branches 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: 26408151bb1d952e37ff25bfb9cc200332a5e13a Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 20:08:04 +0000 Message-Id: <69e92aa4.1fd75.2c66a1f5@gitrepo.freebsd.org> The branch stable/15 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=26408151bb1d952e37ff25bfb9cc200332a5e13a commit 26408151bb1d952e37ff25bfb9cc200332a5e13a Author: Ying Xu AuthorDate: 2026-03-11 07:55:45 +0000 Commit: Vladimir Kondratyev CommitDate: 2026-04-22 19:59:02 +0000 rtlbtfw(8): Add support for Realtek 8852CE Add the USB Vendor/Product ID (0x13d3:0x3612) for the new Realtek 8852CE drive to make sure it works. Signed-off-by: Ying Xu Reviewed by: pouria, wulf Pull Request: https://github.com/freebsd/freebsd-src/pull/2071 (cherry picked from commit 2e9366982798144764159f9c0faced5f0e208b85) --- sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c | 1 + usr.sbin/bluetooth/rtlbtfw/main.c | 1 + usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c index f35712cc8f69..f5dcac0a6846 100644 --- a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c +++ b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c @@ -100,6 +100,7 @@ const STRUCT_USB_HOST_ID ubt_rtl_devs[] = { USB_VPI(0x13d3, 0x3587, 0) }, { USB_VPI(0x13d3, 0x3586, 0) }, { USB_VPI(0x13d3, 0x3592, 0) }, + { USB_VPI(0x13d3, 0x3612, 0) }, { USB_VPI(0x0489, 0xe122, 0) }, /* Realtek 8852BE Bluetooth devices */ diff --git a/usr.sbin/bluetooth/rtlbtfw/main.c b/usr.sbin/bluetooth/rtlbtfw/main.c index 58503b8087b5..37c902739206 100644 --- a/usr.sbin/bluetooth/rtlbtfw/main.c +++ b/usr.sbin/bluetooth/rtlbtfw/main.c @@ -83,6 +83,7 @@ static struct rtlbt_devid rtlbt_list[] = { { .vendor_id = 0x13d3, .product_id = 0x3587 }, { .vendor_id = 0x13d3, .product_id = 0x3586 }, { .vendor_id = 0x13d3, .product_id = 0x3592 }, + { .vendor_id = 0x13d3, .product_id = 0x3612 }, { .vendor_id = 0x0489, .product_id = 0xe122 }, /* Realtek 8852BE Bluetooth devices */ diff --git a/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf b/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf index 2ef56d2af93a..0a2b33d33b18 100644 --- a/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf +++ b/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf @@ -110,7 +110,7 @@ notify 100 { match "subsystem" "DEVICE"; match "type" "ATTACH"; match "vendor" "0x13d3"; - match "product" "(0x3587|0x3586|0x3592)"; + match "product" "(0x3587|0x3586|0x3592|0x3612)"; action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; }; notify 100 { From nobody Wed Apr 22 20:08:05 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g19JQ1ZbDz6bDnG for ; Wed, 22 Apr 2026 20:08:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g19JP63gpz3LWS for ; Wed, 22 Apr 2026 20:08:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776888485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mHU0jK2xzIpww+FPe8Yo6oE7W0w2u4MXbk5vaCSz//A=; b=Gl98oMdYmj2qiysgHzkXv70Y5vETn0w3rH5QW9Ju8DiEJRM+fRCa2eyLbP/up6s7dDQIsw r1Dyg90jdqHFX4V40ZSRruoRHkNUoWffTfiNPzadAccVTbRF9Y5snVNxpP+j82lKXnC2X+ 91KfZ6v+vc3dWKlFNd0ST1C4O9f4vCq9y2n0CZV4bNMwIJmnKgnSHcVKgKQKVoGkawIXVK zGm6CjMCr69tkVJ9FAd3rTOZWsoEVjjBO5RzhLzSCx3U84dvMtUXJRF3qpIyqhOD2Amwjp ejcffKPo8jFbKUjuudGi0memCov3SuahJOOKdMA/uCGtqdVoyNR+pYkZXwYu+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776888485; a=rsa-sha256; cv=none; b=MXCv+7tjF/gkRlatYV03kcFn67ja5R2euwJyPn1mlNYKTJPJX0uZFePY9xGBiIUiLMy8ft HpxvNNPpSpuYdtOoe6Z0AFpEW5v33MkuipaWAq43+0eYWS4fZ1Z02T2Jg1Q/Zhx4tt7G66 i4S5EXQfZlnvjR4eFMZF9Lt6REEVtoB6q8Z3MAG1Ar1HnHWZ4MhW1ewCHc/U1t5sYJlS1z KI+yrnwdp2udGfM7BUQslLBvOCRSe/iQKuxBxxGBS0ZYlvv5jDrrWTGj8jAmC3baMvn3SK B1hAuVSHQO72fduwpfZMSm8aUlvUc/wUnpo48sTx/fGUk2IES1jBBKJZm4M3Vg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776888485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mHU0jK2xzIpww+FPe8Yo6oE7W0w2u4MXbk5vaCSz//A=; b=G4ygnRqt1qnkzawdCkVJ119Ma3rEXr+uFO9+FCKS5gxNoUrBn7hhSdRxSp3LbtYgA5d9WY yRzZcKRgxGPyiKQs1qjp1CK6i1BcZ28H/mnMpg2gDJKn1/hU69n5zWFYQbhQUs1lm+zsqi d0zV54vrFYqwB27WxuOPXWvJONhQryhR9VkAZclA3h9AcfTcDZsgZ9iUc2cTpeIAtzZUkR 6+6FwbCMTLhdLhGCCwAxF52A1t631F1fs52+OABPFCT9etPzvukQ2ZkEpyQsqxWPTGw4Ef EUQOttgdxHDuZwbsMkYIo2PN6viHy6PRUrYn7RFt0cUPIpCF78wy3D7tK/SRvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g19JP5Bm1zlHK for ; Wed, 22 Apr 2026 20:08:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1fd7a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 20:08:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: tslight From: Vladimir Kondratyev Subject: git: 0af73c16e79a - stable/15 - hkbd(4): fix handling of apple function keys in hid and evdev List-Id: Commits to the stable branches 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: 0af73c16e79a0b7770e8ba08a5a1fcf5daa83a5d Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 20:08:05 +0000 Message-Id: <69e92aa5.1fd7a.18314548@gitrepo.freebsd.org> The branch stable/15 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=0af73c16e79a0b7770e8ba08a5a1fcf5daa83a5d commit 0af73c16e79a0b7770e8ba08a5a1fcf5daa83a5d Author: tslight AuthorDate: 2026-03-29 13:16:57 +0000 Commit: Vladimir Kondratyev CommitDate: 2026-04-22 19:59:02 +0000 hkbd(4): fix handling of apple function keys in hid and evdev Signed-off-by: tslight Reviewed by: wulf MFC after: 1 month Pull Request: https://github.com/freebsd/freebsd-src/pull/1998 (cherry picked from commit f54caa04edd99e341fbb0636d2c621b4a2eb36bf) --- sys/dev/evdev/evdev_utils.c | 11 ++++-- sys/dev/hid/hid.h | 2 ++ sys/dev/hid/hkbd.c | 88 ++++++++++++++++++++++++++++++++++++--------- 3 files changed, 82 insertions(+), 19 deletions(-) diff --git a/sys/dev/evdev/evdev_utils.c b/sys/dev/evdev/evdev_utils.c index a075a9be9bb7..d7b7b790dc2c 100644 --- a/sys/dev/evdev/evdev_utils.c +++ b/sys/dev/evdev/evdev_utils.c @@ -92,8 +92,8 @@ static uint16_t evdev_usb_scancodes[256] = { NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, /* 0xc0 - 0xdf */ - NONE, NONE, NONE, NONE, - NONE, NONE, NONE, NONE, + KEY_BRIGHTNESSDOWN, KEY_BRIGHTNESSUP, KEY_SCALE, KEY_DASHBOARD, + KEY_KBDILLUMDOWN, KEY_KBDILLUMUP, NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, @@ -108,7 +108,12 @@ static uint16_t evdev_usb_scancodes[256] = { KEY_WWW, KEY_BACK, KEY_FORWARD, KEY_STOP, KEY_FIND, KEY_SCROLLUP, KEY_SCROLLDOWN, KEY_EDIT, KEY_SLEEP, KEY_COFFEE, KEY_REFRESH, KEY_CALC, - NONE, NONE, NONE, NONE, + /* + * last item maps to APPLE_FN_KEY in hkbd.c. using KEY_WAKEUP instead + * of KEY_FN as evdev translates the latter to too high of a code for + * xkb to parse. + */ + NONE, NONE, NONE, KEY_WAKEUP, }; diff --git a/sys/dev/hid/hid.h b/sys/dev/hid/hid.h index e56f8ffe772b..02709d549a56 100644 --- a/sys/dev/hid/hid.h +++ b/sys/dev/hid/hid.h @@ -57,8 +57,10 @@ #define HUP_SCALE 0x008c #define HUP_CAMERA_CONTROL 0x0090 #define HUP_ARCADE 0x0091 +#define HUP_APPLE 0x00ff #define HUP_FIDO 0xf1d0 #define HUP_MICROSOFT 0xff00 +#define HUP_HP 0xff01 /* Usages, generic desktop */ #define HUG_POINTER 0x0001 diff --git a/sys/dev/hid/hkbd.c b/sys/dev/hid/hkbd.c index 6255c42d3b62..78e2e4bfc199 100644 --- a/sys/dev/hid/hkbd.c +++ b/sys/dev/hid/hkbd.c @@ -97,6 +97,7 @@ static int hkbd_debug = 0; #endif static int hkbd_no_leds = 0; +static int hkbd_apple_fn_mode = 0; static SYSCTL_NODE(_hw_hid, OID_AUTO, hkbd, CTLFLAG_RW, 0, "USB keyboard"); #ifdef HID_DEBUG @@ -105,6 +106,8 @@ SYSCTL_INT(_hw_hid_hkbd, OID_AUTO, debug, CTLFLAG_RWTUN, #endif SYSCTL_INT(_hw_hid_hkbd, OID_AUTO, no_leds, CTLFLAG_RWTUN, &hkbd_no_leds, 0, "Disables setting of keyboard leds"); +SYSCTL_INT(_hw_hid_hkbd, OID_AUTO, apple_fn_mode, CTLFLAG_RWTUN, + &hkbd_apple_fn_mode, 0, "0 = Fn + F1..12 -> media, 1 = F1..F12 -> media"); #define INPUT_EPOCH global_epoch_preempt @@ -126,6 +129,9 @@ SYSCTL_INT(_hw_hid_hkbd, OID_AUTO, no_leds, CTLFLAG_RWTUN, #define MOD_MIN 0xe0 #define MOD_MAX 0xe7 +/* shows up as whatever is set to the last item in evdev_usb_scancodes[] */ +#define APPLE_FN_KEY 0xff + struct hkbd_softc { device_t sc_dev; @@ -291,7 +297,7 @@ static const uint8_t hkbd_trtab[256] = { 29, 42, 56, 105, 90, 54, 93, 106, /* E0 - E7 */ NN, NN, NN, NN, NN, NN, NN, NN, /* E8 - EF */ NN, NN, NN, NN, NN, NN, NN, NN, /* F0 - F7 */ - NN, NN, NN, NN, NN, NN, NN, NN, /* F8 - FF */ + NN, NN, NN, NN, NN, NN, NN, 255, /* F8 - FF (last item is APPLE_FN_KEY) */ }; static const uint8_t hkbd_boot_desc[] = { HID_KBD_BOOTPROTO_DESCR() }; @@ -516,13 +522,14 @@ hkbd_interrupt(struct hkbd_softc *sc) continue; hkbd_put_key(sc, key | KEY_PRESS); - sc->sc_co_basetime = sbinuptime(); - sc->sc_delay = sc->sc_kbd.kb_delay1; - hkbd_start_timer(sc); - - /* set repeat time for last key */ - sc->sc_repeat_time = now + sc->sc_kbd.kb_delay1; - sc->sc_repeat_key = key; + if (key != APPLE_FN_KEY) { + sc->sc_co_basetime = sbinuptime(); + sc->sc_delay = sc->sc_kbd.kb_delay1; + hkbd_start_timer(sc); + /* set repeat time for last key */ + sc->sc_repeat_time = now + sc->sc_kbd.kb_delay1; + sc->sc_repeat_key = key; + } } /* synchronize old data with new data */ @@ -623,6 +630,27 @@ hkbd_apple_fn(uint32_t keycode) } } +/* separate so the sysctl doesn't butcher non-fn keys */ +static uint32_t +hkbd_apple_fn_media(uint32_t keycode) +{ + switch (keycode) { + case 0x3a: return 0xc0; /* F1 -> BRIGHTNESS DOWN */ + case 0x3b: return 0xc1; /* F2 -> BRIGHTNESS UP */ + case 0x3c: return 0xc2; /* F3 -> SCALE (MISSION CTRL)*/ + case 0x3d: return 0xc3; /* F4 -> DASHBOARD (LAUNCHPAD) */ + case 0x3e: return 0xc4; /* F5 -> KBD BACKLIGHT DOWN */ + case 0x3f: return 0xc5; /* F6 -> KBD BACKLIGHT UP */ + case 0x40: return 0xea; /* F7 -> MEDIA PREV */ + case 0x41: return 0xe8; /* F8 -> PLAY/PAUSE */ + case 0x42: return 0xeb; /* F9 -> MEDIA NEXT */ + case 0x43: return 0xef; /* F10 -> MUTE */ + case 0x44: return 0xee; /* F11 -> VOLUME DOWN */ + case 0x45: return 0xed; /* F12 -> VOLUME UP */ + default: return keycode; + } +} + static uint32_t hkbd_apple_swap(uint32_t keycode) { @@ -683,10 +711,19 @@ hkbd_intr_callback(void *context, void *data, hid_size_t len) } if ((sc->sc_flags & HKBD_FLAG_APPLE_FN) && (id == sc->sc_id_apple_fn)) { - if (hid_get_data(buf, len, &sc->sc_loc_apple_fn)) + if (hid_get_data(buf, len, &sc->sc_loc_apple_fn)) { + /* don't hide the function key from userland */ + bit_set(sc->sc_ndata, APPLE_FN_KEY); modifiers |= MOD_FN; + } else { + bit_clear(sc->sc_ndata, APPLE_FN_KEY); + } } + int apply_apple_fn_media = (modifiers & MOD_FN) ? 1 : 0; + if (hkbd_apple_fn_mode) /* toggle from sysctl value */ + apply_apple_fn_media = !apply_apple_fn_media; + bit_foreach(sc->sc_loc_key_valid, HKBD_NKEYCODE, i) { if (id != sc->sc_id_loc_key[i]) { continue; /* invalid HID ID */ @@ -710,6 +747,8 @@ hkbd_intr_callback(void *context, void *data, hid_size_t len) } if (modifiers & MOD_FN) key = hkbd_apple_fn(key); + if (apply_apple_fn_media) + key = hkbd_apple_fn_media(key); if (sc->sc_flags & HKBD_FLAG_APPLE_SWAP) key = hkbd_apple_swap(key); if (key == KEY_NONE || key >= HKBD_NKEYCODE) @@ -723,6 +762,8 @@ hkbd_intr_callback(void *context, void *data, hid_size_t len) if (modifiers & MOD_FN) key = hkbd_apple_fn(key); + if (apply_apple_fn_media) + key = hkbd_apple_fn_media(key); if (sc->sc_flags & HKBD_FLAG_APPLE_SWAP) key = hkbd_apple_swap(key); if (key == KEY_NONE || key == KEY_ERROR || key >= HKBD_NKEYCODE) @@ -793,13 +834,28 @@ hkbd_parse_hid(struct hkbd_softc *sc, const uint8_t *ptr, uint32_t len, HKBD_FLAG_APPLE_SWAP; DPRINTFN(1, "Found Apple eject-key\n"); } - if (hidbus_locate(ptr, len, - HID_USAGE2(0xFFFF, 0x0003), - hid_input, tlc_index, 0, &sc->sc_loc_apple_fn, &flags, - &sc->sc_id_apple_fn, NULL)) { - if (flags & HIO_VARIABLE) - sc->sc_flags |= HKBD_FLAG_APPLE_FN; - DPRINTFN(1, "Found Apple FN-key\n"); + /* + * check the same vendor pages that linux does to find the one apple + * uses for the function key. + */ + static const uint16_t apple_pages[] = { + HUP_APPLE, /* HID_UP_CUSTOM in linux */ + HUP_MICROSOFT, /* HID_UP_MSVENDOR in linux */ + HUP_HP, /* HID_UP_HPVENDOR2 in linux */ + 0xFFFF /* Original FreeBSD check (Remove?) */ + }; + for (int i = 0; i < (int)nitems(apple_pages); i++) { + if (hidbus_locate(ptr, len, + HID_USAGE2(apple_pages[i], 0x0003), + hid_input, tlc_index, 0, + &sc->sc_loc_apple_fn, &flags, + &sc->sc_id_apple_fn, NULL)) { + if (flags & HIO_VARIABLE) + sc->sc_flags |= HKBD_FLAG_APPLE_FN; + DPRINTFN(1, "Found Apple FN-key on page 0x%04x\n", + apple_pages[i]); + break; + } } /* figure out event buffer */ From nobody Wed Apr 22 20:08:06 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g19JR3Q2Cz6bDKH for ; Wed, 22 Apr 2026 20:08:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g19JQ6Yhxz3Lc3 for ; Wed, 22 Apr 2026 20:08:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776888486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hfrKfcKSg+7NTtduQARrIPaokGK/swjajZtJHIxNnso=; b=GDwM/prnft+7jcZW+JdlosXxfUYFx8a8hecXyox83YuQ0RYkjj+r3/p5BIILI8WcUXAvP8 356Tt93u/+XqZ1vCe1r254RkPBhudg9u2AU1WlPzbbzgn2UFqxSbABtl9Xjn7ybQIyHEd1 fBCM/ZzFPc8bzPFL83pAN7T8KpaaourO0J2J5nte/DfgnTxf4v7vWNixTIsffRzvmXKDMc IrRIdn1JKedLfSRPxK96BVlZtvbG1e3hGJlVOIv30Mqj5TgFZ/Hq8pSqW5EDoxGmrhCRE6 WysBI12bLYnBqN4NZJhewBmLCqSokZu7hjwG9kzbRUvzIilXR5hEFVcf4hW5vQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776888486; a=rsa-sha256; cv=none; b=q/9/+0xQny2WVUHKIPXPL0TyGFk0x+Ig7obIOVtOPkHSf1KKeGiB1yQNkZCJxfqksw1dD5 eIjut+cebunC/0L1kW49a+Q4xkwxftYxRaBoWkzYdg9mDtWHkV6jdla0tII0S8tqjl6H/z VUaDLOUsaKTRShOEIXO61cIK98xrIH9Jy7jrCsZ3nsTPbvMZDEN9ItimsxZ3ULJAZNtLz8 b9jpc13g8znxsxt5vqbzbX4U2OCiblzQ5Tf4DWtxQGuKqFfLRx5h/VzZ2QEgfqIX7MM4kh L97rPkVMghqd9ajd8Ne24BQ+z/sL1kDto2ubFayhO65kmK2jkFFZzZ761FqfoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776888486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hfrKfcKSg+7NTtduQARrIPaokGK/swjajZtJHIxNnso=; b=OCrg3AC4Stw23qqOkmuDAN5E4paIg7frriI6fZY1sTghwfw/eazZIwlW1sOjF9bREy63Kk c3YNRy1qbENh22CWpOySdfYbqFu6sKEVg6F1XzTQGsHipwmbHfvkllcAIOdiDt0YsiO7X8 I9CtoNTkFdDjv1o4S+l5rkGA6Su3d5s3+KLJwdwf0X+jG87dAUB1w4IxTAkQsLu5VcBvNe p0WQC8n/OhDzlqSF1gEb332tbSe/MzWh23e88Gzo1DzlZRvvNrVVgdaE3v5/Rdzd1NDK1e eF33mdDdtEcKKyeQ0seNZk0PJCH68fOTMOspV+B7UQZqIrB3i0WfWrD9+JNmpA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g19JQ6412zlFT for ; Wed, 22 Apr 2026 20:08:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 222a6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 20:08:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: tslight From: Vladimir Kondratyev Subject: git: 39db3b9fc194 - stable/15 - ukbd(4): backport Apple function keys support from hkbd(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: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 39db3b9fc194f792d8f8f780c4dfe7b0bf2e427e Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 20:08:06 +0000 Message-Id: <69e92aa6.222a6.1df79d98@gitrepo.freebsd.org> The branch stable/15 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=39db3b9fc194f792d8f8f780c4dfe7b0bf2e427e commit 39db3b9fc194f792d8f8f780c4dfe7b0bf2e427e Author: tslight AuthorDate: 2026-03-29 13:16:57 +0000 Commit: Vladimir Kondratyev CommitDate: 2026-04-22 19:59:02 +0000 ukbd(4): backport Apple function keys support from hkbd(4) and expose eject in addition to fn. Signed-off-by: tslight Reviewed by: wulf MFC after: 1 month Pull Request: https://github.com/freebsd/freebsd-src/pull/1998 (cherry picked from commit 40f55eada59250dd5d9580ad3c87a36ae9d6b4a9) --- sys/dev/hid/hkbd.c | 16 +++++--- sys/dev/usb/input/ukbd.c | 101 +++++++++++++++++++++++++++++++++++++---------- 2 files changed, 91 insertions(+), 26 deletions(-) diff --git a/sys/dev/hid/hkbd.c b/sys/dev/hid/hkbd.c index 78e2e4bfc199..a91a01a385e3 100644 --- a/sys/dev/hid/hkbd.c +++ b/sys/dev/hid/hkbd.c @@ -129,8 +129,9 @@ SYSCTL_INT(_hw_hid_hkbd, OID_AUTO, apple_fn_mode, CTLFLAG_RWTUN, #define MOD_MIN 0xe0 #define MOD_MAX 0xe7 -/* shows up as whatever is set to the last item in evdev_usb_scancodes[] */ +/* check evdev_usb_scancodes[] for names */ #define APPLE_FN_KEY 0xff +#define APPLE_EJECT_KEY 0xec struct hkbd_softc { device_t sc_dev; @@ -295,9 +296,9 @@ static const uint8_t hkbd_trtab[256] = { NN, NN, NN, NN, NN, NN, NN, NN, /* D0 - D7 */ NN, NN, NN, NN, NN, NN, NN, NN, /* D8 - DF */ 29, 42, 56, 105, 90, 54, 93, 106, /* E0 - E7 */ - NN, NN, NN, NN, NN, NN, NN, NN, /* E8 - EF */ + NN, NN, NN, NN, 254, NN, NN, NN, /* E8 - EF */ NN, NN, NN, NN, NN, NN, NN, NN, /* F0 - F7 */ - NN, NN, NN, NN, NN, NN, NN, 255, /* F8 - FF (last item is APPLE_FN_KEY) */ + NN, NN, NN, NN, NN, NN, NN, 255, /* F8 - FF */ }; static const uint8_t hkbd_boot_desc[] = { HID_KBD_BOOTPROTO_DESCR() }; @@ -703,16 +704,19 @@ hkbd_intr_callback(void *context, void *data, hid_size_t len) /* clear modifiers */ modifiers = 0; - /* scan through HID data */ + /* scan through HID data and expose magic apple keys */ if ((sc->sc_flags & HKBD_FLAG_APPLE_EJECT) && (id == sc->sc_id_apple_eject)) { - if (hid_get_data(buf, len, &sc->sc_loc_apple_eject)) + if (hid_get_data(buf, len, &sc->sc_loc_apple_eject)) { + bit_set(sc->sc_ndata, APPLE_EJECT_KEY); modifiers |= MOD_EJECT; + } else { + bit_clear(sc->sc_ndata, APPLE_EJECT_KEY); + } } if ((sc->sc_flags & HKBD_FLAG_APPLE_FN) && (id == sc->sc_id_apple_fn)) { if (hid_get_data(buf, len, &sc->sc_loc_apple_fn)) { - /* don't hide the function key from userland */ bit_set(sc->sc_ndata, APPLE_FN_KEY); modifiers |= MOD_FN; } else { diff --git a/sys/dev/usb/input/ukbd.c b/sys/dev/usb/input/ukbd.c index 57e9beac34b6..c15528553086 100644 --- a/sys/dev/usb/input/ukbd.c +++ b/sys/dev/usb/input/ukbd.c @@ -97,6 +97,7 @@ static int ukbd_debug = 0; static int ukbd_no_leds = 0; static int ukbd_pollrate = 0; +static int ukbd_apple_fn_mode = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, ukbd, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "USB keyboard"); @@ -106,6 +107,8 @@ SYSCTL_INT(_hw_usb_ukbd, OID_AUTO, no_leds, CTLFLAG_RWTUN, &ukbd_no_leds, 0, "Disables setting of keyboard leds"); SYSCTL_INT(_hw_usb_ukbd, OID_AUTO, pollrate, CTLFLAG_RWTUN, &ukbd_pollrate, 0, "Force this polling rate, 1-1000Hz"); +SYSCTL_INT(_hw_usb_ukbd, OID_AUTO, apple_fn_mode, CTLFLAG_RWTUN, + &ukbd_apple_fn_mode, 0, "0 = Fn + F1..12 -> media, 1 = F1..F12 -> media"); #endif #define UKBD_EMULATE_ATSCANCODE 1 @@ -123,6 +126,10 @@ SYSCTL_INT(_hw_usb_ukbd, OID_AUTO, pollrate, CTLFLAG_RWTUN, #define MOD_EJECT 0x01 #define MOD_FN 0x02 +/* check evdev_usb_scancodes[] for names */ +#define APPLE_FN_KEY 0xff +#define APPLE_EJECT_KEY 0xec + struct ukbd_data { uint64_t bitmap[howmany(UKBD_NKEYCODE, 64)]; }; @@ -282,9 +289,9 @@ static const uint8_t ukbd_trtab[256] = { NN, NN, NN, NN, NN, NN, NN, NN, /* D0 - D7 */ NN, NN, NN, NN, NN, NN, NN, NN, /* D8 - DF */ 29, 42, 56, 105, 90, 54, 93, 106, /* E0 - E7 */ - NN, NN, NN, NN, NN, NN, NN, NN, /* E8 - EF */ + NN, NN, NN, NN, 254, NN, NN, NN, /* E8 - EF */ NN, NN, NN, NN, NN, NN, NN, NN, /* F0 - F7 */ - NN, NN, NN, NN, NN, NN, NN, NN, /* F8 - FF */ + NN, NN, NN, NN, NN, NN, NN, 255, /* F8 - FF */ }; static const uint8_t ukbd_boot_desc[] = { @@ -582,14 +589,14 @@ ukbd_interrupt(struct ukbd_softc *sc) sc->sc_repeat_key = 0; } else { ukbd_put_key(sc, key | KEY_PRESS); - - sc->sc_co_basetime = sbinuptime(); - sc->sc_delay = sc->sc_kbd.kb_delay1; - ukbd_start_timer(sc); - - /* set repeat time for last key */ - sc->sc_repeat_time = now + sc->sc_kbd.kb_delay1; - sc->sc_repeat_key = key; + if (key != APPLE_FN_KEY) { + sc->sc_co_basetime = sbinuptime(); + sc->sc_delay = sc->sc_kbd.kb_delay1; + ukbd_start_timer(sc); + /* set repeat time for last key */ + sc->sc_repeat_time = now + sc->sc_kbd.kb_delay1; + sc->sc_repeat_key = key; + } } } } @@ -679,6 +686,27 @@ ukbd_apple_fn(uint32_t keycode) } } +/* separate so the sysctl doesn't butcher non-fn keys */ +static uint32_t +ukbd_apple_fn_media(uint32_t keycode) +{ + switch (keycode) { + case 0x3a: return 0xc0; /* F1 -> BRIGHTNESS DOWN */ + case 0x3b: return 0xc1; /* F2 -> BRIGHTNESS UP */ + case 0x3c: return 0xc2; /* F3 -> SCALE (MISSION CTRL)*/ + case 0x3d: return 0xc3; /* F4 -> DASHBOARD (LAUNCHPAD) */ + case 0x3e: return 0xc4; /* F5 -> KBD BACKLIGHT DOWN */ + case 0x3f: return 0xc5; /* F6 -> KBD BACKLIGHT UP */ + case 0x40: return 0xea; /* F7 -> MEDIA PREV */ + case 0x41: return 0xe8; /* F8 -> PLAY/PAUSE */ + case 0x42: return 0xeb; /* F9 -> MEDIA NEXT */ + case 0x43: return 0xef; /* F10 -> MUTE */ + case 0x44: return 0xee; /* F11 -> VOLUME DOWN */ + case 0x45: return 0xed; /* F12 -> VOLUME UP */ + default: return keycode; + } +} + static uint32_t ukbd_apple_swap(uint32_t keycode) { @@ -740,18 +768,34 @@ ukbd_intr_callback(struct usb_xfer *xfer, usb_error_t error) /* clear modifiers */ modifiers = 0; - /* scan through HID data */ + /* scan through HID data and expose magic apple keys */ if ((sc->sc_flags & UKBD_FLAG_APPLE_EJECT) && (id == sc->sc_id_apple_eject)) { - if (hid_get_data(sc->sc_buffer, len, &sc->sc_loc_apple_eject)) + if (hid_get_data(sc->sc_buffer, len, &sc->sc_loc_apple_eject)) { + sc->sc_ndata.bitmap[APPLE_EJECT_KEY / 64] |= + 1ULL << (APPLE_EJECT_KEY % 64); modifiers |= MOD_EJECT; + } else { + sc->sc_ndata.bitmap[APPLE_EJECT_KEY / 64] &= + ~(1ULL << (APPLE_EJECT_KEY % 64)); + } } if ((sc->sc_flags & UKBD_FLAG_APPLE_FN) && (id == sc->sc_id_apple_fn)) { - if (hid_get_data(sc->sc_buffer, len, &sc->sc_loc_apple_fn)) + if (hid_get_data(sc->sc_buffer, len, &sc->sc_loc_apple_fn)) { + sc->sc_ndata.bitmap[APPLE_FN_KEY / 64] |= + 1ULL << (APPLE_FN_KEY % 64); modifiers |= MOD_FN; + } else { + sc->sc_ndata.bitmap[APPLE_FN_KEY / 64] &= + ~(1ULL << (APPLE_FN_KEY % 64)); + } } + int apply_apple_fn_media = (modifiers & MOD_FN) ? 1 : 0; + if (ukbd_apple_fn_mode) /* toggle from sysctl value */ + apply_apple_fn_media = !apply_apple_fn_media; + for (i = 0; i != UKBD_NKEYCODE; i++) { const uint64_t valid = sc->sc_loc_key_valid[i / 64]; const uint64_t mask = 1ULL << (i % 64); @@ -780,6 +824,8 @@ ukbd_intr_callback(struct usb_xfer *xfer, usb_error_t error) } if (modifiers & MOD_FN) key = ukbd_apple_fn(key); + if (apply_apple_fn_media) + key = ukbd_apple_fn_media(key); if (sc->sc_flags & UKBD_FLAG_APPLE_SWAP) key = ukbd_apple_swap(key); if (key == KEY_NONE || key >= UKBD_NKEYCODE) @@ -792,6 +838,8 @@ ukbd_intr_callback(struct usb_xfer *xfer, usb_error_t error) if (modifiers & MOD_FN) key = ukbd_apple_fn(key); + if (apply_apple_fn_media) + key = ukbd_apple_fn_media(key); if (sc->sc_flags & UKBD_FLAG_APPLE_SWAP) key = ukbd_apple_swap(key); if (key == KEY_NONE || key == KEY_ERROR || key >= UKBD_NKEYCODE) @@ -1053,13 +1101,26 @@ ukbd_parse_hid(struct ukbd_softc *sc, const uint8_t *ptr, uint32_t len) sc->sc_flags |= UKBD_FLAG_APPLE_EJECT; DPRINTFN(1, "Found Apple eject-key\n"); } - if (hid_locate(ptr, len, - HID_USAGE2(0xFFFF, 0x0003), - hid_input, 0, &sc->sc_loc_apple_fn, &flags, - &sc->sc_id_apple_fn)) { - if (flags & HIO_VARIABLE) - sc->sc_flags |= UKBD_FLAG_APPLE_FN; - DPRINTFN(1, "Found Apple FN-key\n"); + /* + * check the same vendor pages that linux does to find the one apple + * uses for the function key. + */ + static const uint16_t apple_pages[] = { + HUP_APPLE, /* HID_UP_CUSTOM in linux */ + HUP_MICROSOFT, /* HID_UP_MSVENDOR in linux */ + HUP_HP, /* HID_UP_HPVENDOR2 in linux */ + 0xFFFF /* Original FreeBSD check (Remove?) */ + }; + for (int i = 0; i < (int)nitems(apple_pages); i++) { + if (hid_locate(ptr, len, HID_USAGE2(apple_pages[i], 0x0003), + hid_input, 0, &sc->sc_loc_apple_fn, &flags, + &sc->sc_id_apple_fn)) { + if (flags & HIO_VARIABLE) + sc->sc_flags |= UKBD_FLAG_APPLE_FN; + DPRINTFN(1, "Found Apple FN-key on page 0x%04x\n", + apple_pages[i]); + break; + } } /* figure out event buffer */ From nobody Wed Apr 22 20:08:07 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g19JS1cR2z6bDYQ for ; Wed, 22 Apr 2026 20:08:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g19JS0LVFz3LfM for ; Wed, 22 Apr 2026 20:08:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776888488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JIHyD2xhchzSwXF/KqQm8ScscDnNFBnpBwBdHy+d+qU=; b=tVhH2CCvCFynWGlmR5opMEqD09GIH5tFebQPdeU/oWtumGzAlNN/YM3FBJ3vUf02yw10yi s9uXWuL4T15oITUIb2eOJ4PSdZnP4PwGpUGXDiMyx22OY40H80uVLGn6nujy0qttW9wN3T 8XRTTtZT0whTsZqRYnfSVH19i5rKNDG6+992I2PcV8KWidD7+/B+JfN3LHvM1Atsw4IvlJ sWt9vP8pSNtQCmiTwsv6h/nMCv6WDKS5A8uSEKkQ5BdSpsbNiHpl+yeA3ny/XMDd6oJnE+ 6Xnrq3csaqTmHQapcmuJ5UrhsXRt01NYMOKbQXEeqHVb6PVoGx2eQ+xO7mLzNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776888488; a=rsa-sha256; cv=none; b=X21rW5fMZPSWcl74YcmJd+T6jzDzGu4sIHyd2ERN2cQQTzKiigZEUdsKOb1jkp1GqBhiBr kjFnF1YYGjSsJ1ItNQ6aPr2BglgcyCbjqBSKGcwxwjWJUTERiMPR0wYPI4anTHUeUFMVYd lGdkGZkWuCGNfmoWv1981fo69F+0c035/f5+NsNolVx1ZShyTscV1N82emsnvLzSHEU9C/ 2Beb83LhTusuoRuXvWtM5ITRVJL5/qf4WdF7fS+ktQbJcBkPl3f7wxveBVXzi5y+YmfsEx zkQHpg2Apl6SAYHq1dbl9fpQdXvqwJuBem2bk1Wg7qiGi7Bul01U7vidfvq5jA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776888488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JIHyD2xhchzSwXF/KqQm8ScscDnNFBnpBwBdHy+d+qU=; b=MkA6abdV/Pa4oyif9Kl9q2UUQsVHkQFxTFN9F56nkU0BQE5r03/TSD4C+m6QDudIVADD8j Ey+yq8WvTICxXAVgKLTKKneXGLs3KwVlSoAH9cywB0UeZZx9J/8jeROPQF7kb1eu6fdu0v ZBVmoD2mqR10I8rdBZCHK4mZ9Fg5BIDHEDq6xKhPopseFC2NX8L+2VRi+xeXZBSKLaGgxb xDhhVOM+sia4iS5Yh8cX7kkaKbciOWtNJW2/hU0uQrlvGt60wrDImD6FG/5PFAO3B49TBG MJNytkk0J/ekj/vp+LAEYGrqNhYSk+hxxO09E9vmAulIp+4IoHyIfFagwr/LDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g19JR6xtKzl10 for ; Wed, 22 Apr 2026 20:08:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 227f0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 20:08:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: tslight From: Vladimir Kondratyev Subject: git: 393c53fd219d - stable/15 - hkbd(4): be more cautious & explicit about Apple vendor checking List-Id: Commits to the stable branches 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: 393c53fd219d7f4f00413d49943714623cd52b5d Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 20:08:07 +0000 Message-Id: <69e92aa7.227f0.5460b4d4@gitrepo.freebsd.org> The branch stable/15 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=393c53fd219d7f4f00413d49943714623cd52b5d commit 393c53fd219d7f4f00413d49943714623cd52b5d Author: tslight AuthorDate: 2026-03-29 13:16:57 +0000 Commit: Vladimir Kondratyev CommitDate: 2026-04-22 19:59:02 +0000 hkbd(4): be more cautious & explicit about Apple vendor checking Apply the changes to ukbd(4) as well. Signed-off-by: tslight Reviewed by: wulf MFC after: 1 month Pull Request: https://github.com/freebsd/freebsd-src/pull/1998 (cherry picked from commit 103325323c7daf9fe6c9a6c71aa5c90974c9dff4) --- sys/dev/hid/hkbd.c | 63 +++++++++++++++++++++++-------------------- sys/dev/usb/input/ukbd.c | 57 +++++++++++++++++++++------------------ sys/modules/hid/hkbd/Makefile | 2 +- 3 files changed, 66 insertions(+), 56 deletions(-) diff --git a/sys/dev/hid/hkbd.c b/sys/dev/hid/hkbd.c index a91a01a385e3..9ab02e940089 100644 --- a/sys/dev/hid/hkbd.c +++ b/sys/dev/hid/hkbd.c @@ -73,6 +73,8 @@ #include #include +#include "usbdevs.h" + #ifdef EVDEV_SUPPORT #include #include @@ -828,40 +830,43 @@ hkbd_parse_hid(struct hkbd_softc *sc, const uint8_t *ptr, uint32_t len, sc->sc_kbd_size = hid_report_size_max(ptr, len, hid_input, &sc->sc_kbd_id); + const struct hid_device_info *hw = hid_get_device_info(sc->sc_dev); + /* investigate if this is an Apple Keyboard */ - if (hidbus_locate(ptr, len, - HID_USAGE2(HUP_CONSUMER, HUG_APPLE_EJECT), - hid_input, tlc_index, 0, &sc->sc_loc_apple_eject, &flags, - &sc->sc_id_apple_eject, NULL)) { - if (flags & HIO_VARIABLE) - sc->sc_flags |= HKBD_FLAG_APPLE_EJECT | - HKBD_FLAG_APPLE_SWAP; - DPRINTFN(1, "Found Apple eject-key\n"); - } - /* - * check the same vendor pages that linux does to find the one apple - * uses for the function key. - */ - static const uint16_t apple_pages[] = { - HUP_APPLE, /* HID_UP_CUSTOM in linux */ - HUP_MICROSOFT, /* HID_UP_MSVENDOR in linux */ - HUP_HP, /* HID_UP_HPVENDOR2 in linux */ - 0xFFFF /* Original FreeBSD check (Remove?) */ - }; - for (int i = 0; i < (int)nitems(apple_pages); i++) { + if (hw->idVendor == USB_VENDOR_APPLE) { /* belt & braces! */ if (hidbus_locate(ptr, len, - HID_USAGE2(apple_pages[i], 0x0003), - hid_input, tlc_index, 0, - &sc->sc_loc_apple_fn, &flags, - &sc->sc_id_apple_fn, NULL)) { + HID_USAGE2(HUP_CONSUMER, HUG_APPLE_EJECT), + hid_input, tlc_index, 0, &sc->sc_loc_apple_eject, &flags, + &sc->sc_id_apple_eject, NULL)) { if (flags & HIO_VARIABLE) - sc->sc_flags |= HKBD_FLAG_APPLE_FN; - DPRINTFN(1, "Found Apple FN-key on page 0x%04x\n", - apple_pages[i]); - break; + sc->sc_flags |= HKBD_FLAG_APPLE_EJECT | + HKBD_FLAG_APPLE_SWAP; + DPRINTFN(1, "Found Apple eject-key\n"); + } + /* + * check the same vendor pages that linux does to find the one + * apple uses for the function key. + */ + static const uint16_t apple_pages[] = { + HUP_APPLE, /* HID_UP_CUSTOM in linux */ + HUP_MICROSOFT, /* HID_UP_MSVENDOR in linux */ + HUP_HP, /* HID_UP_HPVENDOR2 in linux */ + 0xFFFF /* Original FreeBSD check (Remove?) */ + }; + for (int i = 0; i < (int)nitems(apple_pages); i++) { + if (hidbus_locate(ptr, len, + HID_USAGE2(apple_pages[i], 0x0003), + hid_input, tlc_index, 0, &sc->sc_loc_apple_fn, &flags, + &sc->sc_id_apple_fn, NULL)) { + if (flags & HIO_VARIABLE) + sc->sc_flags |= HKBD_FLAG_APPLE_FN; + DPRINTFN(1, "Found Apple FN-key on page 0x%04x\n", + apple_pages[i]); + break; + } } } - + /* figure out event buffer */ if (hidbus_locate(ptr, len, HID_USAGE2(HUP_KEYBOARD, 0x00), diff --git a/sys/dev/usb/input/ukbd.c b/sys/dev/usb/input/ukbd.c index c15528553086..3ebdf1e9747d 100644 --- a/sys/dev/usb/input/ukbd.c +++ b/sys/dev/usb/input/ukbd.c @@ -205,6 +205,7 @@ struct ukbd_softc { uint16_t sc_inputs; uint16_t sc_inputhead; uint16_t sc_inputtail; + uint16_t sc_vendor_id; uint8_t sc_leds; /* store for async led requests */ uint8_t sc_iface_index; @@ -1093,33 +1094,36 @@ ukbd_parse_hid(struct ukbd_softc *sc, const uint8_t *ptr, uint32_t len) hid_input, &sc->sc_kbd_id); /* investigate if this is an Apple Keyboard */ - if (hid_locate(ptr, len, - HID_USAGE2(HUP_CONSUMER, HUG_APPLE_EJECT), - hid_input, 0, &sc->sc_loc_apple_eject, &flags, - &sc->sc_id_apple_eject)) { - if (flags & HIO_VARIABLE) - sc->sc_flags |= UKBD_FLAG_APPLE_EJECT; - DPRINTFN(1, "Found Apple eject-key\n"); - } - /* - * check the same vendor pages that linux does to find the one apple - * uses for the function key. - */ - static const uint16_t apple_pages[] = { - HUP_APPLE, /* HID_UP_CUSTOM in linux */ - HUP_MICROSOFT, /* HID_UP_MSVENDOR in linux */ - HUP_HP, /* HID_UP_HPVENDOR2 in linux */ - 0xFFFF /* Original FreeBSD check (Remove?) */ - }; - for (int i = 0; i < (int)nitems(apple_pages); i++) { - if (hid_locate(ptr, len, HID_USAGE2(apple_pages[i], 0x0003), - hid_input, 0, &sc->sc_loc_apple_fn, &flags, - &sc->sc_id_apple_fn)) { + if (sc->sc_vendor_id == USB_VENDOR_APPLE) { + if (hid_locate(ptr, len, + HID_USAGE2(HUP_CONSUMER, HUG_APPLE_EJECT), + hid_input, 0, &sc->sc_loc_apple_eject, &flags, + &sc->sc_id_apple_eject)) { if (flags & HIO_VARIABLE) - sc->sc_flags |= UKBD_FLAG_APPLE_FN; - DPRINTFN(1, "Found Apple FN-key on page 0x%04x\n", - apple_pages[i]); - break; + sc->sc_flags |= UKBD_FLAG_APPLE_EJECT; + DPRINTFN(1, "Found Apple eject-key\n"); + } + /* + * check the same vendor pages that linux does to find the one + * apple uses for the function key. + */ + static const uint16_t apple_pages[] = { + HUP_APPLE, /* HID_UP_CUSTOM in linux */ + HUP_MICROSOFT, /* HID_UP_MSVENDOR in linux */ + HUP_HP, /* HID_UP_HPVENDOR2 in linux */ + 0xFFFF /* Original FreeBSD check (Remove?) */ + }; + for (int i = 0; i < (int)nitems(apple_pages); i++) { + if (hid_locate(ptr, len, + HID_USAGE2(apple_pages[i], 0x0003), + hid_input, 0, &sc->sc_loc_apple_fn, &flags, + &sc->sc_id_apple_fn)) { + if (flags & HIO_VARIABLE) + sc->sc_flags |= UKBD_FLAG_APPLE_FN; + DPRINTFN(1, "Found Apple FN-key on page 0x%04x\n", + apple_pages[i]); + break; + } } } @@ -1208,6 +1212,7 @@ ukbd_attach(device_t dev) sc->sc_udev = uaa->device; sc->sc_iface = uaa->iface; + sc->sc_vendor_id = uaa->info.idVendor; sc->sc_iface_index = uaa->info.bIfaceIndex; sc->sc_iface_no = uaa->info.bIfaceNum; sc->sc_mode = K_XLATE; diff --git a/sys/modules/hid/hkbd/Makefile b/sys/modules/hid/hkbd/Makefile index 42b5d69dda9e..82f6599cca1d 100644 --- a/sys/modules/hid/hkbd/Makefile +++ b/sys/modules/hid/hkbd/Makefile @@ -3,6 +3,6 @@ KMOD= hkbd SRCS= hkbd.c SRCS+= opt_hid.h opt_evdev.h opt_kbd.h opt_hkbd.h -SRCS+= bus_if.h device_if.h +SRCS+= bus_if.h device_if.h usbdevs.h .include From nobody Wed Apr 22 20:08:09 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g19JT4dWgz6bDkf for ; Wed, 22 Apr 2026 20:08:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g19JT1FM7z3Lr4 for ; Wed, 22 Apr 2026 20:08:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776888489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fx/BJv79CFluRtjJq1j8Yvkp8ra8XI0VEEoamXK4w54=; b=j3IT4Nr59tWwnpPINbgY1bKMlLFDJTne8h4IoIVDGSuUZ8voLzPkZearJW/6uYjsXBvylV 8CdVehHO9oO50GwS1QWIegGlONYCFMvU1UiVMWdduJtkN87/TpOtenVk5qEUH3ND6svyw0 ASnfkaV8JkJYxx+VcS+g6EjUv7PWJFIkeUdSvK6EdFneByclYRXnPX1g1hjV/GVORy28+g bbkvEpMm2whgR4ViF621kxRDNBsRL0ev6cGj4i/FcumIhpsvbjKOsMHK0R2b24p5lYdqx+ 4QLtKHpl/l0/GUVcw4oUWwGb/ZNPS9dQYAV980l61Uim0+7uCa/BBqJPORt2DA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776888489; a=rsa-sha256; cv=none; b=Ss4wBOyCD9NkMgw6h9TRDyB/Z4I8CcJYnNq/enfVC9EaWOtP8zvz8aXoA/Akprgwz/EFd4 tITLlG2wT3NucgXpjIX0zb2wqYbkfdYd6fK3uPuX2v+qXo7IF9goOBXjhT1KI+D075bxw/ vPqGw9UZeOlHjsaDlrnkMPqeMCjec4+77V1iOzhR0S6dnGq34ihpbaP4A3yOJC9Ypi12lE GhgzY1OzLjZsLSgiAHX8MXopxUXUb6zYw/mSqN322KQwJYSYcXY5oO3E6NHMa8pi+3bh1t btIUmU6h1Ci6tBT9uau5K2lE63GN8G5Im6HiYimN0HdXGlTOmF7Nrn+bwz0+vA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776888489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fx/BJv79CFluRtjJq1j8Yvkp8ra8XI0VEEoamXK4w54=; b=gnT/Ea+/hRqNDgOHWVTg3ZouOa1njD0MJavQ15aSka5oQCQ4BireKOWKmX7ralbP8SZo/v 7MLypyhINrtFvOnNlc/o/NZCeX6Mu3rTQJIQSxE+4cvkWAH2NjA+GYFbTZHfCUVHXr2KfY iTp9v9gWFHNgm/ruiWg9QtN6TfAtyTLdaWRTnBFqe+eVd8PuDyb+xPMRyvhUKcOR7W3y8t 9H4uupm6+al1H3m/UnyGjUsV9YRIhOW8VxdF48mj9JTEbc0CaXAJHUGtCxaWGedgohr6Vc bD/ULfjzsLNNYb6+G02clFPkrhyHWyvVlit6ExLEK4a0KW7YTG3ZErFo8FkM2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g19JT0dnkzlxh for ; Wed, 22 Apr 2026 20:08:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21dbc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 20:08:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Toby Slight From: Vladimir Kondratyev Subject: git: 03fb1afc3ca7 - stable/15 - hkbd(4): add some extra handy fn key bindings List-Id: Commits to the stable branches 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: 03fb1afc3ca70e187b08ccb0a1fd9916a322510d Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 20:08:09 +0000 Message-Id: <69e92aa9.21dbc.22ca216@gitrepo.freebsd.org> The branch stable/15 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=03fb1afc3ca70e187b08ccb0a1fd9916a322510d commit 03fb1afc3ca70e187b08ccb0a1fd9916a322510d Author: Toby Slight AuthorDate: 2026-03-29 13:16:57 +0000 Commit: Vladimir Kondratyev CommitDate: 2026-04-22 19:59:03 +0000 hkbd(4): add some extra handy fn key bindings - Fn+S for ScrollLock as it's very useful to have ScrollLock on FreeBSD's TTY. - Fn+P for PrtSc/SysRq, as it's another very handy but sadly missing key on Macbooks. - Some other Fn+ combinations duplicating existing keys. Apply the change to ukbd(4) as well. Signed-off-by: Toby Slight Reviewed by: wulf MFC after: 1 month Pull Request: https://github.com/freebsd/freebsd-src/pull/1998 (cherry picked from commit bb8230f838c8d5f8d362a0dad4809908b44ae379) --- sys/dev/hid/hkbd.c | 10 ++++++++++ sys/dev/usb/input/ukbd.c | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/sys/dev/hid/hkbd.c b/sys/dev/hid/hkbd.c index 9ab02e940089..c98f4be69169 100644 --- a/sys/dev/hid/hkbd.c +++ b/sys/dev/hid/hkbd.c @@ -623,6 +623,16 @@ static uint32_t hkbd_apple_fn(uint32_t keycode) { switch (keycode) { + case 0x0b: return 0x50; /* H -> LEFT ARROW */ + case 0x0d: return 0x51; /* J -> DOWN ARROW */ + case 0x0e: return 0x52; /* K -> UP ARROW */ + case 0x0f: return 0x4f; /* L -> RIGHT ARROW */ + case 0x36: return 0x4a; /* COMMA -> HOME */ + case 0x37: return 0x4d; /* DOT -> END */ + case 0x18: return 0x4b; /* U -> PGUP */ + case 0x07: return 0x4e; /* D -> PGDN */ + case 0x16: return 0x47; /* S -> SCROLLLOCK */ + case 0x13: return 0x46; /* P -> SYSRQ/PRTSC */ case 0x28: return 0x49; /* RETURN -> INSERT */ case 0x2a: return 0x4c; /* BACKSPACE -> DEL */ case 0x50: return 0x4a; /* LEFT ARROW -> HOME */ diff --git a/sys/dev/usb/input/ukbd.c b/sys/dev/usb/input/ukbd.c index 3ebdf1e9747d..37deb5c56fbd 100644 --- a/sys/dev/usb/input/ukbd.c +++ b/sys/dev/usb/input/ukbd.c @@ -677,6 +677,16 @@ static uint32_t ukbd_apple_fn(uint32_t keycode) { switch (keycode) { + case 0x0b: return 0x50; /* H -> LEFT ARROW */ + case 0x0d: return 0x51; /* J -> DOWN ARROW */ + case 0x0e: return 0x52; /* K -> UP ARROW */ + case 0x0f: return 0x4f; /* L -> RIGHT ARROW */ + case 0x36: return 0x4a; /* COMMA -> HOME */ + case 0x37: return 0x4d; /* DOT -> END */ + case 0x18: return 0x4b; /* U -> PGUP */ + case 0x07: return 0x4e; /* D -> PGDN */ + case 0x16: return 0x47; /* S -> SCROLLLOCK */ + case 0x13: return 0x46; /* P -> SYSRQ/PRTSC */ case 0x28: return 0x49; /* RETURN -> INSERT */ case 0x2a: return 0x4c; /* BACKSPACE -> DEL */ case 0x50: return 0x4a; /* LEFT ARROW -> HOME */ From nobody Wed Apr 22 20:08:10 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g19JV4N9Qz6bDq4 for ; Wed, 22 Apr 2026 20:08:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g19JV1jBhz3Lln for ; Wed, 22 Apr 2026 20:08:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776888490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gWFmC2kda8mth9rbH1QZ5OtOArUkBXGO+7xPqQMUQec=; b=U/DqALvFf1MKW5w6N2eyX7yBGMrIz7ID0ZRA0MfVDXdZopN0LNYihea9FdP419jGbKZjpB sfUvuDlQ8WcwIwQMv7yxsHTyFln8qqXT7fBRSUXySTXzXQmpYDnNh3m/7zJoPc70ue/Rd+ LVoMAeHN0SCLF3SqTPgkmpD5iIHjb2MKVhTQpnZiHoCnEHmjJfzPHCTFbNxiYch1GI9RwH 3JCAM7RWepstCR1MCx8bzIL95pglXXsWYhGq5Gp/5YIcyAZ6r/uv9KPAwB9lMboE9d4aYr 4nmhTAV6SjbejHhzEw8y3iQMgUEDzALshJZmTIHlkBut5ry4C0Bzph+KgMLboA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776888490; a=rsa-sha256; cv=none; b=OKwoTGYJgXZI7Hl6TmCVLV+6OmEYgksadBnlSFB/2Ytxp55sWkDYDdSTkE3MTm46KJIk2o qibQRyWhRgbTaWv4pteFcdQsvQHowUhkqHMD8G1r3ombvn2XL5DbD1J9ngT5HtBwaWgcrn 55mr9lIv2MkstoDUzhubA4MFqBDKgG9A5nVnv6Kdu0S6P9kQXA8oVNA61CAx+4cDG7DY4F rbywyrDWLomHUWOXnPpj3Q9K58hjtMF/N+KmaJAZ92zm1D27UjwruJFCU7ejWjrupqrC46 req3NX0aV6yL7ryB7QNtfvGZPAa5BnLLntZhFs2A03Nvs83pVhS0s2k8S7TpuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776888490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gWFmC2kda8mth9rbH1QZ5OtOArUkBXGO+7xPqQMUQec=; b=SwyW+ABeJw3+2c/NebC2ERUXceun8libPf+Xdfl28zNhshJo7daY1/VUR8hxhL4KO8JJar VhMYAdngvuylI4BLb2Ct0eYLwXFMVgHhFjYgX6UcoJkilh8VnanjmVJBfaTg4VDALpLNba 7JFrNxNlAZYiDmunRgxyhTbxaMoCBRMmRPPN9/JsWpFWqZ4EUm2egJZO3+7XeAvd3PhlOC bi26n5634CnFDg3Fj5rrVZ+bzxyEVgsjMOm41I4DDozkO41Ppzj4pMLgTDXIa3G+KVXsU9 bID6VvsUEA1+l7k2eh/NKHNLYBHykyY764dHMnYzG40pROJlShWTzahnsU0+Cw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g19JV1DwRzlxj for ; Wed, 22 Apr 2026 20:08:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f671 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 20:08:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Toby Slight From: Vladimir Kondratyev Subject: git: fec425a2a8b7 - stable/15 - ukbd(4): make debug guard consistent with hkbd(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: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: fec425a2a8b77d1367d03136a373efec1b671a34 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 20:08:10 +0000 Message-Id: <69e92aaa.1f671.f97ad1e@gitrepo.freebsd.org> The branch stable/15 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=fec425a2a8b77d1367d03136a373efec1b671a34 commit fec425a2a8b77d1367d03136a373efec1b671a34 Author: Toby Slight AuthorDate: 2026-03-29 13:16:57 +0000 Commit: Vladimir Kondratyev CommitDate: 2026-04-22 19:59:03 +0000 ukbd(4): make debug guard consistent with hkbd(4) Signed-off-by: Toby Slight Reviewed by: wulf MFC after: 1 month Pull Request: https://github.com/freebsd/freebsd-src/pull/1998 (cherry picked from commit 920ad3cef178c9bea37c0d07c22440828a5cb7c8) --- sys/dev/usb/input/ukbd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/input/ukbd.c b/sys/dev/usb/input/ukbd.c index 37deb5c56fbd..7a33a9ad2efe 100644 --- a/sys/dev/usb/input/ukbd.c +++ b/sys/dev/usb/input/ukbd.c @@ -95,21 +95,23 @@ #ifdef USB_DEBUG static int ukbd_debug = 0; +#endif static int ukbd_no_leds = 0; static int ukbd_pollrate = 0; static int ukbd_apple_fn_mode = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, ukbd, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "USB keyboard"); +#ifdef USB_DEBUG SYSCTL_INT(_hw_usb_ukbd, OID_AUTO, debug, CTLFLAG_RWTUN, &ukbd_debug, 0, "Debug level"); +#endif SYSCTL_INT(_hw_usb_ukbd, OID_AUTO, no_leds, CTLFLAG_RWTUN, &ukbd_no_leds, 0, "Disables setting of keyboard leds"); SYSCTL_INT(_hw_usb_ukbd, OID_AUTO, pollrate, CTLFLAG_RWTUN, &ukbd_pollrate, 0, "Force this polling rate, 1-1000Hz"); SYSCTL_INT(_hw_usb_ukbd, OID_AUTO, apple_fn_mode, CTLFLAG_RWTUN, &ukbd_apple_fn_mode, 0, "0 = Fn + F1..12 -> media, 1 = F1..F12 -> media"); -#endif #define UKBD_EMULATE_ATSCANCODE 1 #define UKBD_DRIVER_NAME "ukbd" From nobody Wed Apr 22 20:08:11 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g19JW6t7sz6bDq8 for ; Wed, 22 Apr 2026 20:08:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g19JW2z3wz3Lrq for ; Wed, 22 Apr 2026 20:08:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776888491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FeBnJ9NeiQCUe6PCHz7JjJoxTBqni+e9wF5GpiKAyFM=; b=oOt0MF3QWMktqMFb7WUy5NlustlOserbPcDruygEvpNJKr1kvXAKfXQCBqYgyWi7FNJgMw pkx1ibxIfpX4vPl7f2h2e5m0HCQZAMiH59zn+KeX2MYdSfmFRdC6ScqlDv7/WegzTx8JPm R6ihsK4eqNQ5VzuzKZNq9spcAC5KNqf2Ap4PMueAhg8Xdp9z+q/3djJsMt226H28oIhbHM jhsneDEeZW4Gt2zVSIxY0thSlYNtkTAbotk3i4YLeBoVN5EBcXrz2F84+0qAGY+k3pYsIy ZiUQCfnYSzKiWHuDaJVWCOvwSl5QfV8kfZe/NkpX0otOjp8WkPofZsuQGBhPTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776888491; a=rsa-sha256; cv=none; b=CN3GUP+9mPiC6tRqHD847U/2CMefJR/fWXanO4T9eAWb7moFwmeUf3JRwgX2fUfCSIYj5U zHaFo2guTO2TsMvPVjSeKe4Vqdd3fqMr8lwNUfXUiq+eyLIHwRSGRMpItI90meIQ4YyHme L9NvL7BE/6ANyrd15l+6wApXX2jvHQ5msmKRc0h3jiX3hWqfPlK66tA3gc7BD+d32lNJ9M 21YFxyqb5o2Kfaa7cagTZSY2XfsKaAjjsrLU/lr+dz67kkjja5lqUDAF4BWkxXx0J8zZ3h g/3cKF/XQZXgQYytrvuIEgQ2WEMro5fTTFWwDrfhY/I71dv6gGVaohFcYKZnLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776888491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FeBnJ9NeiQCUe6PCHz7JjJoxTBqni+e9wF5GpiKAyFM=; b=Rf7WoLOTUdTi06nYzV9EupkNPC4HQcMOiGDMgKtJxmCKtd4+ouSEDH1VeBIXPUxs3K+Y/o NrQEp9oorDuwFA3TlNz/guBFlEBQIxJbMVc0ULo9U91Cw15caBE8fMlS0GPEKnnRRgz4BO 5rASxM5XpWtlyvVKULUY/niyWGu2MnKpI9RTrsBEHdel3wYNbyOQc3UgF8cHCZPkEt5kbQ +8UX2OsLVBIixk+lhb1DHQcUxV7RUpW/nehbYqGkRUlTyM1vECBcGoRCI92CIA70n7ZfZl 3FAm+9Oy2dAytf34+GxayftgBSehhu8DYl+MQizkCRe/NNlr8kPJgXCEjXbkiQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g19JW21VwzlqN for ; Wed, 22 Apr 2026 20:08:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2102d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 20:08:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 10678006c6db - stable/15 - asmc(4): Add PnP record List-Id: Commits to the stable branches 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: 10678006c6db9195b32491b5c4b811fefc96a5cc Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 20:08:11 +0000 Message-Id: <69e92aab.2102d.4544cc7f@gitrepo.freebsd.org> The branch stable/15 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=10678006c6db9195b32491b5c4b811fefc96a5cc commit 10678006c6db9195b32491b5c4b811fefc96a5cc Author: Vladimir Kondratyev AuthorDate: 2026-03-29 19:00:59 +0000 Commit: Vladimir Kondratyev CommitDate: 2026-04-22 19:59:03 +0000 asmc(4): Add PnP record To load asmc(4) automagically on boot with devd(8). MFC after: 1 month (cherry picked from commit 056e29070f083ac4cea31ac0a08619add6370839) --- sys/dev/asmc/asmc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index b6b98b1c8953..772df00f34eb 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -535,6 +535,7 @@ static char *asmc_ids[] = { "APP0001", NULL }; static unsigned int light_control = 0; +ACPI_PNP_INFO(asmc_ids); DRIVER_MODULE(asmc, acpi, asmc_driver, NULL, NULL); MODULE_DEPEND(asmc, acpi, 1, 1, 1); From nobody Wed Apr 22 20:08:13 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g19JY65Dkz6bDs5 for ; Wed, 22 Apr 2026 20: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g19JY48lxz3Lwt for ; Wed, 22 Apr 2026 20: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=1776888493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ts2lOjXH9qnjVEBLPg7t9UcoGtQtrYxoAV+adCyuuVg=; b=AkcUlTOdyMbXKozBHmv2tOSzB2lNN6PyKk9OQB4PX1T9GhaapHtIkb3zRWRXzP5q/XBqHT BvjzKChISxDyrS6CmOagbq3l4tUlni+u9KT5hZw1o2QAwzwrN0VjiYXUC3RA0jZS9st2Hk BMbaw5/wMuVKWXIjDXYPo4fWzvHLgTolNjF++DnuIAfyWGVqWyRN9E1NqpqOM+tc+dL6Hm l6i/dT5g4Fksvot3bGtHxKec3erZw0Mv98puAvlKz1s4IAu7vBx2qRcwhZvbFNzscbgK8D /urVNfmAieI8zHqnBD9wntAeUhJtUR4/3fLcgsVqcPbAgo5bgtpbPaKPK1fD3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776888493; a=rsa-sha256; cv=none; b=yl/PU15YaJiPc6b1+VXmiXKdyrIesuiFEXbH8rGqcmkQnbcNy7JF8xQVHmwcgY49/u6/S/ IYtWyNoMvGxi2JSlt5bluFPsQWYtws1FeBIp7wjyyA2TWwrwHWiopTJqGHuNvYoEuH2f7M v6FyYeIEeM5zYXV68LKDVENCYSPDBSVTbfyJ6vlZ2YYD9WS8pgEwm/bvWyT+Qwa3uqVfHx YK83UZhGq4raEasxg1YyjHNKyuWxIqon90cZRKrT6Y2WaC2Kww02dVLrOpzktRXRbxcW6o Z4C8EbYVZPlE2mVNdJIFZJyGGVO+PqUObNjQqfZ72BGIthiw1PaL/xygxJmibg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776888493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ts2lOjXH9qnjVEBLPg7t9UcoGtQtrYxoAV+adCyuuVg=; b=Rjgi0RcCBqjyUi1x38Cpg8hfMZ8IaPWHkf7Y1hJhxyPeSXJKRXz/5jJ3kZLnqjqGkaAAgu I6HE6rayJkLv7A3bQWlbEAVzC44BFDc6Jr6A5M5Irm8jVYlgS4LlqX1v0Fj0O438SjY0Ug 0HVKYBG0vQ5Q+A7wFiKniA8ewBbCQCYcTLWcH/C8URxhEb2hLArkZ2JdvliRCRPcBy8Ct+ UtpYw3D8WQkQ3+puliNxt3atDrC4T9p2EBssSxOvTQxIsR9koUv1bKjph7XbU1m3MpEMC8 mo6tL+/9TQb7CksOI1oC5VnqpuDjA8cfIE+4nxrLGfsd6pw+YBLqNtBEi/y+9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g19JY3lNbzlxl for ; Wed, 22 Apr 2026 20:08:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1fd7f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 20:08:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 5c8640e863a1 - stable/15 - hid: Change Usage Page names to match documentation List-Id: Commits to the stable branches 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: 5c8640e863a1366752a123441a5b686e7c8401eb Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 20:08:13 +0000 Message-Id: <69e92aad.1fd7f.5ccf2055@gitrepo.freebsd.org> The branch stable/15 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=5c8640e863a1366752a123441a5b686e7c8401eb commit 5c8640e863a1366752a123441a5b686e7c8401eb Author: Vladimir Kondratyev AuthorDate: 2026-04-12 18:09:22 +0000 Commit: Vladimir Kondratyev CommitDate: 2026-04-22 19:59:03 +0000 hid: Change Usage Page names to match documentation According to "HID Usage Tables FOR Universal Serial Bus (USB)" Usage Page ID range 0x93-0xF1CF is "Reserved" and Usage Page ID range 0xFF00-0xFFFF is "Vendor-defined". MFC after: 1 week (cherry picked from commit 2ba6ce584a8cab75262cb86a5daf310d6706890c) --- sys/dev/hid/hid.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/dev/hid/hid.h b/sys/dev/hid/hid.h index 02709d549a56..f164e48341ed 100644 --- a/sys/dev/hid/hid.h +++ b/sys/dev/hid/hid.h @@ -57,10 +57,14 @@ #define HUP_SCALE 0x008c #define HUP_CAMERA_CONTROL 0x0090 #define HUP_ARCADE 0x0091 -#define HUP_APPLE 0x00ff +#define HUP_RESERVED_FF 0x00ff #define HUP_FIDO 0xf1d0 -#define HUP_MICROSOFT 0xff00 -#define HUP_HP 0xff01 +#define HUP_VENDOR_00 0xff00 +#define HUP_VENDOR_01 0xff01 +/* XXX compat */ +#define HUP_APPLE HUP_RESERVED_FF +#define HUP_MICROSOFT HUP_VENDOR_00 +#define HUP_HP HUP_VENDOR_01 /* Usages, generic desktop */ #define HUG_POINTER 0x0001 From nobody Wed Apr 22 20:08:12 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g19JX4NxHz6bDqC for ; Wed, 22 Apr 2026 20:08:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g19JX3MBNz3LmG for ; Wed, 22 Apr 2026 20:08:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776888492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NFQUQ4trkCbgai+gV0a8hUjNRK66Ey83zWJ0D9piRTw=; b=p7iuVLXd5+fjtSdOhJfdDBagWDrnDjnVlIjm0Y1F2zGKCNRsZlCL3PazS2PnzZHxjxi21U 1zk23p89DTRBOMY8uIJXlew9qLT9pqZaGsUX/OKbDT7ytqwPy1V31kdKI9yiXAQhN5JQft MpKT7hjlXQFTpIwLt59MMboLxwdcrmPtXWO/PYWdVzRBvc5g6ze/hJm/0Qtqa4J4TzQ6fy d8nsS9uzU7dus1SDGYRfRGpU7M8Q+7HdPwtmA2LnUByOApS31ntHvZYabk/V1dvpJKadSI ic8lg2Lp0Z8H+HBb12JrYSc7FlZFjzCwNEvlYm3W7GTpA2BHayJnVrSSCbC/tw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776888492; a=rsa-sha256; cv=none; b=EO20NAzltTEMeoHBiZ5ZBfZ4OQYnM3ktCGUdx7IebeV3iaq0/0ilmt/ctJZqW+i+jN5zsK bDNC58coItiQ1okm/KH8tCkJvMznZRKE5C3tY7NRwqLw2aaCMSOS2jywmTFWANILbEpJoH aEGHByPb5SWbPFIUA04LXNIlw+vj7+pQMCkb4OCF07QXx5fEItXVfqaGxIs2tTlGQUEqS5 odMlNvDZ3kTm/FBcpC5MVLJsXaQK9J/zoWrk1rM/N/6fDUHIayVZvJpWP3mnj3YptuxO8/ ylu7xAg4CgdDe2pKul8JtmQyz+ROooLrfBawxUScx7Y4VE41qg9qGW1KI7zRIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776888492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NFQUQ4trkCbgai+gV0a8hUjNRK66Ey83zWJ0D9piRTw=; b=D01DcpZjs2OBTmMPKFIP1ZGyleFUSN1W0JIREIgka9O8Vl0gwqLF2p1km0D/mX3MqnZqav 2xhyPggUq4nxD5/meFQb906EZTnuwCgYycOXwS/pdRi3XWOw5POHq9f30m31LP+4vhwSPN RprhXgVd9FbZZk/MjNa5+9GuoeIaPT+SvHMUE7QKpNMSTezvKQmX+Z8RT9Xday9ARwnwdq 8G04sOH8XEFS/0NQW64xxB+8W1NNS7KhpbGO2qGZiUg9of+LSbJqxAhTZMxkpdzzjU+FtR Hl1Q3i265uB10a4zeq3dfxF+4BsP6ibrFElS/03a/gzpWXTthvSbdQAtIoDQ1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g19JX2vqrzm0S for ; Wed, 22 Apr 2026 20:08:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 220e1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 20:08:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 665ea58a3134 - stable/15 - iwmbtfw(8): Identify device type based on HCI quieries result List-Id: Commits to the stable branches 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: 665ea58a31342f6cbe4f597d63616728e850a545 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 20:08:12 +0000 Message-Id: <69e92aac.220e1.10b3c376@gitrepo.freebsd.org> The branch stable/15 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=665ea58a31342f6cbe4f597d63616728e850a545 commit 665ea58a31342f6cbe4f597d63616728e850a545 Author: Vladimir Kondratyev AuthorDate: 2026-04-12 18:09:22 +0000 Commit: Vladimir Kondratyev CommitDate: 2026-04-22 19:59:03 +0000 iwmbtfw(8): Identify device type based on HCI quieries result rather than on VID/PID. Later is not reliable for some types. VID/PID identification can be restored by specifying of -p option. Tested by: arrowd, wulf PR: 290639 MFC after: 1 week (cherry picked from commit 84488787f42bc62b428da37793ac45d1411f2b74) --- usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.c | 105 +++++++++++++++++++++++++ usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.h | 2 + usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.c | 140 ++++++++++------------------------ usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.h | 3 + usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 | 7 +- usr.sbin/bluetooth/iwmbtfw/main.c | 80 +++++++++++++++++-- 6 files changed, 232 insertions(+), 105 deletions(-) diff --git a/usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.c b/usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.c index 3a5cd9d42658..f71aacd6f2e9 100644 --- a/usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.c +++ b/usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.c @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -192,3 +193,107 @@ iwmbt_get_fwname_tlv(struct iwmbt_version_tlv *ver, const char *prefix, return (fwname); } + +int +iwmbt_parse_tlv(uint8_t *data, uint8_t datalen, + struct iwmbt_version_tlv *version) +{ + uint8_t status, type, len; + + status = *data++; + if (status != 0) + return (-1); + datalen--; + + while (datalen >= 2) { + type = *data++; + len = *data++; + datalen -= 2; + + if (datalen < len) + return (-1); + + switch (type) { + case IWMBT_TLV_CNVI_TOP: + assert(len == 4); + version->cnvi_top = le32dec(data); + break; + case IWMBT_TLV_CNVR_TOP: + assert(len == 4); + version->cnvr_top = le32dec(data); + break; + case IWMBT_TLV_CNVI_BT: + assert(len == 4); + version->cnvi_bt = le32dec(data); + break; + case IWMBT_TLV_CNVR_BT: + assert(len == 4); + version->cnvr_bt = le32dec(data); + break; + case IWMBT_TLV_DEV_REV_ID: + assert(len == 2); + version->dev_rev_id = le16dec(data); + break; + case IWMBT_TLV_IMAGE_TYPE: + assert(len == 1); + version->img_type = *data; + break; + case IWMBT_TLV_TIME_STAMP: + assert(len == 2); + version->min_fw_build_cw = data[0]; + version->min_fw_build_yy = data[1]; + version->timestamp = le16dec(data); + break; + case IWMBT_TLV_BUILD_TYPE: + assert(len == 1); + version->build_type = *data; + break; + case IWMBT_TLV_BUILD_NUM: + assert(len == 4); + version->min_fw_build_nn = *data; + version->build_num = le32dec(data); + break; + case IWMBT_TLV_SECURE_BOOT: + assert(len == 1); + version->secure_boot = *data; + break; + case IWMBT_TLV_OTP_LOCK: + assert(len == 1); + version->otp_lock = *data; + break; + case IWMBT_TLV_API_LOCK: + assert(len == 1); + version->api_lock = *data; + break; + case IWMBT_TLV_DEBUG_LOCK: + assert(len == 1); + version->debug_lock = *data; + break; + case IWMBT_TLV_MIN_FW: + assert(len == 3); + version->min_fw_build_nn = data[0]; + version->min_fw_build_cw = data[1]; + version->min_fw_build_yy = data[2]; + break; + case IWMBT_TLV_LIMITED_CCE: + assert(len == 1); + version->limited_cce = *data; + break; + case IWMBT_TLV_SBE_TYPE: + assert(len == 1); + version->sbe_type = *data; + break; + case IWMBT_TLV_OTP_BDADDR: + memcpy(&version->otp_bd_addr, data, sizeof(bdaddr_t)); + break; + default: + /* Ignore other types */ + break; + } + + datalen -= len; + data += len; + } + + return (0); +} diff --git a/usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.h b/usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.h index eb6909a1f91d..1763f8688ed0 100644 --- a/usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.h +++ b/usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.h @@ -152,5 +152,7 @@ extern char *iwmbt_get_fwname(struct iwmbt_version *ver, const char *suffix); extern char *iwmbt_get_fwname_tlv(struct iwmbt_version_tlv *ver, const char *prefix, const char *suffix); +extern int iwmbt_parse_tlv(uint8_t *data, uint8_t datalen, + struct iwmbt_version_tlv *ver); #endif diff --git a/usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.c b/usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.c index 255181b8f4bc..81f1fbe7c5ce 100644 --- a/usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.c +++ b/usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.c @@ -30,7 +30,6 @@ #include #include -#include #include #include #include @@ -408,6 +407,29 @@ iwmbt_load_fwfile(struct libusb_device_handle *hdl, return (0); } +int +iwmbt_bt_reset(struct libusb_device_handle *hdl) +{ + int ret, transferred; + static struct iwmbt_hci_cmd cmd = { + .opcode = htole16(0x0c03), + .length = 0, + }; + uint8_t buf[IWMBT_HCI_MAX_EVENT_SIZE]; + + ret = iwmbt_hci_command(hdl, + &cmd, + buf, + sizeof(buf), + &transferred, + IWMBT_HCI_CMD_TIMEOUT); + + if (ret < 0) + iwmbt_debug("HCI reset command failed: code=%d", ret); + + return (ret); +} + int iwmbt_enter_manufacturer(struct libusb_device_handle *hdl) { @@ -502,8 +524,8 @@ iwmbt_get_version(struct libusb_device_handle *hdl, } int -iwmbt_get_version_tlv(struct libusb_device_handle *hdl, - struct iwmbt_version_tlv *version) +iwmbt_read_version_tlv(struct libusb_device_handle *hdl, + uint8_t *data, uint8_t *datalen) { int ret, transferred; struct iwmbt_hci_event_cmd_compl *event; @@ -512,8 +534,6 @@ iwmbt_get_version_tlv(struct libusb_device_handle *hdl, .length = 1, .data = { 0xff }, }; - uint8_t status, datalen, type, len; - uint8_t *data; uint8_t buf[255]; memset(buf, 0, sizeof(buf)); @@ -533,106 +553,30 @@ iwmbt_get_version_tlv(struct libusb_device_handle *hdl, } event = (struct iwmbt_hci_event_cmd_compl *)buf; - memcpy(version, event->data, sizeof(struct iwmbt_version)); + *datalen = event->header.length - IWMBT_HCI_EVENT_COMPL_HEAD_SIZE; + memcpy(data, event->data, *datalen); - datalen = event->header.length - IWMBT_HCI_EVENT_COMPL_HEAD_SIZE; - data = event->data; - status = *data++; - if (status != 0) - return (-1); - datalen--; + return (0); +} - while (datalen >= 2) { - type = *data++; - len = *data++; - datalen -= 2; +int +iwmbt_get_version_tlv(struct libusb_device_handle *hdl, + struct iwmbt_version_tlv *version) +{ - if (datalen < len) - return (-1); + uint8_t data[255]; + uint8_t datalen; + int ret; - switch (type) { - case IWMBT_TLV_CNVI_TOP: - assert(len == 4); - version->cnvi_top = le32dec(data); - break; - case IWMBT_TLV_CNVR_TOP: - assert(len == 4); - version->cnvr_top = le32dec(data); - break; - case IWMBT_TLV_CNVI_BT: - assert(len == 4); - version->cnvi_bt = le32dec(data); - break; - case IWMBT_TLV_CNVR_BT: - assert(len == 4); - version->cnvr_bt = le32dec(data); - break; - case IWMBT_TLV_DEV_REV_ID: - assert(len == 2); - version->dev_rev_id = le16dec(data); - break; - case IWMBT_TLV_IMAGE_TYPE: - assert(len == 1); - version->img_type = *data; - break; - case IWMBT_TLV_TIME_STAMP: - assert(len == 2); - version->min_fw_build_cw = data[0]; - version->min_fw_build_yy = data[1]; - version->timestamp = le16dec(data); - break; - case IWMBT_TLV_BUILD_TYPE: - assert(len == 1); - version->build_type = *data; - break; - case IWMBT_TLV_BUILD_NUM: - assert(len == 4); - version->min_fw_build_nn = *data; - version->build_num = le32dec(data); - break; - case IWMBT_TLV_SECURE_BOOT: - assert(len == 1); - version->secure_boot = *data; - break; - case IWMBT_TLV_OTP_LOCK: - assert(len == 1); - version->otp_lock = *data; - break; - case IWMBT_TLV_API_LOCK: - assert(len == 1); - version->api_lock = *data; - break; - case IWMBT_TLV_DEBUG_LOCK: - assert(len == 1); - version->debug_lock = *data; - break; - case IWMBT_TLV_MIN_FW: - assert(len == 3); - version->min_fw_build_nn = data[0]; - version->min_fw_build_cw = data[1]; - version->min_fw_build_yy = data[2]; - break; - case IWMBT_TLV_LIMITED_CCE: - assert(len == 1); - version->limited_cce = *data; - break; - case IWMBT_TLV_SBE_TYPE: - assert(len == 1); - version->sbe_type = *data; - break; - case IWMBT_TLV_OTP_BDADDR: - memcpy(&version->otp_bd_addr, data, sizeof(bdaddr_t)); - break; - default: - /* Ignore other types */ - break; - } + memset(data, 0, sizeof(data)); - datalen -= len; - data += len; + ret = iwmbt_read_version_tlv(hdl, data, &datalen); + if (ret < 0) { + iwmbt_debug("Can't get version tlv"); + return (-1); } - return (0); + return (iwmbt_parse_tlv(data, datalen, version)); } int diff --git a/usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.h b/usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.h index aac885dfd153..f1f1f56e0ca2 100644 --- a/usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.h +++ b/usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.h @@ -101,11 +101,14 @@ extern int iwmbt_load_ecdsa_header(struct libusb_device_handle *hdl, const struct iwmbt_firmware *fw); extern int iwmbt_load_fwfile(struct libusb_device_handle *hdl, const struct iwmbt_firmware *fw, uint32_t *boot_param, int offset); +extern int iwmbt_bt_reset(struct libusb_device_handle *hdl); extern int iwmbt_enter_manufacturer(struct libusb_device_handle *hdl); extern int iwmbt_exit_manufacturer(struct libusb_device_handle *hdl, enum iwmbt_mm_exit mode); extern int iwmbt_get_version(struct libusb_device_handle *hdl, struct iwmbt_version *version); +extern int iwmbt_read_version_tlv(struct libusb_device_handle *hdl, + uint8_t *data, uint8_t *datalen); extern int iwmbt_get_version_tlv(struct libusb_device_handle *hdl, struct iwmbt_version_tlv *version); extern int iwmbt_get_boot_params(struct libusb_device_handle *hdl, diff --git a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 index fd0118655a67..342656613421 100644 --- a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 +++ b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 15, 2025 +.Dd April 2, 2026 .Dt IWMBTFW 8 .Os .Sh NAME @@ -50,7 +50,8 @@ This utility will .Em only work with Intel Wireless 7260/8260/9260 and newer chip based Bluetooth USB devices, including AX and BE series wireless adapters. -The identification is currently based on USB vendor ID/product ID pair. +The identification is currently based on USB vendor ID/product ID pair +and result of HCI queries. The vendor ID should be 0x8087 .Pq Dv USB_VENDOR_INTEL2 and the product ID should be one of the supported devices. @@ -78,6 +79,8 @@ device name. Specify the directory containing the firmware files to search and upload. .It Fl h Display usage message and exit. +.It Fl p +Use only USB vendor ID/product ID pair for device model identification. .El .Sh EXIT STATUS .Ex -std diff --git a/usr.sbin/bluetooth/iwmbtfw/main.c b/usr.sbin/bluetooth/iwmbtfw/main.c index 1e11cc468015..560735fabd67 100644 --- a/usr.sbin/bluetooth/iwmbtfw/main.c +++ b/usr.sbin/bluetooth/iwmbtfw/main.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -50,6 +51,7 @@ int iwmbt_do_debug = 0; int iwmbt_do_info = 0; +static bool iwmbt_do_pidvid = false; enum iwmbt_device { IWMBT_DEVICE_UNKNOWN, @@ -228,6 +230,65 @@ iwmbt_dump_version_tlv(struct iwmbt_version_tlv *ver) ver->build_num); } +static enum iwmbt_device +iwmbt_identify(libusb_device_handle *hdl, enum iwmbt_device device) +{ + uint8_t data[255]; + uint8_t datalen, hw_platform, hw_variant; + struct iwmbt_version *ver = (struct iwmbt_version *)data; + struct iwmbt_version_tlv ver_tlv; + int r; + + if (device == IWMBT_DEVICE_7260) { + r = iwmbt_bt_reset(hdl); + if (r < 0) { + iwmbt_debug("iwmbt_bt_reset() failed!"); + return (IWMBT_DEVICE_UNKNOWN); + } + } + + memset(data, 0, sizeof(data)); + r = iwmbt_read_version_tlv(hdl, data, &datalen); + if (r < 0) { + iwmbt_debug("iwmbt_read_version_tlv() failed"); + return (IWMBT_DEVICE_UNKNOWN); + } + + if (datalen == sizeof(*ver) && ver->hw_platform == 0x37) { + switch (ver->hw_variant) { + case 0x07: + case 0x08: + return (IWMBT_DEVICE_7260); + case 0x0b: + case 0x0c: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + return (IWMBT_DEVICE_8260); + default: + iwmbt_debug("Unsupported hw_variant (0x%2x)", + ver->hw_variant); + return (IWMBT_DEVICE_UNKNOWN); + } + } + + r = iwmbt_parse_tlv(data, datalen, &ver_tlv); + if (r < 0) { + iwmbt_debug("iwmbt_parse_tlv() failed"); + return (IWMBT_DEVICE_UNKNOWN); + } + + hw_platform = (ver_tlv.cnvi_bt >> 8) & 0xff; + hw_variant = (ver_tlv.cnvi_bt >> 16) & 0x3f; + + if (hw_platform != 0x37) { + iwmbt_debug("Unsupported hw_platform (0x%2x)", hw_platform); + return (IWMBT_DEVICE_UNKNOWN); + } + + return (hw_variant < 0x17 ? IWMBT_DEVICE_8260 : IWMBT_DEVICE_9260); +} static int iwmbt_init_firmware(libusb_device_handle *hdl, const char *firmware_path, @@ -377,11 +438,10 @@ usage(void) fprintf(stderr, " -f: firmware path (defaults to %s)\n", _DEFAULT_IWMBT_FIRMWARE_PATH); fprintf(stderr, " -I: enable informational output\n"); + fprintf(stderr, " -p: use PID/VID for model identification\n"); exit(127); } - - /* * Returns 0 on success. */ @@ -558,7 +618,6 @@ handle_9260(libusb_device_handle *hdl, char *firmware_dir) { int r; uint32_t boot_param; - struct iwmbt_version vl; struct iwmbt_version_tlv vt; char *firmware_path = NULL; @@ -618,9 +677,9 @@ handle_9260(libusb_device_handle *hdl, char *firmware_dir) /* Once device is running in operational mode we can ignore failures */ - r = iwmbt_get_version(hdl, &vl); + r = iwmbt_get_version_tlv(hdl, &vt); if (r == 0) - iwmbt_dump_version(&vl); + iwmbt_dump_version_tlv(&vt); /* Apply the device configuration (DDC) parameters */ firmware_path = iwmbt_get_fwname_tlv(&vt, firmware_dir, "ddc"); @@ -673,6 +732,9 @@ main(int argc, char *argv[]) case 'I': iwmbt_do_info = 1; break; + case 'p': + iwmbt_do_pidvid = true; + break; case 'h': default: usage(); @@ -730,6 +792,14 @@ main(int argc, char *argv[]) goto shutdown; } + if (!iwmbt_do_pidvid) { + iwmbt_device = iwmbt_identify(hdl, iwmbt_device); + if (iwmbt_device == IWMBT_DEVICE_UNKNOWN) { + iwmbt_err("Failed to identify device"); + goto shutdown; + } + } + switch(iwmbt_device) { case IWMBT_DEVICE_7260: retcode = handle_7260(hdl, firmware_dir); From nobody Wed Apr 22 20:08:15 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g19Jc0ZM8z6bDfb for ; Wed, 22 Apr 2026 20:08:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g19Jb5WG0z3Lvs for ; Wed, 22 Apr 2026 20:08:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776888495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nzp85EbRKZwyOpua2ZRtQ05aOzx23PaepUoM5y6m7UQ=; b=thXaGg+/VRCSZoo3OycL2ywJNwMhQpElaEEMzUNCyA7OZPn6c7565QgQkPqrSrjEQXQZk8 gdkDcOZpywuEOBZPOIb9Kf26Rm9FNCRR1yjiyeNbdPN1YYtZnDciuQIuR4mbCQkcNL8Iv7 tzdOO/qfRwHZ9NJ1uhngtaNoDTSeCy1J6B15q9vMkzZQkc497O9Y/9xAaEKiNiBEe1p1wS EiKK+277dNcJoC0m27ISGvxpbawUERWeDCW2mk0pXQGnS+Pzw9ej/WDGWgWpFx2bCvvnf/ LE14j2VVbMIIaOhPHWTA1SVe5wOD4DS2d/NmM5msfgO0lj5Qof8oQqw0doJExg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776888495; a=rsa-sha256; cv=none; b=m6/Ia5liL4o1FmbQNIz/xe3OCYUSg+lxfai32GNSQQmoYB83nANmj0oco1UI5XA8xLbEBK IOTbj6gnv97xLrcQHWh+P/s2ucLc43TR13zPmdkY7umNQvTCya7pXpzmmtYp4kJrk06vab DgLY8KWrRpmYQK4u7bc4Rt7/OS0kbebqNw7g7mHOOQOu8OO934UQSwFhBAirJNlddVWSyo oZWq6UTP8o2c3m9xp0lCLf8IceiU0wOkyO2iHOLKRfRqYdTzdphqxU/wRe8FoAzhETLLa7 pcjwr9CtrT+l2BvYs/HmI2Blmq9hI3MvMQQowYWjS4SIUWYP0HE5hvYMH9D+FQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776888495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nzp85EbRKZwyOpua2ZRtQ05aOzx23PaepUoM5y6m7UQ=; b=gWToJEPmF/gD/ZoDzgiY1JTJxJ7BbtAwqCRR/lZGc8dlnc3MZKXcTVMkAob2Q09sFs8uYU ZuoeDS2BRlZQVGdyWc5I+aGls27mA7W11b/gyqwNdxVxP1CaCtDzqRLTIYF9IxsO+LDbEc Ce9S4Q/1jKRMACPY1tfx3BKhXmYw2RC5qi8f1VKr1vdYWrTmrR1ilh/YhrX3OHQTcjKibQ ekfadZ2v8PUbsVL+O043be2JcPJ3m+K0+0y4ur9L6qiIiBPq2R7vasV1/aqgqb8068Vk0t Gn8lLWzXFLgdfN6wMv/ZOuzgI8zA+5uz96Bjdh90IdXGSL1H/LMV9JO9HqETVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g19Jb50zbzls7 for ; Wed, 22 Apr 2026 20:08:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e77c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 20:08:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: ad5bf14a3dcb - stable/15 - bcm5974(4): Do not handle pressure on non-ForceTouch devices List-Id: Commits to the stable branches 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: ad5bf14a3dcbcbb101834ee07948ff1ae7198bd1 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 20:08:15 +0000 Message-Id: <69e92aaf.1e77c.84360cd@gitrepo.freebsd.org> The branch stable/15 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=ad5bf14a3dcbcbb101834ee07948ff1ae7198bd1 commit ad5bf14a3dcbcbb101834ee07948ff1ae7198bd1 Author: Vladimir Kondratyev AuthorDate: 2026-04-12 18:09:23 +0000 Commit: Vladimir Kondratyev CommitDate: 2026-04-22 19:59:04 +0000 bcm5974(4): Do not handle pressure on non-ForceTouch devices They always report it value as zero breaking pressure-driven drivers like moused(8) and xf86-input-synaptics. MFC after: 1 week (cherry picked from commit 9d0404cfe92c18b7697b3e4ad4a5790b12d2261e) --- sys/dev/hid/bcm5974.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/dev/hid/bcm5974.c b/sys/dev/hid/bcm5974.c index 7af6fbc24635..e2efeb08eb2e 100644 --- a/sys/dev/hid/bcm5974.c +++ b/sys/dev/hid/bcm5974.c @@ -120,6 +120,7 @@ enum tp_type { /* list of device capability bits */ #define HAS_INTEGRATED_BUTTON 1 #define USES_COMPACT_REPORT 2 +#define SUPPORTS_FORCETOUCH 4 struct tp_type_params { uint8_t caps; /* device capability bitmask */ @@ -146,13 +147,13 @@ struct tp_type_params { .delta = 0, }, [TYPE4] = { - .caps = HAS_INTEGRATED_BUTTON, + .caps = HAS_INTEGRATED_BUTTON | SUPPORTS_FORCETOUCH, .button = 31, .offset = 23 * 2, .delta = 2, }, [TYPE_MT2U] = { - .caps = HAS_INTEGRATED_BUTTON | USES_COMPACT_REPORT, + .caps = HAS_INTEGRATED_BUTTON | USES_COMPACT_REPORT | SUPPORTS_FORCETOUCH, .button = 1, .offset = 12, .delta = 0, @@ -752,7 +753,8 @@ bcm5974_attach(device_t dev) BCM5974_ABS(sc->sc_evdev, ABS_MT_POSITION_X, sc->sc_params->x); BCM5974_ABS(sc->sc_evdev, ABS_MT_POSITION_Y, sc->sc_params->y); /* finger pressure */ - BCM5974_ABS(sc->sc_evdev, ABS_MT_PRESSURE, sc->sc_params->p); + if ((sc->sc_params->tp->caps & SUPPORTS_FORCETOUCH) != 0) + BCM5974_ABS(sc->sc_evdev, ABS_MT_PRESSURE, sc->sc_params->p); /* finger touch area */ BCM5974_ABS(sc->sc_evdev, ABS_MT_TOUCH_MAJOR, sc->sc_params->w); BCM5974_ABS(sc->sc_evdev, ABS_MT_TOUCH_MINOR, sc->sc_params->w); From nobody Wed Apr 22 20:08:14 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g19Jb1lT9z6bDj1 for ; Wed, 22 Apr 2026 20:08:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g19JZ6q5dz3Ljw for ; Wed, 22 Apr 2026 20:08:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776888495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jP/0SlVK8tzKLceV4vzUvSmK8Rz0aLmn2cNdrVTX8rc=; b=xrl/Z/YPIP0Bw8cosN8BXsb/7s5bS6xp7IcjxR359vI8QjHRkt5NqCz0+4QGiosacrGIN/ jQE5YVxSFKC94VjkdZvDVs8NjfeoMyvfp8izlxitM3wipZZJOdFspLJhWBouDEMUisP/u+ AyJZ4gWG/jCMevH1tuQpMeWIPcaG3cQKOsXPqTx3/wObQSvWlCIiOyiVrM+YwOo9N5RtpX w0KmTrEonwtFSTB1cDnUUnQzqsjKD1GaiTVjW12FqnkfK7AaZzbwTvypENOwk3QJpsKGgq iR35L9v9fZLy4/XuhjH7+mJTEcaXd1WFlJdduV1UWVBkm1iAMJsj7dvSJtfGhg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776888495; a=rsa-sha256; cv=none; b=DPi0GrzV45+rzFZIJxaPkQ+ibaix7gBoViC1Kg2/ntRwYbxNE+oqo6FQL/toFgb0EiGv7g 9kq2bl1YMQwEo8P/EBq5sv1HExK4tT7RZEMqKgZfcbFaCVJVz0SPEjW0Tog3kqGtQ6TYVk Bnqgnorf9CeyeVO377fmflS0NaBVYC1klko9DAjL2nbrhOv+bjSy5dWmIlk4cEqcmVwj9Z 7MfricjKE6rh+s/gZjmo6A6QbUz7nFMsQPbnIveI4xOawY81Z5nOpC29mNqLYCJNU33KiA HDeGjo7obFO0RxxZRSpBghcZ+QEemkXmp1TC4FNJPidyiGsaCkmmW37NoCfGdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776888495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jP/0SlVK8tzKLceV4vzUvSmK8Rz0aLmn2cNdrVTX8rc=; b=MrPdREKe3C26Ozdw1LdWIIOUl72wFEz1q7lrNAiUuFAV3/tVBF3Ny8FG8E4fQ1JEJNqcxw tnibBG3oN9sfMrr5YCM9aobK0RHYM4Z9VIphI1hqR5GhyvsDJkElaCsup2cd38ksPN0kR6 L/3X47swNZ3cltN6/wePEbmnjEwYIjXtpNyVKU39pdtJ1fbHDHQl3uXWqPEn1dfi9VSTZm 3yBciCeyfjGCoKt8TNpUOiJhSWIFzbt987C/2R3R/KEUtkRgctunJ3EuHrPQBtM/MUcoA5 MexrFuMF+dx5emja4dmzKr48MQta7EHTNTMhbPpsj/FQ3bFBgl0ATbxA9BHnTA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g19JZ4bHbzls6 for ; Wed, 22 Apr 2026 20:08:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21b05 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 20:08:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 0268f2ef8478 - stable/15 - bcm5974(4): Fix pre-2015 Apple touchpad 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: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 0268f2ef8478c2cf5ce70dadaea1dbe48ad28f47 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 20:08:14 +0000 Message-Id: <69e92aae.21b05.1c081142@gitrepo.freebsd.org> The branch stable/15 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=0268f2ef8478c2cf5ce70dadaea1dbe48ad28f47 commit 0268f2ef8478c2cf5ce70dadaea1dbe48ad28f47 Author: Vladimir Kondratyev AuthorDate: 2026-04-12 18:09:22 +0000 Commit: Vladimir Kondratyev CommitDate: 2026-04-22 19:59:03 +0000 bcm5974(4): Fix pre-2015 Apple touchpad support These devices appeared to stop sending reports via mouse USB interface after switching to RAW mode. Fix it with changing Usage of Top Level Collection to one found in HID report descriptor of proper interface. MFC after: 1 week (cherry picked from commit d6477cd3a5c3aec6a3492c8423852b09239583a3) --- sys/dev/hid/bcm5974.c | 74 +++++++++++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 35 deletions(-) diff --git a/sys/dev/hid/bcm5974.c b/sys/dev/hid/bcm5974.c index 442e8905e9bc..7af6fbc24635 100644 --- a/sys/dev/hid/bcm5974.c +++ b/sys/dev/hid/bcm5974.c @@ -407,6 +407,10 @@ static const struct bcm5974_dev_params bcm5974_dev_params[BCM5974_FLAG_MAX] = { HID_BVPI(BUS_USB, USB_VENDOR_##v, USB_PRODUCT_##v##_##p, i), \ HID_TLC(BCM5974_TLC_PAGE, BCM5974_TLC_USAGE), \ } +#define BCM5974_DEV_USB(v,p,i) { \ + HID_BVPI(BUS_USB, USB_VENDOR_##v, USB_PRODUCT_##v##_##p, i), \ + HID_TLC(HUP_VENDOR_00, 0x0001), \ +} #define APPLE_HID "APP000D" #define BCM5974_DEV_SPI(hid, i) { \ @@ -416,60 +420,60 @@ static const struct bcm5974_dev_params bcm5974_dev_params[BCM5974_FLAG_MAX] = { static const struct hid_device_id bcm5974_devs[] = { /* MacbookAir1.1 */ - BCM5974_DEV(APPLE, WELLSPRING_ANSI, BCM5974_FLAG_WELLSPRING1), - BCM5974_DEV(APPLE, WELLSPRING_ISO, BCM5974_FLAG_WELLSPRING1), - BCM5974_DEV(APPLE, WELLSPRING_JIS, BCM5974_FLAG_WELLSPRING1), + BCM5974_DEV_USB(APPLE, WELLSPRING_ANSI, BCM5974_FLAG_WELLSPRING1), + BCM5974_DEV_USB(APPLE, WELLSPRING_ISO, BCM5974_FLAG_WELLSPRING1), + BCM5974_DEV_USB(APPLE, WELLSPRING_JIS, BCM5974_FLAG_WELLSPRING1), /* MacbookProPenryn, aka wellspring2 */ - BCM5974_DEV(APPLE, WELLSPRING2_ANSI, BCM5974_FLAG_WELLSPRING2), - BCM5974_DEV(APPLE, WELLSPRING2_ISO, BCM5974_FLAG_WELLSPRING2), - BCM5974_DEV(APPLE, WELLSPRING2_JIS, BCM5974_FLAG_WELLSPRING2), + BCM5974_DEV_USB(APPLE, WELLSPRING2_ANSI, BCM5974_FLAG_WELLSPRING2), + BCM5974_DEV_USB(APPLE, WELLSPRING2_ISO, BCM5974_FLAG_WELLSPRING2), + BCM5974_DEV_USB(APPLE, WELLSPRING2_JIS, BCM5974_FLAG_WELLSPRING2), /* Macbook5,1 (unibody), aka wellspring3 */ - BCM5974_DEV(APPLE, WELLSPRING3_ANSI, BCM5974_FLAG_WELLSPRING3), - BCM5974_DEV(APPLE, WELLSPRING3_ISO, BCM5974_FLAG_WELLSPRING3), - BCM5974_DEV(APPLE, WELLSPRING3_JIS, BCM5974_FLAG_WELLSPRING3), + BCM5974_DEV_USB(APPLE, WELLSPRING3_ANSI, BCM5974_FLAG_WELLSPRING3), + BCM5974_DEV_USB(APPLE, WELLSPRING3_ISO, BCM5974_FLAG_WELLSPRING3), + BCM5974_DEV_USB(APPLE, WELLSPRING3_JIS, BCM5974_FLAG_WELLSPRING3), /* MacbookAir3,2 (unibody), aka wellspring4 */ - BCM5974_DEV(APPLE, WELLSPRING4_ANSI, BCM5974_FLAG_WELLSPRING4), - BCM5974_DEV(APPLE, WELLSPRING4_ISO, BCM5974_FLAG_WELLSPRING4), - BCM5974_DEV(APPLE, WELLSPRING4_JIS, BCM5974_FLAG_WELLSPRING4), + BCM5974_DEV_USB(APPLE, WELLSPRING4_ANSI, BCM5974_FLAG_WELLSPRING4), + BCM5974_DEV_USB(APPLE, WELLSPRING4_ISO, BCM5974_FLAG_WELLSPRING4), + BCM5974_DEV_USB(APPLE, WELLSPRING4_JIS, BCM5974_FLAG_WELLSPRING4), /* MacbookAir3,1 (unibody), aka wellspring4 */ - BCM5974_DEV(APPLE, WELLSPRING4A_ANSI, BCM5974_FLAG_WELLSPRING4A), - BCM5974_DEV(APPLE, WELLSPRING4A_ISO, BCM5974_FLAG_WELLSPRING4A), - BCM5974_DEV(APPLE, WELLSPRING4A_JIS, BCM5974_FLAG_WELLSPRING4A), + BCM5974_DEV_USB(APPLE, WELLSPRING4A_ANSI, BCM5974_FLAG_WELLSPRING4A), + BCM5974_DEV_USB(APPLE, WELLSPRING4A_ISO, BCM5974_FLAG_WELLSPRING4A), + BCM5974_DEV_USB(APPLE, WELLSPRING4A_JIS, BCM5974_FLAG_WELLSPRING4A), /* Macbook8 (unibody, March 2011) */ - BCM5974_DEV(APPLE, WELLSPRING5_ANSI, BCM5974_FLAG_WELLSPRING5), - BCM5974_DEV(APPLE, WELLSPRING5_ISO, BCM5974_FLAG_WELLSPRING5), - BCM5974_DEV(APPLE, WELLSPRING5_JIS, BCM5974_FLAG_WELLSPRING5), + BCM5974_DEV_USB(APPLE, WELLSPRING5_ANSI, BCM5974_FLAG_WELLSPRING5), + BCM5974_DEV_USB(APPLE, WELLSPRING5_ISO, BCM5974_FLAG_WELLSPRING5), + BCM5974_DEV_USB(APPLE, WELLSPRING5_JIS, BCM5974_FLAG_WELLSPRING5), /* MacbookAir4,1 (unibody, July 2011) */ - BCM5974_DEV(APPLE, WELLSPRING6A_ANSI, BCM5974_FLAG_WELLSPRING6A), - BCM5974_DEV(APPLE, WELLSPRING6A_ISO, BCM5974_FLAG_WELLSPRING6A), - BCM5974_DEV(APPLE, WELLSPRING6A_JIS, BCM5974_FLAG_WELLSPRING6A), + BCM5974_DEV_USB(APPLE, WELLSPRING6A_ANSI, BCM5974_FLAG_WELLSPRING6A), + BCM5974_DEV_USB(APPLE, WELLSPRING6A_ISO, BCM5974_FLAG_WELLSPRING6A), + BCM5974_DEV_USB(APPLE, WELLSPRING6A_JIS, BCM5974_FLAG_WELLSPRING6A), /* MacbookAir4,2 (unibody, July 2011) */ - BCM5974_DEV(APPLE, WELLSPRING6_ANSI, BCM5974_FLAG_WELLSPRING6), - BCM5974_DEV(APPLE, WELLSPRING6_ISO, BCM5974_FLAG_WELLSPRING6), - BCM5974_DEV(APPLE, WELLSPRING6_JIS, BCM5974_FLAG_WELLSPRING6), + BCM5974_DEV_USB(APPLE, WELLSPRING6_ANSI, BCM5974_FLAG_WELLSPRING6), + BCM5974_DEV_USB(APPLE, WELLSPRING6_ISO, BCM5974_FLAG_WELLSPRING6), + BCM5974_DEV_USB(APPLE, WELLSPRING6_JIS, BCM5974_FLAG_WELLSPRING6), /* Macbook8,2 (unibody) */ - BCM5974_DEV(APPLE, WELLSPRING5A_ANSI, BCM5974_FLAG_WELLSPRING5A), - BCM5974_DEV(APPLE, WELLSPRING5A_ISO, BCM5974_FLAG_WELLSPRING5A), - BCM5974_DEV(APPLE, WELLSPRING5A_JIS, BCM5974_FLAG_WELLSPRING5A), + BCM5974_DEV_USB(APPLE, WELLSPRING5A_ANSI, BCM5974_FLAG_WELLSPRING5A), + BCM5974_DEV_USB(APPLE, WELLSPRING5A_ISO, BCM5974_FLAG_WELLSPRING5A), + BCM5974_DEV_USB(APPLE, WELLSPRING5A_JIS, BCM5974_FLAG_WELLSPRING5A), /* MacbookPro10,1 (unibody, June 2012) */ /* MacbookPro11,1-3 (unibody, June 2013) */ - BCM5974_DEV(APPLE, WELLSPRING7_ANSI, BCM5974_FLAG_WELLSPRING7), - BCM5974_DEV(APPLE, WELLSPRING7_ISO, BCM5974_FLAG_WELLSPRING7), - BCM5974_DEV(APPLE, WELLSPRING7_JIS, BCM5974_FLAG_WELLSPRING7), - - /* MacbookPro10,2 (unibody, October 2012) */ - BCM5974_DEV(APPLE, WELLSPRING7A_ANSI, BCM5974_FLAG_WELLSPRING7A), - BCM5974_DEV(APPLE, WELLSPRING7A_ISO, BCM5974_FLAG_WELLSPRING7A), - BCM5974_DEV(APPLE, WELLSPRING7A_JIS, BCM5974_FLAG_WELLSPRING7A), + BCM5974_DEV_USB(APPLE, WELLSPRING7_ANSI, BCM5974_FLAG_WELLSPRING7), + BCM5974_DEV_USB(APPLE, WELLSPRING7_ISO, BCM5974_FLAG_WELLSPRING7), + BCM5974_DEV_USB(APPLE, WELLSPRING7_JIS, BCM5974_FLAG_WELLSPRING7), + + /* MacbookPro10,2 (unibody, October 2012) */ + BCM5974_DEV_USB(APPLE, WELLSPRING7A_ANSI, BCM5974_FLAG_WELLSPRING7A), + BCM5974_DEV_USB(APPLE, WELLSPRING7A_ISO, BCM5974_FLAG_WELLSPRING7A), + BCM5974_DEV_USB(APPLE, WELLSPRING7A_JIS, BCM5974_FLAG_WELLSPRING7A), /* MacbookAir6,2 (unibody, June 2013) */ BCM5974_DEV(APPLE, WELLSPRING8_ANSI, BCM5974_FLAG_WELLSPRING8), From nobody Wed Apr 22 20:08:16 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g19Jd2sTXz6bDkq for ; Wed, 22 Apr 2026 20:08:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g19Jc6KQXz3Lw9 for ; Wed, 22 Apr 2026 20:08:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776888496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YLINXCuT0Zzg2Gk9DvbQ8QzpqSe0EdpxiDkBDFNivGw=; b=uwqyCXVXkYp56eyQLTJEJBJ59w+5PLOcJp/GiVdXEUzaq3Mv21QDIrznwwWItvtyp/N1Hc avd7mMr+Z4e2JGoJKvwrmOpkfxMPjcqD6ZHL6XdiTbtHtpzknmXVijUcFvXysm9tvuDE4j 2yi2EgJQyfREsUNKdzPZ+UgZQRl7bk2LZHwKvoc6jrG5/eDPquZD78LXGpNZL99//LWXT+ ikuqdjsYRYEIFR3yucExHK860g3LZji1a8f+KkmQBGjg1dM1iBYx7M1zMtu14pwzsrgYpj 38dxy0gHibMjKXgqdbRS45DRSDiiLpR21ougVGcz3GE+ZX3ACst3NUUZc0h7jQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776888496; a=rsa-sha256; cv=none; b=nC4lPg0YksBuPlg5cFelV6nKaI6+84DiKnGfNPj8zC3/sMUJuAu/mIrO9Iy11jIPjaNzb+ 43F4KKTRNqGoIxswAdqZq51V85Ug5K+w5ucYlCRGRLwhfJ2A7pbBtb0N6x85a7zJ94oFxo S4S4O0Uu++8dQtBeVbidagro5aTx5XcWCQbf+EmQ4fDL7UbkLSN7hQTrCQQQINtdlG2Gm+ +dwtg2kwNv2sRIckIsgEqcLL4EwF4bjxVgJWzbxW9eX7146u4Yjr4XL2gZf+p9s2r65TGm hjOJxkvF7ds3i6gFpvr+Pb2Zy2aRNBZEb7aPIeJhdYoB+IQ+tYtfT84SV/AVGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776888496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YLINXCuT0Zzg2Gk9DvbQ8QzpqSe0EdpxiDkBDFNivGw=; b=cfqdiA42O0TnlB8mQiJ4aP9NsUW3GYbK7rZj18P6+zAwKckYftagQFV1PSxpev6GUcs773 TINOR2hmK2lp6PKvDbpLJ3WdsBT+MovGAWBOrSiQwS+t7KOdIfn3E65Ft2KfVJgj++o9S0 Mul6U15nYRJbXX7QJOl/ZKbCKfyxsR02OgdHjFrjViDbuN6wdSvdDkcjPNgoPJAXm7PPNL L8Ov2gSPkc+naUntypz2lPKiI2OIxBp4AI+/yaeKcD8HhPd1gegth6hnxKPd8dJlusVhVn n/BipbFd2RK1xQRS+Pw+DX9kk+DxuQY8/XzDLO/1qS1woopQFtU+kzkihb/CsA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g19Jc5r3KzlHL for ; Wed, 22 Apr 2026 20:08:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21f71 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 20:08:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: cc6016af8461 - stable/15 - wsp(4): Do not handle pressure on non-ForceTouch devices List-Id: Commits to the stable branches 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: cc6016af846104b0ad0f4cd4f6e1d2cec9f89e5e Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 20:08:16 +0000 Message-Id: <69e92ab0.21f71.2c8e3100@gitrepo.freebsd.org> The branch stable/15 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=cc6016af846104b0ad0f4cd4f6e1d2cec9f89e5e commit cc6016af846104b0ad0f4cd4f6e1d2cec9f89e5e Author: Vladimir Kondratyev AuthorDate: 2026-04-12 18:09:23 +0000 Commit: Vladimir Kondratyev CommitDate: 2026-04-22 19:59:04 +0000 wsp(4): Do not handle pressure on non-ForceTouch devices They always report it value as zero breaking pressure-driven drivers like moused(8) and xf86-input-synaptics. MFC after: 1 week (cherry picked from commit dc5a94962e21a267550a2c20a0c4707d06843942) --- sys/dev/usb/input/wsp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/usb/input/wsp.c b/sys/dev/usb/input/wsp.c index f78d64f69c08..a78fac49491a 100644 --- a/sys/dev/usb/input/wsp.c +++ b/sys/dev/usb/input/wsp.c @@ -231,6 +231,7 @@ enum tp_type { /* list of device capability bits */ #define HAS_INTEGRATED_BUTTON 1 +#define SUPPORTS_FORCETOUCH 2 /* trackpad finger data block size */ #define FSIZE_TYPE1 (14 * 2) @@ -285,7 +286,7 @@ struct wsp_tp { .delta = 0, }, [TYPE4] = { - .caps = HAS_INTEGRATED_BUTTON, + .caps = HAS_INTEGRATED_BUTTON | SUPPORTS_FORCETOUCH, .button = BUTTON_TYPE4, .offset = FINGER_TYPE4, .fsize = FSIZE_TYPE4, @@ -896,7 +897,8 @@ wsp_attach(device_t dev) WSP_SUPPORT_ABS(sc->sc_evdev, ABS_MT_POSITION_X, sc->sc_params->x); WSP_SUPPORT_ABS(sc->sc_evdev, ABS_MT_POSITION_Y, sc->sc_params->y); /* finger pressure */ - WSP_SUPPORT_ABS(sc->sc_evdev, ABS_MT_PRESSURE, sc->sc_params->p); + if ((sc->sc_params->tp->caps & SUPPORTS_FORCETOUCH) != 0) + WSP_SUPPORT_ABS(sc->sc_evdev, ABS_MT_PRESSURE, sc->sc_params->p); /* finger major/minor axis */ WSP_SUPPORT_ABS(sc->sc_evdev, ABS_MT_TOUCH_MAJOR, sc->sc_params->w); WSP_SUPPORT_ABS(sc->sc_evdev, ABS_MT_TOUCH_MINOR, sc->sc_params->w); From nobody Wed Apr 22 20:08:17 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g19Jf4P2Vz6bDnm for ; Wed, 22 Apr 2026 20: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g19Jf03Wpz3M5C for ; Wed, 22 Apr 2026 20: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=1776888498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HogNJI0FRjnH03Sjre43xxeMgBkWsFiFd4S6L1KjXaY=; b=jYdjOhO7M8+XqN3gSpWedk/ed+LVgrBXWHtU1hCA1wx3uxp0UEqZlO5TwsAVhgX9s/u0cl y++pc7mgRiMpJlwafvH+Ch0h7FfMQyO3Bdd6gjy9R1x4+BQ4i7cKEIUV+AnXlZG9DTCnnc SwmW68Ado1YsfxuAXOGODXVtV3hHPGzDuNF5otKT9rHgkvdC1z2/xYn9I9o1y2noJtuCGM i4W7kCIDNi0lGrcGp4sb18SY532NB3nUXnw94sJu1KQJdlknssAJJDZMoqmCbs0SlnN8oj YSBSo7jI1uJdLdaQhHG4vNEq+LQLzjRMcCuBaJsNTzTWvKZbdbFHjIbgVfbXQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776888498; a=rsa-sha256; cv=none; b=hi9qH/uvJ1WODt0wFCOsev0zMWhIy/9QhfWwWqkq0qFNdhdRjBw3T7gdy32Jlq/TNwUfEl 7sDi86a2c2aB56gKHlEidPmftjwI20qJW+EjnsO+qWFXJrWmKNgTpCCxBB3CAeYJH33ETf XzW20iXEaC6KK1abPjwblwIezdBtUukvzLg5vaCmUv2W8oIynvPPgYM/Ux5VWY7otAZEV0 1zHDC5BLYSdbKg+g7B4gTxfTenP0PpjI+ci25D1dU3y+vqIHYC9TBtY0vi4IBXvwbZSBfm H+LkyNTkBjim6pBntTYemETDr8id26i0ZEXsbht4LhLqRizEMqX7yQ2TsdzSyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776888498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HogNJI0FRjnH03Sjre43xxeMgBkWsFiFd4S6L1KjXaY=; b=lsP8rIIgL7FTWwIZYAtAB415Fm0huW2fPuVPa3psB+nUNYL29PbSN+0yEMP8K+CYtZie97 fPK/GZebli9UiaGjiYHCfPgc7UAMuJoXBTnqSsAJMa3hNkklvyaniUYL5Wr0K8UcBNI1z2 jxJyY0p06Wa2BKNC4xYW8E2UWPJi0S3p/lvzVGqRA68i4Eprt+Nr0K/j3BgpUx9jLmkmVy 0VXVMwkGgmnhVoZ3QgA87xAe82LFg0rivXN3KgnreR7tNn6B1Y2ACgPcsOsASfTWzBwqsF KlDvA4qmMGkZ8gxJNskQdelcMBgCKTSrFF3D1b73lyHOqGPD5qo4mf21dbB6Tg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g19Jd6j7Qzls9 for ; Wed, 22 Apr 2026 20:08:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22900 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 20:08:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 6d00a0e09aaa - stable/15 - wsp(4): Make evdev interface operational if sysmouse one is not opened List-Id: Commits to the stable branches 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: 6d00a0e09aaafb53a37935fe98938b1783234be0 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 20:08:17 +0000 Message-Id: <69e92ab1.22900.2643b817@gitrepo.freebsd.org> The branch stable/15 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=6d00a0e09aaafb53a37935fe98938b1783234be0 commit 6d00a0e09aaafb53a37935fe98938b1783234be0 Author: Vladimir Kondratyev AuthorDate: 2026-04-12 18:09:23 +0000 Commit: Vladimir Kondratyev CommitDate: 2026-04-22 19:59:04 +0000 wsp(4): Make evdev interface operational if sysmouse one is not opened Before this change evdev interface sent only copy of data sent through the sysmouse interface. It worked as /dev/wsp0 device node was automatcaly opened by devd(8) with starting of moused(8). Starting with 15.0 moused(8) does not open sysmouse interface by default thus making wsp(4) device dysfunctional. Fix it with adding extra checks of interfaces state. MFC after: 1 week (cherry picked from commit 817e6995a19cb6f35851d0191bb1099a73d98bb9) --- sys/dev/usb/input/wsp.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/input/wsp.c b/sys/dev/usb/input/wsp.c index a78fac49491a..2d7e3b796b17 100644 --- a/sys/dev/usb/input/wsp.c +++ b/sys/dev/usb/input/wsp.c @@ -1068,6 +1068,10 @@ wsp_intr_callback(struct usb_xfer *xfer, usb_error_t error) if (evdev_rcpt_mask & EVDEV_RCPT_HW_MOUSE) { evdev_push_key(sc->sc_evdev, BTN_LEFT, ibt); evdev_sync(sc->sc_evdev); + if ((sc->sc_fflags & FREAD) == 0 || + usb_fifo_put_bytes_max( + sc->sc_fifo.fp[USB_FIFO_RX]) == 0) + goto tr_setup; } #endif sc->sc_status.flags &= ~MOUSE_POSCHANGED; @@ -1357,7 +1361,12 @@ wsp_intr_callback(struct usb_xfer *xfer, usb_error_t error) case USB_ST_SETUP: tr_setup: /* check if we can put more data into the FIFO */ - if (usb_fifo_put_bytes_max( + if ( +#ifdef EVDEV_SUPPORT + ((evdev_rcpt_mask & EVDEV_RCPT_HW_MOUSE) != 0 && + (sc->sc_state & WSP_EVDEV_OPENED) != 0) || +#endif + usb_fifo_put_bytes_max( sc->sc_fifo.fp[USB_FIFO_RX]) != 0) { usbd_xfer_set_frame_len(xfer, 0, sc->tp_datalen); From nobody Wed Apr 22 21:07:54 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1BdQ6fGLz6bKnL for ; Wed, 22 Apr 2026 21:07:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1BdQ695lz3kFw for ; Wed, 22 Apr 2026 21:07:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vt5SVF16amUWBggAzHY2cHdVnEvQGPOWcy9lBRINrUE=; b=Y8jTLsqLBuXNUkZAd1TadDt3ZnWuWBUWGICRjNRHqkx+B7nAjud/oRccd8Nlc+AEIhYr05 RNy+QqIFHFW5ZS8cwWSC0dZ1zQ84xwZAXk9IaZiPanJgulqqqLftz2Rhk/WoT8dIhzt7g2 neMrfBC2lEhbRDrUQ1NIn3+gyCpCj1ietWSok0Dz4IGFr4IEhZqYX4S0HyuHuf3ADRs2jV lLBgvZwAI5hocLACpeOJdIQAUd9vwo7mwsJexzCE39Vj7QO35R/D7i7WALjJgd3zymeYGQ u05BQau2wZXsCN8SXm03/XOGlTDsjRdKdqQtJma6LQtSpm0S720DGn5mc2u++Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892074; a=rsa-sha256; cv=none; b=Y2uSapWuLIYXE1MSVaRPGznQfuPc4Ewm35mEJ31rKqEdr8eQDQhaXboQ6wVIO2eZXArAjI 1L7/jR6esCu/MeHzRnSpWMmu59PRAher4wQGEBIKE/De+mNwJ5wC4Nh2wKAY4K/Js243M5 OtDKj5yFNSALmSH0frWUdEL2/ktoZKN1yMqY2RarIYtMycEXgWKR7MXXU7kK9oHrn/jmsD IeFIda9lsNC3blcfawLj8shipyGZnz1sHT2KfEpnJ1PCMPbep3eUbUzX8CTqnAlN5OpJMW /nPzXJeuNCTnejDwqI2fwA5Nl9DcGhiFZb5JvwVF+RaTla5dOKhk4iW8MtH4Yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vt5SVF16amUWBggAzHY2cHdVnEvQGPOWcy9lBRINrUE=; b=EwMC2Y1KS7bMf5v1StvRRzYO436yEb6hD3DAN7O1LrxICDezZv1hyQCWY/4soEmbouFtX0 dTySB9ELKARv9hQLB4JZ+KwMMRHK0xJhEfn9QnPH0XRgEBNZkWDLw7PRVbhFHwp0jB8lp4 jh7PJS3fc2nD0cQW2lB3WIj2YLOorYHoNm74An/5gCEyzdOc1WJQ340822oaMAC4HgrtaH nT39kJaAzEpfknubSowZ/8EYtGhsoygzcYZ9YY01Uw7FO+1myFJaEYVNkCDXDkrIorBeCc l4cLdp3VhFmitMjbriNeK0EHCY+3DIMK+dGfT7dSHITUdvji6Hf946KvxjW2Vw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1BdQ5cmwznK3 for ; Wed, 22 Apr 2026 21:07:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25e77 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:07:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Adrian Chadd From: Bjoern A. Zeeb Subject: git: eb78bbe544cb - stable/15 - [net80211] Quieten the logging from ieee80211_vht_get_vhtflags() List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: eb78bbe544cbb9b62fc795eaf24b88f1092b9f0d Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:07:54 +0000 Message-Id: <69e938aa.25e77.791f08cd@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=eb78bbe544cbb9b62fc795eaf24b88f1092b9f0d commit eb78bbe544cbb9b62fc795eaf24b88f1092b9f0d Author: Adrian Chadd AuthorDate: 2025-08-25 00:50:01 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:50 +0000 [net80211] Quieten the logging from ieee80211_vht_get_vhtflags() The commit in Fixes: introduced logging the output bits from ieee80211_vht_get_vhtflags(). This ends up causing quite a lot of logging when net80211 is doing things like processing received beacons. So just remove the logging; if it's needed again then a developer can add it back to that location, or just use dtrace to capture the return value. Fixes: 4bf049bfeefd9 Differential Revision: https://reviews.freebsd.org/D52142 Reviewed by: bz (cherry picked from commit d6616705231ce5a90068136f1aae05c143e8c0eb) --- sys/net80211/ieee80211_ht.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c index 508ddc7de920..7817a7d0759d 100644 --- a/sys/net80211/ieee80211_ht.c +++ b/sys/net80211/ieee80211_ht.c @@ -1934,7 +1934,7 @@ ieee80211_vht_get_vhtflags(struct ieee80211_node *ni, uint32_t htflags) { #define _RETURN_CHAN_BITS(_cb) \ do { \ - IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_11N, ni, \ + if (0) IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_11N, ni, \ "%s:%d: selected %b", __func__, __LINE__, \ (_cb), IEEE80211_CHAN_BITS); \ return (_cb); \ From nobody Wed Apr 22 21:07:55 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1BdS3L84z6bKnP for ; Wed, 22 Apr 2026 21:07:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1BdS06RHz3k85 for ; Wed, 22 Apr 2026 21:07:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2BNASeidbJQDzSIkiIrisEYHuE8yHYebD48t5uOVmgk=; b=ul28Ozkkv1pqi1xmXtEgQbIk4rrsj0/idMCzTXBOIocB4dfNuzDnWQVthMSkaY+ui8qmWf o1PexLcTAsz3xkvY+aubqfvOgXOp5Q1UXxOkJUHn7LjZvFWYqapyYjMuNfPS40FcrcDJQM Ine4hOR+h2+RoDGf5BJL2i64Lu76tJXtF7RkZuoHGQyMWhEoVEV51Kg+pn61m6mlzpaHDT m9JMHuFsSrgTRdtqnUJPcHrDMuI4R9PkFiOqQCaZSYTIUsQRMtdRDbnTUvuzbCGc8EJXzV Xm/ShZugKTx/4T4UGH4nD1AIi17uwBke+hd6MZER4ybpu8HvT4vRg7Xq/liOrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892076; a=rsa-sha256; cv=none; b=GIg2t+GOlxixEgSbNofTDND0ffaWhoGcdrZVnc7Axy+fRMnGpQkE6Zh0saG1RMOQtMnMiF p3/Va4PbTLMdTAoiRPFQpdBTzvXZMZnF5Bj4kokivOxmH0rBV88oM3fAcheTyJMlDmbZIU ciYz9Jv4ULSgb6a9xmPQCqQRygs7m7C9IEKSW4X+1lDb118N8gp3HiwMZk2uBZtz/S9eus 7SrXjngTDauBNn2jXqATyx/WMaeQ5CIF5tCDBdeBHgX1CNaLmDkXcsfP97cAmD7AvRbDcR EZAo/a1h8/EAVilGzZnBXCTeyeXvIyFBuLpomfgLqiYWBbhtdaop3FJ12SLESw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2BNASeidbJQDzSIkiIrisEYHuE8yHYebD48t5uOVmgk=; b=DvnxC0Q81U4Ob9OkFWExk8DMNddaVBdug/8WXsoyyurumD1STcw+0TogCJT/0Y+tokX/GG wsGGQ7siYTjJlPChESuklMpwNVd6GZTwWHwYRpmqvNnvp9F/AVqjSDJ6D4sB2bJPetKgU2 lWf8TVeJpohbi+Bt/znGj0ZRYIHxOBt7rQc2oYYIXOdHL9vL/A4hRACxE87gw5E5H8KAgO tM3NinFmx+bge7+O7+1dRQzJ5s9xWUwQOo2PqG2bYxQi+1m4yyhNmlriRGsKFK+b45/IXp 8Gpg4c7vEFDmT0rBZSAhSfgZiIKKhVy2gZOZKqksSw6420BNN6yCczIRNiEWCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1BdR6nfDznK4 for ; Wed, 22 Apr 2026 21:07:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27669 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:07:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Adrian Chadd From: Bjoern A. Zeeb Subject: git: b55f25d49be2 - stable/15 - net80211: add support for drivers to disable sending NULL data frames List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b55f25d49be2197353e00bd2d299b0556df91af1 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:07:55 +0000 Message-Id: <69e938ab.27669.748e896a@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=b55f25d49be2197353e00bd2d299b0556df91af1 commit b55f25d49be2197353e00bd2d299b0556df91af1 Author: Adrian Chadd AuthorDate: 2025-08-27 17:03:22 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:50 +0000 net80211: add support for drivers to disable sending NULL data frames net80211 has various places where null data / null qos data frames are sent. However plenty of NICs shouldn't be sending them from net80211 and it may even upset their 802.11n window / sequence number tracking. So add support here. Differential Revision: https://reviews.freebsd.org/D52297 Reviewed by: bz (cherry picked from commit 9bfb1405332c6c847dd29e4db4dd3afb56662021) --- sys/net80211/ieee80211_output.c | 6 ++++++ sys/net80211/ieee80211_var.h | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index 57fe687adffe..116fc76a9ce1 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -1082,6 +1082,12 @@ ieee80211_send_nulldata(struct ieee80211_node *ni) uint8_t *frm; int ret; + /* Don't send NULL frames if we've been configured not to do so. */ + if ((ic->ic_flags_ext & IEEE80211_FEXT_NO_NULLDATA) != 0) { + ieee80211_node_decref(ni); + return (0); + } + if (vap->iv_state == IEEE80211_S_CAC) { IEEE80211_NOTE(vap, IEEE80211_MSG_OUTPUT | IEEE80211_MSG_DOTH, ni, "block %s frame in CAC state", "null data"); diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h index c09bb90d7ad3..7b45261f59b1 100644 --- a/sys/net80211/ieee80211_var.h +++ b/sys/net80211/ieee80211_var.h @@ -700,13 +700,14 @@ MALLOC_DECLARE(M_80211_VAP); #define IEEE80211_FEXT_QUIET_IE 0x00800000 /* STATUS: quiet IE in a beacon has been added */ #define IEEE80211_FEXT_UAPSD 0x01000000 /* CONF: enable U-APSD */ #define IEEE80211_FEXT_AMPDU_OFFLOAD 0x02000000 /* CONF: driver/fw handles AMPDU[-TX] itself */ +#define IEEE80211_FEXT_NO_NULLDATA 0x04000000 /* CONF: don't originate NULL data frames from net80211 */ #define IEEE80211_FEXT_BITS \ "\20\2INACT\3SCANWAIT\4BGSCAN\5WPS\6TSN\7SCANREQ\10RESUME" \ "\0114ADDR\12NONEPR_PR\13SWBMISS\14DFS\15DOTD\16STATEWAIT\17REINIT" \ "\20BPF\21WDSLEGACY\22PROBECHAN\23UNIQMAC\24SCAN_OFFLOAD\25SEQNO_OFFLOAD" \ "\26FRAG_OFFLOAD\27VHT" \ - "\30QUIET_IE\31UAPSD\32AMPDU_OFFLOAD" + "\30QUIET_IE\31UAPSD\32AMPDU_OFFLOAD\33NO_NULLDATA" /* ic_flags_ht/iv_flags_ht */ #define IEEE80211_FHT_NONHT_PR 0x00000001 /* STATUS: non-HT sta present */ From nobody Wed Apr 22 21:07:56 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1BdT2Rylz6bKkr for ; Wed, 22 Apr 2026 21:07:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1BdT0NFnz3kKZ for ; Wed, 22 Apr 2026 21:07:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oWLVjhMh2U5t2XuzU20+kKNMofWvvQBx2T8Uup6Tffk=; b=sIxmUbVTQ5s2QJIBT+RAvQx3Wa7gXBAtISr66A9qQ/YGRYt6r30HIngICR3FBEweHnw3Dx l1o2lXNlkxN6Kvd+9AA6GSPmyY7YjnY7BrH3HNPubfzSn2hkrNBpubYWSiIwA63UNdp09A WvhPQn5eAWxYbYKp9bQXC27XRIPKdr+YylOAeYbAJx8XVFbcUAgnyadpkSiS3gqsu3HsKu /LkuRKiVgbHQ7cIPhUwceaFpO0P06Gw0msVvwrpMR5SyHRiLaggqwH8IoCo9Yz0NY1a1zH oFGrJ4WtF7fSCFZrNVCqaMGX2Z+a7hwiw5eN8FwtkW+Trp7PlL/o2aRj0EemRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892077; a=rsa-sha256; cv=none; b=ocp3dqMBcovUGW6Vd/1YUVx/+KSjwFSQjGEDcDbZpYuvc9mv2Dnz+V3uX34dr4CKP/luE/ q7Q/mcxoQBzze4m5bPD9YZRJofK06R5ift48vwXZ8OaEFGAlfZuQ76Bfqmtu+UpfUFH+dA iUyQDO4Fv8wy1kBhKW3WFrsGQnlfmJYfpe5HOfltskzZQ6zOO35D7eV1IG8HdZxG1bMWyS dYk4TyjOAIKlpPtn+rEac8oxWThEKuYM1tGwKtFtZG88dTyZ563utR8E06P3Vz/uif/VzY QEHh6OXyS3o0YsFvVGYR8OxthcY3qPY4Kc22DnmnvOlxe1/PgR0SQEl8ew8NdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oWLVjhMh2U5t2XuzU20+kKNMofWvvQBx2T8Uup6Tffk=; b=eJb3Z4T4oKDwrTOt7dgM7YZERCvXVIgvJsYRdX7ibP03C7mutKDV73yN/8u8yrJJm3R2Ms gkcHZbXJtg8EytFnLO3dAXHi8bcB6Uy7tY/DMlD04AOHxkgM0VKFd0Q0WjpLnysnIvZkl7 XSbdUGFXy/o9EEfObnDNK4W8TqlgbjXOkYwW8DVSaQTFsLAT6ADHmLoMq4veKPV5sCjXHK wUTvz8vmsraY8mQ+bmzPKaXonFbXHlu+fVnlGWGQwQJAtmWSjQ+fhGoRkH0Ah6yFGFD52w f14RGpVx6HqMhGZvRPfl78/kc+zMy3QduRs0LbKN2vpVv9snvfS6stfCx49wMw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1BdS71lrznZ6 for ; Wed, 22 Apr 2026 21:07:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25ef4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:07:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Adrian Chadd From: Bjoern A. Zeeb Subject: git: bc6b3e0307da - stable/15 - net80211: document some of the crypto/key 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: bc6b3e0307da96b745d901ea83c1290413c977d8 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:07:56 +0000 Message-Id: <69e938ac.25ef4.b4ea15e@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=bc6b3e0307da96b745d901ea83c1290413c977d8 commit bc6b3e0307da96b745d901ea83c1290413c977d8 Author: Adrian Chadd AuthorDate: 2025-09-20 21:30:42 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:51 +0000 net80211: document some of the crypto/key functions This documents the following functions: * ieee80211_is_key_global() * ieee80211_is_key_unicast() * ieee80211_crypto_get_key_wepidx() * ieee80211_crypto_get_keyid() * ieee80211_crypto_get_txkey() * ieee80211_crypto_encap() * ieee80211_crypto_decap() Differential Revision: https://reviews.freebsd.org/D52649 (cherry picked from commit 1f76551e1a5e98673f31043d11366ca41d4f56fe) --- sys/net80211/ieee80211.c | 28 +++++++++++-- sys/net80211/ieee80211_crypto.c | 87 ++++++++++++++++++++++++++++++++++++----- 2 files changed, 102 insertions(+), 13 deletions(-) diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c index 2b7cf635b9f5..1299f86ebdc7 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -2689,13 +2689,18 @@ ieee80211_channel_type_char(const struct ieee80211_channel *c) return 'f'; } -/* - * Determine whether the given key in the given VAP is a global key. +/** + * @brief Determine whether the given key in the given VAP is a global key. + * * (key index 0..3, shared between all stations on a VAP.) * * This is either a WEP key or a GROUP key. * * Note this will NOT return true if it is a IGTK key. + * + * @param vap the current VAP + * @param key ieee80211_key to use/check + * @returns true if it's a global/WEP key, false otherwise */ bool ieee80211_is_key_global(const struct ieee80211vap *vap, @@ -2705,8 +2710,23 @@ ieee80211_is_key_global(const struct ieee80211vap *vap, key < &vap->iv_nw_keys[IEEE80211_WEP_NKID]); } -/* - * Determine whether the given key in the given VAP is a unicast key. +/** + * @brief Determine whether the given key in the given VAP is a unicast key. + * + * This only returns true if it's a unicast key. + * + * Note: For now net80211 only supports a single unicast key, stored in + * an ieee80211_node entry. + * + * Code should use this to know if it's a unicast key and then call + * ieee80211_crypto_get_keyid() to get the 802.11 key ID (0..3 for + * unicast/global keys, 4..5 for IGTK keys.) Since the unicast + * and global key indexes "overlap", callers will need to check + * both the type and id. + * + * @param vap the current VAP + * @param key ieee80211_key to use/check + * @returns true if the key is a unicast key, false if it is not */ bool ieee80211_is_key_unicast(const struct ieee80211vap *vap, diff --git a/sys/net80211/ieee80211_crypto.c b/sys/net80211/ieee80211_crypto.c index 1e63ca46f28f..566f0b2e0c23 100644 --- a/sys/net80211/ieee80211_crypto.c +++ b/sys/net80211/ieee80211_crypto.c @@ -611,11 +611,15 @@ ieee80211_crypto_setkey(struct ieee80211vap *vap, struct ieee80211_key *key) return dev_key_set(vap, key); } -/* - * Return index if the key is a WEP key (0..3); -1 otherwise. +/** + * @brief Return index if the key is a WEP key (0..3); -1 otherwise. * * This is different to "get_keyid" which defaults to returning * 0 for unicast keys; it assumes that it won't be used for WEP. + * + * @param vap the current VAP + * @param k ieee80211_key to check + * @returns 0..3 if it's a global/WEP key, -1 otherwise. */ int ieee80211_crypto_get_key_wepidx(const struct ieee80211vap *vap, @@ -628,8 +632,18 @@ ieee80211_crypto_get_key_wepidx(const struct ieee80211vap *vap, return (-1); } -/* - * Note: only supports a single unicast key (0). +/** + * @brief Return the index of a unicast, global or IGTK key. + * + * Return the index of a key. For unicast keys the index is 0..1. + * For global/WEP keys it's 0..3. For IGTK keys its 4..5. + * + * TODO: support >1 unicast key + * TODO: support IGTK keys + * + * @param vap the current VAP + * @param k ieee80211_key to check + * @returns 0..3 for a WEP/global key, 0..1 for unicast key, 4..5 for IGTK key */ uint8_t ieee80211_crypto_get_keyid(struct ieee80211vap *vap, struct ieee80211_key *k) @@ -641,6 +655,19 @@ ieee80211_crypto_get_keyid(struct ieee80211vap *vap, struct ieee80211_key *k) return (0); } +/** + * @param Return the key to use for encrypting an mbuf frame to a node + * + * This routine chooses a suitable key used to encrypt the given frame with. + * It doesn't do the encryption; it only chooses the key. If a key is not + * available then the routine will return NULL. + * + * It's up to the caller to enforce whether a key is absolutely required or not. + * + * @param ni The ieee80211_node to send the frame to + * @param m the mbuf to encrypt + * @returns the ieee80211_key to encrypt with, or NULL if there's no suitable key + */ struct ieee80211_key * ieee80211_crypto_get_txkey(struct ieee80211_node *ni, struct mbuf *m) { @@ -676,8 +703,28 @@ ieee80211_crypto_get_txkey(struct ieee80211_node *ni, struct mbuf *m) return &ni->ni_ucastkey; } -/* - * Add privacy headers appropriate for the specified key. +/** + * @brief Privacy encapsulate and encrypt the given mbuf. + * + * This routine handles the mechanics of encryption - expanding the + * mbuf to add privacy headers, IV, ICV, MIC, MMIC, and then encrypts + * the given mbuf if required. + * + * This should be called by the driver in its TX path as part of + * encapsulation before passing frames to the hardware/firmware + * queues. + * + * Drivers/hardware which does its own entirely offload path + * should still call this for completeness - it indicates to the + * driver that the frame itself should be encrypted. + * + * The driver should have set capability bits in the attach / + * key allocation path to disable various encapsulation/encryption + * features. + * + * @param ni ieee80211_node for this frame + * @param mbuf mbuf to modify + * @returns the key used if the frame is to be encrypted, NULL otherwise */ struct ieee80211_key * ieee80211_crypto_encap(struct ieee80211_node *ni, struct mbuf *m) @@ -693,9 +740,31 @@ ieee80211_crypto_encap(struct ieee80211_node *ni, struct mbuf *m) return NULL; } -/* - * Validate and strip privacy headers (and trailer) for a - * received frame that has the WEP/Privacy bit set. +/** + * @brief Decapsulate and validate an encrypted frame. + * + * This handles an encrypted frame (one with the privacy bit set.) + * It also obeys the key / config / receive packet flags for how + * the driver says its already been processed. + * + * Unlike ieee80211_crypto_encap(), this isn't called in the driver. + * Instead, drivers passed the potentially decrypted frame - fully, + * partial, or not at all - and net80211 will call this as appropriate. + * + * This handles NICs (like ath(4)) which have a variable size between + * the 802.11 header and 802.11 payload due to DMA alignment / encryption + * engine concerns. + * + * If the frame was decrypted and validated successfully then 1 is returned + * and the mbuf can be treated as an 802.11 frame. If it is not decrypted + * successfully or it was decrypted but failed validation/checks, then + * 0 is returned. + * + * @param ni ieee80211_node for received frame + * @param m mbuf frame to receive + * @param hdrlen length of the 802.11 header, including trailing null bytes + * @param key pointer to ieee80211_key that will be set if appropriate + * @returns 0 if the frame wasn't decrypted/validated, 1 if decrypted/validated. */ int ieee80211_crypto_decap(struct ieee80211_node *ni, struct mbuf *m, int hdrlen, From nobody Wed Apr 22 21:07:58 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1BdV3Ccfz6bKgq for ; Wed, 22 Apr 2026 21:07:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1BdV1CsLz3kKg for ; Wed, 22 Apr 2026 21:07:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dwMX4pwZBi8S5gAut9ReUAnl0ON7wXrSYRzhsNU6lio=; b=KlrzZsfvgC/pvJIfxWPgvlO0DZj7Glk8f0rkepECG+KMmvUPyMmLiHB0dtGPYZBTfm4EHc s7o6deJwHYH0pRZnM0zHEJMHX2uZGc1GOcFcA7J3YMOgAgbBaHZmt4SfABk5OhkKUxsGXE C/Kjy4hrd9aB0Mt3bBS3CJlMnALmEPDwSO4Z7rPFp0pcLxO96wZ4r3iu8p+0VOLePeIeC0 D88dAaF3fXTBCW7ljC3IbeJd+oey54zXwiDDTqpF/ROVkjBOP3d/Kz95GDPTITrX9QxQti Ky/er5DPLZ4vkApJILWlpHwMpu+oRA4JfZsbulUPjXvFgwkRpXSYInc06eKU9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892078; a=rsa-sha256; cv=none; b=mzpQp/3xdyrkdtbSXi8KtwPuRY2YU+19rTCtTHz4qnclQp+OfORUmx2GFb3mxoO1jiiaW2 bqPx8np08CfernHIEE1Tdcba4VFT1dUq+Jn/+Mc2EolXJ9sKCKObgBYfrX5ZoZ/UpolqKr WFJsjyvapMlURlbsyueKkBSIV4lJAYLgQs3c8B6NnPHjXMu4y2zjIJ5UBjNZTnMJVavwEX 2u4s1YUkYLd2a2V7ImvPsBrb22mfGQESg4e0RonlPQk9lvXZSH+6eCbAE2SfGPTV2Mvowl tWQolMpvVZyCQOOcQB9CTeiUFgw44Y8L1K1P6koEpQZcoV/SKZm5/tUgp+YBDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dwMX4pwZBi8S5gAut9ReUAnl0ON7wXrSYRzhsNU6lio=; b=W7AIk7ejvQZbv3H6lR5bbTw9v/FTyBpwdxMagaRKlHZ3AutGgbFUzOCKEkh+5YOh1Uyf4w T684T3Q2VIkaTzSPtbsF8tV6XfdSr16NL4kgvVlGt2UK93mqvSQf+7wOGsgqvByW4MYk5U 99y6nWZaDoUfo3WMy+kokAhVt3sLhKesxOYOtktHNtdWnUqtXRXAaLK1o/soSUYA0AnCDc d4E81yKucPWsiKd6VaO0y2indOuD8wGB++SkgdpRW4dWbj9ayi3c0/sRO+ScQwSUDWbh+X ZK7xaYuxnwzn79BpVDHpyaxfyGqGVDWCQD1Pj0JK4onjHaweeKumdSPELRCx3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1BdV0k1Tzn9C for ; Wed, 22 Apr 2026 21:07:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 303ae by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:07:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Adrian Chadd From: Bjoern A. Zeeb Subject: git: 5307e19a7c86 - stable/15 - net80211: create accessors for accessing the ieee80211_key key/mic 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5307e19a7c86eaf78484a3a617fccc32f17da159 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:07:58 +0000 Message-Id: <69e938ae.303ae.b35e267@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=5307e19a7c86eaf78484a3a617fccc32f17da159 commit 5307e19a7c86eaf78484a3a617fccc32f17da159 Author: Adrian Chadd AuthorDate: 2025-09-24 15:30:47 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:51 +0000 net80211: create accessors for accessing the ieee80211_key key/mic data Add some accessors to the key data, key length and MIC data. Document exactly what these mean. There's at least a couple of drivers that access the key data field directly and assume that the TX/RX MIC is available directly after the data pointer, which bakes in the "key size is 128 bits" in subtle ways. The goal here is to migrate the drivers and net80211 code to use these methods rather than accessing wk_key directly and making assumptions about wk_key and the copied key length (which the ioctl path definitely does.) Once that's done, it should be a lot easier to change the key API for larger keys. Differential Revision: https://reviews.freebsd.org/D52711 Reviewed by: thj (cherry picked from commit 77b1e4f32f31b219c238c81b726d079a003b465c) --- sys/net80211/ieee80211_crypto.h | 105 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) diff --git a/sys/net80211/ieee80211_crypto.h b/sys/net80211/ieee80211_crypto.h index 89b8b4f9daa4..48115da586b5 100644 --- a/sys/net80211/ieee80211_crypto.h +++ b/sys/net80211/ieee80211_crypto.h @@ -94,6 +94,7 @@ struct ieee80211_key { ieee80211_keyix wk_keyix; /* h/w key index */ ieee80211_keyix wk_rxkeyix; /* optional h/w rx key index */ + /* TODO: deprecate direct access to wk_key, wk_txmic, wk_rxmic */ uint8_t wk_key[IEEE80211_KEYBUF_SIZE+IEEE80211_MICBUF_SIZE]; #define wk_txmic wk_key+IEEE80211_KEYBUF_SIZE+0 /* XXX can't () right */ #define wk_rxmic wk_key+IEEE80211_KEYBUF_SIZE+8 /* XXX can't () right */ @@ -300,5 +301,109 @@ void ieee80211_notify_michael_failure(struct ieee80211vap *, uint16_t ieee80211_crypto_init_aad(const struct ieee80211_frame *, uint8_t *, int); +/** + * @brief Return the key data. + * + * This returns a pointer to the key data. Note it does not + * guarantee the TX/RX MIC will be immediately after the key. + * Callers must use ieee80211_crypto_get_key_txmic_data() + * and ieee80211_crypto_get_key_rxmic_data() for that. + * + * Note: there's no locking; this needs to be called in + * a situation where the ieee80211_key won't disappear. + * + * @param k ieee80211_key + * @returns NULL if no key data is available, or a pointer + * to the key data. + */ +static inline const uint8_t * +ieee80211_crypto_get_key_data(const struct ieee80211_key *k) +{ + return (k->wk_key); +} + +/** + * @brief Return the key length in bytes. + * + * This doesn't include any TX/RX MIC (eg from TKIP). + * + * Note: there's no locking; this needs to be called in + * a situation where the ieee80211_key won't disappear. + * + * @param k ieee80211_key + * @returns the key length (without any MIC) in bytes + */ +static inline const uint16_t +ieee80211_crypto_get_key_len(const struct ieee80211_key *k) +{ + return (k->wk_keylen); +} + +/** + * @brief Return the TX MIC data. + * + * This returns a pointer to the TX MIC data. + * + * Note: there's no locking; this needs to be called in + * a situation where the ieee80211_key won't disappear. + * + * @param k ieee80211_key + * @returns NULL if no key data is available, or a pointer + * to the TX MIC data. + */ +static inline const uint8_t * +ieee80211_crypto_get_key_txmic_data(const struct ieee80211_key *k) +{ + return (k->wk_txmic); +} + +/** + * @brief Return the TX MIC length in bytes. + * + * Note: there's no locking; this needs to be called in + * a situation where the ieee80211_key won't disappear. + * + * @param k ieee80211_key + * @returns the TX MIC length in bytes + */ +static inline const uint16_t +ieee80211_crypto_get_key_txmic_len(const struct ieee80211_key *k) +{ + return (k->wk_cipher->ic_miclen); +} + +/** + * @brief Return the RX MIC data. + * + * This returns a pointer to the RX MIC data. + * + * Note: there's no locking; this needs to be called in + * a situation where the ieee80211_key won't disappear. + * + * @param k ieee80211_key + * @returns NULL if no key data is available, or a pointer + * to the RX MIC data. + */ +static inline const uint8_t * +ieee80211_crypto_get_key_rxmic_data(const struct ieee80211_key *k) +{ + return (k->wk_rxmic); +} + +/** + * @brief Return the RX MIC length in bytes. + * + * Note: there's no locking; this needs to be called in + * a situation where the ieee80211_key won't disappear. + * + * @param k ieee80211_key + * @returns the RX MIC length in bytes + */ +static inline const uint16_t +ieee80211_crypto_get_key_rxmic_len(const struct ieee80211_key *k) +{ + return (k->wk_cipher->ic_miclen); +} + #endif /* defined(__KERNEL__) || defined(_KERNEL) */ #endif /* _NET80211_IEEE80211_CRYPTO_H_ */ From nobody Wed Apr 22 21:07:59 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1BdX185dz6bKZL for ; Wed, 22 Apr 2026 21:08:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1BdW4NDGz3kG6 for ; Wed, 22 Apr 2026 21:07:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D5m/+2FIRx3DI2ty+yG9xw5xiw6eq65lbNSEKDBs9JI=; b=lDnGV+jmwuW95p+/9yVp+dRA040JypVTqk/4Gv9598gFC9nMSsT3ggtIQPPPwBCanprHkn i8Ww+OBkLAAXpjMu0RTKidddlW1oadCK45pcCznfpD7VQXq/NCYeu4ZaxHVOIgrNI5Soul Oku7/OLoF2Xs+62QFTpWvWDjendE2xWXw4GbBqgQOjdBs+8ul0rxpVoPq1SooEelf9dFoU xJmVffFzNYZTX3oR51dn8hd61x0tONEPZuYtqrH/5RkLbyj79J6VVFe901zZmhiVrLuOMy AScKvSERNU0K00Y7t1oK22C0+8qI1fC78L5Tz37bX63Q5JubiQ4dilzL2Z3XKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892079; a=rsa-sha256; cv=none; b=XlWbkSPIUd/AhJ8MKIh9QP3HZ3rFsWnv77g00a2O1B6tVF7cm4S8g36F7iwFN0qBoukxKk /IKqgovUDwK4AgghgfZz60A1BL5FMYo85+3Rwmn2cYCVAZGeOw1Icn2/l+KqInGCsgzVlW aqfeDFonP0tNcLPs4LPFrrk/T+fRynssuQSOOf1rLX06jVSfZTeAjXaZaMR7eE9oe84VRJ rEby0V6YnTA7a5pp/VVpl7LFq9bCLTZgEvQr+6tCCKG0st0doMvNezQJ5LB4JTLw+rLgqn ymN4oMKGYOREeELDoXWsz15XKfNKE7NtkptLcB+MDzdS7og57JUl4J6Noh8Z8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D5m/+2FIRx3DI2ty+yG9xw5xiw6eq65lbNSEKDBs9JI=; b=SU5MsKUyClwM46jgDXdD5uJxCFDgFpImttU6SBDjJk2CE+kk11Jk85QP+jytI9dsySh3c4 7GJlhiq6H8CzMv21/V7OIVUDuwNR+W6Ahob4XN2pvbZpOj0pFXLlCpiI1Dc4i+hU1EdjIR 2QX7/7cEdkT6uL9Fgbh3u4EXiDxL8j49E6g517m2hjsRvgpd3hir1pfjA37vKOj5gliPx+ OmbzHl3FATApMvaaRGSrG8UM1FeWaG7usGXiesevuB/OScfoxszgZVRk5tiTi9R8x8/y0C 1Bm9+ywH7DJadqvNe7n7n5MI7hWBMKkBJzfWcYvra10C9jesNXuDCVbsmLpI2g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1BdW1WtvzncK for ; Wed, 22 Apr 2026 21:07:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26c4a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:07:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Adrian Chadd From: Bjoern A. Zeeb Subject: git: 99b3fd23ef0b - stable/15 - net80211: clean up time comparison in HT code List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 99b3fd23ef0bf5428ff65cdb051adc4fdc12b900 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:07:59 +0000 Message-Id: <69e938af.26c4a.283cd679@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=99b3fd23ef0bf5428ff65cdb051adc4fdc12b900 commit 99b3fd23ef0bf5428ff65cdb051adc4fdc12b900 Author: Adrian Chadd AuthorDate: 2025-12-15 03:45:36 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:51 +0000 net80211: clean up time comparison in HT code There's at least one place where the time comparison is wrong, leading to some bad beahaviour around deciding to try and establish/reestablish AMPDU TX sessions. Start addressing these! Differential Revision: https://reviews.freebsd.org/D54390 (cherry picked from commit 7a5288a023baeac2f0c3128506178f89fda3cc0d) --- sys/net80211/ieee80211_ht.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c index 7817a7d0759d..9b2b0df33785 100644 --- a/sys/net80211/ieee80211_ht.c +++ b/sys/net80211/ieee80211_ht.c @@ -1131,7 +1131,8 @@ again: */ if (rap->rxa_qframes != 0) { /* XXX honor batimeout? */ - if (ticks - rap->rxa_age > ieee80211_ampdu_age) { + if (ieee80211_time_after(ticks - rap->rxa_age, + ieee80211_ampdu_age)) { /* * Too long since we received the first * frame; flush the reorder buffer. @@ -1393,7 +1394,8 @@ ieee80211_ht_node_age(struct ieee80211_node *ni) * See above for more details on what's happening here. */ /* XXX honor batimeout? */ - if (ticks - rap->rxa_age > ieee80211_ampdu_age) { + if (ieee80211_time_after(ticks - rap->rxa_age, + ieee80211_ampdu_age)) { /* * Too long since we received the first * frame; flush the reorder buffer. @@ -2825,7 +2827,7 @@ ieee80211_ampdu_request(struct ieee80211_node *ni, /* defer next try so we don't slam the driver with requests */ tap->txa_attempts = ieee80211_addba_maxtries; /* NB: check in case driver wants to override */ - if (tap->txa_nextrequest <= ticks) + if (ieee80211_time_before_eq(tap->txa_nextrequest, ticks)) tap->txa_nextrequest = ticks + ieee80211_addba_backoff; return 0; } From nobody Wed Apr 22 21:08:00 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1BdX6nh1z6bKgx for ; Wed, 22 Apr 2026 21:08:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1BdX4cCDz3kJ5 for ; Wed, 22 Apr 2026 21:08:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FCMI1NNCITrH6BmRcKVMC0QOU6lm9rnpq5/mTAdlNeQ=; b=TAPRfu0t7GikX4QnK2JxkZvDQpTtxrfQhVo75LEgbEwwJX3Sdr3JW2QqNL/VdjOzSSkjh4 wip2zzzKXE2yHn3zVEa1u8vHROpTD9vW2vgEMDPuX8zxp4xvKvNHoSz0o9BdZ2oUY4O1Sn U8HPQkXW8LbQPyip5/0kY2D9oPdI25ITUu2TuWP85lGDvnU0tvzoLbZJyCeba5QN5Fv15L g/mEx4C4Hx5GrwfAhu4fytlnsA4qwKLTePYyqaZAHPjtc9RwzA5xIutAI8Ns3Ym2/IpKN/ WryEUNk3994yve2rt3ixsUttfn/oHpLcCw9Brea4LEYC8fRsRIcAgLwm2hJ2Og== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892080; a=rsa-sha256; cv=none; b=YrBMojy0cmJ3dU0DftQC5ur7FHiYQfqQVygSfR9l91igAH7TZUyxu3dDazfnTw9/VILsWV q8hHXjrhVXKCbT2p6HeY5tjhIBjcpCX1i0YxjQZEb5J033jmt7b1yYCnXzg0ityP5hknji pwLjo63rGrgG8lulgInHqvkM2lXLrJwbI4gIFBXwpP0g+3O4b2TiW0KlxLbsAWYGH5us5F Plg54IAxGMF9HC7pR1xilqPBuCHVRoOHNgV6h/qMHwc/GEubBAYvc9/CfTBUH22Pg5oCim GcpiSIRU837E2+D09TuwRfTy1fq5FoHkVZSzZsYpzatqNi8QbUzw0OU/gX1WAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FCMI1NNCITrH6BmRcKVMC0QOU6lm9rnpq5/mTAdlNeQ=; b=vkr2zXcPqi3cjFcVeTU6Vd6V+LPKdmON3M7e5l58rOnGkp39faO/thN950iZXXJkICiFh8 ErsA5cIvlm9qcfjmy6l1R8Eqf7TpEBssxbSEyUpPqI0IKzmMR5Q+KoLeKO01nUiIwmjSj+ NKv5tg7p0TJr3jguS/CcZ7xLaqmF/jouuVZxomWroJSUoAhLudSD6G+N9kKNSHmYKe0QmN G6P2Pt0WIL2pSFLVM6GVMpHRwR+Y3X8Av5FesZmRre6Cror6R6MRS7PRSipOr4AAfd4FYF lTduwGg9wg1r7X3i+PpKrRoAkj03Tue7di4kARyEeXhslu66T0jpieRuzhW8ew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1BdX2RTwznZB for ; Wed, 22 Apr 2026 21:08:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 275e8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: c9e8d79da790 - stable/15 - linuxkpi: Avoid trailing whitespaces in lkpi_hex_dump() List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c9e8d79da7907147215123324c4aea00a00451bd Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:00 +0000 Message-Id: <69e938b0.275e8.22db58e6@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c9e8d79da7907147215123324c4aea00a00451bd commit c9e8d79da7907147215123324c4aea00a00451bd Author: Jean-Sébastien Pédron AuthorDate: 2025-07-26 15:30:40 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:52 +0000 linuxkpi: Avoid trailing whitespaces in lkpi_hex_dump() We use the return value of the callback to track the number of bytes written. We use it to determine if a group of characters should be prepended with a whitespace. This way, we never add a trailing whitespace. We need to pay attention to the return value of the callback: if it is negative, it's an error and we return immediately. Otherwise, we would decrease the number of written bytes and possibly make it negative. Reviewed by: bz, christos Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51558 (cherry picked from commit 38d757b6c29c990de72dc51ac123922d3f095f53) --- sys/compat/linuxkpi/common/src/linux_compat.c | 66 +++++++++++++++++++++------ 1 file changed, 53 insertions(+), 13 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index 35430daf311d..03d866260dd9 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -1900,47 +1900,87 @@ lkpi_hex_dump(int(*_fpf)(void *, const char *, ...), void *arg1, typedef const struct { uint32_t value; } __packed *print_32p_t; typedef const struct { uint16_t value; } __packed *print_16p_t; const void *buf_old = buf; - int row; + int row, linelen, ret; while (len > 0) { - if (level != NULL) - _fpf(arg1, "%s", level); - if (prefix_str != NULL) - _fpf(arg1, "%s ", prefix_str); + linelen = 0; + if (level != NULL) { + ret = _fpf(arg1, "%s", level); + if (ret < 0) + break; + linelen += ret; + } + if (prefix_str != NULL) { + ret = _fpf( + arg1, "%s%s", linelen ? " " : "", prefix_str); + if (ret < 0) + break; + linelen += ret; + } switch (prefix_type) { case DUMP_PREFIX_ADDRESS: - _fpf(arg1, "[%p] ", buf); + ret = _fpf( + arg1, "%s[%p]", linelen ? " " : "", buf); + if (ret < 0) + return; + linelen += ret; break; case DUMP_PREFIX_OFFSET: - _fpf(arg1, "[%#tx] ", ((const char *)buf - - (const char *)buf_old)); + ret = _fpf( + arg1, "%s[%#tx]", linelen ? " " : "", + ((const char *)buf - (const char *)buf_old)); + if (ret < 0) + return; + linelen += ret; break; default: break; } for (row = 0; row != rowsize; row++) { if (groupsize == 8 && len > 7) { - _fpf(arg1, "%016llx ", ((print_64p_t)buf)->value); + ret = _fpf( + arg1, "%s%016llx", linelen ? " " : "", + ((print_64p_t)buf)->value); + if (ret < 0) + return; + linelen += ret; buf = (const uint8_t *)buf + 8; len -= 8; } else if (groupsize == 4 && len > 3) { - _fpf(arg1, "%08x ", ((print_32p_t)buf)->value); + ret = _fpf( + arg1, "%s%08x", linelen ? " " : "", + ((print_32p_t)buf)->value); + if (ret < 0) + return; + linelen += ret; buf = (const uint8_t *)buf + 4; len -= 4; } else if (groupsize == 2 && len > 1) { - _fpf(arg1, "%04x ", ((print_16p_t)buf)->value); + ret = _fpf( + arg1, "%s%04x", linelen ? " " : "", + ((print_16p_t)buf)->value); + if (ret < 0) + return; + linelen += ret; buf = (const uint8_t *)buf + 2; len -= 2; } else if (len > 0) { - _fpf(arg1, "%02x ", *(const uint8_t *)buf); + ret = _fpf( + arg1, "%s%02x", linelen ? " " : "", + *(const uint8_t *)buf); + if (ret < 0) + return; + linelen += ret; buf = (const uint8_t *)buf + 1; len--; } else { break; } } - _fpf(arg1, "\n"); + ret = _fpf(arg1, "\n"); + if (ret < 0) + break; } } From nobody Wed Apr 22 21:08:02 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdb1Jy2z6bKqh for ; Wed, 22 Apr 2026 21:08:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1BdZ4DnMz3jj9 for ; Wed, 22 Apr 2026 21:08:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QrMm/46VM8j6HUjoN/g0apQGQJRbtEZ5TiLeMTRtWQw=; b=pfIuXF2oChNs+5q2grRZ4+f9eVkdctlOwV6SBnggG8aM5qdEVaIY96Yt4ciOqi5HtJPV+T gp3hMpw8tZsqkk7Y+RYZFkK4vgHFcampd6VyXUbefSMTnX8EKFHpel+VIt4qs5ag/8J4cD YTrj6/4yiOO+c2UyDIItxFx1XogFrf1kx/IVYnTCWLU5XBOyqY01d2BcMzNM+DfsYBOIqn MyRa99K8lKEXC28Z7kcJC/VFkkqKgRWF44K0zZ4Ekd/v99IRhpGWcAkIEm7kXlPqH3ILvV /IUcT4Nd6MxNz5YO5zNPZYSaUQsWLO9H7uThWcnI9AvgYh0WZW8d6AEAfwvxzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892082; a=rsa-sha256; cv=none; b=K9nAySIdJOAE74XJfDglA2N6tbM2EPdIFHa+4jihyU5ZRm7Z8QTkgxZIti6lNYbCDyP/JT +8rQbqHBgectj82+BLpOd9KQMGmTJtI8qhILQnfhrMHcP9+k5cXVNSJ5VPJaYP0xQoyaSG 7KlDUoT3QeVpTT61k7XUSZTlUqg6JYeF8uuHKooK74o3LEdyzjoN56uFRNqaFkjWlb8GFg 1DlsQfpHpExSUX8eWRY+yxCJqL7RjeShPdgw0rHg0WdZxgakDWJWQjZDTiRAEgQeTi8lqN MKFsQhmjXmFC8nDBjcbnmmHQ7p0339S0H+v8TAFSVmyXvDb7/FBF/yO6pnxSjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QrMm/46VM8j6HUjoN/g0apQGQJRbtEZ5TiLeMTRtWQw=; b=prSfEdjJpi1mJgB4p47jDjnXyZafHdDbb8Sf/6sDodDTIhmEMqrU0XpHxBmr8CafD5DKsT m9nMrp0P906KzRMfU1NwTMy1/Qu813rwpA9k9+48USoVg+lylI6ZaiIberDEmiuq9yBDjd oF3hZupi5G3VCkLNvjwNz/Uto/cz62kbsO10ZHqMbhEymafBgd6R0B8aBwAaNf6i2+ok0V fmBummq6RHkMazm14H+fnHT+IwHO4J83S4ByimmzAZkshKt7oqL2kB/iOF2gTZ4IlZYEQx qEtkTKIw0wBWRg9Ue46CYuAMALErEXl5QvpiSJCbMuwWPiv7cWd3xW/0vT9CEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1BdZ3lxYznZF for ; Wed, 22 Apr 2026 21:08:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26ab5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: ada63d6b2e5e - stable/15 - linuxkpi: Add hex_dump_to_buffer() List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ada63d6b2e5e15ad29e08a591a8b2bff443c102d Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:02 +0000 Message-Id: <69e938b2.26ab5.5590e270@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=ada63d6b2e5e15ad29e08a591a8b2bff443c102d commit ada63d6b2e5e15ad29e08a591a8b2bff443c102d Author: Jean-Sébastien Pédron AuthorDate: 2025-07-10 23:03:51 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:52 +0000 linuxkpi: Add hex_dump_to_buffer() This function prints a single line of hex dump to the given line buffer. The implementation relies on `lkpi_hex_dump()` to format the string. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51559 (cherry picked from commit b1bef9f7e0e182a9eee222639ffc8af4883ec0fa) --- sys/compat/linuxkpi/common/include/linux/printk.h | 6 ++ sys/compat/linuxkpi/common/src/linux_compat.c | 70 +++++++++++++++++++++++ 2 files changed, 76 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/printk.h b/sys/compat/linuxkpi/common/include/linux/printk.h index e10656c8a1d0..066ec900f04e 100644 --- a/sys/compat/linuxkpi/common/include/linux/printk.h +++ b/sys/compat/linuxkpi/common/include/linux/printk.h @@ -50,6 +50,12 @@ void lkpi_hex_dump(int(*)(void *, const char *, ...), void *arg1, const char *, const char *, const int, const int, const int, const void *, size_t, const bool, const bool); +#define hex_dump_to_buffer(buf, len, rowsize, groupsize, linebuf, linebuflen, ascii) \ + lkpi_hex_dump_to_buffer((buf), (len), (rowsize), (groupsize), (linebuf), (linebuflen), (ascii)) + +int lkpi_hex_dump_to_buffer(const void *buf, size_t len, int rowsize, + int groupsize, char *linebuf, size_t linebuflen, bool ascii); + static inline void print_hex_dump(const char *level, const char *prefix_str, const int prefix_type, const int rowsize, const int groupsize, diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index c2bad1f28eaf..8fc644241d79 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -1986,6 +1986,76 @@ lkpi_hex_dump(int(*_fpf)(void *, const char *, ...), void *arg1, } } +struct hdtb_context { + char *linebuf; + size_t linebuflen; + int written; +}; + +static int +hdtb_cb(void *arg, const char *format, ...) +{ + struct hdtb_context *context; + int written; + va_list args; + + context = arg; + + va_start(args, format); + written = vsnprintf( + context->linebuf, context->linebuflen, format, args); + va_end(args); + + if (written < 0) + return (written); + + /* + * Linux' hex_dump_to_buffer() function has the same behaviour as + * snprintf() basically. Therefore, it returns the number of bytes it + * would have written if the destination buffer was large enough. + * + * If the destination buffer was exhausted, lkpi_hex_dump() will + * continue to call this callback but it will only compute the bytes it + * would have written but write nothing to that buffer. + */ + context->written += written; + + if (written < context->linebuflen) { + context->linebuf += written; + context->linebuflen -= written; + } else { + context->linebuf += context->linebuflen; + context->linebuflen = 0; + } + + return (written); +} + +int +lkpi_hex_dump_to_buffer(const void *buf, size_t len, int rowsize, + int groupsize, char *linebuf, size_t linebuflen, bool ascii) +{ + int written; + struct hdtb_context context; + + context.linebuf = linebuf; + context.linebuflen = linebuflen; + context.written = 0; + + if (rowsize != 16 && rowsize != 32) + rowsize = 16; + + len = min(len, rowsize); + + lkpi_hex_dump( + hdtb_cb, &context, NULL, NULL, DUMP_PREFIX_NONE, + rowsize, groupsize, buf, len, ascii, false); + + written = context.written; + + return (written); +} + static void linux_timer_callback_wrapper(void *context) { From nobody Wed Apr 22 21:08:01 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1BdZ4WS6z6bKnb for ; Wed, 22 Apr 2026 21:08:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1BdY6f2sz3kCj for ; Wed, 22 Apr 2026 21:08:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GZEQ75JQnpeBcPU7KHCmIcK7QMRBIh9b+RnulrjXWcY=; b=md9i89TBJOS8fbhKy3VGOkpTkqQsKWyjToni7+eXPoQa/Z8eembCSih7KfmkOc/kZrtABP yu1LwSGqiUiLlTd8rTiviSuv7MCmSwJM9ybmwfS9ad3tvRFyiV1H3WJL4f3R+GJzQLYI2F ZFMUAjf8BO1qiglihZ8AQvZ5WFK7GjORHT0wwlt5njD0MPPGrCfzbJxcqtPAK7XbopQtzs +Ufx8Ixa2APpecNKn3vVhsinkPXSSToOsOPyZsfnPNiPsf9T7/SCEdTT/Bgl7YDpVhqyUH uT+Fc+ywDjSgkKfqWkOLgdNsqwNf0k6SnmU+gem2tfJKtiVGfSwjfban/Jy0lA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892082; a=rsa-sha256; cv=none; b=D8/k2gxnf+oyM+Si4zL0HIoeFA0FNYnHV+cdbKYxQMxiByu9aT/SRnjLd+rBvF+YpKH+Jw tjkdU8WOHEjw7I5Rs8pEn9VihucybFQnUMMJB7waLysJ4LF5TAdIySLP6qRCPWYWxbzBsO qZdzh+oioHXgmO8Xjapm4XzA1ErEeYeJf5Qcad+8k8WYsMC4j6w4impRBujwnNTwbdE0my UtoUgJapShHiXQAhvHtIK4EO1kLzseUVgjZVEnlTSYEpFs6C8wz8+8eTaW28q3hgeGU0iY 6oVoJpOyaC2tii493RwRC3zXQFJjtLrAxXswrXasyCh4HEv7AqUZvXgwxFQZxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GZEQ75JQnpeBcPU7KHCmIcK7QMRBIh9b+RnulrjXWcY=; b=ICl8OyhNz3hTnwEqzm1P6/NDHNQIFobNaqWg5pTQdMAQ64fgiTHPMI9kO4mX5pAzsxBmow fb8yLCcVjvEW1In2094aNM3qsdfpmXod1yeLqB16N/mNhHemW07Jm2acOVEw/NtyFBjxYh EwUi00uL7fNCXjzlR8wEYHJY3NPgePfFQ89QKoDypgBCZWqzLmHqYpZN5bokODATov0vsd 8QLpz09Gewj9+y0QHh/ReWx/VvUuaNSp+AyD9mRDpIm+sGBCIDCOdGDXQv0A6RQ3rqar7A 9jPiWvN1NNsB7oLWl/dpNSrVA+ep9KQ84DVRXMN7MMDLhxTQnIJgnvH9GlcwqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1BdY375Fzn9H for ; Wed, 22 Apr 2026 21:08:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27b3e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: 75be6c1207ba - stable/15 - linuxkpi: Add option to skip trailing newline in `lkpi_hex_dump()` List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 75be6c1207ba28005aaa8b04116c377c75e7429a Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:01 +0000 Message-Id: <69e938b1.27b3e.36cd5802@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=75be6c1207ba28005aaa8b04116c377c75e7429a commit 75be6c1207ba28005aaa8b04116c377c75e7429a Author: Jean-Sébastien Pédron AuthorDate: 2025-08-09 10:28:27 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:52 +0000 linuxkpi: Add option to skip trailing newline in `lkpi_hex_dump()` This will be useful in the upcoming implementation of `hex_dump_to_buffer()` which doesn't add one. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51844 (cherry picked from commit 43b5a264c6f665ac451102d828a8f51307efe626) --- sys/compat/linuxkpi/common/include/linux/printk.h | 4 ++-- sys/compat/linuxkpi/common/include/linux/seq_file.h | 2 +- sys/compat/linuxkpi/common/src/linux_compat.c | 10 ++++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/printk.h b/sys/compat/linuxkpi/common/include/linux/printk.h index d2d197682782..e10656c8a1d0 100644 --- a/sys/compat/linuxkpi/common/include/linux/printk.h +++ b/sys/compat/linuxkpi/common/include/linux/printk.h @@ -48,7 +48,7 @@ int __lkpi_hexdump_printf(void *, const char *, ...) __printflike(2, 3); void lkpi_hex_dump(int(*)(void *, const char *, ...), void *arg1, const char *, const char *, const int, const int, const int, - const void *, size_t, const bool); + const void *, size_t, const bool, const bool); static inline void print_hex_dump(const char *level, const char *prefix_str, @@ -56,7 +56,7 @@ print_hex_dump(const char *level, const char *prefix_str, const void *buf, size_t len, const bool ascii) { lkpi_hex_dump(__lkpi_hexdump_printf, NULL, level, prefix_str, prefix_type, - rowsize, groupsize, buf, len, ascii); + rowsize, groupsize, buf, len, ascii, true); } static inline void diff --git a/sys/compat/linuxkpi/common/include/linux/seq_file.h b/sys/compat/linuxkpi/common/include/linux/seq_file.h index 47da16ab8688..3c7862890c67 100644 --- a/sys/compat/linuxkpi/common/include/linux/seq_file.h +++ b/sys/compat/linuxkpi/common/include/linux/seq_file.h @@ -115,7 +115,7 @@ seq_hex_dump(struct seq_file *m, const char *prefix_str, int prefix_type, int rowsize, int groupsize, const void *buf, size_t len, bool ascii) { lkpi_hex_dump(__lkpi_hexdump_sbuf_printf, m->buf, NULL, prefix_str, prefix_type, - rowsize, groupsize, buf, len, ascii); + rowsize, groupsize, buf, len, ascii, true); } #define file linux_file diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index 03d866260dd9..c2bad1f28eaf 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -1894,7 +1894,7 @@ void lkpi_hex_dump(int(*_fpf)(void *, const char *, ...), void *arg1, const char *level, const char *prefix_str, const int prefix_type, const int rowsize, const int groupsize, - const void *buf, size_t len, const bool ascii) + const void *buf, size_t len, const bool ascii, const bool trailing_newline) { typedef const struct { long long value; } __packed *print_64p_t; typedef const struct { uint32_t value; } __packed *print_32p_t; @@ -1978,9 +1978,11 @@ lkpi_hex_dump(int(*_fpf)(void *, const char *, ...), void *arg1, break; } } - ret = _fpf(arg1, "\n"); - if (ret < 0) - break; + if (len > 0 && trailing_newline) { + ret = _fpf(arg1, "\n"); + if (ret < 0) + break; + } } } From nobody Wed Apr 22 21:08:03 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdc1v3Jz6bKnf for ; Wed, 22 Apr 2026 21:08: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bdb4pZtz3kWB for ; Wed, 22 Apr 2026 21:08:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kLEgNuMs2/N5OYUFNzIHuBynswHPIMSSdNcJ3f87/gQ=; b=D2KcgDlmd8bU9tiyi/IUm/59aYGXb/NtviroSo3Cgpy2yrwaZZJ8fnkvFB97l/iesgGwb5 FSU1rld4Xe+71FXmUoEubXbqA4AAbufunrCQ01+PZIOZnC9L2mJD5875mBY9GXzAe3fgIk NS5S8yLSAIEEK0Qq52ThTbUwv8z0Z2zndHF0NWW5DS6QbW28wjFZwCjIMxw3beVMn9uDdV dBEMpdcuxUrVPwZ47OnY3XOn+Ghn0cS5x47gJaZbJp/5YUUwaPQ/6cMuqMto1L6TYkfkKF qLqFx77M+bOG8YTC1QWkLvdKdwVLt3k/g3ckc/5AO7JRM4Gv5Df9d/ELmj48nQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892083; a=rsa-sha256; cv=none; b=SJQ86jegQsgyBXlNJjJT4F4YgEbMSq38hZr6abvcwp9jkzZFTqBhhbNdyvxzmy5O7GgaBN syTdkH+sJ7ERY5/FC3ZR96k9axcqh92rCdXs0nNhxAxf2OHkhe2aLIjZztMTt8Kx7hormP mdgqu9eYaAuvJjs4wzyeHtmzbHOzHTPgV1uY5vtFADAnmsuoS7UabbQe6zAbpaHw0FYxmZ bXEpS+m1KDXhgUw0na+jovzIy+O69wOmec7sebWx9DbyQdr0RqcBH/aidWBs6KiGNUuyOy zLP86B4O/v2GWfn0rcJ7tJxqdyO/j17mkpmsrR01DEMAWVijPXUS4wxvqtbrFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kLEgNuMs2/N5OYUFNzIHuBynswHPIMSSdNcJ3f87/gQ=; b=PTH1taKASwrY8SLImE22O2fkpNvitB33tT5JP0OmR80tLM2G/IpF64JLoKlY8dhYId559j m3NmoJVGDf5FpxMP3Dk0g4Wy3syhm1YEVg8ogq3oeAQ5UopC7+nn4F4k2mlf6HSbgNOCtf QFxmyPg3QG1+Q0rqJaoBxIqyWxTFZBkZ3JR+3NZYFMa6o4QRO4uDkoUNQnLyhekFbv0K8n MuF5gFV0P/Q5D7ajrdI7IcVeoK07QksVo/6qjiJ3ApyCMrEo5TxBAiaeItRSkgBtvk17aa B7jgyH8QrBMu+SCHtZuhUwXPPYuTFnnsa+pAg28JRuE05TBa1yu6ABHk7L65GQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdb4GcpznZG for ; Wed, 22 Apr 2026 21:08:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27ca4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: de8bc3aad7f1 - stable/15 - linuxkpi: Define `PCI_POSSIBLE_ERROR()` macro List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: de8bc3aad7f1b8eff5258b16e67bd2cc32275e20 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:03 +0000 Message-Id: <69e938b3.27ca4.3aec0a0b@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=de8bc3aad7f1b8eff5258b16e67bd2cc32275e20 commit de8bc3aad7f1b8eff5258b16e67bd2cc32275e20 Author: Jean-Sébastien Pédron AuthorDate: 2025-08-09 16:14:05 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:53 +0000 linuxkpi: Define `PCI_POSSIBLE_ERROR()` macro It comes with `PCI_ERROR_RESPONSE` and `PCI_SET_ERROR_RESPONSE()` but we don't use them so far. Therefore `PCI_POSSIBLE_ERROR()` will always reture false. As written in the comment, this macro is a bit weird given the Linux `pci_read_*() functions can return an error code separately from the read value. The `PCI_POSSIBLE_ERROR()` macro started to be used by the amdgpu DRM driver in Linux 6.10. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54487 (cherry picked from commit ace666bd21a204c62807f2c899402a7dc9ab161a) --- sys/compat/linuxkpi/common/include/linux/pci.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index 9b7699a5ca59..ccbd425de5da 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -235,6 +235,20 @@ extern const char *pci_power_names[6]; #define PCI_IRQ_LEGACY PCI_IRQ_INTX #endif +/* + * Linux PCI code uses `PCI_SET_ERROR_RESPONSE()` to indicate to the caller of + * a `pci_read_*()` function that the read failed. An example of failure is + * whether the device was disconnected. It is a bit weird because Linux + * `pci_read_*()` can return an error value, as the read value is stored in a + * integer passed by pointer. + * + * We don't set PCI_ERROR_RESPONSE anywhere as of this commit, but the DRM + * drivers started to use `PCI_POSSIBLE_ERROR()`. + */ +#define PCI_ERROR_RESPONSE (~0ULL) +#define PCI_SET_ERROR_RESPONSE(val) (*(val) = ((typeof(*(val))) PCI_ERROR_RESPONSE)) +#define PCI_POSSIBLE_ERROR(val) ((val) == ((typeof(val)) PCI_ERROR_RESPONSE)) + struct pci_dev; struct pci_driver { From nobody Wed Apr 22 21:08:04 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdd1fyCz6bKZZ for ; Wed, 22 Apr 2026 21:08:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bdc5XmPz3kWH for ; Wed, 22 Apr 2026 21:08:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DBQWnmw1dVMXwJNJy2tOZ2Da4iAzDMDjBXsupaVSxA0=; b=N+0Yy+0F45LsR3MoKGzOjVbKNb5C1G+YiQ8GWubKNDzs0XN9Uky7vqvn6kF7uL9DMlc2AD ifCvIiGCk6CGQOhym7RBuaflR37L58FYZCJEuDbbEq0q29ERW0YlTLVlBuT6Kytwks8Y+r jyAVEIzmccKOtYmBTAKUPeLK5IwyXp/cOs5GuoEqeUN8Dsy2HpesGTsrjj/TRa4c/lpPrv ong4j1lV5ZgUDKTPd94am1bwBZeI4Zoyj4SFAQWk5uP7zKTbQ47op5G+C9DfHPReCfCPda 1Ms8kRjr7JflJLIzFLlawNkTSUFk/Lq517tSsEHVch/VMdeQcEyY065nAXhpxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892084; a=rsa-sha256; cv=none; b=t19Cf4YxvlMYi23T/3kyfBTvu/CZe3DAhvsSnoee2wLygZjohcjclZNoALnDmFfocPpFsh HHGn5vvLDFJg9Nz1hl8sAa7FDkYD+yxTD+gzTVY7nipcoT79+vee5irXRLdnxsW1GrdVAQ fXSrypv18hMMOXxbXytEhNlK0kbFYiOi4Qy1dJlwJcqX3foQasd1F1c9gN+DOoXgAoAGAF HmF1PjJYss5pkf5uv2stBv7pJJNmq+KKEDIYZZaoC8I5v326sFcq0Shh73Cf1RGw5NV2Wd 4f+lQQAvOGZ2CnbYlOMuEWz20jjez2mMgMXl6TTKQZGkVSeb67lAswYpvGp/BQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DBQWnmw1dVMXwJNJy2tOZ2Da4iAzDMDjBXsupaVSxA0=; b=fj6CBLwWd5DKwheD8bfBZHo/StH4BI22i1hQLOdzYwtrnGM6dpMnhoOT3UprtODb26Rn1v fImadhhp8+Yiy2bSwp4c96aP4u62gm+SKKvaEempvSC9dl3ApJ9R5OoQhYGdEBfdtWwWQI A8Gdx6Iub2Gl2cfEdVh54qxO5erSFvqOHi8YxF+h0c8mdWvfe1DC3PI9w/CE5rtflC+W58 IZDdFJ5HD8aetS+Rr3QNUX6cEIebp7Cff8s9fR65ROABN0yw5DGDNkOaQ+smzo2fgL9xy2 y+atCXP/tH6FkDfx/CAURxoqadPsxJxvBxeL+PzlsergjUWDCympDj7Up9m+2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdc4zS1zn9J for ; Wed, 22 Apr 2026 21:08:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 303b3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: 27b66ef7f3bb - stable/15 - linuxkpi: Add a dummy List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 27b66ef7f3bb285103d567ee20bef6983231831f Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:04 +0000 Message-Id: <69e938b4.303b3.7fba894a@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=27b66ef7f3bb285103d567ee20bef6983231831f commit 27b66ef7f3bb285103d567ee20bef6983231831f Author: Jean-Sébastien Pédron AuthorDate: 2025-08-12 21:58:44 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:53 +0000 linuxkpi: Add a dummy The DRM generic code started to include it in Linux 6.10 but doesn't seem to use anything inside. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54490 (cherry picked from commit 65d7e9033439581af5bc1668827850663f84a5a5) --- sys/compat/linuxkpi/dummy/include/linux/kdebug.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/sys/compat/linuxkpi/dummy/include/linux/kdebug.h b/sys/compat/linuxkpi/dummy/include/linux/kdebug.h new file mode 100644 index 000000000000..e69de29bb2d1 From nobody Wed Apr 22 21:08:05 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdf61G0z6bKtW for ; Wed, 22 Apr 2026 21:08:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bdd6SbKz3kWY for ; Wed, 22 Apr 2026 21:08:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yULcUq88emwS+cd6SXXeHAXJXsT2TGHf/eOdLfAXo5U=; b=tEgq6tMgOdiPaRwjU+mpPVSCltz8LW5zIX4Nec9oYOn5etbMR2+HaDVgUTcvXcS60TnatE 0JHE5UZy/oGP4FU9bC74Tk7JCKpYaIXZxNpDDRmt20Zc72OTEZr6rmguezebpP+CVj26bo yLhYzGcpJWyHZVrPOwE18Ddgj0s1Y8WlexEoWzbVNacuG5Q1rZ5Q24I8tPHJaJgKABefGT LM+FuGyJPSDzD4ICqkxa9h/9HTVtm6OMqp0z4EYeF5UPEGfdm1jHRbY41sGBPiYKOd1R17 MjNzKcMuzi0j2RuQp3WTSLQP3nSlRwC7zzgWeEERCb2GSKpyK+Zv2F1qTwdDKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892085; a=rsa-sha256; cv=none; b=EGsJSJ056Q/kq4hPrlE9ZC+LXceyZeLw5c9KYM2cwERnQKXKA5hpkiXt0NEJkhxF6IJcJk 7ML4F3QMqs6mKTxTgt+PrSTfmWLiWdKbQ1/4LBXCaW1dqWQTWSqAJ+zo1UONA0LmGooQBX XRtP9FNP+o7SnsxFzjs6VV+C2+8ugMmMPRhtO+ml+UfDUdkmajQeJXxGdK/NxbGeBwqqiA M99VkeCtInb4vTQAhhYsEkVQ5sk6QHlLmHnAU6MpdHhT3/xDrJAXOj+iZ4MhxhNIFwwzu2 fpsHZ0aTWkzfqCJOh8lrIMwUz9hemiPp2h8OmH2Tk+VRqvYiha9ZNtBbqPUxew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yULcUq88emwS+cd6SXXeHAXJXsT2TGHf/eOdLfAXo5U=; b=nh8mCH86tvTWDtmU6NnuZsekvcWSncZmoW9d3zrkGpHV37xmyrBU9EEo000aWF96oTesZ/ cTkfhKzYx/qyR1d20d7rITYUn/TrECtViLbwAcbrBZ17EJi1vKWBGO+3lgGBd3G0hbRqt7 MIA4jLKI4+OwT5KyuQKF0yyPlB4ipYDIv42R82g0aAngl7xD3roCMwspYCffnRLwRCOLzu VAkOsgmAs/2jqVs1b2BULeeyqRWGaPnet3dHYKap7xYvhtGPaB2dn3O7fUxLMo1k6xcWPk qO6H7jL8w0xCB1Qzq4ZcfOXLVN80LTKsZogmdS0gK5jNLe6Wv3+3H78NgNCvgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdd5ZgYzn9L for ; Wed, 22 Apr 2026 21:08:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3008c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: 34c13c5ee2b1 - stable/15 - linuxkpi: Split List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 34c13c5ee2b15b928fd9125784c969553a64e390 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:05 +0000 Message-Id: <69e938b5.3008c.45ca0cef@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=34c13c5ee2b15b928fd9125784c969553a64e390 commit 34c13c5ee2b15b928fd9125784c969553a64e390 Author: Jean-Sébastien Pédron AuthorDate: 2025-08-17 11:10:43 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:53 +0000 linuxkpi: Split On Linux, they split the content into three headers: 1. 2. 3. The first includes the second, which includes the third. is also included on the compiler command line by default! I added that to the compilation flags of the DRM drivers. This allowed me to drop at least one: #ifdef __FreeBSD #include #endif Note that our copy of contains definitions which are not defined by Linux' . I left them alone. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54495 (cherry picked from commit 33fa585a0e9032b31c563c8aae001c0c2a4866d4) --- .../linuxkpi/common/include/linux/compiler.h | 48 +-------------------- .../common/include/linux/compiler_attributes.h | 49 ++++++++++++++++++++++ .../linuxkpi/common/include/linux/compiler_types.h | 45 ++++++++++++++++++++ 3 files changed, 96 insertions(+), 46 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/compiler.h b/sys/compat/linuxkpi/common/include/linux/compiler.h index 4146c829b936..90d907dd4d45 100644 --- a/sys/compat/linuxkpi/common/include/linux/compiler.h +++ b/sys/compat/linuxkpi/common/include/linux/compiler.h @@ -33,48 +33,18 @@ #include #include -#define __user -#define __kernel -#define __safe -#define __force -#define __nocast -#define __iomem -#define __chk_user_ptr(x) ((void)0) -#define __chk_io_ptr(x) ((void)0) -#define __builtin_warning(x, y...) (1) -#define __acquires(x) -#define __releases(x) -#define __acquire(x) do { } while (0) -#define __release(x) do { } while (0) -#define __cond_lock(x,c) (c) +#include + #define __bitwise #define __devinitdata -#ifndef __deprecated -#define __deprecated -#endif #define __init #define __initconst #define __devinit #define __devexit #define __exit -#define __rcu -#define __percpu -#define __weak __weak_symbol -#define __malloc -#define __attribute_const__ __attribute__((__const__)) -#undef __always_inline -#define __always_inline inline -#define noinline __noinline -#define noinline_for_stack __noinline #define ____cacheline_aligned __aligned(CACHE_LINE_SIZE) #define ____cacheline_aligned_in_smp __aligned(CACHE_LINE_SIZE) -#define fallthrough /* FALLTHROUGH */ do { } while(0) -#if __has_attribute(__nonstring__) -#define __nonstring __attribute__((__nonstring__)) -#else -#define __nonstring -#endif #if __has_attribute(__counted_by__) #define __counted_by(_x) __attribute__((__counted_by__(_x))) #else @@ -93,24 +63,12 @@ #define typeof(x) __typeof(x) #define uninitialized_var(x) x = x -#define __maybe_unused __unused -#define __always_unused __unused -#define __must_check __result_use_check - -#define __printf(a,b) __printflike(a,b) - -#define __diag_push() -#define __diag_pop() -#define __diag_ignore_all(...) #define barrier() __asm__ __volatile__("": : :"memory") #define lower_32_bits(n) ((u32)(n)) #define upper_32_bits(n) ((u32)(((n) >> 16) >> 16)) -#define ___PASTE(a,b) a##b -#define __PASTE(a,b) ___PASTE(a,b) - #define WRITE_ONCE(x,v) do { \ barrier(); \ (*(volatile __typeof(x) *)(uintptr_t)&(x)) = (v); \ @@ -129,8 +87,6 @@ #define lockless_dereference(p) READ_ONCE(p) #define _AT(T,X) ((T)(X)) - -#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) #define __must_be_array(a) __same_type(a, &(a)[0]) #define sizeof_field(_s, _m) sizeof(((_s *)0)->_m) diff --git a/sys/compat/linuxkpi/common/include/linux/compiler_attributes.h b/sys/compat/linuxkpi/common/include/linux/compiler_attributes.h new file mode 100644 index 000000000000..42908bb6c2b5 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/compiler_attributes.h @@ -0,0 +1,49 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2010 Isilon Systems, Inc. + * Copyright (c) 2010 iX Systems, Inc. + * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013-2016 Mellanox Technologies, Ltd. + * Copyright (c) 2015 François Tigeot + * All rights reserved. + */ + +#ifndef _LINUXKPI_LINUX_COMPILER_ATTRIBUTES_H_ +#define _LINUXKPI_LINUX_COMPILER_ATTRIBUTES_H_ + +#include + +#define __attribute_const__ __attribute__((__const__)) + +#ifndef __deprecated +#define __deprecated +#endif + +#define fallthrough /* FALLTHROUGH */ do { } while(0) + +#undef __always_inline +#define __always_inline inline + +#define __printf(a,b) __printflike(a,b) + +#define __malloc + +#define noinline __noinline + +#if __has_attribute(__nonstring__) +#define __nonstring __attribute__((__nonstring__)) +#else +#define __nonstring +#endif + +#define noinline_for_stack __noinline + +#define __maybe_unused __unused +#define __always_unused __unused + +#define __must_check __result_use_check + +#define __weak __weak_symbol + +#endif diff --git a/sys/compat/linuxkpi/common/include/linux/compiler_types.h b/sys/compat/linuxkpi/common/include/linux/compiler_types.h new file mode 100644 index 000000000000..7151c03de690 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/compiler_types.h @@ -0,0 +1,45 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2010 Isilon Systems, Inc. + * Copyright (c) 2010 iX Systems, Inc. + * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013-2016 Mellanox Technologies, Ltd. + * Copyright (c) 2015 François Tigeot + * All rights reserved. + */ + +#ifndef _LINUXKPI_LINUX_COMPILER_TYPES_H_ +#define _LINUXKPI_LINUX_COMPILER_TYPES_H_ + +#include + +#include + +#define __kernel +#define __user +#define __iomem +#define __percpu +#define __rcu +#define __chk_user_ptr(x) ((void)0) +#define __chk_io_ptr(x) ((void)0) +#define __acquires(x) +#define __releases(x) +#define __acquire(x) do { } while (0) +#define __release(x) do { } while (0) +#define __cond_lock(x,c) (c) +#define __force +#define __nocast +#define __safe +#define __builtin_warning(x, y...) (1) + +#define ___PASTE(a,b) a##b +#define __PASTE(a,b) ___PASTE(a,b) + +#define __diag_push() +#define __diag_pop() +#define __diag_ignore_all(...) + +#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) + +#endif From nobody Wed Apr 22 21:08:06 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdg5nJqz6bKr2 for ; Wed, 22 Apr 2026 21:08:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bdf6kzHz3jkh for ; Wed, 22 Apr 2026 21:08:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RKjtUUjig4ifsDhLpRi+LR/NqatsRwNmc4ffPl+6yag=; b=OC8HJ5SsVK/gisxj+eHMrcFfVxF8XShUcUU6W/kXcacEhbJMeqQ+4gJY19mtX9riGGSBQ3 Iys2rxnGpL4ciVRzAkXiP0CcFEpejdRlrC2MxRDreOxcMv9EknD0IHdRBZAkyDHz3M5GML ccXITVnwAdOuG7TifRS4+ms3qPTFIkmCcdH1m5oI5B5MQlI2ZurTnsuxWAdTOb5ab4Otcw c8mJsAk2AiDMS9H77Lianfl6/GPiWB6TL5vqrK4NEEro9HMo/NxIB/0vBaX6hcdJmJCIbO OrKSkelgJ8eCIbgeKl1o+eAHAQehI6ATcsN3q0Bl042lulz45Znd6pwTwnQXSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892087; a=rsa-sha256; cv=none; b=Lal4EfAxYFy9AKcVHj805bfJfTz+zKAw53BERtymyCdZa1zfqkexEkEEOMfHYdIKuEy/iq FoIVbmqPdzM9RH20T8/WjI7VcXk6ywHf9apKJ7dpngL/ktEW9L+x/TEjB+EyTbK77/qHcZ 5d5X9r1Kxp3E9XaUxVgA9PJolaRWsXQB5S06zlYL1TBezHO+YEcD58ibkcU5y7Ug0OOUAu N2Yv6qZxlJQqb9PBgY+df8CLbu2VC/IkZNEBcNBOMRPgTtkPvw2jU0Sc5fJVeltLijnSV+ +zIO8hMUkmy9CFfrKggvzfBKC+VwYqHtHYbZQOmpRsb8+OoHjlkaKWhHJy1hww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RKjtUUjig4ifsDhLpRi+LR/NqatsRwNmc4ffPl+6yag=; b=NPq3bj1IidTVH9Rmjlmz1b9PDR6LHDDwNQprjdkssFIHvDNTJztAo4wh7EiWCfByhPBht+ lszh7lQKb9TfXvgNb9O5S1Gk7A2+kL3r75oLDs9zeeq7JAG2qgSLwnZ7nGjPd0jz2+rU5u ENxLANoQWTdcn/p59Vlb8dNpjVaFbPYvif4V4yKwHqxs14gLwa+Id/8lROCfALuBtW4Jbv xS1fcujpuHI/f1E6N7/s2o1bxCw5tcuoUqIGlTf5WARyLZeCU/HrVl8GQJDut3N5kyJMbp HgP2IOCeK7YIjOptGuo9eUeH8Qgmje0DaAqbgsD3wSS+AqaeYhrrOJGmFJtjgw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdf66B3znZK for ; Wed, 22 Apr 2026 21:08:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 304eb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: d4066868e086 - stable/15 - linuxkpi: Replicate Linux #includes between headers List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d4066868e08646a56122c53baeb5479784e1c625 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:06 +0000 Message-Id: <69e938b6.304eb.600a0bba@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d4066868e08646a56122c53baeb5479784e1c625 commit d4066868e08646a56122c53baeb5479784e1c625 Author: Jean-Sébastien Pédron AuthorDate: 2025-08-17 11:17:49 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:54 +0000 linuxkpi: Replicate Linux #includes between headers The DRM drivers (and probably other parts of the Linux kernel) had a significant cleanup w.r.t. which source file includes what in Linux 6.10. Nonetheless, the DRM drivers still depend on implicit namespace pollution because some source files do not include all the headers they should. This cleanup broke the build with FreeBSD because we do not replicate the same `#include` directives everywhere. This commit adds the same `#include` directives in several headers in order to get the same namespace pollution. This fixes the build of the DRM drivers from Linux 6.10. An example is `drm_dp_tunnel.c` which needed `str_yes_no()` defined by (technically in Linux). It gets it through: -> -> -> -> -> -> -> Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54496 (cherry picked from commit b5f7a0b0fd8953c00b154d96b79ba0208c2e1aca) --- sys/compat/linuxkpi/common/include/linux/cgroup.h | 9 +++++ sys/compat/linuxkpi/common/include/linux/file.h | 5 +++ sys/compat/linuxkpi/common/include/linux/i2c.h | 7 ++++ .../linuxkpi/common/include/linux/memcontrol.h | 43 ++++++++++++++++++++++ .../linuxkpi/common/include/linux/notifier.h | 5 +++ .../common/include/linux/regulator/consumer.h | 17 +++++++++ sys/compat/linuxkpi/common/include/linux/suspend.h | 6 +++ sys/compat/linuxkpi/common/include/linux/swap.h | 7 ++++ 8 files changed, 99 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/cgroup.h b/sys/compat/linuxkpi/common/include/linux/cgroup.h index a9dd22fd0f4c..c75404fd6cf3 100644 --- a/sys/compat/linuxkpi/common/include/linux/cgroup.h +++ b/sys/compat/linuxkpi/common/include/linux/cgroup.h @@ -29,6 +29,15 @@ #ifndef _LINUXKPI_LINUX_CGROUP_H_ #define _LINUXKPI_LINUX_CGROUP_H_ +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #endif /* _LINUXKPI_LINUX_CGROUP_H_ */ diff --git a/sys/compat/linuxkpi/common/include/linux/file.h b/sys/compat/linuxkpi/common/include/linux/file.h index f6e988c2d88e..be12d5f1bccf 100644 --- a/sys/compat/linuxkpi/common/include/linux/file.h +++ b/sys/compat/linuxkpi/common/include/linux/file.h @@ -39,6 +39,11 @@ #include #include +#include +#include +#include +#include + struct linux_file; #undef file diff --git a/sys/compat/linuxkpi/common/include/linux/i2c.h b/sys/compat/linuxkpi/common/include/linux/i2c.h index f24d282586f6..a6a4ee85d584 100644 --- a/sys/compat/linuxkpi/common/include/linux/i2c.h +++ b/sys/compat/linuxkpi/common/include/linux/i2c.h @@ -31,7 +31,14 @@ #include #include +#include +#include #include +#include +#include +#include +#include +#include #define I2C_MAX_ADAPTER_NAME_LENGTH 32 diff --git a/sys/compat/linuxkpi/common/include/linux/memcontrol.h b/sys/compat/linuxkpi/common/include/linux/memcontrol.h new file mode 100644 index 000000000000..57fadf9af60f --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/memcontrol.h @@ -0,0 +1,43 @@ +/*- + * Copyright (c) 2025 The FreeBSD Foundation + * Copyright (c) 2025 Jean-Sébastien Pédron + * + * This software was developed by Jean-Sébastien Pédron under sponsorship + * from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + + +#ifndef _LINUXKPI_LINUX_MEMCONTROL_H_ +#define _LINUXKPI_LINUX_MEMCONTROL_H_ + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif /* defined(_LINUXKPI_LINUX_MEMCONTROL_H_) */ diff --git a/sys/compat/linuxkpi/common/include/linux/notifier.h b/sys/compat/linuxkpi/common/include/linux/notifier.h index 9302a1ce4606..4fe43255c648 100644 --- a/sys/compat/linuxkpi/common/include/linux/notifier.h +++ b/sys/compat/linuxkpi/common/include/linux/notifier.h @@ -32,6 +32,11 @@ #include #include +#include +#include +#include +#include + #define NOTIFY_DONE 0 #define NOTIFY_OK 0x0001 #define NOTIFY_STOP_MASK 0x8000 diff --git a/sys/compat/linuxkpi/common/include/linux/regulator/consumer.h b/sys/compat/linuxkpi/common/include/linux/regulator/consumer.h new file mode 100644 index 000000000000..d6c23575bc83 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/regulator/consumer.h @@ -0,0 +1,17 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025-2026 The FreeBSD Foundation + * Copyright (c) 2025-2026 Jean-Sébastien Pédron + * + * This software was developed by Jean-Sébastien Pédron under sponsorship + * from the FreeBSD Foundation. + */ + +#ifndef _LINUXKPI_LINUX_REGULATOR_CONSUMER_H_ +#define _LINUXKPI_LINUX_REGULATOR_CONSUMER_H_ + +#include +#include + +#endif diff --git a/sys/compat/linuxkpi/common/include/linux/suspend.h b/sys/compat/linuxkpi/common/include/linux/suspend.h index dacecbebdc08..3d5d5d594127 100644 --- a/sys/compat/linuxkpi/common/include/linux/suspend.h +++ b/sys/compat/linuxkpi/common/include/linux/suspend.h @@ -3,6 +3,12 @@ #ifndef _LINUXKPI_LINUX_SUSPEND_H_ #define _LINUXKPI_LINUX_SUSPEND_H_ +#include +#include +#include +#include +#include + typedef int suspend_state_t; extern suspend_state_t pm_suspend_target_state; diff --git a/sys/compat/linuxkpi/common/include/linux/swap.h b/sys/compat/linuxkpi/common/include/linux/swap.h index 5828db7ae392..9c1db9677f9e 100644 --- a/sys/compat/linuxkpi/common/include/linux/swap.h +++ b/sys/compat/linuxkpi/common/include/linux/swap.h @@ -37,7 +37,14 @@ #include #include +#include +#include +#include +#include +#include +#include #include +#include #include static inline long From nobody Wed Apr 22 21:08:07 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdh2sbrz6bKr3 for ; Wed, 22 Apr 2026 21:08:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bdh0BGcz3kcN for ; Wed, 22 Apr 2026 21:08:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TkKw6h0DVWKSIWsjcqCM2NOXUJS6IuiPG9ADlzq6UZc=; b=OU8ROratce/GQZAY/M4L8nw1iVwmcISOWjb292viyfOaUGO3hvxmJNttfWMKUcfeK26Pu+ TmwyAi5XXmIDC4I+dyg5HHNGRNUaVOppxEFWKeygZkPy69mKNUNWKQOMtgP2cWhclcWHmg Q0ObRv86RRZtGKJ+y6NOm2E3bCoSDTN+wENT77+NOIsMN0PtpYKeMm5wi8yAe5ywAp+eeA GfIGiMznZwWLzvAG/9AjnB3k6aiagE0IFsRhZvAsPFM6JQPSF70yCGU4ExieJSQxgvCVsl Pm+zrdx4SI5GAHYoPee4OnYL7CIKcJnzSQDR45UQfJs5G0AVdDuw5kStYbpssA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892088; a=rsa-sha256; cv=none; b=UQr+8ffqELbBxas0sxlsCmYiIpu13si+73w6Zt2x39OycLraaD9IWWoIIYk5hp3omUeCGq aDpLC95GgyeXpE2xTVLgKb3eAPF2b258Ao3cXsCL87qUXUMSgTdDV27JHq2YmhY8/4i65k QhuqYpPjTmuQF53ANmfWOt/lEOMJfvdypwRclamUd8eH0s5dv+QFKTS+g+nLU1VOGTSewu gsEZyu7C/GVoxmsu5W0WUAZoHZpULMb0cbmBb2O4vlnK7x5GrCoUDt6g8nT8BcM0d/Vxgb NcWSDWDjxFrOG3v0zdYtLNLOoAJiusjKOum/gGz2YtzMvyv3q0r7jW/Q+6uJDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TkKw6h0DVWKSIWsjcqCM2NOXUJS6IuiPG9ADlzq6UZc=; b=cMNFdrXcCeI8XhZW2qMlB0C9kKHl+QgC+SZAmTl2sTBjx+ZZ2mt1/g/kyXaTgnmQNsGF6F /hp54eZ4UQFv5YMTiCZsOx0PqOJNPGwNeV9/sKL4guXnC8wor1bHXsCurAcpcE2si9gBF9 fvf6hcBjix6OF4IpMoXgrXL/fNi+T4HZ5Mj/3emOyg722ZrLBJEWsdDMNKPcse6Q9oQMQf EOX9gnWelNG8ALbnpP1GV28VWWmnZsGWpi8fJeBsCdH/5zm3QKS+xVMYYi5mq3YIAcFTbP qmY5lo8uzj2df68IrUcVmxN3MM/i9ozzWdP1u5XMdwEd3tbgEjf/LJktOy6KAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdg6f4BznWj for ; Wed, 22 Apr 2026 21:08:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26dc5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: b510eedf7e51 - stable/15 - linuxkpi: Add support for statically-allocated kfifo List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b510eedf7e512019ccac0f5f79e0cb7738dad40b Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:07 +0000 Message-Id: <69e938b7.26dc5.7c2155b3@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=b510eedf7e512019ccac0f5f79e0cb7738dad40b commit b510eedf7e512019ccac0f5f79e0cb7738dad40b Author: Jean-Sébastien Pédron AuthorDate: 2025-09-07 08:37:27 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:54 +0000 linuxkpi: Add support for statically-allocated kfifo The main difference with the dynamically allocated version is that the structure is initialized with `DECLARE_KFIFO()` which takes the number of items as an additional argument compared to `DECLARE_KFIFO_PTR()`. The declared structure is then initialized with `INIT_KFIFO()` which sets all fields to 0, except `total` which is computed from the size of the array passed to `DECLARE_KFIFO()`. The amdgpu DRM driver started to used this in Linux 6.10. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54497 (cherry picked from commit 55bd09ae0fc437c9eb135952ac278540b7388add) --- sys/compat/linuxkpi/common/include/linux/kfifo.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/kfifo.h b/sys/compat/linuxkpi/common/include/linux/kfifo.h index b9f6ecacd3d1..b0d0c17f07e4 100644 --- a/sys/compat/linuxkpi/common/include/linux/kfifo.h +++ b/sys/compat/linuxkpi/common/include/linux/kfifo.h @@ -33,8 +33,26 @@ #include #include -#define INIT_KFIFO(x) 0 -#define DECLARE_KFIFO(x, y, z) +/* + * INIT_KFIFO() is used to initialize the structure declared with + * DECLARE_KFIFO(). It doesn't work with DECLARE_KFIFO_PTR(). + */ +#define INIT_KFIFO(_kf) \ + ({ \ + (_kf).total = nitems((_kf).head); \ + (_kf).count = 0; \ + (_kf).first = 0; \ + (_kf).last = 0; \ + }) + +#define DECLARE_KFIFO(_name, _type, _size) \ + struct kfifo_ ## _name { \ + size_t total; \ + size_t count; \ + size_t first; \ + size_t last; \ + _type head[_size]; \ + } _name #define DECLARE_KFIFO_PTR(_name, _type) \ struct kfifo_ ## _name { \ From nobody Wed Apr 22 21:08:10 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdk4k29z6bKZj for ; Wed, 22 Apr 2026 21:08:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bdk1pc8z3jlW for ; Wed, 22 Apr 2026 21:08:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MK4t/ILzHusvxD+GB9/dkrLrDyBWzRQ0VEf5vzT3lNw=; b=J9L7sLAcEw1gxKUCYGkNfZloUTYHlf+hgWimG8b1eJteczvVDPGSW+CcxZpuQaY+ZUJURm Z2TsYbFWTcyj2ARlV281sDY/bWXwVby5nyJRUcY6LlNjuACoZJyoqrajVllcLJs5dDaBAL Gia78bCAe8zovUtwn+mVXPCvaJUAox1Q0alN3lBI8Smd4N4xlfZzriHEvOHBLda0oHBIwH LpTfEvD5UNsag80OFplf9HwRGR1nrV+JZiX7RTYKvRXfUHRlC/E3sZe858CMsoAtC8t3Uv nEIqjM9J9MbgdI/BRIeZbiU0tocUPv14r18hpasy+ruZlPWNdrkrRmy8YuM5Ng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892090; a=rsa-sha256; cv=none; b=Ss90LIdXy9xnzXnOGLrh5jun+ICp4//uV3kG//q3fp/BSehm2MkvcZ3Wp+k9Wo/zfWmMVe QwTyVKfx7JUM0nYFaby4e9sUC2uJkriw6alhf9J6quzHLwXkDUeNq3nQz50RHpIplIBdeh pLbZuTt7xxKEFr89mwMMK75sKt5mdTHGYbmdKNTm9Q48jU7JyNSjpVZTKarTN2jdTGMNVx nYv/pb/VxSu8iu/3jdarhSWAyVNPaJ/M5+WuO2exs/ta2FZxZEQafYmlGpRqc04w489BmZ 2XAl98Zb4++y1Yo52tqXTrqTo07C3YMoXaYZlYaKUtCSo0j17mLB+P0V3rmVhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MK4t/ILzHusvxD+GB9/dkrLrDyBWzRQ0VEf5vzT3lNw=; b=JKN9okLR1HbJ7VBVyPutwKNek52I6kGj+ikBBX7cWEEv9a4p4z2wRjkC519laovb2uUFMI W2p7ERPdkAJz86uUs/KnFL6/HxGJTUv1LgKLQpLncjH9IgfRkju4aMvCVyaY9jfrjBN0Kz 0Yiy6SJn477Xkr/x0sQRpY0jfZ9JMOGvwX/t8ieTUlAmSSNYH8l4DgYeuWJEccMwqhi8x0 41FSRiEnD/w157pM9fuUMC3c98JrtnY4WTddS00e2hyY0/nha6N0GhWxcmHshbZB55fUKb 9TeI6u6oxAePm+LfHyIdD7VMb/T7g7aRblbvtAKmdhBo835pKagQJyB6t+YiRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdk1C6LznWk for ; Wed, 22 Apr 2026 21:08:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26d33 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: 5d1539f8401e - stable/15 - linuxkpi: Add `rol64()` List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5d1539f8401eff8fc2c1e424ff4782ee15882234 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:10 +0000 Message-Id: <69e938ba.26d33.833dbc8@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=5d1539f8401eff8fc2c1e424ff4782ee15882234 commit 5d1539f8401eff8fc2c1e424ff4782ee15882234 Author: Jean-Sébastien Pédron AuthorDate: 2025-09-07 23:22:22 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:55 +0000 linuxkpi: Add `rol64()` This is used by added in a separate future commit. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54499 (cherry picked from commit a9462e32fa75a9a1e3f49964bc42b5303e0dd092) --- sys/compat/linuxkpi/common/include/linux/bitops.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/bitops.h b/sys/compat/linuxkpi/common/include/linux/bitops.h index e34ba391421a..427d52b0dc81 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitops.h +++ b/sys/compat/linuxkpi/common/include/linux/bitops.h @@ -437,4 +437,10 @@ sign_extend32(uint32_t value, int index) return ((int32_t)(value << shift) >> shift); } +static inline uint64_t +rol64(uint64_t word, unsigned int shift) +{ + return ((word << (shift & 63)) | (word >> ((-shift) & 63))); +} + #endif /* _LINUXKPI_LINUX_BITOPS_H_ */ From nobody Wed Apr 22 21:08:09 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdj4sN2z6bKx8 for ; Wed, 22 Apr 2026 21:08:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bdj16b9z3kZ4 for ; Wed, 22 Apr 2026 21:08:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V4j5PmLm1Z9dFYI7wBm3Pa6pA+5BqP+YukSPLBWd9jw=; b=I6DZRf3MK4Y82wGxW8Bf7FfeWH1lZVk0xyuFBV1iaBieEE1HyW1SvDfF8Olo3F+OyXqEzV uhqk3qEBIPxuNkRHrPCvTHoBE8bFZo2xhDqvqUZ2IzQ7Mea9W1sgPzR+o16s0Mr83MX0WJ OEifO6gARiPnf/zDh35t2VMD366GqdQMQY6zOHxkGpURL2yrA8llf5AVkXhHaL1AqAZl/F CatjuicQL6WA4JCu0UwYZfaFy/K76UYDn7s2cefwECcoCgLU7cg+xzCkmYsc0WlbfQStC+ zNQcQeKtaGKd/4+JGoY63AjniTUkt2ltGJxRzxETmVqPAP3XHsqKJlHF8Y0z6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892089; a=rsa-sha256; cv=none; b=yAVqeU1i/AspGAboR9Mc5sgmE+/vZ1QQ1FXHA1BcJBkA9j7GuHBsd93M6oWc0C50QYsUsd bPEL8cBHvKEc3iEJUjcq5rv2Ze2LfOownhV6+uJp6h2bc5uIXnNWyFBGANKJN3SugfIyKq jLgAuMP8jeVrXlSBYXh3pE75wp2DYAM+2SLA7W44xe1Yk3sRx/+O/k7in2rQ4Z/ldlkquS wqeKe1qsQdwn7mMO0qehfmt06SwbwpUn6eaD7BW7mCBw/NTn9ryxE3GvRR/3tRJjobdskI QnTtXQ/QmO2PpJt6mCSl9GcbMUBDmOrx/+Peqhl5wfKhrtHKeVd4ay5nI0q8rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V4j5PmLm1Z9dFYI7wBm3Pa6pA+5BqP+YukSPLBWd9jw=; b=GiUpVujJXcXUEvCRAA1YdOIAsfqmT6h3PgQnlXLK60b2n1kb6BzsjwOBperSbpMdyb5iPp Kq2rcT+qRpnDg2QAhAgx1IOhpElfX/kxgYfVne3OSTrM07E1hlTJb/5pwuM8lGbaOuUXrk aIM9IBSncx3dEOhPxc5gQQT2FAcWTCVGEkkylgvwggIxl64QwTCsvQbuS1G52m9O5snJlq 6YvK1rhHq1UCS9YxX6Yf8RLzRhlOfFSPC3BLieIuxlUHyrDApJkLXbPKThDhWV3csgm1bG 9tbOQldrVNiAqIRIfmjOsyuIGuYGsrZjh7C0Fm2bLc9TH+OIECzPFms7uNeJBg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdj0QQjznK8 for ; Wed, 22 Apr 2026 21:08:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26dca by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: 06517a2a2470 - stable/15 - linuxkpi: Add a dummy List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 06517a2a2470a9dd3102be18a7a5c9f0dfd68275 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:09 +0000 Message-Id: <69e938b9.26dca.2a2e9b53@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=06517a2a2470a9dd3102be18a7a5c9f0dfd68275 commit 06517a2a2470a9dd3102be18a7a5c9f0dfd68275 Author: Jean-Sébastien Pédron AuthorDate: 2025-09-07 23:22:05 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:54 +0000 linuxkpi: Add a dummy The amdgpu DRM driver started to include in from Linux 6.10, but either it does not use any of it, or linuxkpi provides the necessary API from another header. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54498 (cherry picked from commit 242beec703f771312fac3be1b4ce3092bbc93e25) --- sys/compat/linuxkpi/dummy/include/linux/fpu.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/sys/compat/linuxkpi/dummy/include/linux/fpu.h b/sys/compat/linuxkpi/dummy/include/linux/fpu.h new file mode 100644 index 000000000000..e69de29bb2d1 From nobody Wed Apr 22 21:08:11 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdm0lLDz6bKtl for ; Wed, 22 Apr 2026 21:08:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bdl2gg6z3kXS for ; Wed, 22 Apr 2026 21:08:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uts6fnSDg1/cBzBbCt77OsOL2G5GT0c6ZYZdzgrLlPE=; b=PO0q7iaDCYt0gN2wqkmdtLv0C8dGJ/IbZGrEpYHVCWFSiMp0+gnHvwpIYMjf5tVe893SYB vRT2wTXNGkeSwTdfLg0Lx7klkvcgWaEGZmQV1ahI/vfQ8OdimjOGbh3jFTiwPHliJQPwT9 +QYPkGgc6tpMiBfMYTf98NV6odGfmKLq0ACQ9vQBg2ySuihLfoYT1+W8lyyAc6YtbVMVTL QDAG16D1C6GBxdySO1wjQWZMI8PGcjzlr5NfbKOJxKWuQRsscs234xB/bxsUm9VwNlgrrr PNCTbo77yyRDX209+/ytOPQ3prgvH8zN/wHx414qSpB5zpJCPyslvipMqZ6UkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892091; a=rsa-sha256; cv=none; b=X/hZveZqSze5WVoIv5QVf6oEoGXwZVZZAK5nBHyIknd7eulwX3Aa1w1q8OfKGSObRNGSp6 YDRD2AYir3zSFG04LazABdZeG7/R1QjES3LrgmsvbLoFE4zzKZqFe6b390EbmoQH//SyNu REG2IztrbLcrE/qUafjcuNoZQ6h7au3NiZHwQvTM/2MR7iH/JUYz+WSEqgp9FwI8IGCUEM qqlnyqYTiX3xsH0d+Qm3PARN8aXejL325nz8ZQXSHwuV34itWyZxIfIz96MNXlo7uWD2Et Ef0AO8WjTaldcI+/FKz4g8PSVk6nkqn2N6w2Ofd4uQqSkMjNtCvv6g5llZumXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uts6fnSDg1/cBzBbCt77OsOL2G5GT0c6ZYZdzgrLlPE=; b=DGJLkDyH0/vWV1awXYBaQ9NUWAgF/h90/ccUjFgXng0YIFJSrKtDIcppejBhkSG9K9cxod omewdPRqeU8sEzCE24J+bO+QSVkhp3YmG4LLXzxvzZgQA4Mc8DvssOu/YN+hQ9M9bOtAnE 2O2OnDndHF+2i5Mhny/uVtQSJnKLifOg01+60kpBKsNGzp9MT4HBnbOaKcFLHWH/PoGHXr U2DTyOcvPQc7lpFO9MTfqVv0ilggq5FMeBFdXh0vxh1dKY/zZcRwMR7oBAzKoG6Ac6n56r 6k7TzWVw209b95GN5JqiaoOPM0PIWDjDks9A2dTqqtZY3LRoSNptK5OiSmIjBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdl1qBkznZQ for ; Wed, 22 Apr 2026 21:08:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 304f0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: 74fbc6bc6c33 - stable/15 - linuxkpi: Add get_unaligned_le64() List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 74fbc6bc6c330ec6bf04e4b8ca5329767734bd6e Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:11 +0000 Message-Id: <69e938bb.304f0.5a2a3f92@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=74fbc6bc6c330ec6bf04e4b8ca5329767734bd6e commit 74fbc6bc6c330ec6bf04e4b8ca5329767734bd6e Author: Jean-Sébastien Pédron AuthorDate: 2025-09-15 21:40:31 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:55 +0000 linuxkpi: Add get_unaligned_le64() This function was the only one missing in the `get_unaligned_*()` family. This is going to be used by the imported `linux_siphash.c` in a future commit, which itself is used by DRM drivers starting from Linux 6.10. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54500 (cherry picked from commit 15f29e1e1978bbc4ed24975ad3666596281076fc) --- sys/compat/linuxkpi/common/include/asm/unaligned.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/asm/unaligned.h b/sys/compat/linuxkpi/common/include/asm/unaligned.h index e45846a3b543..6778e9fcede1 100644 --- a/sys/compat/linuxkpi/common/include/asm/unaligned.h +++ b/sys/compat/linuxkpi/common/include/asm/unaligned.h @@ -48,6 +48,13 @@ get_unaligned_le32(const void *p) return (le32_to_cpup((const __le32 *)p)); } +static __inline uint64_t +get_unaligned_le64(const void *p) +{ + + return (le64_to_cpup((const __le64 *)p)); +} + static __inline void put_unaligned_le16(__le16 v, void *p) { From nobody Wed Apr 22 21:08:12 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdm4whnz6bKjQ for ; Wed, 22 Apr 2026 21:08:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bdm2mf7z3kVG for ; Wed, 22 Apr 2026 21:08:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892092; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9UccVZxll8lqGtT93sGmq50iVV2U3CoG0lQi8fwLJxM=; b=smsF1fp3iIKakUYZsH4yUbXrE7XalAygPlXMpr9+60ihCe/nxuUDy0qYdX7hHxslV7hwSQ UfQD6hZtdIaI5VzCU4coQ9xY8eX3pPRuUd7qgt8v0tksTiSnTeSTQReYq4YqvVmIJA/rBF A9WXI3eeoo41pKXOa5e5yY98GU48fgbuCJGeKtDxl7j3d+pGtzcg7fOSf9CYAhni9R+0ow CW1/r5v28S9sBmXhQGrEqrodJtptGYHJb0/SZ2XMBWA9dVHT+whZoBSmjX5BHk2ToDkIUC brCvyPm8zWyopMKk/IWI73dyb1+mmaivaN+VcaXFfnx0YjB8BEylx29yjBM0Bg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892092; a=rsa-sha256; cv=none; b=r8rTRp8Vya2wgGD/Df8w/s2trh3kkbYNtll/g6cYEmEErPILu1hY+QG7GWTvUObAcSMbei xkdmV2spk8BlHdICQntUkyA8AVSZ6J3Lks1MLARkNSGCvPfGcNsYK7tg2LZlO9BPHcOJQo 8ke+Tszw11MVwg45uY/C7hcID7hNJl4/st116OVLw4yBe7iPQbwPgKpH0AuIShD8Ef4qqp Gy3Yaxw5LoJMWQRai+rkb+EsgcXUCNzyQgxAYMVqow/wnQPMq7k7eYrQSmAJBLADSK5Isb 6hRI5FBe3Z1WFK35fIwK9ta4yhH+FAzcnS8oE2WmlogolhsDbb6GGkNd1hcb/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892092; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9UccVZxll8lqGtT93sGmq50iVV2U3CoG0lQi8fwLJxM=; b=CrJ6py1y+34TXjQ15vqR4kXs6MYyQI9Xk3/WlqfWElhDTxl2ftmjZDTsamFtw5aEUxYQZO lWW1lfQcuyYXV4AJX+yDxkAewgy9qRcsj1wqQhV22MGI/PGRaxod258SLnj461Va0flaU9 mtZBZSiiVYxEgTNgaOCXf8e214ZSEZNf1dq29qnpS2Q1QO5qOHNqqVdVbyQF3F892AFvtg ZSGDOHoib7KjiiqtVcBCll3ePuir/gAOmMMuxeXrD+LVsMKk1iwBP2YbS+OI37gbpU8o39 G2VKFCMT5m46wcfo7rU1RsesoLU1FTy5ja9tUtEaEoKLFqKHhxDEXCxDLADj1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdm2LfWzn9R for ; Wed, 22 Apr 2026 21:08:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 279cf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: e2b1537e2925 - stable/15 - linuxkpi: Add List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: e2b1537e2925cd418057a1934da863d9b8ba1a55 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:12 +0000 Message-Id: <69e938bc.279cf.3a653f07@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e2b1537e2925cd418057a1934da863d9b8ba1a55 commit e2b1537e2925cd418057a1934da863d9b8ba1a55 Author: Jean-Sébastien Pédron AuthorDate: 2025-09-07 13:43:11 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:55 +0000 linuxkpi: Add The file is copied as is from Linux 6.10 as it dual-licensend under the GPLv2 and BSD 3-clause. The amdgpu DRM driver started to use it in Linux 6.10. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54501 (cherry picked from commit d448578b445da95806ef9af996a0db9754daadeb) --- sys/compat/linuxkpi/common/include/linux/siphash.h | 168 +++++++ sys/compat/linuxkpi/common/src/linux_siphash.c | 546 +++++++++++++++++++++ sys/conf/files | 2 + sys/modules/linuxkpi/Makefile | 1 + 4 files changed, 717 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/siphash.h b/sys/compat/linuxkpi/common/include/linux/siphash.h new file mode 100644 index 000000000000..9153e77382e1 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/siphash.h @@ -0,0 +1,168 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */ +/* Copyright (C) 2016-2022 Jason A. Donenfeld . All Rights Reserved. + * + * SipHash: a fast short-input PRF + * https://131002.net/siphash/ + * + * This implementation is specifically for SipHash2-4 for a secure PRF + * and HalfSipHash1-3/SipHash1-3 for an insecure PRF only suitable for + * hashtables. + */ + +#ifndef _LINUX_SIPHASH_H +#define _LINUX_SIPHASH_H + +#include +#include + +#define SIPHASH_ALIGNMENT __alignof__(u64) +typedef struct { + u64 key[2]; +} siphash_key_t; + +#define siphash_aligned_key_t siphash_key_t __aligned(16) + +static inline bool siphash_key_is_zero(const siphash_key_t *key) +{ + return !(key->key[0] | key->key[1]); +} + +u64 __siphash_aligned(const void *data, size_t len, const siphash_key_t *key); +u64 __siphash_unaligned(const void *data, size_t len, const siphash_key_t *key); + +u64 siphash_1u64(const u64 a, const siphash_key_t *key); +u64 siphash_2u64(const u64 a, const u64 b, const siphash_key_t *key); +u64 siphash_3u64(const u64 a, const u64 b, const u64 c, + const siphash_key_t *key); +u64 siphash_4u64(const u64 a, const u64 b, const u64 c, const u64 d, + const siphash_key_t *key); +u64 siphash_1u32(const u32 a, const siphash_key_t *key); +u64 siphash_3u32(const u32 a, const u32 b, const u32 c, + const siphash_key_t *key); + +static inline u64 siphash_2u32(const u32 a, const u32 b, + const siphash_key_t *key) +{ + return siphash_1u64((u64)b << 32 | a, key); +} +static inline u64 siphash_4u32(const u32 a, const u32 b, const u32 c, + const u32 d, const siphash_key_t *key) +{ + return siphash_2u64((u64)b << 32 | a, (u64)d << 32 | c, key); +} + + +static inline u64 ___siphash_aligned(const __le64 *data, size_t len, + const siphash_key_t *key) +{ + if (__builtin_constant_p(len) && len == 4) + return siphash_1u32(le32_to_cpup((const __le32 *)data), key); + if (__builtin_constant_p(len) && len == 8) + return siphash_1u64(le64_to_cpu(data[0]), key); + if (__builtin_constant_p(len) && len == 16) + return siphash_2u64(le64_to_cpu(data[0]), le64_to_cpu(data[1]), + key); + if (__builtin_constant_p(len) && len == 24) + return siphash_3u64(le64_to_cpu(data[0]), le64_to_cpu(data[1]), + le64_to_cpu(data[2]), key); + if (__builtin_constant_p(len) && len == 32) + return siphash_4u64(le64_to_cpu(data[0]), le64_to_cpu(data[1]), + le64_to_cpu(data[2]), le64_to_cpu(data[3]), + key); + return __siphash_aligned(data, len, key); +} + +/** + * siphash - compute 64-bit siphash PRF value + * @data: buffer to hash + * @size: size of @data + * @key: the siphash key + */ +static inline u64 siphash(const void *data, size_t len, + const siphash_key_t *key) +{ + if (IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) || + !IS_ALIGNED((unsigned long)data, SIPHASH_ALIGNMENT)) + return __siphash_unaligned(data, len, key); + return ___siphash_aligned(data, len, key); +} + +#define HSIPHASH_ALIGNMENT __alignof__(unsigned long) +typedef struct { + unsigned long key[2]; +} hsiphash_key_t; + +u32 __hsiphash_aligned(const void *data, size_t len, + const hsiphash_key_t *key); +u32 __hsiphash_unaligned(const void *data, size_t len, + const hsiphash_key_t *key); + +u32 hsiphash_1u32(const u32 a, const hsiphash_key_t *key); +u32 hsiphash_2u32(const u32 a, const u32 b, const hsiphash_key_t *key); +u32 hsiphash_3u32(const u32 a, const u32 b, const u32 c, + const hsiphash_key_t *key); +u32 hsiphash_4u32(const u32 a, const u32 b, const u32 c, const u32 d, + const hsiphash_key_t *key); + +static inline u32 ___hsiphash_aligned(const __le32 *data, size_t len, + const hsiphash_key_t *key) +{ + if (__builtin_constant_p(len) && len == 4) + return hsiphash_1u32(le32_to_cpu(data[0]), key); + if (__builtin_constant_p(len) && len == 8) + return hsiphash_2u32(le32_to_cpu(data[0]), le32_to_cpu(data[1]), + key); + if (__builtin_constant_p(len) && len == 12) + return hsiphash_3u32(le32_to_cpu(data[0]), le32_to_cpu(data[1]), + le32_to_cpu(data[2]), key); + if (__builtin_constant_p(len) && len == 16) + return hsiphash_4u32(le32_to_cpu(data[0]), le32_to_cpu(data[1]), + le32_to_cpu(data[2]), le32_to_cpu(data[3]), + key); + return __hsiphash_aligned(data, len, key); +} + +/** + * hsiphash - compute 32-bit hsiphash PRF value + * @data: buffer to hash + * @size: size of @data + * @key: the hsiphash key + */ +static inline u32 hsiphash(const void *data, size_t len, + const hsiphash_key_t *key) +{ + if (IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) || + !IS_ALIGNED((unsigned long)data, HSIPHASH_ALIGNMENT)) + return __hsiphash_unaligned(data, len, key); + return ___hsiphash_aligned(data, len, key); +} + +/* + * These macros expose the raw SipHash and HalfSipHash permutations. + * Do not use them directly! If you think you have a use for them, + * be sure to CC the maintainer of this file explaining why. + */ + +#define SIPHASH_PERMUTATION(a, b, c, d) ( \ + (a) += (b), (b) = rol64((b), 13), (b) ^= (a), (a) = rol64((a), 32), \ + (c) += (d), (d) = rol64((d), 16), (d) ^= (c), \ + (a) += (d), (d) = rol64((d), 21), (d) ^= (a), \ + (c) += (b), (b) = rol64((b), 17), (b) ^= (c), (c) = rol64((c), 32)) + +#define SIPHASH_CONST_0 0x736f6d6570736575ULL +#define SIPHASH_CONST_1 0x646f72616e646f6dULL +#define SIPHASH_CONST_2 0x6c7967656e657261ULL +#define SIPHASH_CONST_3 0x7465646279746573ULL + +#define HSIPHASH_PERMUTATION(a, b, c, d) ( \ + (a) += (b), (b) = rol32((b), 5), (b) ^= (a), (a) = rol32((a), 16), \ + (c) += (d), (d) = rol32((d), 8), (d) ^= (c), \ + (a) += (d), (d) = rol32((d), 7), (d) ^= (a), \ + (c) += (b), (b) = rol32((b), 13), (b) ^= (c), (c) = rol32((c), 16)) + +#define HSIPHASH_CONST_0 0U +#define HSIPHASH_CONST_1 0U +#define HSIPHASH_CONST_2 0x6c796765U +#define HSIPHASH_CONST_3 0x74656462U + +#endif /* _LINUX_SIPHASH_H */ diff --git a/sys/compat/linuxkpi/common/src/linux_siphash.c b/sys/compat/linuxkpi/common/src/linux_siphash.c new file mode 100644 index 000000000000..b4842a8250e1 --- /dev/null +++ b/sys/compat/linuxkpi/common/src/linux_siphash.c @@ -0,0 +1,546 @@ +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) +/* Copyright (C) 2016-2022 Jason A. Donenfeld . All Rights Reserved. + * + * SipHash: a fast short-input PRF + * https://131002.net/siphash/ + * + * This implementation is specifically for SipHash2-4 for a secure PRF + * and HalfSipHash1-3/SipHash1-3 for an insecure PRF only suitable for + * hashtables. + */ + +#include +#include + +#if defined(CONFIG_DCACHE_WORD_ACCESS) && BITS_PER_LONG == 64 +#include +#include +#endif + +#define EXPORT_SYMBOL(name) + +#define SIPROUND SIPHASH_PERMUTATION(v0, v1, v2, v3) + +#define PREAMBLE(len) \ + u64 v0 = SIPHASH_CONST_0; \ + u64 v1 = SIPHASH_CONST_1; \ + u64 v2 = SIPHASH_CONST_2; \ + u64 v3 = SIPHASH_CONST_3; \ + u64 b = ((u64)(len)) << 56; \ + v3 ^= key->key[1]; \ + v2 ^= key->key[0]; \ + v1 ^= key->key[1]; \ + v0 ^= key->key[0]; + +#define POSTAMBLE \ + v3 ^= b; \ + SIPROUND; \ + SIPROUND; \ + v0 ^= b; \ + v2 ^= 0xff; \ + SIPROUND; \ + SIPROUND; \ + SIPROUND; \ + SIPROUND; \ + return (v0 ^ v1) ^ (v2 ^ v3); + +#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS +u64 __siphash_aligned(const void *_data, size_t len, const siphash_key_t *key) +{ + const u8 *data = _data; + const u8 *end = data + len - (len % sizeof(u64)); + const u8 left = len & (sizeof(u64) - 1); + u64 m; + PREAMBLE(len) + for (; data != end; data += sizeof(u64)) { + m = le64_to_cpup(data); + v3 ^= m; + SIPROUND; + SIPROUND; + v0 ^= m; + } +#if defined(CONFIG_DCACHE_WORD_ACCESS) && BITS_PER_LONG == 64 + if (left) + b |= le64_to_cpu((__force __le64)(load_unaligned_zeropad(data) & + bytemask_from_count(left))); +#else + switch (left) { + case 7: b |= ((u64)end[6]) << 48; fallthrough; + case 6: b |= ((u64)end[5]) << 40; fallthrough; + case 5: b |= ((u64)end[4]) << 32; fallthrough; + case 4: b |= le32_to_cpup(data); break; + case 3: b |= ((u64)end[2]) << 16; fallthrough; + case 2: b |= le16_to_cpup(data); break; + case 1: b |= end[0]; + } +#endif + POSTAMBLE +} +EXPORT_SYMBOL(__siphash_aligned); +#endif + +u64 __siphash_unaligned(const void *_data, size_t len, const siphash_key_t *key) +{ + const u8 *data = _data; + const u8 *end = data + len - (len % sizeof(u64)); + const u8 left = len & (sizeof(u64) - 1); + u64 m; + PREAMBLE(len) + for (; data != end; data += sizeof(u64)) { + m = get_unaligned_le64(data); + v3 ^= m; + SIPROUND; + SIPROUND; + v0 ^= m; + } +#if defined(CONFIG_DCACHE_WORD_ACCESS) && BITS_PER_LONG == 64 + if (left) + b |= le64_to_cpu((__force __le64)(load_unaligned_zeropad(data) & + bytemask_from_count(left))); +#else + switch (left) { + case 7: b |= ((u64)end[6]) << 48; fallthrough; + case 6: b |= ((u64)end[5]) << 40; fallthrough; + case 5: b |= ((u64)end[4]) << 32; fallthrough; + case 4: b |= get_unaligned_le32(end); break; + case 3: b |= ((u64)end[2]) << 16; fallthrough; + case 2: b |= get_unaligned_le16(end); break; + case 1: b |= end[0]; + } +#endif + POSTAMBLE +} +EXPORT_SYMBOL(__siphash_unaligned); + +/** + * siphash_1u64 - compute 64-bit siphash PRF value of a u64 + * @first: first u64 + * @key: the siphash key + */ +u64 siphash_1u64(const u64 first, const siphash_key_t *key) +{ + PREAMBLE(8) + v3 ^= first; + SIPROUND; + SIPROUND; + v0 ^= first; + POSTAMBLE +} +EXPORT_SYMBOL(siphash_1u64); + +/** + * siphash_2u64 - compute 64-bit siphash PRF value of 2 u64 + * @first: first u64 + * @second: second u64 + * @key: the siphash key + */ +u64 siphash_2u64(const u64 first, const u64 second, const siphash_key_t *key) +{ + PREAMBLE(16) + v3 ^= first; + SIPROUND; + SIPROUND; + v0 ^= first; + v3 ^= second; + SIPROUND; + SIPROUND; + v0 ^= second; + POSTAMBLE +} +EXPORT_SYMBOL(siphash_2u64); + +/** + * siphash_3u64 - compute 64-bit siphash PRF value of 3 u64 + * @first: first u64 + * @second: second u64 + * @third: third u64 + * @key: the siphash key + */ +u64 siphash_3u64(const u64 first, const u64 second, const u64 third, + const siphash_key_t *key) +{ + PREAMBLE(24) + v3 ^= first; + SIPROUND; + SIPROUND; + v0 ^= first; + v3 ^= second; + SIPROUND; + SIPROUND; + v0 ^= second; + v3 ^= third; + SIPROUND; + SIPROUND; + v0 ^= third; + POSTAMBLE +} +EXPORT_SYMBOL(siphash_3u64); + +/** + * siphash_4u64 - compute 64-bit siphash PRF value of 4 u64 + * @first: first u64 + * @second: second u64 + * @third: third u64 + * @forth: forth u64 + * @key: the siphash key + */ +u64 siphash_4u64(const u64 first, const u64 second, const u64 third, + const u64 forth, const siphash_key_t *key) +{ + PREAMBLE(32) + v3 ^= first; + SIPROUND; + SIPROUND; + v0 ^= first; + v3 ^= second; + SIPROUND; + SIPROUND; + v0 ^= second; + v3 ^= third; + SIPROUND; + SIPROUND; + v0 ^= third; + v3 ^= forth; + SIPROUND; + SIPROUND; + v0 ^= forth; + POSTAMBLE +} +EXPORT_SYMBOL(siphash_4u64); + +u64 siphash_1u32(const u32 first, const siphash_key_t *key) +{ + PREAMBLE(4) + b |= first; + POSTAMBLE +} +EXPORT_SYMBOL(siphash_1u32); + +u64 siphash_3u32(const u32 first, const u32 second, const u32 third, + const siphash_key_t *key) +{ + u64 combined = (u64)second << 32 | first; + PREAMBLE(12) + v3 ^= combined; + SIPROUND; + SIPROUND; + v0 ^= combined; + b |= third; + POSTAMBLE +} +EXPORT_SYMBOL(siphash_3u32); + +#if BITS_PER_LONG == 64 +/* Note that on 64-bit, we make HalfSipHash1-3 actually be SipHash1-3, for + * performance reasons. On 32-bit, below, we actually implement HalfSipHash1-3. + */ + +#define HSIPROUND SIPROUND +#define HPREAMBLE(len) PREAMBLE(len) +#define HPOSTAMBLE \ + v3 ^= b; \ + HSIPROUND; \ + v0 ^= b; \ + v2 ^= 0xff; \ + HSIPROUND; \ + HSIPROUND; \ + HSIPROUND; \ + return (v0 ^ v1) ^ (v2 ^ v3); + +#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS +u32 __hsiphash_aligned(const void *_data, size_t len, const hsiphash_key_t *key) +{ + const u8 *data = _data; + const u8 *end = data + len - (len % sizeof(u64)); + const u8 left = len & (sizeof(u64) - 1); + u64 m; + HPREAMBLE(len) + for (; data != end; data += sizeof(u64)) { + m = le64_to_cpup(data); + v3 ^= m; + HSIPROUND; + v0 ^= m; + } +#if defined(CONFIG_DCACHE_WORD_ACCESS) && BITS_PER_LONG == 64 + if (left) + b |= le64_to_cpu((__force __le64)(load_unaligned_zeropad(data) & + bytemask_from_count(left))); +#else + switch (left) { + case 7: b |= ((u64)end[6]) << 48; fallthrough; + case 6: b |= ((u64)end[5]) << 40; fallthrough; + case 5: b |= ((u64)end[4]) << 32; fallthrough; + case 4: b |= le32_to_cpup(data); break; + case 3: b |= ((u64)end[2]) << 16; fallthrough; + case 2: b |= le16_to_cpup(data); break; + case 1: b |= end[0]; + } +#endif + HPOSTAMBLE +} +EXPORT_SYMBOL(__hsiphash_aligned); +#endif + +u32 __hsiphash_unaligned(const void *_data, size_t len, + const hsiphash_key_t *key) +{ + const u8 *data = _data; + const u8 *end = data + len - (len % sizeof(u64)); + const u8 left = len & (sizeof(u64) - 1); + u64 m; + HPREAMBLE(len) + for (; data != end; data += sizeof(u64)) { + m = get_unaligned_le64(data); + v3 ^= m; + HSIPROUND; + v0 ^= m; + } +#if defined(CONFIG_DCACHE_WORD_ACCESS) && BITS_PER_LONG == 64 + if (left) + b |= le64_to_cpu((__force __le64)(load_unaligned_zeropad(data) & + bytemask_from_count(left))); +#else + switch (left) { + case 7: b |= ((u64)end[6]) << 48; fallthrough; + case 6: b |= ((u64)end[5]) << 40; fallthrough; + case 5: b |= ((u64)end[4]) << 32; fallthrough; + case 4: b |= get_unaligned_le32(end); break; + case 3: b |= ((u64)end[2]) << 16; fallthrough; + case 2: b |= get_unaligned_le16(end); break; + case 1: b |= end[0]; + } +#endif + HPOSTAMBLE +} +EXPORT_SYMBOL(__hsiphash_unaligned); + +/** + * hsiphash_1u32 - compute 64-bit hsiphash PRF value of a u32 + * @first: first u32 + * @key: the hsiphash key + */ +u32 hsiphash_1u32(const u32 first, const hsiphash_key_t *key) +{ + HPREAMBLE(4) + b |= first; + HPOSTAMBLE +} +EXPORT_SYMBOL(hsiphash_1u32); + +/** + * hsiphash_2u32 - compute 32-bit hsiphash PRF value of 2 u32 + * @first: first u32 + * @second: second u32 + * @key: the hsiphash key + */ +u32 hsiphash_2u32(const u32 first, const u32 second, const hsiphash_key_t *key) +{ + u64 combined = (u64)second << 32 | first; + HPREAMBLE(8) + v3 ^= combined; + HSIPROUND; + v0 ^= combined; + HPOSTAMBLE +} +EXPORT_SYMBOL(hsiphash_2u32); + +/** + * hsiphash_3u32 - compute 32-bit hsiphash PRF value of 3 u32 + * @first: first u32 + * @second: second u32 + * @third: third u32 + * @key: the hsiphash key + */ +u32 hsiphash_3u32(const u32 first, const u32 second, const u32 third, + const hsiphash_key_t *key) +{ + u64 combined = (u64)second << 32 | first; + HPREAMBLE(12) + v3 ^= combined; + HSIPROUND; + v0 ^= combined; + b |= third; + HPOSTAMBLE +} +EXPORT_SYMBOL(hsiphash_3u32); + +/** + * hsiphash_4u32 - compute 32-bit hsiphash PRF value of 4 u32 + * @first: first u32 + * @second: second u32 + * @third: third u32 + * @forth: forth u32 + * @key: the hsiphash key + */ +u32 hsiphash_4u32(const u32 first, const u32 second, const u32 third, + const u32 forth, const hsiphash_key_t *key) +{ + u64 combined = (u64)second << 32 | first; + HPREAMBLE(16) + v3 ^= combined; + HSIPROUND; + v0 ^= combined; + combined = (u64)forth << 32 | third; + v3 ^= combined; + HSIPROUND; + v0 ^= combined; + HPOSTAMBLE +} +EXPORT_SYMBOL(hsiphash_4u32); +#else +#define HSIPROUND HSIPHASH_PERMUTATION(v0, v1, v2, v3) + +#define HPREAMBLE(len) \ + u32 v0 = HSIPHASH_CONST_0; \ + u32 v1 = HSIPHASH_CONST_1; \ + u32 v2 = HSIPHASH_CONST_2; \ + u32 v3 = HSIPHASH_CONST_3; \ + u32 b = ((u32)(len)) << 24; \ + v3 ^= key->key[1]; \ + v2 ^= key->key[0]; \ + v1 ^= key->key[1]; \ + v0 ^= key->key[0]; + +#define HPOSTAMBLE \ + v3 ^= b; \ + HSIPROUND; \ + v0 ^= b; \ + v2 ^= 0xff; \ + HSIPROUND; \ + HSIPROUND; \ + HSIPROUND; \ + return v1 ^ v3; + +#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS +u32 __hsiphash_aligned(const void *_data, size_t len, const hsiphash_key_t *key) +{ + const u8 *data = _data; + const u8 *end = data + len - (len % sizeof(u32)); + const u8 left = len & (sizeof(u32) - 1); + u32 m; + HPREAMBLE(len) + for (; data != end; data += sizeof(u32)) { + m = le32_to_cpup(data); + v3 ^= m; + HSIPROUND; + v0 ^= m; + } + switch (left) { + case 3: b |= ((u32)end[2]) << 16; fallthrough; + case 2: b |= le16_to_cpup(data); break; + case 1: b |= end[0]; + } + HPOSTAMBLE +} +EXPORT_SYMBOL(__hsiphash_aligned); +#endif + +u32 __hsiphash_unaligned(const void *_data, size_t len, + const hsiphash_key_t *key) +{ + const u8 *data = _data; + const u8 *end = data + len - (len % sizeof(u32)); + const u8 left = len & (sizeof(u32) - 1); + u32 m; + HPREAMBLE(len) + for (; data != end; data += sizeof(u32)) { + m = get_unaligned_le32(data); + v3 ^= m; + HSIPROUND; + v0 ^= m; + } + switch (left) { + case 3: b |= ((u32)end[2]) << 16; fallthrough; + case 2: b |= get_unaligned_le16(end); break; + case 1: b |= end[0]; + } + HPOSTAMBLE +} +EXPORT_SYMBOL(__hsiphash_unaligned); + +/** + * hsiphash_1u32 - compute 32-bit hsiphash PRF value of a u32 + * @first: first u32 + * @key: the hsiphash key + */ +u32 hsiphash_1u32(const u32 first, const hsiphash_key_t *key) +{ + HPREAMBLE(4) + v3 ^= first; + HSIPROUND; + v0 ^= first; + HPOSTAMBLE +} +EXPORT_SYMBOL(hsiphash_1u32); + +/** + * hsiphash_2u32 - compute 32-bit hsiphash PRF value of 2 u32 + * @first: first u32 + * @second: second u32 + * @key: the hsiphash key + */ +u32 hsiphash_2u32(const u32 first, const u32 second, const hsiphash_key_t *key) +{ + HPREAMBLE(8) + v3 ^= first; + HSIPROUND; + v0 ^= first; + v3 ^= second; + HSIPROUND; + v0 ^= second; + HPOSTAMBLE +} +EXPORT_SYMBOL(hsiphash_2u32); + +/** + * hsiphash_3u32 - compute 32-bit hsiphash PRF value of 3 u32 + * @first: first u32 + * @second: second u32 + * @third: third u32 + * @key: the hsiphash key + */ +u32 hsiphash_3u32(const u32 first, const u32 second, const u32 third, + const hsiphash_key_t *key) +{ + HPREAMBLE(12) + v3 ^= first; + HSIPROUND; + v0 ^= first; + v3 ^= second; + HSIPROUND; + v0 ^= second; + v3 ^= third; + HSIPROUND; + v0 ^= third; + HPOSTAMBLE +} +EXPORT_SYMBOL(hsiphash_3u32); + +/** + * hsiphash_4u32 - compute 32-bit hsiphash PRF value of 4 u32 + * @first: first u32 + * @second: second u32 + * @third: third u32 + * @forth: forth u32 + * @key: the hsiphash key + */ +u32 hsiphash_4u32(const u32 first, const u32 second, const u32 third, + const u32 forth, const hsiphash_key_t *key) +{ + HPREAMBLE(16) + v3 ^= first; + HSIPROUND; + v0 ^= first; + v3 ^= second; + HSIPROUND; + v0 ^= second; + v3 ^= third; + HSIPROUND; + v0 ^= third; + v3 ^= forth; + HSIPROUND; + v0 ^= forth; + HPOSTAMBLE +} +EXPORT_SYMBOL(hsiphash_4u32); +#endif diff --git a/sys/conf/files b/sys/conf/files index 39feccfb827e..4378abafecee 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4691,6 +4691,8 @@ compat/linuxkpi/common/src/linux_shmemfs.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_shrinker.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" +compat/linuxkpi/common/src/linux_siphash.c optional compat_linuxkpi \ + compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_skbuff.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_slab.c optional compat_linuxkpi \ diff --git a/sys/modules/linuxkpi/Makefile b/sys/modules/linuxkpi/Makefile index a662f5dffbb6..c465c76a7626 100644 --- a/sys/modules/linuxkpi/Makefile +++ b/sys/modules/linuxkpi/Makefile @@ -28,6 +28,7 @@ SRCS= linux_compat.c \ linux_shmemfs.c \ linux_shrinker.c \ linux_simple_attr.c \ + linux_siphash.c \ linux_skbuff.c \ linux_slab.c \ linux_tasklet.c \ From nobody Wed Apr 22 21:08:13 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdp1QHlz6bKrH for ; Wed, 22 Apr 2026 21:08:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bdn3fj3z3jnp for ; Wed, 22 Apr 2026 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=1776892093; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HZLn5xasjUYm6Ni9sr9KLAupWVkiWO2DO47kzjN9Csg=; b=EdWfZFBtJCGM2whKVX3Y/JI7KbeuwAylv0VKfn/sqafZUhXK7ATxGfWy1ivFULcfh69M/N D4wUoSKwML74aRzUiSmhNGfYTZOG2odzS6LfxUP3I6LdV/rcWTn32qQjL5GvTR6qnIiDcK urHBD2kzFDBtlZQWdfdOJQgjZ3Ni7ocom4+4pK8HCzbxYcPs2o5ihitgN2JV7g8gjF0j0h yLB16t2MdZgkk2xHqvhbiCg505dScCAyUIZyI5JFLtvGdBt/wVDld5NA3RSeacSEEIVhST I4EQJ2g/v8Gnm+dAhaKYkWsAAA5TUmuQ1CD/0aiskUv3pd5NrPccYwWjI/CuhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892093; a=rsa-sha256; cv=none; b=x9VWUEqwzIm88fB/H4t5OcxPxKluV8US9MNzLQR08zDioT6pSPF63E7CGD54677vDdjhCy L/URmNnhV2U77j23yluDJ6nEgnBBZ4VzmYRfU+GNXGRQKZrrAlOms8DXDhuo8SHfv1EEmY 4OPTYorFhVEcHLAb0L2mVbXjvwBLRPFDAmnOkxq/AjnAcy28SP3al7/z0y5HZVcEDXK1dh 2Ii9Bgz83DbEhiCOl6NNqnSPxGjejEq2j7C2rKgnWgSB67xMAD/OjsMnUxLpW8LEm5qlsQ 4FfgU+W4DcKr9+EMmqeBWcSmt1/6w23UE0qQWb223L7O1ckmaNoDNsHR7exKRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892093; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HZLn5xasjUYm6Ni9sr9KLAupWVkiWO2DO47kzjN9Csg=; b=WosJWxnj51Nz7/uXrFFjpsp7NM2ldDdgRt9Pq7hpI9wV8ig09WvP2oEux//ujDbGSVLyfF i3vzK4WHDA1B/lJxu2G2ju3U9iedUAbFuNTE0VMTwKJEatfh7Vh4YFoHtmAIQfzqEmKjwX 3aVrfCrYOXF/GNRPYqVP1vd7xA8TttteJqCccygfOE6++3ccL/jQlQvFvtPZ3pVbWWFNgp Bk5xdJUk9saDLLtSlhupTXzFEEhombeYtZThy4A6jgvyHbL3HGfy3Qc/p012ESepbHhdK7 UUSQMDyX2SflA2AvXLrsJgqxGDxSYnx2UGdTA0aubB3L1nzWH9MOuuLk5W/2Xg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdn3Bpwznfn for ; Wed, 22 Apr 2026 21:08:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25b7a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: 0866e454c216 - stable/15 - linuxkpi: Add `radix_tree_deref_slot()` List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 0866e454c2168f7f289e17f778156cff595107b8 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:13 +0000 Message-Id: <69e938bd.25b7a.61112341@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=0866e454c2168f7f289e17f778156cff595107b8 commit 0866e454c2168f7f289e17f778156cff595107b8 Author: Jean-Sébastien Pédron AuthorDate: 2025-09-07 13:45:10 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:56 +0000 linuxkpi: Add `radix_tree_deref_slot()` We don't do reference counting, we only dereference the pointer and retunr the value. The amdgpu DRM driver started to use it in Linux 6.10. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54502 (cherry picked from commit 4c89b333808a7eae0dad595b13686e9cf60bd4e6) --- sys/compat/linuxkpi/common/include/linux/radix-tree.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/radix-tree.h b/sys/compat/linuxkpi/common/include/linux/radix-tree.h index 1019697303db..55f0fc949807 100644 --- a/sys/compat/linuxkpi/common/include/linux/radix-tree.h +++ b/sys/compat/linuxkpi/common/include/linux/radix-tree.h @@ -68,6 +68,12 @@ struct radix_tree_iter { for ((iter)->index = (start); \ radix_tree_iter_find(root, iter, &(slot)); (iter)->index++) +static inline void * +radix_tree_deref_slot(void **slot) +{ + return (*slot); +} + static inline int radix_tree_exception(void *arg) { From nobody Wed Apr 22 21:08:14 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdq3JSlz6bKxL for ; Wed, 22 Apr 2026 21:08:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bdp4Yqjz3jpN for ; Wed, 22 Apr 2026 21:08:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SnScgxbXYtfO3J9ADy2V4pq/XQH6cuRbbJ0IUF7tnzM=; b=N+EvpP7TcZiJl4+YK3VPjQYjssyCKp4wVm7n3u16bdnIZbidV2Q0IBOw8MK8ReiLEr6S3c MD+SOOpqDk0s//0ELMO2nOLgUuqLjiFD2pCy9Ez8hEwr3LbPo0v9Y6DEHTbJnwrmmd8Td3 5oGyhm++N/ohKBTIuR+BAdYgVnO1mfuzROTBVlWIewntU4jo5xQa5drUm/h1LA4LNNusPd jhjiV55jqOiiTyUwJVO/Y6+kkxGUNSSyikolAOGjNga1ngOElNIElTD4nRyPUKVkMSXOCC T/4s7xCE6fi8ZB6xRGDYzBg58FrvrWiGdWKkaZi917VB4xlZJxw54CHFt2YIUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892094; a=rsa-sha256; cv=none; b=h5ulxpojVs3xZCrrEw7+nQfDA+WzuuSnN5VZuXpDo7NTqfDpx8PhFo8WQmxhHY12pf21e6 ZxnZdqydUA+fSsPlGhqSwE+xTZ8v6A3xIgOFJ7NuVbFRw63JrZSeCBylX9KeKKiDCFImRZ gewj4ov9XM6IiTC3iQjtEj5Fa0EfpGHn2W/JnZRY5oDnFhmafOqChBkxWrSXisADJpoKlk mV2/OZV6TSCOcRVnDaCK0c50p5Ma1nVXwl3sZfi7k63wm9PCm9f/FVMv6FxK4Sns43YW2r qdkLpQ5u3i2X5BiUkoEanZw/mgQHAFyeXpWFU65iTnKz1ag7gYJjtIbmFRH8NQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SnScgxbXYtfO3J9ADy2V4pq/XQH6cuRbbJ0IUF7tnzM=; b=aqpyZFh5EyFJ7KNaYqee8zWEzGtwDQFXwY7fztMTSFrFFoqxQhAHF+DR4HpAuMioKWLErD 4wkYJ1//snQEesh9HfLprpZFDQY6DNIUXU4WGKxWfPalG8u66vsW0SAapOJRSbd3caru9H X9mXyhAr+dA7bmfpqH85nmRM6FLZLanjhAmihTl0IvDbc7m03zQz7Ch5j3ykLMkHK1mbWP CjxcSKnAmQmG/sTVtIkJhcIUV0jwd0iMQQ+J1kAr7zmD5+NEGFYDCshO/o9kbC6j6qvXfU mdvdHog9xOF3PW422gvwPUdW6MtwRyMxMLca6b2oVAvNN8LCUIxJrdDLylNZSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdp44k4znZS for ; Wed, 22 Apr 2026 21:08:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27d28 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: c24d1d070475 - stable/15 - linuxkpi: Define `raw_spinlock_t` in List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c24d1d070475daa23bba9aaebdb2370e16e74d72 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:14 +0000 Message-Id: <69e938be.27d28.2d2e10e3@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c24d1d070475daa23bba9aaebdb2370e16e74d72 commit c24d1d070475daa23bba9aaebdb2370e16e74d72 Author: Jean-Sébastien Pédron AuthorDate: 2025-08-12 21:55:04 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:56 +0000 linuxkpi: Define `raw_spinlock_t` in For now, it is synonymous to `spinlock_t`. The DRM generic code uses the `struct raw_spinlock` and not `raw_spinlock_t`, that's why the definition is a struct embedding a `struct mtx`, compared to `spinlock_t` which is a simpler typedef. The DRM generic code started to use it in Linux 6.10. Reviewed by: bz, christos Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54489 (cherry picked from commit ac341353a0434408eec6388f3451be8517252c5f) --- sys/compat/linuxkpi/common/include/linux/spinlock.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/spinlock.h b/sys/compat/linuxkpi/common/include/linux/spinlock.h index 0ab81d92d4ef..a786cbab5e13 100644 --- a/sys/compat/linuxkpi/common/include/linux/spinlock.h +++ b/sys/compat/linuxkpi/common/include/linux/spinlock.h @@ -180,6 +180,26 @@ _atomic_dec_and_lock_irqsave(atomic_t *cnt, spinlock_t *lock, return (0); } +/* + * struct raw_spinlock + */ + +typedef struct raw_spinlock { + struct mtx lock; +} raw_spinlock_t; + +#define raw_spin_lock_init(rlock) \ + mtx_init(&(rlock)->lock, spin_lock_name("lnxspin_raw"), \ + NULL, MTX_DEF | MTX_NOWITNESS | MTX_NEW) + +#define raw_spin_lock(rl) spin_lock(&(rl)->lock) +#define raw_spin_trylock(rl) spin_trylock(&(rl)->lock) +#define raw_spin_unlock(rl) spin_unlock(&(rl)->lock) + +#define raw_spin_lock_irqsave(rl, f) spin_lock_irqsave(&(rl)->lock, (f)) +#define raw_spin_trylock_irqsave(rl, f) spin_trylock_irqsave(&(rl)->lock, (f)) +#define raw_spin_unlock_irqrestore(rl, f) spin_unlock_irqrestore(&(rl)->lock, (f)) + /* * cleanup.h related pre-defined cases. */ From nobody Wed Apr 22 21:08:15 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdr2vp5z6bKv3 for ; Wed, 22 Apr 2026 21:08:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bdq5Nf5z3kVv for ; Wed, 22 Apr 2026 21:08:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892095; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/pBRzwEphHd705H7OvmgrB1hLmp/5rfFKTqT1qQhEBQ=; b=h75TUlTh8zWbx3oWh8MoHu8kJ9VjZnBQFQ1SqHIw0Zw94NXCFVZOlCZYpMFUD8tyRDOrnu QH1TNnFNYN93+tPDQ36L+UU6yPJwu7II35HEVFmNXsqoCtNK9n5WXYVe4k51xYqDck11AB Q0IiCWb6DuW7Xf13K8FAlttePJD1ZtN6R8cGTOF24T/Z4SZDv0/82jULkNIALhQJdbGHle BeDzkuDlaqyimTou62h5DiwXUVCPAQTP32BAjSBLzU6WuIEHSTCPwJqnaz/tmKhno6F697 u/x9OnPcB2m3QXwcjpOdfrJqUCnt9/Rk+qvKN5B+HRrbQM0+wS6X3BBsJFRh1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892095; a=rsa-sha256; cv=none; b=rXuNVOCW++XbCIvWXxujVNSdI0nWN0yO4EEjR/npzfXXj6eDhhLvuADYAD0OfRR9vhnUfj 0WFGf1ijg5uMsARoEy+0sEh4x8M0pR78ibJcVx+ILwJJB82tHMOKheYZNdb5Ki0X97J1Pv ed/N+/taBfEX17g8Y0lio1Dmi4bnPhv9RMU4mGjfxB0Egl+/d6+2XaWP00nnRNG74rTJFD NtxjIj4Fo+HMxkmS/rX4IsjirCXvQ4FnP/64Q8rdscYS4x5KXdefvxVgPr72pI34q4Qyil jLp2oysWykXkMsTv70QuqZ/clCZG5IZsneEyJeC1vfqeEXj7FHAeKcKGtpCiAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892095; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/pBRzwEphHd705H7OvmgrB1hLmp/5rfFKTqT1qQhEBQ=; b=yy58C+sAc+RM/YVQFswhn1Gs6n3AwyTCULzlt0zGmXywCjdJkfo/VtXy8mexaf+EjnptHm u7Ap969EVFcki/or6DwOoRRMjkZ0+SSwozMc7+bTjH72xcBBUr6OsLlTNR5cZrVgQFyrVr a1Wxosule0aiSZeD0+v0+l2XGvOsNuO/Myxhblv5+Sh3lVvLZr62rOHo5aZ262J6kBh9cz ApG+EzKlXTfj/QRikCPXMCJ7SU5U60TCZ7+81GcKDXd/+vkKAuUEYnKTJONc2YvXHprMZ+ 0VVuREW0uiWz3lNVAke0T6wG5fzc8zLvMm+7ywPvortJ1e8ZaCdLFyv9jVjBZg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdq4w2xzn9V for ; Wed, 22 Apr 2026 21:08:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27d2d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: ae2013c2e4d0 - stable/15 - linuxkpi: Add List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ae2013c2e4d075988c93d55f3f2f4c31556aea87 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:15 +0000 Message-Id: <69e938bf.27d2d.1aecda86@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=ae2013c2e4d075988c93d55f3f2f4c31556aea87 commit ae2013c2e4d075988c93d55f3f2f4c31556aea87 Author: Jean-Sébastien Pédron AuthorDate: 2025-08-12 22:00:10 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:56 +0000 linuxkpi: Add The header defines the minimum to allow the DRM generic code to build. The only function used so far is `get_default_font()`, as part of a DRM-specific panic handler. We do not use this panic handler on FreeBSD. For now, it returns a NULL value. It should probably map to a vt(4) font. The DRM generic code started to use it in Linux 6.10 as part of the panic handler. Reviewed by: bz, christos Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54491 (cherry picked from commit 514d37fa268b8b181e3632d7f138bd09aa15683c) --- sys/compat/linuxkpi/common/include/linux/font.h | 33 +++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/font.h b/sys/compat/linuxkpi/common/include/linux/font.h new file mode 100644 index 000000000000..45daa00b61f0 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/font.h @@ -0,0 +1,33 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025-2026 The FreeBSD Foundation + * Copyright (c) 2025-2026 Jean-Sébastien Pédron + * + * This software was developed by Jean-Sébastien Pédron under sponsorship + * from the FreeBSD Foundation. + */ + +#ifndef _LINUXKPI_LINUX_FONT_H_ +#define _LINUXKPI_LINUX_FONT_H_ + +#include + +struct font_desc { + const char *name; + const void *data; + int idx; + unsigned int width; + unsigned int height; + unsigned int charcount; + int pref; +}; + +static inline const struct font_desc * +get_default_font(int xres, int yres, unsigned long *font_w, + unsigned long *font_h) +{ + return (NULL); +} + +#endif From nobody Wed Apr 22 21:08:17 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdt1gqgz6bL0Q for ; Wed, 22 Apr 2026 21: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bds6v19z3kgp for ; Wed, 22 Apr 2026 21:08:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vb1zxU/wlemIqkWAhwPN00sPLw2bvrArVcZcmbvCoxE=; b=En2zaTNGymVfRWYHWc5NWPXkEUeGgSolr54a1JY4vrTQVWkSTuLBMYI0b0BofeatCALFxL x0N5j6ZQz85XsYms1KzV6lBtlEXFLAgvbo/uMNjxzFFF7pt3mt0oaIyEQnM6bzZJxsV2zk chc4/pS1nEfcS/hZysuS0ijObeYCUOxVYc34FzlHmDClIapPbNLfXMQN2/xv8gLiAWkQSy /Cazty76mdTzFh4F/hygRV5PdvMPZfzFjTQE7iU4WdaXlK5TlnmzKSl4vxr1iAX+gFWAbl Wcx+O/LnwZXDVJaXKZsmkfLRwqlzx2Sg26rhW1fHI+kz97O1x5Lafv5aCgzZqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892098; a=rsa-sha256; cv=none; b=xKQVSfr2zpNiAL3Gia7pBuLm4GkoCtW4R9tKeJEWOpjV5noe+uQRIdaSg7K4IbA9IKf6kc ueaLi1K1IRJSr5SFkizEojaa5Cq9x7d1xNUoq6Swq28Yeyl3oLUhZ5UgjZpFK7otIX7Yay 9JWqzO+Gxxb09FAXj+AScqPp4hVkJ5D3UlURVXQdPl6S9uTdV09pPopo/wWgOd5S+PdKBk bXeN1aa2Et+OEWxFgLu5TfV8xgfn1AL3Ebku+OjdltQ0Hz/7wddajJFho3Go7OCkxVzntU rEEsnsA0SkpHwMxrkvzylBJJLYy59vr6+HQspESaR+Pc7ICwX76ZDh/t86u7JQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vb1zxU/wlemIqkWAhwPN00sPLw2bvrArVcZcmbvCoxE=; b=KXTUrr1/d+rMvGN4NB4csYAao9BhFheBar7YYMGlk7H1yuQLFCnLFASnQ2lAjnnBK//blW K5anNoMwB8dtReZuileFvDpBVnWztEARibbUV72kzCxAiMwwvXVwm4/Vuww7gUaHf76CvL PONBaPg6M+zls1l++OGIwem9staLWrXsY1dwtPINTeniOP4ilXTWbVhqqFb9n4CA2fa0BR 541t24gkw2RHnUwgkdzAvl0Isj7aWy4HspMOrepqwRqXzJXosfTJOmRRFjbeF9t7MzeiK2 Uob0HIueZBZOZzc7fH6kPt4W7cNNTfrWwB7GERQduST+aJAqI0mFv/UhKDxOjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bds69ZczmyM for ; Wed, 22 Apr 2026 21:08:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27b43 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: 01bb12ee7193 - stable/15 - linuxkpi: Add WARN_RATELIMIT() List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 01bb12ee7193861f9026d941097eb6c239c92fe3 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:17 +0000 Message-Id: <69e938c1.27b43.7aecedc9@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=01bb12ee7193861f9026d941097eb6c239c92fe3 commit 01bb12ee7193861f9026d941097eb6c239c92fe3 Author: Jean-Sébastien Pédron AuthorDate: 2025-08-12 23:14:52 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:57 +0000 linuxkpi: Add WARN_RATELIMIT() The i915 DRM driver started to use it in Linux 6.10. Reviewed by: bz, christos Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54493 (cherry picked from commit 3942e85b992138056841cd7c96ea20436a66b740) --- sys/compat/linuxkpi/common/include/linux/ratelimit.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/ratelimit.h b/sys/compat/linuxkpi/common/include/linux/ratelimit.h index 9585b4b994d7..fdef57c7882d 100644 --- a/sys/compat/linuxkpi/common/include/linux/ratelimit.h +++ b/sys/compat/linuxkpi/common/include/linux/ratelimit.h @@ -14,4 +14,11 @@ struct ratelimit_state { #define ratelimit_state_init(x, y, z) #define ratelimit_set_flags(x, y) +#define WARN_RATELIMIT(condition, ...) ({ \ + bool __ret_warn_on = (condition); \ + if (unlikely(__ret_warn_on)) \ + pr_warn_ratelimited(__VA_ARGS__); \ + unlikely(__ret_warn_on); \ +}) + #endif From nobody Wed Apr 22 21:08:16 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bds2mrbz6bKZw for ; Wed, 22 Apr 2026 21:08:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bdr5pMsz3kdq for ; Wed, 22 Apr 2026 21:08:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l4hDkUmmOIzC+8EVQX4qHHkOIE7qLwINxYCKO4pTfSo=; b=DAA2S2Z5mJ+LyUDdX5py215Ppshuw4/3SPLI+xSbvx22lzgsIA77N6jRACdrpUkVY+7Kx2 4tn3fHgRcoHV+rBHZwLMeQPUmzlyAteYMijfJBA3/sr/FZgLeNXjowpMBy5XE1SptkhWbo ExDKtyV59jeRu4a79CK/kw2vkBiog2Se+XOwhl9NoB38MufnN7HI+9o8/Vw++XZDdM3uXv pVTfeP+80hmG9mj2XDYfJwEf4C99WKIEzWmMRkhwCUBmNO7x8vOWmMduSfbSUEwSHQv5yF 4HnU7yvh4YSxttro7cJ8GyYPnMPbAmvBGWy3xSbtLD4Zw1gaZ612gb1OjtKQtA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892096; a=rsa-sha256; cv=none; b=gZFJiFO88bVyQl8MTjMmT3PByhqjTh63W2IcrJWkFK6f3tbNQS/kY3VzCN/fhmV7mFdf+i 9eW0KU5gZHIhkqPC46LnlTvCvKp3nEWz+0QmFWsOiSlJT5LEqwFcMXllMeVf+Th6lbcDep sDmIGLKxQm0lPdj1YOsObullxKeuX4zSzCEP8xYHg79xB2bxpYg4TLBoJigq67tNLSQDoc mj4c9igULz0Kxsrsaa8DIC8LUyameMJQhX7ytFTHurwiH+XN17JDVMGuwruylgqprfC0tb 93zH235uLQRnEKZUeJMFMred1T0IytZxopfjuRoBy0EpJEAizhCc0psUtxhNdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l4hDkUmmOIzC+8EVQX4qHHkOIE7qLwINxYCKO4pTfSo=; b=BIzltI7e+RqIKwRVJF+GvgpIsjoRKfaz9YU82GeVw37PrC3PKebK6ZPhpBsIeBzPUc27rE 6rTuubSpmoN3NPZQcHGXnCG9mGMFGwJacpGx4BE9F45UHmNE794AHpBPvpnRoFV5N/pNlF 94OGrdU78Qf08M4DiqsK9jQNCV+zZh5r7q0FiCA3PgC2dGnB7MdVYFxl8tvCuKHBd5wfKT k5f+jIKK6W8LJ2Jz0+tSM6PQHeaxcLJDnvz7NJMB8/nJehGOyYdzNRcpGYq66ps3y+dFKM d9FWIeyET+drGxm1rp4/WheeHn4LR7TGQJ98V6pZx80NcF6LvxWROFqw9qxTSQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdr5LG8znL2 for ; Wed, 22 Apr 2026 21:08:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27d32 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: 4533982f8669 - stable/15 - linuxkpi: Add List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4533982f86694558c9766b1fd55c98da1b406f0f Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:16 +0000 Message-Id: <69e938c0.27d32.6a4f59fa@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4533982f86694558c9766b1fd55c98da1b406f0f commit 4533982f86694558c9766b1fd55c98da1b406f0f Author: Jean-Sébastien Pédron AuthorDate: 2025-08-12 22:02:18 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:57 +0000 linuxkpi: Add This header declares register/unregister functions to allow a piece of code to tell what function to call in case of a panic. Several panic handlers may be registered. The DRM generic code started to use it in Linux 6.10 as part of the panic handler. Reviewed by: bz, christos Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54492 (cherry picked from commit e86e4f161e7232b7ac19af906368c664d6167cdc) --- .../linuxkpi/common/include/linux/kmsg_dump.h | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/kmsg_dump.h b/sys/compat/linuxkpi/common/include/linux/kmsg_dump.h new file mode 100644 index 000000000000..25f96b304f59 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/kmsg_dump.h @@ -0,0 +1,51 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025-2026 The FreeBSD Foundation + * Copyright (c) 2025-2026 Jean-Sébastien Pédron + * + * This software was developed by Jean-Sébastien Pédron under sponsorship + * from the FreeBSD Foundation. + */ + +#ifndef _LINUXKPI_LINUX_KMSG_DUMP_H_ +#define _LINUXKPI_LINUX_KMSG_DUMP_H_ + +#include +#include + +#include /* For pr_debug() */ + +enum kmsg_dump_reason { + KMSG_DUMP_UNDEF, + KMSG_DUMP_PANIC, + KMSG_DUMP_OOPS, + KMSG_DUMP_EMERG, + KMSG_DUMP_SHUTDOWN, + KMSG_DUMP_MAX +}; + +struct kmsg_dumper { + struct list_head list; + void (*dump)(struct kmsg_dumper *dumper, enum kmsg_dump_reason reason); + enum kmsg_dump_reason max_reason; + bool registered; +}; + +static inline int +kmsg_dump_register(struct kmsg_dumper *dumper) +{ + pr_debug("TODO"); + + return (-EINVAL); +} + +static inline int +kmsg_dump_unregister(struct kmsg_dumper *dumper) +{ + pr_debug("TODO"); + + return (-EINVAL); +} + +#endif From nobody Wed Apr 22 21:08:18 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdv3sX9z6bKxT for ; Wed, 22 Apr 2026 21:08:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bdv0QF4z3kh0 for ; Wed, 22 Apr 2026 21:08:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8+YKBcw1/+1VlYiTvZ7EUVV56ym6NmhURX6uO3koU6M=; b=aSgqjSv4eg/bPjqWieFbTi/W7ZNgFTs3Udh5Pce1NLCN1Lw6hvkMGzGBKokeVTp+9oydPi OQQ4p9wOKNpKWkC/AeYEQQozJ6LPLOAEYCDJMmGY/Q409lfea2HWrCU8y+edMhJQBXnRXR bPakHzR4t+9YKS854dAOLEc4dbiUoNSEIam44dWP6YVp/9+vPGo4R5xzrzsu1lJdqZUiPO yVAennpmzVCmyh/0oUUPya6zSyQVnIydnuA5eYkoqEFv2DPiQwFvIaAcmZWiR5MKxU8EZA TRIPgoM88/BweAlT0y21vwx7pyRhpDgU2eGfJ/5XCPDBUEQUJcO59CzP39Hasw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892099; a=rsa-sha256; cv=none; b=OjU6hWh+bk0aSpyY9W7bfCw2g3T/xrAGBIyFIb9Q3YRAywiBNnx+FZvyb3+f/CcrLm/CDr Ys+dMBN7Wp7V7nsua/lRJjOWJfhQMOHv76U4VF2vNBQ1vv6Clb2axntION5ISQTaC+1OmF M/kOuHpWXEPxWECU1rAHuZUqDRgwFlbHRbUGx71ftBgmMiYfaFbpt/NdViBfaWb0o+sTn6 ulllf7+C/D3deU48oM4PwAhq6bMky65LtwmXHFfTkO9rrQ/lvWGWhVWEmvWW49lpFx5Ojg rER6KTh7pjQvWzk1PyP1so7APgvpCkEQi2MubYbPE+Jh30080piQU1g+w9Ix2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8+YKBcw1/+1VlYiTvZ7EUVV56ym6NmhURX6uO3koU6M=; b=oulCZCXSQl70/7KDCMsIGYCgxkYjS/BINmMRS1VzvWdsxKrqQyFoiP8Y9niZJMakoUFLC9 MfPY5vT+kbVSn2NVWvez8AhAkuUXdQYTPDzLl8JOJyRkwKbMfH+hA6wnh0FuP7nw9ceZ3M 3upu+IWrhOdEUz7z1u1s+ewXILihcLIixUt+Bn+MBSgtVOgqb3wVRyee/rDS730WaE790q vFYCkDPFmgIsAWk+CcmcW6UTUajObGudl53bmVziPhbjzvSlqU/8rz9w70V3GP5rWLP3FL wNfoc6wcspbmti6NG84Jj+iNCdVKreEV9bdkUQR58TRyktXfYdu7S+O+C3riKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdt74kFznL3 for ; Wed, 22 Apr 2026 21:08:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2766e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: bdf2e34e1541 - stable/15 - linuxkpi: Replicate the chain of #include in the `cec*.h` headers List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: bdf2e34e1541492476a830ae95ce8bad7ab61307 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:18 +0000 Message-Id: <69e938c2.2766e.445c2e52@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=bdf2e34e1541492476a830ae95ce8bad7ab61307 commit bdf2e34e1541492476a830ae95ce8bad7ab61307 Author: Jean-Sébastien Pédron AuthorDate: 2025-08-13 19:13:10 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:57 +0000 linuxkpi: Replicate the chain of #include in the `cec*.h` headers The i915 DRM driver depends on this namespace pollution to access `debugfs_*` functions, after several explicit #include of were removed in Linux 6.10. Reviewed by: bz, christos Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54494 (cherry picked from commit 10c6f1f627cd4267f9b95f60a9a30e4609566f8a) --- .../linuxkpi/common/include/linux/cec-funcs.h | 16 +++++++++++++++ sys/compat/linuxkpi/common/include/linux/cec.h | 3 +++ .../linuxkpi/common/include/media/cec-notifier.h | 17 ++++++++++++++++ sys/compat/linuxkpi/common/include/media/cec.h | 23 ++++++++++++++++++++++ .../linuxkpi/dummy/include/media/cec-notifier.h | 0 5 files changed, 59 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/cec-funcs.h b/sys/compat/linuxkpi/common/include/linux/cec-funcs.h new file mode 100644 index 000000000000..1107b04e4e08 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/cec-funcs.h @@ -0,0 +1,16 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025-2026 The FreeBSD Foundation + * Copyright (c) 2025-2026 Jean-Sébastien Pédron + * + * This software was developed by Jean-Sébastien Pédron under sponsorship + * from the FreeBSD Foundation. + */ + +#ifndef _LINUXKPI_LINUX_CEC_FUNCS_H_ +#define _LINUXKPI_LINUX_CEC_FUNCS_H_ + +#include + +#endif diff --git a/sys/compat/linuxkpi/common/include/linux/cec.h b/sys/compat/linuxkpi/common/include/linux/cec.h index e0854d87d85c..b08d891537a9 100644 --- a/sys/compat/linuxkpi/common/include/linux/cec.h +++ b/sys/compat/linuxkpi/common/include/linux/cec.h @@ -3,6 +3,9 @@ #ifndef _LINUXKPI_LINUX_CEC_H_ #define _LINUXKPI_LINUX_CEC_H_ +#include +#include + #define CEC_PHYS_ADDR_INVALID 0xffff #endif /* _LINUXKPI_LINUX_CEC_H_ */ diff --git a/sys/compat/linuxkpi/common/include/media/cec-notifier.h b/sys/compat/linuxkpi/common/include/media/cec-notifier.h new file mode 100644 index 000000000000..8d6fc452b907 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/media/cec-notifier.h @@ -0,0 +1,17 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025-2026 The FreeBSD Foundation + * Copyright (c) 2025-2026 Jean-Sébastien Pédron + * + * This software was developed by Jean-Sébastien Pédron under sponsorship + * from the FreeBSD Foundation. + */ + +#ifndef _LINUXKPI_MEDIA_CEC_NOTIFIER_H_ +#define _LINUXKPI_MEDIA_CEC_NOTIFIER_H_ + +#include +#include + +#endif diff --git a/sys/compat/linuxkpi/common/include/media/cec.h b/sys/compat/linuxkpi/common/include/media/cec.h new file mode 100644 index 000000000000..c96b57868e23 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/media/cec.h @@ -0,0 +1,23 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025-2026 The FreeBSD Foundation + * Copyright (c) 2025-2026 Jean-Sébastien Pédron + * + * This software was developed by Jean-Sébastien Pédron under sponsorship + * from the FreeBSD Foundation. + */ + +#ifndef _LINUXKPI_MEDIA_CEC_H_ +#define _LINUXKPI_MEDIA_CEC_H_ + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/sys/compat/linuxkpi/dummy/include/media/cec-notifier.h b/sys/compat/linuxkpi/dummy/include/media/cec-notifier.h deleted file mode 100644 index e69de29bb2d1..000000000000 From nobody Wed Apr 22 21:08:20 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdw5SsPz6bL0W for ; Wed, 22 Apr 2026 21:08: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bdw1NfYz3kbc for ; Wed, 22 Apr 2026 21:08:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892100; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vMabyh3Cbn4F+zgL3VuOjFFx5rUGXMEvCqIY3Q0j2xE=; b=f9cpO65GYyJOXktf+DQwR2cPYBWWunEUcCBJOlqLVFMhENuktVvmEj0nx8rAPHZahpAld1 uvCqAZHG7/hXopcnYZ/YBaxY1U880BLWlsffSqT58x2LVKjY11Mr1TxgTURhMabZ4ei3iS vayeif4mdcZ+IWsE30wmO4B+JS6ut9RBP7xjfOL5FH7b2jvKCmigySsG04dMlJ7pvxMbS5 bIfa7qn6AQ1p1E+xPSmSuJTL1hLTMhT/t6EhsEyDGzTEqh0AQdlbf9yK01M5BLZCSxYlw8 R7DQwOkXFdOMxWvPaS+syCbZ3DA5BwrP0QBb/NW6A8bexL/9aawXJXN+b0x9ew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892100; a=rsa-sha256; cv=none; b=plIyaSCQxtW+YgISG8WJsOD+Ld+tknJm5zz8CD3YTYNIvA4ipWOd9EvCudNtizvraGkhex B0xYsfPavz1bT5wjL1VztYqH6jQ5CooAVDtvE3Tw4/2l/iaQlyIWBOxJ/PqUJxq5xkajzy BXtY/nNnYC4i5UqMumNdNHoGAg1klEX7wOwdwH0Lj3HsrKJy75Eu7tGKfwow7R7mRUzyFQ IoRIcpQam/V775IyIv4HgJPBG8cloBfZwuwoFm5EF5+CxtQeWQl1EoNq7XizsjtOtKYmPl R/sI1tHkVZRFtjrjRdx1Ve506ZOAzHG6BcD+DW0eyMcBLt31seWu7DEi/DNXeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892100; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vMabyh3Cbn4F+zgL3VuOjFFx5rUGXMEvCqIY3Q0j2xE=; b=ZNFUtJfcL5mr1nLuW2q6q1Qouqhghcu1RgL8sNUz2v7xmqmtB/ez3FJFpA+SbNRX/1h9iY 7THC1w7xLQaop5OLtU2IZPLLWcaGPiPwjgwlSk0BuRYqDkDHu4m43pKe/096ONI94wXGpu oVlt+wOcNbfhJXxqv3jqe+8VuLSnMbTXrWYOX9Jwufc+98LWgUPy2U+zQkJBB3CxqzUYmA nkFove3PIolhqOar8kx2a/dajBX0HOCfuEB0Z93KM+R7N5zwuwcU1VkCF5aDcAWP35Wztb qQ2hnEOP5qcPD5qkORgn7WLm0svDrTS5jghJ6gHcFed6H1nfxIBceyk7u8RwCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdw0ndbzmyR for ; Wed, 22 Apr 2026 21:08:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26c4f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: b795f210fb5d - stable/15 - linuxkpi: Add `rol32()` List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b795f210fb5da5f9af1ed192583ec9b5dce2bc7a Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:20 +0000 Message-Id: <69e938c4.26c4f.2c0e73ff@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=b795f210fb5da5f9af1ed192583ec9b5dce2bc7a commit b795f210fb5da5f9af1ed192583ec9b5dce2bc7a Author: Jean-Sébastien Pédron AuthorDate: 2026-01-07 21:18:38 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:58 +0000 linuxkpi: Add `rol32()` `rol64()` and `rol32()` are used by . The former was added previously, before was added. However the latter was not, and it broke the build on armv7. Reported by: adrian Reviewed by: adrian, rpokala Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54588 (cherry picked from commit 6c0bcd15e4782ff2e23119a37396d693d09c695d) --- sys/compat/linuxkpi/common/include/linux/bitops.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/bitops.h b/sys/compat/linuxkpi/common/include/linux/bitops.h index 427d52b0dc81..125081ab5b74 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitops.h +++ b/sys/compat/linuxkpi/common/include/linux/bitops.h @@ -443,4 +443,10 @@ rol64(uint64_t word, unsigned int shift) return ((word << (shift & 63)) | (word >> ((-shift) & 63))); } +static inline uint32_t +rol32(uint32_t word, unsigned int shift) +{ + return ((word << (shift & 31)) | (word >> ((-shift) & 31))); +} + #endif /* _LINUXKPI_LINUX_BITOPS_H_ */ From nobody Wed Apr 22 21:08:21 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdx6cpyz6bKpX for ; Wed, 22 Apr 2026 21:08:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bdx2lX9z3kfY for ; Wed, 22 Apr 2026 21:08:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MYlqN2FRyHiCYQo+KKeLlDHaO6kuwO/3blqeRGPg6AI=; b=EOqvT5bV+DFurO6/e0uJlp+ajyh4tsZFuBMjFfJCuvzEiAH9VwIThF3CzwYJQByS27lQbU 7OaO4L6FigaqudL1Q505Jf5c5niArRrKqnVcP8iAiiz1h+a9yt5WKWTGNttu+UBnghhZ7V pQLX4ELhwcrNfwmJFmlKR9lwRTjl5hAIklD+eJhdL3j4zuMLBinmI4up3zLPtb8O1Z7p8w KHzMTX+eVdGL6kfUK4bH4QDo6sAErlQyg1iRuxzWu4PmU+GHQ4D4h9u/rW9DeaB+Sf+HKj 9mq34gGM8F4mYq1l2vm771QlajgBu5n9MjkG45iM5sExXw3HaQxY8w0Kx/Zp4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892101; a=rsa-sha256; cv=none; b=U5Cr0gIkbob/+HhugagdI39bFHILPSXN0Td4//gI6TiI3rGauml0Cf3ui5KicolWQEJxsl AchrJcFzYnWHeRagDs91LamsvzVtFkbmb3WgVl3L91Yy5ejyNAOeQFaR7PWu6EA5VKADoJ Egudno9uXkSODkZPKmGJahvNg5OaHqPR8jimbW63Gil817USkBEoFpOjOFyOd+8qIvQfr/ m9k97sputBK5vHjCu8O2A2LcKQ2O899/gZ0VO3PnL12ZuMleaB7cCI1UKmTqknwTe52vyw kkfiFBgdrltR7Fj/mW2Lw9vdkJO9ZeKxA0h8WaKk9+9cGUR6fwXQAbvRBcMo+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MYlqN2FRyHiCYQo+KKeLlDHaO6kuwO/3blqeRGPg6AI=; b=pfEZiS0pro7pmfwwxDkM8Cwk/SafMaKSxudtgLWGvuMJSvWyrONXI9W2eoToEjmhq10Giu 25h8r5GGYnuRtve1/IudNQS6OzdlCX9yWeT2IBn6Ma3xeAwPMTDyvHMFAUveMp6ifMGPOp ugQ5C66ULGZ9sbFRT1Jv+ll5MuNNbbHniSKBrzlNYbCycEttJVo6dq0RUp1wHcRPu7fnCZ FOWAf4SFcTrT699us3P60U4K3ZAks2w1liLJ1zBmLgTtMBhXnrBpjSEh0G3GoPR1/tglr1 nL+LiXFurq6HJff0qcxUXQWQu+1fzDYKctGg9SFc3JiQFDsyMyHkdDc/7xAxKg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdx1httznL6 for ; Wed, 22 Apr 2026 21:08:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26c54 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: b9bfb6ca6892 - stable/15 - linuxkpi: Implement List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b9bfb6ca6892b24f60aa1c10f1a99473e25d7401 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:21 +0000 Message-Id: <69e938c5.26c54.120d7ad4@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=b9bfb6ca6892b24f60aa1c10f1a99473e25d7401 commit b9bfb6ca6892b24f60aa1c10f1a99473e25d7401 Author: Jean-Sébastien Pédron AuthorDate: 2025-08-11 17:51:59 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:58 +0000 linuxkpi: Implement It is a wrapper above a `char *` to track the overall available space in the buffer as well as the used space. This wrapper does not manage memory allocation. The DRM generic code started to use this in Linux 6.10. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54488 (cherry picked from commit 710167623d82664ab4276776aed502ab6f91d8ff) --- sys/compat/linuxkpi/common/include/linux/seq_buf.h | 73 ++++++++++++++++++++++ sys/compat/linuxkpi/common/src/linux_seq_buf.c | 64 +++++++++++++++++++ sys/conf/files | 2 + sys/modules/linuxkpi/Makefile | 1 + 4 files changed, 140 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/seq_buf.h b/sys/compat/linuxkpi/common/include/linux/seq_buf.h new file mode 100644 index 000000000000..d6246a40e6f7 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/seq_buf.h @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2025-2026 The FreeBSD Foundation + * Copyright (c) 2025-2026 Jean-Sébastien Pédron + * + * This software was developed by Jean-Sébastien Pédron under sponsorship + * from the FreeBSD Foundation. + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#ifndef _LINUXKPI_LINUX_SEQ_BUF_H_ +#define _LINUXKPI_LINUX_SEQ_BUF_H_ + +#include +#include +#include +#include + +struct seq_buf { + char *buffer; + size_t size; + size_t len; +}; + +#define DECLARE_SEQ_BUF(NAME, SIZE) \ + struct seq_buf NAME = { \ + .buffer = (char[SIZE]) { 0 }, \ + .size = SIZE, \ + } + +static inline void +seq_buf_clear(struct seq_buf *s) +{ + s->len = 0; + if (s->size > 0) + s->buffer[0] = '\0'; +} + +static inline void +seq_buf_set_overflow(struct seq_buf *s) +{ + s->len = s->size + 1; +} + +static inline bool +seq_buf_has_overflowed(struct seq_buf *s) +{ + return (s->len > s->size); +} + +static inline bool +seq_buf_buffer_left(struct seq_buf *s) +{ + if (seq_buf_has_overflowed(s)) + return (0); + + return (s->size - s->len); +} + +#define seq_buf_init(s, buf, size) linuxkpi_seq_buf_init((s), (buf), (size)) +void linuxkpi_seq_buf_init(struct seq_buf *s, char *buf, unsigned int size); + +#define seq_buf_printf(s, f, ...) linuxkpi_seq_buf_printf((s), (f), __VA_ARGS__) +int linuxkpi_seq_buf_printf(struct seq_buf *s, const char *fmt, ...) \ + __printflike(2, 3); + +#define seq_buf_vprintf(s, f, a) linuxkpi_seq_buf_vprintf((s), (f), (a)) +int linuxkpi_seq_buf_vprintf(struct seq_buf *s, const char *fmt, va_list args); + +#define seq_buf_str(s) linuxkpi_seq_buf_str((s)) +const char * linuxkpi_seq_buf_str(struct seq_buf *s); + +#endif diff --git a/sys/compat/linuxkpi/common/src/linux_seq_buf.c b/sys/compat/linuxkpi/common/src/linux_seq_buf.c new file mode 100644 index 000000000000..112c53044c22 --- /dev/null +++ b/sys/compat/linuxkpi/common/src/linux_seq_buf.c @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2025-2026 The FreeBSD Foundation + * Copyright (c) 2025-2026 Jean-Sébastien Pédron + * + * This software was developed by Jean-Sébastien Pédron under sponsorship + * from the FreeBSD Foundation. + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include + +void +linuxkpi_seq_buf_init(struct seq_buf *s, char *buf, unsigned int size) +{ + s->buffer = buf; + s->size = size; + + seq_buf_clear(s); +} + +int +linuxkpi_seq_buf_printf(struct seq_buf *s, const char *fmt, ...) +{ + int ret; + va_list args; + + va_start(args, fmt); + ret = seq_buf_vprintf(s, fmt, args); + va_end(args); + + return (ret); +} + +int +linuxkpi_seq_buf_vprintf(struct seq_buf *s, const char *fmt, va_list args) +{ + int ret; + + if (!seq_buf_has_overflowed(s)) { + ret = vsnprintf(s->buffer + s->len, s->size - s->len, fmt, args); + if (s->len + ret < s->size) { + s->len += ret; + return (0); + } + } + + seq_buf_set_overflow(s); + return (-1); +} + +const char * +linuxkpi_seq_buf_str(struct seq_buf *s) +{ + if (s->size == 0) + return (""); + + if (seq_buf_buffer_left(s)) + s->buffer[s->len] = '\0'; + else + s->buffer[s->size - 1] = '\0'; + + return (s->buffer); +} diff --git a/sys/conf/files b/sys/conf/files index 4378abafecee..ddac2f0cea93 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4687,6 +4687,8 @@ compat/linuxkpi/common/src/linux_rcu.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C} -I$S/contrib/ck/include" compat/linuxkpi/common/src/linux_schedule.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" +compat/linuxkpi/common/src/linux_seq_buf.c optional compat_linuxkpi \ + compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_shmemfs.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_shrinker.c optional compat_linuxkpi \ diff --git a/sys/modules/linuxkpi/Makefile b/sys/modules/linuxkpi/Makefile index c465c76a7626..77d73f19075a 100644 --- a/sys/modules/linuxkpi/Makefile +++ b/sys/modules/linuxkpi/Makefile @@ -24,6 +24,7 @@ SRCS= linux_compat.c \ linux_radix.c \ linux_rcu.c \ linux_schedule.c \ + linux_seq_buf.c \ linux_seq_file.c \ linux_shmemfs.c \ linux_shrinker.c \ From nobody Wed Apr 22 21:08:23 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdz5hc1z6bKkJ for ; Wed, 22 Apr 2026 21:08: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bdz3r9tz3knB for ; Wed, 22 Apr 2026 21:08:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892103; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+4GG8L/UwUHA/0MDNuN3c7PfhmBGfcAEGBP8DbHM7sk=; b=TWwGP4KSpVGsCqTglQOoxbqHqY3p3KvOXFmyQKWmVhz5O8E5NsbFNuAAXNAF39Wdm/k2+q oRKzxs8SCVbWLzzpxjqCCBQvroe+eB6MTAiZoicA08Af6wwSxpP5JOxF3QhVp4Dzg9c5lL 6J0jf0+LxF0TxNgiFzAam/ChQIkoOJAdIe+YOuFLyZJJgj+26cOMa3blsywIHtwcDbLCgB oZeio7PK2AJC54MwdtSdgSdFlFd7A6zy6BQtHiTbmrnXZY5ZNNya4+g4z1YFLln+PUoJov zQIdQheFV4vEkoVgFG1UrGS1Omr8EtPdhGq0Wn4bKxsQQyb9YPPlSb14gvs3UA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892103; a=rsa-sha256; cv=none; b=TVgj1mrLCBVYuRG1Lx99Iy4c5j5A6LQGRg4erep4kG4bP73HPMzVnr6exsAHGwQm2TQKEP 1FFOA35MN0W4WntDfGToa9AlkOD88z3RvLAVQso6wnnxGkES8QwyjJoo1GCOYYz+c9pp/v o+xNIDvlumd3fKCtCvIsDXOwW35ntZ+JUFCkcHmAd7wTv4XgAb051PgOHHSCq0+Y4R/0CK QZHgtzQ1v5RbA4if1/f1ICiKcZmCli8LW58Q3lDIzlgrFQXT1Smyov3jBLE322XxrqzSB0 OlZsOTSDKHuRQFFJfQ9poM7gPoSYag5SLvJcs0yOT7kql5UDfyk1lC1k6XV3Jg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892103; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+4GG8L/UwUHA/0MDNuN3c7PfhmBGfcAEGBP8DbHM7sk=; b=IBx2XCCNuBLC0BziM5R6ySWon3XcZ34Prf0fvuWgGT4S4pBcu/m/QehM33e0FBEw9bzpKS glTzA+WWYDlrHF49EtWqzeQ6z3Lkn4GUPHSLyNjXvAiEykhUU3QwlIO0EGL2up23HRMS5x yHM5fCOEsszKCayRt4s9Du3GH2yZXkDpc/6Bm3no7bvyz4Oj+6DYSVrT9NCtz+5g3YQtBF SHcG887FdMeME6HlXgYULM0g+26punKCZWJLM8iAz/8xZ+m3giXS1V35fbq7Ae65FEg3A7 Qcd83lFJrAGmE5rzQoBmjFdXCHKotYYI8aHQ8ggjYUB3o8S1vPYVAIIiY80hgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdz2txPzncV for ; Wed, 22 Apr 2026 21:08:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27ba6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: 7ec957d66be2 - stable/15 - eventfd: Add eventfd_signal() List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7ec957d66be262d2f674671fe32b7658bd71e96d Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:23 +0000 Message-Id: <69e938c7.27ba6.4204b52e@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7ec957d66be262d2f674671fe32b7658bd71e96d commit 7ec957d66be262d2f674671fe32b7658bd71e96d Author: Jean-Sébastien Pédron AuthorDate: 2025-05-26 17:36:49 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:58 +0000 eventfd: Add eventfd_signal() The `eventfd_signal()` function is the equivalent to a write to an eventfd file descriptor: it bumps the internal counter and wakes up processes waiting for it. `eventfd_signal()` is meant to be used by kernel drivers. DRM drivers will call it through linuxkpi. Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50850 (cherry picked from commit 28d6ffe37cf928c5b13e0aa34c39c4414a0f09e4) --- sys/kern/sys_eventfd.c | 25 ++++++++++++++++++++++--- sys/sys/eventfd.h | 1 + 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/sys/kern/sys_eventfd.c b/sys/kern/sys_eventfd.c index 433bcb57b2b3..47f1fcc316ec 100644 --- a/sys/kern/sys_eventfd.c +++ b/sys/kern/sys_eventfd.c @@ -157,6 +157,27 @@ eventfd_put(struct eventfd *efd) free(efd, M_EVENTFD); } +static void +eventfd_wakeup(struct eventfd *efd) +{ + KNOTE_LOCKED(&efd->efd_sel.si_note, 0); + selwakeup(&efd->efd_sel); + wakeup(&efd->efd_count); +} + +void +eventfd_signal(struct eventfd *efd) +{ + mtx_lock(&efd->efd_lock); + + if (efd->efd_count < UINT64_MAX) + efd->efd_count++; + + eventfd_wakeup(efd); + + mtx_unlock(&efd->efd_lock); +} + static int eventfd_close(struct file *fp, struct thread *td) { @@ -244,9 +265,7 @@ retry: if (error == 0) { MPASS(UINT64_MAX - efd->efd_count > count); efd->efd_count += count; - KNOTE_LOCKED(&efd->efd_sel.si_note, 0); - selwakeup(&efd->efd_sel); - wakeup(&efd->efd_count); + eventfd_wakeup(efd); } mtx_unlock(&efd->efd_lock); diff --git a/sys/sys/eventfd.h b/sys/sys/eventfd.h index 1f36dbecb92d..1b390feed48e 100644 --- a/sys/sys/eventfd.h +++ b/sys/sys/eventfd.h @@ -44,6 +44,7 @@ int eventfd_create_file(struct thread *td, struct file *fp, uint32_t initval, int flags); struct eventfd *eventfd_get(struct file *fp); void eventfd_put(struct eventfd *efd); +void eventfd_signal(struct eventfd *efd); #else From nobody Wed Apr 22 21:08:22 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdy4dW2z6bKln for ; Wed, 22 Apr 2026 21:08:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bdy3LNrz3khb for ; Wed, 22 Apr 2026 21:08:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892102; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kZPqWQMgucbSJIU5CtSfMynt7wDgpl5gFnPh0KecdlY=; b=twQgmHC97b+jlJCSUmGDKiEWonxlMdb4QFTinUB314TRAM4J6dIafu6ivnxnCWhwix6QBB /Er7dHeE41cC3yAxjx1cx3H4usM3IvjZX9j7q/AudepHvTrDrv1nWLuHAvf4NXLUKl3Utl xi2oJC+Fk4iiK5BkbgIVSluX77IiArmIQf5j2ksM6JjgKhD/KaOhKyNQGI16tr582X5S0K Ch0+frWnVE5RFeKtIya0rfUPaxz8HLML8c1beCcP/SAcZtwZuBAGK9IIq8gLWlt6y1R4Hg 1Kk0wgx3J+vgtbkgPNOiZpe0r7dfY18Z7P/vrzAOIS7StGE3nMxF0Dig4hOuNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892102; a=rsa-sha256; cv=none; b=CGd73UuiaATS+I89zRzG+ccYs3zAcKuCNxH9tSauLMzlPlTnIw7Vn3XHPBh16RVtxAFHTB mTwsd/4WrtoVN6DuwRh7TqugdBSsrSAVshqntdS55bJE/g3JD5TiTso7Z2JdDXYiCj9hT/ gfTN/XzDJKbrCUD+r22xYW0RB4XZQp6PznT8QCdyOyumYTld8gjMhQAWrLhMA4cnfp3JSe +6G+rxak/GUmYXjj1E6FpWBOQRy2OAFKzC83QawRQkYa1Sm9TtjWY358/c3G17b0VgAnKZ /xw0UGjqHEaHKr2yIximYmmFix3hiRSyj+1n41Gts6TlBnh13vpJm/PeumndAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892102; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kZPqWQMgucbSJIU5CtSfMynt7wDgpl5gFnPh0KecdlY=; b=lhEkF8HPTXoX1tAjV14drfrr/ut6rFT7D9h14brYgRErpzCWDUio5pNa9OJTnT6uS+DESz BGFQt23u0cnyHbVyHc5kGyRqqDon1UIk7yRJowyNI7lwbhkMo0RxErcfDJrUbUKWdQHdj1 CMetarlg0kXvyEEiQkA04KpIE3RfBzu0f6GeGhSlrqodmes2mbPQ5uFlFgqulndSuhd00F 93xd8sAKOv4bHUoWCoOTPearseWUpytLLN/l6vgFiewyMIOndFoLCCLMOJnn2DOtQdnudV M3rkAVSSjXVQ+fK1YkKmoWQbJZO4Cin7CSThpGbFhN1FOvJcPZq5j+g6TeHLGg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdy2GckznZT for ; Wed, 22 Apr 2026 21:08:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 275ed by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: 10e515465543 - stable/15 - eventfd: Add refcounting List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 10e5154655435e660a02445bd9899fa17f12103c Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:22 +0000 Message-Id: <69e938c6.275ed.2c15b4c1@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=10e5154655435e660a02445bd9899fa17f12103c commit 10e5154655435e660a02445bd9899fa17f12103c Author: Jean-Sébastien Pédron AuthorDate: 2025-05-26 17:18:24 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:58 +0000 eventfd: Add refcounting An eventfd file descriptor can be used by drivers such as DRM drivers through linuxkpi. A driver can hold a reference to such a file regardless of the fact it is used by userland or not. This patch introduces a refcount in `struct eventfd`, plus the `eventfd_get()` and `eventfd_put()` functions to acquire and release references. These functions will be used by DRM drivers for instance. This structure is internal to `sys/kern/sys_eventfd.c` and not used anywhere else. Thus it is safe to add a field without breaking anything. Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50849 (cherry picked from commit 5931649751847cc3ca54255bb767424dcb8a3e97) --- sys/kern/sys_eventfd.c | 30 ++++++++++++++++++++++++++++-- sys/sys/eventfd.h | 4 ++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/sys/kern/sys_eventfd.c b/sys/kern/sys_eventfd.c index 04ed107c933d..433bcb57b2b3 100644 --- a/sys/kern/sys_eventfd.c +++ b/sys/kern/sys_eventfd.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -102,6 +103,7 @@ struct eventfd { uint32_t efd_flags; struct selinfo efd_sel; struct mtx efd_lock; + unsigned int efd_refcount; }; int @@ -119,6 +121,7 @@ eventfd_create_file(struct thread *td, struct file *fp, uint32_t initval, efd->efd_count = initval; mtx_init(&efd->efd_lock, "eventfd", NULL, MTX_DEF); knlist_init_mtx(&efd->efd_sel.si_note, &efd->efd_lock); + refcount_init(&efd->efd_refcount, 1); fflags = FREAD | FWRITE; if ((flags & EFD_NONBLOCK) != 0) @@ -128,16 +131,39 @@ eventfd_create_file(struct thread *td, struct file *fp, uint32_t initval, return (0); } -static int -eventfd_close(struct file *fp, struct thread *td) +struct eventfd * +eventfd_get(struct file *fp) { struct eventfd *efd; + if (fp->f_data == NULL || fp->f_ops != &eventfdops) + return (NULL); + efd = fp->f_data; + refcount_acquire(&efd->efd_refcount); + + return (efd); +} + +void +eventfd_put(struct eventfd *efd) +{ + if (!refcount_release(&efd->efd_refcount)) + return; + seldrain(&efd->efd_sel); knlist_destroy(&efd->efd_sel.si_note); mtx_destroy(&efd->efd_lock); free(efd, M_EVENTFD); +} + +static int +eventfd_close(struct file *fp, struct thread *td) +{ + struct eventfd *efd; + + efd = fp->f_data; + eventfd_put(efd); return (0); } diff --git a/sys/sys/eventfd.h b/sys/sys/eventfd.h index 0f64483753e5..1f36dbecb92d 100644 --- a/sys/sys/eventfd.h +++ b/sys/sys/eventfd.h @@ -38,8 +38,12 @@ typedef uint64_t eventfd_t; #ifdef _KERNEL +struct eventfd; + int eventfd_create_file(struct thread *td, struct file *fp, uint32_t initval, int flags); +struct eventfd *eventfd_get(struct file *fp); +void eventfd_put(struct eventfd *efd); #else From nobody Wed Apr 22 21:08:25 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bf20VKvz6bL0l for ; Wed, 22 Apr 2026 21:08: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bf15F1hz3ky1 for ; Wed, 22 Apr 2026 21:08:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O0mCM+OR94qMwP3JeCQ6/BE1tLPVBt3yJhXj8zkozoA=; b=HQA44M6wMLRHgfZqh2IO6Kcw20U461QlWvymz58MbH90q7AKA3GxbvsQqarBWATkDN0UqW jJRTfKYrfvFW4dCvnL8SGx4oT+JgoWCNbJMG6BOCQfABpn58vDke6y9D4K0v4EHeOiP4eW 2ly+Wp2iilfg/Tvv0K1cUKVEIBpRmI9w2eqdc0GwyGNgiPFwT1hmB5LO4kRm2oO1GAtYh1 nCHqM4heltsKr0phyLQszrpkk7HBYwNr0xTcA5M3pR37uHSAcI+j8huCKF7GLTpy6jlyoZ EBcqIUpzPMah9vjNFz/0A8CbSav4cq4sKgoMl1/qCGfEceoNkYPx2+WDUCRVDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892105; a=rsa-sha256; cv=none; b=PxT3x9Q6X+zXwrQwtV/rIXOmlQ3rQ4y5MN9sfNf2n+dQ4U0qBw1M2ey27Y/+J0KM2pJM3X 6oxWm7n0hF9txCqujRtG+3+6OnqkJvdNU+XFEHy7HuD0+9nut5O5xJlcoiI0dSmKMLbiJe U2NHnxYPVka9fjF2Uj6VsUbahx6AZAzIF69iUS9HFviHGpX2OI/rA7zdG9M8kY8WpP4s6n hpJ5JPJkLxwMCEIp1bbRar7PayEvGlxds976IhXWmFZtBt272qyym+IRMJNIOD40N/u79T AMRirQwRlNkYGwPRbUTbwZFIG9X3j933H99YodzAHP0wmtZwvy4jktRDnz5rIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O0mCM+OR94qMwP3JeCQ6/BE1tLPVBt3yJhXj8zkozoA=; b=w5qnFo3mIIf/1lJVFrVdypWIFrpDmav7+4o6HIyCB+SAz7o41+54dsp8dL4mRErojiApoE yffPMR9tJndel7X20M12gKMvQoiiyJ8Th421UfzKTHlm5qa96ZjnxUodnMsQ9HWJeUjerc 8MxZxnl/tz5nuwHlQXku5IQO2upf+1G7kBpGvbKLNwlbXEruV+VC1Zx2LRo6baR2gXGOP+ 6KziA7Qpw8nS4gBGdJCMRbSfC7WUzburKZltfAsCZqvt1cemqXd+8tj8r22WaQ3ZodbwCi DeS0UDnkHHz5TkpRNueJTg6/SmVa6L1apdwMlmGIZmZskqfETFycJ3FYA3tLog== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bf14d3SzmyT for ; Wed, 22 Apr 2026 21:08:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 279d4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: 4ff40cde0b12 - stable/15 - linuxkpi: Add tag support to radix tree List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4ff40cde0b1255ed109762173147a405c86495a3 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:25 +0000 Message-Id: <69e938c9.279d4.585ac2ee@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4ff40cde0b1255ed109762173147a405c86495a3 commit 4ff40cde0b1255ed109762173147a405c86495a3 Author: Jean-Sébastien Pédron AuthorDate: 2025-09-07 20:53:09 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:59 +0000 linuxkpi: Add tag support to radix tree The tag is used to perform lookup in a different way. New functions were introduced: * to set, check and clear a tag * to walk through a radix tree based on a given tag Furthermore, the `radix_tree_delete()` function was modified to clear tags on deletion. The amdgpu DRM driver started to use this in Linux 6.10. While here, the `radix_tree_gang_lookup()` function was added because it is very close to `radix_tree_gang_lookup_tag()`, but it is not used by the DRM drivers as of this commit. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54503 (cherry picked from commit 79b05e7f80eb482287c700f10da9084824199a05) --- .../linuxkpi/common/include/linux/radix-tree.h | 29 ++- sys/compat/linuxkpi/common/src/linux_radix.c | 219 ++++++++++++++++++++- sys/compat/linuxkpi/common/src/linux_xarray.c | 4 +- 3 files changed, 242 insertions(+), 10 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/radix-tree.h b/sys/compat/linuxkpi/common/include/linux/radix-tree.h index 55f0fc949807..7182f4a9e407 100644 --- a/sys/compat/linuxkpi/common/include/linux/radix-tree.h +++ b/sys/compat/linuxkpi/common/include/linux/radix-tree.h @@ -38,12 +38,19 @@ #define RADIX_TREE_MAX_HEIGHT \ howmany(sizeof(long) * NBBY, RADIX_TREE_MAP_SHIFT) +#define RADIX_TREE_MAX_TAGS 3 +#define RADIX_TREE_TAG_LONGS RADIX_TREE_MAP_SIZE + #define RADIX_TREE_ENTRY_MASK 3UL #define RADIX_TREE_EXCEPTIONAL_ENTRY 2UL #define RADIX_TREE_EXCEPTIONAL_SHIFT 2 +#define RADIX_TREE_ITER_TAG_MASK 0x0f +#define RADIX_TREE_ITER_TAGGED 0x10 + struct radix_tree_node { void *slots[RADIX_TREE_MAP_SIZE]; + unsigned long tags[RADIX_TREE_MAX_TAGS][RADIX_TREE_TAG_LONGS]; int count; }; @@ -51,6 +58,8 @@ struct radix_tree_root { struct radix_tree_node *rnode; gfp_t gfp_mask; int height; + /* Linux stores root tags inside `gfp_mask`. */ + unsigned long tags[RADIX_TREE_MAX_TAGS]; }; struct radix_tree_iter { @@ -64,9 +73,16 @@ struct radix_tree_iter { #define RADIX_TREE(name, mask) \ struct radix_tree_root name = RADIX_TREE_INIT(mask) -#define radix_tree_for_each_slot(slot, root, iter, start) \ - for ((iter)->index = (start); \ - radix_tree_iter_find(root, iter, &(slot)); (iter)->index++) +#define radix_tree_for_each_slot(slot, root, iter, start) \ + for ((iter)->index = (start); \ + radix_tree_iter_find(root, iter, &(slot), 0); \ + (iter)->index++) + +#define radix_tree_for_each_slot_tagged(slot, root, iter, start, tag) \ + for ((iter)->index = (start); \ + radix_tree_iter_find(root, iter, &(slot), \ + RADIX_TREE_ITER_TAGGED | tag); \ + (iter)->index++) static inline void * radix_tree_deref_slot(void **slot) @@ -84,7 +100,12 @@ void *radix_tree_lookup(const struct radix_tree_root *, unsigned long); void *radix_tree_delete(struct radix_tree_root *, unsigned long); int radix_tree_insert(struct radix_tree_root *, unsigned long, void *); int radix_tree_store(struct radix_tree_root *, unsigned long, void **); -bool radix_tree_iter_find(const struct radix_tree_root *, struct radix_tree_iter *, void ***); +bool radix_tree_iter_find(const struct radix_tree_root *, struct radix_tree_iter *, void ***, int); void radix_tree_iter_delete(struct radix_tree_root *, struct radix_tree_iter *, void **); +void *radix_tree_tag_set(struct radix_tree_root *root, unsigned long index, unsigned int tag); +void *radix_tree_tag_clear(struct radix_tree_root *root, unsigned long index, unsigned int tag); +int radix_tree_tagged(const struct radix_tree_root *root, unsigned int tag); +unsigned int radix_tree_gang_lookup(const struct radix_tree_root *root, void **results, unsigned long first_index, unsigned int max_items); +unsigned int radix_tree_gang_lookup_tag(const struct radix_tree_root *root, void **results, unsigned long first_index, unsigned int max_items, unsigned int tag); #endif /* _LINUXKPI_LINUX_RADIX_TREE_H_ */ diff --git a/sys/compat/linuxkpi/common/src/linux_radix.c b/sys/compat/linuxkpi/common/src/linux_radix.c index ee6b3a63c370..760f583f25c8 100644 --- a/sys/compat/linuxkpi/common/src/linux_radix.c +++ b/sys/compat/linuxkpi/common/src/linux_radix.c @@ -52,6 +52,81 @@ radix_pos(long id, int height) return (id >> (RADIX_TREE_MAP_SHIFT * height)) & RADIX_TREE_MAP_MASK; } +static inline int +root_tag_get(const struct radix_tree_root *root, unsigned tag) +{ + return (test_bit(tag, root->tags)); +} + +static inline void +root_tag_set(struct radix_tree_root *root, unsigned tag) +{ + set_bit(tag, root->tags); +} + +static inline void +root_tag_clear(struct radix_tree_root *root, unsigned tag) +{ + clear_bit(tag, root->tags); +} + +static inline int +tag_get(const struct radix_tree_node *node, unsigned int tag, int pos) +{ + return (test_bit(pos, node->tags[tag])); +} + +static inline void +tag_set(struct radix_tree_node *node, unsigned int tag, int pos) +{ + set_bit(pos, node->tags[tag]); +} + +static inline void +tag_clear(struct radix_tree_node *node, unsigned int tag, int pos) +{ + clear_bit(pos, node->tags[tag]); +} + +static inline bool +any_tag_set(const struct radix_tree_node *node, unsigned int tag) +{ + unsigned int pos; + + for (pos = 0; pos < RADIX_TREE_TAG_LONGS; pos++) + if (node->tags[tag][pos]) + return (true); + + return (false); +} + +static void +node_tag_clear(struct radix_tree_root *root, struct radix_tree_node *stack[], + unsigned long index, unsigned int tag) +{ + struct radix_tree_node *node; + int height, pos; + + height = 1; + node = stack[height]; + + while (node && height <= root->height - 1) { + pos = radix_pos(index, height); + if (!tag_get(node, tag, pos)) + return; + + tag_clear(node, tag, pos); + if (any_tag_set(node, tag)) + return; + + height++; + node = stack[height]; + } + + if (root_tag_get(root, tag)) + root_tag_clear(root, tag); +} + static void radix_tree_clean_root_node(struct radix_tree_root *root) { @@ -84,14 +159,70 @@ out: return (item); } +unsigned int +radix_tree_gang_lookup(const struct radix_tree_root *root, void **results, + unsigned long first_index, unsigned int max_items) +{ + struct radix_tree_iter iter; + void **slot; + int count; + + count = 0; + if (max_items == 0) + return (count); + + radix_tree_for_each_slot(slot, root, &iter, first_index) { + results[count] = *slot; + if (results[count] == NULL) + continue; + + count++; + if (count == max_items) + break; + } + + return (count); +} + +unsigned int +radix_tree_gang_lookup_tag(const struct radix_tree_root *root, + void **results, unsigned long first_index, unsigned int max_items, + unsigned int tag) +{ + struct radix_tree_iter iter; + void **slot; + int count; + + count = 0; + if (max_items == 0) + return (count); + + radix_tree_for_each_slot_tagged(slot, root, &iter, first_index, tag) { + results[count] = *slot; + if (results[count] == NULL) + continue; + + count++; + if (count == max_items) + break; + } + + return (count); +} + bool radix_tree_iter_find(const struct radix_tree_root *root, - struct radix_tree_iter *iter, void ***pppslot) + struct radix_tree_iter *iter, void ***pppslot, int flags) { struct radix_tree_node *node; unsigned long index = iter->index; + unsigned int tag; int height; + tag = flags & RADIX_TREE_ITER_TAG_MASK; + if ((flags & RADIX_TREE_ITER_TAGGED) && !root_tag_get(root, tag)) + return (false); + restart: node = root->rnode; if (node == NULL) @@ -109,7 +240,9 @@ restart: *pppslot = node->slots + pos; next = node->slots[pos]; - if (next == NULL) { + if (next == NULL || + (flags & RADIX_TREE_ITER_TAGGED && + !tag_get(next, tag, pos))) { index += step; index &= -step; if ((index & mask) == 0) @@ -131,6 +264,7 @@ radix_tree_delete(struct radix_tree_root *root, unsigned long index) void *item; int height; int idx; + int tag; item = NULL; node = root->rnode; @@ -144,9 +278,15 @@ radix_tree_delete(struct radix_tree_root *root, unsigned long index) stack[height] = node; node = node->slots[radix_pos(index, height--)]; } - idx = radix_pos(index, 0); - if (node) + + if (node) { + idx = radix_pos(index, 0); item = node->slots[idx]; + + for (tag = 0; tag < RADIX_TREE_MAX_TAGS; tag++) + node_tag_clear(root, stack, index, tag); + } + /* * If we removed something reduce the height of the tree. */ @@ -380,3 +520,74 @@ radix_tree_store(struct radix_tree_root *root, unsigned long index, void **ppite node->count++; return (0); } + +void * +radix_tree_tag_set(struct radix_tree_root *root, unsigned long index, + unsigned int tag) +{ + struct radix_tree_node *node; + void *item; + int height, pos; + + item = NULL; + node = root->rnode; + height = root->height - 1; + if (index > radix_max(root)) + goto out; + + while (height) { + KASSERT( + node != NULL, + ("Node at index %lu does not exist in radix tree %p", + index, root)); + + pos = radix_pos(index, height--); + node = node->slots[pos]; + + if (!tag_get(node, tag, pos)) + tag_set(node, tag, pos); + } + + item = node->slots[radix_pos(index, 0)]; + + root_tag_set(root, tag); + +out: + return (item); +} + +void * +radix_tree_tag_clear(struct radix_tree_root *root, + unsigned long index, unsigned int tag) +{ + struct radix_tree_node *stack[RADIX_TREE_MAX_HEIGHT]; + struct radix_tree_node *node; + void *item; + int height; + + item = NULL; + node = root->rnode; + height = root->height - 1; + if (index > radix_max(root)) + goto out; + + while (height && node) { + stack[height] = node; + node = node->slots[radix_pos(index, height--)]; + } + + if (node) { + item = node->slots[radix_pos(index, 0)]; + + node_tag_clear(root, stack, index, tag); + } + +out: + return (item); +} + +int +radix_tree_tagged(const struct radix_tree_root *root, unsigned int tag) +{ + return (root_tag_get(root, tag)); +} diff --git a/sys/compat/linuxkpi/common/src/linux_xarray.c b/sys/compat/linuxkpi/common/src/linux_xarray.c index 3f07f6d7c59f..8caefbaf7e50 100644 --- a/sys/compat/linuxkpi/common/src/linux_xarray.c +++ b/sys/compat/linuxkpi/common/src/linux_xarray.c @@ -389,7 +389,7 @@ __xa_empty(struct xarray *xa) XA_ASSERT_LOCKED(xa); - return (!radix_tree_iter_find(&xa->xa_head, &iter, &temp)); + return (!radix_tree_iter_find(&xa->xa_head, &iter, &temp, 0)); } bool @@ -426,7 +426,7 @@ __xa_next(struct xarray *xa, unsigned long *pindex, bool not_first) return (NULL); } - found = radix_tree_iter_find(&xa->xa_head, &iter, &ppslot); + found = radix_tree_iter_find(&xa->xa_head, &iter, &ppslot, 0); if (likely(found)) { retval = *ppslot; if (retval == NULL_VALUE) From nobody Wed Apr 22 21:08:24 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bf10Dt9z6bKvW for ; Wed, 22 Apr 2026 21:08:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bf04QW5z3knQ for ; Wed, 22 Apr 2026 21:08:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8tiCiHnUTG5AMJDcj8v7vkyJx7aqEgrTkgz4uZo/hzc=; b=boGXCyy/LzW05c8u7BBPq0MtBx9AleFUwQrqJxNKDNNbkAm/giVaadyur055XGQYYcRqqq a7Xk3qC4D9OwtLvTuBwHv5r+knn2AttSNXdU9ld4XUmOQQJKDhnrYNoRBAb8HYkLUGblUe zzxxArHag7+FkBCpcwXoGKwgWop7ps+CtknmACBjqAe5tD2ySLCHHYNtqvfVqKfk66Ezm7 K/S25nT132RMPa/eVMNLoNsF/xOwFYe8x7dJUyLLEDxYVYk+/CIA/9ld7JMef1DFncunXA NnLoOHcZp9UqqnTMKYl1x5PzBuxnStYzOsDAIxQ0+TceUCbqOC5M/4wpmzAHcw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892104; a=rsa-sha256; cv=none; b=o5TkXVjuz2sJSn2yi/2K22NVLAlZDawVUByOFtEQjGQcjkdjc8QpM6J8TmR5qhCsCL4RQF 84C0FgJAsJPWbbqmaxz/mwORSrcTHMCNPAcXqf1qVtKl1KoiKiLIr8L+U+pZ26Mxh3zFa6 dAtZ7Bc+hT2kLigzAsge8JcYxdHwmwWVajUngE4EgtdL80bkLaQUQfiGWmUey7n3/tUVf1 JnIMp0hZJfnYIH2F35gCNAfZONQ9SFdQpOFrtUYCDTWcX4Y/0I3uxMGOtjRaZ+I7Uqlbwf mFQd9XA7/qjuxkcXQYjj64f+UMiezYP3ppg1YFFSC9SAfyC4iFRL464snp7KwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8tiCiHnUTG5AMJDcj8v7vkyJx7aqEgrTkgz4uZo/hzc=; b=sMZ+tk37zbcotZtJnVyeeHfBG90RWYccsL6ttf1HAACnXnYT6YJqMcZNpD18d9YkS4zO6E 3cWTsZRBCOSqNw62I6eRr7XUlsp3UG8JUCMZQcZ1dozw0ajueAb/fTy2a3PLA23LPGXbDz l7fFhkjXaq+UUv2m6+x26FZtGfw497fk6LQpDM9Pv0JgiYi1q5qmzeQjtFVNuUGEBsfe3i MrZAz7/anpbXB2Dd554SlXf0TxPUL4eHtPuthPu/IHEwOYSXP2DwQJzBj9n/Uv3XIYBcEF jtQGBZmB+EvR7plhpxdTdCh+2LXw3pqKTI22xsheK6bYc0a62lUl9aI0bFHTog== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bf03lD7zn9Z for ; Wed, 22 Apr 2026 21:08:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27ca9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: 6425b7399b34 - stable/15 - linuxkpi: Add eventfd_*() List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6425b7399b3425222260a4497ac98e4a5e811330 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:24 +0000 Message-Id: <69e938c8.27ca9.6e4c2fed@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=6425b7399b3425222260a4497ac98e4a5e811330 commit 6425b7399b3425222260a4497ac98e4a5e811330 Author: Jean-Sébastien Pédron AuthorDate: 2025-05-26 18:12:40 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:59 +0000 linuxkpi: Add eventfd_*() Add and expose the `eventfd_*()` API. This is used by DRM drivers for some time, but the code was commented out so far. Note that Linux uses `struct eventfd_ctx`, but FreeBSD defines `struct eventfd`. We define `eventfd_ctx` as a synonym to `eventfd`. Reviewed by: christos, markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50853 (cherry picked from commit a200c8e51cdb4586ad2eb20d2b45ba367f00beaf) --- sys/compat/linuxkpi/common/include/linux/eventfd.h | 54 +++++++++++++++++++ sys/compat/linuxkpi/common/src/linux_eventfd.c | 63 ++++++++++++++++++++++ sys/compat/linuxkpi/dummy/include/linux/eventfd.h | 0 sys/conf/files | 2 + sys/modules/linuxkpi/Makefile | 1 + 5 files changed, 120 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/eventfd.h b/sys/compat/linuxkpi/common/include/linux/eventfd.h new file mode 100644 index 000000000000..d167d4b7d189 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/eventfd.h @@ -0,0 +1,54 @@ +/*- + * Copyright (c) 2025 The FreeBSD Foundation + * Copyright (c) 2025 Jean-Sébastien Pédron + * + * This software was developed by Jean-Sébastien Pédron under sponsorship + * from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _LINUXKPI_LINUX_EVENTFD_H_ +#define _LINUXKPI_LINUX_EVENTFD_H_ + +#include + +#include +#include +#include +#include +#include + +/* + * Linux uses `struct eventfd_ctx`, but FreeBSD defines `struct eventfd`. Here, + * we define a synonym to the FreeBSD structure. This allows to keep Linux code + * unmodified. + */ +#define eventfd_ctx eventfd + +#define eventfd_ctx_fdget lkpi_eventfd_ctx_fdget +struct eventfd_ctx *lkpi_eventfd_ctx_fdget(int fd); + +#define eventfd_ctx_put lkpi_eventfd_ctx_put +void lkpi_eventfd_ctx_put(struct eventfd_ctx *ctx); + +#endif /* _LINUXKPI_LINUX_EVENTFD_H_ */ diff --git a/sys/compat/linuxkpi/common/src/linux_eventfd.c b/sys/compat/linuxkpi/common/src/linux_eventfd.c new file mode 100644 index 000000000000..126c6c54b9a5 --- /dev/null +++ b/sys/compat/linuxkpi/common/src/linux_eventfd.c @@ -0,0 +1,63 @@ +/*- + * Copyright (c) 2025 The FreeBSD Foundation + * Copyright (c) 2025 Jean-Sébastien Pédron + * + * This software was developed by Jean-Sébastien Pédron under sponsorship + * from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include + +#include + +struct eventfd_ctx * +lkpi_eventfd_ctx_fdget(int fd) +{ + struct file *fp; + struct eventfd_ctx *ctx; + + /* Lookup file pointer by file descriptor index. */ + if (fget_unlocked(curthread, fd, &cap_no_rights, &fp) != 0) + return (ERR_PTR(-EBADF)); + + /* + * eventfd_get() bumps the refcount, so we can safely release the + * reference on the file itself afterwards. + */ + ctx = eventfd_get(fp); + fdrop(fp, curthread); + + if (ctx == NULL) + return (ERR_PTR(-EBADF)); + + return (ctx); +} + +void +lkpi_eventfd_ctx_put(struct eventfd_ctx *ctx) +{ + eventfd_put(ctx); +} diff --git a/sys/compat/linuxkpi/dummy/include/linux/eventfd.h b/sys/compat/linuxkpi/dummy/include/linux/eventfd.h deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/sys/conf/files b/sys/conf/files index ddac2f0cea93..9d6488a415cb 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4649,6 +4649,8 @@ compat/linuxkpi/common/src/linux_dmi.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_domain.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" +compat/linuxkpi/common/src/linux_eventfd.c optional compat_linuxkpi \ + compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_firmware.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_folio.c optional compat_linuxkpi \ diff --git a/sys/modules/linuxkpi/Makefile b/sys/modules/linuxkpi/Makefile index 77d73f19075a..2090fe76d857 100644 --- a/sys/modules/linuxkpi/Makefile +++ b/sys/modules/linuxkpi/Makefile @@ -6,6 +6,7 @@ SRCS= linux_compat.c \ linux_devres.c \ linux_dmi.c \ linux_domain.c \ + linux_eventfd.c \ linux_firmware.c \ linux_folio.c \ linux_fpu.c \ From nobody Wed Apr 22 21:08:27 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bf420b5z6bL5B for ; Wed, 22 Apr 2026 21:08:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bf40PzHz3kyT for ; Wed, 22 Apr 2026 21:08:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892108; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dcWAw3YAZGUBjblVdHUMCpmjbwEISm7oSiTN3ETUHU4=; b=wBY1F1827yFIvykWw5aR1J1zbArvYprpc71VyLHCls2eQiTypx8Dc34Ory9pPVaQ4GQnFf X5qYp8/fclBTBvtqxGlJUSx/MAejnDuEsC5DoevR7M1QZHH8ghrNHeOcCtIhLWDref1Ad2 PawzVkFrLsIxDlFqvlUZqslPqld3OIRmDzQNep0T3aO2/FCiwzZ8853uCJAQuz+ohIWWpl 50eSxciaiako61vQEeLO7FIaxzOZpVISSgv/tDhHjTLWnisaRe/l9oYqbpc4+T8Pd5Q48n OLJpgslJKnthK3AI3b8C/DIVOIodSHVjQKQx0ecTFuNLJs/mvmmo6681HpZ4SA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892108; a=rsa-sha256; cv=none; b=UbpJaNbX0RCMJuaSr8fyIfOxC5uNtAK0+qXVEApJN+P9IyzzPxJuR5OG4gXuBQs1F2E3rz 3WcwMeaPuF8Ru8sXdkmcUo8/0fmW/iT+moU40ZrZC3ChQ5aX73HG4h6HEZ97TRCAUe+f/z AIgkrjwaNmlxTPXb5q7yX2mF6z/e3kQO6OB/ckxX8S9AUpUCnp9DmNpGam00Lvwa0miT8i 1ONeL4z6DFlNQYSG9sLsrafWdLcb2hmLCaDQeCoWiLefqCcbhh5ROQItdCiTtOdI0iDmnG Nk54B8OBfwcpU/88V+iLzDbB6DP7C2eRzK7HkqPdZvKxbI8mgUheDMyw4z5SSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892108; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dcWAw3YAZGUBjblVdHUMCpmjbwEISm7oSiTN3ETUHU4=; b=RIghG7nPtf8QNysk220dmiGFCyjW1F74aMTlr0k2ayRB5JWe0EA4ZRBKkBF9r/Ie/Q56Jp s9MZ5ty7jukq9A4B0Qz81ty3+5WPX6MW53JAfQ2vk+qDB90KwZSLQj8yRtD+q4ci74VyiW J0coQtO+FJ+2lxa01kc2FQTWsvYq/N7n28MVIfQ90deZObX+tdsxK+p10A+/y4SR3wgdzj z182wIxY6j6S+N2yTKZ9I3vBCv7Oqoripwo4e0J5Kq2/2qvFw4vYRiQoDBHd2Doov0oTNH xWgYp/6R6pXfpUCXLa0k/bntqLllOsBa+GikYH2LiMVaQRcSrhBUE05tRwdUCQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bf36NHdzn9g for ; Wed, 22 Apr 2026 21:08:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30a14 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: 7ba86edecbb0 - stable/15 - linuxkpi: Move `_RET_IP_` to List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7ba86edecbb09f378a0fdd424599a9bc383dc511 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:27 +0000 Message-Id: <69e938cb.30a14.70c05096@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7ba86edecbb09f378a0fdd424599a9bc383dc511 commit 7ba86edecbb09f378a0fdd424599a9bc383dc511 Author: Jean-Sébastien Pédron AuthorDate: 2026-03-02 23:06:54 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:00 +0000 linuxkpi: Move `_RET_IP_` to This matches the declaration on Linux. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55730 (cherry picked from commit 8af854ea479a140a6e284d74e481d0b547408df2) --- .../linuxkpi/common/include/linux/instruction_pointer.h | 13 +++++++++++++ sys/compat/linuxkpi/common/include/linux/kernel.h | 3 +-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/instruction_pointer.h b/sys/compat/linuxkpi/common/include/linux/instruction_pointer.h new file mode 100644 index 000000000000..9dc16781808a --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/instruction_pointer.h @@ -0,0 +1,13 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2021 Neel Chauhan + * Copyright (c) 2026 The FreeBSD Foundation + */ + +#ifndef _LINUXKPI_LINUX_INSTRUCTION_POINTER_H_ +#define _LINUXKPI_LINUX_INSTRUCTION_POINTER_H_ + +#define _RET_IP_ __builtin_return_address(0) + +#endif /* _LINUXKPI_LINUX_INSTRUCTION_POINTER_H_ */ diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h index 11a13cbd49b4..880d2f67c517 100644 --- a/sys/compat/linuxkpi/common/include/linux/kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h @@ -55,6 +55,7 @@ #include #include #include +#include #include #include @@ -267,8 +268,6 @@ extern int linuxkpi_debug; #define u64_to_user_ptr(val) ((void *)(uintptr_t)(val)) -#define _RET_IP_ __builtin_return_address(0) - #define offsetofend(t, m) \ (offsetof(t, m) + sizeof((((t *)0)->m))) From nobody Wed Apr 22 21:08:26 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bf34qDSz6bL59 for ; Wed, 22 Apr 2026 21:08:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bf25tm1z3l1c for ; Wed, 22 Apr 2026 21:08:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=03MCXjOwKTmKuusO6Rj9K7QzrVwPmHtlPhs4i5C201Q=; b=Wv3/qJ9jxnnXiuVY4sowPxMtUnkzQAaLJ2A/7cc8TEHiqOLU6XSeTj00KaJd62BgbM0V+k +gYhp2YHJTpDASl0ConrDAf8k30bHDCHxV64mljyZHrlNHiis9YIWBNjKljS4cEAvT9VO7 H3Sm66T1Vew1Uoppb7fylid2XxgJd8IGKTzCymq/zCteeKqz3jnYt4b1g6oHH5hV/OM3mA RJjGX39L4Q3NEj/B297iU55aauiiyuar6gUfLn4bamxLCrRmgyWgZWNUUi0TYPrEHxz9cr vLN7JZZDNMKK5md8aeqs3WDu6w49Ym0IFwFkk3xymPsyeXQhhh4IaPBsPZEjdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892106; a=rsa-sha256; cv=none; b=RKsvMLF6pA/Dq9gFxmfauoNJ/935/zAEPsGE8y3e6tLI+82HfoU7qZLzpfK4OaWwXDYV65 qJmz+9+k1g/LtqaWyDSz8/WUT0oWmxKaAfKAkPy8o+H/bd/5CNNvfSHMeBGagsHFqtKhnc CHb6N0+d0AapvkSZCAt8GhNB/xwRQUtme90u8oHGKXa1Tz2PHQ9pm5XjFsGjlNqWFdgNZL Aor45YPO50+oALJLqwPb22PHMF8Dt0V+/Wq1TdTmd0wSp6e2sDXQpv6nzMyXBZP5/JEH5c O6FcAkMOYYTKvLVSkmMR1YX8xx4NewBOhk1/aGFSrHG+3vTRo/XX6fNW0rv2Wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=03MCXjOwKTmKuusO6Rj9K7QzrVwPmHtlPhs4i5C201Q=; b=whc68uVazqndXT7XOy0AYgxAQ2J0hcU1043Np8oIwAIxnQ/1gw+weaTZRJIJdvTHHihmuO ne3NNji9N3jmAD6WhLnaldEPyEi5ubYmfygCAQCqB5blT6OiGq6x5T0uUVxtRzz8M+xTg6 GSlbc03uLmAxZmTlQgTbtXhcZKrAvHMq2rgljTbi76QVow4yDD1IpPbpTibcGC3vWcas0G QA/Me++TYXPNm+c9jcRPD+l/mpDNavN6AcZcfK0x4+rKBCT2g4oWnr2JoSsHbNXZBpfdjj 4trD4fO5E4r89jXVH0PRGTzqZYyjW6iJr4x+DtKNIUZtKh0ZFP/nB6c03wkldw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bf25VGxznL8 for ; Wed, 22 Apr 2026 21:08:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 275f2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: 1c51a0177ddd - stable/15 - linuxkpi: Add `strtomem()` and `strtomem_pad()` List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 1c51a0177ddd8d45fe0a68c73c31f67713164af0 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:26 +0000 Message-Id: <69e938ca.275f2.14ff0ea@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=1c51a0177ddd8d45fe0a68c73c31f67713164af0 commit 1c51a0177ddd8d45fe0a68c73c31f67713164af0 Author: Jean-Sébastien Pédron AuthorDate: 2026-03-02 23:04:09 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:59 +0000 linuxkpi: Add `strtomem()` and `strtomem_pad()` The DRM generic code started to use `strtomem_pad()` in Linux 6.11. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55729 (cherry picked from commit 362136ed4987230269740f54531f6a945f00d135) --- sys/compat/linuxkpi/common/include/linux/string.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/string.h b/sys/compat/linuxkpi/common/include/linux/string.h index f7b64560d254..0b858e7af623 100644 --- a/sys/compat/linuxkpi/common/include/linux/string.h +++ b/sys/compat/linuxkpi/common/include/linux/string.h @@ -303,6 +303,22 @@ memcpy_and_pad(void *dst, size_t dstlen, const void *src, size_t len, int ch) } } +#define strtomem(dst, src) do { \ + size_t dstlen = ARRAY_SIZE(dst); \ + size_t srclen = __builtin_object_size(src, 1); \ + srclen = MIN(srclen, dstlen); \ + srclen = strnlen(src, srclen); \ + memcpy(dst, src, srclen); \ +} while (0) + +#define strtomem_pad(dst, src, pad) do { \ + size_t dstlen = ARRAY_SIZE(dst); \ + size_t srclen = __builtin_object_size(src, 1); \ + srclen = MIN(srclen, dstlen); \ + srclen = strnlen(src, srclen); \ + memcpy_and_pad(dst, dstlen, src, srclen, pad); \ +} while (0) + #define memset_startat(ptr, bytepat, smember) \ ({ \ uint8_t *_ptr = (uint8_t *)(ptr); \ From nobody Wed Apr 22 21:08:29 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bf569m9z6bKvd for ; Wed, 22 Apr 2026 21:08: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bf51cDhz3l1v for ; Wed, 22 Apr 2026 21:08:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yje+fjReC1GDeZy5BrVtYcinskVHkEKsNAtN5Fzhe6E=; b=FdKwWxAHaHY+yuTC2FnK9khTezv7N6jvq9zTt6XOFhamHmBceU1Cxg50aN+0Ruil4GQWGT TxwsKiREwB9lXSnQhy+nk8JqS5NqT9z5ao7sTGNN9ykcK6X3T47ZEmpITng5ga8MyIPW85 wSxSEbXceLL8PtKpefQK1skwWSri+kaRn57xKQONyj0NkyKJ/kcYslk2clLl5/J4xurOpY Uj/RNS64zE/QcgS/DX3uVilDmEPrnFLJpkF8hwToFFcJDsBsfxePDEb/fVWmbvRqOqY890 FcQfR7VbNsJKeAzEsm+9u2Nm2iXN56LMhuKQelFnXuFqM5qeY6GpA4TovCeR+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892109; a=rsa-sha256; cv=none; b=yY4tLMqv1/6UATBXfVMWwSJkxfTu2ukx3zTrX/1ePZ/u/huttgMESp5uxAoKs9vn684HBF 8PRNkpgTkJTlrg7tbGlxV0EeLxnire3k0DwP0InglEf1rqip1OO27fmWhpozspuJi0lxoH K6mJ5ZUEhjcDhwQ2frFKutBYfXkAhO89pHyEGnnbpm8e1Dq8eZYygEyLnDbwrZmGsBNrBK xQBlrpsbA1OIP5WyaxGHVJTQsAHHJ9yaHfVtdi9nNzJQuG8TjNfJTM/4VSFMhi5w4YZz9J eOO44DhcyCGYM0RWR2f7kW/6RDglGn68K6xGPNxPRsnPj/aNSCu0QKJ1t7cVQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yje+fjReC1GDeZy5BrVtYcinskVHkEKsNAtN5Fzhe6E=; b=DqNOEvFrFKdR16pySsicA65vQLfjJj2CflbZMqCavq3cRyXSxyAz9a2KT5SC9E8lQfJKkb lr1yk2LXD3KfQUmfTJWdaRJF4jdLIeK5c8thA3ogIgZ2m6EozlpL4LSXQ98zwVftLqiyu1 Km28RNFegzJEZb5crGTfQ7MtgvQOsqhtLSBEE2/WSn/fLAS25xLjZSOLvlCK+pijZ0OuF1 4fj+Ws3+gKCqggOIVOHlQ4h/+jLQk0FJNcddF88lIWDYuAayC9nQ9p4Dndp0QeC2PD/XoV kNU66Uv2i8J00CxY6N14yznG7LW7qDrDzszB5fnYkfB4mBNSS0ybE9EBwnKwpA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bf505t1zncX for ; Wed, 22 Apr 2026 21:08:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26aba by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: fb16a42610fb - stable/15 - linuxkpi: Define `_THIS_IP_` List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: fb16a42610fbffad89f912a9217f438bb147d826 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:29 +0000 Message-Id: <69e938cd.26aba.bfe6044@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=fb16a42610fbffad89f912a9217f438bb147d826 commit fb16a42610fbffad89f912a9217f438bb147d826 Author: Jean-Sébastien Pédron AuthorDate: 2026-03-02 23:09:02 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:00 +0000 linuxkpi: Define `_THIS_IP_` For now, the macro is not implemented and it returns 0. The DRM generic code started to use it in Linux 6.11. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55731 (cherry picked from commit 56251304258a50fe31bac5cd7da74a4d25497606) --- sys/compat/linuxkpi/common/include/linux/instruction_pointer.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/instruction_pointer.h b/sys/compat/linuxkpi/common/include/linux/instruction_pointer.h index 9dc16781808a..200a8c3f1d5e 100644 --- a/sys/compat/linuxkpi/common/include/linux/instruction_pointer.h +++ b/sys/compat/linuxkpi/common/include/linux/instruction_pointer.h @@ -10,4 +10,6 @@ #define _RET_IP_ __builtin_return_address(0) +#define _THIS_IP_ ((unsigned long)0) /* TODO: _THIS_IP_ not implemented. */ + #endif /* _LINUXKPI_LINUX_INSTRUCTION_POINTER_H_ */ From nobody Wed Apr 22 21:08:30 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bf65DS4z6bL0y for ; Wed, 22 Apr 2026 21:08:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bf61PqRz3l6v for ; Wed, 22 Apr 2026 21:08:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P3/voeYXI5Y1tyNxJmZdZkATboR1NuynslFqciTlySo=; b=pmsHIVUxR9/gg0+zgm7aWX2RTs7Yxl+S2Mp1ACpHwPm5ChYyD2gPw06tynQPjpkeF+WWjn WCKJ5laG4EVJG9NgNXplUQ0iQpmuAyPcvu2tM+zZKt0DU+/3J5UO8nGaYjZpLR0mQjFiU9 2pyxqpox2Px/xmQ88ZLRZwveUFjdrV5RqHLehtGabtyAoDgK54QW5Kf0zQklLLO1W8zaV0 r0Aozv/1mr+e7MCvqiHhJsob5Ve3lYe/85TWDPC1tVXUW8Mvpi8TGZ5S4T+J+PgqO+ATvV JYFsMPzP8G2gewfb6jg6hZPTRVQjB6MiRA29/ZrST6AY50QsaO0hIB3HwwkXaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892110; a=rsa-sha256; cv=none; b=FD6l08C443sYuF+ZbR0LY+BXPYXeanAhKER0kYpAONaMPYhp17JOTeCJeDNVn1MTzy2+7s j87Kt/7NeiHiPP//BeMjc6+BFIEHBaLVwL4rwnBJ+IQ8mNRkE8vPhibBzKMeXJhhg8/TrR tqezumS/NH2k0VSVDW7tTnbW726TEakCge2leE1POlZ7nfBONI7IdjUR6JhphZyy99e+DD xT3nTL+WiugrwdqNI1S9icotNxUmU6hknp87dOEHycVz72mmglwsA80fNzDNBn2GyvHNI5 306n0PI3VFKxj2IMqP3rK4F+7f90C2UKRhVEtKrwBEHw4NMIOLGs5VbddOdrjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P3/voeYXI5Y1tyNxJmZdZkATboR1NuynslFqciTlySo=; b=O/cHtuqHDm/G6KJgoN9vBxdcghRGuWP+nLD0u2zSEnsk+oIPeS4QynsLH7rhAfL1PA27Sx Ba6IVbCS7txrSiZKJk6kYFnCDDtOTkrGTCSSXgWoKJzrv9azZa410NgAz2AF4T7zXDzz5h DjCzSt9Rc+p4bw3pr/r4nBOJnAX/8Lv9oLecIrs1PrfBb8mDyVsSvf2mpjJkOAij3FMDGx bxGXlYiCOxiqs4olkZl5dTZ9NIuLgBC6tyuTrjccnzRgMdVTufGJpWEnIvTIpUugajQe7k fgTCGXUYUWjsTzSmgV8TRDiH7cNsJrHZmE68hhPyl8usgYOp/WIiohdfyDsuFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bf6100XznjJ for ; Wed, 22 Apr 2026 21:08:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30a19 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: c024e02fd3ea - stable/15 - linuxkpi: Add mising functions in List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c024e02fd3ea623bc1d49b07b33f75f40facbb79 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:30 +0000 Message-Id: <69e938ce.30a19.77ef31e4@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c024e02fd3ea623bc1d49b07b33f75f40facbb79 commit c024e02fd3ea623bc1d49b07b33f75f40facbb79 Author: Jean-Sébastien Pédron AuthorDate: 2026-03-02 23:50:55 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:00 +0000 linuxkpi: Add mising functions in The DRM generic code started to use `kmsg_dump_get_buffer()` and `kmsg_dump_rewind()` in Linux 6.11. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55732 (cherry picked from commit f2ad06a0801aaa987a40b8374b6baa8f510cb77a) --- .../linuxkpi/common/include/linux/kmsg_dump.h | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/kmsg_dump.h b/sys/compat/linuxkpi/common/include/linux/kmsg_dump.h index 25f96b304f59..539981c54d1b 100644 --- a/sys/compat/linuxkpi/common/include/linux/kmsg_dump.h +++ b/sys/compat/linuxkpi/common/include/linux/kmsg_dump.h @@ -25,6 +25,11 @@ enum kmsg_dump_reason { KMSG_DUMP_MAX }; +struct kmsg_dump_iter { + uint64_t cur_seq; + uint64_t next_seq; +}; + struct kmsg_dumper { struct list_head list; void (*dump)(struct kmsg_dumper *dumper, enum kmsg_dump_reason reason); @@ -32,6 +37,36 @@ struct kmsg_dumper { bool registered; }; +static inline void +kmsg_dump(enum kmsg_dump_reason reason) +{ + pr_debug("TODO"); +} + +static inline bool +kmsg_dump_get_line(struct kmsg_dump_iter *iter, bool syslog, + const char *line, size_t size, size_t *len) +{ + pr_debug("TODO"); + + return (false); +} + +static inline bool +kmsg_dump_get_buffer(struct kmsg_dump_iter *iter, bool syslog, + char *buf, size_t size, size_t *len) +{ + pr_debug("TODO"); + + return (false); +} + +static inline void +kmsg_dump_rewind(struct kmsg_dump_iter *iter) +{ + pr_debug("TODO"); +} + static inline int kmsg_dump_register(struct kmsg_dumper *dumper) { @@ -48,4 +83,11 @@ kmsg_dump_unregister(struct kmsg_dumper *dumper) return (-EINVAL); } +static inline const char * +kmsg_dump_reason_str(enum kmsg_dump_reason reason) +{ + pr_debug("TODO"); + + return ("Unknown"); +} #endif From nobody Wed Apr 22 21:08:31 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bf75mkCz6bKvh for ; Wed, 22 Apr 2026 21:08:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bf73Mphz3kx9 for ; Wed, 22 Apr 2026 21:08:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=scWbAFKSXW3TW188hEMY9Xad32zbgs+yzX9+mz8JQnQ=; b=d2Mkij68hvvITywwj5Fo25mD7CP06pGuy2WONhvD20qTOmm6jDvZdirVTbF1ATrpRn9YM0 7Q3XLK2eXTAP8ARywbu2vmN/JPe+zEeHv1KfYJCou3GW8VaFsj7j76lqMDKLdgD8NxlS2K HnZgHmh3Qc3Z20CsOyO8/BKlWd5a5YfEZunyz+WhHx1dBcBgZVbKeV0NMR2aIxwCyTAkD9 VSdugAPf2VS8gWlsNM6lSuxyCyIAhp9DmUIijIVLKs4Oif6bXRLblBMRbp1t9YuXkRdZAo MRxLFJNG+658+Yc49b3JkqmYdQzQBXVNqXZkzLAE9naWPG2+Rs5nSC3TaJTAEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892111; a=rsa-sha256; cv=none; b=r1Kholvc5pJh4fFpJ0k39vyC4TQKoX11okIFqrID2YCCnDlOSkQyTeXvPBcVYVRyE+EtO1 q+SmDzkc329e8jdHNi+B6GRx/to89S/N/pecrIPqs+sJawWcq5SmVXMpQRIDty+4OBuuwH nhDZ64usUWdSJkYwH/g6IUSYbmRtJ8QxBZyDBvRSKcQ8mwgZXowbmJMeYjTElo/CuHAtz8 K7cAABarm5d1zF1OyYsOmCoBkqDsRK2qXiazrnE2f4aMPM+dno5iCe1QOqT/z5ULt6ZFLj qY12kalp0KNFbI5AzGiHcP4+phWaJjjbvMBPEQLHf63YMPqwHaSZcwyb7NUrXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=scWbAFKSXW3TW188hEMY9Xad32zbgs+yzX9+mz8JQnQ=; b=vfybAQXOAbLYgGODa1Lmu8PczJchR1l/qfMD/kGWDEPD7tkO0zFMvW0gi9MnxdOWp5Vni0 iI1fj1SgTfxU/JF0LAK7WBWh9a++CQ5yLIfPMjHJOsK8Ey44NxUWhWYqBagLc7r487kUIk FE+J9t6jwqd+BKqG05J/s9FAIT4f6qHC3ic8ZS791W/cCo9dayjNMWGEFwGNUhBiWcfGHV UrbqT5/i+STG7K9aO7zPi+VcjPdbCLcwMNSazN6ZEA1Ft1SvApvWgvvsgmTXvW0QGFasfW SJxxv0/8HvzuAJotCl4oZqi3GXtZAQBGyWlOcBBLn29Pv63T6RIPYGRHuJxccg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bf71rNgznfy for ; Wed, 22 Apr 2026 21:08:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30508 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: 5bc46055983d - stable/15 - linuxkpi: Define `CONFIG_PGTABLE_LEVELS` List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5bc46055983ddf24570b3fdd2a66e6a50947e990 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:31 +0000 Message-Id: <69e938cf.30508.73523efd@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=5bc46055983ddf24570b3fdd2a66e6a50947e990 commit 5bc46055983ddf24570b3fdd2a66e6a50947e990 Author: Jean-Sébastien Pédron AuthorDate: 2026-03-04 20:34:37 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:01 +0000 linuxkpi: Define `CONFIG_PGTABLE_LEVELS` This is a kernel configuration constant that is expected to be defined. The DRM generic code started to use it in Linux 6.11. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55733 (cherry picked from commit 7bf93680807e518853262f3f961f88eb8ec03c83) --- sys/compat/linuxkpi/common/include/linux/kconfig.h | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/kconfig.h b/sys/compat/linuxkpi/common/include/linux/kconfig.h index c1d186b56e1f..529d41991900 100644 --- a/sys/compat/linuxkpi/common/include/linux/kconfig.h +++ b/sys/compat/linuxkpi/common/include/linux/kconfig.h @@ -73,4 +73,39 @@ #define IS_REACHABLE(_x) (IS_BUILTIN(_x) || \ (IS_MODULE(_x) && IS_BUILTIN(MODULE))) +/* + * On Linux, the CONFIG_PGTABLE_LEVELS value is defined by the config/build + * system. Here, we take the per-architecture default value defined in + * `arch/$ARCH/Kconfig` files upstream. + */ +#if defined(__amd64__) + +#define CONFIG_PGTABLE_LEVELS 4 + +#elif defined(__aarch64__) + +#define CONFIG_PGTABLE_LEVELS 4 + +#elif defined(__i386__) + +#define CONFIG_PGTABLE_LEVELS 2 + +#elif defined(__powerpc__) + +#if defined(__powerpc64__) +#define CONFIG_PGTABLE_LEVELS 4 +#else +#define CONFIG_PGTABLE_LEVELS 2 +#endif + +#elif defined(__riscv) + +#if defined(__riscv_xlen) && __riscv_xlen == 64 +#define CONFIG_PGTABLE_LEVELS 5 +#else +#define CONFIG_PGTABLE_LEVELS 2 +#endif + +#endif + #endif /* _LINUXKPI_LINUX_KCONFIG_H_ */ From nobody Wed Apr 22 21:08:32 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bf854hVz6bKsN for ; Wed, 22 Apr 2026 21:08:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bf82hwTz3krd for ; Wed, 22 Apr 2026 21:08:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892112; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w93FwK/uqR2GprNJX15F9Q7f+TNh+AwoLJeTRJMEclU=; b=jRoj2SP3BNE1McL1A/MWvmO1PGIkqkuWsyvSHg9NnBqV9juCKdCANY/euE1W1QxTQ7HUv6 KJTmIo42V6XErwO1+dVVN85PX0O8ldzfVIkPmthRyHRJgJtysHdAf4SC97IEq90u9PgJCD +KLi8TU+UYciWsCBDJHE3IkR7KlToSrIXjyzOGY5n4E4qRtnVILPuQM5Y6IPG4oGBti2OF FrnakzwIdQOtUjnIfPMq8D/lYWz207Zi8YLs41HhpzsWdPNw6rRMJI2p4EPLBHjTHut3n/ UaPrwdgWhkmMFnpNe5BunQBloucjQEsqLGJmYyA8vfsENhbnDTB9Ivi6coFohA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892112; a=rsa-sha256; cv=none; b=jZon4PhxeFl7Y6CHv39frW3+v+7flYUYW/hfKGZz0qgjCBs3swhf8FkO+251ul0ZbEU6xz 9xhrFbNEKA53+qjJgekRYRLiB2tOf9l56nBeroIu9cJrAhHGKbL5bZfI3J+zApOyZyx5OM O6+wqpghCIV45pdp9kM4J/3ethfINUkVCLHgahN+Ble720kLoDFFSEhQTYQgTs2v+bFNgg ZtSMrc0EkqwOEkCG1NgTcEXRGUcAll9PqBK8OB4dLpgu1Bqc9tG9rmqXso/DS5TlVRlJh4 /xaMm3jFDeYy/C0uJYnsmyDMTkXFSEnRqcLrZeSVgS38uRXG9eg34q8t5JHLNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892112; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w93FwK/uqR2GprNJX15F9Q7f+TNh+AwoLJeTRJMEclU=; b=PBkf0Lx+Y/YCAc8T8SX+PjcjdINoqYwBr8kVJ3yKUmuR+NvwhhYistfxARE90cVLTPZDHa zqUlVDpKfuu5IS0QswIAUlhfjSs7UHfDLiSn/r99kM5PyP0q4o8J8KZFBKbyvPkp24QMdu VoGCz98/NltG3p+1f8h/du/lKnQOcfce/rOkksJ8PbXr70IKM2NHV/XOHQPnmcvxYkAyi3 z/BxZOdvjzfEBAyRNb2n64UCpjebuFtiFXGhPecbzLHKPYb52UNn6Qn51lJw3x9YYR36Jc grW32yXgpC/LqYzyMt7RCrJhqTJoIGm1xkQHMzcFogEIC+bi+sMSFoWrVmvOHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bf82DRDznZc for ; Wed, 22 Apr 2026 21:08:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26dcf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: 16c33bddb6f7 - stable/15 - linuxkpi: Define `PMD_SHIFT` List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 16c33bddb6f7a7238e033fc09a3f2403ba113df5 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:32 +0000 Message-Id: <69e938d0.26dcf.7935f352@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=16c33bddb6f7a7238e033fc09a3f2403ba113df5 commit 16c33bddb6f7a7238e033fc09a3f2403ba113df5 Author: Jean-Sébastien Pédron AuthorDate: 2026-03-04 20:36:20 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:01 +0000 linuxkpi: Define `PMD_SHIFT` For now, only define it for x86 architectures. The DRM generic code started to use it in Linux 6.11. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55734 (cherry picked from commit be92ad6b12a5046cecf25477e7a3e88f70e5daee) --- sys/compat/linuxkpi/common/include/asm/pgtable.h | 34 ++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/asm/pgtable.h b/sys/compat/linuxkpi/common/include/asm/pgtable.h index 865662d587db..166d6142d51c 100644 --- a/sys/compat/linuxkpi/common/include/asm/pgtable.h +++ b/sys/compat/linuxkpi/common/include/asm/pgtable.h @@ -53,6 +53,40 @@ typedef struct page *pgtable_t; #define _PAGE_PWT (((pteval_t) 1) << _PAGE_BIT_PWT) #define _PAGE_PCD (((pteval_t) 1) << _PAGE_BIT_PCD) #define _PAGE_PAT (((pteval_t) 1) << _PAGE_BIT_PAT) + +/* + * On Linux, the value of `PMD_SHIFT` is hard-coded to 21. This corresponds to + * the FreeBSD `PDRSHIFT` constant. + */ +#define PMD_SHIFT PDRSHIFT + +#elif defined(__aarch64__) + +/* + * On Linux, the value of `PMD_SHIFT` is computed from `CONFIG_PGTABLE_LEVELS`. + * The result corresponds to one of the FreeBSD `L*_SHIFT` constants. Here, we + * take the value 21 computed from `CONFIG_PGTABLE_LEVELS = 4`, the default on + * aarch64, which equals to `L2_SHIFT`. + */ +#define PMD_SHIFT L2_SHIFT + +#elif defined(__powerpc__) + +/* + * On Linux, the value of `PMD_SHIFT` is the addition of `PAGE_SHIFT` and + * `PTE_INDEX_SIZE` (hard-coded to 9). The result corresponds to the FreeBSD + * `L3_PAGE_SIZE_SHIFT` constant. + */ +#define PMD_SHIFT L3_PAGE_SIZE_SHIFT + +#elif defined(__riscv) + +/* + * On Linux, the value of `PMD_SHIFT` is hard-coded to 21. This corresponds to + * the FreeBSD `L2_SHIFT` constant. + */ +#define PMD_SHIFT L2_SHIFT + #endif #endif /* _LINUXKPI_ASM_PGTABLE_H_ */ From nobody Wed Apr 22 21:08:35 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfD1jRZz6bKmM for ; Wed, 22 Apr 2026 21:08:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1BfC6fLjz3l84 for ; Wed, 22 Apr 2026 21: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=1776892116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rk5jPNHAG2rYFyt/TpBxqkH3ixQ+Loxi46W282niK7k=; b=sqL/i2mCcyAbl3SRR6jdKP8eI/qz3eRo44PM3coqWIrcxmTTMfnM7af8g3+CT+qgc2P6eE S9iyQfHda/eoj7ZDr8wm92yCXSArCxpjnLxlylowBNUweFlGySu0FtEBI8mPGxkHxs2udl jkYtdWLfR2m0bxcXCUbTLgg8DZVV8bc5t5N+j1e1EA1MK+UsetlVRhaojCzygX50vtPWH0 PHxInMyg5YXJnaM/mrxKV/0YhxJ7U+TyLrEh4u6KZZNGvArQkdn/BAqSxjtWY6+9kVqnVJ OIRvWJbuvkif6XYqupKwycc2R/2lsNtmWOWhcn7bWtB4ZLCt+l1qS4wz/nqMqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892116; a=rsa-sha256; cv=none; b=SQoBF1BRCB2R2fC6IBeJ8A3UTr8xMwRVxnhwSCIpbGkBG9q+4kOi65BQ0qrfrX+FosGBiT OJEY39RDnMR66MXsNzaL7Ug6zH+fL38RALW+m4Xu25XHd1surITLrDRH0kHAs7VrCA3mzI n/Bk2SKTfQ3OOAPfSX2sRw20axP1S3Y6rzp4lEmyC15JeQnHhSi0KgGN63ar/qbuQM/8E2 ERlGjL15eNFqQMvLsbSaSRp4LBwqqNvJQ6LPSR4PFMSe8CDcMvIgStT3SN/EiH02k8HuK7 4NLlKexZytSnS0HW8+vj+5qCuYOrcDTe1e4YNX02xscnYWX402DsRtvO/5EfUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rk5jPNHAG2rYFyt/TpBxqkH3ixQ+Loxi46W282niK7k=; b=YvGxd95UjZA7b7ktGtTFPdMln999fvD71r5GcQ4fICEEsWwKUohLzCxpkc1YRM0zQc2OaW +sr9iK0rm9o4pyQjANhFzWs+4aNVMMBwzICg1mpVLGGGy2LS+opxbH8+tiffXjVwmEDdjI bI8w1UPIGMLplMDSAZc04b2gLzjmQleDpzfjQEXwmqnaQB285ra8chodMHsBhR4n29QC7w KfKVUGMCqj/xv9utDynmZxpa+YjAsUhT/PhIIoAl9NtBI4fyOxVlqUOBH77U36QyBCXuLx VJIcvf/DlZ0Wh+gtRq1y7iDW4+vLjxRNK40zkM9Jj0/fGJm3SRmwDMVS1zw7SA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfC4p1NznjM for ; Wed, 22 Apr 2026 21:08:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27673 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: 80e54c8949c3 - stable/15 - linuxkpi: Add field `flags` to `struct resource` List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 80e54c8949c357ad6eb805bc215c03d40e8aeed1 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:35 +0000 Message-Id: <69e938d3.27673.23f1ab9a@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=80e54c8949c357ad6eb805bc215c03d40e8aeed1 commit 80e54c8949c357ad6eb805bc215c03d40e8aeed1 Author: Jean-Sébastien Pédron AuthorDate: 2026-03-08 09:44:12 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:02 +0000 linuxkpi: Add field `flags` to `struct resource` This in the Linux version of `struct resource`, not the FreeBSD native structure. The amdgpu DRM driver started to use it in Linux 6.11. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55737 (cherry picked from commit ddf89d899b8d2d0e26c1a22c92f3ac1eddeac9f6) --- sys/compat/linuxkpi/common/include/linux/ioport.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/ioport.h b/sys/compat/linuxkpi/common/include/linux/ioport.h index 763af2de7c4f..68f28cec4ec4 100644 --- a/sys/compat/linuxkpi/common/include/linux/ioport.h +++ b/sys/compat/linuxkpi/common/include/linux/ioport.h @@ -41,6 +41,7 @@ struct resource { resource_size_t start; resource_size_t end; const char *name; + unsigned long flags; }; static inline resource_size_t From nobody Wed Apr 22 21:08:34 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfC4pNHz6bKmL for ; Wed, 22 Apr 2026 21: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1BfB4NjRz3lFp for ; Wed, 22 Apr 2026 21:08:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=moWyKbgRLIYhs9NJnvNyIgoOfa7KSDo3rG+04uZ3WOQ=; b=Yp1XMNuP+jiFqSJ92HA+gbxyOhYB0KCpfrGw5hGZsDq+LOd0SXZJb8Hdyg2qSVqQcZmqbE Aj5vbAAQNJ5L1Vn2avUi2nDQT/V8LOMH0UFCNzjsVd49OTlKouOmYbJLNhsrxsXMjGOZ1z sJL7DN32vzRgdnFc8JlyIHQQJsKBF36FFBO1HlNUZ/J/HZbWunYT1DCgeut1iLESWs7sUP OV1kPDNL/oy4DjXZtvsc8y0067fej4nOB7V4Nm0CNAzOF7F9dlHpczf5ZJJ8HEcFo9gHYf otlLgInm9qPgIgouLkRMJtGYHzdsH93y0CIe/AfASVSnrTqnUpw6LMuUX0tpeA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892114; a=rsa-sha256; cv=none; b=yRJ5LDbicuZmkTvyIyO675U4Nq7Y3wfo6uS8/ad+RWZF8ZfPO5Me/G0FzNpPRkj+272EbP iSnwKgCGWIsNEClMlDARXap+vqRMmEzwwn6WhB6ggnPEorNahOVtcOZg/YQPF5o9feVFzZ MBYoltgJ88kfvZIeW7WSWc8nU41JWOt3A9oaKldgDDcEu/PwlkDz11Snb5kv/mmoVjgCsl 42CR3RTPJvLqwjnzh57GacP5WJxrVHhNHsegyesWgOsGB8c0RCj0XQeuLKeDtwRb5IcwPD /BzIbVCJXM2zVVPrnLXiDinLW1r3Ug3U68CqC3ZbqZ+D7UKqIp+AfRvz12q5Cw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=moWyKbgRLIYhs9NJnvNyIgoOfa7KSDo3rG+04uZ3WOQ=; b=OAQ6krHzVYN6gCegjC/P8lf+Io7wJcw2u+u8qrG+YT2y+2hZKFnV+jol2Yhxoa8LwnEISB CEexLSm0eRsmtj547+clNd6NDxkoZEGiNKpqw6kpDXKfjBFgfzFZ0Vo37OmseeJUUBX7/C 9jhrkis60fjUIYIYA3mYoPGSy1pyjN8Z2p4pk5gQz0i7a4oYy+IMgIxKljDZ9mjs7P+hqJ 2dYQdeC+2Dxwjw+LBMlT85Bni+kqHd9ksuusxxkCtILknOgYRRDdEenr/cZB7vpskFQeXf LxjfqxrM2TO+CULIWuJcRa17ILhp9mD5RBDyraGx9eFiM9WTJlFBN7rG77XRxg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfB3wLNznjL for ; Wed, 22 Apr 2026 21:08:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 303b8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: f22e9fb4b895 - stable/15 - linuxkpi: Add List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f22e9fb4b895f1fe1334d695f256b1b64b1a2191 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:34 +0000 Message-Id: <69e938d2.303b8.3538efc3@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f22e9fb4b895f1fe1334d695f256b1b64b1a2191 commit f22e9fb4b895f1fe1334d695f256b1b64b1a2191 Author: Jean-Sébastien Pédron AuthorDate: 2026-03-08 09:40:38 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:02 +0000 linuxkpi: Add To be exact, there was a dummy file with no content before. This commit defines `struct mfd_cell` and adds two function stubs. The function stubs are not implemented but still return success. They log a message to indicate they need to be implemented. Also, unlike Linux, includes . This works around the fact that we can't include from , due to a conflict with the FreeBSD-native `struct resource`. The amdgpu DRM driver started to use it in Linux 6.11. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55736 (cherry picked from commit 356d6f47d3b54b34aaba9e60aa551f3d615d0e2f) --- .../linuxkpi/common/include/linux/mfd/core.h | 49 ++++++++++++++++++++++ sys/compat/linuxkpi/dummy/include/linux/mfd/core.h | 0 2 files changed, 49 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/mfd/core.h b/sys/compat/linuxkpi/common/include/linux/mfd/core.h new file mode 100644 index 000000000000..1a69a3803b5d --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/mfd/core.h @@ -0,0 +1,49 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2026 The FreeBSD Foundation + */ + +#ifndef _LINUXKPI_LINUX_MFD_CORE_H_ +#define _LINUXKPI_LINUX_MFD_CORE_H_ + +#include + +/* + * is not included by Linux, but we need it here to get the + * definition of `struct resource`. + * + * At least the amdgpu DRM driver (amdgpu_isp.c at the time of this writing) + * needs the structure without including this header: it relies on an implicit + * include of from , which we can't have due to + * conflict with the FreeBSD native `struct resource`. + */ +#include + +#include /* pr_debug */ + +struct resource; +struct mfd_cell { + const char *name; + void *platform_data; + size_t pdata_size; + int num_resources; + const struct resource *resources; +}; + +static inline int +mfd_add_hotplug_devices(struct device *parent, + const struct mfd_cell *cells, int n_devs) +{ + pr_debug("%s: TODO\n", __func__); + + return (0); +} + +static inline void +mfd_remove_devices(struct device *parent) +{ + pr_debug("%s: TODO\n", __func__); +} + +#endif /* _LINUXKPI_LINUX_MFD_CORE_H_ */ diff --git a/sys/compat/linuxkpi/dummy/include/linux/mfd/core.h b/sys/compat/linuxkpi/dummy/include/linux/mfd/core.h deleted file mode 100644 index e69de29bb2d1..000000000000 From nobody Wed Apr 22 21:08:36 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfF1NWXz6bKsf for ; Wed, 22 Apr 2026 21:08:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1BfD68zTz3lCw for ; Wed, 22 Apr 2026 21:08:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oqqZXpk8o09lNgbnlg/vdKa3jYX2W/5BsCVxCgWHnUM=; b=TeZV4e46qLOOHd/7SO2uxNstWfTftxtlE/Pzg0YKONjk/nc+HVnn9hvlf1n89qkoa5jO4t bSREJ+kJbz6aKVt4+zACL0UAo5LTQlOOAfYpsG3W7vu58rowQCtMKtKa/ZAgJFmRmUItDf KYhPQPXDLuza4Oao6NjZlLAZXE7b4tvHveVPVdkp+VJyHDDVOsJYmhAqgzKCLZXSJNH6bm 6YNMYrKE57e9nhvZoFXWseeD1gyWHh8b9JTl48osDT7WldiOqdC+oee/na1PSR1kxzMp/V Ln3eQiKwQy0vbPn0D4sMkVrpRnVd2yulMNGbAQL/msqcSKWHgI/0xY44NMfaEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892116; a=rsa-sha256; cv=none; b=nA3+BaoZnzA+cX2JoKQ8EjnF+OgS+vazPCRE41u1a2TnkYSc5A1jhoob2R5Ek2Ds3+mAU5 Jlk3mqiob4/YADIalNr9FSzmiwagjqm5BzPcb802dWzIqVoWoCjPVEAwAAAfNbg7/sWIkb MsNOB1QUh1lR31mfQKzl9J0Iy4D+7tLtlyRdDSVxruPciM1qF1gt0JwPO8rLX58Lh6FPKc TSbqOwloZmQ8CT5FfHLXDvbNxkJ/3t8FsxOM7v5PpDYMSAGeQ4BYaUjoDGUZOITSVbiDus iVezKQZeghEAtNSOa0CW6y2PKzZPpRVEiCwn+9fyZOm6N4oi2SFeXU4brrdfFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oqqZXpk8o09lNgbnlg/vdKa3jYX2W/5BsCVxCgWHnUM=; b=Es7++I93h60zneQZWvdTiwXuF1dM+9GT3eDe1DQ4V0LsEu5x06jI04Uv5p5dmRIHaDe/GN cQe+D/tnxbsqpK05X0X5sPJ5Bj6mootPnmIY2pwy8EWbcRmDdlcO9/usSYQB7xo/xwhZ0Y RuJbgy/oZxDMkLChTsL+Ycf+hBD3boKrzMOAcqFJW/8V1OFydSR8Isju0Cplkizt9ACZl2 JDy2Y9rizuxkKUWAspFUxiLlJrgQvVqhB7NTKRGI6SoGjoe8nYV2kbY76f0LgVs/UWYoaw 8baCNoFvG95LpEO8ZBdT/82dxCml6vaq9Qfvl2ol2Iv9GL/Fyw9yTiA8etbrvQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfD5MNSznjN for ; Wed, 22 Apr 2026 21:08:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25ef9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: cdb22409d509 - stable/15 - linuxkpi: Document why can't include List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: cdb22409d509cb5f50edc6b8d2b2b8dd1fee1154 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:36 +0000 Message-Id: <69e938d4.25ef9.50aa939f@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=cdb22409d509cb5f50edc6b8d2b2b8dd1fee1154 commit cdb22409d509cb5f50edc6b8d2b2b8dd1fee1154 Author: Jean-Sébastien Pédron AuthorDate: 2026-03-08 09:45:48 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:02 +0000 linuxkpi: Document why can't include Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55738 (cherry picked from commit 91e54839545f6cb91bb1a5f768ddd6c1e2420b48) --- sys/compat/linuxkpi/common/include/linux/pci.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index ccbd425de5da..ba68a9ee0dc3 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -60,6 +60,17 @@ #include #include +/* + * should be included here, like Linux, but we can't have that + * because Linux `struct resource` definition would conflict with FreeBSD + * native definition. + * + * At least the amdgpu DRM driver (amdgpu_isp.c at the time of this writing) + * relies on this indirect include to get the definition of Linux `struct + * resource`. As a workaround, we include from + * . + */ + #include /* pr_debug */ struct pci_device_id { From nobody Wed Apr 22 21:08:33 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfG61rfz6bL3Z for ; Wed, 22 Apr 2026 21:08:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1BfG4JVHz3lBF for ; Wed, 22 Apr 2026 21:08:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yIsnd/rTg/i7C+5nf3iHQriGpQBS/lF63vvNG3CLlYg=; b=kwnutxvzJy1YNnGSWIzX+vOhCSn82jFizWVR/lZJnCV/9aPsDh4VuF446jNhQIXfeqa3M3 5bSyzziUkZI8Bop8TePxcr+TKpJFYxUOGp5bUxBmj4z7RdXeer8H9nEgY8CnbdpEK3GKzr XEbiUHkbi8gaIMOSkAu3AVWP0Xrq+tGweLvNeLunTpeTLkTqb+Xl0x3rip+8b+ur/zVcri P2NO6DxWmbGdguDkmuMz5ghASH38j1MZVfZpOZ5yX+l/yioU5FHAnh/qKsd4aMOHETclGU pHSIA0874/GoDACEWjWFmnsX/63UbsICR/Mdma//axh8M97icIs4kvDKam/nTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892118; a=rsa-sha256; cv=none; b=ueOLa0QiR0bj7avzU9W+DRXo9w3HFs+VHA9doNuE8eQcGFf68uvoBZQFXX8EA1+9rb/pa8 S9QdDF0hhRg8TpXnnhYH4ofj8xaDqyr/7RiyQ9NsgXMUcJdzy24Z7OdpSIBHn2ikdwm3aW eqiikvTYUoBQeBt9qKL4Ycso9Xg3nCnbF1h7Vvj3N+2Il9P+ysUOKXPJd2Ku8oa/AdiAf/ j4/i7JS2jZvL3QqX/mJ9ARrABz82KTp0sbsIpzLsWAneEfYACg+m/R1IccTf0uHibv1sdS iiImrLlb3CKWyE0UGQeFFtyAuOSWP5r0zJkpOiaDDvCGCVOECcBKEQIPhACpLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yIsnd/rTg/i7C+5nf3iHQriGpQBS/lF63vvNG3CLlYg=; b=DpxcSSCpTIwT9QyKAhW1Qdo3dKxk2zntniMNBjHp+SdUs8nCEXuG25YHNuu2wT0gVjAL3S gexmmAc3fez7Kf/tV/d8MpeN0wNG/1fVN1DWLlgUGL+h4Lxh7PvO+W7Jba36whhDzyse44 7+oQu2vY8ygmoOdMZJMwEgp/CF9/6VVJ+kYQ8RpLHr04usqmeSEGP53IYFWAIqasNT8mm2 cIa7Avfl9VuBJdqf+hrHr1pub+CKVCPd0yhiMiGcOPnEF0kJ479IFqn/E6n5EjYZr9Ybeu Pzv/tmhBy5TkIOzDZytDEmMHAaROHPHJnI6cs8JppOu9yEvqo1IU8sMoRwi6Ig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfG3sR0znjQ for ; Wed, 22 Apr 2026 21:08:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27cae by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: 7e911385115f - stable/15 - linuxkpi: Add List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7e911385115f55ed7697f56dc267fab6e35baed7 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:33 +0000 Message-Id: <69e938d1.27cae.63600c93@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7e911385115f55ed7697f56dc267fab6e35baed7 commit 7e911385115f55ed7697f56dc267fab6e35baed7 Author: Jean-Sébastien Pédron AuthorDate: 2026-03-04 20:49:50 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:01 +0000 linuxkpi: Add It only defines the `struct linux_logo` structure for now. It does not define any actual logo. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55735 (cherry picked from commit ca6ea6df1f9241346d043a2091484ac9ced6580e) --- sys/compat/linuxkpi/common/include/linux/linux_logo.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/linux_logo.h b/sys/compat/linuxkpi/common/include/linux/linux_logo.h new file mode 100644 index 000000000000..cb60ba50f6a5 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/linux_logo.h @@ -0,0 +1,19 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2026 The FreeBSD Foundation + */ + +#ifndef _LINUXKPI_LINUX_LINUX_LOGO_H_ +#define _LINUXKPI_LINUX_LINUX_LOGO_H_ + +struct linux_logo { + int type; + unsigned int width; + unsigned int height; + unsigned int clutsize; + const unsigned char *clut; + const unsigned char *data; +}; + +#endif /* _LINUXKPI_LINUX_LINUX_LOGO_H_ */ From nobody Wed Apr 22 21:08:37 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfG169Fz6bKyB for ; Wed, 22 Apr 2026 21:08:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1BfF6lc3z3lJZ for ; Wed, 22 Apr 2026 21:08:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sCDdxPOelnHxXKN3Ngj/XYqGHwYwViPQXiCcj5+ua18=; b=dB5nXx2wJmxY7ECPHLNI531hzKH9uKkL7v3vEY2Ddn71+hJXoJgxmQOKhueIemnumpSsfg YIw6JaJaiU2loBh78OZr2ToM7Quord6blrfCYCLFqXMW0daBNMJQ2FzYCSDqQ9Tdbi7ffN Nki0yjF+/eSp5fDGFX1B5/AkTtcp9MxZUIj7nyZYah2fXhTCd9lyBqVj+HsNPQC4xqV9+b OUoPK1kgVyUHXGj42pNbpCMljCiuRGfvSoPO2MQuPj7pHDRR7Ur64UUKhN1yRh8gFjpo4y Ux3mWz5TYX6mQDWEfFpUuD5UdPqFFHZ6sTWS9x9xqW/7O24pqeHpjDt4RJv4Lw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892118; a=rsa-sha256; cv=none; b=ZXLVZbWKMp8Bu6263d5viYUmmXwB/r8dLKOK3hJNEUE6I5AdWI25e9cKmJtGl5h1d/Ax7A OLVQvOF6yxs8Qq/hpMNcgRY1Zpl1uxVSsuDhXP7D0AXnFRffI42qEammgVO25vuw0Aen9J EaXsDgMkd/tN1IlzikUjm4ouAdMuHeIeyAOY0Z/F0BalbMvC2OhpfbZIBQ4nn8xEW6+FJw 82IRfVkt++Nw2S3ThIDE116vX2zAZmgJh8lBjdyFodnxb5HWnFeYikfxqEyvp2zGjc+mpH iYr8w3JnFT1m1DdM19nq6RZqO4HbC+6ig+z0H3yb6Jd2bQHUsmFZHfSW1iz8FA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sCDdxPOelnHxXKN3Ngj/XYqGHwYwViPQXiCcj5+ua18=; b=H7Pke5n+ofIF96kIhEcbf44gIAISj05A6c+jNUVrxqA2C2qwECao/f1OOvdGc0wwSiT1G4 cB4tnbsGTAseHNTXoA+n4R6PNyQkGAAtVTJWZQw87O44B0CpATBbCMby/9YZZAOaif/qEN UUGnycteQ5bopjEZuNTHyAnjfd/8qAsniMrq5cApZjdr3Fvcdy4cOi9HFOkygi2SDGGXUE QtH65aNRbjDEbXRM70FlScTE1XXzmO6VVDn/3p9SDF3LLMmreGUeEDMDjAfdXBK2GqaQGx FUIZLPfVCHpr51m4cK5w/bJPWEKsj6Lneu7fh6AD3ROhF+baYTezR/+u064a6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfF6CQczng3 for ; Wed, 22 Apr 2026 21:08:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26ff4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: f47ec00b0406 - stable/15 - linuxkpi: Define `MIN_T()` and `MAX_T()` List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f47ec00b04060a761a358b0e80b7fa552b587f5b Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:37 +0000 Message-Id: <69e938d5.26ff4.1b8f1b48@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f47ec00b04060a761a358b0e80b7fa552b587f5b commit f47ec00b04060a761a358b0e80b7fa552b587f5b Author: Jean-Sébastien Pédron AuthorDate: 2026-03-08 11:18:22 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:03 +0000 linuxkpi: Define `MIN_T()` and `MAX_T()` There are the same as `MIN()` and `MAX()` except that they take a type to cast both arguments to compare. The DRM generic code started to use it in Linux 6.11. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55739 (cherry picked from commit ece26db020db3a21b1a4c6b608f77a9ed5be5924) --- sys/compat/linuxkpi/common/include/linux/minmax.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/minmax.h b/sys/compat/linuxkpi/common/include/linux/minmax.h index fb8eb6f704b4..5040d7f9141e 100644 --- a/sys/compat/linuxkpi/common/include/linux/minmax.h +++ b/sys/compat/linuxkpi/common/include/linux/minmax.h @@ -60,6 +60,9 @@ type __max2 = (y); \ __max1 > __max2 ? __max1 : __max2; }) +#define MIN_T(type, x, y) MIN((type)(x), (type)(y)) +#define MAX_T(type, x, y) MAX((type)(x), (type)(y)) + #define clamp_t(type, _x, min, max) min_t(type, max_t(type, _x, min), max) #define clamp(x, lo, hi) min(max(x, lo), hi) #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi) From nobody Wed Apr 22 21:08:38 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfH2gSbz6bKq8 for ; Wed, 22 Apr 2026 21:08:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1BfH065Dz3lPQ for ; Wed, 22 Apr 2026 21:08:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZQdEHKh9Khwz4QksLcZb+IoPpJ1ew8Cph1YCluPdam0=; b=O9wGGBDRPOBGxAVJOjlXlK85sLYpAA08x5Z3ujD4EWt7l+CLPRqu7yHoHGVZ7Hxo3OLXof BaIptymlCA80jqe+Vhpm1WWdiQkxhTQ6OAOi29BsxAPVCsKUScDV+GtiINutYrp/fyNY90 bW8VldnTjpK+nfaQAAO/BPOvEfIgHVrqYjwHIF81GnPqpA6Qsz3KJNPyS35/9j44CdSm2b QnhxXUdyYvBVhiq8iV+bxn6Zdi/rlyKhB7NjG7pVEYVQePZdTyRF+Bvff04U8XN9XAx+G4 lcdMwIpDF+ypnJxHMm5jQUMPsmbhYmU8ANviOwdNHK/Bkzg40mUw8HmbWZNVmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892119; a=rsa-sha256; cv=none; b=fzjSgaete4ga3t6jP00MJDIsLrKxH9hw3ziUMhZ8605I78ujHnMcJCw2VPVhruTJy1m0ZD oDZr9rT7RSWt/cJbZMDvu85VA1e4mMHZ6OQDP/7e9y7LcijxH1dIkxuSuXt8+MS/Qfw33n IRFPn9Uyt/XDJgoSaA67Y8/09fdZoFNlIGUrktuIumdn45/kQQvE6jvMS3knKFBZNKCzW3 nZTIS4PEiBx4AZHHBpNP5vsqeXMM9ddd75tq+vGRphExUO3HZQhqRK8ipQbbYW0FixXy6o 3kpq0Vs57YwJV74VqafPpD+L6bTVc6dBluGsiOMW5tp7UhmsO8CdilcumEIE1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZQdEHKh9Khwz4QksLcZb+IoPpJ1ew8Cph1YCluPdam0=; b=guxM3cRzO/RnnJrlB5OW7JVEycEE70ZuSzvxvfnYQtcokoOT7AwvT//k0cc7+GgCoYYXNb 8NkmwR1aGSBJOi1fQ6/wTk+LHs4p2SngbRP4z+onLKjqs4AOU/jTrxrdb9gnBIndkVk2K3 UpGfo09eKwE01GLSK/8sM8A0BCBTLtyAxvjY1x3SUI4w6oSXbbpLnHyf2oEGbOJVNN+Z9J PEcMtqeLr470ZXHjT0HirZUoMj1tvYkQNTxmbMCy1je0c+ew8yJ+rkMJ53kGNuOtuU8k3V trxaJ5cj15XZcrws8XHt5vyJ5woNiwOfNE1VtXQVu/3Ci7MwttvbQ+hWLhrOcQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfG6cy4zncd for ; Wed, 22 Apr 2026 21:08:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26dd4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: 24694b55b536 - stable/15 - linuxkpi: Define missing `SZ_*` below 1 kib List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 24694b55b536f3070618392e78a08a68d5055ebe Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:38 +0000 Message-Id: <69e938d6.26dd4.5daa71ac@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=24694b55b536f3070618392e78a08a68d5055ebe commit 24694b55b536f3070618392e78a08a68d5055ebe Author: Jean-Sébastien Pédron AuthorDate: 2026-03-08 11:23:54 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:03 +0000 linuxkpi: Define missing `SZ_*` below 1 kib The amdgpu DRM driver started to use it in Linux 6.11. Reviewed by: bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55740 (cherry picked from commit 5ee604b2446fa0f3fb949b21a587884ad65b5737) --- sys/compat/linuxkpi/common/include/linux/sizes.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/sizes.h b/sys/compat/linuxkpi/common/include/linux/sizes.h index d8a6e75192f6..430ad3ec427d 100644 --- a/sys/compat/linuxkpi/common/include/linux/sizes.h +++ b/sys/compat/linuxkpi/common/include/linux/sizes.h @@ -29,6 +29,17 @@ #ifndef _LINUXKPI_LINUX_SIZES_H_ #define _LINUXKPI_LINUX_SIZES_H_ +#define SZ_1 1 +#define SZ_2 2 +#define SZ_4 4 +#define SZ_8 8 +#define SZ_16 16 +#define SZ_32 32 +#define SZ_64 64 +#define SZ_128 128 +#define SZ_256 256 +#define SZ_512 512 + #define SZ_1K (1024 * 1) #define SZ_2K (1024 * 2) #define SZ_4K (1024 * 4) From nobody Wed Apr 22 21:08:39 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfJ54WJz6bL1T for ; Wed, 22 Apr 2026 21:08:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1BfJ0hlNz3lDJ for ; Wed, 22 Apr 2026 21:08:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892120; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pqxEl5wLqv4mzdWfa+0mxWD6wWGAsJ74y2CD9/2COAc=; b=P3uZXAwzJWWvBvANOIxwJjFMOLxchc4JVArjkbTxiIOEh1U1NFuv5KNP1BIiv2uk9Lp4At XXGYCKmt4nuanuB8zhMuIrOTFQcJQ63R1MFaRn4fIydDY1zz0IgXsOadTcCbYR/cikREMr IjrT2EvI9MWD1hxsKP99WCH0ZB8liKXWokEuGFsYftpFwe39b4tXv2KH7d56gicMSJhwST f1K75cyjUR5ZAv3Ex/PVPS/UH/DgHM4AJ0GvZjlj2flBMsZbyPveMi+ZOyVZrmyuwHmwgJ nluK2fyFnLgYq0toDqbkh11MbU6ZrkUQkee2woq2chQqrpBjpMZ7lMYeyH3WUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892120; a=rsa-sha256; cv=none; b=c/TTKPP6q0GbiH9suGI7WZ5LaVHbFDB0gm2NrQ02f6ao5kEnD+bG2jH81QRjFHzp53f7yF rUIioWBJoMp1TUHsReKecNsV5ykVTXNhfX1BU74ndnzHmLx1u5zL7d6oxmb9XTjzmF4mvC 1mfPuf7IFXRxAFsudy7Ic/VQf8fG0QePSSEFziOFAgLynK+v5pEARYH/JmiKqtRcROvFNr 6K6no+oTnhSOcl7HsH3zZzThdevwAV8YWp89FoIvHB6dLIaSM4f008ADqnw/q9akARUTIy aThCmcQRlXjQ5t4aW94q0USwGMZnF3AuKBsD5q95tXsSSA+TzMksfupWPwVN+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892120; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pqxEl5wLqv4mzdWfa+0mxWD6wWGAsJ74y2CD9/2COAc=; b=NutnZ3Iv9MzHswy5PUb9ZP3K7AcLfHkXchxPwsDJmewwOw5GOUw5Wbf4LCYwgOZRRxw++c XQHP4aAVjdGDEW9AdwyZA9s1WYt0bPBnxO3pTjyDOh9azgWcZrf8iVy7t4D4EoVUtgEvgm IEpXWJVir+I6hLAqRqqhSJwH6b1hcJ8qTwNor3Bx8YTsQnsxloWZJP0ekF+pUnKJoxp+z8 GbuXtzgxiC/kDlDiwrA2bF49Girw/xkarOkcul9NSO6nMghioDcVSvHwF1/NTILw0dEEeu scEzXkuAIs7/Oqnhs+beY4UnELvTKv80FZUWiwozAtbx92xEoThIUPqoVLYR1A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfH72NDznZl for ; Wed, 22 Apr 2026 21:08:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26d38 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: 4e16185757c1 - stable/15 - linuxkpi: Add List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4e16185757c10cf5e505ddb74281c07bea5af918 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:39 +0000 Message-Id: <69e938d7.26d38.5a8add27@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4e16185757c10cf5e505ddb74281c07bea5af918 commit 4e16185757c10cf5e505ddb74281c07bea5af918 Author: Jean-Sébastien Pédron AuthorDate: 2026-03-09 19:04:12 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:03 +0000 linuxkpi: Add This is used by the i915 DRM driver for some time to log more details about a GPU error, but the code was commented out. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56282 (cherry picked from commit 0eaa57625d0fbe9960eabbaaedd522acdf673648) --- sys/compat/linuxkpi/common/include/linux/ascii85.h | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/ascii85.h b/sys/compat/linuxkpi/common/include/linux/ascii85.h new file mode 100644 index 000000000000..06777a130e41 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/ascii85.h @@ -0,0 +1,46 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2026 The FreeBSD Foundation + */ + +#ifndef _LINUXKPI_LINUX_ASCII85_H_ +#define _LINUXKPI_LINUX_ASCII85_H_ + +#include + +#define ASCII85_BUFSZ 6 + +static inline long +ascii85_encode_len(long in_len) +{ + long out_len; + + out_len = howmany(in_len, 4); + + return (out_len); +} + +static inline const char * +ascii85_encode(uint32_t in, char *out) +{ + int i; + + if (in == 0) { + out[0] = 'z'; + out[1] = '\0'; + return (out); + } + + for (i = ASCII85_BUFSZ - 2; i >= 0; i--) { + out[i] = in % 85; + out[i] += 33; + + in /= 85; + } + out[ASCII85_BUFSZ - 1] = '\0'; + + return (out); +} + +#endif /* _LINUXKPI_LINUX_ASCII85_H_ */ From nobody Wed Apr 22 21:08:41 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfK3BHDz6bKvx for ; Wed, 22 Apr 2026 21:08:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1BfK19sLz3lKF for ; Wed, 22 Apr 2026 21:08:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892121; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=46LgQflwtUUxpjiMuzaMvLm9UoD30FyA2Ty+OchL/+w=; b=yM374cB2qjWZCBrfO0rpmmb8cW3EcnMOInFWGquuJNPZad6iw8ydgIoFyouexgSGnJCfyN HCte2l0M74CzfReyuO83P49qNmEQ6PejM6f5qD83fZNtNbNU6bUsCK7opYuCfBz32bd6YJ uQKL7FhJeSc0iyXFajGTpy5dFOlFDCd6IFWZpCQay0vyTDdN/kA3eeKtoZF8cjIVu1bTrs ktgUp/yTm2/ILY0q2cHfF0Cz39OQmPAW83PB6GFN83pvo1NuIfMmNYm+qoLjCxkb/en93z DotgWzTkVA7PYY84CUPK+Lyp9/CAQgf0gmEevgaZx9DCIKLV6XfxNxHq4ZONlg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892121; a=rsa-sha256; cv=none; b=UnI64ritcUyeOtwTbmtoXbEmiW+ItKMoi7c8KZnyvk/e1b2zwk1EuU6W/bbniDMrcDJ3i4 LuIO1CklSi9Mb0uUbOEOfPEJFd1ONWXSdvg3W/OFtIERBg8tu9t1fee8y+3DgolvPacn1W cuUoz27u1wOmxXs1bkCHOTm4qrg+UQRLQKr0uVuyyr3fjH5uYhkcpmhAXVsdyC339nliQG QSVXIRLg3LPl+vFIov032Zl4WNb43ZCWryJoFuBhUxYaVH4go42jytrCzjO2qY869ZDe+t JyyWbu7FE8yOk1/iVUDDSvU1TljFo2ETgryCKXIO7v68iVf7CTSIiGNx3Simsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892121; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=46LgQflwtUUxpjiMuzaMvLm9UoD30FyA2Ty+OchL/+w=; b=ugArSYBHCKnCXu0K+2tmIm0iU9rAkOeOrrFB3p7sedIP1UgONH8A34UWaMIuWkkQUHUbcc +hW+Rt7OJ27+cOwpQJW10J6iCWdrTjjfbT/liRpbm29Gde02t7Ow/lIeZsFX+roYqPmX4u x/WtDugCKgAL2vrPuhBqRCPD7YWP07gXptOW3Ebxg+erjyzHNgdPJirJkrb9kh3rOkmIKR XNO4OZTz7g2eTlqClU5vvwO9CaT/hdETWfGW3cqpAL16IFjFPYxCKupStWV8SI0DSvxxxZ RxOG+D4tMj4CzF9kj1VDxk6Za8d7hqOOovcie6dU6aFG2EVzPz9iIADJIvleCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfK0Kfvznlv for ; Wed, 22 Apr 2026 21:08:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26ff9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 157f09c63784 - stable/15 - LinuxKPI: 802.11: factor out chandef/chanctx initialization List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 157f09c63784628fd0ac727bd9e4645be9bcf8f1 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:41 +0000 Message-Id: <69e938d9.26ff9.7ba36564@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=157f09c63784628fd0ac727bd9e4645be9bcf8f1 commit 157f09c63784628fd0ac727bd9e4645be9bcf8f1 Author: Bjoern A. Zeeb AuthorDate: 2026-01-03 20:10:24 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:04 +0000 LinuxKPI: 802.11: factor out chandef/chanctx initialization Factor out chandef and chanctx initialization from lkpi_sta_scan_to_auth(). This makes the code a lot more readable and prepares for the next steps that will re-use some of this. Sponsored by: The FreeBSD Foundation (cherry picked from commit 695f0f0d037a876fa27c0cdca9890e09fd75429e) --- sys/compat/linuxkpi/common/src/linux_80211.c | 117 ++++++++++++++++++--------- 1 file changed, 78 insertions(+), 39 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 01347586ef63..8bb5bd4201ef 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -766,6 +766,7 @@ lkpi_sta_sync_from_ni(struct ieee80211_hw *hw, struct ieee80211_vif *vif, lkpi_sync_chanctx_cw_from_rx_bw(hw, vif, sta); } +#if 0 static uint8_t lkpi_get_max_rx_chains(struct ieee80211_node *ni) { @@ -792,6 +793,7 @@ lkpi_get_max_rx_chains(struct ieee80211_node *ni) return (chains); } +#endif static void lkpi_lsta_dump(struct lkpi_sta *lsta, struct ieee80211_node *ni, @@ -2214,6 +2216,70 @@ lkpi_80211_flush_tx(struct lkpi_hw *lhw, struct lkpi_sta *lsta) } } +static void +lkpi_init_chandef(struct cfg80211_chan_def *chandef, + struct linuxkpi_ieee80211_channel *chan, struct ieee80211_channel *c, + bool can_ht) +{ + + cfg80211_chandef_create(chandef, chan, + (can_ht) ? NL80211_CHAN_HT20 : NL80211_CHAN_NO_HT); + chandef->center_freq1 = ieee80211_get_channel_center_freq1(c); + chandef->center_freq2 = ieee80211_get_channel_center_freq2(c); + + IMPROVE("Check ht/vht_cap from band not just chan? See lkpi_sta_sync_from_ni..."); +#ifdef LKPI_80211_HT + if (IEEE80211_IS_CHAN_HT(c)) { + if (IEEE80211_IS_CHAN_HT40(c)) + chandef->width = NL80211_CHAN_WIDTH_40; + else + chandef->width = NL80211_CHAN_WIDTH_20; + } +#endif +#ifdef LKPI_80211_VHT + if (IEEE80211_IS_CHAN_VHT_5GHZ(c)) { + if (IEEE80211_IS_CHAN_VHT80P80(c)) + chandef->width = NL80211_CHAN_WIDTH_80P80; + else if (IEEE80211_IS_CHAN_VHT160(c)) + chandef->width = NL80211_CHAN_WIDTH_160; + else if (IEEE80211_IS_CHAN_VHT80(c)) + chandef->width = NL80211_CHAN_WIDTH_80; + } +#endif +} + +static uint32_t +lkpi_init_chanctx_conf(struct ieee80211_hw *hw, + struct cfg80211_chan_def *chandef, + struct ieee80211_chanctx_conf *chanctx_conf) +{ + uint32_t changed; + + lockdep_assert_wiphy(hw->wiphy); + + changed = 0; + + chanctx_conf->rx_chains_static = 1; + chanctx_conf->rx_chains_dynamic = 1; + changed |= IEEE80211_CHANCTX_CHANGE_RX_CHAINS; + + if (chanctx_conf->radar_enabled != hw->conf.radar_enabled) { + chanctx_conf->radar_enabled = hw->conf.radar_enabled; + changed |= IEEE80211_CHANCTX_CHANGE_RADAR; + } + + chanctx_conf->def = *chandef; + changed |= IEEE80211_CHANCTX_CHANGE_WIDTH; + + /* One day we should figure this out; is for iwlwifi-only. */ + chanctx_conf->min_def = chanctx_conf->def; + changed |= IEEE80211_CHANCTX_CHANGE_MIN_WIDTH; + + /* chanctx_conf->ap = */ + + return (changed); +} + static void lkpi_remove_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif) @@ -2310,6 +2376,7 @@ static int lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { struct linuxkpi_ieee80211_channel *chan; + struct cfg80211_chan_def chandef; struct lkpi_chanctx *lchanctx; struct ieee80211_chanctx_conf *chanctx_conf; struct lkpi_hw *lhw; @@ -2322,7 +2389,7 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int struct ieee80211_prep_tx_info prep_tx_info; uint32_t changed; int error; - bool synched; + bool synched, can_ht; /* * In here we use vap->iv_bss until lvif->lvif_bss is set. @@ -2391,50 +2458,22 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int chanctx_conf = &lchanctx->chanctx_conf; } - chanctx_conf->rx_chains_static = 1; - chanctx_conf->rx_chains_dynamic = 1; - chanctx_conf->radar_enabled = - (chan->flags & IEEE80211_CHAN_RADAR) ? true : false; - chanctx_conf->def.chan = chan; - chanctx_conf->def.width = NL80211_CHAN_WIDTH_20_NOHT; - chanctx_conf->def.center_freq1 = ieee80211_get_channel_center_freq1(ni->ni_chan); - chanctx_conf->def.center_freq2 = ieee80211_get_channel_center_freq2(ni->ni_chan); - IMPROVE("Check vht_cap from band not just chan?"); KASSERT(ni->ni_chan != NULL && ni->ni_chan != IEEE80211_CHAN_ANYC, ("%s:%d: ni %p ni_chan %p\n", __func__, __LINE__, ni, ni->ni_chan)); #ifdef LKPI_80211_HT - if (IEEE80211_IS_CHAN_HT(ni->ni_chan)) { - if (IEEE80211_IS_CHAN_HT40(ni->ni_chan)) - chanctx_conf->def.width = NL80211_CHAN_WIDTH_40; - else - chanctx_conf->def.width = NL80211_CHAN_WIDTH_20; - } -#endif -#ifdef LKPI_80211_VHT - if (IEEE80211_IS_CHAN_VHT_5GHZ(ni->ni_chan)) { - if (IEEE80211_IS_CHAN_VHT80P80(ni->ni_chan)) - chanctx_conf->def.width = NL80211_CHAN_WIDTH_80P80; - else if (IEEE80211_IS_CHAN_VHT160(ni->ni_chan)) - chanctx_conf->def.width = NL80211_CHAN_WIDTH_160; - else if (IEEE80211_IS_CHAN_VHT80(ni->ni_chan)) - chanctx_conf->def.width = NL80211_CHAN_WIDTH_80; - } -#endif - chanctx_conf->rx_chains_dynamic = lkpi_get_max_rx_chains(ni); - /* Responder ... */ -#if 0 - chanctx_conf->min_def.chan = chanctx_conf->def.chan; - chanctx_conf->min_def.width = NL80211_CHAN_WIDTH_20_NOHT; -#ifdef LKPI_80211_HT - if (IEEE80211_IS_CHAN_HT(ni->ni_chan) || IEEE80211_IS_CHAN_VHT(ni->ni_chan)) - chanctx_conf->min_def.width = NL80211_CHAN_WIDTH_20; -#endif - chanctx_conf->min_def.center_freq1 = chanctx_conf->def.center_freq1; - chanctx_conf->min_def.center_freq2 = chanctx_conf->def.center_freq2; + can_ht = (vap->iv_ic->ic_flags_ht & IEEE80211_FHT_HT) != 0; #else - chanctx_conf->min_def = chanctx_conf->def; + can_ht = false; #endif + lkpi_init_chandef(&chandef, chan, ni->ni_chan, can_ht); + hw->conf.radar_enabled = + ((chan->flags & IEEE80211_CHAN_RADAR) != 0) ? true : false; + hw->conf.chandef = chandef; + vif->bss_conf.chanreq.oper = hw->conf.chandef; + changed = lkpi_init_chanctx_conf(hw, &chandef, chanctx_conf); + + /* Responder ... */ /* Set bss info (bss_info_changed). */ bss_changed = 0; From nobody Wed Apr 22 21:08:42 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfL6wk0z6bL3g for ; Wed, 22 Apr 2026 21:08:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1BfL1ZhBz3lBr for ; Wed, 22 Apr 2026 21:08:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ir2Awizul12VH9VCvxeViZ0BGN0eur0PnVIE/E3hpaM=; b=KfwuEH7ngGfSpvcZqZzGFnEXWRlkkO1UXwylURyvYpV5eebANqwPOJI6ZXwiZOwQokTzcm kmE2XmUV9Xnsy7Ie2bRFG36ijqigkIM9n8gvZNVy0urWarLHUC+cpkyWq9Cc+UyE2bQ76b XU7GhCV2wQT+fCz7jehZq0Ce4b3ysGL50/IH2BXPQ22wJTLjeFMF3WmEWVs/Rl1XxhOKxO geNY3oLjJuugXaiZVFBSgdCX86jMxe1BTm8wsVh/av7jILpyHN+y820EHR/aGia0bkH2MF lNSicJyiuQnQiYZW2wpqmfwRx/F2RAfYoZFAbUTrxRfWxKBzX1hqLDHvuw9TqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892122; a=rsa-sha256; cv=none; b=ZHWyr/+LS4AtHiYK6N8AuKfB79rEZBRteYDcxWHQC9uV5LGsSsIJJRP0Sl0+4sb5OP72n4 w5WeuRomvFk0WNUIm9PfGYOuNpjicMq/3XHWAGfN+uAXhvVN83HVEOzTj08v00p8RpwNM8 OK6AL76wcrmvGg9GT1wUyO6IGUFScwlxC2CMika8gKTv9eYlQMaEawgF3GUF/uVvjpU+61 n6SdXv+gvWyuS1A9C42uIJzuAjaZt/BZWK4pI871RH6y1dDi8kaoWSBi4FaeDIsQ54UEsa NsQoKThSXWscENVJ/pjM+fOE3xUCEuFDedWAuBsDNZsCn/szF1Kw4K4kHGrYOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ir2Awizul12VH9VCvxeViZ0BGN0eur0PnVIE/E3hpaM=; b=pF6cIlDMV5+PVyNuDs4v0kLhh+yjsfb6OtXo7Cu6ZPFkLYV2UKBIroO0+QXURZH4zSP8fj oUddjs4OR9kMNPJSpeTBuciLi3Rf7G9VoOR8LRhMF7votLX5I4CvTqS/5nzF2K8mmbiLJV 5V+jPhwx3hzOacJ9gVIEcZyB3bCYceFWCeTug7lyG7IfI6h9CzcuzZitRxR2QvGNNURqiR 28x/0jZjRPNcIngeMDHIJE0aeB8hLu5pr3QxoguT17RpL60X4HdCrc04YO70Ezt8Im/E0G HTh9n5jwAiyrEkjXV0jqW+ZPM05A3LMwsRSefAGWlBb/aEL0S98fg+N+q8qTHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfL18KhznZm for ; Wed, 22 Apr 2026 21:08:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27b48 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 672ab3812bc6 - stable/15 - LinuxKPI: 802.11: save the default channel List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 672ab3812bc66d4e8cc5f44f5444749bf20749df Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:42 +0000 Message-Id: <69e938da.27b48.197e50c4@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=672ab3812bc66d4e8cc5f44f5444749bf20749df commit 672ab3812bc66d4e8cc5f44f5444749bf20749df Author: Bjoern A. Zeeb AuthorDate: 2026-03-10 20:02:43 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:04 +0000 LinuxKPI: 802.11: save the default channel Add a field to struct lkpi_hw to save the default channel for later reuse. Sponsored by: The FreeBSD Foundation (cherry picked from commit ced6909dd69b8476121dc291e01fa56ae14520e5) --- sys/compat/linuxkpi/common/src/linux_80211.c | 2 ++ sys/compat/linuxkpi/common/src/linux_80211.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 8bb5bd4201ef..92eccefca078 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -3963,6 +3963,7 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], lvif->lvif_ifllevent = EVENTHANDLER_REGISTER(iflladdr_event, lkpi_vif_iflladdr, vif, EVENTHANDLER_PRI_ANY); vif->bss_conf.link_id = 0; /* Non-MLO operation. */ + vif->bss_conf.chanreq.oper.chan = lhw->dflt_chandef.chan; vif->bss_conf.chanreq.oper.width = NL80211_CHAN_WIDTH_20_NOHT; vif->bss_conf.use_short_preamble = false; /* vap->iv_flags IEEE80211_F_SHPREAMBLE */ vif->bss_conf.use_short_slot = false; /* vap->iv_flags IEEE80211_F_SHSLOT */ @@ -6832,6 +6833,7 @@ linuxkpi_ieee80211_ifattach(struct ieee80211_hw *hw) (ic->ic_flags_ht & IEEE80211_FHT_HT) ? NL80211_CHAN_HT20 : #endif NL80211_CHAN_NO_HT); + lhw->dflt_chandef = hw->conf.chandef; break; } } diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index 8ae5c3d13d2d..a2945498e8df 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -254,6 +254,8 @@ struct lkpi_hw { /* name it mac80211_sc? */ unsigned int mc_flags; struct sx mc_sx; + struct cfg80211_chan_def dflt_chandef; + struct mtx txq_mtx; uint32_t txq_generation[IEEE80211_NUM_ACS]; spinlock_t txq_scheduled_lock[IEEE80211_NUM_ACS]; From nobody Wed Apr 22 21:08:43 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfM63Lvz6bKsr for ; Wed, 22 Apr 2026 21:08:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1BfM2WtPz3lSq for ; Wed, 22 Apr 2026 21:08:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l4Un085lNx+DUrnwHif3LLGH6AWCBULFKRTpp/sSP+g=; b=TPv+3YqsGC+o/PqN8vUN7pjo08SazC/M3dmYwbfLEAdOsxzWDl/t7htgS4PaYI1Ty6MaFx J2efH7KiqHcARQORvIk4nTW6Dk+KHheTw0raZkBDV/siszEY6f70i6GUd8aMEBa9bX59UC 7p3da/sSXrxXlA6v3f3IpIya96l/zf7ElvRxfsX1zmDYXp4wMo63y1in/uwcdCLdYCs1T1 CbVxH2yOqe6l5r3F0Kukz/KMmhaHD3xCF1l/oFwROf0twXcuczse8go5WtcwkL6qNgL5GG jZjqfvKHPQwBWeDQMYgL1dYrYypJTqU8YhkULD9x84mLWSJ1VC25CXfYIL3DAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892123; a=rsa-sha256; cv=none; b=khJP3ApaN2c1UzsjFsTjfcavBmWVLu10leOpmYZqwB48w8cmCKsaFgNmT043m457fpNr+Y gEGGMTKh4ZrQ3+wXTSsXyKvm4m4ROI01SG6EptLcKBgiMYded0y1V1TAdD2bbfNk3tlrlP Tpb3YIuaP7+oe0TmL6Z7+gGXVad/njytDuSZO9HaTB8JcY6gej5xevNH4phro1t9duhUN1 ulNS3nYnK2vJ6aNSsNR0pUw/0bXNcoYRqCUiV3XTwFOpq/xwKFBd4TXtcZvmODYJAGxn9Q mSQxPcW1SAD2d0Fky27+VO+Dh91XBA0agfzQYN4A/R1uceNAZ80yVfVBPEkiog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l4Un085lNx+DUrnwHif3LLGH6AWCBULFKRTpp/sSP+g=; b=YQ59pKlB3njvvbnUayJWGmACw3TAcgrPSgy+b2bMSVeeyNkoVGhRFHqyeYPBFPd8ZGozL4 5BYP3lJm3j/M/qBwMunTdhzvFu3JHQTx5ASZ2M5ZTo2VGh8H10U0GoDwaFPbSGQPwyVwRf SXeeC9JwoD9psKiL2POD2xqS/d+NcPACj99f/pXIW3sRStONlV7N/Ab47OUQ5y4aNkFkDx ZQz7+pxVi/fWCKZRUC7m7mgx29SQaT13ieTDTrYK7kjaTFpeSNl9/jvgoKLEcf4UWIu7dq CMO9YhIsv4GA3EC24biFVjGoHaS7adcWWphA0/JY6Mo//qHMwU5piU739X724w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfM1zw9zng4 for ; Wed, 22 Apr 2026 21:08:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27678 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: e99839ee7b7f - stable/15 - LinuxKPI: 802.11: keep chanctx on a reserved list List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: e99839ee7b7f6c1751ef423821a423cecdbca614 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:43 +0000 Message-Id: <69e938db.27678.2117a0d2@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e99839ee7b7f6c1751ef423821a423cecdbca614 commit e99839ee7b7f6c1751ef423821a423cecdbca614 Author: Bjoern A. Zeeb AuthorDate: 2026-03-23 00:47:57 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:04 +0000 LinuxKPI: 802.11: keep chanctx on a reserved list Keep the chanctx around as we may swap them. In the future (11be) these lists likely need to be (a) limited to maximum number of chanctx possible (see struct ieee80211_iface_limit), and (b) with that also by radio. For the moment keep this simple and start with a single chanctx and build up from there when we get there. Sponsored by: The FreeBSD Foundation (cherry picked from commit e62c92c0a5cfc000cf3c200e43738834ccc6472e) --- sys/compat/linuxkpi/common/src/linux_80211.c | 69 ++++++++++++++++++++++++++-- sys/compat/linuxkpi/common/src/linux_80211.h | 2 + 2 files changed, 66 insertions(+), 5 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 92eccefca078..40a7dfa79fba 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2280,13 +2280,54 @@ lkpi_init_chanctx_conf(struct ieee80211_hw *hw, return (changed); } +static struct lkpi_chanctx * +lkpi_alloc_lchanctx(struct ieee80211_hw *hw, struct lkpi_vif *lvif) +{ + struct lkpi_chanctx *lchanctx; + + lchanctx = malloc(sizeof(*lchanctx) + hw->chanctx_data_size, + M_LKPI80211, M_WAITOK | M_ZERO); + lchanctx->lvif = lvif; + + return (lchanctx); +} + +static struct lkpi_chanctx * +lkpi_find_lchanctx_reserved(struct ieee80211_hw *hw, struct lkpi_vif *lvif) +{ + struct lkpi_hw *lhw; + struct lkpi_chanctx *lchanctx; + bool found; + + lhw = HW_TO_LHW(hw); + + found = false; + rcu_read_lock(); + list_for_each_entry_rcu(lchanctx, &lhw->lchanctx_list_reserved, entry) { + if (lchanctx->lvif == lvif) { + found = true; + break; + } + } + rcu_read_unlock(); + + if (!found) { + lchanctx = lkpi_alloc_lchanctx(hw, lvif); + list_add_rcu(&lchanctx->entry, &lhw->lchanctx_list_reserved); + } + + return (lchanctx); +} static void lkpi_remove_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif) { + struct lkpi_hw *lhw; struct ieee80211_chanctx_conf *chanctx_conf; struct lkpi_chanctx *lchanctx; + lockdep_assert_wiphy(hw->wiphy); + chanctx_conf = rcu_dereference_protected(vif->bss_conf.chanctx_conf, lockdep_is_held(&hw->wiphy->mtx)); @@ -2305,7 +2346,8 @@ lkpi_remove_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif) rcu_assign_pointer(vif->bss_conf.chanctx_conf, NULL); lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); list_del(&lchanctx->entry); - free(lchanctx, M_LKPI80211); + lhw = HW_TO_LHW(hw); + list_add_rcu(&lchanctx->entry, &lhw->lchanctx_list_reserved); } /* -------------------------------------------------------------------------- */ @@ -2452,9 +2494,8 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); IMPROVE("diff changes for changed, working on live copy, rcu"); } else { - /* Keep separate alloc as in Linux this is rcu managed? */ - lchanctx = malloc(sizeof(*lchanctx) + hw->chanctx_data_size, - M_LKPI80211, M_WAITOK | M_ZERO); + lchanctx = lkpi_find_lchanctx_reserved(hw, lvif); + list_del(&lchanctx->entry); chanctx_conf = &lchanctx->chanctx_conf; } @@ -2535,7 +2576,7 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int rcu_assign_pointer(vif->bss_conf.chanctx_conf, NULL); lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); list_del(&lchanctx->entry); - free(lchanctx, M_LKPI80211); + list_add_rcu(&lchanctx->entry, &lhw->lchanctx_list_reserved); goto out; } } @@ -3954,6 +3995,10 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], /* Need to fill in other fields as well. */ IMPROVE(); + /* Create a chanctx to be used later. */ + IMPROVE("lkpi_alloc_lchanctx reserved as many as can be"); + (void) lkpi_find_lchanctx_reserved(hw, lvif); + /* XXX-BZ hardcoded for now! */ #if 1 RCU_INIT_POINTER(vif->bss_conf.chanctx_conf, NULL); @@ -6444,6 +6489,7 @@ linuxkpi_ieee80211_alloc_hw(size_t priv_len, const struct ieee80211_ops *ops) /* Chanctx_conf */ INIT_LIST_HEAD(&lhw->lchanctx_list); + INIT_LIST_HEAD(&lhw->lchanctx_list_reserved); /* Deferred RX path. */ LKPI_80211_LHW_RXQ_LOCK_INIT(lhw); @@ -6518,6 +6564,7 @@ linuxkpi_ieee80211_iffree(struct ieee80211_hw *hw) __func__, lhw, mbufq_len(&lhw->rxq))); LKPI_80211_LHW_RXQ_LOCK_DESTROY(lhw); + wiphy_lock(hw->wiphy); /* Chanctx_conf. */ if (!list_empty_careful(&lhw->lchanctx_list)) { struct lkpi_chanctx *lchanctx, *next; @@ -6530,9 +6577,21 @@ linuxkpi_ieee80211_iffree(struct ieee80211_hw *hw) lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); } list_del(&lchanctx->entry); + list_add_rcu(&lchanctx->entry, &lhw->lchanctx_list_reserved); + } + } + if (!list_empty_careful(&lhw->lchanctx_list_reserved)) { + struct lkpi_chanctx *lchanctx, *next; + + list_for_each_entry_safe(lchanctx, next, &lhw->lchanctx_list_reserved, entry) { + list_del(&lchanctx->entry); + if (lchanctx->added_to_drv) + panic("%s: lchanctx %p on reserved list still added_to_drv\n", + __func__, lchanctx); free(lchanctx, M_LKPI80211); } } + wiphy_unlock(hw->wiphy); LKPI_80211_LHW_MC_LOCK(lhw); lkpi_cleanup_mcast_list_locked(lhw); diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index a2945498e8df..e453cefa20f7 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -250,6 +250,7 @@ struct lkpi_hw { /* name it mac80211_sc? */ struct sx lvif_sx; struct list_head lchanctx_list; + struct list_head lchanctx_list_reserved; struct netdev_hw_addr_list mc_list; unsigned int mc_flags; struct sx mc_sx; @@ -330,6 +331,7 @@ struct lkpi_chanctx { struct list_head entry; bool added_to_drv; /* Managed by MO */ + struct lkpi_vif *lvif; /* Backpointer. */ struct ieee80211_chanctx_conf chanctx_conf __aligned(CACHE_LINE_SIZE); }; From nobody Wed Apr 22 21:08:44 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfN6tzLz6bKqJ for ; Wed, 22 Apr 2026 21:08:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1BfN3T1Nz3lY3 for ; Wed, 22 Apr 2026 21:08:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RVlev3XRTXNcJJYcdNJOIeXDzwHJZtJzgXHyQvqr6Qk=; b=qZ6X3gWsLq+kjp12Mpb3fjewM4TrepKYzJbMe8HJ0u3hP3TDvMYRz9JzaIVRyH5jP/RKpL LDkRgNB5XYuzzEdTe/7/gYlkSwT4gGQiLtIjiMMKOfjAaHgH7Vbh5Nzc7NQPFEJVd95T8X HyGYaYchDA0TDxut0CRlogeqP/wRzEzw+bHXY7ove9bknTZdDLRj9XRtfSSdJK/AkuT9KH QC5GotAFdiiDN5uuJ9KPp79ja3ib4y0xvX2NDTD1Rspfz/XiWpTKz/IScN8JHsQmpLuR5P IYyms8CtloNHUmkCkYBlpg/Yk5aPMJWpT42HPMqrjPcMr/sjb9u+oweC8WHmag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892124; a=rsa-sha256; cv=none; b=rb7kZUalBDba6n5FqUP4Adi4H+Wi7Wwl3S3CQEOcOiRDBIdAlsQSpsiY3PR1CbFPqm1Iqd oOxT+qsbce8pa3Yc1Dg9sDSBTXtPY+pxECaxXYVLzLJiEe3Yu8uztLtKVqMd25yMkG/yL+ a3xf6GWYHPywXwBy0EghtnsxYuFhugGG3LwKEXhCInHDstrApMttgp3si7SRwuT0/cCthP McwgXotomTiCux+9zRGAsR80QFgw430849xwMFFMn4rKlJIvnWwQHfdiv5meQLkgMr04X1 ateEa6Sz2JQt13elQkYrzUsC9CRD6JXWaRvB79/YQBneFJ12pY5Pcz2jXUTiUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RVlev3XRTXNcJJYcdNJOIeXDzwHJZtJzgXHyQvqr6Qk=; b=K0KxeQbphLy7R+k/pZKaOaD8SE4Re8jn7+9ILh45IsJVTe1kO/xFGnjgK+twIwqDtI6z7/ eIB6OlgHwR341SfqzJS59NEnBPQ7XBEDA59jXWXrjLEU71foZjliDmDhyLuZ5Y41WuYysW YNzCWhtyQka9SKyakUNFThl0SY1AK81UgOLsBagBDGk9iOjyRCihDVo4awH4ApkZ+xHQVM 8/rbExDCekE5d+pNRFVI5FOvnkRZahnhB9QwKKVgUYwz/xIGQnRWqreB5zD/RZX2yKo1qu QO2hlA5upmSW6WeQsLeXZ39wSBusRtndYARWlzdnhwn3aVUVpq94G3akUnZSYw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfN2r48znLF for ; Wed, 22 Apr 2026 21:08:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25efe by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 5280ba4fcf55 - stable/15 - LinuxKPI: 802.11: factor out getting and setting a chanctx List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5280ba4fcf55fe5b9f2a5071a47e991c329551e5 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:44 +0000 Message-Id: <69e938dc.25efe.24c6ffef@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=5280ba4fcf55fe5b9f2a5071a47e991c329551e5 commit 5280ba4fcf55fe5b9f2a5071a47e991c329551e5 Author: Bjoern A. Zeeb AuthorDate: 2026-03-23 03:55:14 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:04 +0000 LinuxKPI: 802.11: factor out getting and setting a chanctx Further factor out acquiring the chanctx (either set or new), as well as populating a chanctx with information. This further simplifies lkpi_sta_scan_to_auth() and gives us more reusable function blocks. Sponsored by: The FreeBSD Foundation (cherry picked from commit 88cb1e17f471276e831c298c48acf9aca6ae29a6) --- sys/compat/linuxkpi/common/src/linux_80211.c | 148 +++++++++++++++++---------- 1 file changed, 92 insertions(+), 56 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 40a7dfa79fba..d7648f31d70d 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2319,6 +2319,94 @@ lkpi_find_lchanctx_reserved(struct ieee80211_hw *hw, struct lkpi_vif *lvif) return (lchanctx); } +static struct ieee80211_chanctx_conf * +lkpi_get_chanctx_conf(struct ieee80211_hw *hw, struct ieee80211_vif *vif) +{ + struct ieee80211_chanctx_conf *chanctx_conf; + + chanctx_conf = rcu_dereference_protected(vif->bss_conf.chanctx_conf, + lockdep_is_held(&hw->wiphy->mtx)); + if (chanctx_conf == NULL) { + struct lkpi_chanctx *lchanctx; + struct lkpi_vif *lvif; + + lvif = VIF_TO_LVIF(vif); + lchanctx = lkpi_find_lchanctx_reserved(hw, lvif); + KASSERT(lchanctx != NULL, ("%s: hw %p, vif %p no lchanctx\n", + __func__, hw, vif)); + list_del(&lchanctx->entry); + chanctx_conf = &lchanctx->chanctx_conf; + } + /* else { IMPROVE("diff changes for changed, working on live copy, rcu"); } */ + + return (chanctx_conf); +} + +static int +lkpi_set_chanctx_conf(struct ieee80211_hw *hw, struct ieee80211_vif *vif, + struct ieee80211_chanctx_conf *chanctx_conf, + uint32_t changed, bool changed_set) +{ + struct lkpi_hw *lhw; + struct lkpi_chanctx *lchanctx; + int error; + + if (vif->bss_conf.chanctx_conf == chanctx_conf) { + if (!changed_set) { + IMPROVE("OBSOLETE?"); + changed = IEEE80211_CHANCTX_CHANGE_MIN_WIDTH; + changed |= IEEE80211_CHANCTX_CHANGE_RADAR; + changed |= IEEE80211_CHANCTX_CHANGE_RX_CHAINS; + changed |= IEEE80211_CHANCTX_CHANGE_WIDTH; + } + lkpi_80211_mo_change_chanctx(hw, chanctx_conf, changed); + + return (0); + } + + lhw = HW_TO_LHW(hw); + + /* The device is no longer idle. */ + IMPROVE("Once we do multi-vif, only do for 1st chanctx"); + lkpi_hw_conf_idle(hw, false); + + error = lkpi_80211_mo_add_chanctx(hw, chanctx_conf); + if (error != 0 && error != EOPNOTSUPP) { + ic_printf(lhw->ic, "%s:%d: mo_add_chanctx " + "failed: %d\n", __func__, __LINE__, error); + return (error); + } + + vif->bss_conf.chanreq.oper.chan = chanctx_conf->def.chan; + vif->bss_conf.chanreq.oper.width = chanctx_conf->def.width; + vif->bss_conf.chanreq.oper.center_freq1 = + chanctx_conf->def.center_freq1; + vif->bss_conf.chanreq.oper.center_freq2 = + chanctx_conf->def.center_freq2; + + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); + list_add_rcu(&lchanctx->entry, &lhw->lchanctx_list); + rcu_assign_pointer(vif->bss_conf.chanctx_conf, chanctx_conf); + + /* Assign vif chanctx. */ + if (error == 0) + error = lkpi_80211_mo_assign_vif_chanctx(hw, vif, + &vif->bss_conf, chanctx_conf); + if (error == EOPNOTSUPP) + error = 0; + if (error != 0) { + ic_printf(lhw->ic, "%s:%d: mo_assign_vif_chanctx " + "failed: %d\n", __func__, __LINE__, error); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + rcu_assign_pointer(vif->bss_conf.chanctx_conf, NULL); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); + list_del(&lchanctx->entry); + list_add_rcu(&lchanctx->entry, &lhw->lchanctx_list_reserved); + } + + return (error); +} + static void lkpi_remove_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif) { @@ -2419,7 +2507,6 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int { struct linuxkpi_ieee80211_channel *chan; struct cfg80211_chan_def chandef; - struct lkpi_chanctx *lchanctx; struct ieee80211_chanctx_conf *chanctx_conf; struct lkpi_hw *lhw; struct ieee80211_hw *hw; @@ -2488,16 +2575,7 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int wiphy_lock(hw->wiphy); /* Add chanctx (or if exists, change it). */ - chanctx_conf = rcu_dereference_protected(vif->bss_conf.chanctx_conf, - lockdep_is_held(&hw->wiphy->mtx)); - if (chanctx_conf != NULL) { - lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); - IMPROVE("diff changes for changed, working on live copy, rcu"); - } else { - lchanctx = lkpi_find_lchanctx_reserved(hw, lvif); - list_del(&lchanctx->entry); - chanctx_conf = &lchanctx->chanctx_conf; - } + chanctx_conf = lkpi_get_chanctx_conf(hw, vif); KASSERT(ni->ni_chan != NULL && ni->ni_chan != IEEE80211_CHAN_ANYC, ("%s:%d: ni %p ni_chan %p\n", __func__, __LINE__, ni, ni->ni_chan)); @@ -2534,52 +2612,10 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int bss_changed |= lkpi_update_dtim_tsf(vif, ni, vap, __func__, __LINE__); - error = 0; - if (vif->bss_conf.chanctx_conf == chanctx_conf) { - changed = IEEE80211_CHANCTX_CHANGE_MIN_WIDTH; - changed |= IEEE80211_CHANCTX_CHANGE_RADAR; - changed |= IEEE80211_CHANCTX_CHANGE_RX_CHAINS; - changed |= IEEE80211_CHANCTX_CHANGE_WIDTH; - lkpi_80211_mo_change_chanctx(hw, chanctx_conf, changed); - } else { - /* The device is no longer idle. */ - IMPROVE("Once we do multi-vif, only do for 1st chanctx"); - lkpi_hw_conf_idle(hw, false); - - error = lkpi_80211_mo_add_chanctx(hw, chanctx_conf); - if (error == 0 || error == EOPNOTSUPP) { - vif->bss_conf.chanreq.oper.chan = chanctx_conf->def.chan; - vif->bss_conf.chanreq.oper.width = chanctx_conf->def.width; - vif->bss_conf.chanreq.oper.center_freq1 = - chanctx_conf->def.center_freq1; - vif->bss_conf.chanreq.oper.center_freq2 = - chanctx_conf->def.center_freq2; - } else { - ic_printf(vap->iv_ic, "%s:%d: mo_add_chanctx " - "failed: %d\n", __func__, __LINE__, error); - goto out; - } - - list_add_rcu(&lchanctx->entry, &lhw->lchanctx_list); - rcu_assign_pointer(vif->bss_conf.chanctx_conf, chanctx_conf); + error = lkpi_set_chanctx_conf(hw, vif, chanctx_conf, changed, true); + if (error != 0) + goto out; - /* Assign vif chanctx. */ - if (error == 0) - error = lkpi_80211_mo_assign_vif_chanctx(hw, vif, - &vif->bss_conf, chanctx_conf); - if (error == EOPNOTSUPP) - error = 0; - if (error != 0) { - ic_printf(vap->iv_ic, "%s:%d: mo_assign_vif_chanctx " - "failed: %d\n", __func__, __LINE__, error); - lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); - rcu_assign_pointer(vif->bss_conf.chanctx_conf, NULL); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); - list_del(&lchanctx->entry); - list_add_rcu(&lchanctx->entry, &lhw->lchanctx_list_reserved); - goto out; - } - } IMPROVE("update radiotap chan fields too"); /* RATES */ From nobody Wed Apr 22 21:08:45 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfQ0Z9zz6bKqS for ; Wed, 22 Apr 2026 21:08:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1BfP54T4z3lTG for ; Wed, 22 Apr 2026 21:08:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KMSK6JUo6bTpERmTmhm3cgnDBkmHggr3WvqzTvQcvKQ=; b=dGRUNhlWoG/r9PNLOtPcCMh6PwhX8NjBU6YZP8Bkj60PKcrILZkbXreWAG1r36Dmmw+t5t z02RZK0gEJHWeYFoAcBRqbx+qo19XJPRVUw4nAbuoexFn5LsQFvdwmZnuIDXM9VICFmy6L 7tgZWWuE8x/QKpTrdnrRyw9euu7aO+JmTStdavC4reyNwrWVwxdp/Ym+Z6e2+PkWiwYbO7 BVEP/zRhMk6zZ6SzQFFjvmw8+PRtuRCTwDZ/Bj5R/ni4zX4fMpR9yN4bdySjIUs7ZO/WKc mmwUxuMzreuYuNBEKqyt6sezXYJ/qb1WwN0wG9yFkhY3kxOYcyrStQ+l7QbNug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892125; a=rsa-sha256; cv=none; b=rVvi1BwK89l/XLScDjem/oMVXkbYDReQN7YR0+7+CLMCUlxN/jhtdnWEi1EVapvBxqGO6m E84LHoYU+2AUHg5ZMUiKhg2zwj1NAYCDEbjlPpvH/LPQEpw/JRFbj2mJHjX8MOIn15CIRo aEOFc+sWVk4d9waq1KJeeT5BeA8ucgPRF8VtS5nNkywma1Hj2BmzIfSa/YG8gH8h9PNq9M KG4l6fsFOOqLy92mdfVQ0lMTsT9kBs1/8yX84GX4R8wShrCFkc/F+oW0jBBLsWSkhfZmXH 40yrdBWGfOu2/6H1bjhz6sVz5SyVzogPvxiHNlhEYtTjlVgOmCRJcsMh+qER8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KMSK6JUo6bTpERmTmhm3cgnDBkmHggr3WvqzTvQcvKQ=; b=ZAbetBsRZgaopH6QdsuRtp+L/arLpKPUbBFfxp42PSlMEtzUEXtHtBYb0+ihFnIE3+1wiy F/vbQpKiWr8pkTMJejHWQtN9EzwWva0dSAccswfYQJFtrK8GMH6axFRZbkpN7IGzCDG2mq Jbm/CiGhGPfT1OTsoKlJvmSKHM2EQWPqehN97CkOlkoWvYzvWj39jUeWqjLksOykUlrWCR /9nF40yJcMr9DpfoaZOZBS/eHcKXyMj4h5v4q842zl0L2hopgKcTjkO+2eZLshPfrQ1rhV XBN+FCvuInqhWahztg9V5SBHCkIFKx/R+xjG7LhfYJs5cxpcK6TZFOM+XrgJ6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfP3V8gznLG for ; Wed, 22 Apr 2026 21:08:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30a82 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 4ce240fe2d1a - stable/15 - LinuxKPI: 802.11: rework lkpi_ic_set_channel() List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4ce240fe2d1a6d8b3c96682f5a67e4c433370427 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:45 +0000 Message-Id: <69e938dd.30a82.206c1d1e@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4ce240fe2d1a6d8b3c96682f5a67e4c433370427 commit 4ce240fe2d1a6d8b3c96682f5a67e4c433370427 Author: Bjoern A. Zeeb AuthorDate: 2026-03-10 19:14:43 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:05 +0000 LinuxKPI: 802.11: rework lkpi_ic_set_channel() We are called by net80211 when channel changes are happening and we have to map this to LinuxKPI 802.11. There are multiple cases: (1) it is a hardware scan and net80211 still changes the channel; we do not need to; (2) it is a software scan (the magic fallback case) in which case we let net80211 drive the scan channel and we need to keep a copy of the scan_chandef (see follow-up commit); (3) no scanning but a normal channel change triggerd by net80211; in that case we could (should?) setup the full flags right away but deferred LinuxKPI logic currently handle this for us as not in all cases the information was fully available from net80211 in times we would have needed it. We only do this in order to handle the emulate chanctx cases but do not change the channel otherwise; scan_to_auth will set the correct chanctx. (3a) we have no (active) chanctx for that, create/set one, (3b) we do have an (active) chanctx for this, use it but reset to defaults. Sponsored by: The FreeBSD Foundation (cherry picked from commit 491f5876bfb40a4f70f523b5d14bccf6b53d2b0c) --- sys/compat/linuxkpi/common/src/linux_80211.c | 170 +++++++++++++++++++++------ sys/compat/linuxkpi/common/src/linux_80211.h | 1 + 2 files changed, 132 insertions(+), 39 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index d7648f31d70d..e839867bea58 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -4191,7 +4191,6 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], if (hw->max_listen_interval == 0) hw->max_listen_interval = 7 * (ic->ic_lintval / ic->ic_bintval); hw->conf.listen_interval = hw->max_listen_interval; - ic->ic_set_channel(ic); /* XXX-BZ do we need to be able to update these? */ hw->wiphy->frag_threshold = vap->iv_fragthreshold; @@ -5073,6 +5072,9 @@ lkpi_ic_scan_end(struct ieee80211com *ic) */ lkpi_enable_hw_scan(lhw); + /* Clear the scanning chandef. */ + memset(&lhw->scan_chandef, 0, sizeof(lhw->scan_chandef)); + LKPI_80211_LHW_SCAN_LOCK(lhw); wakeup(lhw); LKPI_80211_LHW_SCAN_UNLOCK(lhw); @@ -5115,6 +5117,25 @@ lkpi_ic_scan_mindwell(struct ieee80211_scan_state *ss) lhw->ic_scan_mindwell(ss); } +struct lkpi_ic_set_channel_iter_arg { + struct linuxkpi_ieee80211_channel *chan; + struct ieee80211_chanctx_conf *chanctx_conf; +}; + +static void +lkpi_ic_set_channel_chanctx_iterf(struct ieee80211_hw *hw, + struct ieee80211_chanctx_conf *chanctx_conf, void *arg) +{ + struct lkpi_ic_set_channel_iter_arg *chanctx_iter_arg; + + chanctx_iter_arg = arg; + if (chanctx_iter_arg->chanctx_conf != NULL) + return; + + if (chanctx_iter_arg->chan == chanctx_conf->def.chan) + chanctx_iter_arg->chanctx_conf = chanctx_conf; +} + static void lkpi_ic_set_channel(struct ieee80211com *ic) { @@ -5122,64 +5143,133 @@ lkpi_ic_set_channel(struct ieee80211com *ic) struct ieee80211_hw *hw; struct ieee80211_channel *c; struct linuxkpi_ieee80211_channel *chan; + struct ieee80211_chanctx_conf *chanctx_conf; + uint32_t changed; int error; - bool hw_scan_running; + bool hw_scan, scan_running; - lhw = ic->ic_softc; - - /* If we do not support (*config)() save us the work. */ - if (lhw->ops->config == NULL) - return; + IEEE80211_UNLOCK_ASSERT(ic); - /* If we have a hw_scan running do not switch channels. */ - LKPI_80211_LHW_SCAN_LOCK(lhw); - hw_scan_running = - (lhw->scan_flags & (LKPI_LHW_SCAN_RUNNING|LKPI_LHW_SCAN_HW)) == - (LKPI_LHW_SCAN_RUNNING|LKPI_LHW_SCAN_HW); - LKPI_80211_LHW_SCAN_UNLOCK(lhw); - if (hw_scan_running) - return; + lhw = ic->ic_softc; c = ic->ic_curchan; if (c == NULL || c == IEEE80211_CHAN_ANYC) { - ic_printf(ic, "%s: c %p ops->config %p\n", __func__, - c, lhw->ops->config); + ic_printf(ic, "%s: Unset channel: c %p, ignoring update\n", + __func__, c); return; } chan = lkpi_find_lkpi80211_chan(lhw, c); if (chan == NULL) { - ic_printf(ic, "%s: c %p chan %p\n", __func__, - c, chan); + ic_printf(ic, "%s: No channel found for c %p(%d) chan %p\n", + __func__, c, c->ic_ieee, chan); return; } - /* XXX max power for scanning? */ - IMPROVE(); + /* + * All net80211 callers call ieee80211_radiotap_chan_change(). + * That means we have nothing to do ourselves. + */ + + /* If we have a hw_scan running do not switch channels. */ + LKPI_80211_LHW_SCAN_LOCK(lhw); + scan_running = (lhw->scan_flags & LKPI_LHW_SCAN_RUNNING) != 0; + hw_scan = (lhw->scan_flags & LKPI_LHW_SCAN_HW) != 0; + LKPI_80211_LHW_SCAN_UNLOCK(lhw); + if (scan_running && hw_scan) { + TRACE_SCAN(ic, "scan_flags %b chan %d nothing to do.", + lhw->scan_flags, LKPI_LHW_SCAN_BITS, + c->ic_ieee); + /* Let us hope we set tx power levels elsewhere. */ + return; + } hw = LHW_TO_HW(lhw); - cfg80211_chandef_create(&hw->conf.chandef, chan, -#ifdef LKPI_80211_HT - (ic->ic_flags_ht & IEEE80211_FHT_HT) ? NL80211_CHAN_HT20 : -#endif - NL80211_CHAN_NO_HT); + wiphy_lock(hw->wiphy); + if (scan_running) { + struct ieee80211vap *vap; + struct lkpi_vif *lvif; + struct ieee80211_vif *vif; - error = lkpi_80211_mo_config(hw, IEEE80211_CONF_CHANGE_CHANNEL); - if (error != 0 && error != EOPNOTSUPP) { - ic_printf(ic, "ERROR: %s: config %#0x returned %d\n", - __func__, IEEE80211_CONF_CHANGE_CHANNEL, error); - /* XXX should we unroll to the previous chandef? */ - IMPROVE(); - } else { - /* Update radiotap channels as well. */ - lhw->rtap_tx.wt_chan_freq = htole16(c->ic_freq); - lhw->rtap_tx.wt_chan_flags = htole16(c->ic_flags); - lhw->rtap_rx.wr_chan_freq = htole16(c->ic_freq); - lhw->rtap_rx.wr_chan_flags = htole16(c->ic_flags); + /* + * For now and for scanning just pick the first VIF. + * net80211 will need to grow DBDC/link_id support + * for us to find the vif/chanctx otherwise. + */ + vap = TAILQ_FIRST(&ic->ic_vaps); + lvif = VAP_TO_LVIF(vap); + vif = LVIF_TO_VIF(lvif); + + /* We always set the chandef to no-HT for scanning. */ + cfg80211_chandef_create(&lhw->scan_chandef, chan, + NL80211_CHAN_NO_HT); + + /* + * This works for as long as we do not do BGSCANs; otherwise + * it'll have to be offchan work. + */ + chanctx_conf = lkpi_get_chanctx_conf(hw, vif); + changed = lkpi_init_chanctx_conf(hw, &lhw->scan_chandef, chanctx_conf); + error = lkpi_set_chanctx_conf(hw, vif, chanctx_conf, changed, true); + + TRACE_SCAN(ic, "scan_flags %b chan %d ???, error %d", + lhw->scan_flags, LKPI_LHW_SCAN_BITS, + c->ic_ieee, error); + + IMPROVE("max power for scanning; TODO in lkpi_80211_update_chandef"); + + } else if (lhw->ops->change_chanctx == ieee80211_emulate_change_chanctx) { + /* + * We do not set the channel here for normal chanctx operation. + * That's just a setup to fail. scan_to_auth will setup all the + * other neccessary options for this to work. + */ + struct lkpi_ic_set_channel_iter_arg chanctx_iter_arg = { + .chan = chan, + .chanctx_conf = NULL, + }; + struct cfg80211_chan_def chandef; + + lkpi_init_chandef(&chandef, chan, c, false); + + ieee80211_iter_chan_contexts_mtx(hw, + lkpi_ic_set_channel_chanctx_iterf, &chanctx_iter_arg); + + if (chanctx_iter_arg.chanctx_conf == NULL) { + /* No chanctx found for this channel. */ + struct ieee80211vap *vap; + struct lkpi_vif *lvif; + struct ieee80211_vif *vif; + + /* + * For now just pick the first VIF. + * net80211 will need to grow DBDC/link_id support + * for us to find the vif/chanctx otherwise. + */ + vap = TAILQ_FIRST(&ic->ic_vaps); + lvif = VAP_TO_LVIF(vap); + vif = LVIF_TO_VIF(lvif); + + chanctx_conf = lkpi_get_chanctx_conf(hw, vif); + changed = lkpi_init_chanctx_conf(hw, &chandef, chanctx_conf); + IMPROVE("update HT, VHT, bw, ..."); + error = lkpi_set_chanctx_conf(hw, vif, chanctx_conf, changed, true); + + } else { + /* + * We know we are on the same channel. + * Do we really have to reset everything? + */ + IMPROVE("update HT, VHT, bw, ..."); + + chanctx_conf = chanctx_iter_arg.chanctx_conf; + changed = lkpi_init_chanctx_conf(hw, &chandef, chanctx_conf); + lkpi_80211_mo_change_chanctx(hw, chanctx_conf, changed); + } } /* Currently PS is hard coded off! Not sure it belongs here. */ - IMPROVE(); + IMPROVE("PS"); if (ieee80211_hw_check(hw, SUPPORTS_PS) && (hw->conf.flags & IEEE80211_CONF_PS) != 0) { hw->conf.flags &= ~IEEE80211_CONF_PS; @@ -5189,6 +5279,8 @@ lkpi_ic_set_channel(struct ieee80211com *ic) "%d\n", __func__, IEEE80211_CONF_CHANGE_PS, error); } + + wiphy_unlock(hw->wiphy); } static struct ieee80211_node * diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index e453cefa20f7..07816cdfe166 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -256,6 +256,7 @@ struct lkpi_hw { /* name it mac80211_sc? */ struct sx mc_sx; struct cfg80211_chan_def dflt_chandef; + struct cfg80211_chan_def scan_chandef; struct mtx txq_mtx; uint32_t txq_generation[IEEE80211_NUM_ACS]; From nobody Wed Apr 22 21:08:46 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfR0SJDz6bLB8 for ; Wed, 22 Apr 2026 21:08:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1BfQ4r6Jz3lF3 for ; Wed, 22 Apr 2026 21:08:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YzseFU98zu+pOfdXrq8e1JXyKZuPhdZyvv4cfo8O1vs=; b=yPcVmib30wbrrHJe1dEl34EfCoPcLkKYGFOpqiVOGg6dzbyCH7V4FU+fBhdfqQeAQSee3M gYavHg1nD0DgNnNsxlrP6x33nvlwo6iKQZ2VIrFaIdj2Uq9m0oHOIJ20x54q6lhAx0zQ6g 3R1onq7rN0K08nJwnLk31v8wjBw0K98O5/itVXHrmJmCqgZrCwj6mGFANjbN1nEIQ/7Lr+ pQH6kVuZDgOx2pCJG814xT0IPv6vHbwuRVbZzM0ClPTLbM37o5ls2rdWBk3gQ1d0bJSfNg +UhTJYI2Y//ZCNGA15hYxXyWWgm6e2VVUQszluSZqDBspDFXyOMEVYQJpMgT/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892126; a=rsa-sha256; cv=none; b=sWN2HvQewkETpKSeQuksSDzYmP2DGCSG5UBMp+ZY3DrkEyI9zfl0KesH9FCT22Xucx72GP AE4S94FJiQev5XX/rdhUimEhv5oH3wR+CHx/wpGTt+b93fDlLzP2mcFHnYkjrvMINKEbGJ iiJKdpQBudKN/18x1kAWdVbopxBuIfxxX0vhCQweEAewpxrxkkrcXfSx4nhrPuRa6jkM0R /N+BP0WOvJIYlzTE3xadxMeGqVJ3R7/e0cY7C6iaO63KQTqxRW0iYwoMAA1XRM8qVZ9yav ZpgIPDZeshpB0Zr+1XGHkgHU7k+4sfhbR3/zpza7nDiRJsykCmBM6ktia3dVoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YzseFU98zu+pOfdXrq8e1JXyKZuPhdZyvv4cfo8O1vs=; b=VKB49I1nMBPrdqT47APB6swD09lR9kSmJNjsAg2pGMcTmnBAA9Q/sFTZCn4mFF/7fPBbF4 1YUTFoi1h1by3K0U+e4ALDl/hf+zaILx5qw5xdR4dPzm3R2N2lEkXjCRt6KCx6WOx3wk47 XE6fUqOPfT84nyMgZd24JeqWygwjhhPwSr10QkiDiO5Jk0pGlFFTxaeUWIZtbLhsT98SMi eETSdMSXs0794M+NEVHXTag8m8x8tIaGHD04H/GIAe3KKXgE9xKgTNDMl1QeLfQYX8C4pw 0ui1YzBX+/4EZDAUhgW7ZBLi7Cx8oC5lVXyXUAoJvINCZvNJHHat0XQZh6MxHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfQ4Mb2zng6 for ; Wed, 22 Apr 2026 21:08:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30a86 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: d40b98e18c17 - stable/15 - LinuxKPI: 802.11: improve emulate chanctx implementation List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d40b98e18c171d562ff0104f04f88215f74ca407 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:46 +0000 Message-Id: <69e938de.30a86.6c7ac508@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d40b98e18c171d562ff0104f04f88215f74ca407 commit d40b98e18c171d562ff0104f04f88215f74ca407 Author: Bjoern A. Zeeb AuthorDate: 2026-03-10 11:16:12 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:05 +0000 LinuxKPI: 802.11: improve emulate chanctx implementation Now that all dependencies are implemented improve our chanctx emulation. Some drivers still rely on chandef information for channel work. In order to only do chanctx updates within mac80211 in Linux and likewise in the LinuxKPI 802.11 compat layer, emulation functions were introduced which claim to support chanctx driver operation but in reality convert these to chandef field updates and (*config) downcalls. This is relevant to several mt76 chipsets (at least 7615, 7915), and rtw88 and certain rtw89 chipsets (8851b, and the ones not supporting SCAN_OFFLOAD or BEACON_FILTER) for us. Migrate the logic out of the header and improve it. Make use of the introduced dflt_chandef and scan_chandef fields, add comparison of chandefs to see if we have to update, etc. Also add strict checks for driver settings in linuxkpi_ieee80211_alloc_hw() to make sure all preconditions are correctly met. Store the result if we are using the emulation functions in a field, so we can later check on it and also leave a note to the users if emulation is used in order to improve debugging on possible problem reports. Use the new field that we use emulation in lkpi_ic_set_channel() instead of a hand crafted check. Sponsored by: The FreeBSD Foundation Fixes: ac1d519c01ca8 ("LinuxKPI: 802.11: adjustments for v6.11..") (cherry picked from commit 166a7344df582f98a88f2b37b7aa3dc4558c9438) --- sys/compat/linuxkpi/common/include/net/mac80211.h | 72 ++------ sys/compat/linuxkpi/common/src/linux_80211.c | 208 +++++++++++++++++++++- sys/compat/linuxkpi/common/src/linux_80211.h | 1 + 3 files changed, 218 insertions(+), 63 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index 4f3aad532810..c637e13a496d 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1196,6 +1196,22 @@ void linuxkpi_ieee80211_handle_wake_tx_queue(struct ieee80211_hw *, /* -------------------------------------------------------------------------- */ +/* + * Emulate chanctx operations. We cannot rename/prefix the functions + * as we rely on the (function)pointers being the same everywhere. + */ +int ieee80211_emulate_add_chanctx(struct ieee80211_hw *, + struct ieee80211_chanctx_conf *); +void ieee80211_emulate_remove_chanctx(struct ieee80211_hw *, + struct ieee80211_chanctx_conf *); +void ieee80211_emulate_change_chanctx(struct ieee80211_hw *, + struct ieee80211_chanctx_conf *, uint32_t); +int ieee80211_emulate_switch_vif_chanctx(struct ieee80211_hw *, + struct ieee80211_vif_chanctx_switch *, int, + enum ieee80211_chanctx_switch_mode); + +/* -------------------------------------------------------------------------- */ + static __inline void _ieee80211_hw_set(struct ieee80211_hw *hw, enum ieee80211_hw_flags flag) { @@ -2634,60 +2650,4 @@ ieee80211_cqm_beacon_loss_notify(struct ieee80211_vif *vif, gfp_t gfp __unused) /* -------------------------------------------------------------------------- */ -int lkpi_80211_update_chandef(struct ieee80211_hw *, - struct ieee80211_chanctx_conf *); - -static inline int -ieee80211_emulate_add_chanctx(struct ieee80211_hw *hw, - struct ieee80211_chanctx_conf *chanctx_conf) -{ - int error; - - hw->conf.radar_enabled = chanctx_conf->radar_enabled; - error = lkpi_80211_update_chandef(hw, chanctx_conf); - return (error); -} - -static inline void -ieee80211_emulate_remove_chanctx(struct ieee80211_hw *hw, - struct ieee80211_chanctx_conf *chanctx_conf __unused) -{ - hw->conf.radar_enabled = false; - lkpi_80211_update_chandef(hw, NULL); -} - -static inline void -ieee80211_emulate_change_chanctx(struct ieee80211_hw *hw, - struct ieee80211_chanctx_conf *chanctx_conf, uint32_t changed __unused) -{ - hw->conf.radar_enabled = chanctx_conf->radar_enabled; - lkpi_80211_update_chandef(hw, chanctx_conf); -} - -static inline int -ieee80211_emulate_switch_vif_chanctx(struct ieee80211_hw *hw, - struct ieee80211_vif_chanctx_switch *vifs, int n_vifs, - enum ieee80211_chanctx_switch_mode mode __unused) -{ - struct ieee80211_chanctx_conf *chanctx_conf; - int error; - - /* Sanity check. */ - if (n_vifs <= 0) - return (-EINVAL); - if (vifs == NULL || vifs[0].new_ctx == NULL) - return (-EINVAL); - - /* - * What to do if n_vifs > 1? - * Does that make sense for drivers not supporting chanctx? - */ - hw->conf.radar_enabled = vifs[0].new_ctx->radar_enabled; - chanctx_conf = vifs[0].new_ctx; - error = lkpi_80211_update_chandef(hw, chanctx_conf); - return (error); -} - -/* -------------------------------------------------------------------------- */ - #endif /* _LINUXKPI_NET_MAC80211_H */ diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index e839867bea58..c2f2adfc7053 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -181,6 +181,8 @@ static void lkpi_ieee80211_free_skb_mbuf(void *); #ifdef LKPI_80211_WME static int lkpi_wme_update(struct lkpi_hw *, struct ieee80211vap *, bool); #endif +static int lkpi_80211_update_chandef(struct ieee80211_hw *, + struct ieee80211_chanctx_conf *); static void lkpi_ieee80211_wake_queues_locked(struct ieee80211_hw *); static const char * @@ -5218,7 +5220,7 @@ lkpi_ic_set_channel(struct ieee80211com *ic) IMPROVE("max power for scanning; TODO in lkpi_80211_update_chandef"); - } else if (lhw->ops->change_chanctx == ieee80211_emulate_change_chanctx) { + } else if (lhw->emulate_chanctx) { /* * We do not set the channel here for normal chanctx operation. * That's just a setup to fail. scan_to_auth will setup all the @@ -6593,6 +6595,53 @@ linuxkpi_ieee80211_alloc_hw(size_t priv_len, const struct ieee80211_ops *ops) struct lkpi_hw *lhw; struct wiphy *wiphy; int ac; + bool emuchanctx; + + /* + * Do certain checks before starting to allocate resources. + * Store results in temporary variables. + */ + + /* ac1d519c01ca introduced emulating chanctx changes. */ + emuchanctx = false; + if (ops->add_chanctx == ieee80211_emulate_add_chanctx && + ops->change_chanctx == ieee80211_emulate_change_chanctx && + ops->remove_chanctx == ieee80211_emulate_remove_chanctx) { + /* + * If we emulate the chanctx ops, we must not have + * assign_vif_chanctx and unassign_vif_chanctx. + */ + if (ops->assign_vif_chanctx != NULL || + ops->unassign_vif_chanctx != NULL) { + /* Fail gracefully. */ + printf("%s: emulate_chanctx but " + "assign_vif_chanctx %p != NULL || " + "unassign_vif_chanctx %p != NULL\n", __func__, + ops->assign_vif_chanctx, ops->unassign_vif_chanctx); + return (NULL); + } + emuchanctx = true; + } + if (!emuchanctx && (ops->add_chanctx == ieee80211_emulate_add_chanctx || + ops->change_chanctx == ieee80211_emulate_change_chanctx || + ops->remove_chanctx == ieee80211_emulate_remove_chanctx)) { + printf("%s: not emulating chanctx changes but emulating " + "function set: %d/%d/%d\n", __func__, + ops->add_chanctx == ieee80211_emulate_add_chanctx, + ops->change_chanctx == ieee80211_emulate_change_chanctx, + ops->remove_chanctx == ieee80211_emulate_remove_chanctx); + return (NULL); + } + if (!emuchanctx && (ops->add_chanctx == NULL || ops->change_chanctx == NULL || + ops->remove_chanctx == NULL || ops->assign_vif_chanctx == NULL || + ops->unassign_vif_chanctx == NULL)) { + printf("%s: not all functions set for chanctx operations " + "(emulating chanctx %d): %p/%p/%p %p/%p\n", + __func__, emuchanctx, + ops->add_chanctx, ops->change_chanctx, ops->remove_chanctx, + ops->assign_vif_chanctx, ops->unassign_vif_chanctx); + return (NULL); + } /* Get us and the driver data also allocated. */ wiphy = wiphy_new(&linuxkpi_mac80211cfgops, sizeof(*lhw) + priv_len); @@ -6618,6 +6667,7 @@ linuxkpi_ieee80211_alloc_hw(size_t priv_len, const struct ieee80211_ops *ops) /* Chanctx_conf */ INIT_LIST_HEAD(&lhw->lchanctx_list); INIT_LIST_HEAD(&lhw->lchanctx_list_reserved); + lhw->emulate_chanctx = emuchanctx; /* Deferred RX path. */ LKPI_80211_LHW_RXQ_LOCK_INIT(lhw); @@ -6637,6 +6687,8 @@ linuxkpi_ieee80211_alloc_hw(size_t priv_len, const struct ieee80211_ops *ops) /* BSD Specific. */ lhw->ic = lkpi_ieee80211_ifalloc(); + if (lhw->emulate_chanctx) + ic_printf(lhw->ic, "Using chanctx emulation.\n"); IMPROVE(); return (hw); @@ -9220,6 +9272,35 @@ linuxkpi_cfg80211_bss_flush(struct wiphy *wiphy) /* -------------------------------------------------------------------------- */ +static bool +cfg80211_chan_def_are_same(struct cfg80211_chan_def *cd1, + struct cfg80211_chan_def *cd2) +{ + + if (cd1 == cd2) + return (true); + + if (cd1 == NULL || cd2 == NULL) + return (false); + + if (cd1->chan != cd2->chan) + return (false); + + if (cd1->width != cd2->width) + return (false); + + if (cd1->center_freq1 != cd2->center_freq1) + return (false); + + if (cd1->center_freq2 != cd2->center_freq2) + return (false); + + if (cd1->punctured != cd2->punctured) + return (false); + + return (true); +} + /* * hw->conf get initialized/set in various places for us: * - linuxkpi_ieee80211_alloc_hw(): flags @@ -9228,20 +9309,42 @@ linuxkpi_cfg80211_bss_flush(struct wiphy *wiphy) * - lkpi_ic_set_channel(): chandef, flags */ -int lkpi_80211_update_chandef(struct ieee80211_hw *hw, +static int +lkpi_80211_update_chandef(struct ieee80211_hw *hw, struct ieee80211_chanctx_conf *new) { + struct lkpi_hw *lhw; struct cfg80211_chan_def *cd; uint32_t changed; int error; + bool same; - changed = 0; - if (new == NULL || new->def.chan == NULL) - cd = NULL; - else + lockdep_assert_wiphy(hw->wiphy); + + lhw = HW_TO_LHW(hw); + if (!lhw->emulate_chanctx) + return (0); + + if (new == NULL || new->def.chan == NULL) { + /* + * In case of remove "new" is NULL, we need to get us to some + * basic channel width but we'd also need to set the channel + * accordingly somewhere. + * The same is true if we are scanning in which case the + * scan_chandef should have a channel set. + */ + if (lhw->scan_chandef.chan != NULL) { + cd = &lhw->scan_chandef; + } else { + cd = &lhw->dflt_chandef; + } + } else { cd = &new->def; + } - if (cd && cd->chan != hw->conf.chandef.chan) { + changed = 0; + same = cfg80211_chan_def_are_same(cd, &hw->conf.chandef); + if (!same) { /* Copy; the chan pointer is fine and will stay valid. */ hw->conf.chandef = *cd; changed |= IEEE80211_CONF_CHANGE_CHANNEL; @@ -9255,6 +9358,97 @@ int lkpi_80211_update_chandef(struct ieee80211_hw *hw, return (error); } +int +ieee80211_emulate_add_chanctx(struct ieee80211_hw *hw, + struct ieee80211_chanctx_conf *chanctx_conf) +{ + int error; + + lockdep_assert_wiphy(hw->wiphy); + +#ifdef LINUXKPI_DEBUG_80211 + if ((linuxkpi_debug_80211 & D80211_TRACE) != 0) { + struct lkpi_hw *lhw; + + lhw = HW_TO_LHW(hw); + ic_printf(lhw->ic, "%s:%d: chanctx_conf %p\n", + __func__, __LINE__, chanctx_conf); + } +#endif + + hw->conf.radar_enabled = chanctx_conf->radar_enabled; + error = lkpi_80211_update_chandef(hw, chanctx_conf); + return (error); +} + +void +ieee80211_emulate_remove_chanctx(struct ieee80211_hw *hw, + struct ieee80211_chanctx_conf *chanctx_conf __unused) +{ + + lockdep_assert_wiphy(hw->wiphy); + +#ifdef LINUXKPI_DEBUG_80211 + if ((linuxkpi_debug_80211 & D80211_TRACE) != 0) { + struct lkpi_hw *lhw; + + lhw = HW_TO_LHW(hw); + ic_printf(lhw->ic, "%s:%d: chanctx_conf %p\n", + __func__, __LINE__, chanctx_conf); + } +#endif + + hw->conf.radar_enabled = false; + lkpi_80211_update_chandef(hw, NULL); +} + +void +ieee80211_emulate_change_chanctx(struct ieee80211_hw *hw, + struct ieee80211_chanctx_conf *chanctx_conf, uint32_t changed __unused) +{ + + lockdep_assert_wiphy(hw->wiphy); + +#ifdef LINUXKPI_DEBUG_80211 + if ((linuxkpi_debug_80211 & D80211_TRACE) != 0) { + struct lkpi_hw *lhw; + + lhw = HW_TO_LHW(hw); + ic_printf(lhw->ic, "%s:%d: chanctx_conf %p\n", + __func__, __LINE__, chanctx_conf); + } +#endif + + hw->conf.radar_enabled = chanctx_conf->radar_enabled; + lkpi_80211_update_chandef(hw, chanctx_conf); +} + +int +ieee80211_emulate_switch_vif_chanctx(struct ieee80211_hw *hw, + struct ieee80211_vif_chanctx_switch *vifs, int n_vifs, + enum ieee80211_chanctx_switch_mode mode __unused) +{ + struct ieee80211_chanctx_conf *chanctx_conf; + int error; + + lockdep_assert_wiphy(hw->wiphy); + + /* Sanity check. */ + if (n_vifs <= 0) + return (-EINVAL); + if (vifs == NULL || vifs[0].new_ctx == NULL) + return (-EINVAL); + + /* + * What to do if n_vifs > 1? + * Does that make sense for drivers not supporting chanctx? + */ + hw->conf.radar_enabled = vifs[0].new_ctx->radar_enabled; + chanctx_conf = vifs[0].new_ctx; + error = lkpi_80211_update_chandef(hw, chanctx_conf); + return (error); +} + /* -------------------------------------------------------------------------- */ MODULE_VERSION(linuxkpi_wlan, 1); diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index 07816cdfe166..235597ea7a94 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -318,6 +318,7 @@ struct lkpi_hw { /* name it mac80211_sc? */ bool mc_all_multi; bool update_wme; bool rxq_stopped; + bool emulate_chanctx; /* Must be last! */ struct ieee80211_hw hw __aligned(CACHE_LINE_SIZE); From nobody Wed Apr 22 21:08:47 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfS1nVLz6bKmp for ; Wed, 22 Apr 2026 21:08:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1BfR5p5Zz3lQr for ; Wed, 22 Apr 2026 21:08:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zfxt1xmGBrDI/q2t9YIVS3scL8LVlsZIcarf+22fF58=; b=UmnX7qEJP8j44OgoxogbwSvurosdZXQEXtJ25NM5ysK9Jyc5TktuPO7ckkROCAzzxrzE6k FgJKwRvp+Aqopa7cqlSk7VRrbn1P4O6d8q/XTyzSlKBOL3QDkiyfunX7JrCvArs/k9s769 DlATy29UKOwsc8bveK8ikPcadlDKMtPMP7QFC2xzCcWpmBgO9E4M5/6xoMMgJPdwV4vQzV 1hefKnK27meI57QTO+vBNbLoky7WPgUOoUzyAPPPX978I1V+lqkF7dYqhABE3LzojG8zdO 4Jn1Pcj6aJCXGUs6g07dHg02FzH3pvYKQGkzd69GnzlD2jZPRwBbvJ4iuQ4RJQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892127; a=rsa-sha256; cv=none; b=JFk42A1s/w0XIvikmZsV1x3TekLQfHuKzis8j4h82VZXP27zh6w4etpmYen1vEKHE8WPFZ /ot9VXeDrIDqraE60OgAzxL2adjxJzoHPNdlN9ozdissOfmtGepA2Idktj7vUOL6q1ouI1 SDrQ3n0hY9Ts+ZF2A2UAwcbr/HAIgjUqDunhWqWCoz74U/dQf4g0vE+nND2mFGikYorZ3M V8Gcqqczc7pYYkLkwouHUB+nQurHQSUG+vvruQrHfxY+0jvTsaU23mJMxxNoWasSlJG4/3 8DTPYGdxA626r5DjKQGDJDN57VR0sgpl6HRAWKk2qvTaobIJK9NXdKMeMMQYmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zfxt1xmGBrDI/q2t9YIVS3scL8LVlsZIcarf+22fF58=; b=JoULG5Vvi/Wv6ZAmDaw57cehuFqk3c7MAEaXTefrujTbtJ3IYZXrS9B0pYi436P61RxUbg e0EMbkeHTA4lg1LjjnfOaZyFMN10fnyZ8uX6FoNTNJ0U8FjiLah2fb8CCir5ycjMitf0+I bHmi9iAjq5/13d7uAw/d0Oc77F32IQGPe6eFcqfXlcNOjpJu04etkIkc5iqk707bjNc+Mm GpTXjW6uU8usyt92y3B+xbVttaZWaSgKE++uHem+L4EL6MYF6uHoitC0nvDDVyyLe6Y9tM qobGM0LerkpD16a33I+X0YwtDk9eCxJktBqiEe3Na4cV407lDTNDfov//Yb86Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfR5D20znjX for ; Wed, 22 Apr 2026 21:08:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2767c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 222fee361c66 - stable/15 - LinuxKPI: 802.11: add chandef tracing List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 222fee361c66b140e0a2d09a8e43eabd05389b29 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:47 +0000 Message-Id: <69e938df.2767c.84dba55@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=222fee361c66b140e0a2d09a8e43eabd05389b29 commit 222fee361c66b140e0a2d09a8e43eabd05389b29 Author: Bjoern A. Zeeb AuthorDate: 2026-04-03 19:59:02 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:06 +0000 LinuxKPI: 802.11: add chandef tracing Add chandef tracing so we can follow what is set and unset in the chanctx emulation for drivers still needing this. Sponsored by: The FreeBSD Foundation (cherry picked from commit 72b9dda511b6944068fb18c2f2e059bca48d9edd) --- sys/compat/linuxkpi/common/src/linux_80211.c | 79 ++++++++++++++++++++++++++-- sys/compat/linuxkpi/common/src/linux_80211.h | 1 + 2 files changed, 77 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index c2f2adfc7053..e1a3daf98cb2 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2219,7 +2219,8 @@ lkpi_80211_flush_tx(struct lkpi_hw *lhw, struct lkpi_sta *lsta) } static void -lkpi_init_chandef(struct cfg80211_chan_def *chandef, +lkpi_init_chandef(struct ieee80211com *ic __unused, + struct cfg80211_chan_def *chandef, struct linuxkpi_ieee80211_channel *chan, struct ieee80211_channel *c, bool can_ht) { @@ -2248,6 +2249,17 @@ lkpi_init_chandef(struct cfg80211_chan_def *chandef, chandef->width = NL80211_CHAN_WIDTH_80; } #endif + +#ifdef LINUXKPI_DEBUG_80211 + if ((linuxkpi_debug_80211 & D80211_CHANDEF) != 0) + ic_printf(ic, "%s:%d: chandef %p { chan %p { %u }, " + "width %d cfreq1 %u cfreq2 %u punctured %u }\n", + __func__, __LINE__, chandef, + chandef->chan, chandef->chan->center_freq, + chandef->width, + chandef->center_freq1, chandef->center_freq2, + chandef->punctured); +#endif } static uint32_t @@ -2587,11 +2599,18 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int #else can_ht = false; #endif - lkpi_init_chandef(&chandef, chan, ni->ni_chan, can_ht); + lkpi_init_chandef(vap->iv_ic, &chandef, chan, ni->ni_chan, can_ht); hw->conf.radar_enabled = ((chan->flags & IEEE80211_CHAN_RADAR) != 0) ? true : false; hw->conf.chandef = chandef; vif->bss_conf.chanreq.oper = hw->conf.chandef; +#ifdef LINUXKPI_DEBUG_80211 + if ((linuxkpi_debug_80211 & D80211_CHANDEF) != 0) + ic_printf(vap->iv_ic, "%s:%d: hw->conf.chandef %p = chandef %p = " + "vif->bss_conf.chanreq.oper %p\n", __func__, __LINE__, + &hw->conf.chandef, &chandef, &vif->bss_conf.chanreq.oper); +#endif + changed = lkpi_init_chanctx_conf(hw, &chandef, chanctx_conf); /* Responder ... */ @@ -5205,6 +5224,11 @@ lkpi_ic_set_channel(struct ieee80211com *ic) /* We always set the chandef to no-HT for scanning. */ cfg80211_chandef_create(&lhw->scan_chandef, chan, NL80211_CHAN_NO_HT); +#ifdef LINUXKPI_DEBUG_80211 + if ((linuxkpi_debug_80211 & D80211_CHANDEF) != 0) + ic_printf(ic, "%s:%d: initialized lhw->scan_chandef\n", + __func__, __LINE__); +#endif /* * This works for as long as we do not do BGSCANs; otherwise @@ -5232,7 +5256,7 @@ lkpi_ic_set_channel(struct ieee80211com *ic) }; struct cfg80211_chan_def chandef; - lkpi_init_chandef(&chandef, chan, c, false); + lkpi_init_chandef(ic, &chandef, chan, c, false); ieee80211_iter_chan_contexts_mtx(hw, lkpi_ic_set_channel_chanctx_iterf, &chanctx_iter_arg); @@ -5252,6 +5276,11 @@ lkpi_ic_set_channel(struct ieee80211com *ic) lvif = VAP_TO_LVIF(vap); vif = LVIF_TO_VIF(lvif); +#ifdef LINUXKPI_DEBUG_80211 + if ((linuxkpi_debug_80211 & D80211_CHANDEF) != 0) + ic_printf(ic, "%s:%d: using on stack chandef\n", + __func__, __LINE__); +#endif chanctx_conf = lkpi_get_chanctx_conf(hw, vif); changed = lkpi_init_chanctx_conf(hw, &chandef, chanctx_conf); IMPROVE("update HT, VHT, bw, ..."); @@ -5264,6 +5293,12 @@ lkpi_ic_set_channel(struct ieee80211com *ic) */ IMPROVE("update HT, VHT, bw, ..."); +#ifdef LINUXKPI_DEBUG_80211 + if ((linuxkpi_debug_80211 & D80211_CHANDEF) != 0) + ic_printf(ic, "%s:%d: using on stack chandef\n", + __func__, __LINE__); +#endif + chanctx_conf = chanctx_iter_arg.chanctx_conf; changed = lkpi_init_chanctx_conf(hw, &chandef, chanctx_conf); lkpi_80211_mo_change_chanctx(hw, chanctx_conf, changed); @@ -7073,6 +7108,12 @@ linuxkpi_ieee80211_ifattach(struct ieee80211_hw *hw) #endif NL80211_CHAN_NO_HT); lhw->dflt_chandef = hw->conf.chandef; +#ifdef LINUXKPI_DEBUG_80211 + if ((linuxkpi_debug_80211 & D80211_CHANDEF) != 0) + ic_printf(ic, "%s:%d: initialized " + "hw->conf.chandef and dflt_chandef to %p\n", + __func__, __LINE__, &lhw->dflt_chandef); +#endif break; } } @@ -9334,11 +9375,26 @@ lkpi_80211_update_chandef(struct ieee80211_hw *hw, * scan_chandef should have a channel set. */ if (lhw->scan_chandef.chan != NULL) { +#ifdef LINUXKPI_DEBUG_80211 + if ((linuxkpi_debug_80211 & D80211_CHANDEF) != 0) + ic_printf(lhw->ic, "%s:%d: using scan_chandef %p\n", + __func__, __LINE__, &lhw->scan_chandef); +#endif cd = &lhw->scan_chandef; } else { +#ifdef LINUXKPI_DEBUG_80211 + if ((linuxkpi_debug_80211 & D80211_CHANDEF) != 0) + ic_printf(lhw->ic, "%s:%d: using dflt_chandef %p\n", + __func__, __LINE__, &lhw->dflt_chandef); +#endif cd = &lhw->dflt_chandef; } } else { +#ifdef LINUXKPI_DEBUG_80211 + if ((linuxkpi_debug_80211 & D80211_CHANDEF) != 0) + ic_printf(lhw->ic, "%s:%d: using chanctx %p chandef %p\n", + __func__, __LINE__, new, &new->def); +#endif cd = &new->def; } @@ -9351,6 +9407,23 @@ lkpi_80211_update_chandef(struct ieee80211_hw *hw, } IMPROVE("IEEE80211_CONF_CHANGE_PS, IEEE80211_CONF_CHANGE_POWER"); +#ifdef LINUXKPI_DEBUG_80211 + if ((linuxkpi_debug_80211 & D80211_CHANDEF) != 0) + ic_printf(lhw->ic, "%s:%d: chanctx %p { %u } cd %p { %u } " + "hw->conf.chandef %p { %u %d %u %u %u }, " + "changed %#04x same %d\n", + __func__, __LINE__, + new, (new != NULL && new->def.chan != NULL) ? + new->def.chan->center_freq : 0, + cd, cd->chan->center_freq, + &hw->conf.chandef, hw->conf.chandef.chan->center_freq, + hw->conf.chandef.width, + hw->conf.chandef.center_freq1, + hw->conf.chandef.center_freq2, + hw->conf.chandef.punctured, + changed, same); +#endif + if (changed == 0) return (0); diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index 235597ea7a94..569c4f12f6d6 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -57,6 +57,7 @@ #define D80211_IMPROVE 0x00000002 #endif #define D80211_IMPROVE_TXQ 0x00000004 +#define D80211_CHANDEF 0x00000008 #define D80211_TRACE 0x00000010 #define D80211_TRACEOK 0x00000020 #define D80211_SCAN 0x00000040 From nobody Wed Apr 22 21:08:48 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfT1NVYz6bL7j for ; Wed, 22 Apr 2026 21:08:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1BfS61Bcz3lNt for ; Wed, 22 Apr 2026 21:08:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HCZXhXH7TermfBxBwISXPrIQEogYtGJ2s0XFmHuMPfY=; b=hJy+TFmIC2DUISQUAKJBf2K/YPYh0uj0EI0vxIi5kjEtrPhJxoAgEEPj0JNMiXIvGekt4s QMDkwgNm/SuI73izk+L6Z+sJxNcK67f30on9WNojOBe06EL9VLN/ZQ0/KzkeUv3RDEC5MC +YD5rwmvHRBzvAtE+D2ULa7F/bS5XWhyfihMP/x8J3vr8ZL+5qoIyssXC1V1H3vevL1Fwm fhfMPe8LPqD8zeje2Zbaaz49rVY/HRn8fXVVRh31EXYMENvorgBHgf+Y2j94TXqAkodTjb R5EkHW3gKMcLl7m17hI29nYXQg5PFcuy+9AI4PpEZvs89802euQKdxEoZiQL+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892128; a=rsa-sha256; cv=none; b=S91PB8qqi565FzphqCqTBgVOMDKqmFGVS0l5e6YEU8C2sNyl8xqF+wrs0XftonFLYNilzC H6ZVR6mP/h5mPORi5jv4ZXE0kYKmx2APv9P1vR/tBoJIhUrZauUqMsbzm9bp7Sg32mS5/U w1r/SJA8/EARmg779k1zXnl7rMwqUdDL6ezRLDfKa9Hd6f4jaUgFb19M5vkMOJzwoE9hkX e1JmEFhj0Jo64gFmhtiwDSqtiUW2HGnRWsktUhr9nHNAYDABEe6vwFDIcpAa3NxipXfWPU UuN4jUUYsZNRnUgUAJE6nyo/SGvgmj0KZX87ta92chRO6glkpF6GBm0CrOdC8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HCZXhXH7TermfBxBwISXPrIQEogYtGJ2s0XFmHuMPfY=; b=uk+YaFipMy5bGryodpqvWx64zsLCd+Pejb7oNU+3eWmxmOMc6rIrUheB8o6wNZ9G3Nwj49 RbkAYMrUjrr2u+5IfZmzaE4/KvNWa0q+vh1LRFLMhqSOo/snEbMafHu/uYsrQVDW2V9o8D aS/quQQNefsBJCrDkiVKwAnN5PT7QSOS3FdFr7cGP46dSGpN5fU0LGwa0dTql4hlKhTYkh 6HsTSNoRSbpZa+AI7rX5efOISHVprUH9t76XCggpeBY/ERUekqEo+vK7He0BEy/H6/b03q rnGOsbokegMhqEkUqOovvUO6/YwkCFPnuDCFfgmnUR06v0la2JkEvlxSOhFlvQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfS5cVpznpK for ; Wed, 22 Apr 2026 21:08:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26a2e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: c282b53edbd6 - stable/15 - LinuxKPI: 802.11: start filling vif->cfg.ap_addr List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c282b53edbd692e8c7df31419b5f65c318d50274 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:48 +0000 Message-Id: <69e938e0.26a2e.c1c040c@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c282b53edbd692e8c7df31419b5f65c318d50274 commit c282b53edbd692e8c7df31419b5f65c318d50274 Author: Bjoern A. Zeeb AuthorDate: 2026-04-16 23:42:03 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:06 +0000 LinuxKPI: 802.11: start filling vif->cfg.ap_addr vif->cfg.ap_addr is used by various drivers now and is the BSSID for non-MLO or the AP addr for MLO configurations. If this is unset rtw89 gets cranky and certain packets are likely not going out correctly (also for iwlwifi). Sponsored by: The FreeBSD Foundation (cherry picked from commit dc886a4428712aa4fcdcf8cd9e850b048c923bbf) --- sys/compat/linuxkpi/common/src/linux_80211.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index e1a3daf98cb2..89395f2f98b8 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2617,6 +2617,7 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Set bss info (bss_info_changed). */ bss_changed = 0; + IEEE80211_ADDR_COPY(vif->cfg.ap_addr, ni->ni_bssid); vif->bss_conf.bssid = ni->ni_bssid; bss_changed |= BSS_CHANGED_BSSID; vif->bss_conf.txpower = ni->ni_txpower; @@ -3467,6 +3468,7 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int bss_changed |= BSS_CHANGED_QOS; vif->cfg.ssid_len = 0; memset(vif->cfg.ssid, '\0', sizeof(vif->cfg.ssid)); + IEEE80211_ADDR_COPY(vif->cfg.ap_addr, ieee80211broadcastaddr); bss_changed |= BSS_CHANGED_BSSID; vif->bss_conf.use_short_preamble = false; /* XXX BSS_CHANGED_???? */ @@ -4072,6 +4074,7 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], vif->bss_conf.qos = false; vif->bss_conf.use_cts_prot = false; /* vap->iv_protmode */ vif->bss_conf.ht_operation_mode = IEEE80211_HT_OP_MODE_PROTECTION_NONE; + IEEE80211_ADDR_COPY(vif->cfg.ap_addr, ieee80211broadcastaddr); vif->cfg.aid = 0; vif->cfg.assoc = false; vif->cfg.idle = true; @@ -7913,13 +7916,13 @@ no_trace_beacons: struct ieee80211_vif *vif; struct ieee80211_frame *wh; - wh = mtod(m, struct ieee80211_frame *); - if (!IEEE80211_ADDR_EQ(wh->i_addr2, ni->ni_bssid)) - goto skip_device_ts; - lvif = VAP_TO_LVIF(vap); vif = LVIF_TO_VIF(lvif); + wh = mtod(m, struct ieee80211_frame *); + if (!IEEE80211_ADDR_EQ(wh->i_addr2, vif->cfg.ap_addr)) + goto skip_device_ts; + IMPROVE("TIMING_BEACON_ONLY?"); /* mac80211 specific (not net80211) so keep it here. */ vif->bss_conf.sync_device_ts = rx_status->device_timestamp; @@ -8757,8 +8760,6 @@ struct sk_buff * linuxkpi_ieee80211_nullfunc_get(struct ieee80211_hw *hw, struct ieee80211_vif *vif, int linkid, bool qos) { - struct lkpi_vif *lvif; - struct ieee80211vap *vap; struct sk_buff *skb; struct ieee80211_frame *nullf; @@ -8770,17 +8771,15 @@ linuxkpi_ieee80211_nullfunc_get(struct ieee80211_hw *hw, skb_reserve(skb, hw->extra_tx_headroom); - lvif = VIF_TO_LVIF(vif); - vap = LVIF_TO_VAP(lvif); - nullf = skb_put_zero(skb, sizeof(*nullf)); nullf->i_fc[0] = IEEE80211_FC0_VERSION_0; nullf->i_fc[0] |= IEEE80211_FC0_SUBTYPE_NODATA | IEEE80211_FC0_TYPE_DATA; nullf->i_fc[1] = IEEE80211_FC1_DIR_TODS; - IEEE80211_ADDR_COPY(nullf->i_addr1, vap->iv_bss->ni_bssid); + /* XXX-BZ if link is given, this is different. */ + IEEE80211_ADDR_COPY(nullf->i_addr1, vif->cfg.ap_addr); IEEE80211_ADDR_COPY(nullf->i_addr2, vif->addr); - IEEE80211_ADDR_COPY(nullf->i_addr3, vap->iv_bss->ni_macaddr); + IEEE80211_ADDR_COPY(nullf->i_addr3, vif->cfg.ap_addr); return (skb); } From nobody Wed Apr 22 21:08:49 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfV4g7xz6bKyc for ; Wed, 22 Apr 2026 21:08:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1BfT6l5vz3lZ7 for ; Wed, 22 Apr 2026 21:08:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PI6seTii7tIY0RJF9zP/ElLjoG4ai6ZUGPiHtfE89Kw=; b=bPQwteTyEycmPsAHWZPOJEoX4ltYSQ7Q1UJv4TFak8v6Juin4g+Cj+1Eum5IZYzBCDdBST UfGvyo3kVmIpMsn8raJL7Z3tejLVOawGqCFOU2Fbw8yGdLtmpCMxe845jRhiOemEBrcamc jRQd6MGoKcN9SFLnulIz8NG01CJRF0hAvj5MU4RzvQQ/2HIuyUmxdjmXs4ZIDEdLEqwpJD zq2UDooNh8zU2NsfvCwqN4lyGFSii8H9z8aMBMl4/tZgDWa72odsgcSODRH4vijIyiDfBs tqwPx0sjWchHC0NdszS9hKH1RkRUjF/nr4uJf/k8qjz1+SE76/ezg0ChrBan7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892130; a=rsa-sha256; cv=none; b=OZQ2bSIX/hudAHgqlzqU6ZoFvm8eDofg8YOsPOt3qkicsGuXfFBdtij8padBuLZuwcpx6v W2CWLYf1MNBvuYARZnYaR5CUdsllHdNF7GARLto5eLalHEGUIJ65nhQqX6+c+DWZdVQ3V4 JXq2dMNTFyAuonfSCGU9gQe+4YTv7OwZBcei95ujFryjcZYxQSjTtQznhkom0lUd/vQMvh vHs9S+UyxqIAXNPy3Cc7gCQ7UC+tBTHuZkC+QJt6opIAQcwa9LhaUzFePxexLeqBMWdJFw FWVvzb+jGPf7hykTnK3Q8jpNq86zO0h3/qKFOji2Mt+bO9W7ElMvcUj8Jjr8BA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PI6seTii7tIY0RJF9zP/ElLjoG4ai6ZUGPiHtfE89Kw=; b=liXuRv4E9rYYPCvbeNEQ6EvPqvoP5oeYExnmoz6KIpfrm8fZnTSaN3PvZgP4QYGlCNMX5S 23fVeTlmp5+r3ounTTYQ/F6ZOBWh3O9TysBSgnc1F+UDQgzRr+2OWLkYrjwiuRn4EzDyyC kibrH5lbAXZn5xtM1egOJnZZu4TgIWa2urnUBcHnZorezRPmjMsPQSGD2/LHsHwfxeucxO LZI1aWC7j+EwcRZUvuS/uMNueKqdOI+9wk8gOZAFCAnvv5Rw0uWs94B3lnR8WSKxLIpCAH qns2cEkZzUSPJ1hh6JcC7rx/XvdTJWhiMUDGOw1S7kX5+Cj5GPdMG6TWEr7Sww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfT6Hwvznly for ; Wed, 22 Apr 2026 21:08:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30511 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 83648b5d42e6 - stable/15 - LinuxKPI: 802.11: make sure dtim_period is 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 83648b5d42e67e2be2c084028d684009a84da5a7 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:49 +0000 Message-Id: <69e938e1.30511.500975d2@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=83648b5d42e67e2be2c084028d684009a84da5a7 commit 83648b5d42e67e2be2c084028d684009a84da5a7 Author: Bjoern A. Zeeb AuthorDate: 2026-04-17 02:34:51 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:06 +0000 LinuxKPI: 802.11: make sure dtim_period is set When going from ASSOC to RUN LinuxKPI based wireless drivers have certian expectations written in various ways. I believe mac80211 waits to see a beacon before setting the vif to assoc (or the sta to AUTHORIZED). We have some comments in lkpi_update_dtim_tsf() for that. In practice we can filter out the beacons already and know when they came in as we count them but it is hard to split up the state machine and defer the work. So we make sure that dtim_period is set to at least 1 before calling the (*vif_cfg_change) after setting assoc to true; 0 is a reserved value according to the standards. We will update it once we see a beacon and in case the value differs from 1 shortly afterwards from the recv_mgmt callback. While iwlwifi seems to have coped with our initial implementation, rtw89 may hit a DIV 0 if dtim_period is 0 depending on how well the rx path races with our unlocking in assoc_to_run. Sponsored by: The FreeBSD Foundation (cherry picked from commit 9f20a4ebf044eb0cab83397c83f13bb3958abf6a) --- sys/compat/linuxkpi/common/src/linux_80211.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 89395f2f98b8..b9528295ad8e 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2013,12 +2013,23 @@ lkpi_update_dtim_tsf(struct ieee80211_vif *vif, struct ieee80211_node *ni, * make sure we do not do it on every beacon we still may * get so only do if something changed. vif->bss_conf.dtim_period * should be 0 as we start up (we also reset it on teardown). + * + * If we are assoc we need to make sure dtim_period is non-0. + * 0 is a reserved value and drivers assume they can DIV by it. + * In theory this means we need to wait for the first beacon + * before we finalize the vif being assoc. In practise that + * is harder until net80211 learns how to. Work around like + * this for the moment. */ - if (vif->cfg.assoc && - vif->bss_conf.dtim_period != ni->ni_dtim_period && - ni->ni_dtim_period > 0) { - vif->bss_conf.dtim_period = ni->ni_dtim_period; - bss_changed |= BSS_CHANGED_BEACON_INFO; + if (vif->cfg.assoc) { + if (vif->bss_conf.dtim_period != ni->ni_dtim_period && + ni->ni_dtim_period > 0) { + vif->bss_conf.dtim_period = ni->ni_dtim_period; + bss_changed |= BSS_CHANGED_BEACON_INFO; + } else if (vif->bss_conf.dtim_period == 0) { + vif->bss_conf.dtim_period = 1; + bss_changed |= BSS_CHANGED_BEACON_INFO; + } } vif->bss_conf.sync_dtim_count = ni->ni_dtim_count; From nobody Wed Apr 22 21:08:50 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfW2dJdz6bL2C for ; Wed, 22 Apr 2026 21:08:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1BfW0fw0z3lPD for ; Wed, 22 Apr 2026 21:08:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y19KvymqiV05smGhlnYet3hp1QRiEOZYDPt4Svf62JQ=; b=vOIAEadEgFX5WKDYEcb4ESDok0cVoQSuHziIb0aIZqxb7IkQLPuIGSLPrqR9u5hyMUhwuF Ca1yLyDYn0jlnJvbmS90Hjg/+dgrzaDtavCjsru5G/6V+jOngleecjeRMYBzrLEuIomv1/ XHp1MuGdPFLb5iBZ3f6pKnYDKLQVWXu1w//r++GVUGb97LSmVrfw74IYJV2K+S00tLK5dn r1O1yYQ5Ss2mCeljZehsztXNOMzz1EJMIiSpnTa3GsclsK9zRRbDP9mrzsdnVjSsvWNEEe IrbRdf2SFpSmrMUuthFLPjgooRHVkjVctgOMM5ofG/jaIxTS94co8H+K5xEdHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892131; a=rsa-sha256; cv=none; b=Wo7Rjy++Hnpl7OJRIbh4D6Ei5p8SKSwISyMlKEMcQ82HuY5nidjkN/Rr6ugrcEJTFhB4a+ OXG4O9jPZr+gcmu7O9DXX7lJyrc7az01uB3zJ7Fn3jV5ZG30FY6TjkxbCx+eVqS/vuUTdj JZwFeXBXOiACS+2ELtHz+A+cScMa1f7NVEdLrn0Sb13y4FcccIy7u3Ecg/c35v9siHD48F KLgmFd+Je3UfURww8baWiw1f32ChuVvV/BFoozBYlL03cBymJ8rJJ0Ujk1C+xNIqiH6dLa LesPuVXMiqH4WJBoNGScAimcO9BaMMF5WXCuUpIoZTDFHlrguLTikOe0j53D/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y19KvymqiV05smGhlnYet3hp1QRiEOZYDPt4Svf62JQ=; b=T+pjVXp4BxJ0gor5ttVhWI3bHPxxS6yWjdfWW9jE8Jd3+l+8c28gVz1CY26dV24LAuzdGz ZNfTG6L/bEv/fz2b+tHVu4urxpXgWtsZ+Cr69FX2MPEQ3c3xPNNaJvTLg3ZNseGBPwpCx5 Y29HGkTcd+gWc/0l1X8HhSATSsqwj0cmNrOzhXkdsKaVV8quI6flfCLcaoFtyhtDYpoZHb iNDwl4VqWmOVmvukFCqyx4vMOrJIT7LH8nSNGJlhlwLpvXhn5Awi8VVGBdb1ZeGAtWScx4 75sjreKY4ts+9zTnQljJBq4NFPcPJHJVs1EjZe18BdkjeZyEMylMAGpRw4CCXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfW00xgznZq for ; Wed, 22 Apr 2026 21:08:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 303bd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: d81388696014 - stable/15 - rtw89: add a warn about beacon_int or dtim_period being 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d81388696014dbfe21e434e1b660152bbbb41b35 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:50 +0000 Message-Id: <69e938e2.303bd.2bda0977@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d81388696014dbfe21e434e1b660152bbbb41b35 commit d81388696014dbfe21e434e1b660152bbbb41b35 Author: Bjoern A. Zeeb AuthorDate: 2026-04-17 02:40:03 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:07 +0000 rtw89: add a warn about beacon_int or dtim_period being 0 While after the changes to LinuxKPI 802.11 we should never be assoc and not have dtim_period set, we have seen before that this could happen. Add a WARN as that will help debugging the following DIV 0. Sponsored by: The FreeBSD Foundation (cherry picked from commit 99bbfb77e3c395805fe0a7f19006c5c29136f9fc) --- sys/contrib/dev/rtw89/core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/contrib/dev/rtw89/core.c b/sys/contrib/dev/rtw89/core.c index aeaf1c8f80c5..1dee73a62f98 100644 --- a/sys/contrib/dev/rtw89/core.c +++ b/sys/contrib/dev/rtw89/core.c @@ -2838,6 +2838,10 @@ static void rtw89_core_bcn_track_assoc(struct rtw89_dev *rtwdev, dtim = bss_conf->dtim_period; rcu_read_unlock(); +#if defined(__FreeBSD__) + WARN(beacon_int == 0 || dtim == 0, "period %u / beacon_int %u / dtim %u\n", + period, beacon_int, dtim); +#endif beacons_in_period = period / beacon_int / dtim; bcn_intvl_us = ieee80211_tu_to_usec(beacon_int); From nobody Wed Apr 22 21:08:52 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfX2yZdz6bL44 for ; Wed, 22 Apr 2026 21:08:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1BfX1GhTz3lcM for ; Wed, 22 Apr 2026 21:08:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892132; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8F1iF6ZmuLWtppQD28Gb4u8UYfnM0+wpQiKPzglL+DI=; b=G6gaOM40PWjRJ4P4ZrULK6QDSZA9WTgsWFuxdVQKZd+R7QLYMSUv/c0HeKNB4WbEpdFE+6 6IIh8FkY6WqWOTmNnQ2c3ULxJgLGK652JaU0P6ZrEHKt5ZU3TetWyEj4JFVnEGfCvUvp8a SQeq13ZIo8bpnxAnRexZ2+KSK8/N1JZdeLLNv/ESC3GhCyolaLkF4izqJ4d68INW5hmOjc S8vyjxP3gfN1B25GTeE3I9k45aM1Wq4E/4dyD4acqdgFPdrWBhPAnruICFuopmVgB9ICPJ X5cVOKWj6zF8LuiuuxYpnT6hR+WSlScOUuObjfEc1nQljfQ7jPuJQCzRqOUaRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892132; a=rsa-sha256; cv=none; b=YO+asz1NPtd/+gUixBAVsLpJlmwDiW2IRpIE/HKrnVfr/dE2CpPP6uqjV9EwJ1eYBpLIEm rd67QPvL3/q/vv5FEFPvW2asDAZVXECWBRo/j5s5sT7e5ylEZpjRiz5M6pun2jbhRWfEgk sQ4tXjJA+zNM0VO2sfS95ItSQ/gBUTws4UANtM+aMd5ntlRY2o2sNzErO8Rud/qnb8Dw8n EXmb0/+uzwOFqK7J5eLhkbQ9Sh4XcbWoOI6kN0QUR3QjTpSdGEH2j9OG4x8y1cLp8G8NLa 6wCCWun/7jKyofYyouK3nGuvA7VmOssP1Pj4tVwU+8rwIQnbKg2KxrcVVpKikw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892132; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8F1iF6ZmuLWtppQD28Gb4u8UYfnM0+wpQiKPzglL+DI=; b=Wc2G3I54mXduo6YY/Zb339S3hdy79rTQNbcE+0gFjmSz3MPf/RNimTq3OXUHo66/zVvJeu e1G+7hVdMSsoVCXclCH2TffKrJqTDxpeV+tblMgdp+BDsxzooIHw9E/rbvuS2lVFmZkXs9 XQiQVMqjq/yrV/lb61/FDvAD/kiMTBQaG2zBgYmGLMedYEoYcwIk3u423RFIm13m7KhiIZ LLBGhxlktonGWlnEIwQtcfQEeZ7rLWLOb5K01j23aZKs9I0i2yR0WzbO6Y4Sr6ijOVbesH VmBr+SxcrEb/WEyRyBX10ioP5ZDA7APpus+44hW10PlDZG5TqYcEDOgc6YRJzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfX0nd7znZr for ; Wed, 22 Apr 2026 21:08:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26ffd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: fa7215a9de27 - stable/15 - bnxt_en: fix module Makefile for LinuxKPI List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: fa7215a9de27fc6d3a0e25805a0c4fd96702e3d0 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:52 +0000 Message-Id: <69e938e4.26ffd.29183ae7@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=fa7215a9de27fc6d3a0e25805a0c4fd96702e3d0 commit fa7215a9de27fc6d3a0e25805a0c4fd96702e3d0 Author: Bjoern A. Zeeb AuthorDate: 2026-04-16 10:05:51 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:07 +0000 bnxt_en: fix module Makefile for LinuxKPI Rather than manually including the include directory for LinuxKPI use the provided macro. Before there was no -I for the dummy directory and as files synced from Linux under a permissive license may include them the build would fail. overflow.h will include linux/const.h which only exists as a dummy header at this point on FreeBSD. Sponsored by: The FreeBSD Foundation Fixes: 35b53f8c989f6 Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D56424 (cherry picked from commit f5cd992fa902ebb27a3a1042ee8e0d4d351bb361) --- sys/modules/bnxt/bnxt_en/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/modules/bnxt/bnxt_en/Makefile b/sys/modules/bnxt/bnxt_en/Makefile index d90f3b91d860..12c23898c106 100644 --- a/sys/modules/bnxt/bnxt_en/Makefile +++ b/sys/modules/bnxt/bnxt_en/Makefile @@ -14,6 +14,6 @@ SRCS += ${LINUXKPI_GENSRCS} CFLAGS+= -DIFLIB CFLAGS+= -I${SRCTOP}/sys/ofed/include -CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} .include From nobody Wed Apr 22 21:08:53 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfY3RNXz6bL47 for ; Wed, 22 Apr 2026 21:08:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1BfY1g2Wz3lf6 for ; Wed, 22 Apr 2026 21:08:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=grpOtlX6+OCf0VvcTHPXNzQvZlOaWDAiuhX8t5vWJMw=; b=OJRSmEkjT97ggQEspqBVlEZyQImwaOrbFJaLK7TIGT+h0+RRFJCzR3hOCZF3x70/M9AcSN vGmqvKo6dF7m1B4Lqre9eTj4/5UFlldCw+KuFNf+nQAL1b4C2H44vBVhNcde0+jH6Fa3Mr C1kL9fKEjkNFf8FlUgRC3a8pOkv3VtpXgEYWkGk50/+AKyl/lMecJQPIXl7WBb9PjV7mAL reo7JIDGnAS1IT5hK8ORAeg+AgIKelOiu7hUIwyGJb2pw2V2WVRc5H1k6rySCPYIHSJzEb DnNwU08LhDtYDha3EAdIq/77NFwG1VOKHZcPoNOaLFeuGG9otN+i0HBTgl8QYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892133; a=rsa-sha256; cv=none; b=d6voIR3j/8JwQltIzjMqDPuFabYgvKeJMQ9l69XsXYorT61/jfnCdcaJrDxqAAvfHq+9Q/ 0jE7M1ITYGA85wyLK0K5JC/Oh068ONAfav0mdykMCPJVm5Prye5EfsKesyPadlY8pDFrn/ uMXRBRISIXIkw8rexYq0/C0d33YKHWhZJxjzEwheqZaco+q8sZHQEtR9tWtAqBKgotQTvC WgKjV2rwKQ4zngfK3bBMaoZUxKR2j8HN4GZ1o5gQI4/VeXFvLQy++0iFCseGxWNQ9s4XPn 84coOGPVwKj0sjLtgjDKledHEVlBNxb2HMRl+d+sjLVJUjIHMwmZJJHF6pEj4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=grpOtlX6+OCf0VvcTHPXNzQvZlOaWDAiuhX8t5vWJMw=; b=p62QaQwWX9LrUKGz7BzuZ2lxyQ1+VLU+CjUlZB0WmLNZk+nNsK5zkToJJeN2D6KiGNnYk1 k1TXuYRrJR1nSvEfuGwoNue76wbLuP0EX4QaawgbNCk8pnDHYkfNial1GYfBifjySS7OpS KxZK83hmIQGshUd18I0DjT41SemnoTEOYsNr0SwJqhbzl0qwGZlJh3z+hJV6VrEqjHRYHF tX8nVwY7sQ5P1N+zNRXhT0NhfgEO3lNm91P2pEhsOz6FEEieSe7eUm1xtWTB1h/VyLztRi F7WqOcaXUBLNJ3KEYmWUfibaCQf7+qrrqbLJUFJjUmHNd0Dvdx2ek/NAZtAr0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfY19JDznm1 for ; Wed, 22 Apr 2026 21:08:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27bab by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 74455d192b8c - stable/15 - net80211: radiotap: add more VHT flags, and struct List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 74455d192b8c7197546289a10ab93e1312cd5ef4 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:53 +0000 Message-Id: <69e938e5.27bab.7863595f@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=74455d192b8c7197546289a10ab93e1312cd5ef4 commit 74455d192b8c7197546289a10ab93e1312cd5ef4 Author: Bjoern A. Zeeb AuthorDate: 2026-04-14 15:21:27 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:07 +0000 net80211: radiotap: add more VHT flags, and struct Add the struct for VHT information and flags for the known and flag field as documented on radiotap.org. iwlwifi has started filling in these details. While here, add Copyright information for all the additions in the last years. Sponsored by: The FreeBSD Foundation (cherry picked from commit 125b09de09ec5ca1939de0207090513453b5908e) --- sys/net80211/ieee80211_radiotap.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/sys/net80211/ieee80211_radiotap.h b/sys/net80211/ieee80211_radiotap.h index d729323fce3a..ce5350feac96 100644 --- a/sys/net80211/ieee80211_radiotap.h +++ b/sys/net80211/ieee80211_radiotap.h @@ -4,6 +4,10 @@ * SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 2003, 2004 David Young. All rights reserved. + * Copyright (c) 2021-2026 The FreeBSD Foundation + * + * Portions of this software were developed 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 @@ -377,7 +381,19 @@ enum ieee80211_radiotap_type { /* https://www.radiotap.org/fields/VHT.html */ #define IEEE80211_RADIOTAP_VHT_KNOWN_STBC 0x0001 /* net80211::IEEE80211_RADIOTAP_VHT_HAVE_STBC */ +#define IEEE80211_RADIOTAP_VHT_KNOWN_GI 0x0004 +#define IEEE80211_RADIOTAP_VHT_KNOWN_SGI_NSYM_DIS 0x0008 +#define IEEE80211_RADIOTAP_VHT_KNOWN_LDPC_EXTRA_OFDM_SYM 0x0010 #define IEEE80211_RADIOTAP_VHT_KNOWN_BEAMFORMED 0x0020 /* net80211::IEEE80211_RADIOTAP_VHT_HAVE_BF */ +#define IEEE80211_RADIOTAP_VHT_KNOWN_BANDWIDTH 0x0040 +#define IEEE80211_RADIOTAP_VHT_KNOWN_GROUP_ID 0x0080 +#define IEEE80211_RADIOTAP_VHT_KNOWN_PARTIAL_AID 0x0100 + +#define IEEE80211_RADIOTAP_VHT_FLAG_STBC 0x01 +#define IEEE80211_RADIOTAP_VHT_FLAG_SGI 0x04 +#define IEEE80211_RADIOTAP_VHT_FLAG_SGI_NSYM_M10_9 0x08 +#define IEEE80211_RADIOTAP_VHT_FLAG_LDPC_EXTRA_OFDM_SYM 0x10 +#define IEEE80211_RADIOTAP_VHT_FLAG_BEAMFORMED 0x20 /* https://www.radiotap.org/fields/0-length-PSDU.html */ #define IEEE80211_RADIOTAP_ZERO_LEN_PSDU_SOUNDING 0x00 @@ -399,6 +415,17 @@ struct ieee80211_radiotap_vendor_content { uint8_t data[]; } __packed; +/* https://www.radiotap.org/fields/VHT.html */ +struct ieee80211_radiotap_vht { + uint16_t known; + uint8_t flags; + uint8_t bandwidth; + uint8_t mcs_nss[4]; + uint8_t coding; + uint8_t group_id; + uint16_t partial_aid; +} __packed; + /* https://www.radiotap.org/fields/HE.html */ struct ieee80211_radiotap_he { uint16_t data1, data2, data3, data4, data5, data6; From nobody Wed Apr 22 21:08:54 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfZ5QZ9z6bL82 for ; Wed, 22 Apr 2026 21:08:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1BfZ2gkRz3ll8 for ; Wed, 22 Apr 2026 21:08:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZKg2m9dU7Ad5vJBocku9oadfjU/HAowBfBamwDdHFVs=; b=sjHu08VYaS5wQfMxDivqQovVTpmimgQUrb7FTaymz1Eb1H/AWlsQnWo7+uPwEAc47uiDAd +6ailjHbi6a3uIUnBLMIllYN2nVP+wiZtw9+PA8CLuIsMdFbtxAKQNHv9juIsld9hsjphT 6ACSDOb+P49LLNs4ewFas8hOsUK2iY1xLH72pIJ4ej29JI4Aq38zIkr04ARqkEmjHqL4NQ 7ZAgnNmoFjcdfWgwUAdUcEFT8+Mw1kndyU5S8Tb1n3MiXpL0qaBzuLPC70cRORKQT9xgst LXxkCHV2LBjR3dy2n5Q8BDc+GKFnEXKW4W9P52B/1+E7/JngliDbtglIUuQaPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892134; a=rsa-sha256; cv=none; b=OxYpJX/3wH+5pzYFfJXWpth/19EgTB4QBWtzeNy/gc0zeviRYj8sKAO+4X26Tu3XUF8AQb m2dxuXKzTtDOOdo0Sl6zY6MEid7OKPU5hkLuFr9/YzRohGYhQR3zX30N43vl7kUX5gej6b sF2u/imM5jzI4sT+OG1eqBRUjOEsL6GLO7TGWQ18M5axK6PhFvEggedmqi99c8WcNHmvul 3WT3KTzaTqxqvIieKR58mY1OZqo3ZWz/WMGIv6uTHiNbPCDFIh7PF+GRbIWCQNkRU43nZu 8slpju+KnB0hBIfabLwNP+BdWgqJpQIDKS20CxtNprqYZ/fJ9JSE1/tT8KwQMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZKg2m9dU7Ad5vJBocku9oadfjU/HAowBfBamwDdHFVs=; b=ds98BGxvQ55gz4RBDicPOOhU2jr7a75bjoUGkTfIwy+KdqIggtFxdipPFHISxlp77BWi7S 2V/zPyOisXHTIWnpwsXh5WYMoiKruEcELIInamGS302KwikMmFFhq9eqq1vOnC+xc3ZwkB M2Kjsi3q3uo472bEPrVD+2eshNqHCflbTaQKS7JIfz6nCbEl5ovJWsx1gqRJFS/b3gYGTj F/ivVx/v/7LW4LDmFQJX9jSY4JneND9zWd7HkSzgPTrB5YfBVN3N7M26WTk8XcZQqwCu30 UC0NNpHmM/h7Oc1lRbLSdfm5UeOhr30pjt+zerNOdwrUfjZmoSuKjybTFRmIbA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1BfZ1ycwznWw for ; Wed, 22 Apr 2026 21:08:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30a21 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 97c58ec8702f - stable/15 - LinuxKPI: move hex2bin() from kernel.h to new hex.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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 97c58ec8702ff1275f77e8d5ffb519da0d386268 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:54 +0000 Message-Id: <69e938e6.30a21.7c175af3@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=97c58ec8702ff1275f77e8d5ffb519da0d386268 commit 97c58ec8702ff1275f77e8d5ffb519da0d386268 Author: Bjoern A. Zeeb AuthorDate: 2026-04-14 13:36:40 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:08 +0000 LinuxKPI: move hex2bin() from kernel.h to new hex.h New Linux v7.0 drivers include hex.h. Rather than adding a dummy header, migrate the kernel.h hex2bin() into hex.h, where it belongs. Care needs to be taken as the _h2b() helper function is still used by other bits in kernel.h. Sponsored by: The FreeBSD Foundation Reviewed by: emaste, dumbbell Differential Revision: https://reviews.freebsd.org/D56391 (cherry picked from commit 98297ff3cfbb42df86fa7af51a2740d5aa7236eb) --- sys/compat/linuxkpi/common/include/linux/hex.h | 44 +++++++++++++++++++++++ sys/compat/linuxkpi/common/include/linux/kernel.h | 32 +---------------- 2 files changed, 45 insertions(+), 31 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/hex.h b/sys/compat/linuxkpi/common/include/linux/hex.h new file mode 100644 index 000000000000..7e9f499cfb1b --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/hex.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2022-2026 Bjoern A. Zeeb + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#ifndef _LINUXKPI_LINUX_HEX_H_ +#define _LINUXKPI_LINUX_HEX_H_ + +#include +#include + +static inline int +_h2b(const char c) +{ + + if (c >= '0' && c <= '9') + return (c - '0'); + if (c >= 'a' && c <= 'f') + return (10 + c - 'a'); + if (c >= 'A' && c <= 'F') + return (10 + c - 'A'); + return (-EINVAL); +} + +static inline int +hex2bin(uint8_t *bindst, const char *hexsrc, size_t binlen) +{ + int hi4, lo4; + + while (binlen > 0) { + hi4 = _h2b(*hexsrc++); + lo4 = _h2b(*hexsrc++); + if (hi4 < 0 || lo4 < 0) + return (-EINVAL); + + *bindst++ = (hi4 << 4) | lo4; + binlen--; + } + + return (0); +} + +#endif /* _LINUXKPI_LINUX_HEX_H_ */ diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h index 880d2f67c517..2430b25c6915 100644 --- a/sys/compat/linuxkpi/common/include/linux/kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h @@ -56,6 +56,7 @@ #include #include #include +#include #include #include @@ -305,37 +306,6 @@ linux_ratelimited(linux_ratelimit_t *rl) #define add_taint(x,y) do { \ } while (0) -static inline int -_h2b(const char c) -{ - - if (c >= '0' && c <= '9') - return (c - '0'); - if (c >= 'a' && c <= 'f') - return (10 + c - 'a'); - if (c >= 'A' && c <= 'F') - return (10 + c - 'A'); - return (-EINVAL); -} - -static inline int -hex2bin(uint8_t *bindst, const char *hexsrc, size_t binlen) -{ - int hi4, lo4; - - while (binlen > 0) { - hi4 = _h2b(*hexsrc++); - lo4 = _h2b(*hexsrc++); - if (hi4 < 0 || lo4 < 0) - return (-EINVAL); - - *bindst++ = (hi4 << 4) | lo4; - binlen--; - } - - return (0); -} - static inline bool mac_pton(const char *macin, uint8_t *macout) { From nobody Wed Apr 22 21:08:55 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfb4zHWz6bL6T for ; Wed, 22 Apr 2026 21:08: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bfb38yVz3lXK for ; Wed, 22 Apr 2026 21:08:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892135; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SEOsCD7+ZK9BaCLHqOvYin93V6jGU2IV25WzmUHLejA=; b=SC+Gm73hiSERvwRTxxsevQwqbTzf4x/G6FeOD6RypgscuYlnUkT20xLTkedWGXkJUfIcj+ r6332DhTm5s65xQA0dU6sLciUX+7mLqe3PVL4no8ReIOntEnwl/NT267/UePejx+baXQOG NGc81DlOLqWC1L6hQATldIyBsK6VA3LfkbL7rW6lxVCbtKRB40k4A5w1LmtEX0K7NOTVkl PJUszPHQxkrZPJzYVgV6ImvokLU7YNdoUsEZg+CRiop3RHOT7x8D6hcvi6lpdqYMcpiUMg fFypIingNcz5wuvSIr4qdMWhc+tJ3FOtH0vPJUVgX06iRqgeOmgXAakbLlgkOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892135; a=rsa-sha256; cv=none; b=kFxKZQrbytm82VKx9HnA77YzCJC2TjYYW4ZoAlwtgueF3h7ofh+teUog8wkuEOrdHHrZPl GuTa6xoW/KSLj0VkCtQwF6lq6UIMwCna1/3JMt1DBH1P4+yrDIUA2q3LMVNwlh1mDeNcuh HHMTtkwQgXLNX8zq6Z+xiUGvKRdoGG2zvjd+5hCTB8+s4qAh6KprSRj0ExzwzhxcEiRMva O4F/p33M6rb18N4odqx0iBGeWqNWjLhkqLUKrL95DKaEzitGVio3LUeJPajLMSOZrNaE1/ hdVqX5e6pxFkQ/Q3Gmh7na3TI7JvL32S7O1kbLqcqkNYT3zGcim4j3ZjePM9nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892135; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SEOsCD7+ZK9BaCLHqOvYin93V6jGU2IV25WzmUHLejA=; b=lNAunnG8WoDC3HIRASLm7AcjSmHzZBykX+57AG2wplT8762AlqfNeYtviH8p5KhFfk85bC BAMfSSJglOTOHmnx7FiJjLYPOLqDXXLHhR90wrjuNzUTygDMMz0eOMK66zQtqqv7WWXBzu Nk6ECVUWaPlkpJPTBNmahBlJ/YSEh3A3fW8Ll3LVfPb4c4moQHi41l9l1PrAK0aVLgzRKA QgNecqYAj0mx1SnxVULeU6LvPmAhFcc7183SNuZRdf44pfGUlQMF12tbgPb9rqBuW7OZ/b nHRUYVy6GCIlYB2Gehh3N6NyWiXGRd/k3q3RON4IiZ4LDIH9P1tVmhWSE1WsGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfb2jzmznLL for ; Wed, 22 Apr 2026 21:08:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 275f7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: d73d7776b508 - stable/15 - LinuxKPI: add default_gfp() List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d73d7776b508a80b8798db9d8896224410e08a24 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:55 +0000 Message-Id: <69e938e7.275f7.1df4a031@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d73d7776b508a80b8798db9d8896224410e08a24 commit d73d7776b508a80b8798db9d8896224410e08a24 Author: Bjoern A. Zeeb AuthorDate: 2026-04-14 13:40:24 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:08 +0000 LinuxKPI: add default_gfp() Various new allocation macros can take an optional gfp_t argument. If the argument is not given we need to set the GFP_KERNEL default. While this is only internally used and I initialy called it differently, should this spread elsewhere having the same name as in Linux will be good. Sponsored by: The FreeBSD Foundaton Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D56392 (cherry picked from commit 35b90c21f48056e85b70dbbe2209b6c3a4927315) --- sys/compat/linuxkpi/common/include/linux/gfp.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/gfp.h b/sys/compat/linuxkpi/common/include/linux/gfp.h index 7a32e7862338..af7cdb422fcb 100644 --- a/sys/compat/linuxkpi/common/include/linux/gfp.h +++ b/sys/compat/linuxkpi/common/include/linux/gfp.h @@ -80,6 +80,9 @@ CTASSERT((__GFP_DMA32 & GFP_NATIVE_MASK) == 0); CTASSERT((__GFP_BITS_MASK & GFP_NATIVE_MASK) == GFP_NATIVE_MASK); +#define __default_gfp(_discard, _arg_or_default, ...) _arg_or_default +#define default_gfp(...) __default_gfp(, ##__VA_ARGS__, GFP_KERNEL) + struct page_frag_cache { void *va; int pagecnt_bias; From nobody Wed Apr 22 21:08:56 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfc6hkZz6bL2Q for ; Wed, 22 Apr 2026 21:08:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bfc3bsCz3ld9 for ; Wed, 22 Apr 2026 21:08:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mntprDghwJv4SAqWCBoB4LQAYODjqz83prjbOgKUQQ4=; b=rsUXFfmDzuG/8IhsCctzjN7NvcVSUhNnxsFQXFHhxcZPZzHEmzoXGNkUXELuhno1/fhdcU InE7fOciXRky7gjglYtyNDIIKsYzqUe+e3+6fpD3L9Y0RmKXRs1rvdH+jXUCr7MGqXAK+y EwQ0G1zqAax1gJJiRJxCmHkNvldidyUCOJBbwimhQgkhUGrJr7uaFMAJBUjmBgwRSwmXoQ xMEWLX7Cq3T7TrukeJSmqsRxAFrSw0OksQX3u5Awd3Os9IpEj60txdrkOPiz0Q4EZNJ12m eH/HYsl9IJQ/ctT9jj9u4ncTqhsM7X+4WNdOwRhDZuKY6FilxNM7vjI2474Xmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892136; a=rsa-sha256; cv=none; b=q0JJ5qZuSeoMHGbtIIbcIo5xyQEBY6bWXLBK24OeFNc8/R4DegVHfbB100bXi18dXvGSf3 R5qlBJis1ofi3zpwITUMVXGvCl6UAhiA3H/9v1D2m94HHZBENXRHvFEbAfD9RunNylpJ3E b2zZdz9MpIqoELZ/ytSPoFkdYXeFOVz8MTSLCAc/vid4VI+41jJQgWF9dVv/B0nUheZdPh 1PI7b+nJhWQ+r/4vXQyaNNmqqga6qzxGvl0Hz8icxrcjKfEEaBkUuAYpDplZFBuhoTncTE RDjgiDYraTWP8fj7t7STFjHKJ6qjFrTSDq3/ApkxFjnFSKLw4fOU2TQLHAcN6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mntprDghwJv4SAqWCBoB4LQAYODjqz83prjbOgKUQQ4=; b=W2TR/hTnMT+vVG7UeWH6gWdyPYdWurKdwZz2yJBSl9M67ese+XOnhCnXGUaWgAdd8BXmGd Cs3+IyvE4lNjbaimZpfjU0I5ShKKoORm3z8+U1woR5FV+vaOOYPa1jHCnJmOQNuphY+ueh 9nCwHJvPLWoY0doILYKnwllPkKnxW/3ar0U/26ATrZRJ5ss5jAmlqOGg3soMZR20Ad+gM+ J/QhFEtiG1xe/cxG/OQK4hBOJfTdcURjsqMQuzm9lfTHGQ99pS7em44Ot3d71AUNlkKZHX dnYoxV5WpywhHUjRyolJws9m8K+5nfdyCmexvyvuH1+Ntp5ooiuy6fZF5/c2DQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfc3C2wznjc for ; Wed, 22 Apr 2026 21:08:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30b01 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 70cc86a2c8c0 - stable/15 - LinuxKPI: conditionally add __flex_counter() List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 70cc86a2c8c042e48162b891e53f1d4ad74e8bb6 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:56 +0000 Message-Id: <69e938e8.30b01.5822fc32@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=70cc86a2c8c042e48162b891e53f1d4ad74e8bb6 commit 70cc86a2c8c042e48162b891e53f1d4ad74e8bb6 Author: Bjoern A. Zeeb AuthorDate: 2026-04-14 15:06:56 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:08 +0000 LinuxKPI: conditionally add __flex_counter() __flex_counter() is used by overflow.h and needed for "flex allocations". It is either a void * typed 0 (NULL) (like this for _Generic checks), or uses __builtin_counted_by_ref. The latter was added to gcc and llvm fairly recently and while for gcc the __has_builtin() check suffices, clang had parts broken until recently so needs an extra check for the next major version. The fixed hash is currently not part of any tag to use, so we play it save (and hope 23 will have it). It will be a while until we will see the builting to be used but at least we will be prepared for it. See inline comments for the commit hashes and versions which added the feature. Sponsored by: The FreeBSD Foundation Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D56393 (cherry picked from commit 524df650a92f648e19ba27d6727bdc79c8efdbbb) --- sys/compat/linuxkpi/common/include/linux/compiler_types.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/compiler_types.h b/sys/compat/linuxkpi/common/include/linux/compiler_types.h index 7151c03de690..25e69f5afd8e 100644 --- a/sys/compat/linuxkpi/common/include/linux/compiler_types.h +++ b/sys/compat/linuxkpi/common/include/linux/compiler_types.h @@ -42,4 +42,17 @@ #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) +/* + * __builtin_counted_by_ref was introduced to + * - gcc in e7380688fa59 with a first release tag of gcc-15.1.0, + * - llvm in 7475156d49406 with a first release tag of llvmorg-20.1.0-rc1 + * but cannot be used before 23 (22.x.y possibly) (see 09a3d830a888). + */ +#if (__has_builtin(__builtin_counted_by_ref)) && \ + (!defined(__clang__) || (__clang_major__ >= 23)) +#define __flex_counter(_field) __builtin_counted_by_ref(_field) +#else +#define __flex_counter(_field) ((void *)NULL) +#endif + #endif From nobody Wed Apr 22 21:08:58 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bff74q6z6bL6d for ; Wed, 22 Apr 2026 21:08:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bff5PSHz3ldY for ; Wed, 22 Apr 2026 21:08:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892138; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FQHWVJLIESEqIf/FZjEJrfNblHSOmOb5Cki3JgwyrcI=; b=bXsoPGWMGIvxYz+vfaOBxj7o3lll9+BtrCbpg49msBj9pvX1fWAIy0J5EGRd8XgyKwGc6c d361l46ViYMGqWGbSWoAgIRvM2oKi/t3n1CnowIB5kjntpVYyO0Akowjs61pKDVPqZ3FwT zN94jnncXHKhGWYLzkx/upoWP5dhoQJpN3a4DjF5xbHfHhUGzmVcy5kq6uVbwmqUjdF527 1uzm9kBOZ5a1hCD8KfcFDnB3LOyUGHxFd7jewMdYdESrzC+CBqIP9pH1xVcxTNHPS4NvHu EWVr2EaTyZFi50az/YShbvLzBpRi2zCqNRoA2yFDmT1nvfAcV2wyjTTJT/NpCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892138; a=rsa-sha256; cv=none; b=dM7E+NAI3z8Bxc1I53MYSk9HppG9w1m2clktQxINJ7PYp5RIsNModuP4h2+XYUFkyfo0Gj ijhkzoJqTYYee1Wr2Px3cAbUD2gw6C1DeJfHgcruCQg/LXYO0cWXelwpun2bijkcOOqFGm /36OTa2lTrxn++w11inuzPXualnLwKXBQ87KCUhgqGO+O6DxkqNWgP9LlKPCrkrymeROoy xJJcXSnZ+MDXqOmnnB7ZV+IVU5LbnZsnHDFIyIJsRMfqkODGSygmHNgNt6M6mO2/a1K1Fq Xvo6H4FE3u30scTqtftrO3TuhtDrwnxRAXjQKjUK7MoJuyrZFzfzONbztCJ4oQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892138; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FQHWVJLIESEqIf/FZjEJrfNblHSOmOb5Cki3JgwyrcI=; b=cpVpgG+FlAh2zi73c2fZEy1Uhxe46G6ceHNz3geu2PkAZU2jAxVl5t4sILvFLjN4L4YAQl i195+s0liyZGWO3Dmmy1BMn6BVcJ0y12rLcmH7RNTxEjk9wpnY3oMfVoIgmrIL146etN1Z IC6icakopDiEKyXS7CIhkEX/ZZtehnWFphGBoXmn1+0gY9v5/F6XYodtnbB+fUvr+ZoLhw awZgIJ/O+zvaY/aZOpKCrf/y+QybY4Xt4RtD3oPbRE2uNS6UFUFQsm3/amMceK8dLS+OpH 1XxijuO8ruHxYs4+dQsTo7ikwn9rZKFwqDB+bSaXCBOxaWCEjrWlflgydd4wmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bff4qJMznWx for ; Wed, 22 Apr 2026 21:08:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2767d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: e6f14601d39c - stable/15 - LinuxKPI: add kmalloc_obj[s], kzalloc_obj[s], and kzalloc_flex List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: e6f14601d39c6a6fb41ad725dd4ae2488e4707ce Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:58 +0000 Message-Id: <69e938ea.2767d.68d5e87c@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e6f14601d39c6a6fb41ad725dd4ae2488e4707ce commit e6f14601d39c6a6fb41ad725dd4ae2488e4707ce Author: Bjoern A. Zeeb AuthorDate: 2026-04-14 15:13:18 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:09 +0000 LinuxKPI: add kmalloc_obj[s], kzalloc_obj[s], and kzalloc_flex Drivers in Linux v7.0 seem to have changed to the new allocation macros using a sweep. Add the ones I encountered with wireless drivers so far. They all take an optional argument for a gfp_t, which default_gfp() deals with. The plural version "objs" takes an extra nitems argument in addition to the size. We use size_mul() to possibly detect overflows. The "flex" version uses an extra variable to track the variable sized array allocations and if supported by the compiler will use __builtin_counted_by_ref() to properly track bounds. Sponsored by: The FreeBSD Foundation Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D56395 (cherry picked from commit c72ac6af086962d236f4712761abacac0c62b48e) --- sys/compat/linuxkpi/common/include/linux/slab.h | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/slab.h b/sys/compat/linuxkpi/common/include/linux/slab.h index 0e649e1e3c4a..6c05c77819a5 100644 --- a/sys/compat/linuxkpi/common/include/linux/slab.h +++ b/sys/compat/linuxkpi/common/include/linux/slab.h @@ -4,7 +4,7 @@ * Copyright (c) 2010 Panasas, Inc. * Copyright (c) 2013-2021 Mellanox Technologies, Ltd. * All rights reserved. - * Copyright (c) 2024-2025 The FreeBSD Foundation + * Copyright (c) 2024-2026 The FreeBSD Foundation * * Portions of this software were developed by Björn Zeeb * under sponsorship from the FreeBSD Foundation. @@ -51,6 +51,22 @@ MALLOC_DECLARE(M_KMALLOC); #define kvcalloc(n, size, flags) kvmalloc_array(n, size, (flags) | __GFP_ZERO) #define kzalloc(size, flags) kmalloc(size, (flags) | __GFP_ZERO) #define kzalloc_node(size, flags, node) kmalloc_node(size, (flags) | __GFP_ZERO, node) +#define kzalloc_obj(_p, ...) \ + kzalloc(sizeof(typeof(_p)), default_gfp(__VA_ARGS__)) +#define kzalloc_objs(_p, _n, ...) \ + kzalloc(size_mul((_n), sizeof(typeof(_p))), default_gfp(__VA_ARGS__)) +#define kzalloc_flex(_p, _field, _n, ...) \ +({ \ + const size_t __n = (_n); \ + const size_t __psize = struct_size_t(typeof(_p), _field, __n); \ + typeof(_p) *__p_obj; \ + \ + __p_obj = kzalloc(__psize, default_gfp(__VA_ARGS__)); \ + if (__p_obj != NULL) \ + __set_flex_counter(__p_obj->_field, __n); \ + \ + __p_obj; \ +}) #define kfree_const(ptr) kfree(ptr) #define kfree_async(ptr) kfree(ptr) /* drm-kmod 5.4 compat */ #define vzalloc(size) __vmalloc(size, GFP_KERNEL | __GFP_NOWARN | __GFP_ZERO, 0) @@ -143,6 +159,12 @@ kmalloc_node(size_t size, gfp_t flags, int node) return (lkpi___kmalloc_node(size, flags, node)); } +#define kmalloc_obj(_p, ...) \ + kmalloc(sizeof(typeof(_p)), default_gfp(__VA_ARGS__)) + +#define kmalloc_objs(_p, _n, ...) \ + kmalloc(size_mul((_n) * sizeof(typeof(_p))), default_gfp(__VA_ARGS__)) + static inline void * krealloc(void *ptr, size_t size, gfp_t flags) { From nobody Wed Apr 22 21:08:57 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bff06XBz6bL2W for ; Wed, 22 Apr 2026 21:08:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bfd4Q7fz3ljN for ; Wed, 22 Apr 2026 21:08:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=07fYFBzNDV2+lgE9i4UD312ATnBpHm0s6ffk7SdTsrU=; b=WnRxudR/ZoKO5UIuhDBZpiVw6mTaYwr2KY6Py74Ljp+KkT/XR+rI0ILcB1uWZmWpWlbLlN z6L8zotCdDbaKQyymTjYuVIwc8eyUaBVHPS4Oq5MHTJg45XSnKCAmRECoXYatarGNyyJek wCwUA+iT7cuHpBETdtV1gM1T1tAngxn0jgBlR6bMBWD5KDgTW84UGIhJ7YjVOauDR2wuQQ AKzcXpQPULh0m9Z3GtG5Jq03/F7D7FoatAzOGfykLuAnfm8wXOIRUeYBvUo/jTAxp9qaiU GDb6ALANZ7Vh5LdjqsORt6ka/saBPwAB2qaGNllOVb3ewvZIqwy8qCG9h+BsKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892137; a=rsa-sha256; cv=none; b=NqwxQKjjU89A9LKEheKZcilcAlec6gBVv5bkdK5t7RZhAibJ8zP8l4YHFdLRvFCkXwr6hU VuvS+5fYNIpxmXZY106kFSOI9LXIfVGfYg+HFFoc4ch9W++ggj71uZOjQxh+LP+zTzOUJn w20QOapoUZckJl4MA2lYSAb2k/LDtNSrQlOVQzuIcyvooSLriAX2+80G7Sl1ofrR613n78 GUXfOh4qTrl1aBQNT02s2ibtjny8VAli2sPod/5XzWEu/ImU2k4yqOYyJKE+C67RjSnGVJ lp3tQJp1fwmu0hi7EE1qXBABBT7ldH8iFGwd86bGbYa3cOgPusQ8vLWReycTIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=07fYFBzNDV2+lgE9i4UD312ATnBpHm0s6ffk7SdTsrU=; b=If0ssLOou/RhwzbgM7apTM6s4eof1OO3154SUvwBrRf640HVv7gPR7rj7MCR0zLE/K/UqN 9VtA8ud/6481gWG0+DAO+OcNJkoiFKRIM1WJ50zypGSS+EFGKu3ZX/kng9tfiDh20TTINg 1XE4f8twSRp56HW5WHYt1oamrUwQj6bgAdjrRZ0Kod4OHdUU2ii1ZKlh3Rl+I4R+mK8KcX VxJAnywlfC8g/tVX/EsivC7MGdNAMBwjlOjF/vmPgM6fLFILkdbJ6JaUqj8KrHqLXC8QGr hmz8IwVUT+Pv0dAj2+Axyhc5mDdCb5aAFfuIkco16YI8BgFDh9Bf40UsxWLW2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfd40mXznpN for ; Wed, 22 Apr 2026 21:08:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 304f5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 3548ab72de58 - stable/15 - LinuxKPI: sync overflow.h from Linux v7.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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 3548ab72de58a5351c78529a282c6ef56428eed1 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:57 +0000 Message-Id: <69e938e9.304f5.175911f2@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=3548ab72de58a5351c78529a282c6ef56428eed1 commit 3548ab72de58a5351c78529a282c6ef56428eed1 Author: Bjoern A. Zeeb AuthorDate: 2026-04-14 13:50:44 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:09 +0000 LinuxKPI: sync overflow.h from Linux v7.0 overflow.h was imported directly from Linux in 3208d4ad2b8320a. Update the file to the newer version as needed for v7.0 driver updates. Sponsored by: The FreeBSD Foundation Obtained from: git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 028ef9c96e96197026887c0f092424679298aae8 (tag: v7.0) Reviewed by: emaste, dumbbell Differential Revision: https://reviews.freebsd.org/D56394 (cherry picked from commit d2c85255d4fca37ec9774f85f867f8fc89a51269) --- .../linuxkpi/common/include/linux/overflow.h | 144 +++++++++++++++++++-- 1 file changed, 130 insertions(+), 14 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/overflow.h b/sys/compat/linuxkpi/common/include/linux/overflow.h index e811037b8ecc..4326f05e6d07 100644 --- a/sys/compat/linuxkpi/common/include/linux/overflow.h +++ b/sys/compat/linuxkpi/common/include/linux/overflow.h @@ -4,9 +4,7 @@ #include #include -#ifdef __linux__ #include -#endif /* * We need to compute the minimum and maximum values representable in a given @@ -38,19 +36,13 @@ #define __type_min(T) ((T)((T)-type_max(T)-(T)1)) #define type_min(t) __type_min(typeof(t)) -/* - * Avoids triggering -Wtype-limits compilation warning, - * while using unsigned data types to check a < 0. - */ -#define is_non_negative(a) ((a) > 0 || (a) == 0) -#define is_negative(a) (!(is_non_negative(a))) /* * Allows for effectively applying __must_check to a macro so we can have * both the type-agnostic benefits of the macros while also being able to * enforce that the return value is, in fact, checked. */ -static inline bool __must_check __must_check_overflow(bool overflow) +static __always_inline bool __must_check __must_check_overflow(bool overflow) { return unlikely(overflow); } @@ -203,9 +195,9 @@ static inline bool __must_check __must_check_overflow(bool overflow) typeof(d) _d = d; \ unsigned long long _a_full = _a; \ unsigned int _to_shift = \ - is_non_negative(_s) && _s < 8 * sizeof(*d) ? _s : 0; \ + _s >= 0 && _s < 8 * sizeof(*d) ? _s : 0; \ *_d = (_a_full << _to_shift); \ - (_to_shift != _s || is_negative(*_d) || is_negative(_a) || \ + (_to_shift != _s || *_d < 0 || _a < 0 || \ (*_d >> _to_shift) != _a); \ })) @@ -240,6 +232,76 @@ static inline bool __must_check __must_check_overflow(bool overflow) __overflows_type_constexpr(n, T), \ __overflows_type(n, T)) +/** + * range_overflows() - Check if a range is out of bounds + * @start: Start of the range. + * @size: Size of the range. + * @max: Exclusive upper boundary. + * + * A strict check to determine if the range [@start, @start + @size) is + * invalid with respect to the allowable range [0, @max). Any range + * starting at or beyond @max is considered an overflow, even if @size is 0. + * + * Returns: true if the range is out of bounds. + */ +#define range_overflows(start, size, max) ({ \ + typeof(start) start__ = (start); \ + typeof(size) size__ = (size); \ + typeof(max) max__ = (max); \ + (void)(&start__ == &size__); \ + (void)(&start__ == &max__); \ + start__ >= max__ || size__ > max__ - start__; \ +}) + +/** + * range_overflows_t() - Check if a range is out of bounds + * @type: Data type to use. + * @start: Start of the range. + * @size: Size of the range. + * @max: Exclusive upper boundary. + * + * Same as range_overflows() but forcing the parameters to @type. + * + * Returns: true if the range is out of bounds. + */ +#define range_overflows_t(type, start, size, max) \ + range_overflows((type)(start), (type)(size), (type)(max)) + +/** + * range_end_overflows() - Check if a range's endpoint is out of bounds + * @start: Start of the range. + * @size: Size of the range. + * @max: Exclusive upper boundary. + * + * Checks only if the endpoint of a range (@start + @size) exceeds @max. + * Unlike range_overflows(), a zero-sized range at the boundary (@start == @max) + * is not considered an overflow. Useful for iterator-style checks. + * + * Returns: true if the endpoint exceeds the boundary. + */ +#define range_end_overflows(start, size, max) ({ \ + typeof(start) start__ = (start); \ + typeof(size) size__ = (size); \ + typeof(max) max__ = (max); \ + (void)(&start__ == &size__); \ + (void)(&start__ == &max__); \ + start__ > max__ || size__ > max__ - start__; \ +}) + +/** + * range_end_overflows_t() - Check if a range's endpoint is out of bounds + * @type: Data type to use. + * @start: Start of the range. + * @size: Size of the range. + * @max: Exclusive upper boundary. + * + * Same as range_end_overflows() but forcing the parameters to @type. + * + * Returns: true if the endpoint exceeds the boundary. + */ +#define range_end_overflows_t(type, start, size, max) \ + range_end_overflows((type)(start), (type)(size), (type)(max)) + /** * castable_to_type - like __same_type(), but also allows for casted literals * @@ -265,7 +327,7 @@ static inline bool __must_check __must_check_overflow(bool overflow) * with any overflow causing the return value to be SIZE_MAX. The * lvalue must be size_t to avoid implicit type conversion. */ -static inline size_t __must_check size_mul(size_t factor1, size_t factor2) +static __always_inline size_t __must_check size_mul(size_t factor1, size_t factor2) { size_t bytes; @@ -284,7 +346,7 @@ static inline size_t __must_check size_mul(size_t factor1, size_t factor2) * with any overflow causing the return value to be SIZE_MAX. The * lvalue must be size_t to avoid implicit type conversion. */ -static inline size_t __must_check size_add(size_t addend1, size_t addend2) +static __always_inline size_t __must_check size_add(size_t addend1, size_t addend2) { size_t bytes; @@ -305,7 +367,7 @@ static inline size_t __must_check size_add(size_t addend1, size_t addend2) * argument may be SIZE_MAX (or the result with be forced to SIZE_MAX). * The lvalue must be size_t to avoid implicit type conversion. */ -static inline size_t __must_check size_sub(size_t minuend, size_t subtrahend) +static __always_inline size_t __must_check size_sub(size_t minuend, size_t subtrahend) { size_t bytes; @@ -390,6 +452,18 @@ static inline size_t __must_check size_sub(size_t minuend, size_t subtrahend) #define struct_size_t(type, member, count) \ struct_size((type *)NULL, member, count) +/** + * struct_offset() - Calculate the offset of a member within a struct + * @p: Pointer to the struct + * @member: Name of the member to get the offset of + * + * Calculates the offset of a particular @member of the structure pointed + * to by @p. + * + * Return: number of bytes to the location of @member. + */ +#define struct_offset(p, member) (offsetof(typeof(*(p)), member)) + /** * __DEFINE_FLEX() - helper macro for DEFINE_FLEX() family. * Enables caller macro to pass arbitrary trailing expressions @@ -472,4 +546,46 @@ static inline size_t __must_check size_sub(size_t minuend, size_t subtrahend) (__member_size((name)->array) / sizeof(*(name)->array) + \ __must_be_array((name)->array)) +/** + * typeof_flex_counter() - Return the type of the counter variable of a given + * flexible array member annotated by __counted_by(). + * @FAM: Instance of flexible array member within a given struct. + * + * Returns: "size_t" if no annotation exists. + */ +#define typeof_flex_counter(FAM) \ + typeof(_Generic(__flex_counter(FAM), \ + void *: (size_t)0, \ + default: *__flex_counter(FAM))) + +/** + * overflows_flex_counter_type() - Check if the counter associated with the + * given flexible array member can represent + * a value. + * @TYPE: Type of the struct that contains the @FAM. + * @FAM: Member name of the FAM within @TYPE. + * @COUNT: Value to check against the __counted_by annotated @FAM's counter. + * + * Returns: true if @COUNT can be represented in the @FAM's counter. When + * @FAM is not annotated with __counted_by(), always returns true. + */ +#define overflows_flex_counter_type(TYPE, FAM, COUNT) \ + (overflows_type(COUNT, typeof_flex_counter(((TYPE *)NULL)->FAM))) + +/** + * __set_flex_counter() - Set the counter associated with the given flexible + * array member that has been annoated by __counted_by(). + * @FAM: Instance of flexible array member within a given struct. + * @COUNT: Value to store to the __counted_by annotated @FAM_PTR's counter. + * + * This is a no-op if no annotation exists. Count needs to be checked with + * overflows_flex_counter_type() before using this function. + */ +#define __set_flex_counter(FAM, COUNT) \ +({ \ + *_Generic(__flex_counter(FAM), \ + void *: &(size_t){ 0 }, \ + default: __flex_counter(FAM)) = (COUNT); \ +}) + #endif /* _LINUXKPI_LINUX_OVERFLOW_H */ From nobody Wed Apr 22 21:08:59 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfh1Ljpz6bKyx for ; Wed, 22 Apr 2026 21:09:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bfg63dWz3lxR for ; Wed, 22 Apr 2026 21:08:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CcD2nrb5DR4STAweGUfY5i1A8TwTRHBoOaY5jWmEWpY=; b=SFa+yHbfybCavfx2TkwGFjWVTK+vMYcG1ufCo4niY9dbTYEnU9p8V07fiF5hMngd/y1vaq drwK6VJCFYFIfmAIKw87ExhcRXfV0Eka6ypAc69KO8N0hbm7XBR4tcNkYO6WHDJtKcTeWH fSrTE2Y7Ax309qjeG3qTHRGcT+ihB25ao4QJSBgB9z92OBdHambpIi/4l3CW0x+/Kr9nPd QXDhLciTwnp8eE5vktG7X3l2iJkHQLfdAroqrRA0kCxxX8ir5i9CHgoOs9WAFSodaW8Qe4 /QFD0VutuVH5ddU2LxY/ZhhkVoyAVKZSH6oRx6r4jbVNtYCqFTHZoVK+fj8KQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892139; a=rsa-sha256; cv=none; b=sHb8jpU9Y3DPN+CVrGd/lBjOCmkVT8pgknuRnSdCed+n8MJukFmd1T68qRJqq8Rf9JS/ma 07piR7JmCRmTERYvLWBr1H0UeFZEDOpeRoi3c9pCoMTg6xJOPYFNy07fBz3/deomusPGJa 5zUyTHlK2gGNbY6842xzaLvl4scTqWoScOCAEpmkqMTWZGn0Ma9vYP0/KRdfZkNMyjCZnH F4P1vaFW4bSA3OR/tuYl4OIL0krOp9ecc2WjUMSoKaw+sAFAL2gLyLYUEnBQn2L9xIh2zQ lNeKUlGJxGyDkfGp5WX7jOkEZe0T6lGUltDT4O/lIo6RcByCdmNS3zqTEF/vCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CcD2nrb5DR4STAweGUfY5i1A8TwTRHBoOaY5jWmEWpY=; b=IMkbAn1mmj34FzaKZjl8+u4+i38oA/Tf4KcN7LdklJwIe3/x7PBWO2TU/saOlSGhg7qsJQ N7i78bonoMkuqECEHeE7u6GyXcsVqLEWRiz1ZywndTOEMjYUMF8Teqae+5v8imqsE+6xLF B13yGnpHp0+cVKMKcfAS0SNBinME6cm68D2WZwXbtOTemq0ULe1btUrFUtGP3rCP9zlrf1 rwq2wcsioRu9QZzEX8J0D44AD7WvwhzLsQhJXPBef7xkM7c+3WAoSiHfIGEkpDO66CuKpH UPxbYqRtGDL0aWvlCURCdqH0f6YeiEFEVuA/6bDVRD5fvsZ6CPWlxLR4L8MWJw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfg5bFWznm3 for ; Wed, 22 Apr 2026 21:08:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30518 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: edbcaca4353c - stable/15 - LinuxKPI: implement devm_kmemdup_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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: edbcaca4353ca102a45c2d6286221bca7ed78e8d Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:59 +0000 Message-Id: <69e938eb.30518.58bf3e71@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=edbcaca4353ca102a45c2d6286221bca7ed78e8d commit edbcaca4353ca102a45c2d6286221bca7ed78e8d Author: Bjoern A. Zeeb AuthorDate: 2026-04-14 13:35:36 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:09 +0000 LinuxKPI: implement devm_kmemdup_array() Implement devm_kmemdup_array() using devm_kmemdup() in order to prepare for Linux v7.0 based drivers. Sponsored by: The FreeBSD Foundation Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D56396 (cherry picked from commit f1834d03af617a93993056bb902082452673f89f) --- sys/compat/linuxkpi/common/include/linux/device.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h index 8834f1799e61..030e9b127540 100644 --- a/sys/compat/linuxkpi/common/include/linux/device.h +++ b/sys/compat/linuxkpi/common/include/linux/device.h @@ -701,6 +701,13 @@ devm_kmemdup(struct device *dev, const void *src, size_t len, gfp_t gfp) return (dst); } +static inline void * +devm_kmemdup_array(struct device *dev, const void *src, size_t n, size_t len, + gfp_t gfp) +{ + return (devm_kmemdup(dev, src, size_mul(n, len), gfp)); +} + #define devm_kzalloc(_dev, _size, _gfp) \ devm_kmalloc((_dev), (_size), (_gfp) | __GFP_ZERO) From nobody Wed Apr 22 21:09:00 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfj4bWzz6bLHR for ; Wed, 22 Apr 2026 21:09:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bfh6vlrz3lvY for ; Wed, 22 Apr 2026 21:09:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892141; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JLPrmGPSrn+GZhWkKp9La9DAbLDjj4kuAMC32RZqMH4=; b=lRLtFK3SYB1x3MbYs13yyCkU5orYQNkJexHQWySEMmPGMmPkmuneRX0pXw1WN58bzMUOY7 wFOSClGhukZffUgwhzV2Ktl+pMNHRRPW3ki/Rkcyv8dBrwyzlrd1xcAZ8xfBbmLFSKQE3U DEyFBRjXMHk0RPuwfWg76sZXLMh9YIwI8CYk/IoeyCtDVhAtbB9LoUZ62YOdDWsuSbWmDM 32D0hVLP3SjPo4OM6mqASPtnxuuFK/OkZQtoLVF30Bv+GoVeKZke5P/rs4SPA///z7AeeF u3hQRKCLekesGWxTO5zylxk4vo998IZvniNzGmdoaxKt/2RDn8SZA8Y74GQw1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892141; a=rsa-sha256; cv=none; b=dqbUpojwYDRdISLS8itpr73K4aYmNM7MHckOTDFl4dY4WoUF173WaqlSu1Js6FRGIiR/J1 za4Tdg9j8yOGg/JcHaFJPSpF9ms8tLBYpWc/yGr/1jiwAxGB9rmDwbAMbc9BlJqWQSg362 A7AMvs+e60n5Zx5oLBn79ilXDMEn06uICkuWcyHdaH6nO9GPEf4Kg/Ir6k0p1jLI2/XYvx FIGucJVjozv4166r1NDyZcoaBnjCSLtgpQuX6TiMERat9mXntQCcPhllq7mB5xKx1czf+V maw5AKm3nF394THaA9TZZZxlj2yLXuinW/T9lvTYqEJf3ZbS+hLhKJByK6F84g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892141; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JLPrmGPSrn+GZhWkKp9La9DAbLDjj4kuAMC32RZqMH4=; b=C6f3h7sIDfhgzetBeyJY9qATqBmA8yTIMe1PwLnb0DS/Imv0/eI1H/xyB9w19hBofZTgzt yfkcDATmzHDMtb4pwSLdCts4pNlhswjlWQgoc1tTivpSqEwKkr5SWS+vSxKJhCSODIl0ej Q8cgWZg4nNifg8gdR6WjYC/aTPh93M2jtHEAEXUy9uVocKyLopkefyf73Hr29UUW6aj+PL 8kgOsriR9aLTgOoan+3rNNFcWtDiWP+ocHSNo5jjL3Z4s/IMvVO8BTwcusof1xyQh15E2W d8/EcNCNlDGzws+3sDBswXIe6NkBQplIF2H5TQFFl+r48sOmMq4tz2v+qu9wGg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfh6R0hznm4 for ; Wed, 22 Apr 2026 21:09:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26a32 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:09:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 342a37387f31 - stable/15 - LinuxKPI: 802.11: set IEEE80211_MIN_ACTION_SIZE according to struct List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 342a37387f313ae691190d69f11400620521a268 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:09:00 +0000 Message-Id: <69e938ec.26a32.45ef0f3a@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=342a37387f313ae691190d69f11400620521a268 commit 342a37387f313ae691190d69f11400620521a268 Author: Bjoern A. Zeeb AuthorDate: 2026-04-15 07:50:35 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:09 +0000 LinuxKPI: 802.11: set IEEE80211_MIN_ACTION_SIZE according to struct IEEE80211_MIN_ACTION_SIZE came up in the mt76 vendor subtree merge as one of the non-mechanical changes which made me look. Rather than (incorrectly) hand counting the offset from the beginning of a frame, use the offset from the beginning of struct ieee80211_mgmt. Sponsored by: The FreeBSD Foundation (cherry picked from commit f252ce00898d17f4892534934b8097cd7ccb9e26) --- sys/compat/linuxkpi/common/include/linux/ieee80211.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h index d1eba94a3ad8..b8f29560f200 100644 --- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h +++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h @@ -100,8 +100,6 @@ struct ieee80211_mmie_16 { #define IEEE80211_MAX_RTS_THRESHOLD 2346 /* net80211::IEEE80211_RTS_MAX */ -#define IEEE80211_MIN_ACTION_SIZE 23 /* ? */ - /* Wi-Fi Peer-to-Peer (P2P) Technical Specification */ #define IEEE80211_P2P_OPPPS_CTWINDOW_MASK 0x7f #define IEEE80211_P2P_OPPPS_ENABLE_BIT BIT(7) @@ -622,6 +620,8 @@ struct ieee80211_mgmt { } u; } __packed __aligned(2); +#define IEEE80211_MIN_ACTION_SIZE offsetof(struct ieee80211_mgmt, u.action.u) + struct ieee80211_cts { /* net80211::ieee80211_frame_cts */ __le16 frame_control; __le16 duration; From nobody Wed Apr 22 21:09:02 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfk30qYz6bL8P for ; Wed, 22 Apr 2026 21:09: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bfk0hdCz3lh0 for ; Wed, 22 Apr 2026 21:09:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892142; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W5j7nyQ/KsSd7hbtx9ME6euPfCwWyGUOLBVmG+FJQ+4=; b=DX1v+qS92y74PYc1bwP6YQrBfghfaNmw0pBqbV5x7ykkAi1JzAQFZPzsbkdri6CVs63zEU AgN3/R6JVeoAFI6w2aygrGUDAKpsdRZAZ/pZKvn5LTfqrGvsY9Qe9bxk8u3mN/n7myu7Vh bbs+rk1MvwK65jQpe7nHczXWUUPCfoora6NuY6a6lv1eK3P0Pu65HbZ0hP6oU2iX3wC6JC QWiQSh+PYzaWDS4uabm1maS9kV4iDyvbkT9jymKxBXxERNT0aeiYHGJkIWOxi9hRReG6cn 89/+C8CZzb6XC8yzPhqlBUQ4LQICCrm+3icJ5Xc3kBO8pXegIJWzIUBx5xYp4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892142; a=rsa-sha256; cv=none; b=fa1va1nJdbjakndLzai21SCfvxzehpXfAV2BLRWgcBLcE8cOjD7dsc7qZWQ0qfMYqh1m0c Tyt1T+e0nJt729Te5MBF1JKF6Tf6g9p5P1r3wvnvvLph4+vFPt4b23tzFdmnpCNYVFo3BB fJG71JeHTIm7ZnPLe7152QlQH1xltYH9MTOcEnAkKsqoZiZdYAeKHyb0wpYtRd6CT+6n2K CYq3XEqOUeeRakPlUdL5HLYVGPwd96tfHvQNIGHSRiQaYkQpiXLaiWEJ9qlz9wrcHpKET3 Z4eNY0f+CPK2jTFeoPk8/k+zzSnBLwizPEPSm+PU76KFMvfsNy2/zxNh/ulhYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892142; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W5j7nyQ/KsSd7hbtx9ME6euPfCwWyGUOLBVmG+FJQ+4=; b=m2vb/lm1W0DOvgKNDWK5IBX9eXacU1whjD74+kSzC9bO4arNJ6nPeenNhil4ukPv0+txQl B59MSW+UENInAsCoBDBUiBoOSGU2LdMUBJIbjbzRIE1NuUBtE45zHZv8EoCpdpmv7469g7 iyxprgP9nRLQ2vzlP+k+zf6SUm8/dRoVBB6uY05rZqZZ4Dris+Scj7XF5jw1p0l6ZDAyh7 BcDN9stpc0u0RKhL214Bq80qjTdbPIwBvKTLKmkLRLbd9H7j47icVdoNjZZvID56vPT0G6 TneeoaYqgertIgB+ficZ8JOOiNVQU5WdrV3flUiFErwBdStZ4uRN5VkqWyjfCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfk092yznX0 for ; Wed, 22 Apr 2026 21:09:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30a25 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:09:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: f8d147d65d44 - stable/15 - LinuxKPI: 802.11: Add structures and functions for NAN 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f8d147d65d4468e520dfe02bcb30b89d43fa79ee Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:09:02 +0000 Message-Id: <69e938ee.30a25.37da143a@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f8d147d65d4468e520dfe02bcb30b89d43fa79ee commit f8d147d65d4468e520dfe02bcb30b89d43fa79ee Author: Bjoern A. Zeeb AuthorDate: 2026-04-18 11:26:59 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:10 +0000 LinuxKPI: 802.11: Add structures and functions for NAN support In Linux v7.0 iwlwifi(4) started to add support for Wi-Fi Aware(tm) also known as Neighbor Awareness Networking (NAN). Add structures and fields for this as needed so far to keep the driver compiling. net80211 has no support for it as a new mode. We may consider a dedicated header file for these parts in the future depending on how much more is to come. Sponsored by: The FreeBSD Foundation (cherry picked from commit a0112b013f93a47489051fed54ea48c077e59de4) --- sys/compat/linuxkpi/common/include/net/cfg80211.h | 66 +++++++++++++++++++++++ sys/compat/linuxkpi/common/include/net/mac80211.h | 11 ++++ 2 files changed, 77 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/net/cfg80211.h b/sys/compat/linuxkpi/common/include/net/cfg80211.h index 5c8c914bdee7..24b57ea1f001 100644 --- a/sys/compat/linuxkpi/common/include/net/cfg80211.h +++ b/sys/compat/linuxkpi/common/include/net/cfg80211.h @@ -328,6 +328,53 @@ struct cfg80211_chan_def { uint16_t punctured; }; +struct cfg80211_nan_band_config { + /* XXX TODO */ + struct linuxkpi_ieee80211_channel *chan; + uint8_t rssi_middle; + uint8_t rssi_close; + uint8_t awake_dw_interval; +}; + +struct cfg80211_nan_conf { + uint8_t bands; + uint8_t discovery_beacon_interval; + uint8_t master_pref; + bool enable_dw_notification; + + uint16_t scan_dwell_time; + uint16_t scan_period; + uint16_t extra_nan_attrs_len; + uint16_t vendor_elems_len; + + uint8_t *cluster_id; + struct cfg80211_nan_band_config band_cfgs[NUM_NL80211_BANDS]; + uint8_t *extra_nan_attrs; + uint8_t *vendor_elems; +}; + +enum wiphy_nan_flags { + WIPHY_NAN_FLAGS_CONFIGURABLE_SYNC = BIT(0), + WIPHY_NAN_FLAGS_USERSPACE_DE = BIT(1), +}; + +/* Wi-Fi Aware (TM) specification, 9.5.15 Device Capability attribute. */ +/* Misplaced here for the moment. */ +#define NAN_OP_MODE_PHY_MODE_MASK 0x11 /* b0 0=HT, 1=VHT, b4=1 HE supported */ +#define NAN_OP_MODE_80P80MHZ 0x2 /* b1 */ +#define NAN_OP_MODE_160MHZ 0x4 /* b2 */ + +#define NAN_DEV_CAPA_EXT_KEY_ID_SUPPORTED 0x2 /* b1 */ +#define NAN_DEV_CAPA_NDPE_SUPPORTED 0x8 /* b3 */ + +struct wiphy_nan_capa { + uint32_t flags; /* enum wiphy_nan_flags */ + uint8_t op_mode; + uint8_t dev_capabilities; + uint8_t n_antennas; /* Tx/Rx bitmask, e.g., 0x22 */ + uint16_t max_channel_switch_time; +}; + struct cfg80211_ftm_responder_stats { /* XXX TODO */ int asap_num, failed_num, filled, non_asap_num, out_of_window_triggers_num, partial_num, reschedule_requests_num, success_num, total_duration_ms, unknown_triggers_num; @@ -1152,6 +1199,9 @@ struct wiphy { uint32_t bss_param_support; /* enum wiphy_bss_param_flags */ + uint8_t nan_supported_bands; + struct wiphy_nan_capa nan_capa; + int features, hw_version; int interface_modes, max_match_sets, max_remain_on_channel_duration, max_scan_ssids, max_sched_scan_ie_len, max_sched_scan_plan_interval, max_sched_scan_plan_iterations, max_sched_scan_plans, max_sched_scan_reqs, max_sched_scan_ssids; int num_iftype_ext_capab; @@ -2207,6 +2257,22 @@ cfg80211_cqm_rssi_notify(struct net_device *dev, /* -------------------------------------------------------------------------- */ +static inline void +cfg80211_nan_cluster_joined(struct wireless_dev *wdev, const uint8_t *cluster_id, + bool new_cluster, gfp_t gfp) +{ + TODO("NAN"); +} + +static inline void +cfg80211_next_nan_dw_notif(struct wireless_dev *wdev, + struct linuxkpi_ieee80211_channel *chan, gfp_t gfp) +{ + TODO("NAN"); +} + +/* -------------------------------------------------------------------------- */ + static inline void wiphy_work_init(struct wiphy_work *wwk, wiphy_work_fn fn) { diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index c637e13a496d..4943570d6c40 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1104,6 +1104,10 @@ struct ieee80211_ops { int (*net_fill_forward_path)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_sta *, struct net_device_path_ctx *, struct net_device_path *); + int (*start_nan)(struct ieee80211_hw *, struct ieee80211_vif *, struct cfg80211_nan_conf *); + int (*stop_nan)(struct ieee80211_hw *, struct ieee80211_vif *); + int (*nan_change_conf)(struct ieee80211_hw *, struct ieee80211_vif *, struct cfg80211_nan_conf *, uint32_t changes); + /* #ifdef CONFIG_MAC80211_DEBUGFS */ /* Do not change depending on compile-time option. */ void (*sta_add_debugfs)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_sta *, struct dentry *); void (*vif_add_debugfs)(struct ieee80211_hw *, struct ieee80211_vif *); @@ -2650,4 +2654,11 @@ ieee80211_cqm_beacon_loss_notify(struct ieee80211_vif *vif, gfp_t gfp __unused) /* -------------------------------------------------------------------------- */ +static inline bool +ieee80211_vif_nan_started(struct ieee80211_vif *vif) +{ + IMPROVE("NAN"); + return (false); +} + #endif /* _LINUXKPI_NET_MAC80211_H */ From nobody Wed Apr 22 21:09:03 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfl3Fttz6bLKt for ; Wed, 22 Apr 2026 21:09: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bfl1CjGz3lw2 for ; Wed, 22 Apr 2026 21:09:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892143; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BWaghYvKH2IKUKGerNJU7qKD6073DAeA0aUeY4PNG00=; b=uzhCiXpWhB5bvNahKBHJE3BzEsWx9UMdSeqAqL94UBNJH+nFfY5ZDtpt6TWuJC7G6+Nngh MpPwtiRLKEnEG3a+AO1hDqGdTj7YQmQGOIPX6MWBZRMmtNCF4+aIcGDo5H1rvLx0u76QsC ZBetvL2TRd6ZDYlxqB64P7lJ2yd+myoPgqaDSrg2Ehq5wFMb5gNSDA2vaKIBkgNTIEv06K AqDzFWH8YEHXBzwgKVEQ/HDp4jNaWoGi8JlGy+83VlFcxpmLkCYD3Jc72wNykHQ/xeklxv g3OmmT42smtBKMkCbWmVStzNvjJGU3t/PtGKSOZzM36PeCCyDF8uP4ayYgs1zQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892143; a=rsa-sha256; cv=none; b=Uh99mYt0RpPMNoNsOvAZwIhDnOEqV15ZU3Rx5dvoEMLO8nfONI0ulPbddV4TQsok/EeLVZ 0GNpoKAJOi0ml1Zx0euuuEAC1SukoW8DSzI7mXN0u6yHzM0zzsGXHSTauAK9UGXDY7FqOg Cr5X5WhbRNznm8jW8P3ESdxB/usD/uYBDNrktHAZF7/DLc8pbZQZkIOXRYO7FyF3u66Cys coht1kzAi+qGF38tM1cukOHieGTWyGPKm45Y8skmDbfa+AYDJPWg/OxSC2y0WI7A6b6vWs Y1pnvz/OVTWO3Fe3amhPhJ5pNayLoSvIGXFydBGRsznUscjKu1LTxqy1fglbmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892143; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BWaghYvKH2IKUKGerNJU7qKD6073DAeA0aUeY4PNG00=; b=KPAXC/UGWVBLA2FJ6fFKdxM+PZhHPG4i0v8CY9DLVcby1iCW620kObRejetODpCC1L6KO9 25iqai6GQ3FOFCUKTIMG+ueHkm2UbqV7H32b4EdrPsRwHvk9+i5q0bYAIpdLhiNeD1/uqO IWHHg5MkejawCeleSxqvcKGeQ97MmSigCyRWnyMYIRTmkEvNl1+YA2yNzAy13SZQEgCxfn f9dnNPqdvrEwi1Qe1r2gbGxGmhbJ76gfq7FNj+5FEDt9y1V/p2s1QW2IPJSSrIQ02AVtqA V+GDMpY0eyJdJAR205+sW8Pe0reAvZGNoDnVB2Mi6O4/anqqdNzEMc9gXNBhhA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfl0lS6znX1 for ; Wed, 22 Apr 2026 21:09:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30a8a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:09:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 1cd58406e47b - stable/15 - LinuxKPI: 802.11: add struct/fields and functions for v7.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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 1cd58406e47b7cb7f70a225833efbb091f3d0a15 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:09:03 +0000 Message-Id: <69e938ef.30a8a.3e2322ba@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=1cd58406e47b7cb7f70a225833efbb091f3d0a15 commit 1cd58406e47b7cb7f70a225833efbb091f3d0a15 Author: Bjoern A. Zeeb AuthorDate: 2026-04-14 15:23:31 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:10 +0000 LinuxKPI: 802.11: add struct/fields and functions for v7.0 Add 802.11 struct fields and functions support for Linux v7.0 based wireless drivers (at least iwlwifi, rtw88, rtw89). While here cleanup some other bits. Sponsored by: The FreeBSD Foundation (cherry picked from commit 25e776a5438005db59c6d474b5d47c42d2a341b9) --- sys/compat/linuxkpi/common/include/net/cfg80211.h | 13 +++++++++---- sys/compat/linuxkpi/common/include/net/mac80211.h | 12 +++++++++++- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/cfg80211.h b/sys/compat/linuxkpi/common/include/net/cfg80211.h index 24b57ea1f001..dedf687d6530 100644 --- a/sys/compat/linuxkpi/common/include/net/cfg80211.h +++ b/sys/compat/linuxkpi/common/include/net/cfg80211.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2020-2025 The FreeBSD Foundation + * Copyright (c) 2020-2026 The FreeBSD Foundation * Copyright (c) 2021-2022 Bjoern A. Zeeb * * This software was developed by Björn Zeeb under sponsorship from @@ -165,7 +165,9 @@ struct cfg80211_bitrate_mask { uint16_t eht_mcs[NL80211_EHT_NSS_MAX]; enum nl80211_txrate_gi gi; enum nl80211_he_gi he_gi; - uint8_t he_ltf; /* XXX enum? */ + enum nl80211_he_ltf he_ltf; + enum nl80211_eht_gi eht_gi; + uint8_t eht_ltf; /* XXX enum? */ } control[NUM_NL80211_BANDS]; }; @@ -1359,8 +1361,11 @@ wiphy_dev(struct wiphy *wiphy) return (wiphy->dev); } -#define wiphy_dereference(_w, p) \ - rcu_dereference_check(p, lockdep_is_held(&(_w)->mtx)) +#define wiphy_dereference(_w, _p) \ + rcu_dereference_protected(_p, lockdep_is_held(&(_w)->mtx)) + +#define rcu_dereference_wiphy(_w, _p) \ + rcu_dereference_check(_p, lockdep_is_held(&(_w)->mtx)) #define wiphy_lock(_w) mutex_lock(&(_w)->mtx) #define wiphy_unlock(_w) mutex_unlock(&(_w)->mtx) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index 4943570d6c40..3c783d1f3c8a 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -603,7 +603,7 @@ enum ieee80211_rx_status_flags { RX_FLAG_AMPDU_IS_LAST = BIT(21), RX_FLAG_AMPDU_LAST_KNOWN = BIT(22), RX_FLAG_AMSDU_MORE = BIT(23), - /* = BIT(24), */ + RX_FLAG_RADIOTAP_VHT = BIT(24), RX_FLAG_ONLY_MONITOR = BIT(25), RX_FLAG_SKIP_MONITOR = BIT(26), RX_FLAG_8023 = BIT(27), @@ -1581,6 +1581,16 @@ ieee80211_iterate_stations_atomic(struct ieee80211_hw *hw, linuxkpi_ieee80211_iterate_stations_atomic(hw, iterfunc, arg); } +static inline void +ieee80211_iterate_stations_mtx(struct ieee80211_hw *hw, + void (*iterfunc)(void *, struct ieee80211_sta *), void *arg) +{ + + lockdep_assert_wiphy(hw->wiphy); + IMPROVE("we could simplify this if we had a sta list on the lhw"); + linuxkpi_ieee80211_iterate_stations_atomic(hw, iterfunc, arg); +} + static __inline struct wireless_dev * ieee80211_vif_to_wdev(struct ieee80211_vif *vif) { From nobody Wed Apr 22 21:09:05 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfp170rz6bLHY for ; Wed, 22 Apr 2026 21:09:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bfn3FSbz3m32 for ; Wed, 22 Apr 2026 21:09:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1ZG1cE+FvyjY42R8jr/0PCXO/NBbZ9f2BjsGnFfX2iY=; b=pDE8qqkAwyeFqgmz3It3WnQGitupVYoxhTxgXg51qT6HtOLuEzLY96zMtShQb3ISe1CP8C 8Se1U92jVC4awzG0yFNz7B19Ez8RHS+B0n7g5r7pt7JiLmhvrFEzU7l+ZjcEwVByA0taFe qQ45rpRhZCq5Wl9RrlrTQnOuEtEmyulZ5PA5Ns1O2THeXF2lgNiQ9JqS5BA35v1J/XXjnU iYNaeCR8GmQWQR/i/I/ye5bdPM8d/szosCImEUZ8xgmL0GSb9NeAvglgcykBmCgmwmaL+x 5YPHkEimbGUwIIJ40DU3qceY+YXXAkNLm7sBoqvSQD3ccowBkadgodGsxWFZ4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892145; a=rsa-sha256; cv=none; b=JX2lkAb0KzGNxQC0jzqI3dFoAzumADqoZn1xtcfSiMIbAnziCyoQZjuA8nPEEDHMPB04FP o3ZyoYECxU4iACVJav7aAVWswZ3XQRLrnT14hJIVyt1Un4orxRlQwQ+FEytd6wUiuPbShH IzxpMyINWaLMwydkqW8QtiwseUCuAT6JrSgqSL3rk2mWOw5Ki5HNL0kZvtZ3NAFa4JohAi fOfMe/tWeMrjRTTT5ddxjfIKbVdW95j4lXbNxpdKp7vnyl1Vtv8jG2ZLQtDzwbUrUvSSOp CqkD+XTnnl3URdcudAWpCzRdiCLUsfvk8H4e+XeydiQbS1ZTBAvodL39G/OY+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1ZG1cE+FvyjY42R8jr/0PCXO/NBbZ9f2BjsGnFfX2iY=; b=l8TraqHVfPyuEQt0hbzQwImZeCFpE4KVWryFJu6EcuFKlyqZgNeyOD8r27wh/yMEaIglld rssaFmIGiGdWdentmo65SBzmHwwriByso2/lFF6Lt2oDINpN2HITlcPLyAjR9bGBMwEjaC V+MFjdgsSCpHDAVg7DGw96i6MdtZdOFeCGd3ZH9pYnrYDJQgS76D6mKOvBO9+9x6oEZSwW mcFpMC6N8U+3t32S+dNT9pwrSObbOjdF4XAfHqYKbfW/ioF3eJuIeQMEN/fXgS4Jxd3uko tkcYt7TFCi1wcE8yHE8DqGmdL7HianqhdW4FKJ/H1l/3qdkSnvl2O2mqS/T3Mw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfn2LyHzng9 for ; Wed, 22 Apr 2026 21:09:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30a29 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:09:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 7410ff27b2b2 - stable/15 - rtw88: update module Makefile for v7.0 driver 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7410ff27b2b2288dc6ae9f94f12b16e2dad5c364 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:09:05 +0000 Message-Id: <69e938f1.30a29.7d586e10@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7410ff27b2b2288dc6ae9f94f12b16e2dad5c364 commit 7410ff27b2b2288dc6ae9f94f12b16e2dad5c364 Author: Bjoern A. Zeeb AuthorDate: 2026-04-18 13:40:21 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:11 +0000 rtw88: update module Makefile for v7.0 driver version Update LINUXKPI_VERSION to reflect that the driver is based on Linux v7.0. Sponsored by: The FreeBSD Foundation (cherry picked from commit 90383181aae908d2c696f8d66c19645011b4c388) --- sys/modules/rtw88/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/modules/rtw88/Makefile b/sys/modules/rtw88/Makefile index 04000dd66e95..1978e2392da9 100644 --- a/sys/modules/rtw88/Makefile +++ b/sys/modules/rtw88/Makefile @@ -90,6 +90,6 @@ CFLAGS+= ${LINUXKPI_INCLUDES} CFLAGS+= -DCONFIG_RTW88_DEBUG CFLAGS+= -DKBUILD_MODNAME='"rtw88"' -CFLAGS+= -DLINUXKPI_VERSION=61900 +CFLAGS+= -DLINUXKPI_VERSION=70000 .include From nobody Wed Apr 22 21:09:04 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfn3L2vz6bL8b for ; Wed, 22 Apr 2026 21:09:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bfm2Bb7z3lkh for ; Wed, 22 Apr 2026 21:09:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892144; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z7JyduxcFRpUiW2k0BAFoCjZmTk9wUSu6gpNLR6tjV4=; b=gHS1AzY40o3OudB8+jhGQzAy8VnYOmIzJWGi61tYuhPvpXlOW93LLsGRXh5PqtVM9XGlW6 8Uk0IwooaMIuxSF1dt/p+ZiAoFSTvx6PtFo5Iqu/X7IaiYvPhiPYZEC2pQFYyGFpYVxE4i SWVm0nDiH1MhMfKw7zJHFk4yDfTVnetiSh1og+OfwjddJ+ID43dp1zaIulOSfCZ6qeRBKC +bSzwJk+UDOlYZ3xFMGjcCu52UKTkr0k1kAG4L9DRixN1/uxUE24Wz6+zJeqdgTC+04A81 FXFlm76t1WJipS7/DUSvqQsn+Tl1yo8FJsekqTDbvTRRj6jCjnh1nT1zJ2Lckw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892144; a=rsa-sha256; cv=none; b=YWDguGH21JcoNImg3A51wx9hpzMJZA9KjY501WRAhNrXTmZgm1iwWeZrGq/pZRQAtBYgYV WcC+GCpGhi6trzr8KNu1HiZl/2T7e+colpGqqfpmgkB2KOTngaIQINOyfthN9m3ORefkaA sgSxlUYkVmzrYTAUI9oPqfclytDTgsRuAHDJOcnk4bYUisBMk/snRmK3EoLRq/oOPfP3Ap W8t6xUw/1UsjrONH/JIQpdD97JftJv/Q2F/hPOG81VzXH05ysE4oBbwgbi7tDQ4G2VRkYf PZQyl2DvjyPHaNqiFyA23ZwXhfp8Mq+AjeO+kJY12iIh/l26zBdS9Z+Q08qxAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892144; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z7JyduxcFRpUiW2k0BAFoCjZmTk9wUSu6gpNLR6tjV4=; b=sUD1XNVKKN/W6ng7Y6xnwd+yAbAIWAuw2vBsE00qcdCH2KgRljATEQMBZq8au8kLa/LM+B rDioZhNr5XGo9SWQt9+5IjuLvMdnqELZjbNsWwJ7Tr4kYB3hdUzL+gNkOUS3znCuR0oSyV SxHXewwETV/56WvCCEs/uwvlmmFSs9wzE9YSMuIZMpYv4ueQ9a6BB7+qgDMQ7/I6E5HfAu Ym75eSO1ZcUMul5o3CcXP8oFyTetioALMmFSvjmyF72fDePXGo1KQqZss4t+g4PMX5CQOm ykTeGRjyb/95Ph3xI1X2IT/2Gd3KG42ACyLNfDx4pdi1/yIQ15BDstkj7zd6dw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfm1Z1jznX2 for ; Wed, 22 Apr 2026 21:09:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 275fb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:09:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: bcdf750def1d - stable/15 - rtw88: update Realtek's rtw88 driver List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: bcdf750def1d5776140e1114ef155f9b018beac3 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:09:04 +0000 Message-Id: <69e938f0.275fb.738f6d4f@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=bcdf750def1d5776140e1114ef155f9b018beac3 commit bcdf750def1d5776140e1114ef155f9b018beac3 Author: Bjoern A. Zeeb AuthorDate: 2026-04-18 14:21:04 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:11 +0000 rtw88: update Realtek's rtw88 driver This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ). Sponsored by: The FreeBSD Foundation (cherry picked from commit 41b641cc0537d1288cc05332bb4c5de3dcb12589) --- sys/contrib/dev/rtw88/fw.c | 2 +- sys/contrib/dev/rtw88/main.c | 54 +++++++++++++++++++++++++++------------ sys/contrib/dev/rtw88/main.h | 2 +- sys/contrib/dev/rtw88/phy.c | 20 +++++++++++++++ sys/contrib/dev/rtw88/phy.h | 2 ++ sys/contrib/dev/rtw88/rtw8723cs.c | 2 +- sys/contrib/dev/rtw88/rtw8723ds.c | 2 +- sys/contrib/dev/rtw88/rtw8821cs.c | 2 +- sys/contrib/dev/rtw88/rtw8821cu.c | 2 ++ sys/contrib/dev/rtw88/rtw8822b.c | 3 ++- sys/contrib/dev/rtw88/rtw8822bs.c | 2 +- sys/contrib/dev/rtw88/rtw8822cs.c | 2 +- sys/contrib/dev/rtw88/sdio.c | 6 ++--- sys/contrib/dev/rtw88/sdio.h | 2 +- sys/contrib/dev/rtw88/usb.c | 5 ++-- sys/contrib/dev/rtw88/util.c | 4 +-- 16 files changed, 78 insertions(+), 34 deletions(-) diff --git a/sys/contrib/dev/rtw88/fw.c b/sys/contrib/dev/rtw88/fw.c index 5ce4a6bcffb6..1574b2422240 100644 --- a/sys/contrib/dev/rtw88/fw.c +++ b/sys/contrib/dev/rtw88/fw.c @@ -1331,7 +1331,7 @@ static struct rtw_rsvd_page *rtw_alloc_rsvd_page(struct rtw_dev *rtwdev, { struct rtw_rsvd_page *rsvd_pkt = NULL; - rsvd_pkt = kzalloc(sizeof(*rsvd_pkt), GFP_KERNEL); + rsvd_pkt = kzalloc_obj(*rsvd_pkt); if (!rsvd_pkt) return NULL; diff --git a/sys/contrib/dev/rtw88/main.c b/sys/contrib/dev/rtw88/main.c index b38709b180fd..43d537d0daba 100644 --- a/sys/contrib/dev/rtw88/main.c +++ b/sys/contrib/dev/rtw88/main.c @@ -811,10 +811,10 @@ void rtw_set_rx_freq_band(struct rtw_rx_pkt_stat *pkt_stat, u8 channel) } EXPORT_SYMBOL(rtw_set_rx_freq_band); -void rtw_set_dtim_period(struct rtw_dev *rtwdev, int dtim_period) +void rtw_set_dtim_period(struct rtw_dev *rtwdev, u8 dtim_period) { rtw_write32_set(rtwdev, REG_TCR, BIT_TCR_UPDATE_TIMIE); - rtw_write8(rtwdev, REG_DTIM_COUNTER_ROOT, dtim_period - 1); + rtw_write8(rtwdev, REG_DTIM_COUNTER_ROOT, dtim_period ? dtim_period - 1 : 0); } void rtw_update_channel(struct rtw_dev *rtwdev, u8 center_channel, @@ -1568,6 +1568,8 @@ void rtw_core_scan_start(struct rtw_dev *rtwdev, struct rtw_vif *rtwvif, set_bit(RTW_FLAG_DIG_DISABLE, rtwdev->flags); set_bit(RTW_FLAG_SCANNING, rtwdev->flags); + + rtw_phy_dig_set_max_coverage(rtwdev); } void rtw_core_scan_complete(struct rtw_dev *rtwdev, struct ieee80211_vif *vif, @@ -1579,6 +1581,7 @@ void rtw_core_scan_complete(struct rtw_dev *rtwdev, struct ieee80211_vif *vif, if (!rtwvif) return; + rtw_phy_dig_reset(rtwdev); clear_bit(RTW_FLAG_SCANNING, rtwdev->flags); clear_bit(RTW_FLAG_DIG_DISABLE, rtwdev->flags); @@ -1743,14 +1746,41 @@ static u16 rtw_get_max_scan_ie_len(struct rtw_dev *rtwdev) return len; } +static struct ieee80211_supported_band * +rtw_sband_dup(struct rtw_dev *rtwdev, + const struct ieee80211_supported_band *sband) +{ + struct ieee80211_supported_band *dup; + + dup = devm_kmemdup(rtwdev->dev, sband, sizeof(*sband), GFP_KERNEL); + if (!dup) + return NULL; + + dup->channels = devm_kmemdup_array(rtwdev->dev, sband->channels, + sband->n_channels, + sizeof(*sband->channels), + GFP_KERNEL); + if (!dup->channels) + return NULL; + + dup->bitrates = devm_kmemdup_array(rtwdev->dev, sband->bitrates, + sband->n_bitrates, + sizeof(*sband->bitrates), + GFP_KERNEL); + if (!dup->bitrates) + return NULL; + + return dup; +} + static void rtw_set_supported_band(struct ieee80211_hw *hw, const struct rtw_chip_info *chip) { - struct rtw_dev *rtwdev = hw->priv; struct ieee80211_supported_band *sband; + struct rtw_dev *rtwdev = hw->priv; if (chip->band & RTW_BAND_2G) { - sband = kmemdup(&rtw_band_2ghz, sizeof(*sband), GFP_KERNEL); + sband = rtw_sband_dup(rtwdev, &rtw_band_2ghz); if (!sband) goto err_out; #if defined(__linux__) @@ -1763,7 +1793,7 @@ static void rtw_set_supported_band(struct ieee80211_hw *hw, } if (chip->band & RTW_BAND_5G) { - sband = kmemdup(&rtw_band_5ghz, sizeof(*sband), GFP_KERNEL); + sband = rtw_sband_dup(rtwdev, &rtw_band_5ghz); if (!sband) goto err_out; #if defined(__linux__) @@ -1787,13 +1817,6 @@ err_out: rtw_err(rtwdev, "failed to set supported band\n"); } -static void rtw_unset_supported_band(struct ieee80211_hw *hw, - const struct rtw_chip_info *chip) -{ - kfree(hw->wiphy->bands[NL80211_BAND_2GHZ]); - kfree(hw->wiphy->bands[NL80211_BAND_5GHZ]); -} - static void rtw_vif_smps_iter(void *data, u8 *mac, struct ieee80211_vif *vif) { @@ -2425,10 +2448,7 @@ EXPORT_SYMBOL(rtw_register_hw); void rtw_unregister_hw(struct rtw_dev *rtwdev, struct ieee80211_hw *hw) { - const struct rtw_chip_info *chip = rtwdev->chip; - ieee80211_unregister_hw(hw); - rtw_unset_supported_band(hw, chip); rtw_debugfs_deinit(rtwdev); rtw_led_deinit(rtwdev); } @@ -2549,10 +2569,10 @@ void rtw_core_enable_beacon(struct rtw_dev *rtwdev, bool enable) if (enable) { rtw_write32_set(rtwdev, REG_BCN_CTRL, BIT_EN_BCN_FUNCTION); - rtw_write32_clr(rtwdev, REG_TXPAUSE, BIT_HIGH_QUEUE); + rtw_write8_clr(rtwdev, REG_TXPAUSE, BIT_HIGH_QUEUE); } else { rtw_write32_clr(rtwdev, REG_BCN_CTRL, BIT_EN_BCN_FUNCTION); - rtw_write32_set(rtwdev, REG_TXPAUSE, BIT_HIGH_QUEUE); + rtw_write8_set(rtwdev, REG_TXPAUSE, BIT_HIGH_QUEUE); } } diff --git a/sys/contrib/dev/rtw88/main.h b/sys/contrib/dev/rtw88/main.h index d1e4f3e41ba1..212f5150e012 100644 --- a/sys/contrib/dev/rtw88/main.h +++ b/sys/contrib/dev/rtw88/main.h @@ -2235,7 +2235,7 @@ enum nl80211_band rtw_hw_to_nl80211_band(enum rtw_supported_band hw_band) } void rtw_set_rx_freq_band(struct rtw_rx_pkt_stat *pkt_stat, u8 channel); -void rtw_set_dtim_period(struct rtw_dev *rtwdev, int dtim_period); +void rtw_set_dtim_period(struct rtw_dev *rtwdev, u8 dtim_period); void rtw_get_channel_params(struct cfg80211_chan_def *chandef, struct rtw_channel_params *ch_param); bool check_hw_ready(struct rtw_dev *rtwdev, u32 addr, u32 mask, u32 target); diff --git a/sys/contrib/dev/rtw88/phy.c b/sys/contrib/dev/rtw88/phy.c index 55be0d8e0c28..e2ac5c6fd500 100644 --- a/sys/contrib/dev/rtw88/phy.c +++ b/sys/contrib/dev/rtw88/phy.c @@ -370,6 +370,26 @@ static void rtw_phy_statistics(struct rtw_dev *rtwdev) #define DIG_CVRG_MIN 0x1c #define DIG_RSSI_GAIN_OFFSET 15 +void rtw_phy_dig_set_max_coverage(struct rtw_dev *rtwdev) +{ + /* Lower values result in greater coverage. */ + rtw_dbg(rtwdev, RTW_DBG_PHY, "Setting IGI=%#x for max coverage\n", + DIG_CVRG_MIN); + + rtw_phy_dig_write(rtwdev, DIG_CVRG_MIN); +} + +void rtw_phy_dig_reset(struct rtw_dev *rtwdev) +{ + struct rtw_dm_info *dm_info = &rtwdev->dm_info; + u8 last_igi; + + last_igi = dm_info->igi_history[0]; + rtw_dbg(rtwdev, RTW_DBG_PHY, "Resetting IGI=%#x\n", last_igi); + + rtw_phy_dig_write(rtwdev, last_igi); +} + static bool rtw_phy_dig_check_damping(struct rtw_dm_info *dm_info) { diff --git a/sys/contrib/dev/rtw88/phy.h b/sys/contrib/dev/rtw88/phy.h index c9e6b869661d..8449936497bb 100644 --- a/sys/contrib/dev/rtw88/phy.h +++ b/sys/contrib/dev/rtw88/phy.h @@ -146,6 +146,8 @@ static inline int rtw_check_supported_rfe(struct rtw_dev *rtwdev) } void rtw_phy_dig_write(struct rtw_dev *rtwdev, u8 igi); +void rtw_phy_dig_reset(struct rtw_dev *rtwdev); +void rtw_phy_dig_set_max_coverage(struct rtw_dev *rtwdev); struct rtw_power_params { u8 pwr_base; diff --git a/sys/contrib/dev/rtw88/rtw8723cs.c b/sys/contrib/dev/rtw88/rtw8723cs.c index 1f98d35a8dd1..2018c9d76dd1 100644 --- a/sys/contrib/dev/rtw88/rtw8723cs.c +++ b/sys/contrib/dev/rtw88/rtw8723cs.c @@ -23,9 +23,9 @@ static struct sdio_driver rtw_8723cs_driver = { .id_table = rtw_8723cs_id_table, .probe = rtw_sdio_probe, .remove = rtw_sdio_remove, + .shutdown = rtw_sdio_shutdown, .drv = { .pm = &rtw_sdio_pm_ops, - .shutdown = rtw_sdio_shutdown }}; module_sdio_driver(rtw_8723cs_driver); diff --git a/sys/contrib/dev/rtw88/rtw8723ds.c b/sys/contrib/dev/rtw88/rtw8723ds.c index 206b77e5b98e..e38c90b769a2 100644 --- a/sys/contrib/dev/rtw88/rtw8723ds.c +++ b/sys/contrib/dev/rtw88/rtw8723ds.c @@ -28,10 +28,10 @@ static struct sdio_driver rtw_8723ds_driver = { .name = KBUILD_MODNAME, .probe = rtw_sdio_probe, .remove = rtw_sdio_remove, + .shutdown = rtw_sdio_shutdown, .id_table = rtw_8723ds_id_table, .drv = { .pm = &rtw_sdio_pm_ops, - .shutdown = rtw_sdio_shutdown, } }; module_sdio_driver(rtw_8723ds_driver); diff --git a/sys/contrib/dev/rtw88/rtw8821cs.c b/sys/contrib/dev/rtw88/rtw8821cs.c index 6d94162213c6..58e0ef219cdc 100644 --- a/sys/contrib/dev/rtw88/rtw8821cs.c +++ b/sys/contrib/dev/rtw88/rtw8821cs.c @@ -23,10 +23,10 @@ static struct sdio_driver rtw_8821cs_driver = { .name = KBUILD_MODNAME, .probe = rtw_sdio_probe, .remove = rtw_sdio_remove, + .shutdown = rtw_sdio_shutdown, .id_table = rtw_8821cs_id_table, .drv = { .pm = &rtw_sdio_pm_ops, - .shutdown = rtw_sdio_shutdown, } }; module_sdio_driver(rtw_8821cs_driver); diff --git a/sys/contrib/dev/rtw88/rtw8821cu.c b/sys/contrib/dev/rtw88/rtw8821cu.c index 0f42819f787c..47ecd0394960 100644 --- a/sys/contrib/dev/rtw88/rtw8821cu.c +++ b/sys/contrib/dev/rtw88/rtw8821cu.c @@ -37,6 +37,8 @@ static const struct usb_device_id rtw_8821cu_id_table[] = { .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) }, /* Edimax */ { USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0xd811, 0xff, 0xff, 0xff), .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) }, /* Edimax */ + { USB_DEVICE_AND_INTERFACE_INFO(0x2c4e, 0x0105, 0xff, 0xff, 0xff), + .driver_info = (kernel_ulong_t)&(rtw8821c_hw_spec) }, /* Mercusys */ {}, }; MODULE_DEVICE_TABLE(usb, rtw_8821cu_id_table); diff --git a/sys/contrib/dev/rtw88/rtw8822b.c b/sys/contrib/dev/rtw88/rtw8822b.c index b37b301fc866..f9097bc337df 100644 --- a/sys/contrib/dev/rtw88/rtw8822b.c +++ b/sys/contrib/dev/rtw88/rtw8822b.c @@ -1005,7 +1005,8 @@ static int rtw8822b_set_antenna(struct rtw_dev *rtwdev, hal->antenna_tx = antenna_tx; hal->antenna_rx = antenna_rx; - rtw8822b_config_trx_mode(rtwdev, antenna_tx, antenna_rx, false); + if (test_bit(RTW_FLAG_POWERON, rtwdev->flags)) + rtw8822b_config_trx_mode(rtwdev, antenna_tx, antenna_rx, false); return 0; } diff --git a/sys/contrib/dev/rtw88/rtw8822bs.c b/sys/contrib/dev/rtw88/rtw8822bs.c index 744781dcb419..2de9b11540c5 100644 --- a/sys/contrib/dev/rtw88/rtw8822bs.c +++ b/sys/contrib/dev/rtw88/rtw8822bs.c @@ -23,10 +23,10 @@ static struct sdio_driver rtw_8822bs_driver = { .name = KBUILD_MODNAME, .probe = rtw_sdio_probe, .remove = rtw_sdio_remove, + .shutdown = rtw_sdio_shutdown, .id_table = rtw_8822bs_id_table, .drv = { .pm = &rtw_sdio_pm_ops, - .shutdown = rtw_sdio_shutdown, } }; module_sdio_driver(rtw_8822bs_driver); diff --git a/sys/contrib/dev/rtw88/rtw8822cs.c b/sys/contrib/dev/rtw88/rtw8822cs.c index 322281e07eb8..b00ef4173962 100644 --- a/sys/contrib/dev/rtw88/rtw8822cs.c +++ b/sys/contrib/dev/rtw88/rtw8822cs.c @@ -23,10 +23,10 @@ static struct sdio_driver rtw_8822cs_driver = { .name = KBUILD_MODNAME, .probe = rtw_sdio_probe, .remove = rtw_sdio_remove, + .shutdown = rtw_sdio_shutdown, .id_table = rtw_8822cs_id_table, .drv = { .pm = &rtw_sdio_pm_ops, - .shutdown = rtw_sdio_shutdown, } }; module_sdio_driver(rtw_8822cs_driver); diff --git a/sys/contrib/dev/rtw88/sdio.c b/sys/contrib/dev/rtw88/sdio.c index e35de52d8eb4..1318e94f8524 100644 --- a/sys/contrib/dev/rtw88/sdio.c +++ b/sys/contrib/dev/rtw88/sdio.c @@ -1290,8 +1290,7 @@ static int rtw_sdio_init_tx(struct rtw_dev *rtwdev) for (i = 0; i < RTK_MAX_TX_QUEUE_NUM; i++) skb_queue_head_init(&rtwsdio->tx_queue[i]); - rtwsdio->tx_handler_data = kmalloc(sizeof(*rtwsdio->tx_handler_data), - GFP_KERNEL); + rtwsdio->tx_handler_data = kmalloc_obj(*rtwsdio->tx_handler_data); if (!rtwsdio->tx_handler_data) goto err_destroy_wq; @@ -1414,9 +1413,8 @@ void rtw_sdio_remove(struct sdio_func *sdio_func) } EXPORT_SYMBOL(rtw_sdio_remove); -void rtw_sdio_shutdown(struct device *dev) +void rtw_sdio_shutdown(struct sdio_func *sdio_func) { - struct sdio_func *sdio_func = dev_to_sdio_func(dev); const struct rtw_chip_info *chip; struct ieee80211_hw *hw; struct rtw_dev *rtwdev; diff --git a/sys/contrib/dev/rtw88/sdio.h b/sys/contrib/dev/rtw88/sdio.h index 3c659ed180f0..457e8b02380e 100644 --- a/sys/contrib/dev/rtw88/sdio.h +++ b/sys/contrib/dev/rtw88/sdio.h @@ -166,7 +166,7 @@ extern const struct dev_pm_ops rtw_sdio_pm_ops; int rtw_sdio_probe(struct sdio_func *sdio_func, const struct sdio_device_id *id); void rtw_sdio_remove(struct sdio_func *sdio_func); -void rtw_sdio_shutdown(struct device *dev); +void rtw_sdio_shutdown(struct sdio_func *sdio_func); static inline bool rtw_sdio_is_sdio30_supported(struct rtw_dev *rtwdev) { diff --git a/sys/contrib/dev/rtw88/usb.c b/sys/contrib/dev/rtw88/usb.c index 69a4cb60184f..1c2a1a328f09 100644 --- a/sys/contrib/dev/rtw88/usb.c +++ b/sys/contrib/dev/rtw88/usb.c @@ -403,7 +403,7 @@ static bool rtw_usb_tx_agg_skb(struct rtw_usb *rtwusb, struct sk_buff_head *list if (skb_queue_empty(list)) return false; - txcb = kmalloc(sizeof(*txcb), GFP_ATOMIC); + txcb = kmalloc_obj(*txcb, GFP_ATOMIC); if (!txcb) return false; @@ -965,7 +965,8 @@ static int rtw_usb_init_rx(struct rtw_dev *rtwdev) struct sk_buff *rx_skb; int i; - rtwusb->rxwq = alloc_workqueue("rtw88_usb: rx wq", WQ_BH, 0); + rtwusb->rxwq = alloc_workqueue("rtw88_usb: rx wq", WQ_BH | WQ_PERCPU, + 0); if (!rtwusb->rxwq) { rtw_err(rtwdev, "failed to create RX work queue\n"); return -ENOMEM; diff --git a/sys/contrib/dev/rtw88/util.c b/sys/contrib/dev/rtw88/util.c index 66819f694405..fcd6eb1ab32a 100644 --- a/sys/contrib/dev/rtw88/util.c +++ b/sys/contrib/dev/rtw88/util.c @@ -122,7 +122,7 @@ static void rtw_collect_sta_iter(void *data, struct ieee80211_sta *sta) struct rtw_iter_stas_data *iter_stas = data; struct rtw_stas_entry *stas_entry; - stas_entry = kmalloc(sizeof(*stas_entry), GFP_ATOMIC); + stas_entry = kmalloc_obj(*stas_entry, GFP_ATOMIC); if (!stas_entry) return; @@ -172,7 +172,7 @@ static void rtw_collect_vif_iter(void *data, u8 *mac, struct ieee80211_vif *vif) struct rtw_iter_vifs_data *iter_stas = data; struct rtw_vifs_entry *vifs_entry; - vifs_entry = kmalloc(sizeof(*vifs_entry), GFP_ATOMIC); + vifs_entry = kmalloc_obj(*vifs_entry, GFP_ATOMIC); if (!vifs_entry) return; From nobody Wed Apr 22 21:09:06 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfp6FcGz6bLFD for ; Wed, 22 Apr 2026 21:09:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bfp3nlPz3m1P for ; Wed, 22 Apr 2026 21:09:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lg6b42hnQqT0sF23nSWgNkk7ZQM4le89CECqr3Q/l7g=; b=tOsxnLE7FAUJqNJwYtlLJlCl+9Le1NZ2VwsS2TYDN5KE8bJjeyP8I+x2IjLy6K0bhjwQDd sn+tXGpDf2H+ecmNRMLi/5RNaH/fYBm5Vj+BgGJiScWcbmXCKl4GpayX5i387X+RivqP7S BQLPlHScsDFCbtw2JrgWRAoM8OaDr5d3GmLrkIuIvftgd8nsNbjrPaN4hIjM6TKfArdshD xBYvN2gSI8RtGGWqXTH8gkJ+7sOMYu+Oixyl+tMLsN8YgqHUHrEOrSKWyJu/IKSZQlzjfY /8Ct2ET2QF5mzx4O5BFKuW/LK2JsMdCw+sqJBG8AitHwQ+MNhlkb8TjRNU19KA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892146; a=rsa-sha256; cv=none; b=GZZZLSK6SFFpihWVdH/3AwrPjE+UdZrdOcOY2xA38pm1rslngnohMcXHa2+eRF/atb99/C u7zofPU8OZmrrr4Znadmse0QTI1F2NdUe1anS99DaWeriGZSOzlOaRKfHhRGIo2lvDkggs OmYRPxVBr43tfzcxy4PNjTwcEWvGZOLXUsWaOK/LsE04yRFyg361PJfY0wD808Mbik+Ui8 dd5MpoMXxCyVej6qVNoz6GTPmNcV+WhFFGS6td7Z/yYQSrzopg4vJJYDt5UZXiYQnBLyog zMZPb0iyKpV/trqt+clqiRT4WEvE/cSfbK5n2lhwtkSkuvJCTZ3E6kO6PAxTKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lg6b42hnQqT0sF23nSWgNkk7ZQM4le89CECqr3Q/l7g=; b=Mnbdc/FY2sFcX0/Zds5DsNHTpAhS9WnhZFgCd+CNOUkmkJJxIqDXN5CrBKjlKfDuxFg40s kFKtSKM62fbH5g8roZ05METL0BKEmPGzqtrDU//bWBN+Qrx5L76/l/YYgEarYxi7U3R6tN VT4LG05oK0zdPs4QgkjvoMpsDxlVu44SIKUEd2AA/9ShdGcu/4VV72ysOybUGl2wq+8t9D a27q9dDrMxRJn0pwiOCRdtuSdMZwwYfX6kwurgWgT+4GNMCgu3/8CnObvG4uFujiIBKmfX FXdpcGGwxMN48V1yLT1C4VFUoHtlCOA+57Upxjzn8+ygPf1NmxloJHhlszI5hQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfp3DQ1znZx for ; Wed, 22 Apr 2026 21:09:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25b7f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:09:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: f45e34316eb7 - stable/15 - iwlwifi: update Intel's mvm/mld drivers List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f45e34316eb7871dc2cd649997fc5d63b1de2009 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:09:06 +0000 Message-Id: <69e938f2.25b7f.5a99b7b4@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f45e34316eb7871dc2cd649997fc5d63b1de2009 commit f45e34316eb7871dc2cd649997fc5d63b1de2009 Author: Bjoern A. Zeeb AuthorDate: 2026-04-18 20:35:37 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:11 +0000 iwlwifi: update Intel's mvm/mld drivers This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ). Sponsored by: The FreeBSD Foundation (cherry picked from commit b2bd08185e4984c70179c195f712cef5a136d21b) --- sys/contrib/dev/iwlwifi/cfg/bz.c | 12 - sys/contrib/dev/iwlwifi/cfg/rf-fm.c | 12 + sys/contrib/dev/iwlwifi/cfg/rf-pe.c | 1 - sys/contrib/dev/iwlwifi/fw/acpi.c | 117 +++++++--- sys/contrib/dev/iwlwifi/fw/api/commands.h | 5 + sys/contrib/dev/iwlwifi/fw/api/mac-cfg.h | 159 ++++++++++++- sys/contrib/dev/iwlwifi/fw/api/nvm-reg.h | 34 ++- sys/contrib/dev/iwlwifi/fw/api/power.h | 2 +- sys/contrib/dev/iwlwifi/fw/api/rs.h | 41 +++- sys/contrib/dev/iwlwifi/fw/api/rx.h | 95 +++++++- sys/contrib/dev/iwlwifi/fw/api/scan.h | 10 + sys/contrib/dev/iwlwifi/fw/dbg.c | 7 +- sys/contrib/dev/iwlwifi/fw/debugfs.c | 3 +- sys/contrib/dev/iwlwifi/fw/file.h | 2 + sys/contrib/dev/iwlwifi/fw/pnvm.c | 4 +- sys/contrib/dev/iwlwifi/fw/regulatory.c | 206 +---------------- sys/contrib/dev/iwlwifi/fw/regulatory.h | 9 +- sys/contrib/dev/iwlwifi/fw/runtime.h | 17 +- sys/contrib/dev/iwlwifi/fw/smem.c | 8 +- sys/contrib/dev/iwlwifi/fw/uefi.c | 72 ++++-- sys/contrib/dev/iwlwifi/fw/uefi.h | 2 +- sys/contrib/dev/iwlwifi/iwl-config.h | 1 - sys/contrib/dev/iwlwifi/iwl-dbg-tlv.c | 6 +- sys/contrib/dev/iwlwifi/iwl-drv.c | 6 +- sys/contrib/dev/iwlwifi/iwl-nvm-parse.c | 24 +- sys/contrib/dev/iwlwifi/iwl-phy-db.c | 15 +- sys/contrib/dev/iwlwifi/iwl-trans.c | 8 +- sys/contrib/dev/iwlwifi/iwl-trans.h | 6 +- sys/contrib/dev/iwlwifi/mld/Makefile | 2 +- sys/contrib/dev/iwlwifi/mld/d3.c | 20 +- sys/contrib/dev/iwlwifi/mld/debugfs.c | 7 +- sys/contrib/dev/iwlwifi/mld/iface.c | 124 ++++++---- sys/contrib/dev/iwlwifi/mld/iface.h | 2 + sys/contrib/dev/iwlwifi/mld/link.c | 2 +- sys/contrib/dev/iwlwifi/mld/low_latency.c | 4 +- sys/contrib/dev/iwlwifi/mld/mac80211.c | 136 +++++++++-- sys/contrib/dev/iwlwifi/mld/mld.c | 4 + sys/contrib/dev/iwlwifi/mld/mld.h | 3 + sys/contrib/dev/iwlwifi/mld/mlo.c | 63 ++++-- sys/contrib/dev/iwlwifi/mld/mlo.h | 5 + sys/contrib/dev/iwlwifi/mld/nan.c | 299 +++++++++++++++++++++++++ sys/contrib/dev/iwlwifi/mld/nan.h | 28 +++ sys/contrib/dev/iwlwifi/mld/notif.c | 20 +- sys/contrib/dev/iwlwifi/mld/notif.h | 1 + sys/contrib/dev/iwlwifi/mld/power.c | 37 ++- sys/contrib/dev/iwlwifi/mld/regulatory.c | 66 +++++- sys/contrib/dev/iwlwifi/mld/rx.c | 142 +++++++++++- sys/contrib/dev/iwlwifi/mld/scan.c | 47 +++- sys/contrib/dev/iwlwifi/mld/scan.h | 9 +- sys/contrib/dev/iwlwifi/mld/sta.c | 13 +- sys/contrib/dev/iwlwifi/mld/time_sync.c | 3 +- sys/contrib/dev/iwlwifi/mld/tlc.c | 85 +++++-- sys/contrib/dev/iwlwifi/mld/tx.c | 11 + sys/contrib/dev/iwlwifi/mvm/d3.c | 65 ++---- sys/contrib/dev/iwlwifi/mvm/debugfs.c | 1 + sys/contrib/dev/iwlwifi/mvm/ftm-initiator.c | 2 +- sys/contrib/dev/iwlwifi/mvm/fw.c | 205 ++++++++++++++++- sys/contrib/dev/iwlwifi/mvm/link.c | 22 -- sys/contrib/dev/iwlwifi/mvm/mac-ctxt.c | 27 ++- sys/contrib/dev/iwlwifi/mvm/mac80211.c | 73 +----- sys/contrib/dev/iwlwifi/mvm/mld-key.c | 6 +- sys/contrib/dev/iwlwifi/mvm/mld-mac.c | 29 --- sys/contrib/dev/iwlwifi/mvm/mld-mac80211.c | 203 +---------------- sys/contrib/dev/iwlwifi/mvm/mld-sta.c | 30 +-- sys/contrib/dev/iwlwifi/mvm/mvm.h | 61 +---- sys/contrib/dev/iwlwifi/mvm/ops.c | 4 +- sys/contrib/dev/iwlwifi/mvm/rxmq.c | 8 - sys/contrib/dev/iwlwifi/mvm/scan.c | 25 +-- sys/contrib/dev/iwlwifi/mvm/sta.c | 3 +- sys/contrib/dev/iwlwifi/mvm/tdls.c | 4 +- sys/contrib/dev/iwlwifi/mvm/time-event.c | 39 +--- sys/contrib/dev/iwlwifi/mvm/time-event.h | 4 +- sys/contrib/dev/iwlwifi/mvm/tx.c | 51 +---- sys/contrib/dev/iwlwifi/mvm/utils.c | 4 - sys/contrib/dev/iwlwifi/pcie/ctxt-info.c | 4 +- sys/contrib/dev/iwlwifi/pcie/gen1_2/internal.h | 5 +- sys/contrib/dev/iwlwifi/pcie/gen1_2/rx.c | 13 +- sys/contrib/dev/iwlwifi/pcie/gen1_2/trans.c | 8 +- sys/contrib/dev/iwlwifi/pcie/gen1_2/tx-gen2.c | 4 +- sys/contrib/dev/iwlwifi/pcie/gen1_2/tx.c | 11 +- 80 files changed, 1828 insertions(+), 1100 deletions(-) diff --git a/sys/contrib/dev/iwlwifi/cfg/bz.c b/sys/contrib/dev/iwlwifi/cfg/bz.c index d25445bd1e5c..77db8c75e6e2 100644 --- a/sys/contrib/dev/iwlwifi/cfg/bz.c +++ b/sys/contrib/dev/iwlwifi/cfg/bz.c @@ -19,12 +19,6 @@ #define IWL_BZ_SMEM_OFFSET 0x400000 #define IWL_BZ_SMEM_LEN 0xD0000 -#define IWL_BZ_A_FM_B_FW_PRE "iwlwifi-bz-a0-fm-b0" -#define IWL_BZ_A_FM_C_FW_PRE "iwlwifi-bz-a0-fm-c0" -#define IWL_BZ_A_FM4_B_FW_PRE "iwlwifi-bz-a0-fm4-b0" -#define IWL_GL_B_FM_B_FW_PRE "iwlwifi-gl-b0-fm-b0" -#define IWL_GL_C_FM_C_FW_PRE "iwlwifi-gl-c0-fm-c0" - static const struct iwl_family_base_params iwl_bz_base = { .num_of_queues = 512, .max_tfd_queue_size = 65536, @@ -100,9 +94,3 @@ const struct iwl_mac_cfg iwl_gl_mac_cfg = { .xtal_latency = 12000, .low_latency_xtal = true, }; - -IWL_CORE_FW(IWL_BZ_A_FM_B_FW_PRE, IWL_BZ_UCODE_CORE_MAX); -IWL_CORE_FW(IWL_BZ_A_FM_C_FW_PRE, IWL_BZ_UCODE_CORE_MAX); -IWL_CORE_FW(IWL_BZ_A_FM4_B_FW_PRE, IWL_BZ_UCODE_CORE_MAX); -IWL_CORE_FW(IWL_GL_B_FM_B_FW_PRE, IWL_BZ_UCODE_CORE_MAX); -IWL_CORE_FW(IWL_GL_C_FM_C_FW_PRE, IWL_BZ_UCODE_CORE_MAX); diff --git a/sys/contrib/dev/iwlwifi/cfg/rf-fm.c b/sys/contrib/dev/iwlwifi/cfg/rf-fm.c index fd82050e33a3..ad2536f53084 100644 --- a/sys/contrib/dev/iwlwifi/cfg/rf-fm.c +++ b/sys/contrib/dev/iwlwifi/cfg/rf-fm.c @@ -5,6 +5,12 @@ */ #include "iwl-config.h" +#define IWL_BZ_A_FM_B_FW_PRE "iwlwifi-bz-a0-fm-b0" +#define IWL_BZ_A_FM_C_FW_PRE "iwlwifi-bz-a0-fm-c0" +#define IWL_BZ_A_FM4_B_FW_PRE "iwlwifi-bz-a0-fm4-b0" +#define IWL_GL_B_FM_B_FW_PRE "iwlwifi-gl-b0-fm-b0" +#define IWL_GL_C_FM_C_FW_PRE "iwlwifi-gl-c0-fm-c0" + /* NVM versions */ #define IWL_FM_NVM_VERSION 0x0a1d @@ -50,3 +56,9 @@ const char iwl_be201_name[] = "Intel(R) Wi-Fi 7 BE201 320MHz"; const char iwl_be200_name[] = "Intel(R) Wi-Fi 7 BE200 320MHz"; const char iwl_be202_name[] = "Intel(R) Wi-Fi 7 BE202 160MHz"; const char iwl_be401_name[] = "Intel(R) Wi-Fi 7 BE401 320MHz"; + +IWL_CORE_FW(IWL_BZ_A_FM_B_FW_PRE, IWL_BZ_UCODE_CORE_MAX); +IWL_CORE_FW(IWL_BZ_A_FM_C_FW_PRE, IWL_BZ_UCODE_CORE_MAX); +IWL_CORE_FW(IWL_BZ_A_FM4_B_FW_PRE, IWL_BZ_UCODE_CORE_MAX); +IWL_CORE_FW(IWL_GL_B_FM_B_FW_PRE, IWL_BZ_UCODE_CORE_MAX); +IWL_CORE_FW(IWL_GL_C_FM_C_FW_PRE, IWL_BZ_UCODE_CORE_MAX); diff --git a/sys/contrib/dev/iwlwifi/cfg/rf-pe.c b/sys/contrib/dev/iwlwifi/cfg/rf-pe.c index 408b9850bd10..2c29054ce7b8 100644 --- a/sys/contrib/dev/iwlwifi/cfg/rf-pe.c +++ b/sys/contrib/dev/iwlwifi/cfg/rf-pe.c @@ -13,5 +13,4 @@ const char iwl_killer_bn1850i_name[] = const char iwl_bn201_name[] = "Intel(R) Wi-Fi 8 BN201"; const char iwl_bn203_name[] = "Intel(R) Wi-Fi 8 BN203"; -const char iwl_be221_name[] = "Intel(R) Wi-Fi 7 BE221"; const char iwl_be223_name[] = "Intel(R) Wi-Fi 7 BE223"; diff --git a/sys/contrib/dev/iwlwifi/fw/acpi.c b/sys/contrib/dev/iwlwifi/fw/acpi.c index 52edc19d8cdd..de9aef0d924c 100644 --- a/sys/contrib/dev/iwlwifi/fw/acpi.c +++ b/sys/contrib/dev/iwlwifi/fw/acpi.c @@ -28,6 +28,8 @@ static const size_t acpi_dsm_size[DSM_FUNC_NUM_FUNCS] = { [DSM_FUNC_ENERGY_DETECTION_THRESHOLD] = sizeof(u32), [DSM_FUNC_RFI_CONFIG] = sizeof(u32), [DSM_FUNC_ENABLE_11BE] = sizeof(u32), + [DSM_FUNC_ENABLE_UNII_9] = sizeof(u32), + [DSM_FUNC_ENABLE_11BN] = sizeof(u32), }; static int iwl_acpi_get_handle(struct device *dev, acpi_string method, @@ -156,61 +158,104 @@ out: } /* - * This function receives a DSM function number, calculates its expected size - * according to Intel BIOS spec, and fills in the value in a 32-bit field. + * This function loads all the DSM functions, it checks the size and populates + * the cache with the values in a 32-bit field. * In case the expected size is smaller than 32-bit, padding will be added. */ -int iwl_acpi_get_dsm(struct iwl_fw_runtime *fwrt, - enum iwl_dsm_funcs func, u32 *value) +static int iwl_acpi_load_dsm_values(struct iwl_fw_runtime *fwrt) { - size_t expected_size; - u64 tmp; + u64 query_func_val; int ret; BUILD_BUG_ON(ARRAY_SIZE(acpi_dsm_size) != DSM_FUNC_NUM_FUNCS); - if (WARN_ON(func >= ARRAY_SIZE(acpi_dsm_size) || !func)) - return -EINVAL; + ret = iwl_acpi_get_dsm_integer(fwrt->dev, ACPI_DSM_REV, + DSM_FUNC_QUERY, + &iwl_guid, &query_func_val, + acpi_dsm_size[DSM_FUNC_QUERY]); - expected_size = acpi_dsm_size[func]; + if (ret) { + IWL_DEBUG_RADIO(fwrt, "ACPI QUERY FUNC not valid: %d\n", ret); + return ret; + } - /* Currently all ACPI DSMs are either 8-bit or 32-bit */ - if (expected_size != sizeof(u8) && expected_size != sizeof(u32)) - return -EOPNOTSUPP; + fwrt->dsm_revision = ACPI_DSM_REV; + fwrt->dsm_source = BIOS_SOURCE_ACPI; - if (!fwrt->acpi_dsm_funcs_valid) { - ret = iwl_acpi_get_dsm_integer(fwrt->dev, ACPI_DSM_REV, - DSM_FUNC_QUERY, - &iwl_guid, &tmp, - acpi_dsm_size[DSM_FUNC_QUERY]); - if (ret) { - /* always indicate BIT(0) to avoid re-reading */ - fwrt->acpi_dsm_funcs_valid = BIT(0); - return ret; + IWL_DEBUG_RADIO(fwrt, "ACPI DSM validity bitmap 0x%x\n", + (u32)query_func_val); + + /* DSM_FUNC_QUERY is 0, start from 1 */ + for (int func = 1; func < ARRAY_SIZE(fwrt->dsm_values); func++) { + size_t expected_size = acpi_dsm_size[func]; + u64 tmp; + + if (!(query_func_val & BIT(func))) { + IWL_DEBUG_RADIO(fwrt, + "ACPI DSM %d not indicated as valid\n", + func); + continue; } - IWL_DEBUG_RADIO(fwrt, "ACPI DSM validity bitmap 0x%x\n", - (u32)tmp); - /* always indicate BIT(0) to avoid re-reading */ - fwrt->acpi_dsm_funcs_valid = tmp | BIT(0); + /* This is an invalid function (5 for example) */ + if (!expected_size) + continue; + + /* Currently all ACPI DSMs are either 8-bit or 32-bit */ + if (expected_size != sizeof(u8) && expected_size != sizeof(u32)) + continue; + + ret = iwl_acpi_get_dsm_integer(fwrt->dev, ACPI_DSM_REV, func, + &iwl_guid, &tmp, expected_size); + if (ret) + continue; + + if ((expected_size == sizeof(u8) && tmp != (u8)tmp) || + (expected_size == sizeof(u32) && tmp != (u32)tmp)) + IWL_DEBUG_RADIO(fwrt, + "DSM value overflows the expected size, truncating\n"); + fwrt->dsm_values[func] = (u32)tmp; + fwrt->dsm_funcs_valid |= BIT(func); + } + + return 0; +} + +/* + * This function receives a DSM function number, calculates its expected size + * according to Intel BIOS spec, and fills in the value in a 32-bit field. + * In case the expected size is smaller than 32-bit, padding will be added. + */ +int iwl_acpi_get_dsm(struct iwl_fw_runtime *fwrt, + enum iwl_dsm_funcs func, u32 *value) +{ + if (!fwrt->dsm_funcs_valid) { + int ret = iwl_acpi_load_dsm_values(fwrt); + + /* + * Always set the valid bit for DSM_FUNC_QUERY so that even if + * DSM_FUNC_QUERY returns 0 (no DSM function is valid), we will + * still consider the cache as valid. + */ + fwrt->dsm_funcs_valid |= BIT(DSM_FUNC_QUERY); + + if (ret) + return ret; } - if (!(fwrt->acpi_dsm_funcs_valid & BIT(func))) { + BUILD_BUG_ON(ARRAY_SIZE(fwrt->dsm_values) != DSM_FUNC_NUM_FUNCS); + BUILD_BUG_ON(BITS_PER_TYPE(fwrt->dsm_funcs_valid) < DSM_FUNC_NUM_FUNCS); + + if (WARN_ON(func >= ARRAY_SIZE(fwrt->dsm_values) || !func)) + return -EINVAL; + + if (!(fwrt->dsm_funcs_valid & BIT(func))) { IWL_DEBUG_RADIO(fwrt, "ACPI DSM %d not indicated as valid\n", func); return -ENODATA; } - ret = iwl_acpi_get_dsm_integer(fwrt->dev, ACPI_DSM_REV, func, - &iwl_guid, &tmp, expected_size); - if (ret) - return ret; - - if ((expected_size == sizeof(u8) && tmp != (u8)tmp) || - (expected_size == sizeof(u32) && tmp != (u32)tmp)) - IWL_DEBUG_RADIO(fwrt, - "DSM value overflows the expected size, truncating\n"); - *value = (u32)tmp; + *value = fwrt->dsm_values[func]; return 0; } diff --git a/sys/contrib/dev/iwlwifi/fw/api/commands.h b/sys/contrib/dev/iwlwifi/fw/api/commands.h index 8d64a271bb94..36159a769916 100644 --- a/sys/contrib/dev/iwlwifi/fw/api/commands.h +++ b/sys/contrib/dev/iwlwifi/fw/api/commands.h @@ -296,6 +296,11 @@ enum iwl_legacy_cmds { */ SCAN_OFFLOAD_UPDATE_PROFILES_CMD = 0x6E, + /** + * @SCAN_START_NOTIFICATION_UMAC: uses &struct iwl_umac_scan_start + */ + SCAN_START_NOTIFICATION_UMAC = 0xb2, + /** * @MATCH_FOUND_NOTIFICATION: scan match found */ diff --git a/sys/contrib/dev/iwlwifi/fw/api/mac-cfg.h b/sys/contrib/dev/iwlwifi/fw/api/mac-cfg.h index f76cea6e9ec8..c7a833f8041a 100644 --- a/sys/contrib/dev/iwlwifi/fw/api/mac-cfg.h +++ b/sys/contrib/dev/iwlwifi/fw/api/mac-cfg.h @@ -65,6 +65,18 @@ enum iwl_mac_conf_subcmd_ids { * @TWT_OPERATION_CMD: &struct iwl_twt_operation_cmd */ TWT_OPERATION_CMD = 0x10, + /** + * @NAN_CFG_CMD: &struct iwl_nan_config_cmd + */ + NAN_CFG_CMD = 0x12, + /** + * @NAN_DW_END_NOTIF: &struct iwl_nan_dw_end_notif + */ + NAN_DW_END_NOTIF = 0xf4, + /** + * @NAN_JOINED_CLUSTER_NOTIF: &struct iwl_nan_cluster_notif + */ + NAN_JOINED_CLUSTER_NOTIF = 0xf5, /** * @MISSED_BEACONS_NOTIF: &struct iwl_missed_beacons_notif */ @@ -491,23 +503,37 @@ enum iwl_link_modify_bandwidth { IWL_LINK_MODIFY_BW_320, }; +/** + * enum iwl_npca_flags - NPCA flags + * @IWL_NPCA_FLAG_MAC_HDR_BASED: MAC header based NPCA operation + * permitted in the BSS (MOPLEN) + */ +enum iwl_npca_flags { + IWL_NPCA_FLAG_MAC_HDR_BASED = BIT(0), +}; /* NPCA_FLAG_E */ + /** * struct iwl_npca_params - NPCA parameters (non-primary channel access) * + * @dis_subch_bmap: disabled subchannel bitmap for NPCA * @switch_delay: after switch, delay TX according to destination AP * @switch_back_delay: switch back to control channel before OBSS frame end + * @initial_qsrc: Indicates the value that is used to initialize the + * EDCAF QSRC[AC] variables * @min_dur_threshold: minimum PPDU time to switch to the non-primary - * NPCA channel - * @flags: NPCA flags - bit 0: puncturing allowed, bit 1: new TX allowed + * NPCA channel (usec) + * @flags: NPCA flags, see &enum iwl_npca_flags * @reserved: reserved for alignment purposes */ struct iwl_npca_params { + __le16 dis_subch_bmap; u8 switch_delay; u8 switch_back_delay; - __le16 min_dur_threshold; - __le16 flags; - __le16 reserved; -} __packed; /* NPCA_PARAM_API_S_VER_1 */ + u8 initial_qsrc; + u8 min_dur_threshold; + u8 flags; + u8 reserved; +} __packed; /* NPCA_PARAM_API_S_VER_2 */ /** * struct iwl_link_config_cmd - command structure to configure the LINK context @@ -618,7 +644,8 @@ struct iwl_link_config_cmd { struct iwl_npca_params npca_params; /* since _VER_7 */ struct iwl_ac_qos prio_edca_params; /* since _VER_7 */ __le32 reserved3[4]; -} __packed; /* LINK_CONTEXT_CONFIG_CMD_API_S_VER_1, _VER_2, _VER_3, _VER_4, _VER_5, _VER_6, _VER_7 */ +} __packed; /* LINK_CONTEXT_CONFIG_CMD_API_S_VER_1, _VER_2, _VER_3, _VER_4, + * _VER_5, _VER_6, _VER_7, _VER_8 */ /* Currently FW supports link ids in the range 0-3 and can have * at most two active links for each vif. @@ -990,4 +1017,122 @@ struct iwl_twt_operation_cmd { u8 ul_tid_bitmap; } __packed; /* TWT_OPERATION_API_S_VER_1 */ +enum iwl_nan_band { + IWL_NAN_BAND_5GHZ = 0, + IWL_NAN_BAND_2GHZ = 1, + IWL_NUM_NAN_BANDS, +}; + +/** + * struct iwl_nan_band_config - NAN band configuration + * + * @rssi_close: RSSI threshold for close proximity in dBm + * @rssi_middle: RSSI threshold for middle proximity in dBm + * @dw_interval: Discovery Window (DW) interval for synchronization beacons and + * SDFs. Valid values of DW interval are: 1, 2, 3, 4 and 5 corresponding to + * 1, 2, 4, 8, and 16 DWs. + * @reserved: reserved + */ +struct iwl_nan_band_config { + u8 rssi_close; + u8 rssi_middle; + u8 dw_interval; + u8 reserved; +}; /* NAN_BAND_SPECIFIC_CONFIG_API_S_VER_1 */ + +/** + * enum iwl_nan_flags - flags for NAN configuration + * + * @IWL_NAN_FLAG_DW_END_NOTIF_ENABLED: indicates that the host wants to receive + * notifications when a DW ends. + */ +enum iwl_nan_flags { + IWL_NAN_FLAG_DW_END_NOTIF_ENABLED = BIT(0), +}; + +/** + * struct iwl_nan_config_cmd - NAN configuration command + * + * @action: action to perform, see &enum iwl_ctxt_action + * @nmi_addr: NAN Management Interface (NMI) address + * @reserved_for_nmi_addr: reserved + * @discovery_beacon_interval: discovery beacon interval in TUs + * @cluster_id: lower last two bytes of the cluster ID, in case the local + * device starts a cluster + * @sta_id: station ID of the NAN station + * @hb_channel: channel for 5 GHz if the device supports operation on 5 GHz. + * Valid values are 44 and 149, which correspond to the 5 GHz channel, and + * 0 which means that NAN operation on the 5 GHz band is disabled. + * @master_pref: master preference + * @dwell_time: dwell time on the discovery channel during scan (milliseconds). + * If set to 0, the dwell time is determined by the firmware. + * @scan_period: scan period in seconds. If set to 0, the scan period is + * determined by the firmware. + * @flags: flags for NAN configuration, see &enum iwl_nan_flags + * @band_config: band configuration for NAN, one for each band + * @nan_attr_len: length of the NAN attributes to be added to the beacon (bytes) + * @nan_vendor_elems_len: length of the NAN vendor elements to be added to the + * beacon (bytes) + * @beacon_data: variable length data that contains the NAN attributes + * (&nan_attr_len) followed by the NAN vendor elements + * (&nan_vendor_elems_len). + */ +struct iwl_nan_config_cmd { + __le32 action; + u8 nmi_addr[6]; + __le16 reserved_for_nmi_addr; + __le32 discovery_beacon_interval; + + u8 cluster_id[2]; + u8 sta_id; + u8 hb_channel; + + u8 master_pref; + u8 dwell_time; + u8 scan_period; + u8 flags; + + struct iwl_nan_band_config band_config[IWL_NUM_NAN_BANDS]; + + __le32 nan_attr_len; + __le32 nan_vendor_elems_len; + u8 beacon_data[]; +} __packed; /* NAN_CONFIG_CMD_API_S_VER_1 */ + +/** + * enum iwl_nan_cluster_notif_flags - flags for the cluster notification + * + * @IWL_NAN_CLUSTER_NOTIF_FLAG_NEW_CLUSTER: indicates that the device has + * started a new cluster. If not set, the device has joined an existing + * cluster. + */ +enum iwl_nan_cluster_notif_flags { + IWL_NAN_CLUSTER_NOTIF_FLAG_NEW_CLUSTER = BIT(0), +}; /* NAN_JOINED_CLUSTER_FLAG_E_VER_1 */ + +/** + * struct iwl_nan_cluster_notif - event sent when the device starts or joins a + * NAN cluster. + * + * @cluster_id: the last two bytes of the cluster ID + * @flags: combination of &enum iwl_nan_cluster_notif_flags + * @reserved: reserved + */ +struct iwl_nan_cluster_notif { + u8 cluster_id[2]; + u8 flags; + u8 reserved; +}; /* NAN_JOINED_CLUSTER_NTF_API_S_VER_1 */ + +/** + * struct iwl_nan_dw_end_notif - sent to notify the host the end of a DW. + * + * @band: band on which the DW ended. See &enum iwl_nan_band. + * @reserved: reserved + */ +struct iwl_nan_dw_end_notif { + u8 band; + u8 reserved[3]; +} __packed; /* NAN_DW_END_NTF_API_S_VER_1 */ + #endif /* __iwl_fw_api_mac_cfg_h__ */ diff --git a/sys/contrib/dev/iwlwifi/fw/api/nvm-reg.h b/sys/contrib/dev/iwlwifi/fw/api/nvm-reg.h index 4644fc1aa1ec..bd6bf931866f 100644 --- a/sys/contrib/dev/iwlwifi/fw/api/nvm-reg.h +++ b/sys/contrib/dev/iwlwifi/fw/api/nvm-reg.h @@ -503,18 +503,26 @@ enum bios_source { }; /** - * struct bios_value_u32 - BIOS configuration. + * struct iwl_bios_config_hdr - BIOS configuration header * @table_source: see &enum bios_source * @table_revision: table revision. * @reserved: reserved - * @value: value in bios. */ -struct bios_value_u32 { +struct iwl_bios_config_hdr { u8 table_source; u8 table_revision; u8 reserved[2]; +} __packed; /* BIOS_CONFIG_HDR_API_S_VER_1 */ + +/** + * struct bios_value_u32 - BIOS configuration. + * @hdr: bios config header + * @value: value in bios. + */ +struct bios_value_u32 { + struct iwl_bios_config_hdr hdr; __le32 value; -} __packed; /* BIOS_TABLE_SOURCE_U32_S_VER_1 */ +} __packed; /* BIOS_CONFIG_DATA_U32_API_S_VER_1 */ /** * struct iwl_tas_config_cmd - configures the TAS. @@ -650,6 +658,10 @@ struct iwl_lari_config_change_cmd_v8 { * bit0: enable 11be in China(CB/CN). * bit1: enable 11be in South Korea. * bit 2 - 31: reserved. + * @oem_11bn_allow_bitmap: Bitmap of 11bn allowed MCCs. The firmware expects to + * get the data from the BIOS. + * @oem_unii9_enable: UNII-9 enablement as read from the BIOS + * @bios_hdr: bios config header */ struct iwl_lari_config_change_cmd { __le32 config_bitmap; @@ -661,8 +673,16 @@ struct iwl_lari_config_change_cmd { __le32 edt_bitmap; __le32 oem_320mhz_allow_bitmap; __le32 oem_11be_allow_bitmap; + /* since version 13 */ + __le32 oem_11bn_allow_bitmap; + /* since version 13 */ + __le32 oem_unii9_enable; + /* since version 13 */ + struct iwl_bios_config_hdr bios_hdr; } __packed; -/* LARI_CHANGE_CONF_CMD_S_VER_12 */ +/* LARI_CHANGE_CONF_CMD_S_VER_12 + * LARI_CHANGE_CONF_CMD_S_VER_13 + */ /* Activate UNII-1 (5.2GHz) for World Wide */ #define ACTIVATE_5G2_IN_WW_MASK BIT(4) @@ -682,11 +702,11 @@ struct iwl_pnvm_init_complete_ntfy { /** * struct iwl_mcc_allowed_ap_type_cmd - struct for MCC_ALLOWED_AP_TYPE_CMD - * @offset_map: mapping a mcc to UHB AP type support (UATS) allowed + * @mcc_to_ap_type_map: mapping an MCC to 6 GHz AP type support (UATS) * @reserved: reserved */ struct iwl_mcc_allowed_ap_type_cmd { - u8 offset_map[UATS_TABLE_ROW_SIZE][UATS_TABLE_COL_SIZE]; + u8 mcc_to_ap_type_map[UATS_TABLE_ROW_SIZE][UATS_TABLE_COL_SIZE]; __le16 reserved; } __packed; /* MCC_ALLOWED_AP_TYPE_CMD_API_S_VER_1 */ diff --git a/sys/contrib/dev/iwlwifi/fw/api/power.h b/sys/contrib/dev/iwlwifi/fw/api/power.h index 535864e22626..0cd8a12e0f7c 100644 --- a/sys/contrib/dev/iwlwifi/fw/api/power.h +++ b/sys/contrib/dev/iwlwifi/fw/api/power.h @@ -766,7 +766,7 @@ enum iwl_6ghz_ap_type { * AP_TX_POWER_CONSTRAINTS_CMD * Used for VLP/LPI/AFC Access Point power constraints for 6GHz channels * @link_id: linkId - * @ap_type: see &enum iwl_ap_type + * @ap_type: see &enum iwl_6ghz_ap_type * @eirp_pwr: 8-bit 2s complement signed integer in the range * -64 dBm to 63 dBm with a 0.5 dB step * default &DEFAULT_TPE_TX_POWER (no maximum limit) diff --git a/sys/contrib/dev/iwlwifi/fw/api/rs.h b/sys/contrib/dev/iwlwifi/fw/api/rs.h index 9c464e7aba10..ae6be3ed32f8 100644 --- a/sys/contrib/dev/iwlwifi/fw/api/rs.h +++ b/sys/contrib/dev/iwlwifi/fw/api/rs.h @@ -73,6 +73,7 @@ enum iwl_tlc_mng_cfg_chains { * @IWL_TLC_MNG_MODE_VHT: enable VHT * @IWL_TLC_MNG_MODE_HE: enable HE * @IWL_TLC_MNG_MODE_EHT: enable EHT + * @IWL_TLC_MNG_MODE_UHR: enable UHR */ enum iwl_tlc_mng_cfg_mode { IWL_TLC_MNG_MODE_CCK = 0, @@ -82,6 +83,7 @@ enum iwl_tlc_mng_cfg_mode { IWL_TLC_MNG_MODE_VHT, IWL_TLC_MNG_MODE_HE, IWL_TLC_MNG_MODE_EHT, + IWL_TLC_MNG_MODE_UHR, }; /** @@ -205,7 +207,7 @@ struct iwl_tlc_config_cmd_v4 { } __packed; /* TLC_MNG_CONFIG_CMD_API_S_VER_4 */ /** - * struct iwl_tlc_config_cmd - TLC configuration + * struct iwl_tlc_config_cmd_v5 - TLC configuration * @sta_id: station id * @reserved1: reserved * @max_ch_width: max supported channel width from &enum iwl_tlc_mng_cfg_cw @@ -221,7 +223,7 @@ struct iwl_tlc_config_cmd_v4 { * @max_tx_op: max TXOP in uSecs for all AC (BK, BE, VO, VI), * set zero for no limit. */ -struct iwl_tlc_config_cmd { +struct iwl_tlc_config_cmd_v5 { u8 sta_id; u8 reserved1[3]; u8 max_ch_width; @@ -235,6 +237,38 @@ struct iwl_tlc_config_cmd { __le16 max_tx_op; } __packed; /* TLC_MNG_CONFIG_CMD_API_S_VER_5 */ +/** + * struct iwl_tlc_config_cmd - TLC configuration + * @sta_mask: station mask (in NAN we can have multiple logical stations of + * the same peer (with the same TLC configuration)). + * @phy_id: the phy id to used for this TLC configuration + * @max_ch_width: max supported channel width from &enum iwl_tlc_mng_cfg_cw + * @mode: &enum iwl_tlc_mng_cfg_mode + * @chains: bitmask of &enum iwl_tlc_mng_cfg_chains + * @sgi_ch_width_supp: bitmap of SGI support per channel width + * use BIT(&enum iwl_tlc_mng_cfg_cw) + * @flags: bitmask of &enum iwl_tlc_mng_cfg_flags + * @non_ht_rates: bitmap of supported legacy rates + * @ht_rates: bitmap of &enum iwl_tlc_mng_ht_rates, per + * pair (0 - 80mhz width and below, 1 - 160mhz, 2 - 320mhz). + * @max_mpdu_len: max MPDU length, in bytes + * @max_tx_op: max TXOP in uSecs for all AC (BK, BE, VO, VI), + * set zero for no limit. + */ +struct iwl_tlc_config_cmd { + __le32 sta_mask; + __le32 phy_id; + u8 max_ch_width; + u8 mode; + u8 chains; + u8 sgi_ch_width_supp; + __le16 flags; + __le16 non_ht_rates; + __le32 ht_rates[IWL_TLC_NSS_MAX][IWL_TLC_MCS_PER_BW_NUM_V4]; + __le16 max_mpdu_len; + __le16 max_tx_op; +} __packed; /* TLC_MNG_CONFIG_CMD_API_S_VER_6 */ + /** * enum iwl_tlc_update_flags - updated fields * @IWL_TLC_NOTIF_FLAG_RATE: last initial rate update @@ -706,10 +740,11 @@ enum { #define RATE_MCS_HE_SU_4_LTF 3 #define RATE_MCS_HE_SU_4_LTF_08_GI 4 -/* Bit 24-23: HE type. (0) SU, (1) SU_EXT, (2) MU, (3) trigger based */ +/* Bit 24-23: HE type. (0) SU, (1) HE SU_EXT/UHR ELR, (2) MU, (3) trigger based */ #define RATE_MCS_HE_TYPE_POS 23 #define RATE_MCS_HE_TYPE_SU (0 << RATE_MCS_HE_TYPE_POS) #define RATE_MCS_HE_TYPE_EXT_SU (1 << RATE_MCS_HE_TYPE_POS) +#define RATE_MCS_HE_TYPE_UHR_ELR (1 << RATE_MCS_HE_TYPE_POS) #define RATE_MCS_HE_TYPE_MU (2 << RATE_MCS_HE_TYPE_POS) #define RATE_MCS_HE_TYPE_TRIG (3 << RATE_MCS_HE_TYPE_POS) #define RATE_MCS_HE_TYPE_MSK (3 << RATE_MCS_HE_TYPE_POS) diff --git a/sys/contrib/dev/iwlwifi/fw/api/rx.h b/sys/contrib/dev/iwlwifi/fw/api/rx.h index dbac7de00142..3ebf64bbc264 100644 --- a/sys/contrib/dev/iwlwifi/fw/api/rx.h +++ b/sys/contrib/dev/iwlwifi/fw/api/rx.h @@ -1077,13 +1077,37 @@ struct iwl_vht_sigs { #define OFDM_RX_FRAME_VHT_NUM_OF_DATA_SYM 0x000007ff #define OFDM_RX_FRAME_VHT_NUM_OF_DATA_SYM_VALID 0x80000000 __le32 a0; - __le32 a1, a2; +#define OFDM_RX_FRAME_VHT_BANDWIDTH 0x00000003 +#define OFDM_RX_FRAME_VHT_STBC 0x00000008 +#define OFDM_RX_FRAME_VHT_GRP_ID 0x000003f0 +#define OFDM_RX_FRAME_VHT_STS_USER0 0x00001c00 +#define OFDM_RX_FRAME_VHT_MU_STS_USER1 0x0000e000 +#define OFDM_RX_FRAME_VHT_MU_STS_USER2 0x00070000 +#define OFDM_RX_FRAME_VHT_MU_STS_USER3 0x00380000 +#define OFDM_RX_FRAME_VHT_PARTIAL_AID_OR_MU_STS 0x003fe000 +#define OFDM_RX_FRAME_VHT_MU_MIMO_USER_POSITION 0x03000000 +#define OFDM_RX_FRAME_VHT_NO_STREAMS 0x04000000 +#define OFDM_RX_FRAME_VHT_STS 0x38000000 + __le32 a1; +#define OFDM_RX_FRAME_VHT_SHORT_GI 0x00000001 +#define OFDM_RX_FRAME_VHT_SHORT_GI_AMBIG 0x00000002 +#define OFDM_RX_FRAME_VHT_CODING 0x00000004 +#define OFDM_RX_FRAME_VHT_CODING_EXTRA_SYM 0x00000008 +#define OFDM_RX_FRAME_VHT_MCS_OR_MU_CODING 0x000000f0 +#define OFDM_RX_FRAME_VHT_BF_OR_MU_RESERVED 0x00000100 +#define OFDM_RX_FRAME_VHT_CRC 0x0003fc00 +#define OFDM_RX_FRAME_VHT_CRC_OK_BIT 0x00040000 +#define OFDM_RX_FRAME_VHT_CUR_USER_CODING 0x00080000 +#define OFDM_RX_FRAME_VHT_CUR_USER_STS 0x00700000 + __le32 a2; }; struct iwl_he_sigs { #define OFDM_RX_FRAME_HE_BEAM_CHANGE 0x00000001 #define OFDM_RX_FRAME_HE_UL_FLAG 0x00000002 +/* SU/ER-SU: MCS, MU: SIG-B MCS */ #define OFDM_RX_FRAME_HE_MCS 0x0000003c +/* SU/ER-SU: DCM, MU: SIG-B DCM */ #define OFDM_RX_FRAME_HE_DCM 0x00000040 #define OFDM_RX_FRAME_HE_BSS_COLOR 0x00001f80 #define OFDM_RX_FRAME_HE_SPATIAL_REUSE 0x0001e000 @@ -1262,19 +1286,82 @@ struct iwl_eht_tb_sigs { }; struct iwl_uhr_sigs { - __le32 usig_a1, usig_a1_uhr, usig_a2_uhr, b1, b2; + /* same as EHT above */ + __le32 usig_a1; +#define OFDM_RX_FRAME_UHR_BSS_COLOR2 0x0000003f + __le32 usig_a1_uhr; +#define OFDM_RX_FRAME_UHR_PPDU_TYPE 0x00000003 +#define OFDM_RX_FRAME_UHR_COBF_CSR_DISABLE 0x00000004 +#define OFDM_RX_FRAME_UHR_PUNC_CHANNEL 0x000000f8 +#define OFDM_RX_FRAME_UHR_USIG2_VALIDATE_B8 0x00000100 +#define OFDM_RX_FRAME_UHR_SIG_MCS 0x00000600 +#define OFDM_RX_FRAME_UHR_SIG_SYM_NUM 0x0000f800 +#define OFDM_RX_FRAME_UHR_TRIG_SPATIAL_REUSE_1 0x000f0000 +#define OFDM_RX_FRAME_UHR_TRIG_SPATIAL_REUSE_2 0x00f00000 +#define OFDM_RX_FRAME_UHR_TRIG_USIG2_DISREGARD 0x1f000000 + __le32 usig_a2_uhr; +#define OFDM_RX_FRAME_UHR_SPATIAL_REUSE 0x0000000f +#define OFDM_RX_FRAME_UHR_GI_LTF_TYPE 0x00000030 +#define OFDM_RX_FRAME_UHR_NUM_OF_LTF_SYM 0x000001c0 +#define OFDM_RX_FRAME_UHR_CODING_EXTRA_SYM 0x00000200 +#define OFDM_RX_FRAME_UHR_PE_A_FACTOR 0x00000c00 +#define OFDM_RX_FRAME_UHR_PE_DISAMBIGUITY 0x00001000 +#define OFDM_RX_FRAME_UHR_IM_DISABLE 0x00002000 +#define OFDM_RX_FRAME_UHR_USIG_OVF_DISREGARD 0x0000c000 +#define OFDM_RX_FRAME_UHR_NUM_OF_USERS 0x00070000 +#define OFDM_RX_FRAME_UHR_NSTS 0x00f00000 +#define OFDM_RX_FRAME_UHR_BF 0x01000000 +#define OFDM_RX_FRAME_UHR_USIG_OVF_NDP_DISREGARD 0x06000000 +#define OFDM_RX_FRAME_UHR_COMM_CC1_CRC_OK 0x08000000 +#define OFDM_RX_FRAME_UHR_COMM_CC2_CRC_OK 0x10000000 +#define OFDM_RX_FRAME_UHR_NON_VALID_RU_ALLOC 0x20000000 + __le32 b1; +#define OFDM_RX_FRAME_UHR_MCS 0x000001f0 +#define OFDM_RX_FRAME_UHR_CODING 0x00000200 +#define OFDM_RX_FRAME_UHR_SPATIAL_CONFIG 0x00003c00 +#define OFDM_RX_FRAME_UHR_STA_RU 0x003fc000 +#define OFDM_RX_FRAME_UHR_STA_RU_PS160 0x00400000 +#define OFDM_RX_FRAME_UHR_UEQM 0x00800000 +#define OFDM_RX_FRAME_UHR_2XLDPC 0x01000000 +#define OFDM_RX_FRAME_UHR_UEQM_PATTERN 0x06000000 +#define OFDM_RX_FRAME_UHR_IS_MU_MIMO_USER_FIELD 0x08000000 +#define OFDM_RX_FRAME_UHR_USER_FIELD_CRC_OK 0x40000000 + __le32 b2; +#define OFDM_RX_UHR_NUM_OF_DATA_SYM 0x000007ff +#define OFDM_RX_UHR_PE_DURATION 0x00003800 __le32 sig2; + /* same as EHT above: OFDM_RX_FRAME_EHT_RU_ALLOC_* */ __le32 cmn[6]; +#define OFDM_RX_FRAME_UHR_USER_FIELD_ID 0x000007ff __le32 user_id; }; struct iwl_uhr_tb_sigs { - __le32 usig_a1, usig_a2_uhr, tb_rx0, tb_rx1; + /* same as UHR above */ + __le32 usig_a1, usig_a2_uhr; + /* same as HE above */ + __le32 tb_rx0, tb_rx1; }; struct iwl_uhr_elr_sigs { + /* same as UHR above */ __le32 usig_a1, usig_a2_uhr; - __le32 uhr_sig_elr1, uhr_sig_elr2; +#define OFDM_RX_VECTOR_UHR_ELR_VER_ID 0x00000007 +#define OFDM_RX_VECTOR_UHR_ELR_UPLINK_FLAG 0x00000008 +#define OFDM_RX_VECTOR_UHR_ELR_MCS 0x00000010 +#define OFDM_RX_VECTOR_UHR_ELR_CODING 0x00000020 +#define OFDM_RX_VECTOR_UHR_ELR_LENGTH_IN_SYM 0x00007fc0 +#define OFDM_RX_VECTOR_UHR_ELR_CODING_EXTRA_SYM 0x00008000 +#define OFDM_RX_VECTOR_UHR_ELR_SIG1_CRC_OK 0x00010000 +#define OFDM_RX_VECTOR_UHR_ELR_STA_ID 0x0ffe0000 +#define OFDM_RX_VECTOR_UHR_ELR_DISREGARD 0x70000000 + __le32 uhr_sig_elr1; +#define OFDM_RX_VECTOR_UHR_ELR_MARK_BSS_COLOR 0x0000003f +#define OFDM_RX_VECTOR_UHR_ELR_SIG_ID_INDX 0x00000e00 +#define OFDM_RX_VECTOR_UHR_ELR_STA_RU 0x000ff000 +#define OFDM_RX_VECTOR_UHR_ELR_STA_RU_PS160 0x00100000 +#define OFDM_RX_VECTOR_UHR_ELR_SIG2_CRC_OK 0x00200000 + __le32 uhr_sig_elr2; }; union iwl_sigs { diff --git a/sys/contrib/dev/iwlwifi/fw/api/scan.h b/sys/contrib/dev/iwlwifi/fw/api/scan.h index 60f0a4924ddf..46fcc32608e3 100644 --- a/sys/contrib/dev/iwlwifi/fw/api/scan.h +++ b/sys/contrib/dev/iwlwifi/fw/api/scan.h @@ -1156,6 +1156,16 @@ enum iwl_umac_scan_abort_status { IWL_UMAC_SCAN_ABORT_STATUS_NOT_FOUND, }; +/** + * struct iwl_umac_scan_start - scan start notification + * @uid: scan id, &enum iwl_umac_scan_uid_offsets + * @reserved: for future use + */ +struct iwl_umac_scan_start { + __le32 uid; + __le32 reserved; +} __packed; /* SCAN_START_UMAC_API_S_VER_1 */ + /** * struct iwl_umac_scan_complete - scan complete notification * @uid: scan id, &enum iwl_umac_scan_uid_offsets diff --git a/sys/contrib/dev/iwlwifi/fw/dbg.c b/sys/contrib/dev/iwlwifi/fw/dbg.c index 86ed11bfdff3..4d97c0626547 100644 --- a/sys/contrib/dev/iwlwifi/fw/dbg.c +++ b/sys/contrib/dev/iwlwifi/fw/dbg.c @@ -598,7 +598,7 @@ static struct scatterlist *alloc_sgtable(ssize_t size) nents -= n_fill; } - new = kcalloc(n_alloc, sizeof(*new), GFP_KERNEL); + new = kzalloc_objs(*new, n_alloc); if (!new) { if (result) _devcd_free_sgtable(result); @@ -2981,8 +2981,7 @@ int iwl_fw_dbg_error_collect(struct iwl_fw_runtime *fwrt, struct iwl_fw_dump_desc *iwl_dump_error_desc; int ret; - iwl_dump_error_desc = - kmalloc(sizeof(*iwl_dump_error_desc), GFP_KERNEL); + iwl_dump_error_desc = kmalloc_obj(*iwl_dump_error_desc); if (!iwl_dump_error_desc) return -ENOMEM; @@ -3034,7 +3033,7 @@ int iwl_fw_dbg_collect(struct iwl_fw_runtime *fwrt, delay = le32_to_cpu(trigger->stop_delay) * USEC_PER_MSEC; } - desc = kzalloc(struct_size(desc, trig_desc.data, len), GFP_ATOMIC); + desc = kzalloc_flex(*desc, trig_desc.data, len, GFP_ATOMIC); if (!desc) return -ENOMEM; diff --git a/sys/contrib/dev/iwlwifi/fw/debugfs.c b/sys/contrib/dev/iwlwifi/fw/debugfs.c index 3b0e8c43ba4a..ddee7c2deb36 100644 --- a/sys/contrib/dev/iwlwifi/fw/debugfs.c +++ b/sys/contrib/dev/iwlwifi/fw/debugfs.c @@ -7,6 +7,7 @@ #include "api/commands.h" #include "debugfs.h" #include "dbg.h" +#include #include #define FWRT_DEBUGFS_OPEN_WRAPPER(name, buflen, argtype) \ @@ -359,7 +360,7 @@ static void *iwl_dbgfs_fw_info_seq_start(struct seq_file *seq, loff_t *pos) if (*pos >= fw->ucode_capa.n_cmd_versions) return NULL; - state = kzalloc(sizeof(*state), GFP_KERNEL); + state = kzalloc_obj(*state); if (!state) return NULL; state->pos = *pos; diff --git a/sys/contrib/dev/iwlwifi/fw/file.h b/sys/contrib/dev/iwlwifi/fw/file.h index b9e0b69c6680..378788de1d74 100644 --- a/sys/contrib/dev/iwlwifi/fw/file.h +++ b/sys/contrib/dev/iwlwifi/fw/file.h @@ -447,6 +447,7 @@ typedef unsigned int __bitwise iwl_ucode_tlv_capa_t; * during assert handling even if the dump isn't split * @IWL_UCODE_TLV_CAPA_FW_ACCEPTS_RAW_DSM_TABLE: Firmware has capability of * handling raw DSM table data. + * @IWL_UCODE_TLV_CAPA_NAN_SYNC_SUPPORT: Supports NAN synchronization * * @NUM_IWL_UCODE_TLV_CAPA: number of bits used */ @@ -550,6 +551,7 @@ enum iwl_ucode_tlv_capa { IWL_UCODE_TLV_CAPA_RESET_DURING_ASSERT = (__force iwl_ucode_tlv_capa_t)(4 * 32 + 0), IWL_UCODE_TLV_CAPA_FW_ACCEPTS_RAW_DSM_TABLE = (__force iwl_ucode_tlv_capa_t)(4 * 32 + 1), + IWL_UCODE_TLV_CAPA_NAN_SYNC_SUPPORT = (__force iwl_ucode_tlv_capa_t)(4 * 32 + 2), NUM_IWL_UCODE_TLV_CAPA /* * This construction make both sparse (which cannot increment the previous diff --git a/sys/contrib/dev/iwlwifi/fw/pnvm.c b/sys/contrib/dev/iwlwifi/fw/pnvm.c index f297e82d63d2..afff8d51ca95 100644 --- a/sys/contrib/dev/iwlwifi/fw/pnvm.c +++ b/sys/contrib/dev/iwlwifi/fw/pnvm.c @@ -379,7 +379,7 @@ iwl_pnvm_load_pnvm_to_trans(struct iwl_trans *trans, return; } - pnvm_data = kzalloc(sizeof(*pnvm_data), GFP_KERNEL); + pnvm_data = kzalloc_obj(*pnvm_data); if (!pnvm_data) goto free; @@ -425,7 +425,7 @@ iwl_pnvm_load_reduce_power_to_trans(struct iwl_trans *trans, return; } - pnvm_data = kzalloc(sizeof(*pnvm_data), GFP_KERNEL); + pnvm_data = kzalloc_obj(*pnvm_data); if (!pnvm_data) goto free; diff --git a/sys/contrib/dev/iwlwifi/fw/regulatory.c b/sys/contrib/dev/iwlwifi/fw/regulatory.c index 476b930a5bcd..b40cfada866c 100644 --- a/sys/contrib/dev/iwlwifi/fw/regulatory.c +++ b/sys/contrib/dev/iwlwifi/fw/regulatory.c @@ -379,8 +379,10 @@ int iwl_fill_ppag_table(struct iwl_fw_runtime *fwrt, num_sub_bands = IWL_NUM_SUB_BANDS_V2; gain = cmd->v7.gain[0]; *cmd_size = sizeof(cmd->v7); - cmd->v7.ppag_config_info.table_source = fwrt->ppag_bios_source; - cmd->v7.ppag_config_info.table_revision = fwrt->ppag_bios_rev; + cmd->v7.ppag_config_info.hdr.table_source = + fwrt->ppag_bios_source; + cmd->v7.ppag_config_info.hdr.table_revision = + fwrt->ppag_bios_rev; cmd->v7.ppag_config_info.value = cpu_to_le32(fwrt->ppag_flags); } else { IWL_DEBUG_RADIO(fwrt, "Unsupported PPAG command version\n"); @@ -491,206 +493,6 @@ bool iwl_add_mcc_to_tas_block_list(u16 *list, u8 *size, u16 mcc) } IWL_EXPORT_SYMBOL(iwl_add_mcc_to_tas_block_list); -__le32 iwl_get_lari_config_bitmap(struct iwl_fw_runtime *fwrt) -{ - int ret; - u32 val; *** 4505 LINES SKIPPED *** From nobody Wed Apr 22 21:09:07 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfr1cFCz6bLFK for ; Wed, 22 Apr 2026 21:09:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bfq4LDFz3lwl for ; Wed, 22 Apr 2026 21:09:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892147; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VeznvpWN+Wyu3o1/UdhepbfHbPYPccoX/ZGoGykiG/4=; b=P4KnsYeqVEtQUNtAtcjpP/eetdZfFAVMfxw/ko6rga7cX+63E8gXOz/rS1FwSbW19PrWJZ x28XY2rGq9B2bIiRjfsKfevla/APn+1UCDsc7RGFWmtbsyNLeS5WfeeaRt3N3s17b+ro4L vzLl02bimM1XlFBcVsLYbonTcGSvO217oSVRNY3paSX4BfcTnQ8mC4ItKDKlBxLDJG8WFq DaKYfXXmJTcITY5t9l1sHNCwBR7KEKyEh3XdWCk4XvwGSdMVuHhzjt1AbgRL82sfsukBFC Bfc4EeLDo7ZHzqb2B4bplAFd2QxZfW6Yr7Gj3+hNib+SSbpeO7VziGDqlaLvaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892147; a=rsa-sha256; cv=none; b=viToFzqDxSBdhWTI/2Jv5UV7Ba1jNn5OKOQL4Zp8BlMuTECXESwc0i+zJNOIUu7LDF7uUO nukRKsAtPLsQc4gNNWK+illQerFvnZUylAbf1vZ0GZCEmA5aFx9G7ALK4g1foRhT+IpJuv 0FbaohOKnmv3CLFAjhufZ+zRWlYIt+W0htNCWkX+lpZLG3tMKT94I+Olh4b7ql9yxRYl8I EiolfRvejA+65KwACGBTezDwy8UQtefoBMd1N9p2MMgyxDhn+5flsCZbiJe+ocSnnjL7Zw bwrVZQByHZrKEqLAI+lAqST98HI+yRd9QTahmDfOdnEeXlO2sl9fvAygVhA13Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892147; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VeznvpWN+Wyu3o1/UdhepbfHbPYPccoX/ZGoGykiG/4=; b=P/PjfueK6FV7oQa9td7yvcfsJtAm2CJkouggsjQBOdjJLwveadn2Q8N031jH4eKddccp7W LCf6pta7TPIy/o0a7Xd9fUqtEZZXhf2HlrR96FAlXrRgdNf40MoZ370Tv2aqZiuBmFVjj7 HDmZuxBm8wu+bvhAvo3dhxAMDNT5pgRwLM/cd+MIMP9tg3pZI1NWaiLBMOJxvcZrdrII/U 7QWSYqms+Z9sasaBDMF2L6fl1JN5O8ALmx1zkxfaelRjLmZKSLBd9oPlZuMASQdUzYcYfc N1IychIvsbfo4MQAx7mi+fpegs2Tg2cVXTbhczSUYtYFoHS5Cixa4oymJMqrFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfq3rQLznX4 for ; Wed, 22 Apr 2026 21:09:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27cb3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:09:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: f08c02995e65 - stable/15 - iwlwifi: update module Makefile for v7.0 driver 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f08c02995e658076f23b221ddfacba9956428183 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:09:07 +0000 Message-Id: <69e938f3.27cb3.549ecb49@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f08c02995e658076f23b221ddfacba9956428183 commit f08c02995e658076f23b221ddfacba9956428183 Author: Bjoern A. Zeeb AuthorDate: 2026-04-18 20:37:11 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:12 +0000 iwlwifi: update module Makefile for v7.0 driver version Add the new file for nan in the mld subdriver. Update LINUXKPI_VERSION to reflect that the driver is based on Linux v7.0. Sponsored by: The FreeBSD Foundation (cherry picked from commit 9ed3331fb5822b93313edae42cc529eb25e1a6cc) --- sys/modules/iwlwifi/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/modules/iwlwifi/Makefile b/sys/modules/iwlwifi/Makefile index 399e35b79d61..471509c2bb1c 100644 --- a/sys/modules/iwlwifi/Makefile +++ b/sys/modules/iwlwifi/Makefile @@ -44,7 +44,7 @@ SRCS+= mld/agg.c mld/ap.c mld/coex.c SRCS+= mld/ftm-initiator.c mld/fw.c mld/iface.c mld/key.c #SRCS+= mld/led.c SRCS+= mld/link.c mld/low_latency.c mld/mac80211.c mld/mcc.c mld/mld.c -SRCS+= mld/mlo.c mld/notif.c mld/phy.c mld/power.c mld/ptp.c +SRCS+= mld/mlo.c mld/nan.c mld/notif.c mld/phy.c mld/power.c mld/ptp.c SRCS+= mld/regulatory.c mld/roc.c mld/rx.c mld/scan.c SRCS+= mld/session-protect.c mld/sta.c mld/stats.c mld/thermal.c SRCS+= mld/time_sync.c mld/tlc.c mld/tx.c @@ -94,7 +94,7 @@ CFLAGS+= -DCONFIG_IWLWIFI_DEVICE_TRACING=1 #CFLAGS+= -DCONFIG_EFI=1 CFLAGS+= -DKBUILD_MODNAME='"iwlwifi"' -CFLAGS+= -DLINUXKPI_VERSION=61900 +CFLAGS+= -DLINUXKPI_VERSION=70000 CWARNFLAGS.clang.drv.c+= -Wno-initializer-overrides CWARNFLAGS.drv.c+= -Wno-override-init ${CWARNFLAGS.${COMPILER_TYPE}.${.IMPSRC:T}} From nobody Wed Apr 22 21:09:08 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfs1HD0z6bLFS for ; Wed, 22 Apr 2026 21:09:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bfr6HYHz3mF1 for ; Wed, 22 Apr 2026 21:09:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7cgEkIPYAWCyiAEp2LFAibBo+burGdWoKmfZTxTcZ60=; b=rkeGKwHteCr3b2lJrBY8SAzTVZVHxBfEYq+aNMQnPa4xrHQBeE4gD6cYNUhMsx6hLBianG qkhfytodzzUL9KBHwrZ78tYMUzQp+hNJKpKHIAdKqHjcf/PrvbAzbdAfbcuUSXf8T6Jocl ISBGnQArMGhkARkj+2MB7zIOnR+IlPDro3ySci0/842AvzHq+9egCX65TOo3ZR0NOmgdMD Sv7E4tOFVVM1C38rffhXAy9VuvEXgiP2/WT91YrHjnNYO2esdsL9n9ORGQyYC2hXYCk/OA NX763+0m08YZeE4S2ygYPzAHk0dh7BdooM74W72z2iYgBPy2FTgBUKtsykGRYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892148; a=rsa-sha256; cv=none; b=hvgMo3K7PZaEB7pX2uEOwNpONB1PAZUu4KsFs/S9Dja58NKlLYal5WxHKDEMJFd2updKsw WFks9U5A0n7wqKtQsqmB5iwjMqZxxh+crQzplRPtC2U56xt2ez9t+WEGd5DCfLAaJaqFc+ 4CZ6RByMGP5NAdVMDeKBlj4h5uNfxrFDatxZnIN/ouLlsiz0oLYfq2nLmlTPWHtvW0wimB MMWZeRXtk7ZKjczaTLY2GrGBvOZ8H33uCVzBYV6k1hxQk/qroHsUY6zB2bFiX69EnAUsie K9Ug4h6oWR2E+r2BfqJjjqWAjJHRwJEMKimu91rxQrFNWuG/qa3B1ZJkeUvJNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7cgEkIPYAWCyiAEp2LFAibBo+burGdWoKmfZTxTcZ60=; b=A0L2iboN+KABVkqXqpm5tbJ5x+9tmOH5JGZiAyzJkhaRYxK+2k/Vp8j6F8vJP9RqbGygl1 wZqgMzzOEpi7ORfejnq1/Ek/xce88J74+SrExDMKSyNVzTMUGg0hadqW3Sy97pFiNEgfHQ A7+wb/JUUl83UJyG2sKOI5uqMtRQKcgVs4mxflicxnwLy5IVwpYouF/hD9Vb3g/qdtMNYo VGIrzc45bjDgd4bycQ4X1qEQ6ehzCa5gw+rrMknHUs0YZFqlBgvs1Jv7wuuMdqoSVqwh2B GekVrttJDxScmDx7RuGpvKSwhG/UGpZgsVOhEpWFK4Cg8RN/cnpQZ+2jHFAxww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfr5ZR8zngF for ; Wed, 22 Apr 2026 21:09:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27cb7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:09:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 7ffebcdb702d - stable/15 - rtw89: update Realtek's rtw89 driver List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7ffebcdb702d212afab3ed6adb5ac0e69ef1269c Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:09:08 +0000 Message-Id: <69e938f4.27cb7.3b6f358e@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7ffebcdb702d212afab3ed6adb5ac0e69ef1269c commit 7ffebcdb702d212afab3ed6adb5ac0e69ef1269c Author: Bjoern A. Zeeb AuthorDate: 2026-04-18 20:48:44 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:12 +0000 rtw89: update Realtek's rtw89 driver This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ). Sponsored by: The FreeBSD Foundation (cherry picked from commit 422e9c5d878e14ec16bb89ef6df65d964d5ce2f1) --- sys/contrib/dev/rtw89/acpi.c | 2 +- sys/contrib/dev/rtw89/cam.c | 136 +++- sys/contrib/dev/rtw89/cam.h | 129 ++++ sys/contrib/dev/rtw89/chan.c | 69 +- sys/contrib/dev/rtw89/chan.h | 2 + sys/contrib/dev/rtw89/core.c | 241 +++++- sys/contrib/dev/rtw89/core.h | 198 ++++- sys/contrib/dev/rtw89/debug.c | 165 ++++- sys/contrib/dev/rtw89/debug.h | 1 + sys/contrib/dev/rtw89/efuse.c | 4 - sys/contrib/dev/rtw89/efuse.h | 6 + sys/contrib/dev/rtw89/efuse_be.c | 26 + sys/contrib/dev/rtw89/fw.c | 1227 ++++++++++++++++++++++++++++--- sys/contrib/dev/rtw89/fw.h | 521 +++++++++++-- sys/contrib/dev/rtw89/mac.c | 199 ++++- sys/contrib/dev/rtw89/mac.h | 102 ++- sys/contrib/dev/rtw89/mac80211.c | 46 +- sys/contrib/dev/rtw89/mac_be.c | 696 ++++++++++++++++-- sys/contrib/dev/rtw89/pci.c | 22 +- sys/contrib/dev/rtw89/pci.h | 57 +- sys/contrib/dev/rtw89/pci_be.c | 138 +++- sys/contrib/dev/rtw89/phy.c | 430 +++++++++-- sys/contrib/dev/rtw89/phy.h | 36 +- sys/contrib/dev/rtw89/phy_be.c | 563 +++++++++++++- sys/contrib/dev/rtw89/ps.c | 4 +- sys/contrib/dev/rtw89/reg.h | 934 ++++++++++++++++++++++- sys/contrib/dev/rtw89/regd.c | 21 +- sys/contrib/dev/rtw89/rtw8851b.c | 10 +- sys/contrib/dev/rtw89/rtw8852a.c | 10 +- sys/contrib/dev/rtw89/rtw8852au.c | 4 + sys/contrib/dev/rtw89/rtw8852b.c | 32 +- sys/contrib/dev/rtw89/rtw8852b_common.c | 2 - sys/contrib/dev/rtw89/rtw8852bt.c | 8 + sys/contrib/dev/rtw89/rtw8852bu.c | 2 + sys/contrib/dev/rtw89/rtw8852c.c | 10 +- sys/contrib/dev/rtw89/rtw8852cu.c | 2 + sys/contrib/dev/rtw89/rtw8922a.c | 89 ++- sys/contrib/dev/rtw89/rtw8922a_rfk.c | 48 +- sys/contrib/dev/rtw89/sar.c | 2 +- sys/contrib/dev/rtw89/ser.c | 12 +- sys/contrib/dev/rtw89/txrx.h | 22 + sys/contrib/dev/rtw89/usb.c | 7 +- sys/contrib/dev/rtw89/wow.c | 16 +- sys/contrib/dev/rtw89/wow.h | 1 + 44 files changed, 5696 insertions(+), 556 deletions(-) diff --git a/sys/contrib/dev/rtw89/acpi.c b/sys/contrib/dev/rtw89/acpi.c index fdba1ea46ec6..86e5cf1825ba 100644 --- a/sys/contrib/dev/rtw89/acpi.c +++ b/sys/contrib/dev/rtw89/acpi.c @@ -119,7 +119,7 @@ rtw89_acpi_evaluate_method(struct rtw89_dev *rtwdev, const char *method) goto out; } - data = kzalloc(struct_size(data, buf, len), GFP_KERNEL); + data = kzalloc_flex(*data, buf, len); if (!data) goto out; diff --git a/sys/contrib/dev/rtw89/cam.c b/sys/contrib/dev/rtw89/cam.c index 9370cbda945c..7c62ece137d0 100644 --- a/sys/contrib/dev/rtw89/cam.c +++ b/sys/contrib/dev/rtw89/cam.c @@ -420,7 +420,7 @@ static int rtw89_cam_sec_key_install(struct rtw89_dev *rtwdev, return ret; } - sec_cam = kzalloc(sizeof(*sec_cam), GFP_KERNEL); + sec_cam = kzalloc_obj(*sec_cam); if (!sec_cam) { ret = -ENOMEM; goto err_release_cam; @@ -1140,3 +1140,137 @@ void rtw89_cam_fill_dctl_sec_cam_info_v2(struct rtw89_dev *rtwdev, le32_encode_bits(mld_bssid[5], DCTLINFO_V2_W12_MLD_BSSID_5); h2c->m12 = cpu_to_le32(DCTLINFO_V2_W12_ALL); } + +void rtw89_cam_fill_dctl_sec_cam_info_v3(struct rtw89_dev *rtwdev, + struct rtw89_vif_link *rtwvif_link, + struct rtw89_sta_link *rtwsta_link, + struct rtw89_h2c_dctlinfo_ud_v3 *h2c) +{ + struct ieee80211_sta *sta = rtwsta_link_to_sta_safe(rtwsta_link); + struct ieee80211_vif *vif = rtwvif_to_vif(rtwvif_link->rtwvif); + struct rtw89_vif *rtwvif = rtwvif_link->rtwvif; + struct rtw89_addr_cam_entry *addr_cam = + rtw89_get_addr_cam_of(rtwvif_link, rtwsta_link); + bool is_mld = sta ? sta->mlo : ieee80211_vif_is_mld(vif); + struct rtw89_wow_param *rtw_wow = &rtwdev->wow; + u8 *ptk_tx_iv = rtw_wow->key_info.ptk_tx_iv; + u8 *mld_sma, *mld_tma, *mld_bssid; + + h2c->c0 = le32_encode_bits(rtwsta_link ? rtwsta_link->mac_id : + rtwvif_link->mac_id, + DCTLINFO_V3_C0_MACID) | + le32_encode_bits(1, DCTLINFO_V3_C0_OP); + + h2c->w2 = le32_encode_bits(is_mld, DCTLINFO_V3_W2_IS_MLD); + h2c->m2 = cpu_to_le32(DCTLINFO_V3_W2_IS_MLD); + + h2c->w4 = le32_encode_bits(addr_cam->sec_ent_keyid[0], + DCTLINFO_V3_W4_SEC_ENT0_KEYID) | + le32_encode_bits(addr_cam->sec_ent_keyid[1], + DCTLINFO_V3_W4_SEC_ENT1_KEYID) | + le32_encode_bits(addr_cam->sec_ent_keyid[2], + DCTLINFO_V3_W4_SEC_ENT2_KEYID) | + le32_encode_bits(addr_cam->sec_ent_keyid[3], + DCTLINFO_V3_W4_SEC_ENT3_KEYID) | + le32_encode_bits(addr_cam->sec_ent_keyid[4], + DCTLINFO_V3_W4_SEC_ENT4_KEYID) | + le32_encode_bits(addr_cam->sec_ent_keyid[5], + DCTLINFO_V3_W4_SEC_ENT5_KEYID) | + le32_encode_bits(addr_cam->sec_ent_keyid[6], + DCTLINFO_V3_W4_SEC_ENT6_KEYID); + h2c->m4 = cpu_to_le32(DCTLINFO_V3_W4_SEC_ENT0_KEYID | + DCTLINFO_V3_W4_SEC_ENT1_KEYID | + DCTLINFO_V3_W4_SEC_ENT2_KEYID | + DCTLINFO_V3_W4_SEC_ENT3_KEYID | + DCTLINFO_V3_W4_SEC_ENT4_KEYID | + DCTLINFO_V3_W4_SEC_ENT5_KEYID | + DCTLINFO_V3_W4_SEC_ENT6_KEYID); + + h2c->w5 = le32_encode_bits(addr_cam->sec_cam_map[0], + DCTLINFO_V3_W5_SEC_ENT_VALID_V1); + h2c->m5 = cpu_to_le32(DCTLINFO_V3_W5_SEC_ENT_VALID_V1); + + h2c->w6 = le32_encode_bits(addr_cam->sec_ent[0], + DCTLINFO_V3_W6_SEC_ENT0_V2) | + le32_encode_bits(addr_cam->sec_ent[1], + DCTLINFO_V3_W6_SEC_ENT1_V2) | + le32_encode_bits(addr_cam->sec_ent[2], + DCTLINFO_V3_W6_SEC_ENT2_V2); + h2c->m6 = cpu_to_le32(DCTLINFO_V3_W6_SEC_ENT0_V2 | + DCTLINFO_V3_W6_SEC_ENT1_V2 | + DCTLINFO_V3_W6_SEC_ENT2_V2); + + h2c->w7 = le32_encode_bits(addr_cam->sec_ent[3], + DCTLINFO_V3_W7_SEC_ENT3_V2) | + le32_encode_bits(addr_cam->sec_ent[4], + DCTLINFO_V3_W7_SEC_ENT4_V2) | + le32_encode_bits(addr_cam->sec_ent[5], + DCTLINFO_V3_W7_SEC_ENT5_V2); + h2c->m7 = cpu_to_le32(DCTLINFO_V3_W7_SEC_ENT3_V2 | + DCTLINFO_V3_W7_SEC_ENT4_V2 | + DCTLINFO_V3_W7_SEC_ENT5_V2); + + h2c->w8 = le32_encode_bits(addr_cam->sec_ent[6], + DCTLINFO_V3_W8_SEC_ENT6_V2); + h2c->m8 = cpu_to_le32(DCTLINFO_V3_W8_SEC_ENT6_V2); + + if (rtw_wow->ptk_alg) { + h2c->w0 = le32_encode_bits(ptk_tx_iv[0] | ptk_tx_iv[1] << 8, + DCTLINFO_V3_W0_AES_IV_L); + h2c->m0 = cpu_to_le32(DCTLINFO_V3_W0_AES_IV_L); + + h2c->w1 = le32_encode_bits(ptk_tx_iv[4] | + ptk_tx_iv[5] << 8 | + ptk_tx_iv[6] << 16 | + ptk_tx_iv[7] << 24, + DCTLINFO_V3_W1_AES_IV_H); + h2c->m1 = cpu_to_le32(DCTLINFO_V3_W1_AES_IV_H); + + h2c->w4 |= le32_encode_bits(rtw_wow->ptk_keyidx, + DCTLINFO_V3_W4_SEC_KEY_ID); + h2c->m4 |= cpu_to_le32(DCTLINFO_V3_W4_SEC_KEY_ID); + } + + if (!is_mld) + return; + + if (rtwvif_link->net_type == RTW89_NET_TYPE_INFRA) { + mld_sma = rtwvif->mac_addr; + mld_tma = vif->cfg.ap_addr; + mld_bssid = vif->cfg.ap_addr; + } else if (rtwvif_link->net_type == RTW89_NET_TYPE_AP_MODE && sta) { + mld_sma = rtwvif->mac_addr; + mld_tma = sta->addr; + mld_bssid = rtwvif->mac_addr; + } else { + return; + } + + h2c->w9 = le32_encode_bits(mld_sma[0], DCTLINFO_V3_W9_MLD_SMA_0_V2) | + le32_encode_bits(mld_sma[1], DCTLINFO_V3_W9_MLD_SMA_1_V2) | + le32_encode_bits(mld_sma[2], DCTLINFO_V3_W9_MLD_SMA_2_V2) | + le32_encode_bits(mld_sma[3], DCTLINFO_V3_W9_MLD_SMA_3_V2); + h2c->m9 = cpu_to_le32(DCTLINFO_V3_W9_ALL); + + h2c->w10 = le32_encode_bits(mld_sma[4], DCTLINFO_V3_W10_MLD_SMA_4_V2) | + le32_encode_bits(mld_sma[5], DCTLINFO_V3_W10_MLD_SMA_5_V2) | + le32_encode_bits(mld_tma[0], DCTLINFO_V3_W10_MLD_TMA_0_V2) | + le32_encode_bits(mld_tma[1], DCTLINFO_V3_W10_MLD_TMA_1_V2); + h2c->m10 = cpu_to_le32(DCTLINFO_V3_W10_ALL); + + h2c->w11 = le32_encode_bits(mld_tma[2], DCTLINFO_V3_W11_MLD_TMA_2_V2) | + le32_encode_bits(mld_tma[3], DCTLINFO_V3_W11_MLD_TMA_3_V2) | + le32_encode_bits(mld_tma[4], DCTLINFO_V3_W11_MLD_TMA_4_V2) | + le32_encode_bits(mld_tma[5], DCTLINFO_V3_W11_MLD_TMA_5_V2); + h2c->m11 = cpu_to_le32(DCTLINFO_V3_W11_ALL); + + h2c->w12 = le32_encode_bits(mld_bssid[0], DCTLINFO_V3_W12_MLD_TA_BSSID_0_V2) | + le32_encode_bits(mld_bssid[1], DCTLINFO_V3_W12_MLD_TA_BSSID_1_V2) | + le32_encode_bits(mld_bssid[2], DCTLINFO_V3_W12_MLD_TA_BSSID_2_V2) | + le32_encode_bits(mld_bssid[3], DCTLINFO_V3_W12_MLD_TA_BSSID_3_V2); + h2c->m12 = cpu_to_le32(DCTLINFO_V3_W12_ALL); + + h2c->w13 = le32_encode_bits(mld_bssid[4], DCTLINFO_V3_W13_MLD_TA_BSSID_4_V2) | + le32_encode_bits(mld_bssid[5], DCTLINFO_V3_W13_MLD_TA_BSSID_5_V2); + h2c->m13 = cpu_to_le32(DCTLINFO_V3_W13_ALL); +} diff --git a/sys/contrib/dev/rtw89/cam.h b/sys/contrib/dev/rtw89/cam.h index c46b6f91bbdb..22868f262243 100644 --- a/sys/contrib/dev/rtw89/cam.h +++ b/sys/contrib/dev/rtw89/cam.h @@ -302,6 +302,131 @@ struct rtw89_h2c_dctlinfo_ud_v2 { #define DCTLINFO_V2_W12_MLD_BSSID_5 GENMASK(15, 8) #define DCTLINFO_V2_W12_ALL GENMASK(15, 0) +struct rtw89_h2c_dctlinfo_ud_v3 { + __le32 c0; + __le32 w0; + __le32 w1; + __le32 w2; + __le32 w3; + __le32 w4; + __le32 w5; + __le32 w6; + __le32 w7; + __le32 w8; + __le32 w9; + __le32 w10; + __le32 w11; + __le32 w12; + __le32 w13; + __le32 w14; + __le32 w15; + __le32 m0; + __le32 m1; + __le32 m2; + __le32 m3; + __le32 m4; + __le32 m5; + __le32 m6; + __le32 m7; + __le32 m8; + __le32 m9; + __le32 m10; + __le32 m11; + __le32 m12; + __le32 m13; + __le32 m14; + __le32 m15; +} __packed; + +#define DCTLINFO_V3_C0_MACID GENMASK(15, 0) +#define DCTLINFO_V3_C0_OP BIT(16) + +#define DCTLINFO_V3_W0_QOS_FIELD_H GENMASK(7, 0) +#define DCTLINFO_V3_W0_HW_EXSEQ_MACID GENMASK(14, 8) +#define DCTLINFO_V3_W0_QOS_DATA BIT(15) +#define DCTLINFO_V3_W0_AES_IV_L GENMASK(31, 16) +#define DCTLINFO_V3_W0_ALL GENMASK(31, 0) +#define DCTLINFO_V3_W1_AES_IV_H GENMASK(31, 0) +#define DCTLINFO_V3_W1_ALL GENMASK(31, 0) +#define DCTLINFO_V3_W2_SEQ0 GENMASK(11, 0) +#define DCTLINFO_V3_W2_SEQ1 GENMASK(23, 12) +#define DCTLINFO_V3_W2_AMSDU_MAX_LEN GENMASK(26, 24) +#define DCTLINFO_V3_W2_STA_AMSDU_EN BIT(27) +#define DCTLINFO_V3_W2_CHKSUM_OFLD_EN BIT(28) +#define DCTLINFO_V3_W2_WITH_LLC BIT(29) +#define DCTLINFO_V3_W2_NAT25_EN BIT(30) +#define DCTLINFO_V3_W2_IS_MLD BIT(31) +#define DCTLINFO_V3_W2_ALL GENMASK(31, 0) +#define DCTLINFO_V3_W3_SEQ2 GENMASK(11, 0) +#define DCTLINFO_V3_W3_SEQ3 GENMASK(23, 12) +#define DCTLINFO_V3_W3_TGT_IND GENMASK(27, 24) +#define DCTLINFO_V3_W3_TGT_IND_EN BIT(28) +#define DCTLINFO_V3_W3_HTC_LB GENMASK(31, 29) +#define DCTLINFO_V3_W3_ALL GENMASK(31, 0) +#define DCTLINFO_V3_W4_VLAN_TAG_SEL GENMASK(7, 5) +#define DCTLINFO_V3_W4_HTC_ORDER BIT(8) +#define DCTLINFO_V3_W4_SEC_KEY_ID GENMASK(10, 9) +#define DCTLINFO_V3_W4_VLAN_RX_DYNAMIC_PCP_EN BIT(11) +#define DCTLINFO_V3_W4_VLAN_RX_PKT_DROP BIT(12) +#define DCTLINFO_V3_W4_VLAN_RX_VALID BIT(13) +#define DCTLINFO_V3_W4_VLAN_TX_VALID BIT(14) +#define DCTLINFO_V3_W4_WAPI BIT(15) +#define DCTLINFO_V3_W4_SEC_ENT_MODE GENMASK(17, 16) +#define DCTLINFO_V3_W4_SEC_ENT0_KEYID GENMASK(19, 18) +#define DCTLINFO_V3_W4_SEC_ENT1_KEYID GENMASK(21, 20) +#define DCTLINFO_V3_W4_SEC_ENT2_KEYID GENMASK(23, 22) +#define DCTLINFO_V3_W4_SEC_ENT3_KEYID GENMASK(25, 24) +#define DCTLINFO_V3_W4_SEC_ENT4_KEYID GENMASK(27, 26) +#define DCTLINFO_V3_W4_SEC_ENT5_KEYID GENMASK(29, 28) +#define DCTLINFO_V3_W4_SEC_ENT6_KEYID GENMASK(31, 30) +#define DCTLINFO_V3_W4_ALL GENMASK(31, 5) +#define DCTLINFO_V3_W5_SEC_ENT7_KEYID GENMASK(1, 0) +#define DCTLINFO_V3_W5_SEC_ENT8_KEYID GENMASK(3, 2) +#define DCTLINFO_V3_W5_SEC_ENT_VALID_V1 GENMASK(23, 8) +#define DCTLINFO_V3_W5_ALL (GENMASK(23, 8) | GENMASK(3, 0)) +#define DCTLINFO_V3_W6_SEC_ENT0_V2 GENMASK(8, 0) +#define DCTLINFO_V3_W6_SEC_ENT1_V2 GENMASK(18, 10) +#define DCTLINFO_V3_W6_SEC_ENT2_V2 GENMASK(28, 20) +#define DCTLINFO_V3_W6_ALL GENMASK(28, 0) +#define DCTLINFO_V3_W7_SEC_ENT3_V2 GENMASK(8, 0) +#define DCTLINFO_V3_W7_SEC_ENT4_V2 GENMASK(18, 10) +#define DCTLINFO_V3_W7_SEC_ENT5_V2 GENMASK(28, 20) +#define DCTLINFO_V3_W7_ALL GENMASK(28, 0) +#define DCTLINFO_V3_W8_SEC_ENT6_V2 GENMASK(8, 0) +#define DCTLINFO_V3_W8_SEC_ENT7_V1 GENMASK(18, 10) +#define DCTLINFO_V3_W8_SEC_ENT8_V1 GENMASK(28, 20) +#define DCTLINFO_V3_W8_ALL GENMASK(28, 0) +#define DCTLINFO_V3_W9_MLD_SMA_0_V2 GENMASK(7, 0) +#define DCTLINFO_V3_W9_MLD_SMA_1_V2 GENMASK(15, 8) +#define DCTLINFO_V3_W9_MLD_SMA_2_V2 GENMASK(23, 16) +#define DCTLINFO_V3_W9_MLD_SMA_3_V2 GENMASK(31, 24) +#define DCTLINFO_V3_W9_MLD_SMA_L_V2 GENMASK(31, 0) +#define DCTLINFO_V3_W9_ALL GENMASK(31, 0) +#define DCTLINFO_V3_W10_MLD_SMA_4_V2 GENMASK(7, 0) +#define DCTLINFO_V3_W10_MLD_SMA_5_V2 GENMASK(15, 8) +#define DCTLINFO_V3_W10_MLD_SMA_H_V2 GENMASK(15, 0) +#define DCTLINFO_V3_W10_MLD_TMA_0_V2 GENMASK(23, 16) +#define DCTLINFO_V3_W10_MLD_TMA_1_V2 GENMASK(31, 24) +#define DCTLINFO_V3_W10_MLD_TMA_L_V2 GENMASK(31, 16) +#define DCTLINFO_V3_W10_ALL GENMASK(31, 0) +#define DCTLINFO_V3_W11_MLD_TMA_2_V2 GENMASK(7, 0) +#define DCTLINFO_V3_W11_MLD_TMA_3_V2 GENMASK(15, 8) +#define DCTLINFO_V3_W11_MLD_TMA_4_V2 GENMASK(23, 16) +#define DCTLINFO_V3_W11_MLD_TMA_5_V2 GENMASK(31, 24) +#define DCTLINFO_V3_W11_MLD_TMA_H_V2 GENMASK(31, 0) +#define DCTLINFO_V3_W11_ALL GENMASK(31, 0) +#define DCTLINFO_V3_W12_MLD_TA_BSSID_0_V2 GENMASK(7, 0) +#define DCTLINFO_V3_W12_MLD_TA_BSSID_1_V2 GENMASK(15, 8) +#define DCTLINFO_V3_W12_MLD_TA_BSSID_2_V2 GENMASK(23, 16) +#define DCTLINFO_V3_W12_MLD_TA_BSSID_3_V2 GENMASK(31, 24) +#define DCTLINFO_V3_W12_MLD_TA_BSSID_L_V2 GENMASK(31, 0) +#define DCTLINFO_V3_W12_ALL GENMASK(31, 0) +#define DCTLINFO_V3_W13_MLD_TA_BSSID_4_V2 GENMASK(7, 0) +#define DCTLINFO_V3_W13_MLD_TA_BSSID_5_V2 GENMASK(15, 8) +#define DCTLINFO_V3_W13_MLD_TA_BSSID_H_V2 GENMASK(15, 0) +#define DCTLINFO_V3_W13_HW_EXSEQ_MACID_V1 GENMASK(24, 16) +#define DCTLINFO_V3_W13_ALL GENMASK(24, 0) + int rtw89_cam_init(struct rtw89_dev *rtwdev, struct rtw89_vif_link *vif); void rtw89_cam_deinit(struct rtw89_dev *rtwdev, struct rtw89_vif_link *vif); int rtw89_cam_init_addr_cam(struct rtw89_dev *rtwdev, @@ -328,6 +453,10 @@ void rtw89_cam_fill_dctl_sec_cam_info_v2(struct rtw89_dev *rtwdev, struct rtw89_vif_link *rtwvif_link, struct rtw89_sta_link *rtwsta_link, struct rtw89_h2c_dctlinfo_ud_v2 *h2c); +void rtw89_cam_fill_dctl_sec_cam_info_v3(struct rtw89_dev *rtwdev, + struct rtw89_vif_link *rtwvif_link, + struct rtw89_sta_link *rtwsta_link, + struct rtw89_h2c_dctlinfo_ud_v3 *h2c); int rtw89_cam_fill_bssid_cam_info(struct rtw89_dev *rtwdev, struct rtw89_vif_link *rtwvif_link, struct rtw89_sta_link *rtwsta_link, diff --git a/sys/contrib/dev/rtw89/chan.c b/sys/contrib/dev/rtw89/chan.c index 220b0f4988f7..d7b338610bf1 100644 --- a/sys/contrib/dev/rtw89/chan.c +++ b/sys/contrib/dev/rtw89/chan.c @@ -60,6 +60,28 @@ static enum rtw89_subband rtw89_get_subband_type(enum rtw89_band band, } } +static enum rtw89_tx_comp_band rtw89_get_tx_comp_band(enum rtw89_band band, + u8 center_chan) +{ + switch (band) { + default: + case RTW89_BAND_2G: + return RTW89_TX_COMP_BAND_2GHZ; + case RTW89_BAND_5G: + if (center_chan < 149) + return RTW89_TX_COMP_BAND_5GHZ_L; + else + return RTW89_TX_COMP_BAND_5GHZ_H; + case RTW89_BAND_6G: + if (center_chan < 65) + return RTW89_TX_COMP_BAND_5GHZ_H; + else if (center_chan < 193) + return RTW89_TX_COMP_BAND_6GHZ_M; + else + return RTW89_TX_COMP_BAND_6GHZ_UH; + } +} + static enum rtw89_sc_offset rtw89_get_primary_chan_idx(enum rtw89_bandwidth bw, u32 center_freq, u32 primary_freq) @@ -123,6 +145,7 @@ void rtw89_chan_create(struct rtw89_chan *chan, u8 center_chan, u8 primary_chan, chan->freq = center_freq; chan->subband_type = rtw89_get_subband_type(band, center_chan); + chan->tx_comp_band = rtw89_get_tx_comp_band(band, center_chan); chan->pri_ch_idx = rtw89_get_primary_chan_idx(bandwidth, center_freq, primary_freq); chan->pri_sb_idx = rtw89_get_primary_sb_idx(center_chan, primary_chan, @@ -295,6 +318,8 @@ void rtw89_entity_init(struct rtw89_dev *rtwdev) mgnt->chanctx_tbl[i][j] = RTW89_CHANCTX_IDLE; } + hal->entity_force_hw = RTW89_PHY_NUM; + rtw89_config_default_chandef(rtwdev); } @@ -347,8 +372,8 @@ static void rtw89_normalize_link_chanctx(struct rtw89_dev *rtwdev, if (unlikely(!rtwvif_link->chanctx_assigned)) return; - cur = rtw89_vif_get_link_inst(rtwvif, 0); - if (!cur || !cur->chanctx_assigned) + cur = rtw89_get_designated_link(rtwvif); + if (unlikely(!cur) || !cur->chanctx_assigned) return; if (cur == rtwvif_link) @@ -417,12 +442,43 @@ dflt: } EXPORT_SYMBOL(__rtw89_mgnt_chan_get); +bool rtw89_entity_check_hw(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy_idx) +{ + switch (rtwdev->mlo_dbcc_mode) { + case MLO_2_PLUS_0_1RF: + return phy_idx == RTW89_PHY_0; + case MLO_0_PLUS_2_1RF: + return phy_idx == RTW89_PHY_1; + default: + return false; + } +} + +void rtw89_entity_force_hw(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy_idx) +{ + rtwdev->hal.entity_force_hw = phy_idx; + + if (phy_idx != RTW89_PHY_NUM) + rtw89_debug(rtwdev, RTW89_DBG_CHAN, "%s: %d\n", __func__, phy_idx); + else + rtw89_debug(rtwdev, RTW89_DBG_CHAN, "%s: (none)\n", __func__); +} + static enum rtw89_mlo_dbcc_mode rtw89_entity_sel_mlo_dbcc_mode(struct rtw89_dev *rtwdev, u8 active_hws) { if (rtwdev->chip->chip_gen != RTW89_CHIP_BE) return MLO_DBCC_NOT_SUPPORT; + switch (rtwdev->hal.entity_force_hw) { + case RTW89_PHY_0: + return MLO_2_PLUS_0_1RF; + case RTW89_PHY_1: + return MLO_0_PLUS_2_1RF; + default: + break; + } + switch (active_hws) { case BIT(0): return MLO_2_PLUS_0_1RF; @@ -466,8 +522,8 @@ static void rtw89_entity_recalc_mgnt_roles(struct rtw89_dev *rtwdev) } /* To be consistent with legacy behavior, expect the first active role - * which uses RTW89_CHANCTX_0 to put at position 0, and make its first - * link instance take RTW89_CHANCTX_0. (normalizing) + * which uses RTW89_CHANCTX_0 to put at position 0 and its designated + * link take RTW89_CHANCTX_0. (normalizing) */ list_for_each_entry(role, &mgnt->active_list, mgnt_entry) { for (i = 0; i < role->links_inst_valid_num; i++) { @@ -2608,17 +2664,20 @@ bool rtw89_mcc_detect_go_bcn(struct rtw89_dev *rtwdev, static void rtw89_mcc_detect_connection(struct rtw89_dev *rtwdev, struct rtw89_mcc_role *role) { + struct rtw89_vif_link *rtwvif_link = role->rtwvif_link; struct ieee80211_vif *vif; bool start_detect; int ret; ret = rtw89_core_send_nullfunc(rtwdev, role->rtwvif_link, true, false, RTW89_MCC_PROBE_TIMEOUT); - if (ret) + if (ret && + READ_ONCE(rtwvif_link->sync_bcn_tsf) == rtwvif_link->last_sync_bcn_tsf) role->probe_count++; else role->probe_count = 0; + rtwvif_link->last_sync_bcn_tsf = READ_ONCE(rtwvif_link->sync_bcn_tsf); if (role->probe_count < RTW89_MCC_PROBE_MAX_TRIES) return; diff --git a/sys/contrib/dev/rtw89/chan.h b/sys/contrib/dev/rtw89/chan.h index 5b22764d5329..c797cda2e763 100644 --- a/sys/contrib/dev/rtw89/chan.h +++ b/sys/contrib/dev/rtw89/chan.h @@ -166,6 +166,8 @@ void rtw89_config_roc_chandef(struct rtw89_dev *rtwdev, const struct cfg80211_chan_def *chandef); void rtw89_entity_init(struct rtw89_dev *rtwdev); enum rtw89_entity_mode rtw89_entity_recalc(struct rtw89_dev *rtwdev); +bool rtw89_entity_check_hw(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy_idx); +void rtw89_entity_force_hw(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy_idx); void rtw89_chanctx_work(struct wiphy *wiphy, struct wiphy_work *work); void rtw89_queue_chanctx_work(struct rtw89_dev *rtwdev); void rtw89_queue_chanctx_change(struct rtw89_dev *rtwdev, diff --git a/sys/contrib/dev/rtw89/core.c b/sys/contrib/dev/rtw89/core.c index 1dee73a62f98..c834649014b4 100644 --- a/sys/contrib/dev/rtw89/core.c +++ b/sys/contrib/dev/rtw89/core.c @@ -490,6 +490,32 @@ void rtw89_core_set_chip_txpwr(struct rtw89_dev *rtwdev) __rtw89_core_set_chip_txpwr(rtwdev, chan, RTW89_PHY_1); } +void rtw89_chip_rfk_channel(struct rtw89_dev *rtwdev, + struct rtw89_vif_link *rtwvif_link) +{ + const struct rtw89_chip_info *chip = rtwdev->chip; + bool mon = !!rtwdev->pure_monitor_mode_vif; + bool prehdl_link = false; + + if (chip->chip_gen != RTW89_CHIP_AX && + !RTW89_CHK_FW_FEATURE_GROUP(WITH_RFK_PRE_NOTIFY, &rtwdev->fw) && + !mon && !rtw89_entity_check_hw(rtwdev, rtwvif_link->phy_idx)) + prehdl_link = true; + + if (prehdl_link) { + rtw89_entity_force_hw(rtwdev, rtwvif_link->phy_idx); + rtw89_set_channel(rtwdev); + } + + if (chip->ops->rfk_channel) + chip->ops->rfk_channel(rtwdev, rtwvif_link); + + if (prehdl_link) { + rtw89_entity_force_hw(rtwdev, RTW89_PHY_NUM); + rtw89_set_channel(rtwdev); + } +} + static void rtw89_chip_rfk_channel_for_pure_mon_vif(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy_idx) { @@ -568,7 +594,7 @@ rtw89_core_get_tx_type(struct rtw89_dev *rtwdev, struct ieee80211_hdr *hdr = (void *)skb->data; __le16 fc = hdr->frame_control; - if (ieee80211_is_mgmt(fc) || ieee80211_is_nullfunc(fc)) + if (ieee80211_is_mgmt(fc) || ieee80211_is_any_nullfunc(fc)) return RTW89_CORE_TX_TYPE_MGMT; return RTW89_CORE_TX_TYPE_DATA; @@ -853,6 +879,7 @@ rtw89_core_tx_update_mgmt_info(struct rtw89_dev *rtwdev, desc_info->qsel = qsel; desc_info->ch_dma = ch_dma; + desc_info->sw_mld = true; desc_info->port = desc_info->hiq ? rtwvif_link->port : 0; desc_info->mac_id = rtw89_core_tx_get_mac_id(rtwdev, tx_req); desc_info->hw_ssn_sel = RTW89_MGMT_HW_SSN_SEL; @@ -1083,6 +1110,7 @@ rtw89_core_tx_update_data_info(struct rtw89_dev *rtwdev, desc_info->ch_dma = ch_dma; desc_info->tid_indicate = tid_indicate; desc_info->qsel = qsel; + desc_info->sw_mld = false; desc_info->mac_id = rtw89_core_tx_get_mac_id(rtwdev, tx_req); desc_info->port = desc_info->hiq ? rtwvif_link->port : 0; desc_info->er_cap = rtwsta_link ? rtwsta_link->er_cap : false; @@ -1239,7 +1267,7 @@ rtw89_core_tx_update_desc_info(struct rtw89_dev *rtwdev, if (addr_cam->valid && desc_info->mlo) upd_wlan_hdr = true; - if (rtw89_is_tx_rpt_skb(rtwdev, tx_req->skb)) + if (info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS || tx_req->with_wait) rtw89_tx_rpt_init(rtwdev, tx_req); is_bmc = (is_broadcast_ether_addr(hdr->addr1) || @@ -1358,7 +1386,7 @@ int rtw89_h2c_tx(struct rtw89_dev *rtwdev, static int rtw89_core_tx_write_link(struct rtw89_dev *rtwdev, struct rtw89_vif_link *rtwvif_link, struct rtw89_sta_link *rtwsta_link, - struct sk_buff *skb, int *qsel, bool sw_mld, + struct sk_buff *skb, int *qsel, struct rtw89_tx_wait_info *wait) { struct ieee80211_sta *sta = rtwsta_link_to_sta_safe(rtwsta_link); @@ -1373,14 +1401,15 @@ static int rtw89_core_tx_write_link(struct rtw89_dev *rtwdev, tx_req.sta = sta; tx_req.rtwvif_link = rtwvif_link; tx_req.rtwsta_link = rtwsta_link; - tx_req.desc_info.sw_mld = sw_mld; - rcu_assign_pointer(skb_data->wait, wait); + tx_req.with_wait = !!wait; rtw89_traffic_stats_accu(rtwdev, rtwvif, skb, true, true); rtw89_wow_parse_akm(rtwdev, skb); rtw89_core_tx_update_desc_info(rtwdev, &tx_req); rtw89_core_tx_wake(rtwdev, &tx_req); + rcu_assign_pointer(skb_data->wait, wait); + ret = rtw89_hci_tx_write(rtwdev, &tx_req); if (ret) { rtw89_err(rtwdev, "failed to transmit skb to HCI\n"); @@ -1417,8 +1446,7 @@ int rtw89_core_tx_write(struct rtw89_dev *rtwdev, struct ieee80211_vif *vif, } } - return rtw89_core_tx_write_link(rtwdev, rtwvif_link, rtwsta_link, skb, qsel, false, - NULL); + return rtw89_core_tx_write_link(rtwdev, rtwvif_link, rtwsta_link, skb, qsel, NULL); } static __le32 rtw89_build_txwd_body0(struct rtw89_tx_desc_info *desc_info) @@ -1663,6 +1691,17 @@ static __le32 rtw89_build_txwd_body2_v2(struct rtw89_tx_desc_info *desc_info) return cpu_to_le32(dword); } +static __le32 rtw89_build_txwd_body2_v3(struct rtw89_tx_desc_info *desc_info) +{ + u32 dword = FIELD_PREP(BE_TXD_BODY2_TID_IND_V1, desc_info->tid_indicate) | + FIELD_PREP(BE_TXD_BODY2_QSEL_V1, desc_info->qsel) | + FIELD_PREP(BE_TXD_BODY2_TXPKTSIZE, desc_info->pkt_size) | + FIELD_PREP(BE_TXD_BODY2_AGG_EN, desc_info->agg_en) | + FIELD_PREP(BE_TXD_BODY2_MACID_V1, desc_info->mac_id); + + return cpu_to_le32(dword); +} + static __le32 rtw89_build_txwd_body3_v2(struct rtw89_tx_desc_info *desc_info) { u32 dword = FIELD_PREP(BE_TXD_BODY3_WIFI_SEQ, desc_info->seq) | @@ -1672,6 +1711,16 @@ static __le32 rtw89_build_txwd_body3_v2(struct rtw89_tx_desc_info *desc_info) return cpu_to_le32(dword); } +static __le32 rtw89_build_txwd_body3_v3(struct rtw89_tx_desc_info *desc_info) +{ + u32 dword = FIELD_PREP(BE_TXD_BODY3_WIFI_SEQ, desc_info->seq) | + FIELD_PREP(BE_TXD_BODY3_MLO_FLAG, desc_info->mlo) | + FIELD_PREP(BE_TXD_BODY3_IS_MLD_SW_EN, desc_info->sw_mld) | + FIELD_PREP(BE_TXD_BODY3_BK_V1, desc_info->bk); + + return cpu_to_le32(dword); +} + static __le32 rtw89_build_txwd_body4_v2(struct rtw89_tx_desc_info *desc_info) { u32 dword = FIELD_PREP(BE_TXD_BODY4_SEC_IV_L0, desc_info->sec_seq[0]) | @@ -1743,6 +1792,15 @@ static __le32 rtw89_build_txwd_info2_v2(struct rtw89_tx_desc_info *desc_info) return cpu_to_le32(dword); } +static __le32 rtw89_build_txwd_info2_v3(struct rtw89_tx_desc_info *desc_info) +{ + u32 dword = FIELD_PREP(BE_TXD_INFO2_AMPDU_DENSITY, desc_info->ampdu_density) | + FIELD_PREP(BE_TXD_INFO2_FORCE_KEY_EN_V1, desc_info->sec_en) | + FIELD_PREP(BE_TXD_INFO2_SEC_CAM_IDX_V1, desc_info->sec_cam_idx); + + return cpu_to_le32(dword); +} + static __le32 rtw89_build_txwd_info4_v2(struct rtw89_tx_desc_info *desc_info) { bool rts_en = !desc_info->is_bmc; @@ -1781,6 +1839,35 @@ void rtw89_core_fill_txdesc_v2(struct rtw89_dev *rtwdev, } EXPORT_SYMBOL(rtw89_core_fill_txdesc_v2); +void rtw89_core_fill_txdesc_v3(struct rtw89_dev *rtwdev, + struct rtw89_tx_desc_info *desc_info, + void *txdesc) +{ + struct rtw89_txwd_body_v2 *txwd_body = txdesc; + struct rtw89_txwd_info_v2 *txwd_info; + + txwd_body->dword0 = rtw89_build_txwd_body0_v2(desc_info); + txwd_body->dword1 = rtw89_build_txwd_body1_v2(desc_info); + txwd_body->dword2 = rtw89_build_txwd_body2_v3(desc_info); + txwd_body->dword3 = rtw89_build_txwd_body3_v3(desc_info); + if (desc_info->sec_en) { + txwd_body->dword4 = rtw89_build_txwd_body4_v2(desc_info); + txwd_body->dword5 = rtw89_build_txwd_body5_v2(desc_info); + } + txwd_body->dword6 = rtw89_build_txwd_body6_v2(desc_info); + txwd_body->dword7 = rtw89_build_txwd_body7_v2(desc_info); + + if (!desc_info->en_wd_info) + return; + + txwd_info = (struct rtw89_txwd_info_v2 *)(txwd_body + 1); + txwd_info->dword0 = rtw89_build_txwd_info0_v2(desc_info); + txwd_info->dword1 = rtw89_build_txwd_info1_v2(desc_info); + txwd_info->dword2 = rtw89_build_txwd_info2_v3(desc_info); + txwd_info->dword4 = rtw89_build_txwd_info4_v2(desc_info); +} +EXPORT_SYMBOL(rtw89_core_fill_txdesc_v3); + static __le32 rtw89_build_txwd_fwcmd0_v1(struct rtw89_tx_desc_info *desc_info) { u32 dword = FIELD_PREP(AX_RXD_RPKT_LEN_MASK, desc_info->pkt_size) | @@ -2834,7 +2921,7 @@ static void rtw89_core_bcn_track_assoc(struct rtw89_dev *rtwdev, rcu_read_lock(); bss_conf = rtw89_vif_rcu_dereference_link(rtwvif_link, true); - beacon_int = bss_conf->beacon_int; + beacon_int = bss_conf->beacon_int ?: 100; dtim = bss_conf->dtim_period; rcu_read_unlock(); @@ -2868,9 +2955,7 @@ static void rtw89_core_bcn_track_reset(struct rtw89_dev *rtwdev) memset(&rtwdev->bcn_track, 0, sizeof(rtwdev->bcn_track)); } -static void rtw89_vif_rx_bcn_stat(struct rtw89_dev *rtwdev, - struct ieee80211_bss_conf *bss_conf, - struct sk_buff *skb) +static void rtw89_vif_rx_bcn_stat(struct rtw89_dev *rtwdev, struct sk_buff *skb) { #define RTW89_APPEND_TSF_2GHZ 384 #define RTW89_APPEND_TSF_5GHZ 52 @@ -2879,7 +2964,7 @@ static void rtw89_vif_rx_bcn_stat(struct rtw89_dev *rtwdev, struct ieee80211_rx_status *rx_status = IEEE80211_SKB_RXCB(skb); struct rtw89_beacon_stat *bcn_stat = &rtwdev->phystat.bcn_stat; struct rtw89_beacon_track_info *bcn_track = &rtwdev->bcn_track; - u32 bcn_intvl_us = ieee80211_tu_to_usec(bss_conf->beacon_int); + u32 bcn_intvl_us = ieee80211_tu_to_usec(bcn_track->beacon_int); u64 tsf = le64_to_cpu(mgmt->u.beacon.timestamp); u8 wp, num = bcn_stat->num; u16 append; @@ -2887,6 +2972,10 @@ static void rtw89_vif_rx_bcn_stat(struct rtw89_dev *rtwdev, if (!RTW89_CHK_FW_FEATURE(BEACON_TRACKING, &rtwdev->fw)) return; + /* Skip if not yet associated */ + if (!bcn_intvl_us) + return; + switch (rx_status->band) { default: case NL80211_BAND_2GHZ: @@ -2974,7 +3063,7 @@ static void rtw89_vif_rx_stats_iter(void *data, u8 *mac, pkt_stat->beacon_rate = desc_info->data_rate; pkt_stat->beacon_len = skb->len; - rtw89_vif_rx_bcn_stat(rtwdev, bss_conf, skb); + rtw89_vif_rx_bcn_stat(rtwdev, skb); } if (!ether_addr_equal(bss_conf->addr, hdr->addr1)) @@ -3465,6 +3554,79 @@ void rtw89_core_query_rxdesc_v2(struct rtw89_dev *rtwdev, } EXPORT_SYMBOL(rtw89_core_query_rxdesc_v2); +void rtw89_core_query_rxdesc_v3(struct rtw89_dev *rtwdev, + struct rtw89_rx_desc_info *desc_info, + u8 *data, u32 data_offset) +{ + struct rtw89_rxdesc_phy_rpt_v2 *rxd_rpt; + struct rtw89_rxdesc_short_v3 *rxd_s; + struct rtw89_rxdesc_long_v3 *rxd_l; + u16 shift_len, drv_info_len, phy_rtp_len, hdr_cnv_len; + + rxd_s = (struct rtw89_rxdesc_short_v3 *)(data + data_offset); + + desc_info->pkt_size = le32_get_bits(rxd_s->dword0, BE_RXD_RPKT_LEN_MASK); + desc_info->drv_info_size = le32_get_bits(rxd_s->dword0, BE_RXD_DRV_INFO_SZ_MASK); + desc_info->phy_rpt_size = le32_get_bits(rxd_s->dword0, BE_RXD_PHY_RPT_SZ_MASK); + desc_info->hdr_cnv_size = le32_get_bits(rxd_s->dword0, BE_RXD_HDR_CNV_SZ_MASK); + desc_info->shift = le32_get_bits(rxd_s->dword0, BE_RXD_SHIFT_MASK); + desc_info->long_rxdesc = le32_get_bits(rxd_s->dword0, BE_RXD_LONG_RXD); + desc_info->pkt_type = le32_get_bits(rxd_s->dword0, BE_RXD_RPKT_TYPE_MASK); + desc_info->bb_sel = le32_get_bits(rxd_s->dword0, BE_RXD_BB_SEL); + if (desc_info->pkt_type == RTW89_CORE_RX_TYPE_PPDU_STAT) + desc_info->mac_info_valid = true; + + desc_info->frame_type = le32_get_bits(rxd_s->dword2, BE_RXD_TYPE_MASK); + desc_info->mac_id = le32_get_bits(rxd_s->dword2, BE_RXD_MAC_ID_V1); + desc_info->addr_cam_valid = le32_get_bits(rxd_s->dword2, BE_RXD_ADDR_CAM_VLD); + + desc_info->icv_err = le32_get_bits(rxd_s->dword3, BE_RXD_ICV_ERR); + desc_info->crc32_err = le32_get_bits(rxd_s->dword3, BE_RXD_CRC32_ERR); + desc_info->hw_dec = le32_get_bits(rxd_s->dword3, BE_RXD_HW_DEC); + desc_info->sw_dec = le32_get_bits(rxd_s->dword3, BE_RXD_SW_DEC); + desc_info->addr1_match = le32_get_bits(rxd_s->dword3, BE_RXD_A1_MATCH); + + desc_info->bw = le32_get_bits(rxd_s->dword4, BE_RXD_BW_MASK); + desc_info->data_rate = le32_get_bits(rxd_s->dword4, BE_RXD_RX_DATARATE_MASK); + desc_info->gi_ltf = le32_get_bits(rxd_s->dword4, BE_RXD_RX_GI_LTF_MASK); + desc_info->ppdu_cnt = le32_get_bits(rxd_s->dword4, BE_RXD_PPDU_CNT_MASK); + desc_info->ppdu_type = le32_get_bits(rxd_s->dword4, BE_RXD_PPDU_TYPE_MASK); + + desc_info->free_run_cnt = le32_to_cpu(rxd_s->dword5); + + shift_len = desc_info->shift << 1; /* 2-byte unit */ + drv_info_len = desc_info->drv_info_size << 3; /* 8-byte unit */ + phy_rtp_len = desc_info->phy_rpt_size << 3; /* 8-byte unit */ + hdr_cnv_len = desc_info->hdr_cnv_size << 4; /* 16-byte unit */ + desc_info->offset = data_offset + shift_len + drv_info_len + + phy_rtp_len + hdr_cnv_len; + + if (desc_info->long_rxdesc) + desc_info->rxd_len = sizeof(struct rtw89_rxdesc_long_v3); + else + desc_info->rxd_len = sizeof(struct rtw89_rxdesc_short_v3); + desc_info->ready = true; + + if (phy_rtp_len == sizeof(*rxd_rpt)) { + rxd_rpt = (struct rtw89_rxdesc_phy_rpt_v2 *)(data + data_offset + + desc_info->rxd_len); + desc_info->rssi = le32_get_bits(rxd_rpt->dword0, BE_RXD_PHY_RSSI); + } + + if (!desc_info->long_rxdesc) + return; + + rxd_l = (struct rtw89_rxdesc_long_v3 *)(data + data_offset); + + desc_info->sr_en = le32_get_bits(rxd_l->dword6, BE_RXD_SR_EN); + desc_info->user_id = le32_get_bits(rxd_l->dword6, BE_RXD_USER_ID_MASK); + desc_info->addr_cam_id = le32_get_bits(rxd_l->dword6, BE_RXD_ADDR_CAM_V1); + desc_info->sec_cam_id = le32_get_bits(rxd_l->dword6, BE_RXD_SEC_CAM_IDX_V1); + + desc_info->rx_pl_id = le32_get_bits(rxd_l->dword7, BE_RXD_RX_PL_ID_MASK); +} +EXPORT_SYMBOL(rtw89_core_query_rxdesc_v3); + struct rtw89_core_iter_rx_status { struct rtw89_dev *rtwdev; struct ieee80211_rx_status *rx_status; @@ -4115,7 +4277,7 @@ int rtw89_core_send_nullfunc(struct rtw89_dev *rtwdev, struct rtw89_vif_link *rt if (vif->type != NL80211_IFTYPE_STATION || !vif->cfg.assoc) return 0; - wait = kzalloc(sizeof(*wait), GFP_KERNEL); + wait = kzalloc_obj(*wait); if (!wait) return -ENOMEM; @@ -4148,8 +4310,7 @@ int rtw89_core_send_nullfunc(struct rtw89_dev *rtwdev, struct rtw89_vif_link *rt goto out; } - ret = rtw89_core_tx_write_link(rtwdev, rtwvif_link, rtwsta_link, skb, &qsel, true, - wait); + ret = rtw89_core_tx_write_link(rtwdev, rtwvif_link, rtwsta_link, skb, &qsel, wait); if (ret) { rtw89_warn(rtwdev, "nullfunc transmit failed: %d\n", ret); dev_kfree_skb_any(skb); @@ -5142,7 +5303,7 @@ static void rtw89_init_vht_cap(struct rtw89_dev *rtwdev, } vht_cap->vht_supported = true; - vht_cap->cap = IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454 | + vht_cap->cap = chip->max_vht_mpdu_cap | IEEE80211_VHT_CAP_SHORT_GI_80 | IEEE80211_VHT_CAP_RXSTBC_1 | IEEE80211_VHT_CAP_HTC_VHT | @@ -5270,7 +5431,7 @@ static void rtw89_init_he_cap(struct rtw89_dev *rtwdev, IEEE80211_HE_6GHZ_CAP_MIN_MPDU_START) | le16_encode_bits(IEEE80211_VHT_MAX_AMPDU_1024K, IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP) | - le16_encode_bits(IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454, + le16_encode_bits(chip->max_vht_mpdu_cap, IEEE80211_HE_6GHZ_CAP_MAX_MPDU_LEN); iftype_data->he_6ghz_capa.capa = capa; } @@ -5291,7 +5452,7 @@ static void rtw89_init_eht_cap(struct rtw89_dev *rtwdev, u8 val, val_mcs13; int sts = 8; - if (chip->chip_gen == RTW89_CHIP_AX) + if (chip->chip_gen == RTW89_CHIP_AX || hal->no_eht) return; if (hal->no_mcs_12_13) @@ -5308,7 +5469,7 @@ static void rtw89_init_eht_cap(struct rtw89_dev *rtwdev, eht_cap->has_eht = true; eht_cap_elem->mac_cap_info[0] = - u8_encode_bits(IEEE80211_EHT_MAC_CAP0_MAX_MPDU_LEN_7991, + u8_encode_bits(chip->max_eht_mpdu_cap, IEEE80211_EHT_MAC_CAP0_MAX_MPDU_LEN_MASK); eht_cap_elem->mac_cap_info[1] = 0; @@ -5577,7 +5738,7 @@ rtw89_wait_for_cond_prep(struct rtw89_wait_info *wait, unsigned int cond) if (cur != RTW89_WAIT_COND_IDLE) return ERR_PTR(-EPERM); - prep = kzalloc(sizeof(*prep), GFP_KERNEL); + prep = kzalloc_obj(*prep); if (!prep) return ERR_PTR(-ENOMEM); @@ -5738,6 +5899,7 @@ int rtw89_core_start(struct rtw89_dev *rtwdev) rtw89_phy_dm_init(rtwdev); + rtw89_mac_set_edcca_mode_bands(rtwdev, true); rtw89_mac_cfg_ppdu_status_bands(rtwdev, true); rtw89_mac_cfg_phy_rpt_bands(rtwdev, true); rtw89_mac_update_rts_threshold(rtwdev); @@ -6004,6 +6166,9 @@ int rtw89_core_init(struct rtw89_dev *rtwdev) struct rtw89_btc *btc = &rtwdev->btc; u8 band; + bitmap_or(rtwdev->quirks, rtwdev->quirks, &rtwdev->chip->default_quirks, + NUM_OF_RTW89_QUIRKS); + INIT_LIST_HEAD(&rtwdev->ba_list); INIT_LIST_HEAD(&rtwdev->forbid_ba_list); INIT_LIST_HEAD(&rtwdev->rtwvifs_list); @@ -6161,7 +6326,9 @@ void rtw89_core_scan_complete(struct rtw89_dev *rtwdev, static void rtw89_read_chip_ver(struct rtw89_dev *rtwdev) { const struct rtw89_chip_info *chip = rtwdev->chip; + struct rtw89_hal *hal = &rtwdev->hal; int ret; + u8 val2; u8 val; u8 cv; @@ -6173,14 +6340,28 @@ static void rtw89_read_chip_ver(struct rtw89_dev *rtwdev) cv = CHIP_CBV; } - rtwdev->hal.cv = cv; + hal->cv = cv; - if (rtw89_is_rtl885xb(rtwdev)) { + if (rtw89_is_rtl885xb(rtwdev) || chip->chip_gen >= RTW89_CHIP_BE) { ret = rtw89_mac_read_xtal_si(rtwdev, XTAL_SI_CV, &val); if (ret) return; - rtwdev->hal.acv = u8_get_bits(val, XTAL_SI_ACV_MASK); + hal->acv = u8_get_bits(val, XTAL_SI_ACV_MASK); + } + + if (chip->chip_gen >= RTW89_CHIP_BE) { + hal->cid = + rtw89_read32_mask(rtwdev, R_BE_SYS_CHIPINFO, B_BE_HW_ID_MASK); + + ret = rtw89_mac_read_xtal_si(rtwdev, XTAL_SI_CHIP_ID_L, &val); + if (ret) + return; + ret = rtw89_mac_read_xtal_si(rtwdev, XTAL_SI_CHIP_ID_H, &val2); + if (ret) + return; + + hal->aid = val | val2 << 8; } } @@ -6279,7 +6460,8 @@ int rtw89_core_mlsr_switch(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif, goto wake_queue; } - rtw89_chip_rfk_channel(rtwdev, target); + if (RTW89_CHK_FW_FEATURE_GROUP(WITH_RFK_PRE_NOTIFY, &rtwdev->fw)) + rtw89_chip_rfk_channel(rtwdev, target); rtwvif->mlo_mode = RTW89_MLO_MODE_MLSR; @@ -6390,6 +6572,8 @@ void rtw89_core_rfkill_poll(struct rtw89_dev *rtwdev, bool force) *** 9751 LINES SKIPPED *** From nobody Wed Apr 22 21:09:09 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bft2YNqz6bL72 for ; Wed, 22 Apr 2026 21:09:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bfs6jS7z3m3d for ; Wed, 22 Apr 2026 21:09:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KHk78e9mcbDMXHQLqtEojd6XRKcMQ2dopCNQElRj9Ps=; b=ij4L4kmPis99GGxAGuUjgILqZIiEM1Pak3ot7FfN2doniDmDnHXvH4mwI8Rg9R9Poclxao /+cy/y+ThzkCZEPn45GbG47YU9tNPyu96v7olENITEG4JtgNMa5MxWDpSD174/928EMzZb RtfrH4Rxn6yyJwJU7LtkBsTTNJirGyNRC87a+f+dgK992ZhZ/bYy6GuQbNTOZXvxRLvFnp MkikgIKx4JeiQ/Lq9PqNyj0ce51vFIlZt2U2wfVm745j7Z9TZM6zaOmTGbiREZxv1mXYV2 hYagDQJZ7UGwxy/35OiE/8oJd/iB5Z97dRVy9BvGn7a1hkr16O8lNbStmsuimw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892149; a=rsa-sha256; cv=none; b=Bmp6YnfFQpIvQV91E1V2+2WFB0LhKRJFECrh+v0X/AYGM2bPc7fkgjMOolf02ICzCpE7gp Nk7u6+neNEoFWj0A/WMIBcN3RnHGiWam61d6i8u6GoTqNa7JsTs/+v0kHBexvDYmZqm3Xm 5jyEdpygL+Wf496HFGW5SDEarlqs73MZEmlfrQizqb9kLSPQ9c//hEQUB0QkaEG++EoJyV 1g3jDeQP85QN10tqWXR4Lz90qVSDPeAUvPXfrpymSCc2Bcvaj2Bk3nFEpYYVJ4aYcmyqWb Skv5B8jWeH/smAahuqQQEZThq4TDH0GKHc/yBiRFPspVemG6KWP7i02DSNUeFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KHk78e9mcbDMXHQLqtEojd6XRKcMQ2dopCNQElRj9Ps=; b=mp+m5MjrM9/ZWgZV841F8H4rJYr3VOEo52hUbVl+954PBJz/X3LXToZ5eof7zd2CGF5fus wGTyi49QP8saZegn4fu2oNsFFMoHOuFwv3s6Xt1ScN4j6vw0lGF2rjvr5LweWvrHkInaDY UYYGJE92PHHU4L1EAwJ/y3MmTaYmhh3z1jcJDVcWObekcNvw9VT3mveQakiVCk4iek1SKZ U3Qib4k0dAZ+j2vohghyWSF49hDh6BbihSBXR1HjFNeaelssz3fQBsM4fqXIw3dBwUnuAq IbRyukdCNJnV9X++pIA8V/jTrcFGxKTDrXb3p8eRxjQFK3P5mNQRA6tIzDeKLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfs6JdRznpV for ; Wed, 22 Apr 2026 21:09:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 304fc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:09:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 47263c162d31 - stable/15 - rtw89: update module Makefile for v7.0 driver 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 47263c162d315eeabedd2a7aeb3b54c62515a765 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:09:09 +0000 Message-Id: <69e938f5.304fc.18ba1025@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=47263c162d315eeabedd2a7aeb3b54c62515a765 commit 47263c162d315eeabedd2a7aeb3b54c62515a765 Author: Bjoern A. Zeeb AuthorDate: 2026-04-18 20:50:30 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:12 +0000 rtw89: update module Makefile for v7.0 driver version Update LINUXKPI_VERSION to reflect that the driver is based on Linux v7.0. Sponsored by: The FreeBSD Foundation (cherry picked from commit 3780e6f9db01cc4f7d53d67ed1fc992a8f64c53f) --- sys/modules/rtw89/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/modules/rtw89/Makefile b/sys/modules/rtw89/Makefile index cb7c3ece7065..b7f8dc7a2c6e 100644 --- a/sys/modules/rtw89/Makefile +++ b/sys/modules/rtw89/Makefile @@ -83,6 +83,6 @@ CFLAGS+= ${LINUXKPI_INCLUDES} #CFLAGS+= -ferror-limit=0 -fmacro-backtrace-limit=0 CFLAGS+= -DKBUILD_MODNAME='"rtw89"' -CFLAGS+= -DLINUXKPI_VERSION=61900 +CFLAGS+= -DLINUXKPI_VERSION=70000 .include From nobody Wed Apr 22 21:09:12 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfw3L3nz6bL8t for ; Wed, 22 Apr 2026 21:09:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bfw18Pyz3mC7 for ; Wed, 22 Apr 2026 21:09:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892152; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P3f8lxjVJ1Xp5cSB+WL6mZeT9dtap+Cgkh+qr+XPMyQ=; b=cE227MnmjKH+mEJ6K5O+17QuRVUgdhvuPGgtVTnzqEYOBqqkhYRC+U07tTtwc31xXnotdD 6c6+Ioh9Q510UvBcQxZHMP0zMe640UiRmBEUDbipSruCEKv1pqYejNJsiIg28XLP8gUyBu 6xSmoMF/A41M/HmrlILS01WEsbvQP6wcPZJKCPpOkEK+JKOxuyxU+/m4NEm3bmJoAB3iJe 3aj4G/FYVC3LIPGQ96QCYh6iCuLTNmKizNoF2F/KOJGTOOEafqs09dDtqZEiu9uWQ4VKdf yP3WtjsSDtupcto2oFFtO5BpAlZsnk47kAWqeYtAxcvREQobUYcWvXCPYgB5gA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892152; a=rsa-sha256; cv=none; b=J7k410t0IIhve+xMn6T5JeoMVU/TGmdzEEbCqijayHy++hwxLgskDT5LWNRsoYV0ln17c9 Q0QXhWyJrcQRlmM/YxhBxwOqkIy903TwVqhh11fyqxZkSIO6lbfRuh/y55hADQwJozB8Xf +OGDbq0U3COiy07KTmx9kYAsIHIk4yhlV7O7/cuz9i2A6SoAGyWKtGSupoyKM8xpR/bG62 yIzMfz0fbmHM8xqLsbPGkBCaw/w2IrtWevWKJzg0+tEDN/hqjwJK4rs3s6Xi57fM292UkP V5wtLKylBjumRsoR1avm0v4c6DH5NkmNnqVAeDaxez2Zj98+tf81CzcKBuQtFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892152; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P3f8lxjVJ1Xp5cSB+WL6mZeT9dtap+Cgkh+qr+XPMyQ=; b=OL/Hyn96cIVARGvF76rlYZe9Hmo8AB9HyHSwpZAeGXJopa/18DHlMGOwpIoqKnN3a4/MvW kZgCV2ZIRZIDO9U6DGerKq4Xi5kRwUMmpi74C1SA+JdGHAd7YuN5jH1oLalPq2Njc996TY uM7g+jvYyb4JBxQJhZ+uGrQSybnPpcMT75S2RAA7vpY6VABEH1aXjHCDDx0gTgqjnMLrFa fTD7X5fGNN4c7A2JRrfoiNsUMw2GXBlKo1LOx3mqbGbeNi0sNAKDEmYHbKXWKbwOuxByjS 8GnG84YKjiRzoWnTWlTImGJKXkpnsRhb9KPaPOgYHqjZEoEN6pibnkx08aCOSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfw0kXyznX5 for ; Wed, 22 Apr 2026 21:09:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30091 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:09:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 05a157596b9f - stable/15 - mt76: update module Makefile for v7.0 driver 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 05a157596b9fbaf16b0b877ae1739b7576e817d0 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:09:12 +0000 Message-Id: <69e938f8.30091.451acb74@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=05a157596b9fbaf16b0b877ae1739b7576e817d0 commit 05a157596b9fbaf16b0b877ae1739b7576e817d0 Author: Bjoern A. Zeeb AuthorDate: 2026-04-18 21:02:57 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:13 +0000 mt76: update module Makefile for v7.0 driver version Update LINUXKPI_VERSION to reflect that the driver is based on Linux v7.0. Sponsored by: The FreeBSD Foundation (cherry picked from commit 1c50cb1d75625bea2ba928697ea1cbafa29dd245) --- sys/modules/mt76/Makefile.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/modules/mt76/Makefile.inc b/sys/modules/mt76/Makefile.inc index b44dcd2e2e82..5aa19fe183af 100644 --- a/sys/modules/mt76/Makefile.inc +++ b/sys/modules/mt76/Makefile.inc @@ -45,5 +45,5 @@ CFLAGS+= ${LINUXKPI_INCLUDES} #CFLAGS+= -ferror-limit=0 CFLAGS+= -DKBUILD_MODNAME='"${MT76_DRIVER_NAME}"' -CFLAGS+= -DLINUXKPI_VERSION=61900 +CFLAGS+= -DLINUXKPI_VERSION=70000 From nobody Wed Apr 22 21:09:10 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfv3tBnz6bL4g for ; Wed, 22 Apr 2026 21:09:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bfv0Yjsz3m8N for ; Wed, 22 Apr 2026 21:09:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892151; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yr0jxbgKZTeQOMQqMxox5qXIoSCq3ddI6srnVRd0fJk=; b=qspl4SbiqI4aBPIpDAvh7Fx3ImUiMWQDMUt7TeZX1NiK87DCn48DSjmaOx7IlYeW+scqvy +4fJ0EhULsIEDB5o3DxqcDKWqNaC/8AnmBtBahOjkucZNlHtjXvLrDXLlxQeeyDDBoIThJ O/5xIgQS7/bQSEwxf0UAuURIO86lLoVJ/DOFflQvwHvn/NNK6bRBqz8vjiDBXvuaCu7uAb 6W+b4TP6b9JpVVLh7QLBjrJgQX987Lg+BpblYEu3XeGEOkmkkkqUezUIGjHtdGudHHccn8 fndvVRYkiHGqpl6K6u7+f8eOXO2eSABKuFYI6AHdsflf9ib2DfNdnyd+8l2a6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892151; a=rsa-sha256; cv=none; b=mCc/HSc9HTyXeE6hGImLs0FsAZhjFwKzJVsPH/KaeXoixFLG0nlDHe8vSYv8sfkOM1AdM3 N0D7VulLY1EYeG1v14TqdDjrY4mJ+JQ/AgYumzHU46xZPcnbCvMlwFHgDtTW7XvQRv0sCO B+FxRFcGybPXZ8LQTFfE4iLG2WSiTuD6RHlLt+JXgZZf4FL3eG5Wlx+HBQZW7hgR7FoJJM fLm+KIRzN121b/OwFR6lV8wezGu5lfkMopA2QOuPgrqoE9+YDiOv5mWzi7GOHwNUrALRpz uKZVs+1xqkIpexuXF7jikQo4NPjnYIe0nLx1FXX6KEY8OyZLo/+UcPpNaP5MIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892151; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yr0jxbgKZTeQOMQqMxox5qXIoSCq3ddI6srnVRd0fJk=; b=aaxMk+OuUFwak4nslDCa9LzCWROxWYPsnoDanO3oDLkJMpRk/DlqZD6NgRq2xepnkjp49e 80TJL4TMoc52vCbCwOU2o8NiYl1/aCaCypNkG+oUSLMcwtCK8K5JsygPGIrOzawcR1UenV Ec/1DDDH41+eIWS8IOcMwJKKwsuQ/9E3daiRXdHlKABzAVk0o7XNhA3/bHLid0aZfhOiKn MLyUYAByJDrTb37GxAoY+ZWvbl5vlvh0aYm63AgW1wFC1kX6bwDzJU07mYZC13Og/STUq2 snkCsBZwz+s+gc0PJyWiFusC0uvaU8XWY6joHDyyh3IyXYWalnDsmjZOwafG5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfv00kgzncl for ; Wed, 22 Apr 2026 21:09:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30a2d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:09:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 808910385ce9 - stable/15 - mt76: update Mediatek's mt76 driver List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 808910385ce968d1bd056633cc595256e4d1f6f6 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:09:10 +0000 Message-Id: <69e938f6.30a2d.19a6264e@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=808910385ce968d1bd056633cc595256e4d1f6f6 commit 808910385ce968d1bd056633cc595256e4d1f6f6 Author: Bjoern A. Zeeb AuthorDate: 2026-04-18 21:01:39 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:13 +0000 mt76: update Mediatek's mt76 driver This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ). Sponsored by: The FreeBSD Foundation (cherry picked from commit 63a40b65c9be74193bb07a76fd66c249bd562eae) --- sys/contrib/dev/mediatek/mt76/agg-rx.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7615/mac.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7615/mt7615.h | 1 + sys/contrib/dev/mediatek/mt76/mt76_connac_mac.c | 1 + sys/contrib/dev/mediatek/mt76/mt7925/mac.c | 1 + sys/contrib/dev/mediatek/mt76/mt7996/mac.c | 1 + sys/contrib/dev/mediatek/mt76/mt7996/main.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7996/mcu.c | 2 +- sys/contrib/dev/mediatek/mt76/scan.c | 4 +--- 9 files changed, 9 insertions(+), 7 deletions(-) diff --git a/sys/contrib/dev/mediatek/mt76/agg-rx.c b/sys/contrib/dev/mediatek/mt76/agg-rx.c index 3d34caf7e4f7..bf1babac3895 100644 --- a/sys/contrib/dev/mediatek/mt76/agg-rx.c +++ b/sys/contrib/dev/mediatek/mt76/agg-rx.c @@ -248,7 +248,7 @@ int mt76_rx_aggr_start(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tidno, mt76_rx_aggr_stop(dev, wcid, tidno); - tid = kzalloc(struct_size(tid, reorder_buf, size), GFP_KERNEL); + tid = kzalloc_flex(*tid, reorder_buf, size); if (!tid) return -ENOMEM; diff --git a/sys/contrib/dev/mediatek/mt76/mt7615/mac.c b/sys/contrib/dev/mediatek/mt76/mt7615/mac.c index a4a252dc0186..0ba8a0a6fe8f 100644 --- a/sys/contrib/dev/mediatek/mt76/mt7615/mac.c +++ b/sys/contrib/dev/mediatek/mt76/mt7615/mac.c @@ -1058,7 +1058,7 @@ mt7615_mac_queue_rate_update(struct mt7615_phy *phy, struct mt7615_sta *sta, if (work_pending(&dev->rate_work)) return -EBUSY; - wrd = kzalloc(sizeof(*wrd), GFP_ATOMIC); + wrd = kzalloc_obj(*wrd, GFP_ATOMIC); if (!wrd) return -ENOMEM; diff --git a/sys/contrib/dev/mediatek/mt76/mt7615/mt7615.h b/sys/contrib/dev/mediatek/mt76/mt7615/mt7615.h index e16865dd8e52..c93fd245c90f 100644 --- a/sys/contrib/dev/mediatek/mt76/mt7615/mt7615.h +++ b/sys/contrib/dev/mediatek/mt76/mt7615/mt7615.h @@ -5,6 +5,7 @@ #define __MT7615_H #include +#include #include #include #include diff --git a/sys/contrib/dev/mediatek/mt76/mt76_connac_mac.c b/sys/contrib/dev/mediatek/mt76/mt76_connac_mac.c index 3304b5971be0..b41ca1410da9 100644 --- a/sys/contrib/dev/mediatek/mt76/mt76_connac_mac.c +++ b/sys/contrib/dev/mediatek/mt76/mt76_connac_mac.c @@ -413,6 +413,7 @@ mt76_connac2_mac_write_txwi_80211(struct mt76_dev *dev, __le32 *txwi, u32 val; if (ieee80211_is_action(fc) && + skb->len >= IEEE80211_MIN_ACTION_SIZE + 1 + 1 + 2 && mgmt->u.action.category == WLAN_CATEGORY_BACK && mgmt->u.action.u.addba_req.action_code == WLAN_ACTION_ADDBA_REQ) { u16 capab = le16_to_cpu(mgmt->u.action.u.addba_req.capab); diff --git a/sys/contrib/dev/mediatek/mt76/mt7925/mac.c b/sys/contrib/dev/mediatek/mt76/mt7925/mac.c index 1b1a23198b9f..b0a6f42e07a0 100644 --- a/sys/contrib/dev/mediatek/mt76/mt7925/mac.c +++ b/sys/contrib/dev/mediatek/mt76/mt7925/mac.c @@ -668,6 +668,7 @@ mt7925_mac_write_txwi_80211(struct mt76_dev *dev, __le32 *txwi, u32 val; if (ieee80211_is_action(fc) && + skb->len >= IEEE80211_MIN_ACTION_SIZE + 1 && mgmt->u.action.category == WLAN_CATEGORY_BACK && mgmt->u.action.u.addba_req.action_code == WLAN_ACTION_ADDBA_REQ) tid = MT_TX_ADDBA; diff --git a/sys/contrib/dev/mediatek/mt76/mt7996/mac.c b/sys/contrib/dev/mediatek/mt76/mt7996/mac.c index b884f4475021..e74c7b771e97 100644 --- a/sys/contrib/dev/mediatek/mt76/mt7996/mac.c +++ b/sys/contrib/dev/mediatek/mt76/mt7996/mac.c @@ -804,6 +804,7 @@ mt7996_mac_write_txwi_80211(struct mt7996_dev *dev, __le32 *txwi, u32 val; if (ieee80211_is_action(fc) && + skb->len >= IEEE80211_MIN_ACTION_SIZE + 1 && mgmt->u.action.category == WLAN_CATEGORY_BACK && mgmt->u.action.u.addba_req.action_code == WLAN_ACTION_ADDBA_REQ) { if (is_mt7990(&dev->mt76)) diff --git a/sys/contrib/dev/mediatek/mt76/mt7996/main.c b/sys/contrib/dev/mediatek/mt76/mt7996/main.c index beed795edb24..f16135f0b7f9 100644 --- a/sys/contrib/dev/mediatek/mt76/mt7996/main.c +++ b/sys/contrib/dev/mediatek/mt76/mt7996/main.c @@ -966,7 +966,7 @@ mt7996_mac_sta_init_link(struct mt7996_dev *dev, mtxq->wcid = idx; } } else { - msta_link = kzalloc(sizeof(*msta_link), GFP_KERNEL); + msta_link = kzalloc_obj(*msta_link); if (!msta_link) return -ENOMEM; diff --git a/sys/contrib/dev/mediatek/mt76/mt7996/mcu.c b/sys/contrib/dev/mediatek/mt76/mt7996/mcu.c index 1e21c05bae28..d6ea60876a14 100644 --- a/sys/contrib/dev/mediatek/mt76/mt7996/mcu.c +++ b/sys/contrib/dev/mediatek/mt76/mt7996/mcu.c @@ -745,7 +745,7 @@ mt7996_mcu_wed_rro_event(struct mt7996_dev *dev, struct sk_buff *skb) struct mt7996_wed_rro_session_id *session; e = (void *)skb->data; - session = kzalloc(sizeof(*session), GFP_ATOMIC); + session = kzalloc_obj(*session, GFP_ATOMIC); if (!session) break; diff --git a/sys/contrib/dev/mediatek/mt76/scan.c b/sys/contrib/dev/mediatek/mt76/scan.c index ff9176cdee3d..63b0447e55c1 100644 --- a/sys/contrib/dev/mediatek/mt76/scan.c +++ b/sys/contrib/dev/mediatek/mt76/scan.c @@ -63,10 +63,8 @@ mt76_scan_send_probe(struct mt76_dev *dev, struct cfg80211_ssid *ssid) rcu_read_lock(); - if (!ieee80211_tx_prepare_skb(phy->hw, vif, skb, band, NULL)) { - ieee80211_free_txskb(phy->hw, skb); + if (!ieee80211_tx_prepare_skb(phy->hw, vif, skb, band, NULL)) goto out; - } info = IEEE80211_SKB_CB(skb); if (req->no_cck) From nobody Wed Apr 22 21:09:13 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfx4Yrcz6bLNR for ; Wed, 22 Apr 2026 21:09:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bfx202Cz3m0Q for ; Wed, 22 Apr 2026 21:09:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892153; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eNrMo2h0P5ctNMWpBwLvUN/Do02V1eDC+bEYEe0UL6Y=; b=HMF3PBHg5KZUlZSUlj+dQjKad532e1lsHKHdedK/91KNel9gpljoDfvcX8J7qT6USKhkCa Qo9Ap/+YDF/O3dMLs6leX82Nfl6RMvNgjCJnXAVjRoMooWcUY7YD4OMDUXzEcBhVRoE7aG eGFHNOJZW267h1vfwffk/6wZ5y4CAXI8IxuKXSn9V1Xp2cXIINLt0Xidw2jc6ltCKa6cnI Hfe2cMUD18ULGRDmNmYLtkN30WdwS7J6PisB+GD9GNLz542vMYC0+Zkxpb9ekhy0O+sDXT WOddF3NaZ89kY2FMkJR/zn6ar+LxKZrgYIjeT6h04ok1bWyPnwMkG9eL++E4HQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892153; a=rsa-sha256; cv=none; b=RrJvHACJLAmVJ1vViIlIi5ora15tEQDIljBmPan7GlE4Ds+BgOONg8uMd3Uq9arqX1NYm5 Gpu8oUVN1Hwqp7wcte1SEQXtXKLMogPsFAcZxI8Jy06gbhsSVSfGZ5TxrbaQmQz5iPNRbQ Uf3jV1lGf5aM2ZYjvYKyJO7Ut1c82jpLjvnWq3D/d+52ntGLi5/INDLB8ekHBi6cKfLewu +5b+oS+wTAegqrNQ3XiSdEqQc80P1W4JkeO0ywVEjKR1amysLeNL/Kz2OcBg2qYsEK8pqb lv6jzHNQ7gHn9pWeP7JorYPRcOLJDZJ6Uj+q/Tcb/q9NJ82A518v4kkDCwgt/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892153; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eNrMo2h0P5ctNMWpBwLvUN/Do02V1eDC+bEYEe0UL6Y=; b=jN42uSW0zkq51FBA/S10tkEwIrBQVxjKZ7ICWSe2Xh10N4pqNssU3ZGQ2Dsy6GZ4/BB/Fc kirYjz37J/qIFanRubYD7KkEsprScChZpp8kQqKh9ZW7kIGpEAsp2Bg6MS2sj3o3wmYzzU QwbbxYIpM8vk5x15gjlEIv9nTcdcKD1z0qpNoCph3jjWlXBYCzBiS2wLQ1hZyiVurZJovS 6GvcA1Nletn80wv2ve89xT2iRkqkShu0lSNKnhdFDn2sdSmraaLAJPGHpMjjluZjyVs1Rx bsPcGZUrEEYGQMXyvsBWBkAN2AScvn0uGFuYMrlWNrbV9sdS5Te3bygwbJUx9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfx14HQznjh for ; Wed, 22 Apr 2026 21:09:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 275ff by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:09:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 3b03525843f1 - stable/15 - ath-common: update common Atheros/QCA code List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 3b03525843f14481114bf352511837ca43697990 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:09:13 +0000 Message-Id: <69e938f9.275ff.7d43b026@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=3b03525843f14481114bf352511837ca43697990 commit 3b03525843f14481114bf352511837ca43697990 Author: Bjoern A. Zeeb AuthorDate: 2026-04-19 15:07:36 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:13 +0000 ath-common: update common Atheros/QCA code This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ). Sponsored by: The FreeBSD Foundation (cherry picked from commit ff18554fd6e616f5d965322be477dc406a2906bc) --- sys/contrib/dev/athk/dfs_pattern_detector.c | 4 ++-- sys/contrib/dev/athk/dfs_pri_detector.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/contrib/dev/athk/dfs_pattern_detector.c b/sys/contrib/dev/athk/dfs_pattern_detector.c index 700da9f4531e..ce5a6a39c0ad 100644 --- a/sys/contrib/dev/athk/dfs_pattern_detector.c +++ b/sys/contrib/dev/athk/dfs_pattern_detector.c @@ -199,7 +199,7 @@ channel_detector_create(struct dfs_pattern_detector *dpd, u16 freq) u32 i; struct channel_detector *cd; - cd = kzalloc(struct_size(cd, detectors, dpd->num_radar_types), GFP_ATOMIC); + cd = kzalloc_flex(*cd, detectors, dpd->num_radar_types, GFP_ATOMIC); if (cd == NULL) goto fail; @@ -354,7 +354,7 @@ dfs_pattern_detector_init(struct ath_common *common, if (!IS_ENABLED(CONFIG_CFG80211_CERTIFICATION_ONUS)) return NULL; - dpd = kmalloc(sizeof(*dpd), GFP_KERNEL); + dpd = kmalloc_obj(*dpd); if (dpd == NULL) return NULL; diff --git a/sys/contrib/dev/athk/dfs_pri_detector.c b/sys/contrib/dev/athk/dfs_pri_detector.c index d07c454c9c00..388f9d1913bd 100644 --- a/sys/contrib/dev/athk/dfs_pri_detector.c +++ b/sys/contrib/dev/athk/dfs_pri_detector.c @@ -202,7 +202,7 @@ static bool pulse_queue_enqueue(struct pri_detector *pde, u64 ts) { struct pulse_elem *p = pool_get_pulse_elem(); if (p == NULL) { - p = kmalloc(sizeof(*p), GFP_ATOMIC); + p = kmalloc_obj(*p, GFP_ATOMIC); if (p == NULL) { DFS_POOL_STAT_INC(pulse_alloc_error); return false; @@ -284,7 +284,7 @@ static bool pseq_handler_create_sequences(struct pri_detector *pde, ps.deadline_ts = ps.first_ts + ps.dur; new_ps = pool_get_pseq_elem(); if (new_ps == NULL) { - new_ps = kmalloc(sizeof(*new_ps), GFP_ATOMIC); + new_ps = kmalloc_obj(*new_ps, GFP_ATOMIC); if (new_ps == NULL) { DFS_POOL_STAT_INC(pseq_alloc_error); return false; @@ -418,7 +418,7 @@ struct pri_detector *pri_detector_init(const struct radar_detector_specs *rs) { struct pri_detector *de; - de = kzalloc(sizeof(*de), GFP_ATOMIC); + de = kzalloc_obj(*de, GFP_ATOMIC); if (de == NULL) return NULL; de->exit = pri_detector_exit; From nobody Wed Apr 22 21:09:14 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfy5jTjz6bLNV for ; Wed, 22 Apr 2026 21:09:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bfy2Q6Rz3mJ5 for ; Wed, 22 Apr 2026 21:09:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892154; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A010G3AmekqjUxEq88rCYq9DTJoPkpGPzq2zXV4+Rmc=; b=asmOHH+Pm2je2Zk5f7uSaGKu2C3lNoZJRcN362hqStK4vNBSIau2S8eGEHV/P/r8/zX1g8 UJo9RfiglINJ/E0/OgyE5oS5P08SckJua31uAV8dLXR0UEmAO7txCbeF7/ou6OK4IGCLhU jkIexj7ldhwr/nR2rYBxbYoI9dRbzXE4CGbUr/UYBpDviHdeFH7jrwCHp+6p7HuY5ItvdF euEKvZ8B1E7qhcCFSVAKnpnMPC9nSfT3++EIUCR/APBKeY2JvOd+XTsqJ+GnaGjWtpbwto uZJ2EesxskP3+25N0KrzSTFyjNpv9b4H/1/T5wvLB20BKoUEuiUuePkHSJSRzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892154; a=rsa-sha256; cv=none; b=P7wq8dw2i2ExvHsdyHOLgtfxnxfvO3Kpe0yuZjPj7RMomr6l+2ONGKCRIElNuefDAML5/u 3ByveALP5YT4oAhjCXsc2LpBHD3hhMJSaafaVO1vp4EF89cqjgbhMTs5f+ALkQOD9wbA9b KlQhAtRXls5lNwOUOIaz4lb3QlO0egY8aMBY3NwGTooky4dYDHJCFDwlkD1rcoPbyQDbiX s8CkI8BVefqbKDMXNJtRMSyoEEmIR3hPUBk5zA/Fo5Y/cGWjA7AnHWHvWxuqHImKqVlIU4 J6NhSZ3DeciT7m52/Q/iDpA2/3nAOG3Qj0ywgOJqkXhpkBEgVrMDv7OVIaGNVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892154; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A010G3AmekqjUxEq88rCYq9DTJoPkpGPzq2zXV4+Rmc=; b=JPNHe5TDux9Ia3wtfyaa6ZNM1pF+C1ZI6LrdTKTnGSt5mATkkTJXQi/ixXf3SnKJtdrXQj rIslFD+d5ftg74bxBQPUh1vkl/mzDvZ06ag4PLK4Pb1BU8I/k5OFr37shNmBPkjL2hnRnD gyUV3DBSwYuwumWD+roMOaiDgBL5K5VmQflahAqDYcWT3UU10Sh8R1NEmrwNrb5/d/027U hH1qXeGLtxS45Hf96Be32VzDqKoQ4Pc1v7kKbEDW2uxB1zB54rTNt3jlVwYKaaudOpb5nE vDGDtGf9faLhjt0qsu1JXU4Sw4XiatAW+SSqM7fqI/WuDB1aJ0nJql4OO20kCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfy1xypznpW for ; Wed, 22 Apr 2026 21:09:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27cb8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:09:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 4208012711cc - stable/15 - ath10k: update Atheros/QCA's ath10k driver List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4208012711cc99788233a4562e69b27cc0bd78b1 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:09:14 +0000 Message-Id: <69e938fa.27cb8.5a9919d2@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4208012711cc99788233a4562e69b27cc0bd78b1 commit 4208012711cc99788233a4562e69b27cc0bd78b1 Author: Bjoern A. Zeeb AuthorDate: 2026-04-19 15:09:30 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:14 +0000 ath10k: update Atheros/QCA's ath10k driver This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ). Sponsored by: The FreeBSD Foundation (cherry picked from commit 02b46313fd1461338703a1e02c667b8dbcc36237) --- sys/contrib/dev/athk/ath10k/ce.c | 12 +++----- sys/contrib/dev/athk/ath10k/htt_rx.c | 3 +- sys/contrib/dev/athk/ath10k/mac.c | 10 +++---- sys/contrib/dev/athk/ath10k/qmi.c | 10 +++---- sys/contrib/dev/athk/ath10k/sdio.c | 10 +++++-- sys/contrib/dev/athk/ath10k/snoc.c | 53 +++++++++++++++++++++++++++++++++-- sys/contrib/dev/athk/ath10k/snoc.h | 3 ++ sys/contrib/dev/athk/ath10k/txrx.c | 2 +- sys/contrib/dev/athk/ath10k/usb.c | 2 +- sys/contrib/dev/athk/ath10k/wmi-tlv.c | 10 +++---- sys/contrib/dev/athk/ath10k/wmi.c | 32 ++++++++++----------- sys/contrib/dev/athk/ath10k/wow.c | 4 +-- 12 files changed, 100 insertions(+), 51 deletions(-) diff --git a/sys/contrib/dev/athk/ath10k/ce.c b/sys/contrib/dev/athk/ath10k/ce.c index d53ecebcf992..5535f0348499 100644 --- a/sys/contrib/dev/athk/ath10k/ce.c +++ b/sys/contrib/dev/athk/ath10k/ce.c @@ -1461,8 +1461,7 @@ ath10k_ce_alloc_src_ring(struct ath10k *ar, unsigned int ce_id, nentries = roundup_pow_of_two(nentries); - src_ring = kzalloc(struct_size(src_ring, per_transfer_context, - nentries), GFP_KERNEL); + src_ring = kzalloc_flex(*src_ring, per_transfer_context, nentries); if (src_ring == NULL) return ERR_PTR(-ENOMEM); @@ -1519,8 +1518,7 @@ ath10k_ce_alloc_src_ring_64(struct ath10k *ar, unsigned int ce_id, nentries = roundup_pow_of_two(nentries); - src_ring = kzalloc(struct_size(src_ring, per_transfer_context, - nentries), GFP_KERNEL); + src_ring = kzalloc_flex(*src_ring, per_transfer_context, nentries); if (!src_ring) return ERR_PTR(-ENOMEM); @@ -1575,8 +1573,7 @@ ath10k_ce_alloc_dest_ring(struct ath10k *ar, unsigned int ce_id, nentries = roundup_pow_of_two(attr->dest_nentries); - dest_ring = kzalloc(struct_size(dest_ring, per_transfer_context, - nentries), GFP_KERNEL); + dest_ring = kzalloc_flex(*dest_ring, per_transfer_context, nentries); if (dest_ring == NULL) return ERR_PTR(-ENOMEM); @@ -1619,8 +1616,7 @@ ath10k_ce_alloc_dest_ring_64(struct ath10k *ar, unsigned int ce_id, nentries = roundup_pow_of_two(attr->dest_nentries); - dest_ring = kzalloc(struct_size(dest_ring, per_transfer_context, - nentries), GFP_KERNEL); + dest_ring = kzalloc_flex(*dest_ring, per_transfer_context, nentries); if (!dest_ring) return ERR_PTR(-ENOMEM); diff --git a/sys/contrib/dev/athk/ath10k/htt_rx.c b/sys/contrib/dev/athk/ath10k/htt_rx.c index d73369ffb697..b7bf6a225f58 100644 --- a/sys/contrib/dev/athk/ath10k/htt_rx.c +++ b/sys/contrib/dev/athk/ath10k/htt_rx.c @@ -820,8 +820,7 @@ int ath10k_htt_rx_alloc(struct ath10k_htt *htt) } htt->rx_ring.netbufs_ring = - kcalloc(htt->rx_ring.size, sizeof(struct sk_buff *), - GFP_KERNEL); + kzalloc_objs(struct sk_buff *, htt->rx_ring.size); if (!htt->rx_ring.netbufs_ring) goto err_netbuf; diff --git a/sys/contrib/dev/athk/ath10k/mac.c b/sys/contrib/dev/athk/ath10k/mac.c index d8e6bd2d277d..51ba60b9c237 100644 --- a/sys/contrib/dev/athk/ath10k/mac.c +++ b/sys/contrib/dev/athk/ath10k/mac.c @@ -6443,7 +6443,7 @@ static int ath10k_hw_scan(struct ieee80211_hw *hw, if (ret) goto exit; - arg = kzalloc(sizeof(*arg), GFP_KERNEL); + arg = kzalloc_obj(*arg); if (!arg) { ret = -ENOMEM; goto exit; @@ -7571,8 +7571,7 @@ static int ath10k_sta_state(struct ieee80211_hw *hw, } if (ath10k_debug_is_extd_tx_stats_enabled(ar)) { - arsta->tx_stats = kzalloc(sizeof(*arsta->tx_stats), - GFP_KERNEL); + arsta->tx_stats = kzalloc_obj(*arsta->tx_stats); if (!arsta->tx_stats) { ath10k_mac_dec_num_stations(arvif, sta); ret = -ENOMEM; @@ -7984,7 +7983,7 @@ static int ath10k_remain_on_channel(struct ieee80211_hw *hw, scan_time_msec = ar->hw->wiphy->max_remain_on_channel_duration * 2; - arg = kzalloc(sizeof(*arg), GFP_KERNEL); + arg = kzalloc_obj(*arg); if (!arg) { ret = -ENOMEM; goto exit; @@ -8974,8 +8973,7 @@ ath10k_mac_op_change_chanctx(struct ieee80211_hw *hw, if (arg.n_vifs == 0) goto radar; - arg.vifs = kcalloc(arg.n_vifs, sizeof(arg.vifs[0]), - GFP_KERNEL); + arg.vifs = kzalloc_objs(arg.vifs[0], arg.n_vifs); if (!arg.vifs) goto radar; diff --git a/sys/contrib/dev/athk/ath10k/qmi.c b/sys/contrib/dev/athk/ath10k/qmi.c index 8275345631a0..eebd78e7ff6b 100644 --- a/sys/contrib/dev/athk/ath10k/qmi.c +++ b/sys/contrib/dev/athk/ath10k/qmi.c @@ -245,7 +245,7 @@ static int ath10k_qmi_bdf_dnld_send_sync(struct ath10k_qmi *qmi) const u8 *temp; int ret; - req = kzalloc(sizeof(*req), GFP_KERNEL); + req = kzalloc_obj(*req); if (!req) return -ENOMEM; @@ -437,7 +437,7 @@ ath10k_qmi_cfg_send_sync_msg(struct ath10k *ar, int ret; u32 i; - req = kzalloc(sizeof(*req), GFP_KERNEL); + req = kzalloc_obj(*req); if (!req) return -ENOMEM; @@ -578,7 +578,7 @@ static int ath10k_qmi_cap_send_sync_msg(struct ath10k_qmi *qmi) struct qmi_txn txn; int ret; - resp = kzalloc(sizeof(*resp), GFP_KERNEL); + resp = kzalloc_obj(*resp); if (!resp) return -ENOMEM; @@ -877,7 +877,7 @@ ath10k_qmi_driver_event_post(struct ath10k_qmi *qmi, { struct ath10k_qmi_driver_event *event; - event = kzalloc(sizeof(*event), GFP_ATOMIC); + event = kzalloc_obj(*event, GFP_ATOMIC); if (!event) return -ENOMEM; @@ -1075,7 +1075,7 @@ int ath10k_qmi_init(struct ath10k *ar, u32 msa_size) struct ath10k_qmi *qmi; int ret; - qmi = kzalloc(sizeof(*qmi), GFP_KERNEL); + qmi = kzalloc_obj(*qmi); if (!qmi) return -ENOMEM; diff --git a/sys/contrib/dev/athk/ath10k/sdio.c b/sys/contrib/dev/athk/ath10k/sdio.c index c06d50db40b8..43a6b1ba8fb8 100644 --- a/sys/contrib/dev/athk/ath10k/sdio.c +++ b/sys/contrib/dev/athk/ath10k/sdio.c @@ -246,7 +246,7 @@ static int ath10k_sdio_writesb32(struct ath10k *ar, u32 addr, u32 val) __le32 *buf; int ret; - buf = kzalloc(sizeof(*buf), GFP_KERNEL); + buf = kzalloc_obj(*buf); if (!buf) return -ENOMEM; @@ -1766,7 +1766,7 @@ static int ath10k_sdio_diag_read32(struct ath10k *ar, u32 address, __le32 *val; int ret; - val = kzalloc(sizeof(*val), GFP_KERNEL); + val = kzalloc_obj(*val); if (!val) return -ENOMEM; @@ -2487,7 +2487,11 @@ void ath10k_sdio_fw_crashed_dump(struct ath10k *ar) if (fast_dump) ath10k_bmi_start(ar); + mutex_lock(&ar->dump_mutex); + + spin_lock_bh(&ar->data_lock); ar->stats.fw_crash_counter++; + spin_unlock_bh(&ar->data_lock); ath10k_sdio_disable_intrs(ar); @@ -2505,6 +2509,8 @@ void ath10k_sdio_fw_crashed_dump(struct ath10k *ar) ath10k_sdio_enable_intrs(ar); + mutex_unlock(&ar->dump_mutex); + ath10k_core_start_recovery(ar); } diff --git a/sys/contrib/dev/athk/ath10k/snoc.c b/sys/contrib/dev/athk/ath10k/snoc.c index b3f6424c17d3..f72f236fb9eb 100644 --- a/sys/contrib/dev/athk/ath10k/snoc.c +++ b/sys/contrib/dev/athk/ath10k/snoc.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: ISC /* * Copyright (c) 2018 The Linux Foundation. All rights reserved. + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ #include @@ -11,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -1023,10 +1025,14 @@ static int ath10k_hw_power_on(struct ath10k *ar) ath10k_dbg(ar, ATH10K_DBG_SNOC, "soc power on\n"); - ret = regulator_bulk_enable(ar_snoc->num_vregs, ar_snoc->vregs); + ret = pwrseq_power_on(ar_snoc->pwrseq); if (ret) return ret; + ret = regulator_bulk_enable(ar_snoc->num_vregs, ar_snoc->vregs); + if (ret) + goto pwrseq_off; + ret = clk_bulk_prepare_enable(ar_snoc->num_clks, ar_snoc->clks); if (ret) goto vreg_off; @@ -1035,18 +1041,28 @@ static int ath10k_hw_power_on(struct ath10k *ar) vreg_off: regulator_bulk_disable(ar_snoc->num_vregs, ar_snoc->vregs); +pwrseq_off: + pwrseq_power_off(ar_snoc->pwrseq); + return ret; } static int ath10k_hw_power_off(struct ath10k *ar) { struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); + int ret_seq = 0; + int ret_vreg; ath10k_dbg(ar, ATH10K_DBG_SNOC, "soc power off\n"); clk_bulk_disable_unprepare(ar_snoc->num_clks, ar_snoc->clks); - return regulator_bulk_disable(ar_snoc->num_vregs, ar_snoc->vregs); + ret_vreg = regulator_bulk_disable(ar_snoc->num_vregs, ar_snoc->vregs); + + if (ar_snoc->pwrseq) + ret_seq = pwrseq_power_off(ar_snoc->pwrseq); + + return ret_vreg ? : ret_seq; } static void ath10k_snoc_wlan_disable(struct ath10k *ar) @@ -1762,7 +1778,38 @@ static int ath10k_snoc_probe(struct platform_device *pdev) goto err_release_resource; } - ar_snoc->num_vregs = ARRAY_SIZE(ath10k_regulators); + /* + * devm_pwrseq_get() can return -EPROBE_DEFER in two cases: + * - it is not supposed to be used + * - it is supposed to be used, but the driver hasn't probed yet. + * + * There is no simple way to distinguish between these two cases, but: + * - if it is not supposed to be used, then regulator_bulk_get() will + * return all regulators as expected, continuing the probe + * - if it is supposed to be used, but wasn't probed yet, we will get + * -EPROBE_DEFER from regulator_bulk_get() too. + * + * For backwards compatibility with DTs specifying regulators directly + * rather than using the PMU device, ignore the defer error from + * pwrseq. + */ + ar_snoc->pwrseq = devm_pwrseq_get(&pdev->dev, "wlan"); + if (IS_ERR(ar_snoc->pwrseq)) { + ret = PTR_ERR(ar_snoc->pwrseq); + ar_snoc->pwrseq = NULL; + if (ret != -EPROBE_DEFER) + goto err_free_irq; + + ar_snoc->num_vregs = ARRAY_SIZE(ath10k_regulators); + } else { + /* + * The first regulator (vdd-0.8-cx-mx) is used to power on part + * of the SoC rather than the PMU on WCN399x, the rest are + * handled via pwrseq. + */ + ar_snoc->num_vregs = 1; + } + ar_snoc->vregs = devm_kcalloc(&pdev->dev, ar_snoc->num_vregs, sizeof(*ar_snoc->vregs), GFP_KERNEL); if (!ar_snoc->vregs) { diff --git a/sys/contrib/dev/athk/ath10k/snoc.h b/sys/contrib/dev/athk/ath10k/snoc.h index d4bce1707696..1ecae34687c2 100644 --- a/sys/contrib/dev/athk/ath10k/snoc.h +++ b/sys/contrib/dev/athk/ath10k/snoc.h @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: ISC */ /* * Copyright (c) 2018 The Linux Foundation. All rights reserved. + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ #ifndef _SNOC_H_ @@ -53,6 +54,7 @@ enum ath10k_snoc_flags { }; struct clk_bulk_data; +struct pwrseq_desc; struct regulator_bulk_data; struct ath10k_snoc { @@ -73,6 +75,7 @@ struct ath10k_snoc { struct ath10k_snoc_ce_irq ce_irqs[CE_COUNT_MAX]; struct ath10k_ce ce; struct timer_list rx_post_retry; + struct pwrseq_desc *pwrseq; struct regulator_bulk_data *vregs; size_t num_vregs; struct clk_bulk_data *clks; diff --git a/sys/contrib/dev/athk/ath10k/txrx.c b/sys/contrib/dev/athk/ath10k/txrx.c index 493bfb410aff..50a3498a0bfd 100644 --- a/sys/contrib/dev/athk/ath10k/txrx.c +++ b/sys/contrib/dev/athk/ath10k/txrx.c @@ -230,7 +230,7 @@ void ath10k_peer_map_event(struct ath10k_htt *htt, spin_lock_bh(&ar->data_lock); peer = ath10k_peer_find(ar, ev->vdev_id, ev->addr); if (!peer) { - peer = kzalloc(sizeof(*peer), GFP_ATOMIC); + peer = kzalloc_obj(*peer, GFP_ATOMIC); if (!peer) goto exit; diff --git a/sys/contrib/dev/athk/ath10k/usb.c b/sys/contrib/dev/athk/ath10k/usb.c index a825d442fe33..a5934117a5d3 100644 --- a/sys/contrib/dev/athk/ath10k/usb.c +++ b/sys/contrib/dev/athk/ath10k/usb.c @@ -799,7 +799,7 @@ static int ath10k_usb_alloc_pipe_resources(struct ath10k *ar, init_usb_anchor(&pipe->urb_submitted); for (i = 0; i < urb_cnt; i++) { - urb_context = kzalloc(sizeof(*urb_context), GFP_KERNEL); + urb_context = kzalloc_obj(*urb_context); if (!urb_context) return -ENOMEM; diff --git a/sys/contrib/dev/athk/ath10k/wmi-tlv.c b/sys/contrib/dev/athk/ath10k/wmi-tlv.c index 6d498e6d6ea6..5a1f3d01f5e6 100644 --- a/sys/contrib/dev/athk/ath10k/wmi-tlv.c +++ b/sys/contrib/dev/athk/ath10k/wmi-tlv.c @@ -157,7 +157,7 @@ ath10k_wmi_tlv_parse_alloc(struct ath10k *ar, const void *ptr, const void **tb; int ret; - tb = kcalloc(WMI_TLV_TAG_MAX, sizeof(*tb), gfp); + tb = kzalloc_objs(*tb, WMI_TLV_TAG_MAX, gfp); if (!tb) return ERR_PTR(-ENOMEM); @@ -1583,7 +1583,7 @@ static int ath10k_wmi_tlv_op_pull_fw_stats(struct ath10k *ar, data += sizeof(*src); data_len -= sizeof(*src); - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); + dst = kzalloc_obj(*dst, GFP_ATOMIC); if (!dst) continue; @@ -1610,7 +1610,7 @@ static int ath10k_wmi_tlv_op_pull_fw_stats(struct ath10k *ar, data += sizeof(*src); data_len -= sizeof(*src); - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); + dst = kzalloc_obj(*dst, GFP_ATOMIC); if (!dst) continue; @@ -1635,7 +1635,7 @@ static int ath10k_wmi_tlv_op_pull_fw_stats(struct ath10k *ar, data += sizeof(*src); data_len -= sizeof(*src); - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); + dst = kzalloc_obj(*dst, GFP_ATOMIC); if (!dst) continue; @@ -3292,7 +3292,7 @@ ath10k_wmi_mgmt_tx_alloc_msdu_id(struct ath10k *ar, struct sk_buff *skb, struct ath10k_mgmt_tx_pkt_addr *pkt_addr; int ret; - pkt_addr = kmalloc(sizeof(*pkt_addr), GFP_ATOMIC); + pkt_addr = kmalloc_obj(*pkt_addr, GFP_ATOMIC); if (!pkt_addr) return -ENOMEM; diff --git a/sys/contrib/dev/athk/ath10k/wmi.c b/sys/contrib/dev/athk/ath10k/wmi.c index 53c2563c8056..0f48ffde9cb9 100644 --- a/sys/contrib/dev/athk/ath10k/wmi.c +++ b/sys/contrib/dev/athk/ath10k/wmi.c @@ -3056,7 +3056,7 @@ static int ath10k_wmi_main_op_pull_fw_stats(struct ath10k *ar, if (!skb_pull(skb, sizeof(*src))) return -EPROTO; - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); + dst = kzalloc_obj(*dst, GFP_ATOMIC); if (!dst) continue; @@ -3077,7 +3077,7 @@ static int ath10k_wmi_main_op_pull_fw_stats(struct ath10k *ar, if (!skb_pull(skb, sizeof(*src))) return -EPROTO; - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); + dst = kzalloc_obj(*dst, GFP_ATOMIC); if (!dst) continue; @@ -3110,7 +3110,7 @@ static int ath10k_wmi_10x_op_pull_fw_stats(struct ath10k *ar, if (!skb_pull(skb, sizeof(*src))) return -EPROTO; - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); + dst = kzalloc_obj(*dst, GFP_ATOMIC); if (!dst) continue; @@ -3132,7 +3132,7 @@ static int ath10k_wmi_10x_op_pull_fw_stats(struct ath10k *ar, if (!skb_pull(skb, sizeof(*src))) return -EPROTO; - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); + dst = kzalloc_obj(*dst, GFP_ATOMIC); if (!dst) continue; @@ -3171,7 +3171,7 @@ static int ath10k_wmi_10_2_op_pull_fw_stats(struct ath10k *ar, if (!skb_pull(skb, sizeof(*src))) return -EPROTO; - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); + dst = kzalloc_obj(*dst, GFP_ATOMIC); if (!dst) continue; @@ -3208,7 +3208,7 @@ static int ath10k_wmi_10_2_op_pull_fw_stats(struct ath10k *ar, if (!skb_pull(skb, sizeof(*src))) return -EPROTO; - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); + dst = kzalloc_obj(*dst, GFP_ATOMIC); if (!dst) continue; @@ -3248,7 +3248,7 @@ static int ath10k_wmi_10_2_4_op_pull_fw_stats(struct ath10k *ar, if (!skb_pull(skb, sizeof(*src))) return -EPROTO; - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); + dst = kzalloc_obj(*dst, GFP_ATOMIC); if (!dst) continue; @@ -3291,7 +3291,7 @@ static int ath10k_wmi_10_2_4_op_pull_fw_stats(struct ath10k *ar, if (!skb_pull(skb, stats_len)) return -EPROTO; - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); + dst = kzalloc_obj(*dst, GFP_ATOMIC); if (!dst) continue; @@ -3340,7 +3340,7 @@ static int ath10k_wmi_10_4_op_pull_fw_stats(struct ath10k *ar, if (!skb_pull(skb, sizeof(*src))) return -EPROTO; - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); + dst = kzalloc_obj(*dst, GFP_ATOMIC); if (!dst) continue; @@ -3386,7 +3386,7 @@ static int ath10k_wmi_10_4_op_pull_fw_stats(struct ath10k *ar, if (!skb_pull(skb, sizeof(*src))) return -EPROTO; - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); + dst = kzalloc_obj(*dst, GFP_ATOMIC); if (!dst) continue; @@ -3419,7 +3419,7 @@ static int ath10k_wmi_10_4_op_pull_fw_stats(struct ath10k *ar, if (!skb_pull(skb, sizeof(*src))) return -EPROTO; - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); + dst = kzalloc_obj(*dst, GFP_ATOMIC); if (!dst) continue; @@ -3439,7 +3439,7 @@ static int ath10k_wmi_10_4_op_pull_fw_stats(struct ath10k *ar, if (!skb_pull(skb, sizeof(*src))) return -EPROTO; - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); + dst = kzalloc_obj(*dst, GFP_ATOMIC); if (!dst) continue; ath10k_wmi_10_4_pull_vdev_stats(src, dst); @@ -4981,7 +4981,7 @@ void ath10k_wmi_event_pdev_tpc_config(struct ath10k *ar, struct sk_buff *skb) rate_max = WMI_TPC_RATE_MAX; } - tpc_stats = kzalloc(sizeof(*tpc_stats), GFP_ATOMIC); + tpc_stats = kzalloc_obj(*tpc_stats, GFP_ATOMIC); if (!tpc_stats) return; @@ -5237,7 +5237,7 @@ void ath10k_wmi_event_tpc_final_table(struct ath10k *ar, struct sk_buff *skb) rate_max = WMI_TPC_FINAL_RATE_MAX; } - tpc_stats = kzalloc(sizeof(*tpc_stats), GFP_ATOMIC); + tpc_stats = kzalloc_obj(*tpc_stats, GFP_ATOMIC); if (!tpc_stats) return; @@ -5358,8 +5358,6 @@ ath10k_wmi_event_peer_sta_ps_state_chg(struct ath10k *ar, struct sk_buff *skb) struct ath10k_sta *arsta; u8 peer_addr[ETH_ALEN]; - lockdep_assert_held(&ar->data_lock); - ev = (struct wmi_peer_sta_ps_state_chg_event *)skb->data; ether_addr_copy(peer_addr, ev->peer_macaddr.addr); @@ -5374,7 +5372,9 @@ ath10k_wmi_event_peer_sta_ps_state_chg(struct ath10k *ar, struct sk_buff *skb) } arsta = (struct ath10k_sta *)sta->drv_priv; + spin_lock_bh(&ar->data_lock); arsta->peer_ps_state = __le32_to_cpu(ev->peer_ps_state); + spin_unlock_bh(&ar->data_lock); exit: rcu_read_unlock(); diff --git a/sys/contrib/dev/athk/ath10k/wow.c b/sys/contrib/dev/athk/ath10k/wow.c index aa7b2e703f3d..78653f257925 100644 --- a/sys/contrib/dev/athk/ath10k/wow.c +++ b/sys/contrib/dev/athk/ath10k/wow.c @@ -301,7 +301,7 @@ static int ath10k_vif_wow_set_wakeups(struct ath10k_vif *arvif, struct wmi_pno_scan_req *pno; int ret; - pno = kzalloc(sizeof(*pno), GFP_KERNEL); + pno = kzalloc_obj(*pno); if (!pno) return -ENOMEM; @@ -413,7 +413,7 @@ static int ath10k_vif_wow_clean_nlo(struct ath10k_vif *arvif) if (ar->nlo_enabled) { struct wmi_pno_scan_req *pno; - pno = kzalloc(sizeof(*pno), GFP_KERNEL); + pno = kzalloc_obj(*pno); if (!pno) return -ENOMEM; From nobody Wed Apr 22 21:09:15 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bg02JjKz6bLT7 for ; Wed, 22 Apr 2026 21:09:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bfz2sVrz3m95 for ; Wed, 22 Apr 2026 21:09:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892155; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XFGMWGian6Ybo42ra8SpQ4evYpSND8/SxmssrOANEDc=; b=FubqozUHO7dCNdCkzur48ThS/ehfD/yszV9JjSmu5PLJmZCdDxUHa9gyJRB94lqMKEoDlP n+POe/XU42R4n6vLZyCKof6xFLeGElrJ1XTyu0a0lchy5HJsn2oXEvT6BnjwT9mpqT5ssv QSpYpmQ8xmSY/wAKBiLJdCEu70UNqFv3cxGS13nqz0PS5JXMiW+4QMV8EuDFCPMmBWazIo Lu0m9Y6411QNKada5oixjMk/QVmQdHXL4mewFu4aN2VDuuFt5jaD0ffFw8mKQEvlj6qbcf oUM6otnDRAWMnPbmy+BKVCBoy/cyx1zN5NiXx1jn/fNDufFw4XIH7sTXPfFRnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892155; a=rsa-sha256; cv=none; b=CLm/bdqP2MCjQc81LKIhAydR2ctA8vc0VQ8qV3IzFXhrs59JWN7sYJPLXCKHMSozrqnfRn cXX8pCIEcPi/+rM8hPwE7Wn82tgyc+YXXstAljlHY+w6xnb7LrG5mqfW0bnjwcg3yHNTsu erdHMqOn1cs0AfY+n8DajZHRQpHXDfgxu0WO/eftMOwX5mFAf8Cfa+DFCN+ImSm5mpVs7k kRW7s7ZPV4ObF1inzaS2qyh+VsR1yKPrKqlbp+IDcbArnNjj2Yuzy9YBVKnGs18UAKiy1m n96kuf81iXrIIo63UMxjqksEFVcHkGLqn0W7qSvYyClPzWVLa8cCQ5A+JyqQAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892155; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XFGMWGian6Ybo42ra8SpQ4evYpSND8/SxmssrOANEDc=; b=tEX3+vJIDTVJcyevH6ldGcB6FzRK8Tvnav8aO69wIV0l9837WIRQYK4DF7tOmVb6NfzybC pomCeHqI0hDlzEbnrk3SwVCGGPZn98AWbwi9LB8N/R+x1yLZPAQu3e8Ofr9IrWbu/RDw2R ifYvur04CCqqupESMIEGynrZ/QfDcMG4vjLk5q9T2IsGKgBU5tbDpMRojqX+C4+2WtuBir mYP7E62oayf82ZBswhtJeyiJF3FjgmYEuOql0yzeVovW4zo6UWbSa3SJGNFr3qvWt8UcYr d4AoYawPbWYGdF9A6bHgeQ0piOqerDwaB1h03PUpZ/Ypf2DHsurx67fJQACs9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bfz2Lq2znLQ for ; Wed, 22 Apr 2026 21:09:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 303c1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:09:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: e38e480251d0 - stable/15 - athk_common / ath10k: update module Makefiles for v7.0 driver 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: e38e480251d09792e90d86107f000ef0b282627e Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:09:15 +0000 Message-Id: <69e938fb.303c1.b14917@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e38e480251d09792e90d86107f000ef0b282627e commit e38e480251d09792e90d86107f000ef0b282627e Author: Bjoern A. Zeeb AuthorDate: 2026-04-19 15:12:15 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:14 +0000 athk_common / ath10k: update module Makefiles for v7.0 driver version Update LINUXKPI_VERSION to reflect that the driver is based on Linux v7.0. Sponsored by: The FreeBSD Foundation (cherry picked from commit 4546eb0c27f22236be8179616e1f0a3e88ddfbbe) --- sys/modules/ath10k/Makefile | 2 +- sys/modules/athk_common/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/modules/ath10k/Makefile b/sys/modules/ath10k/Makefile index 2ffa8532ff47..b28df768c3d5 100644 --- a/sys/modules/ath10k/Makefile +++ b/sys/modules/ath10k/Makefile @@ -65,6 +65,6 @@ CFLAGS+= ${LINUXKPI_INCLUDES} #CFLAGS+= -DCONFIG_THERMAL CFLAGS+= -DKBUILD_MODNAME='"ath10k"' -CFLAGS+= -DLINUXKPI_VERSION=61900 +CFLAGS+= -DLINUXKPI_VERSION=70000 .include diff --git a/sys/modules/athk_common/Makefile b/sys/modules/athk_common/Makefile index d058d19cbe80..579ae7474891 100644 --- a/sys/modules/athk_common/Makefile +++ b/sys/modules/athk_common/Makefile @@ -31,6 +31,6 @@ CFLAGS+= ${LINUXKPI_INCLUDES} #CFLAGS+= -ferror-limit=0 CFLAGS+= -DKBUILD_MODNAME='"athk_common"' -CFLAGS+= -DLINUXKPI_VERSION=61900 +CFLAGS+= -DLINUXKPI_VERSION=70000 .include From nobody Wed Apr 22 21:09:17 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bg21V8Wz6bLFp for ; Wed, 22 Apr 2026 21:09:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bg14XVWz3mLl for ; Wed, 22 Apr 2026 21:09:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p3UuC50ycFVt3k3Bqzp1jxJaFbXT5Y5hFwsl6v0MzRc=; b=mlzxyaEWMhAlUiwkFks6741BAcQeKQjsfLKtNiyGV9s5ItaAYlg9NShw8aWd9G5j9sM5rh 0drMUsQzZV5jhItFYFvKeRzIO4YwvV276Wf9x3ecGwM2xA43sXHIY6V6jTLLyZCv/VJCV6 n3Ze2dvT+WnfG04b6yaVWymnBYxLviPHJ5xthe4GgylVNzrM0p18Zk+YBhhLpYHaY0uQYe UDSQYQrkUhFZ2V6XK77N7GbFdUOqXmMdNEjBMyu/7CfeM9685U3VEU/wrY0P1qw72se9sB djT4uznjHrN5z5kdy6X2xJDggLveWXyv61X3EpXuoI5HGlDy3/G2d8tZID/Rmw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892157; a=rsa-sha256; cv=none; b=A3SrRrwTj6OVH5f6yDKlJ9GWBojtypq1it5+a1NMd9W7Ao2ghalheHo6fwrnljo7R3nVKE QSTeD2hjOyLSIZAazH2w2Q+YUjEhwfEsv16ZTHvfqjd59fE6Q5OnDZ3VBaWdo5IsGtqjS+ 8sexA/2baw+tKS/cPsS4/IVmWs5TpjpitvBtJLjoRuhNQMxPcij1G0g8Z7oiHzNxW3sWrw zR/7N746gN2pfsAKtE9qgHzrM5amWLAQVqATkgay/JxnZQChjRWrse03lv414WLX9Ui6Hh vO/o8CfbJujLuxcx9jbXiN7bhz8ZMMMq1zm2iwT3IIZYgWQKsgGBtaScPriZXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p3UuC50ycFVt3k3Bqzp1jxJaFbXT5Y5hFwsl6v0MzRc=; b=VxZ6nNj6JFSvKf0fhnmjf1aJ8j2kVIGICmZLJMfpgj0iRc17ma1eKb7yXwotZXPvHooRkJ 8g9o6rlKv3aZiC6Uz4XwfgmNX3hgiltTT51ltg2MIgLc/u0s6h6duxExFKhdRMKFxxAhed tjp2zwh666ornlQqjI9wndNPQmyxD1fHVNo4kq1WKJsAatXo/pfoJuat7gD8Uy+gYgCIwL jxNLnytXDbPJzJmfvilu7gYAXKANAYDoiVYZ2ymUnPZUfRcYG+F/2E5nX2ywQGYzz41z9X 6bl9T5AJ7gwoPCb5SKAEHprIajBLGH/vGouFU18w8opc/qC/LE86HuQE0VleZw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bg144WQznX8 for ; Wed, 22 Apr 2026 21:09:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30b84 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:09:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 8696b3a607f0 - stable/15 - brcm80211: update module Makefiles for v7.0 driver 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 8696b3a607f001739e0f290dcf5e15f420578de2 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:09:17 +0000 Message-Id: <69e938fd.30b84.547aa36c@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8696b3a607f001739e0f290dcf5e15f420578de2 commit 8696b3a607f001739e0f290dcf5e15f420578de2 Author: Bjoern A. Zeeb AuthorDate: 2026-04-19 15:17:29 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:15 +0000 brcm80211: update module Makefiles for v7.0 driver version Update LINUXKPI_VERSION to reflect that the driver is based on Linux v7.0. Sponsored by: The FreeBSD Foundation (cherry picked from commit 634a48f3673ff8af9848846a6bff1a8c068d205d) --- sys/modules/brcm80211/brcmfmac/Makefile | 2 +- sys/modules/brcm80211/brcmutil/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/modules/brcm80211/brcmfmac/Makefile b/sys/modules/brcm80211/brcmfmac/Makefile index 107914c2dc27..656556445a31 100644 --- a/sys/modules/brcm80211/brcmfmac/Makefile +++ b/sys/modules/brcm80211/brcmfmac/Makefile @@ -93,6 +93,6 @@ CFLAGS+= ${LINUXKPI_INCLUDES} #CFLAGS+= -DCONFIG_IPV6=0 CFLAGS+= -DKBUILD_MODNAME='"brcmfmac"' -CFLAGS+= -DLINUXKPI_VERSION=61900 +CFLAGS+= -DLINUXKPI_VERSION=70000 .include diff --git a/sys/modules/brcm80211/brcmutil/Makefile b/sys/modules/brcm80211/brcmutil/Makefile index 7ef89be18bf9..fe97b18aa718 100644 --- a/sys/modules/brcm80211/brcmutil/Makefile +++ b/sys/modules/brcm80211/brcmutil/Makefile @@ -23,6 +23,6 @@ CFLAGS+= ${LINUXKPI_INCLUDES} #CFLAGS+= -ferror-limit=0 CFLAGS+= -DKBUILD_MODNAME='"brcmutil"' -CFLAGS+= -DLINUXKPI_VERSION=61900 +CFLAGS+= -DLINUXKPI_VERSION=70000 .include From nobody Wed Apr 22 21:09:16 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bg11m6Yz6bLWk for ; Wed, 22 Apr 2026 21:09:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bg03qkFz3mNr for ; Wed, 22 Apr 2026 21:09:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jYHvCiAmr2l+QkpgBAIZ2vIhYl35lJ8BT3Sj7LSZ8gE=; b=pmOfdkiGcMlpjMXVem3I0wcYJss04QObcVG2smaZwd2wRnaxQLFTxI6z26hpY+srBDe4+R MkSStI12wFnsLtt2fdPpCHNjubv4gwo3pVUvbLSJELdVr+nfgtduV6dMY1olAJJ5gcFcAk ss4K0zdxZEuv3nyi8K59+x8KVKvDQkOuFmxYwXS6qEoyKn7U/r4FX4SOZgUvHGU/wlX+hc soTrdomAbvDv/03m70+nTF7XoPutcBMmOx6ZdFVCMkj4IydAZcBpZd8G2FatWFAx7nr5fn W45h8GhzBNp6yJwuFSdD6BIV53vOWBv+DNRv+tY+IqrejRIMLoid25BUrWCZHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892156; a=rsa-sha256; cv=none; b=MZdWKbf93wjluCnj4RpF61kf6ubk7kiL1cEO2nzFo5N3Q5OXkL92dElKFvtEgwJpgKW/+1 Mf4jTKNgiXE+peE4o32KYpOn1v6umTZ/ubDi4vasQ2TVGDg4p1FOaF72mNwFvLfq11xfZA KqpCfVnKXqwCJ3xdWEOYUejmLfwIa1fURIxqLKnW8diz69IupW+wl8xwU/cm8NiBXRVza8 oSPrMLq8g6BYdGAl5KCeUXdhcQag/ukRObHWBVMJmNqYRi8+IeUqpJNlScMHlSWt0/AwBz 84/1iuZ865BORi7tIgzKc3DgV/XM8oIKfatxCaC+HCz4KU+ICoKmZIveqzNeGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jYHvCiAmr2l+QkpgBAIZ2vIhYl35lJ8BT3Sj7LSZ8gE=; b=AgxnTT/cCUoY+FWCE3zuUbKJWFXoaZG1nk6oXGdiEANacyAT/PJ/zNkcz6GlqTq70KetMk VOXpvRcK8Vy1gugL3OW/tP/XlmCnacuJ7MgcFeSVibzOUC4gJaKYH+IkUWTCUF+J3U3NE+ zNTvwamKxjoor0JPv2VM5tCEyNjYPx6OEyuY0PuHF+PpaTff1x6TioB+zODsBLnCGbWkoF njuzqzNSncuCTI/i2ztOa6MtYZXoTFJq9s2f1cjUZq2kO8cWnklB9LGPSKGWpA9k9W9maT XNbMDa2ozLcwK5IcTIdinoobGD551/tLhFyNtFJ1yxn7aw2rQvcqItsc15sFdw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bg03MTZzncm for ; Wed, 22 Apr 2026 21:09:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27cbc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:09:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 0bd21f777d0d - stable/15 - brcm80211: update Broadcom wireless brcmsmac and brcmfmac drivers List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 0bd21f777d0d4013814ddd341739a8f304c81aea Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:09:16 +0000 Message-Id: <69e938fc.27cbc.57949d24@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=0bd21f777d0d4013814ddd341739a8f304c81aea commit 0bd21f777d0d4013814ddd341739a8f304c81aea Author: Bjoern A. Zeeb AuthorDate: 2026-04-19 15:16:04 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:15 +0000 brcm80211: update Broadcom wireless brcmsmac and brcmfmac drivers This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ). Sponsored by: The FreeBSD Foundation (cherry picked from commit 117d9331fedeb5c5657a796423c4f7b311f40770) --- .../dev/broadcom/brcm80211/brcmfmac/bca/core.c | 3 +-- sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcdc.c | 2 +- .../dev/broadcom/brcm80211/brcmfmac/bcmsdh.c | 13 +++++----- .../dev/broadcom/brcm80211/brcmfmac/btcoex.c | 2 +- .../dev/broadcom/brcm80211/brcmfmac/cfg80211.c | 27 ++++++++++---------- .../dev/broadcom/brcm80211/brcmfmac/cfg80211.h | 8 ++++-- sys/contrib/dev/broadcom/brcm80211/brcmfmac/chip.c | 4 +-- .../dev/broadcom/brcm80211/brcmfmac/common.c | 5 ++-- sys/contrib/dev/broadcom/brcm80211/brcmfmac/core.c | 6 ++--- .../dev/broadcom/brcm80211/brcmfmac/cyw/core.c | 3 +-- .../dev/broadcom/brcm80211/brcmfmac/firmware.c | 4 +-- .../dev/broadcom/brcm80211/brcmfmac/flowring.c | 9 +++---- sys/contrib/dev/broadcom/brcm80211/brcmfmac/fweh.c | 7 +++++- .../dev/broadcom/brcm80211/brcmfmac/fwsignal.c | 5 ++-- .../dev/broadcom/brcm80211/brcmfmac/msgbuf.c | 12 ++++----- sys/contrib/dev/broadcom/brcm80211/brcmfmac/pcie.c | 15 ++++++----- sys/contrib/dev/broadcom/brcm80211/brcmfmac/pno.c | 4 +-- .../dev/broadcom/brcm80211/brcmfmac/proto.c | 2 +- sys/contrib/dev/broadcom/brcm80211/brcmfmac/sdio.c | 9 ++++--- sys/contrib/dev/broadcom/brcm80211/brcmfmac/sdio.h | 2 +- sys/contrib/dev/broadcom/brcm80211/brcmfmac/usb.c | 6 ++--- .../dev/broadcom/brcm80211/brcmfmac/wcc/core.c | 3 +-- .../dev/broadcom/brcm80211/brcmsmac/aiutils.c | 2 +- .../dev/broadcom/brcm80211/brcmsmac/ampdu.c | 2 +- .../dev/broadcom/brcm80211/brcmsmac/antsel.c | 2 +- .../dev/broadcom/brcm80211/brcmsmac/channel.c | 2 +- sys/contrib/dev/broadcom/brcm80211/brcmsmac/dma.c | 4 +-- .../dev/broadcom/brcm80211/brcmsmac/mac80211_if.c | 2 +- sys/contrib/dev/broadcom/brcm80211/brcmsmac/main.c | 29 +++++++++++----------- .../dev/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c | 4 +-- .../dev/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c | 15 ++++------- .../dev/broadcom/brcm80211/brcmsmac/phy/phy_n.c | 3 +-- .../dev/broadcom/brcm80211/brcmsmac/phy_shim.c | 2 +- 33 files changed, 106 insertions(+), 112 deletions(-) diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bca/core.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bca/core.c index f471c962104a..6cb8343da936 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bca/core.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bca/core.c @@ -23,8 +23,7 @@ static int brcmf_bca_alloc_fweh_info(struct brcmf_pub *drvr) { struct brcmf_fweh_info *fweh; - fweh = kzalloc(struct_size(fweh, evt_handler, BRCMF_BCA_E_LAST), - GFP_KERNEL); + fweh = kzalloc_flex(*fweh, evt_handler, BRCMF_BCA_E_LAST); if (!fweh) return -ENOMEM; diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcdc.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcdc.c index 7e846cbf5157..ebf0305bf829 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcdc.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcdc.c @@ -450,7 +450,7 @@ int brcmf_proto_bcdc_attach(struct brcmf_pub *drvr) { struct brcmf_bcdc *bcdc; - bcdc = kzalloc(sizeof(*bcdc), GFP_ATOMIC); + bcdc = kzalloc_obj(*bcdc, GFP_ATOMIC); if (!bcdc) goto fail; diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcmsdh.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcmsdh.c index 6a3f187320fc..d24b80e492e0 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcmsdh.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcmsdh.c @@ -794,7 +794,7 @@ static int brcmf_sdiod_freezer_attach(struct brcmf_sdio_dev *sdiodev) if (!IS_ENABLED(CONFIG_PM_SLEEP)) return 0; - sdiodev->freezer = kzalloc(sizeof(*sdiodev->freezer), GFP_KERNEL); + sdiodev->freezer = kzalloc_obj(*sdiodev->freezer); if (!sdiodev->freezer) return -ENOMEM; atomic_set(&sdiodev->freezer->thread_count, 0); @@ -951,11 +951,10 @@ int brcmf_sdiod_probe(struct brcmf_sdio_dev *sdiodev) goto out; /* try to attach to the target device */ - sdiodev->bus = brcmf_sdio_probe(sdiodev); - if (IS_ERR(sdiodev->bus)) { - ret = PTR_ERR(sdiodev->bus); + ret = brcmf_sdio_probe(sdiodev); + if (ret) goto out; - } + brcmf_sdiod_host_fixup(sdiodev->func2->card->host); out: if (ret) @@ -1067,10 +1066,10 @@ static int brcmf_ops_sdio_probe(struct sdio_func *func, if (func->num != 2) return -ENODEV; - bus_if = kzalloc(sizeof(*bus_if), GFP_KERNEL); + bus_if = kzalloc_obj(*bus_if); if (!bus_if) return -ENOMEM; - sdiodev = kzalloc(sizeof(*sdiodev), GFP_KERNEL); + sdiodev = kzalloc_obj(*sdiodev); if (!sdiodev) { kfree(bus_if); return -ENOMEM; diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/btcoex.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/btcoex.c index 67c0c5a92f99..0ca7f8672803 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/btcoex.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/btcoex.c @@ -362,7 +362,7 @@ int brcmf_btcoex_attach(struct brcmf_cfg80211_info *cfg) struct brcmf_btcoex_info *btci; brcmf_dbg(TRACE, "enter\n"); - btci = kmalloc(sizeof(*btci), GFP_KERNEL); + btci = kmalloc_obj(*btci); if (!btci) return -ENOMEM; diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/cfg80211.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/cfg80211.c index 43afaa5249a6..85199bc59098 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -984,7 +984,7 @@ static struct wireless_dev *brcmf_mon_add_vif(struct wiphy *wiphy, ndev->type = ARPHRD_IEEE80211_RADIOTAP; ndev->ieee80211_ptr = &vif->wdev; ndev->needs_free_netdev = true; - ndev->priv_destructor = brcmf_cfg80211_free_netdev; + ndev->priv_destructor = brcmf_cfg80211_free_vif; SET_NETDEV_DEV(ndev, wiphy_dev(cfg->wiphy)); ifp = netdev_priv(ndev); @@ -2592,7 +2592,7 @@ brcmf_cfg80211_connect(struct wiphy *wiphy, struct net_device *ndev, offsetof(struct brcmf_assoc_params_le, chanspec_list); if (cfg->channel) join_params_size += sizeof(u16); - ext_join_params = kzalloc(sizeof(*ext_join_params), GFP_KERNEL); + ext_join_params = kzalloc_obj(*ext_join_params); if (ext_join_params == NULL) { err = -ENOMEM; goto done; @@ -4418,7 +4418,7 @@ brcmf_pmksa_v3_op(struct brcmf_if *ifp, struct cfg80211_pmksa *pmksa, int length = offsetof(struct brcmf_pmk_op_v3_le, pmk); int ret; - pmk_op = kzalloc(sizeof(*pmk_op), GFP_KERNEL); + pmk_op = kzalloc_obj(*pmk_op); if (!pmk_op) return -ENOMEM; @@ -5748,7 +5748,7 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, err = -EINVAL; goto exit; } - af_params = kzalloc(sizeof(*af_params), GFP_KERNEL); + af_params = kzalloc_obj(*af_params); if (af_params == NULL) { bphy_err(drvr, "unable to allocate frame\n"); err = -ENOMEM; @@ -6223,7 +6223,7 @@ struct brcmf_cfg80211_vif *brcmf_alloc_vif(struct brcmf_cfg80211_info *cfg, brcmf_dbg(TRACE, "allocating virtual interface (size=%zu)\n", sizeof(*vif)); - vif = kzalloc(sizeof(*vif), GFP_KERNEL); + vif = kzalloc_obj(*vif); if (!vif) return ERR_PTR(-ENOMEM); @@ -6255,7 +6255,7 @@ void brcmf_free_vif(struct brcmf_cfg80211_vif *vif) kfree(vif); } -void brcmf_cfg80211_free_netdev(struct net_device *ndev) +void brcmf_cfg80211_free_vif(struct net_device *ndev) { struct brcmf_cfg80211_vif *vif; struct brcmf_if *ifp; @@ -6713,7 +6713,7 @@ brcmf_notify_connect_status_ap(struct brcmf_cfg80211_info *cfg, return -EINVAL; } - sinfo = kzalloc(sizeof(*sinfo), GFP_KERNEL); + sinfo = kzalloc_obj(*sinfo); if (!sinfo) return -ENOMEM; @@ -7009,7 +7009,7 @@ static void brcmf_deinit_priv_mem(struct brcmf_cfg80211_info *cfg) static s32 brcmf_init_priv_mem(struct brcmf_cfg80211_info *cfg) { - cfg->conf = kzalloc(sizeof(*cfg->conf), GFP_KERNEL); + cfg->conf = kzalloc_obj(*cfg->conf); if (!cfg->conf) goto init_priv_mem_out; cfg->extra_buf = kzalloc(WL_EXTRA_BUF_MAX, GFP_KERNEL); @@ -7667,7 +7667,7 @@ static int brcmf_setup_ifmodes(struct wiphy *wiphy, struct brcmf_if *ifp) mchan = brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MCHAN); n_combos = 1 + !!(p2p && !rsdb) + !!mbss; - combo = kcalloc(n_combos, sizeof(*combo), GFP_KERNEL); + combo = kzalloc_objs(*combo, n_combos); if (!combo) goto err; @@ -7684,7 +7684,7 @@ static int brcmf_setup_ifmodes(struct wiphy *wiphy, struct brcmf_if *ifp) c = 0; i = 0; n_limits = 1 + mon_flag + (p2p ? 2 : 0) + (rsdb || !p2p); - c0_limits = kcalloc(n_limits, sizeof(*c0_limits), GFP_KERNEL); + c0_limits = kzalloc_objs(*c0_limits, n_limits); if (!c0_limits) goto err; @@ -7723,7 +7723,7 @@ static int brcmf_setup_ifmodes(struct wiphy *wiphy, struct brcmf_if *ifp) if (p2p && !rsdb) { c++; i = 0; - p2p_limits = kcalloc(4, sizeof(*p2p_limits), GFP_KERNEL); + p2p_limits = kzalloc_objs(*p2p_limits, 4); if (!p2p_limits) goto err; p2p_limits[i].max = 1; @@ -7744,8 +7744,7 @@ static int brcmf_setup_ifmodes(struct wiphy *wiphy, struct brcmf_if *ifp) c++; i = 0; n_limits = 1 + mon_flag; - mbss_limits = kcalloc(n_limits, sizeof(*mbss_limits), - GFP_KERNEL); + mbss_limits = kzalloc_objs(*mbss_limits, n_limits); if (!mbss_limits) goto err; mbss_limits[i].max = 4; @@ -8512,7 +8511,7 @@ struct brcmf_cfg80211_info *brcmf_cfg80211_attach(struct brcmf_pub *drvr, return NULL; } - cfg = kzalloc(sizeof(*cfg), GFP_KERNEL); + cfg = kzalloc_obj(*cfg); if (!cfg) { bphy_err(drvr, "Could not allocate wiphy device\n"); return NULL; diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/cfg80211.h b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/cfg80211.h index 273c80f2d483..6ceb30142905 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/cfg80211.h +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/cfg80211.h @@ -182,7 +182,7 @@ struct brcmf_cfg80211_profile { * @BRCMF_VIF_STATUS_CONNECTED: connected/joined successfully. * @BRCMF_VIF_STATUS_DISCONNECTING: disconnect/disable in progress. * @BRCMF_VIF_STATUS_AP_CREATED: AP operation started. - * @BRCMF_VIF_STATUS_EAP_SUCCUSS: EAPOL handshake successful. + * @BRCMF_VIF_STATUS_EAP_SUCCESS: EAPOL handshake successful. * @BRCMF_VIF_STATUS_ASSOC_SUCCESS: successful SET_SSID received. */ enum brcmf_vif_status { @@ -201,10 +201,12 @@ enum brcmf_vif_status { * @probe_req_ie: IE info for probe request. * @probe_res_ie: IE info for probe response. * @beacon_ie: IE info for beacon frame. + * @assoc_req_ie: IE info for association request frame. * @assoc_res_ie: IE info for association response frame. * @probe_req_ie_len: IE info length for probe request. * @probe_res_ie_len: IE info length for probe response. * @beacon_ie_len: IE info length for beacon frame. + * @assoc_req_ie_len: IE info length for association request frame. * @assoc_res_ie_len: IE info length for association response frame. */ struct vif_saved_ie { @@ -227,12 +229,14 @@ struct vif_saved_ie { * @wdev: wireless device. * @profile: profile information. * @sme_state: SME state using enum brcmf_vif_status bits. + * @saved_ie: saved IE info for a vif. * @list: linked list. * @mgmt_tx: completion for management frame transmit. * @mgmt_tx_status: status of last management frame sent to firmware. * @mgmt_tx_id: * @mgmt_rx_reg: registered rx mgmt frame types. * @mbss: Multiple BSS type, set if not first AP (not relevant for P2P). + * @is_11d: beacon contains country IE, enable regulatory 802.11d support * @cqm_rssi_low: Lower RSSI limit for CQM monitoring * @cqm_rssi_high: Upper RSSI limit for CQM monitoring * @cqm_rssi_last: Last RSSI reading for CQM monitoring @@ -489,7 +493,7 @@ s32 brcmf_notify_escan_complete(struct brcmf_cfg80211_info *cfg, void brcmf_set_mpc(struct brcmf_if *ndev, int mpc); bool brcmf_is_apmode_operating(struct wiphy *wiphy); void brcmf_abort_scanning(struct brcmf_cfg80211_info *cfg); -void brcmf_cfg80211_free_netdev(struct net_device *ndev); +void brcmf_cfg80211_free_vif(struct net_device *ndev); int brcmf_set_wsec(struct brcmf_if *ifp, const u8 *key, u16 key_len, u16 flags); int brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/chip.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/chip.c index 4239f2b21e54..a790f1693b82 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/chip.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/chip.c @@ -507,7 +507,7 @@ static struct brcmf_core *brcmf_chip_add_core(struct brcmf_chip_priv *ci, { struct brcmf_core_priv *core; - core = kzalloc(sizeof(*core), GFP_KERNEL); + core = kzalloc_obj(*core); if (!core) return ERR_PTR(-ENOMEM); @@ -1137,7 +1137,7 @@ struct brcmf_chip *brcmf_chip_attach(void *ctx, u16 devid, if (err < 0) return ERR_PTR(-EINVAL); - chip = kzalloc(sizeof(*chip), GFP_KERNEL); + chip = kzalloc_obj(*chip); if (!chip) return ERR_PTR(-ENOMEM); diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/common.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/common.c index 17e408b7fa23..ef16fa2747b9 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/common.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/common.c @@ -146,8 +146,7 @@ static int brcmf_c_download_blob(struct brcmf_if *ifp, brcmf_dbg(TRACE, "Enter\n"); - chunk_buf = kzalloc(struct_size(chunk_buf, data, MAX_CHUNK_LEN), - GFP_KERNEL); + chunk_buf = kzalloc_flex(*chunk_buf, data, MAX_CHUNK_LEN); if (!chunk_buf) { err = -ENOMEM; return -ENOMEM; @@ -556,7 +555,7 @@ struct brcmf_mp_device *brcmf_get_module_param(struct device *dev, brcmf_dbg(INFO, "Enter, bus=%d, chip=%d, rev=%d\n", bus_type, chip, chiprev); - settings = kzalloc(sizeof(*settings), GFP_ATOMIC); + settings = kzalloc_obj(*settings, GFP_ATOMIC); if (!settings) return NULL; diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/core.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/core.c index 862a0336a0b5..ec170647800d 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/core.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/core.c @@ -674,7 +674,7 @@ int brcmf_net_attach(struct brcmf_if *ifp, bool locked) netif_carrier_off(ndev); - ndev->priv_destructor = brcmf_cfg80211_free_netdev; + ndev->priv_destructor = brcmf_cfg80211_free_vif; brcmf_dbg(INFO, "%s: Broadcom Dongle Host Driver\n", ndev->name); return 0; @@ -692,7 +692,7 @@ void brcmf_net_detach(struct net_device *ndev, bool locked) else unregister_netdev(ndev); } else { - brcmf_cfg80211_free_netdev(ndev); + brcmf_cfg80211_free_vif(ndev); free_netdev(ndev); } } @@ -879,7 +879,7 @@ struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bsscfgidx, s32 ifidx, if (!drvr->settings->p2p_enable && is_p2pdev) { /* this is P2P_DEVICE interface */ brcmf_dbg(INFO, "allocate non-netdev interface\n"); - ifp = kzalloc(sizeof(*ifp), GFP_KERNEL); + ifp = kzalloc_obj(*ifp); if (!ifp) return ERR_PTR(-ENOMEM); } else { diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/cyw/core.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/cyw/core.c index 4f0ea4347840..ce09d44fa73c 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/cyw/core.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/cyw/core.c @@ -66,8 +66,7 @@ static int brcmf_cyw_alloc_fweh_info(struct brcmf_pub *drvr) { struct brcmf_fweh_info *fweh; - fweh = kzalloc(struct_size(fweh, evt_handler, BRCMF_CYW_E_LAST), - GFP_KERNEL); + fweh = kzalloc_flex(*fweh, evt_handler, BRCMF_CYW_E_LAST); if (!fweh) return -ENOMEM; diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/firmware.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/firmware.c index 0ad9abd67fd6..315573ba35b4 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/firmware.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/firmware.c @@ -789,7 +789,7 @@ int brcmf_fw_get_firmwares(struct device *dev, struct brcmf_fw_request *req, if (!brcmf_fw_request_is_valid(req)) return -EINVAL; - fwctx = kzalloc(sizeof(*fwctx), GFP_KERNEL); + fwctx = kzalloc_obj(*fwctx); if (!fwctx) return -ENOMEM; @@ -849,7 +849,7 @@ brcmf_fw_alloc_request(u32 chip, u32 chiprev, return NULL; } - fwreq = kzalloc(struct_size(fwreq, items, n_fwnames), GFP_KERNEL); + fwreq = kzalloc_flex(*fwreq, items, n_fwnames); if (!fwreq) return NULL; diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/flowring.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/flowring.c index 17387adb0301..d812e070003b 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/flowring.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/flowring.c @@ -161,7 +161,7 @@ u32 brcmf_flowring_create(struct brcmf_flowring *flow, u8 da[ETH_ALEN], if (i == flow->nrofrings) return -ENOMEM; - ring = kzalloc(sizeof(*ring), GFP_ATOMIC); + ring = kzalloc_obj(*ring, GFP_ATOMIC); if (!ring) return -ENOMEM; @@ -376,7 +376,7 @@ struct brcmf_flowring *brcmf_flowring_attach(struct device *dev, u16 nrofrings) struct brcmf_flowring *flow; u32 i; - flow = kzalloc(sizeof(*flow), GFP_KERNEL); + flow = kzalloc_obj(*flow); if (flow) { flow->dev = dev; flow->nrofrings = nrofrings; @@ -385,8 +385,7 @@ struct brcmf_flowring *brcmf_flowring_attach(struct device *dev, u16 nrofrings) flow->addr_mode[i] = ADDR_INDIRECT; for (i = 0; i < ARRAY_SIZE(flow->hash); i++) flow->hash[i].ifidx = BRCMF_FLOWRING_INVALID_IFIDX; - flow->rings = kcalloc(nrofrings, sizeof(*flow->rings), - GFP_KERNEL); + flow->rings = kzalloc_objs(*flow->rings, nrofrings); if (!flow->rings) { kfree(flow); flow = NULL; @@ -504,7 +503,7 @@ void brcmf_flowring_add_tdls_peer(struct brcmf_flowring *flow, int ifidx, struct brcmf_flowring_tdls_entry *tdls_entry; struct brcmf_flowring_tdls_entry *search; - tdls_entry = kzalloc(sizeof(*tdls_entry), GFP_ATOMIC); + tdls_entry = kzalloc_obj(*tdls_entry, GFP_ATOMIC); if (tdls_entry == NULL) return; diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/fweh.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/fweh.c index c2d98ee6652f..1cff4ba76943 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/fweh.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/fweh.c @@ -153,6 +153,11 @@ static void brcmf_fweh_handle_if_event(struct brcmf_pub *drvr, bphy_err(drvr, "invalid interface index: %u\n", ifevent->ifidx); return; } + if (ifevent->bsscfgidx >= BRCMF_MAX_IFS) { + bphy_err(drvr, "invalid bsscfg index: %u\n", + ifevent->bsscfgidx); + return; + } ifp = drvr->iflist[ifevent->bsscfgidx]; @@ -497,7 +502,7 @@ void brcmf_fweh_process_event(struct brcmf_pub *drvr, datalen + sizeof(*event_packet) > packet_len) return; - event = kzalloc(struct_size(event, data, datalen), gfp); + event = kzalloc_flex(*event, data, datalen, gfp); if (!event) return; diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/fwsignal.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/fwsignal.c index b70d20128f98..a43f1a38b0e3 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/fwsignal.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/fwsignal.c @@ -1712,8 +1712,7 @@ void brcmf_fws_rxreorder(struct brcmf_if *ifp, struct sk_buff *pkt) /* allocate space for flow reorder info */ brcmf_dbg(INFO, "flow-%d: start, maxidx %d\n", flow_id, max_idx); - rfi = kzalloc(struct_size(rfi, pktslots, max_idx + 1), - GFP_ATOMIC); + rfi = kzalloc_flex(*rfi, pktslots, max_idx + 1, GFP_ATOMIC); if (rfi == NULL) { bphy_err(drvr, "failed to alloc buffer\n"); brcmf_netif_rx(ifp, pkt); @@ -2343,7 +2342,7 @@ struct brcmf_fws_info *brcmf_fws_attach(struct brcmf_pub *drvr) int rc; u32 mode; - fws = kzalloc(sizeof(*fws), GFP_KERNEL); + fws = kzalloc_obj(*fws); if (!fws) { rc = -ENOMEM; goto fail; diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/msgbuf.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/msgbuf.c index 1b7b3454a9be..2d4942e22844 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/msgbuf.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/msgbuf.c @@ -305,11 +305,11 @@ brcmf_msgbuf_init_pktids(u32 nr_array_entries, struct brcmf_msgbuf_pktid *array; struct brcmf_msgbuf_pktids *pktids; - array = kcalloc(nr_array_entries, sizeof(*array), GFP_KERNEL); + array = kzalloc_objs(*array, nr_array_entries); if (!array) return NULL; - pktids = kzalloc(sizeof(*pktids), GFP_KERNEL); + pktids = kzalloc_obj(*pktids); if (!pktids) { kfree(array); return NULL; @@ -680,7 +680,7 @@ static u32 brcmf_msgbuf_flowring_create(struct brcmf_msgbuf *msgbuf, int ifidx, u32 flowid; ulong flags; - create = kzalloc(sizeof(*create), GFP_ATOMIC); + create = kzalloc_obj(*create, GFP_ATOMIC); if (create == NULL) return BRCMF_FLOWRING_INVALID_ID; @@ -1569,7 +1569,7 @@ int brcmf_proto_msgbuf_attach(struct brcmf_pub *drvr) if_msgbuf->max_flowrings = BRCMF_FLOWRING_HASHSIZE - 1; } - msgbuf = kzalloc(sizeof(*msgbuf), GFP_KERNEL); + msgbuf = kzalloc_obj(*msgbuf); if (!msgbuf) goto fail; @@ -1618,8 +1618,8 @@ int brcmf_proto_msgbuf_attach(struct brcmf_pub *drvr) msgbuf->flowrings = (struct brcmf_commonring **)if_msgbuf->flowrings; msgbuf->max_flowrings = if_msgbuf->max_flowrings; msgbuf->flowring_dma_handle = - kcalloc(msgbuf->max_flowrings, - sizeof(*msgbuf->flowring_dma_handle), GFP_KERNEL); + kzalloc_objs(*msgbuf->flowring_dma_handle, + msgbuf->max_flowrings); if (!msgbuf->flowring_dma_handle) goto fail; diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/pcie.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/pcie.c index a759401ecf86..b9846c3fcc99 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/pcie.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/pcie.c @@ -1227,7 +1227,7 @@ brcmf_pcie_alloc_dma_and_ring(struct brcmf_pciedev_info *devinfo, u32 ring_id, addr = tcm_ring_phys_addr + BRCMF_RING_LEN_ITEMS_OFFSET; brcmf_pcie_write_tcm16(devinfo, addr, ring_itemsize_array[ring_id]); - ring = kzalloc(sizeof(*ring), GFP_KERNEL); + ring = kzalloc_obj(*ring); if (!ring) { dma_free_coherent(&devinfo->pdev->dev, size, dma_buf, dma_handle); @@ -1427,7 +1427,7 @@ static int brcmf_pcie_init_ringbuffers(struct brcmf_pciedev_info *devinfo) devinfo->shared.max_flowrings = max_flowrings; devinfo->shared.max_submissionrings = max_submissionrings; devinfo->shared.max_completionrings = max_completionrings; - rings = kcalloc(max_flowrings, sizeof(*ring), GFP_KERNEL); + rings = kzalloc_objs(*ring, max_flowrings); if (!rings) goto fail; @@ -2316,8 +2316,7 @@ static void brcmf_pcie_setup(struct device *dev, int ret, bus->msgbuf->commonrings[i] = &devinfo->shared.commonrings[i]->commonring; - flowrings = kcalloc(devinfo->shared.max_flowrings, sizeof(*flowrings), - GFP_KERNEL); + flowrings = kzalloc_objs(*flowrings, devinfo->shared.max_flowrings); if (!flowrings) goto fail; @@ -2574,7 +2573,7 @@ brcmf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id) brcmf_dbg(PCIE, "Enter %x:%x\n", pdev->vendor, pdev->device); ret = -ENOMEM; - devinfo = kzalloc(sizeof(*devinfo), GFP_KERNEL); + devinfo = kzalloc_obj(*devinfo); if (devinfo == NULL) return ret; @@ -2594,7 +2593,7 @@ brcmf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id) else devinfo->reginfo = &brcmf_reginfo_default; - pcie_bus_dev = kzalloc(sizeof(*pcie_bus_dev), GFP_KERNEL); + pcie_bus_dev = kzalloc_obj(*pcie_bus_dev); if (pcie_bus_dev == NULL) { ret = -ENOMEM; goto fail; @@ -2612,12 +2611,12 @@ brcmf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id) if (ret < 0) goto fail; - bus = kzalloc(sizeof(*bus), GFP_KERNEL); + bus = kzalloc_obj(*bus); if (!bus) { ret = -ENOMEM; goto fail; } - bus->msgbuf = kzalloc(sizeof(*bus->msgbuf), GFP_KERNEL); + bus->msgbuf = kzalloc_obj(*bus->msgbuf); if (!bus->msgbuf) { ret = -ENOMEM; kfree(bus); diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/pno.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/pno.c index 3d5fc69a98fd..cdf3c7740ae4 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/pno.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/pno.c @@ -334,7 +334,7 @@ static int brcmf_pno_prep_fwconfig(struct brcmf_pno_info *pi, } *buckets = NULL; - fw_buckets = kcalloc(pi->n_reqs, sizeof(*fw_buckets), GFP_KERNEL); + fw_buckets = kzalloc_objs(*fw_buckets, pi->n_reqs); if (!fw_buckets) return -ENOMEM; @@ -538,7 +538,7 @@ int brcmf_pno_attach(struct brcmf_cfg80211_info *cfg) struct brcmf_pno_info *pi; brcmf_dbg(TRACE, "enter\n"); - pi = kzalloc(sizeof(*pi), GFP_KERNEL); + pi = kzalloc_obj(*pi); if (!pi) return -ENOMEM; diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/proto.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/proto.c index 2e911d4874af..7fc441859f52 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/proto.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/proto.c @@ -23,7 +23,7 @@ int brcmf_proto_attach(struct brcmf_pub *drvr) brcmf_dbg(TRACE, "Enter\n"); - proto = kzalloc(sizeof(*proto), GFP_ATOMIC); + proto = kzalloc_obj(*proto, GFP_ATOMIC); if (!proto) goto fail; diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/sdio.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/sdio.c index 8cf9d7e7c3f7..30f6fcb68632 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/sdio.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/sdio.c @@ -4445,7 +4445,7 @@ brcmf_sdio_prepare_fw_request(struct brcmf_sdio *bus) return fwreq; } -struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev) +int brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev) { int ret; struct brcmf_sdio *bus; @@ -4455,7 +4455,7 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev) brcmf_dbg(TRACE, "Enter\n"); /* Allocate private bus interface state */ - bus = kzalloc(sizeof(*bus), GFP_ATOMIC); + bus = kzalloc_obj(*bus, GFP_ATOMIC); if (!bus) { ret = -ENOMEM; goto fail; @@ -4551,11 +4551,12 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev) goto fail; } - return bus; + return 0; fail: brcmf_sdio_remove(bus); - return ERR_PTR(ret); + sdiodev->bus = NULL; + return ret; } /* Detach and free everything */ diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/sdio.h b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/sdio.h index 0d18ed15b403..80180d5c6c87 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/sdio.h +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/sdio.h @@ -358,7 +358,7 @@ void brcmf_sdiod_freezer_uncount(struct brcmf_sdio_dev *sdiodev); int brcmf_sdiod_probe(struct brcmf_sdio_dev *sdiodev); int brcmf_sdiod_remove(struct brcmf_sdio_dev *sdiodev); -struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev); +int brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev); void brcmf_sdio_remove(struct brcmf_sdio *bus); void brcmf_sdio_isr(struct brcmf_sdio *bus, bool in_isr); diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/usb.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/usb.c index 46b7cf4380e6..7e8122795afb 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/usb.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/usb.c @@ -439,7 +439,7 @@ brcmf_usbdev_qinit(struct list_head *q, int qsize) int i; struct brcmf_usbreq *req, *reqs; - reqs = kcalloc(qsize, sizeof(struct brcmf_usbreq), GFP_ATOMIC); + reqs = kzalloc_objs(struct brcmf_usbreq, qsize, GFP_ATOMIC); if (reqs == NULL) return NULL; @@ -1303,7 +1303,7 @@ static int brcmf_usb_probe_cb(struct brcmf_usbdev_info *devinfo, if (!bus_pub) return -ENODEV; - bus = kzalloc(sizeof(*bus), GFP_ATOMIC); + bus = kzalloc_obj(*bus, GFP_ATOMIC); if (!bus) { ret = -ENOMEM; goto fail; @@ -1407,7 +1407,7 @@ brcmf_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) brcmf_dbg(USB, "Enter 0x%04x:0x%04x\n", id->idVendor, id->idProduct); - devinfo = kzalloc(sizeof(*devinfo), GFP_ATOMIC); + devinfo = kzalloc_obj(*devinfo, GFP_ATOMIC); if (devinfo == NULL) return -ENOMEM; diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/wcc/core.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/wcc/core.c index 05d7c2a4fba5..e14b5530f720 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/wcc/core.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/wcc/core.c @@ -24,8 +24,7 @@ static int brcmf_wcc_alloc_fweh_info(struct brcmf_pub *drvr) { struct brcmf_fweh_info *fweh; - fweh = kzalloc(struct_size(fweh, evt_handler, BRCMF_WCC_E_LAST), - GFP_KERNEL); + fweh = kzalloc_flex(*fweh, evt_handler, BRCMF_WCC_E_LAST); if (!fweh) return -ENOMEM; diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmsmac/aiutils.c b/sys/contrib/dev/broadcom/brcm80211/brcmsmac/aiutils.c index 0cb64fc56783..6a67db07833e 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmsmac/aiutils.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmsmac/aiutils.c @@ -512,7 +512,7 @@ ai_attach(struct bcma_bus *pbus) struct si_info *sii; /* alloc struct si_info */ - sii = kzalloc(sizeof(*sii), GFP_ATOMIC); + sii = kzalloc_obj(*sii, GFP_ATOMIC); if (sii == NULL) return NULL; diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmsmac/ampdu.c b/sys/contrib/dev/broadcom/brcm80211/brcmsmac/ampdu.c index e1d707a7c964..fc7a5dd2e5d8 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmsmac/ampdu.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmsmac/ampdu.c @@ -219,7 +219,7 @@ struct ampdu_info *brcms_c_ampdu_attach(struct brcms_c_info *wlc) struct ampdu_info *ampdu; int i; - ampdu = kzalloc(sizeof(*ampdu), GFP_ATOMIC); + ampdu = kzalloc_obj(*ampdu, GFP_ATOMIC); if (!ampdu) return NULL; diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmsmac/antsel.c b/sys/contrib/dev/broadcom/brcm80211/brcmsmac/antsel.c index f411bc6d795d..9a3e40528ff7 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmsmac/antsel.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmsmac/antsel.c @@ -111,7 +111,7 @@ struct antsel_info *brcms_c_antsel_attach(struct brcms_c_info *wlc) struct antsel_info *asi; struct ssb_sprom *sprom = &wlc->hw->d11core->bus->sprom; - asi = kzalloc(sizeof(*asi), GFP_ATOMIC); + asi = kzalloc_obj(*asi, GFP_ATOMIC); if (!asi) return NULL; diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmsmac/channel.c b/sys/contrib/dev/broadcom/brcm80211/brcmsmac/channel.c index 3878c4124e25..cdfe8635c012 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmsmac/channel.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmsmac/channel.c @@ -331,7 +331,7 @@ struct brcms_cm_info *brcms_c_channel_mgr_attach(struct brcms_c_info *wlc) const char *ccode = sprom->alpha2; int ccode_len = sizeof(sprom->alpha2); - wlc_cm = kzalloc(sizeof(*wlc_cm), GFP_ATOMIC); + wlc_cm = kzalloc_obj(*wlc_cm, GFP_ATOMIC); if (wlc_cm == NULL) return NULL; wlc_cm->pub = pub; diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmsmac/dma.c b/sys/contrib/dev/broadcom/brcm80211/brcmsmac/dma.c index c739bf7463b3..a329c20e92fb 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmsmac/dma.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmsmac/dma.c @@ -483,7 +483,7 @@ static void *dma_ringalloc(struct dma_info *di, u32 boundary, uint size, if (((desc_strtaddr + size - 1) & boundary) != (desc_strtaddr & boundary)) { *alignbits = dma_align_sizetobits(size); - dma_free_coherent(di->dmadev, size, va, *descpa); + dma_free_coherent(di->dmadev, *alloced, va, *descpa); va = dma_alloc_consistent(di, size, *alignbits, alloced, descpa); } @@ -558,7 +558,7 @@ struct dma_pub *dma_attach(char *name, struct brcms_c_info *wlc, struct si_info *sii = container_of(sih, struct si_info, pub); /* allocate private info structure */ - di = kzalloc(sizeof(*di), GFP_ATOMIC); + di = kzalloc_obj(*di, GFP_ATOMIC); if (di == NULL) return NULL; diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmsmac/mac80211_if.c b/sys/contrib/dev/broadcom/brcm80211/brcmsmac/mac80211_if.c index aadcff1e2b5d..6255d673d2d3 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmsmac/mac80211_if.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmsmac/mac80211_if.c @@ -1499,7 +1499,7 @@ struct brcms_timer *brcms_init_timer(struct brcms_info *wl, { struct brcms_timer *t; - t = kzalloc(sizeof(*t), GFP_ATOMIC); + t = kzalloc_obj(*t, GFP_ATOMIC); if (!t) return NULL; diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmsmac/main.c b/sys/contrib/dev/broadcom/brcm80211/brcmsmac/main.c index c1a9c1e442ee..c7eaf160e1fa 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmsmac/main.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmsmac/main.c @@ -457,11 +457,11 @@ static struct brcms_bss_cfg *brcms_c_bsscfg_malloc(uint unit) { struct brcms_bss_cfg *cfg; - cfg = kzalloc(sizeof(*cfg), GFP_ATOMIC); + cfg = kzalloc_obj(*cfg, GFP_ATOMIC); if (cfg == NULL) goto fail; - cfg->current_bss = kzalloc(sizeof(*cfg->current_bss), GFP_ATOMIC); + cfg->current_bss = kzalloc_obj(*cfg->current_bss, GFP_ATOMIC); if (cfg->current_bss == NULL) goto fail; @@ -477,14 +477,14 @@ brcms_c_attach_malloc(uint unit, uint *err, uint devid) { struct brcms_c_info *wlc; - wlc = kzalloc(sizeof(*wlc), GFP_ATOMIC); + wlc = kzalloc_obj(*wlc, GFP_ATOMIC); if (wlc == NULL) { *err = 1002; goto fail; } /* allocate struct brcms_c_pub state structure */ - wlc->pub = kzalloc(sizeof(*wlc->pub), GFP_ATOMIC); + wlc->pub = kzalloc_obj(*wlc->pub, GFP_ATOMIC); if (wlc->pub == NULL) { *err = 1003; goto fail; @@ -493,7 +493,7 @@ brcms_c_attach_malloc(uint unit, uint *err, uint devid) /* allocate struct brcms_hardware state structure */ - wlc->hw = kzalloc(sizeof(*wlc->hw), GFP_ATOMIC); + wlc->hw = kzalloc_obj(*wlc->hw, GFP_ATOMIC); if (wlc->hw == NULL) { *err = 1005; goto fail; @@ -501,7 +501,7 @@ brcms_c_attach_malloc(uint unit, uint *err, uint devid) wlc->hw->wlc = wlc; wlc->hw->bandstate[0] = - kcalloc(MAXBANDS, sizeof(struct brcms_hw_band), GFP_ATOMIC); + kzalloc_objs(struct brcms_hw_band, MAXBANDS, GFP_ATOMIC); if (wlc->hw->bandstate[0] == NULL) { *err = 1006; goto fail; @@ -515,14 +515,13 @@ brcms_c_attach_malloc(uint unit, uint *err, uint devid) } wlc->modulecb = - kcalloc(BRCMS_MAXMODULES, sizeof(struct modulecb), - GFP_ATOMIC); + kzalloc_objs(struct modulecb, BRCMS_MAXMODULES, GFP_ATOMIC); if (wlc->modulecb == NULL) { *err = 1009; goto fail; } - wlc->default_bss = kzalloc(sizeof(*wlc->default_bss), GFP_ATOMIC); + wlc->default_bss = kzalloc_obj(*wlc->default_bss, GFP_ATOMIC); if (wlc->default_bss == NULL) { *err = 1010; goto fail; @@ -534,20 +533,20 @@ brcms_c_attach_malloc(uint unit, uint *err, uint devid) goto fail; } - wlc->protection = kzalloc(sizeof(*wlc->protection), GFP_ATOMIC); + wlc->protection = kzalloc_obj(*wlc->protection, GFP_ATOMIC); if (wlc->protection == NULL) { *err = 1016; goto fail; } - wlc->stf = kzalloc(sizeof(*wlc->stf), GFP_ATOMIC); + wlc->stf = kzalloc_obj(*wlc->stf, GFP_ATOMIC); if (wlc->stf == NULL) { *err = 1017; goto fail; } wlc->bandstate[0] = - kcalloc(MAXBANDS, sizeof(*wlc->bandstate[0]), GFP_ATOMIC); + kzalloc_objs(*wlc->bandstate[0], MAXBANDS, GFP_ATOMIC); if (wlc->bandstate[0] == NULL) { *err = 1025; goto fail; @@ -560,14 +559,14 @@ brcms_c_attach_malloc(uint unit, uint *err, uint devid) + (sizeof(struct brcms_band)*i)); } - wlc->corestate = kzalloc(sizeof(*wlc->corestate), GFP_ATOMIC); + wlc->corestate = kzalloc_obj(*wlc->corestate, GFP_ATOMIC); if (wlc->corestate == NULL) { *err = 1026; goto fail; } - wlc->corestate->macstat_snapshot = - kzalloc(sizeof(*wlc->corestate->macstat_snapshot), GFP_ATOMIC); + wlc->corestate->macstat_snapshot = kzalloc_obj(*wlc->corestate->macstat_snapshot, + GFP_ATOMIC); if (wlc->corestate->macstat_snapshot == NULL) { *err = 1027; goto fail; diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c b/sys/contrib/dev/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c index ce6ce2dea39c..7eae73ef7e94 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c @@ -333,7 +333,7 @@ struct shared_phy *wlc_phy_shared_attach(struct shared_phy_params *shp) { struct shared_phy *sh; - sh = kzalloc(sizeof(*sh), GFP_ATOMIC); + sh = kzalloc_obj(*sh, GFP_ATOMIC); if (sh == NULL) return NULL; @@ -420,7 +420,7 @@ wlc_phy_attach(struct shared_phy *sh, struct bcma_device *d11core, return &pi->pubpi_ro; } - pi = kzalloc(sizeof(*pi), GFP_ATOMIC); + pi = kzalloc_obj(*pi, GFP_ATOMIC); if (pi == NULL) return NULL; pi->wiphy = wiphy; diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c b/sys/contrib/dev/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c index b4bba67a45ec..8cec5ad79fda 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c @@ -1319,7 +1319,7 @@ wlc_lcnphy_rx_iq_cal(struct brcms_phy *pi, s16 *ptr; struct brcms_phy_lcnphy *pi_lcn = pi->u.pi_lcnphy; - ptr = kmalloc_array(131, sizeof(s16), GFP_ATOMIC); + ptr = kmalloc_objs(s16, 131, GFP_ATOMIC); if (NULL == ptr) return false; if (module == 2) { @@ -3605,7 +3605,7 @@ wlc_lcnphy_a1(struct brcms_phy *pi, int cal_type, int num_levels, u16 *phy_c32; *** 73 LINES SKIPPED *** From nobody Wed Apr 22 21:09:20 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bg55DNlz6bLJK for ; Wed, 22 Apr 2026 21:09:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bg534p9z3mMJ for ; Wed, 22 Apr 2026 21:09:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=03z+f40iu0Y1PG2E3q97N8D2teuXVm8Xyo9kQ2CsRMI=; b=LjpoXJ7Apq9YkJMH0YLQduam5gY7QKyXEWXrxrQ480XtS4OptzGWbZl2bZfeDUnJosourt Nl/t2ph/DtEyiUogvbJgJeacEXy48ZVhtk9MwbPyDFxFBPzlciAsywjjoy16hAkQ7vJ7Uo WL0WQZOm6KPjb2Ayc5p/zzBbwuoUBO/9QAPtMYXAh33bfb7tyozwZ+MEkjwts/6o/0Q3Yu IbUxHERoE8n+IoamlSD45z8Zj+Ze2cqXndHNTn2U+g9xiJFp7Q+rCFz/5EuNSyQPGMz1yd XrZO/ulLgggOXwTQKqiTpqIErMDgLWDwEutUy5lncD8D/Wz+rd2WYTPnj4g0ZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892161; a=rsa-sha256; cv=none; b=C7iQTx+vdRSQFWiW5o2BXS76ccPTlfBXObq+e7D75Mok2Q24alO2lztg5e7ipFETGcWN8S MScobHQEB8n7ozZ+W4wNDt3yLD80r2kfyCALB2StqxW6C8alBptlieRThG/IiQcY4PDHD6 hL+qCoZrPdTYKDQPWzG5LbbZFBOJjmM2wQ95Yj5Km6G9GHm1/18kXp/ZD0EhDGs7pobvhn u/7LAopJTbFGo4pbpa+IFLcj0eoNQxUL0L+BfOmvMIH0UkMz9selZ7maIBcxGqVsCQOTxh yi3yJlG8S9Sy0svswfwd6BIvPbLV+ANU0IGjFL3HuWiB9nOXz3sWsYcncwdaBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=03z+f40iu0Y1PG2E3q97N8D2teuXVm8Xyo9kQ2CsRMI=; b=nx+1Z1n4z9KWOV+xEfEv8fzzIsQ2nrQXQwHV90RAmNXAGeLYT03sOkclpkgBVoZ1W0QQAV dQFmFSxVjzt4DevnsX5N4YZS2crkPh8LiF2tWexVGDwsiKWEUo+Qcz3cBWYZnT/5mcvnB4 opvFtORlI6Bx2KJReVFrTcRv1HYTMEQ616/sVSz9PIirCbF2yydAlVuepZztOsUjHICnSn 45Wk5pa3EsUE45UllcuOAA6bmSAe5NCaHhaa2LkVRbODn1tBvFLEAJjctbE/hI2ukKSMGK jBSti2ws0kLHhF0Mil13JGtAdKDPxKMnpzHt6reIX636xmEyovE3TsNVerbbAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bg52SBVznjp for ; Wed, 22 Apr 2026 21:09:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30d00 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:09:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: bbfa2e7345fe - stable/15 - ath12k: update Atheros/QCA's ath12k driver List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: bbfa2e7345fe1cbe45b0b623d5f8b24db04d5fa7 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:09:20 +0000 Message-Id: <69e93900.30d00.a6470c7@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=bbfa2e7345fe1cbe45b0b623d5f8b24db04d5fa7 commit bbfa2e7345fe1cbe45b0b623d5f8b24db04d5fa7 Author: Bjoern A. Zeeb AuthorDate: 2026-04-19 15:38:33 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:16 +0000 ath12k: update Atheros/QCA's ath12k driver This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ). Sponsored by: The FreeBSD Foundation (cherry picked from commit 60bac4d6438b6bcb3d7b439684211d05396d90ce) --- sys/contrib/dev/athk/ath12k/Makefile | 8 +- sys/contrib/dev/athk/ath12k/ahb.c | 165 +- sys/contrib/dev/athk/ath12k/ahb.h | 31 +- sys/contrib/dev/athk/ath12k/ce.c | 328 +- sys/contrib/dev/athk/ath12k/ce.h | 7 +- sys/contrib/dev/athk/ath12k/cmn_defs.h | 20 + sys/contrib/dev/athk/ath12k/core.c | 77 +- sys/contrib/dev/athk/ath12k/core.h | 209 +- sys/contrib/dev/athk/ath12k/dbring.c | 6 +- sys/contrib/dev/athk/ath12k/debug.c | 8 +- sys/contrib/dev/athk/ath12k/debugfs.c | 8 +- sys/contrib/dev/athk/ath12k/debugfs_htt_stats.c | 197 +- sys/contrib/dev/athk/ath12k/debugfs_htt_stats.h | 85 +- sys/contrib/dev/athk/ath12k/debugfs_sta.c | 62 +- sys/contrib/dev/athk/ath12k/dp.c | 586 +--- sys/contrib/dev/athk/ath12k/dp.h | 1746 ++-------- sys/contrib/dev/athk/ath12k/dp_cmn.h | 106 + sys/contrib/dev/athk/ath12k/dp_htt.c | 1353 +++++++ sys/contrib/dev/athk/ath12k/dp_htt.h | 1546 ++++++++ sys/contrib/dev/athk/ath12k/dp_mon.c | 3685 +------------------- sys/contrib/dev/athk/ath12k/dp_mon.h | 58 +- sys/contrib/dev/athk/ath12k/dp_peer.c | 690 ++++ sys/contrib/dev/athk/ath12k/dp_peer.h | 182 + sys/contrib/dev/athk/ath12k/dp_rx.c | 3544 ++----------------- sys/contrib/dev/athk/ath12k/dp_rx.h | 191 +- sys/contrib/dev/athk/ath12k/dp_tx.c | 1634 +-------- sys/contrib/dev/athk/ath12k/dp_tx.h | 39 +- sys/contrib/dev/athk/ath12k/fw.c | 10 +- sys/contrib/dev/athk/ath12k/fw.h | 3 +- sys/contrib/dev/athk/ath12k/hal.c | 2147 +----------- sys/contrib/dev/athk/ath12k/hal.h | 1523 +++++--- sys/contrib/dev/athk/ath12k/htc.c | 3 +- sys/contrib/dev/athk/ath12k/hw.c | 1680 --------- sys/contrib/dev/athk/ath12k/hw.h | 96 +- sys/contrib/dev/athk/ath12k/mac.c | 1294 ++++--- sys/contrib/dev/athk/ath12k/mac.h | 142 +- sys/contrib/dev/athk/ath12k/mhi.c | 134 +- sys/contrib/dev/athk/ath12k/mhi.h | 5 +- sys/contrib/dev/athk/ath12k/pci.c | 261 +- sys/contrib/dev/athk/ath12k/pci.h | 49 +- sys/contrib/dev/athk/ath12k/peer.c | 453 +-- sys/contrib/dev/athk/ath12k/peer.h | 112 +- sys/contrib/dev/athk/ath12k/qmi.c | 192 +- sys/contrib/dev/athk/ath12k/qmi.h | 16 + sys/contrib/dev/athk/ath12k/reg.c | 2 +- sys/contrib/dev/athk/ath12k/testmode.c | 3 +- sys/contrib/dev/athk/ath12k/wifi7/Makefile | 20 + sys/contrib/dev/athk/ath12k/wifi7/ahb.c | 75 + sys/contrib/dev/athk/ath12k/wifi7/ahb.h | 20 + sys/contrib/dev/athk/ath12k/wifi7/ce.c | 973 ++++++ sys/contrib/dev/athk/ath12k/wifi7/ce.h | 22 + sys/contrib/dev/athk/ath12k/wifi7/core.c | 68 + sys/contrib/dev/athk/ath12k/wifi7/core.h | 11 + sys/contrib/dev/athk/ath12k/wifi7/dp.c | 181 + sys/contrib/dev/athk/ath12k/wifi7/dp.h | 20 + sys/contrib/dev/athk/ath12k/wifi7/dp_mon.c | 3385 ++++++++++++++++++ sys/contrib/dev/athk/ath12k/wifi7/dp_mon.h | 23 + sys/contrib/dev/athk/ath12k/wifi7/dp_rx.c | 2246 ++++++++++++ sys/contrib/dev/athk/ath12k/wifi7/dp_rx.h | 60 + sys/contrib/dev/athk/ath12k/wifi7/dp_tx.c | 978 ++++++ sys/contrib/dev/athk/ath12k/wifi7/dp_tx.h | 16 + sys/contrib/dev/athk/ath12k/wifi7/hal.c | 713 ++++ sys/contrib/dev/athk/ath12k/wifi7/hal.h | 561 +++ sys/contrib/dev/athk/ath12k/{ => wifi7}/hal_desc.h | 331 +- sys/contrib/dev/athk/ath12k/wifi7/hal_qcc2072.c | 503 +++ sys/contrib/dev/athk/ath12k/wifi7/hal_qcc2072.h | 13 + sys/contrib/dev/athk/ath12k/wifi7/hal_qcn9274.c | 1038 ++++++ sys/contrib/dev/athk/ath12k/wifi7/hal_qcn9274.h | 45 + sys/contrib/dev/athk/ath12k/{ => wifi7}/hal_rx.c | 284 +- sys/contrib/dev/athk/ath12k/{ => wifi7}/hal_rx.h | 424 +-- .../athk/ath12k/{rx_desc.h => wifi7/hal_rx_desc.h} | 72 +- sys/contrib/dev/athk/ath12k/{ => wifi7}/hal_tx.c | 23 +- sys/contrib/dev/athk/ath12k/{ => wifi7}/hal_tx.h | 30 +- sys/contrib/dev/athk/ath12k/wifi7/hal_wcn7850.c | 809 +++++ sys/contrib/dev/athk/ath12k/wifi7/hal_wcn7850.h | 40 + sys/contrib/dev/athk/ath12k/wifi7/hw.c | 1049 ++++++ sys/contrib/dev/athk/ath12k/wifi7/hw.h | 13 + sys/contrib/dev/athk/ath12k/wifi7/mhi.c | 134 + sys/contrib/dev/athk/ath12k/wifi7/mhi.h | 11 + sys/contrib/dev/athk/ath12k/wifi7/pci.c | 215 ++ sys/contrib/dev/athk/ath12k/wifi7/pci.h | 12 + sys/contrib/dev/athk/ath12k/wifi7/wmi.c | 110 + sys/contrib/dev/athk/ath12k/wifi7/wmi.h | 15 + sys/contrib/dev/athk/ath12k/wmi.c | 383 +- sys/contrib/dev/athk/ath12k/wmi.h | 61 +- sys/contrib/dev/athk/ath12k/wow.c | 27 +- 86 files changed, 22058 insertions(+), 17652 deletions(-) diff --git a/sys/contrib/dev/athk/ath12k/Makefile b/sys/contrib/dev/athk/ath12k/Makefile index d95ee525a6cd..3ba1236956cc 100644 --- a/sys/contrib/dev/athk/ath12k/Makefile +++ b/sys/contrib/dev/athk/ath12k/Makefile @@ -2,8 +2,6 @@ obj-$(CONFIG_ATH12K) += ath12k.o ath12k-y += core.o \ hal.o \ - hal_tx.o \ - hal_rx.o \ wmi.o \ mac.o \ reg.o \ @@ -12,11 +10,12 @@ ath12k-y += core.o \ dp.o \ dp_tx.o \ dp_rx.o \ + dp_htt.o \ + dp_peer.o \ debug.o \ ce.o \ peer.o \ dbring.o \ - hw.o \ mhi.o \ pci.o \ dp_mon.o \ @@ -24,6 +23,9 @@ ath12k-y += core.o \ p2p.o ath12k-$(CONFIG_ATH12K_AHB) += ahb.o + +obj-$(CONFIG_ATH12K) += wifi7/ + ath12k-$(CONFIG_ATH12K_DEBUGFS) += debugfs.o debugfs_htt_stats.o debugfs_sta.o ath12k-$(CONFIG_ACPI) += acpi.o ath12k-$(CONFIG_ATH12K_TRACING) += trace.o diff --git a/sys/contrib/dev/athk/ath12k/ahb.c b/sys/contrib/dev/athk/ath12k/ahb.c index b30527c402f6..9a4d34e49104 100644 --- a/sys/contrib/dev/athk/ath12k/ahb.c +++ b/sys/contrib/dev/athk/ath12k/ahb.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. - * Copyright (c) 2022-2025 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ #include @@ -16,18 +16,11 @@ #include "debug.h" #include "hif.h" -static const struct of_device_id ath12k_ahb_of_match[] = { - { .compatible = "qcom,ipq5332-wifi", - .data = (void *)ATH12K_HW_IPQ5332_HW10, - }, - { } -}; - -MODULE_DEVICE_TABLE(of, ath12k_ahb_of_match); - #define ATH12K_IRQ_CE0_OFFSET 4 #define ATH12K_MAX_UPDS 1 #define ATH12K_UPD_IRQ_WRD_LEN 18 + +static struct ath12k_ahb_driver *ath12k_ahb_family_drivers[ATH12K_DEVICE_FAMILY_MAX]; static const char ath12k_userpd_irq[][9] = {"spawn", "ready", "stop-ack"}; @@ -130,7 +123,7 @@ enum ext_irq_num { static u32 ath12k_ahb_read32(struct ath12k_base *ab, u32 offset) { - if (ab->ce_remap && offset < HAL_SEQ_WCSS_CMEM_OFFSET) + if (ab->ce_remap && offset < ab->cmem_offset) return ioread32(ab->mem_ce + offset); return ioread32(ab->mem + offset); } @@ -138,7 +131,7 @@ static u32 ath12k_ahb_read32(struct ath12k_base *ab, u32 offset) static void ath12k_ahb_write32(struct ath12k_base *ab, u32 offset, u32 value) { - if (ab->ce_remap && offset < HAL_SEQ_WCSS_CMEM_OFFSET) + if (ab->ce_remap && offset < ab->cmem_offset) iowrite32(value, ab->mem_ce + offset); else iowrite32(value, ab->mem + offset); @@ -531,9 +524,10 @@ static int ath12k_ahb_ext_grp_napi_poll(struct napi_struct *napi, int budget) struct ath12k_ext_irq_grp, napi); struct ath12k_base *ab = irq_grp->ab; + struct ath12k_dp *dp = ath12k_ab_to_dp(ab); int work_done; - work_done = ath12k_dp_service_srng(ab, irq_grp, budget); + work_done = ath12k_dp_service_srng(dp, irq_grp, budget); if (work_done < budget) { napi_complete_done(napi, work_done); ath12k_ahb_ext_grp_enable(irq_grp); @@ -563,12 +557,10 @@ static int ath12k_ahb_config_ext_irq(struct ath12k_base *ab) { const struct ath12k_hw_ring_mask *ring_mask; struct ath12k_ext_irq_grp *irq_grp; - const struct hal_ops *hal_ops; int i, j, irq, irq_idx, ret; u32 num_irq; ring_mask = ab->hw_params->ring_mask; - hal_ops = ab->hw_params->hal_ops; for (i = 0; i < ATH12K_EXT_IRQ_GRP_NUM_MAX; i++) { irq_grp = &ab->ext_irq_grp[i]; num_irq = 0; @@ -588,7 +580,7 @@ static int ath12k_ahb_config_ext_irq(struct ath12k_base *ab) * tcl_to_wbm_rbm_map point to the same ring number. */ if (ring_mask->tx[i] & - BIT(hal_ops->tcl_to_wbm_rbm_map[j].wbm_ring_num)) { + BIT(ab->hal.tcl_to_wbm_rbm_map[j].wbm_ring_num)) { irq_grp->irqs[num_irq++] = wbm2host_tx_completions_ring1 - j; } @@ -698,7 +690,7 @@ static int ath12k_ahb_map_service_to_pipe(struct ath12k_base *ab, u16 service_id return 0; } -static const struct ath12k_hif_ops ath12k_ahb_hif_ops_ipq5332 = { +static const struct ath12k_hif_ops ath12k_ahb_hif_ops = { .start = ath12k_ahb_start, .stop = ath12k_ahb_stop, .read32 = ath12k_ahb_read32, @@ -935,7 +927,8 @@ static int ath12k_ahb_resource_init(struct ath12k_base *ab) goto err_mem_unmap; } ab->ce_remap = true; - ab->ce_remap_base_addr = HAL_IPQ5332_CE_WFSS_REG_BASE; + ab->cmem_offset = ce_remap->cmem_offset; + ab->ce_remap_base_addr = ce_remap->base; } ab_ahb->xo_clk = devm_clk_get(ab->dev, "xo"); @@ -988,13 +981,34 @@ static void ath12k_ahb_resource_deinit(struct ath12k_base *ab) ab_ahb->xo_clk = NULL; } +static enum ath12k_device_family +ath12k_ahb_get_device_family(const struct platform_device *pdev) +{ + enum ath12k_device_family device_family_id; + struct ath12k_ahb_driver *driver; + const struct of_device_id *of_id; + + for (device_family_id = ATH12K_DEVICE_FAMILY_START; + device_family_id < ATH12K_DEVICE_FAMILY_MAX; device_family_id++) { + driver = ath12k_ahb_family_drivers[device_family_id]; + if (driver) { + of_id = of_match_device(driver->id_table, &pdev->dev); + if (of_id) { + /* Found the driver */ + return device_family_id; + } + } + } + + return ATH12K_DEVICE_FAMILY_MAX; +} + static int ath12k_ahb_probe(struct platform_device *pdev) { - struct ath12k_base *ab; - const struct ath12k_hif_ops *hif_ops; + enum ath12k_device_family device_id; struct ath12k_ahb *ab_ahb; - enum ath12k_hw_rev hw_rev; - u32 addr, userpd_id; + struct ath12k_base *ab; + u32 addr; int ret; ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); @@ -1008,25 +1022,32 @@ static int ath12k_ahb_probe(struct platform_device *pdev) if (!ab) return -ENOMEM; - hw_rev = (enum ath12k_hw_rev)(kernel_ulong_t)of_device_get_match_data(&pdev->dev); - switch (hw_rev) { - case ATH12K_HW_IPQ5332_HW10: - hif_ops = &ath12k_ahb_hif_ops_ipq5332; - userpd_id = ATH12K_IPQ5332_USERPD_ID; - break; - default: - ret = -EOPNOTSUPP; + ab_ahb = ath12k_ab_to_ahb(ab); + ab_ahb->ab = ab; + ab->hif.ops = &ath12k_ahb_hif_ops; + ab->pdev = pdev; + platform_set_drvdata(pdev, ab); + + device_id = ath12k_ahb_get_device_family(pdev); + if (device_id >= ATH12K_DEVICE_FAMILY_MAX) { + ath12k_err(ab, "failed to get device family: %d\n", device_id); + ret = -EINVAL; goto err_core_free; } - ab->hif.ops = hif_ops; - ab->pdev = pdev; - ab->hw_rev = hw_rev; - ab->target_mem_mode = ATH12K_QMI_MEMORY_MODE_DEFAULT; - platform_set_drvdata(pdev, ab); - ab_ahb = ath12k_ab_to_ahb(ab); - ab_ahb->ab = ab; - ab_ahb->userpd_id = userpd_id; + ath12k_dbg(ab, ATH12K_DBG_AHB, "AHB device family id: %d\n", device_id); + + ab_ahb->device_family_ops = &ath12k_ahb_family_drivers[device_id]->ops; + + /* Call device specific probe. This is the callback that can + * be used to override any ops in future + * probe is validated for NULL during registration. + */ + ret = ab_ahb->device_family_ops->probe(pdev); + if (ret) { + ath12k_err(ab, "failed to probe device: %d\n", ret); + goto err_core_free; + } /* Set fixed_mem_region to true for platforms that support fixed memory * reservation from DT. If memory is reserved from DT for FW, ath12k driver @@ -1065,14 +1086,26 @@ static int ath12k_ahb_probe(struct platform_device *pdev) goto err_rproc_deconfigure; } + /* Invoke arch_init here so that arch-specific init operations + * can utilize already initialized ab fields, such as HAL SRNGs. + */ + ret = ab_ahb->device_family_ops->arch_init(ab); + if (ret) { + ath12k_err(ab, "AHB arch_init failed %d\n", ret); + goto err_rproc_deconfigure; + } + ret = ath12k_core_init(ab); if (ret) { ath12k_err(ab, "failed to init core: %d\n", ret); - goto err_rproc_deconfigure; + goto err_deinit_arch; } return 0; +err_deinit_arch: + ab_ahb->device_family_ops->arch_deinit(ab); + err_rproc_deconfigure: ath12k_ahb_deconfigure_rproc(ab); @@ -1111,11 +1144,13 @@ static void ath12k_ahb_remove_prepare(struct ath12k_base *ab) static void ath12k_ahb_free_resources(struct ath12k_base *ab) { struct platform_device *pdev = ab->pdev; + struct ath12k_ahb *ab_ahb = ath12k_ab_to_ahb(ab); ath12k_hal_srng_deinit(ab); ath12k_ce_free_pipes(ab); ath12k_ahb_resource_deinit(ab); ath12k_ahb_deconfigure_rproc(ab); + ab_ahb->device_family_ops->arch_deinit(ab); ath12k_core_free(ab); platform_set_drvdata(pdev, NULL); } @@ -1136,21 +1171,47 @@ qmi_fail: ath12k_ahb_free_resources(ab); } -static struct platform_driver ath12k_ahb_driver = { - .driver = { - .name = "ath12k_ahb", - .of_match_table = ath12k_ahb_of_match, - }, - .probe = ath12k_ahb_probe, - .remove = ath12k_ahb_remove, -}; - -int ath12k_ahb_init(void) +int ath12k_ahb_register_driver(const enum ath12k_device_family device_id, + struct ath12k_ahb_driver *driver) { - return platform_driver_register(&ath12k_ahb_driver); + struct platform_driver *ahb_driver; + + if (device_id >= ATH12K_DEVICE_FAMILY_MAX) + return -EINVAL; + + if (!driver || !driver->ops.probe || + !driver->ops.arch_init || !driver->ops.arch_deinit) + return -EINVAL; + + if (ath12k_ahb_family_drivers[device_id]) { + pr_err("Driver already registered for id %d\n", device_id); + return -EALREADY; + } + + ath12k_ahb_family_drivers[device_id] = driver; + + ahb_driver = &ath12k_ahb_family_drivers[device_id]->driver; + ahb_driver->driver.name = driver->name; + ahb_driver->driver.of_match_table = driver->id_table; + ahb_driver->probe = ath12k_ahb_probe; + ahb_driver->remove = ath12k_ahb_remove; + + return platform_driver_register(ahb_driver); } +EXPORT_SYMBOL(ath12k_ahb_register_driver); -void ath12k_ahb_exit(void) +void ath12k_ahb_unregister_driver(const enum ath12k_device_family device_id) { - platform_driver_unregister(&ath12k_ahb_driver); + struct platform_driver *ahb_driver; + + if (device_id >= ATH12K_DEVICE_FAMILY_MAX) + return; + + if (!ath12k_ahb_family_drivers[device_id]) + return; + + ahb_driver = &ath12k_ahb_family_drivers[device_id]->driver; + platform_driver_unregister(ahb_driver); + ath12k_ahb_family_drivers[device_id] = NULL; } +EXPORT_SYMBOL(ath12k_ahb_unregister_driver); diff --git a/sys/contrib/dev/athk/ath12k/ahb.h b/sys/contrib/dev/athk/ath12k/ahb.h index d56244b20a6a..8a040d03d27a 100644 --- a/sys/contrib/dev/athk/ath12k/ahb.h +++ b/sys/contrib/dev/athk/ath12k/ahb.h @@ -1,13 +1,14 @@ /* SPDX-License-Identifier: BSD-3-Clause-Clear */ /* * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. - * Copyright (c) 2022-2025, Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ #ifndef ATH12K_AHB_H #define ATH12K_AHB_H #include #include +#include #include "core.h" #define ATH12K_AHB_RECOVERY_TIMEOUT (3 * HZ) @@ -43,6 +44,12 @@ enum ath12k_ahb_userpd_irq { struct ath12k_base; +struct ath12k_ahb_device_family_ops { + int (*probe)(struct platform_device *pdev); + int (*arch_init)(struct ath12k_base *ab); + void (*arch_deinit)(struct ath12k_base *ab); +}; + struct ath12k_ahb { struct ath12k_base *ab; struct rproc *tgt_rproc; @@ -59,6 +66,15 @@ struct ath12k_ahb { u32 spawn_bit; u32 stop_bit; int userpd_irq_num[ATH12K_USERPD_MAX_IRQ]; + const struct ath12k_ahb_ops *ahb_ops; + const struct ath12k_ahb_device_family_ops *device_family_ops; +}; + +struct ath12k_ahb_driver { + const char *name; + const struct of_device_id *id_table; + struct ath12k_ahb_device_family_ops ops; + struct platform_driver driver; }; static inline struct ath12k_ahb *ath12k_ab_to_ahb(struct ath12k_base *ab) @@ -66,15 +82,8 @@ static inline struct ath12k_ahb *ath12k_ab_to_ahb(struct ath12k_base *ab) return (struct ath12k_ahb *)ab->drv_priv; } -#ifdef CONFIG_ATH12K_AHB -int ath12k_ahb_init(void); -void ath12k_ahb_exit(void); -#else -static inline int ath12k_ahb_init(void) -{ - return 0; -} +int ath12k_ahb_register_driver(const enum ath12k_device_family device_id, + struct ath12k_ahb_driver *driver); +void ath12k_ahb_unregister_driver(const enum ath12k_device_family device_id); -static inline void ath12k_ahb_exit(void) {}; -#endif #endif diff --git a/sys/contrib/dev/athk/ath12k/ce.c b/sys/contrib/dev/athk/ath12k/ce.c index 4aea58446838..67bbc6d8d0c9 100644 --- a/sys/contrib/dev/athk/ath12k/ce.c +++ b/sys/contrib/dev/athk/ath12k/ce.c @@ -1,314 +1,13 @@ // SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2022, 2024-2025 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ #include "dp_rx.h" #include "debug.h" #include "hif.h" -const struct ce_attr ath12k_host_ce_config_qcn9274[] = { - /* CE0: host->target HTC control and raw streams */ - { - .flags = CE_ATTR_FLAGS, - .src_nentries = 16, - .src_sz_max = 2048, - .dest_nentries = 0, - }, - - /* CE1: target->host HTT + HTC control */ - { - .flags = CE_ATTR_FLAGS, - .src_nentries = 0, - .src_sz_max = 2048, - .dest_nentries = 512, - .recv_cb = ath12k_htc_rx_completion_handler, - }, - - /* CE2: target->host WMI */ - { - .flags = CE_ATTR_FLAGS, - .src_nentries = 0, - .src_sz_max = 2048, - .dest_nentries = 128, - .recv_cb = ath12k_htc_rx_completion_handler, - }, - - /* CE3: host->target WMI (mac0) */ - { - .flags = CE_ATTR_FLAGS, - .src_nentries = 32, - .src_sz_max = 2048, - .dest_nentries = 0, - }, - - /* CE4: host->target HTT */ - { - .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR, - .src_nentries = 2048, - .src_sz_max = 256, - .dest_nentries = 0, - }, - - /* CE5: target->host pktlog */ - { - .flags = CE_ATTR_FLAGS, - .src_nentries = 0, - .src_sz_max = 2048, - .dest_nentries = 512, - .recv_cb = ath12k_dp_htt_htc_t2h_msg_handler, - }, - - /* CE6: target autonomous hif_memcpy */ - { - .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR, - .src_nentries = 0, - .src_sz_max = 0, - .dest_nentries = 0, - }, - - /* CE7: host->target WMI (mac1) */ - { - .flags = CE_ATTR_FLAGS, - .src_nentries = 32, - .src_sz_max = 2048, - .dest_nentries = 0, - }, - - /* CE8: target autonomous hif_memcpy */ - { - .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR, - .src_nentries = 0, - .src_sz_max = 0, - .dest_nentries = 0, - }, - - /* CE9: MHI */ - { - .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR, - .src_nentries = 0, - .src_sz_max = 0, - .dest_nentries = 0, - }, - - /* CE10: MHI */ - { - .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR, - .src_nentries = 0, - .src_sz_max = 0, - .dest_nentries = 0, - }, - - /* CE11: MHI */ - { - .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR, - .src_nentries = 0, - .src_sz_max = 0, - .dest_nentries = 0, - }, - - /* CE12: CV Prefetch */ - { - .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR, - .src_nentries = 0, - .src_sz_max = 0, - .dest_nentries = 0, - }, - - /* CE13: CV Prefetch */ - { - .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR, - .src_nentries = 0, - .src_sz_max = 0, - .dest_nentries = 0, - }, - - /* CE14: target->host dbg log */ - { - .flags = CE_ATTR_FLAGS, - .src_nentries = 0, - .src_sz_max = 2048, - .dest_nentries = 512, - .recv_cb = ath12k_htc_rx_completion_handler, - }, - - /* CE15: reserved for future use */ - { - .flags = (CE_ATTR_FLAGS | CE_ATTR_DIS_INTR), - .src_nentries = 0, - .src_sz_max = 0, - .dest_nentries = 0, - }, -}; - -const struct ce_attr ath12k_host_ce_config_wcn7850[] = { - /* CE0: host->target HTC control and raw streams */ - { - .flags = CE_ATTR_FLAGS, - .src_nentries = 16, - .src_sz_max = 2048, - .dest_nentries = 0, - }, - - /* CE1: target->host HTT + HTC control */ - { - .flags = CE_ATTR_FLAGS, - .src_nentries = 0, - .src_sz_max = 2048, - .dest_nentries = 512, - .recv_cb = ath12k_htc_rx_completion_handler, - }, - - /* CE2: target->host WMI */ - { - .flags = CE_ATTR_FLAGS, - .src_nentries = 0, - .src_sz_max = 2048, - .dest_nentries = 64, - .recv_cb = ath12k_htc_rx_completion_handler, - }, - - /* CE3: host->target WMI (mac0) */ - { - .flags = CE_ATTR_FLAGS, - .src_nentries = 32, - .src_sz_max = 2048, - .dest_nentries = 0, - }, - - /* CE4: host->target HTT */ - { - .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR, - .src_nentries = 2048, - .src_sz_max = 256, - .dest_nentries = 0, - }, - - /* CE5: target->host pktlog */ - { - .flags = CE_ATTR_FLAGS, - .src_nentries = 0, - .src_sz_max = 0, - .dest_nentries = 0, - }, - - /* CE6: target autonomous hif_memcpy */ - { - .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR, - .src_nentries = 0, - .src_sz_max = 0, - .dest_nentries = 0, - }, - - /* CE7: host->target WMI (mac1) */ - { - .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR, - .src_nentries = 0, - .src_sz_max = 2048, - .dest_nentries = 0, - }, - - /* CE8: target autonomous hif_memcpy */ - { - .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR, - .src_nentries = 0, - .src_sz_max = 0, - .dest_nentries = 0, - }, - -}; - -const struct ce_attr ath12k_host_ce_config_ipq5332[] = { - /* CE0: host->target HTC control and raw streams */ - { - .flags = CE_ATTR_FLAGS, - .src_nentries = 16, - .src_sz_max = 2048, - .dest_nentries = 0, - }, - /* CE1: target->host HTT + HTC control */ - { - .flags = CE_ATTR_FLAGS, - .src_nentries = 0, - .src_sz_max = 2048, - .dest_nentries = 512, - .recv_cb = ath12k_htc_rx_completion_handler, - }, - /* CE2: target->host WMI */ - { - .flags = CE_ATTR_FLAGS, - .src_nentries = 0, - .src_sz_max = 2048, - .dest_nentries = 128, - .recv_cb = ath12k_htc_rx_completion_handler, - }, - /* CE3: host->target WMI */ - { - .flags = CE_ATTR_FLAGS, - .src_nentries = 32, - .src_sz_max = 2048, - .dest_nentries = 0, - }, - /* CE4: host->target HTT */ - { - .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR, - .src_nentries = 2048, - .src_sz_max = 256, - .dest_nentries = 0, - }, - /* CE5: target -> host PKTLOG */ - { - .flags = CE_ATTR_FLAGS, - .src_nentries = 0, - .src_sz_max = 2048, - .dest_nentries = 512, - .recv_cb = ath12k_dp_htt_htc_t2h_msg_handler, - }, - /* CE6: Target autonomous HIF_memcpy */ - { - .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR, - .src_nentries = 0, - .src_sz_max = 0, - .dest_nentries = 0, - }, - /* CE7: CV Prefetch */ - { - .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR, - .src_nentries = 0, - .src_sz_max = 0, - .dest_nentries = 0, - }, - /* CE8: Target HIF memcpy (Generic HIF memcypy) */ - { - .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR, - .src_nentries = 0, - .src_sz_max = 0, - .dest_nentries = 0, - }, - /* CE9: WMI logging/CFR/Spectral/Radar */ - { - .flags = CE_ATTR_FLAGS, - .src_nentries = 0, - .src_sz_max = 2048, - .dest_nentries = 128, - }, - /* CE10: Unused */ - { - .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR, - .src_nentries = 0, - .src_sz_max = 0, - .dest_nentries = 0, - }, - /* CE11: Unused */ - { - .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR, - .src_nentries = 0, - .src_sz_max = 0, - .dest_nentries = 0, - }, -}; - static int ath12k_ce_rx_buf_enqueue_pipe(struct ath12k_ce_pipe *pipe, struct sk_buff *skb, dma_addr_t paddr) { @@ -341,7 +40,7 @@ static int ath12k_ce_rx_buf_enqueue_pipe(struct ath12k_ce_pipe *pipe, goto exit; } - ath12k_hal_ce_dst_set_desc(desc, paddr); + ath12k_hal_ce_dst_set_desc(&ab->hal, desc, paddr); ring->skb[write_index] = skb; write_index = CE_RING_IDX_INCR(nentries_mask, write_index); @@ -434,7 +133,7 @@ static int ath12k_ce_completed_recv_next(struct ath12k_ce_pipe *pipe, goto err; } - *nbytes = ath12k_hal_ce_dst_status_get_length(desc); + *nbytes = ath12k_hal_ce_dst_status_get_length(&ab->hal, desc); *skb = pipe->dest_ring->skb[sw_index]; pipe->dest_ring->skb[sw_index] = NULL; @@ -633,7 +332,7 @@ ath12k_ce_alloc_ring(struct ath12k_base *ab, int nentries, int desc_sz) struct ath12k_ce_ring *ce_ring; dma_addr_t base_addr; - ce_ring = kzalloc(struct_size(ce_ring, skb, nentries), GFP_KERNEL); + ce_ring = kzalloc_flex(*ce_ring, skb, nentries); if (!ce_ring) return ERR_PTR(-ENOMEM); @@ -666,6 +365,7 @@ ath12k_ce_alloc_ring(struct ath12k_base *ab, int nentries, int desc_sz) static int ath12k_ce_alloc_pipe(struct ath12k_base *ab, int ce_id) { + struct ath12k_hal *hal = &ab->hal; struct ath12k_ce_pipe *pipe = &ab->ce.ce_pipe[ce_id]; const struct ce_attr *attr = &ab->hw_params->host_ce_config[ce_id]; struct ath12k_ce_ring *ring; @@ -677,7 +377,7 @@ static int ath12k_ce_alloc_pipe(struct ath12k_base *ab, int ce_id) if (attr->src_nentries) { pipe->send_cb = ath12k_ce_send_done_cb; nentries = roundup_pow_of_two(attr->src_nentries); - desc_sz = ath12k_hal_ce_get_desc_size(HAL_CE_DESC_SRC); + desc_sz = ath12k_hal_ce_get_desc_size(hal, HAL_CE_DESC_SRC); ring = ath12k_ce_alloc_ring(ab, nentries, desc_sz); if (IS_ERR(ring)) return PTR_ERR(ring); @@ -687,13 +387,13 @@ static int ath12k_ce_alloc_pipe(struct ath12k_base *ab, int ce_id) if (attr->dest_nentries) { pipe->recv_cb = attr->recv_cb; nentries = roundup_pow_of_two(attr->dest_nentries); - desc_sz = ath12k_hal_ce_get_desc_size(HAL_CE_DESC_DST); + desc_sz = ath12k_hal_ce_get_desc_size(hal, HAL_CE_DESC_DST); ring = ath12k_ce_alloc_ring(ab, nentries, desc_sz); if (IS_ERR(ring)) return PTR_ERR(ring); pipe->dest_ring = ring; - desc_sz = ath12k_hal_ce_get_desc_size(HAL_CE_DESC_DST_STATUS); + desc_sz = ath12k_hal_ce_get_desc_size(hal, HAL_CE_DESC_DST_STATUS); ring = ath12k_ce_alloc_ring(ab, nentries, desc_sz); if (IS_ERR(ring)) return PTR_ERR(ring); @@ -786,7 +486,7 @@ int ath12k_ce_send(struct ath12k_base *ab, struct sk_buff *skb, u8 pipe_id, if (pipe->attr_flags & CE_ATTR_BYTE_SWAP_DATA) byte_swap_data = 1; - ath12k_hal_ce_src_set_desc(desc, ATH12K_SKB_CB(skb)->paddr, + ath12k_hal_ce_src_set_desc(&ab->hal, desc, ATH12K_SKB_CB(skb)->paddr, skb->len, transfer_id, byte_swap_data); pipe->src_ring->skb[write_index] = skb; @@ -972,6 +672,7 @@ int ath12k_ce_init_pipes(struct ath12k_base *ab) void ath12k_ce_free_pipes(struct ath12k_base *ab) { + struct ath12k_hal *hal = &ab->hal; struct ath12k_ce_pipe *pipe; int desc_sz; int i; @@ -980,7 +681,8 @@ void ath12k_ce_free_pipes(struct ath12k_base *ab) pipe = &ab->ce.ce_pipe[i]; if (pipe->src_ring) { - desc_sz = ath12k_hal_ce_get_desc_size(HAL_CE_DESC_SRC); + desc_sz = ath12k_hal_ce_get_desc_size(hal, + HAL_CE_DESC_SRC); dma_free_coherent(ab->dev, pipe->src_ring->nentries * desc_sz + CE_DESC_RING_ALIGN, @@ -991,7 +693,8 @@ void ath12k_ce_free_pipes(struct ath12k_base *ab) } if (pipe->dest_ring) { - desc_sz = ath12k_hal_ce_get_desc_size(HAL_CE_DESC_DST); + desc_sz = ath12k_hal_ce_get_desc_size(hal, + HAL_CE_DESC_DST); dma_free_coherent(ab->dev, pipe->dest_ring->nentries * desc_sz + CE_DESC_RING_ALIGN, @@ -1003,7 +706,8 @@ void ath12k_ce_free_pipes(struct ath12k_base *ab) if (pipe->status_ring) { desc_sz = - ath12k_hal_ce_get_desc_size(HAL_CE_DESC_DST_STATUS); + ath12k_hal_ce_get_desc_size(hal, + HAL_CE_DESC_DST_STATUS); dma_free_coherent(ab->dev, pipe->status_ring->nentries * desc_sz + CE_DESC_RING_ALIGN, diff --git a/sys/contrib/dev/athk/ath12k/ce.h b/sys/contrib/dev/athk/ath12k/ce.h index 57f75899ee03..df4f2a4f8480 100644 --- a/sys/contrib/dev/athk/ath12k/ce.h +++ b/sys/contrib/dev/athk/ath12k/ce.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: BSD-3-Clause-Clear */ /* * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2022, 2024-2025 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ #ifndef ATH12K_CE_H @@ -85,6 +85,7 @@ struct ce_ie_addr { struct ce_remap { u32 base; u32 size; + u32 cmem_offset; }; struct ce_attr { @@ -173,10 +174,6 @@ struct ath12k_ce { struct ath12k_hp_update_timer hp_timer[CE_COUNT_MAX]; }; -extern const struct ce_attr ath12k_host_ce_config_qcn9274[]; -extern const struct ce_attr ath12k_host_ce_config_wcn7850[]; -extern const struct ce_attr ath12k_host_ce_config_ipq5332[]; - void ath12k_ce_cleanup_pipes(struct ath12k_base *ab); void ath12k_ce_rx_replenish_retry(struct timer_list *t); void ath12k_ce_per_engine_service(struct ath12k_base *ab, u16 ce_id); diff --git a/sys/contrib/dev/athk/ath12k/cmn_defs.h b/sys/contrib/dev/athk/ath12k/cmn_defs.h new file mode 100644 index 000000000000..20208ffea1c9 --- /dev/null +++ b/sys/contrib/dev/athk/ath12k/cmn_defs.h @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: BSD-3-Clause-Clear */ +/* + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. + */ + +#ifndef ATH12K_CMN_DEFS_H +#define ATH12K_CMN_DEFS_H + +#include + +#define MAX_RADIOS 2 +#define ATH12K_MAX_DEVICES 3 +#define ATH12K_GROUP_MAX_RADIO (ATH12K_MAX_DEVICES * MAX_RADIOS) *** 45232 LINES SKIPPED *** From nobody Wed Apr 22 21:09:19 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bg41gvrz6bLC4 for ; Wed, 22 Apr 2026 21:09:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bg36Lr8z3mDW for ; Wed, 22 Apr 2026 21:09:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nLuRqxDNjx0rdJ8cx7uhYLFXmmtbe4JS5FmNDoJa1LA=; b=tHIyu1rnU4b0Reeu5Q0Fyu41ZWbGMnSutHK1ta4+CRUUw7k3FpsE6rLJPkICcVW/+iKUBt WOdxcyLuM3FHBaR8JqO8XOMXK9WcZsny2JD6R3f2bS1/INmPit2RHgOXJYXR5SiWlQDia5 jmAhzhMovT3D/OllG/YtIP5AF5zfhBvYSxy7RhW4cGlP9M4cgY5RQdPeKYqcnG1qNssEaK 39Ueyl4XshtR5XUQ8yiZ+kk9CAthFAh7WTMYEC7QZqG0K8V1Z9b87Ft7fqF9IjXRQdTBwP ofUszSNOSc1I870Pk5jq99mHuWRuXMOq1VqK0YaS2tNUcSezeHw/9lDQDaq1EQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892159; a=rsa-sha256; cv=none; b=K8O/Gtz5obNq0P4YXj1a91DztTjlmTPhiZTHcY8+MkSL1vvpih/ldTsY0gNdp310ic7nzu hQcIahbLuYwD4DzDJkC8VjdEHtJhehXhRNMx4ql72qdQnwQNqicRq6WRjIjEmX+p09H3/8 mhjsRQFcvTWVBUyhaQZGFsEGIudxcMXaDIQhNgcWPHPZyqsVLGCQe1YCLwU4g/AOtXanz6 WaHHCYvo9+Zi2t0n3LACNipiSNuUMKurJvq7QplmwK24TOfkZl8cCA4Or6UzkPWB9JszaJ O1hGxS1QQPlDk8i4KSUijj0o+8x5gWJf/I5p2IriaLcjR4Azu7A+d/oaSTpORQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nLuRqxDNjx0rdJ8cx7uhYLFXmmtbe4JS5FmNDoJa1LA=; b=aOf4S7ukGznTbT1IAA1QySCO0aV4ZfQO+FugqBThuVAPx+IMDDxeutY7XQHixMIpt5gfPo H16syMrVxxNpX9V/3DExSpsXURWfuEsE6nC/McB4qtBradbsJtAyiDTdaXtRMIugkcfSVr D/yudOHion6LzgSQ1lcXF2fcSwS82z384eZmMFHq97kyvl2PC8qQO0+Wi0p2OyhDeSqNPq 910I+mL+BYibjVUAP3C8vA7J8R7w/8Z+aJ+UZSt/KMlPohAnNW0cFn9jEfGFfYXb8q1l1/ a0SxTk20UMoBOWHtEp3UiwJH3GFUkegEIe4nM34xv+b+ArR35hrWOqxDLM1vRg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bg35wwsznpX for ; Wed, 22 Apr 2026 21:09:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26a36 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:09:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: cb309ee5c170 - stable/15 - ath11k: update module Makefiles for v7.0 driver 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: cb309ee5c1700e20ad040b64ab62f055659785e8 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:09:19 +0000 Message-Id: <69e938ff.26a36.7917ab52@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=cb309ee5c1700e20ad040b64ab62f055659785e8 commit cb309ee5c1700e20ad040b64ab62f055659785e8 Author: Bjoern A. Zeeb AuthorDate: 2026-04-19 15:28:50 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:16 +0000 ath11k: update module Makefiles for v7.0 driver version Update LINUXKPI_VERSION to reflect that the driver is based on Linux v7.0. Add optional support for the new cfr (channel frequency response) file/option. Sponsored by: The FreeBSD Foundation (cherry picked from commit 20cf11812ac722852322f2f2994698d7a5fa8dc6) --- sys/modules/ath11k/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/modules/ath11k/Makefile b/sys/modules/ath11k/Makefile index b1eb2422cc3d..a2f0064c2ae9 100644 --- a/sys/modules/ath11k/Makefile +++ b/sys/modules/ath11k/Makefile @@ -5,6 +5,7 @@ DEVATH11KDIR= ${SRCTOP}/sys/contrib/dev/athk/ath11k ATH11K_PCI= 1 ATH11K_AHB= 0 +ATH11K_CFR= 0 ATH11K_DEBUGFS= 0 ATH11K_TRACE= 0 ATH11K_THERMAL= 0 @@ -31,6 +32,11 @@ SRCS+= ahb.c CFLAGS+= -DCONFIG_ATH11K_AHB .endif +.if defined(ATH11K_CFR) && ${ATH11K_CFR} > 0 +SRCS+= cfr.c +CFLAGS+= -DCONFIG_ATH11K_CFR +.endif + .if defined(ATH11K_DEBUGFS) && ${ATH11K_DEBUGFS} > 0 SRCS+= debugfs.c debugfs_htt_stats.c debugfs_sta.c CFLAGS+= -DCONFIG_ATH11K_DEBUGFS @@ -75,6 +81,6 @@ CFLAGS+= ${LINUXKPI_INCLUDES} CFLAGS+= -DCONFIG_ATH11K_DEBUG CFLAGS+= -DKBUILD_MODNAME='"ath11k"' -CFLAGS+= -DLINUXKPI_VERSION=61900 +CFLAGS+= -DLINUXKPI_VERSION=70000 .include From nobody Wed Apr 22 21:09:18 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bg33CnNz6bL94 for ; Wed, 22 Apr 2026 21:09:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bg25vMmz3mP9 for ; Wed, 22 Apr 2026 21:09:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OvH4FD+hEmy1sI51jAiBhMcnzhw0vov33KEbhcf8lPk=; b=RVMbhQenO6HtXVTv8kiBNJjlBmTcN37tPaTsbWlLyCifJLta48P1xy9sn0xcakkwxRKz2j iQTmnLuzoWY+bx5fG0rpljyjqU7g0xciXnELN5+/G3WZcaimxG3DZAJvp0VE8hKtPRbETH jz1Gd5kK/j9xRLQl+GsEiGJAhKF6RGbbdfT/Sr7GdsDJB1oHo4q1k37b0ncUdhpjlDzaGM OyK0U5VoDDCnYSrsvBudMFw2oIMXXLJQoO6pyq1EqPp4dzWIt4nu8f94nuefKL38KjSnnh 20kXYknN5W62+AaHQsNPuFPauVLr33XLctkTmNtf1rYB/9CC/FxsdGor3TCQ6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892158; a=rsa-sha256; cv=none; b=ZLm8dwtPxsKGE0uSKdFIXBZKy5Ymn6vUC+Z85Xxrfdx7UlwFvjaIk8SIkGNbC5oejYP08F wLzwPmqw951zmfu8eFMKDsm6KqH7pp15Qi0tL1Uf9zTjOX9b2a56yCa3El8h0Wvp02q48l Hi9aOSaW8tZusnVdyupMB1bDJbG/pIjm9SWndZQKdrufxTsUX6v7i7e85dkT3lzPjj2Ll2 IrqHkTXzNS8QGrOambnsNQxDd8qNEe6Xaqju1ggcq9eQPRm4KkXYy5DP9JJCS/SO0lFS/9 v+If3KA1ADcuUghxfPk80sod6xrVc56X4upl6eUvqCqtTlpNPRhq6mrtrkFifw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OvH4FD+hEmy1sI51jAiBhMcnzhw0vov33KEbhcf8lPk=; b=irVIQ1NEN9lSxCqOUmPkbEbKxhCZiYq1lZMsJFA3Mu3HXYRvTXEXt0SNSiiA63PTaxelCS y7ZmENLzi4ON0FELIgste6ZSiDEaSDr6++ccm3MVytVpqdvee4LzczqSHFRAvqhnD2BUl+ 3EiggBBJ3t5LNNGEKAp0dmNzLRseMjvBTNasjKpTrGd9wXDuYPBPGOY+p9le0e1akgRmyI 8SaiskQV++WlqXog8l9eXn0BB3H9KbbJ7+oh10O/briaFLLo9f425H70Jte6ZoNPgPToJ5 OYzJeMbtQVESlS/UN40E63tTqsWb252YWVzwKtY9L3vovIJ6xhTtWuv2ytvs0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bg2591Xznm8 for ; Wed, 22 Apr 2026 21:09:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30095 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:09:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 24c9bc6e364a - stable/15 - ath11k: update Atheros/QCA's ath11k driver List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 24c9bc6e364a4c24c85d56935ee601a317cc5964 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:09:18 +0000 Message-Id: <69e938fe.30095.3c8ae280@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=24c9bc6e364a4c24c85d56935ee601a317cc5964 commit 24c9bc6e364a4c24c85d56935ee601a317cc5964 Author: Bjoern A. Zeeb AuthorDate: 2026-04-19 15:27:01 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:15 +0000 ath11k: update Atheros/QCA's ath11k driver This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ). Sponsored by: The FreeBSD Foundation (cherry picked from commit 4ed5b949d5e25456124a4d280d27e9719f90e9be) --- sys/contrib/dev/athk/ath11k/Kconfig | 11 + sys/contrib/dev/athk/ath11k/Makefile | 1 + sys/contrib/dev/athk/ath11k/ce.c | 2 +- sys/contrib/dev/athk/ath11k/cfr.c | 1022 +++++++++++++++++++++++++++++ sys/contrib/dev/athk/ath11k/cfr.h | 308 +++++++++ sys/contrib/dev/athk/ath11k/core.c | 108 ++- sys/contrib/dev/athk/ath11k/core.h | 23 +- sys/contrib/dev/athk/ath11k/dbring.c | 52 +- sys/contrib/dev/athk/ath11k/dbring.h | 8 +- sys/contrib/dev/athk/ath11k/debug.h | 8 +- sys/contrib/dev/athk/ath11k/debugfs.c | 10 +- sys/contrib/dev/athk/ath11k/debugfs_sta.c | 142 +++- sys/contrib/dev/athk/ath11k/dp.c | 12 +- sys/contrib/dev/athk/ath11k/dp.h | 1 - sys/contrib/dev/athk/ath11k/dp_rx.c | 21 +- sys/contrib/dev/athk/ath11k/dp_tx.c | 11 +- sys/contrib/dev/athk/ath11k/hal.c | 3 +- sys/contrib/dev/athk/ath11k/hw.c | 19 +- sys/contrib/dev/athk/ath11k/hw.h | 8 +- sys/contrib/dev/athk/ath11k/mac.c | 39 +- sys/contrib/dev/athk/ath11k/mhi.c | 6 +- sys/contrib/dev/athk/ath11k/peer.c | 2 +- sys/contrib/dev/athk/ath11k/qmi.c | 12 +- sys/contrib/dev/athk/ath11k/reg.c | 12 +- sys/contrib/dev/athk/ath11k/wmi.c | 167 ++++- sys/contrib/dev/athk/ath11k/wmi.h | 97 ++- sys/contrib/dev/athk/ath11k/wow.c | 4 +- 27 files changed, 1999 insertions(+), 110 deletions(-) diff --git a/sys/contrib/dev/athk/ath11k/Kconfig b/sys/contrib/dev/athk/ath11k/Kconfig index 659ef134ef16..47dfd39caa89 100644 --- a/sys/contrib/dev/athk/ath11k/Kconfig +++ b/sys/contrib/dev/athk/ath11k/Kconfig @@ -58,3 +58,14 @@ config ATH11K_SPECTRAL Enable ath11k spectral scan support Say Y to enable access to the FFT/spectral data via debugfs. + +config ATH11K_CFR + bool "ath11k channel frequency response support" + depends on ATH11K_DEBUGFS + depends on RELAY + help + Enable ath11k channel frequency response dump support. + This option exposes debugfs nodes that will allow the user + to enable, disable, and dump data. + + Say Y to enable CFR data dump collection via debugfs. diff --git a/sys/contrib/dev/athk/ath11k/Makefile b/sys/contrib/dev/athk/ath11k/Makefile index d9092414b362..b1435fcf3e1b 100644 --- a/sys/contrib/dev/athk/ath11k/Makefile +++ b/sys/contrib/dev/athk/ath11k/Makefile @@ -28,6 +28,7 @@ ath11k-$(CONFIG_THERMAL) += thermal.o ath11k-$(CONFIG_ATH11K_SPECTRAL) += spectral.o ath11k-$(CONFIG_PM) += wow.o ath11k-$(CONFIG_DEV_COREDUMP) += coredump.o +ath11k-$(CONFIG_ATH11K_CFR) += cfr.o obj-$(CONFIG_ATH11K_AHB) += ath11k_ahb.o ath11k_ahb-y += ahb.o diff --git a/sys/contrib/dev/athk/ath11k/ce.c b/sys/contrib/dev/athk/ath11k/ce.c index 1c1bf303ad77..6a3ef2050bdf 100644 --- a/sys/contrib/dev/athk/ath11k/ce.c +++ b/sys/contrib/dev/athk/ath11k/ce.c @@ -615,7 +615,7 @@ ath11k_ce_alloc_ring(struct ath11k_base *ab, int nentries, int desc_sz) struct ath11k_ce_ring *ce_ring; dma_addr_t base_addr; - ce_ring = kzalloc(struct_size(ce_ring, skb, nentries), GFP_KERNEL); + ce_ring = kzalloc_flex(*ce_ring, skb, nentries); if (ce_ring == NULL) return ERR_PTR(-ENOMEM); diff --git a/sys/contrib/dev/athk/ath11k/cfr.c b/sys/contrib/dev/athk/ath11k/cfr.c new file mode 100644 index 000000000000..a91f25fb6c6b --- /dev/null +++ b/sys/contrib/dev/athk/ath11k/cfr.c @@ -0,0 +1,1022 @@ +// SPDX-License-Identifier: BSD-3-Clause-Clear +/* + * Copyright (c) 2020-2021 The Linux Foundation. All rights reserved. + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. + */ + +#include +#include "core.h" +#include "debug.h" + +struct ath11k_dbring *ath11k_cfr_get_dbring(struct ath11k *ar) +{ + if (ar->cfr_enabled) + return &ar->cfr.rx_ring; + + return NULL; +} + +static int ath11k_cfr_calculate_tones_from_dma_hdr(struct ath11k_cfr_dma_hdr *hdr) +{ + u8 bw = FIELD_GET(CFIR_DMA_HDR_INFO1_UPLOAD_PKT_BW, hdr->info1); + u8 preamble = FIELD_GET(CFIR_DMA_HDR_INFO1_PREAMBLE_TYPE, hdr->info1); + + switch (preamble) { + case ATH11K_CFR_PREAMBLE_TYPE_LEGACY: + fallthrough; + case ATH11K_CFR_PREAMBLE_TYPE_VHT: + switch (bw) { + case 0: + return TONES_IN_20MHZ; + case 1: /* DUP40/VHT40 */ + return TONES_IN_40MHZ; + case 2: /* DUP80/VHT80 */ + return TONES_IN_80MHZ; + case 3: /* DUP160/VHT160 */ + return TONES_IN_160MHZ; + default: + return TONES_INVALID; + } + case ATH11K_CFR_PREAMBLE_TYPE_HT: + switch (bw) { + case 0: + return TONES_IN_20MHZ; + case 1: + return TONES_IN_40MHZ; + default: + return TONES_INVALID; + } + default: + return TONES_INVALID; + } +} + +void ath11k_cfr_release_lut_entry(struct ath11k_look_up_table *lut) +{ + memset(lut, 0, sizeof(*lut)); +} + +static void ath11k_cfr_rfs_write(struct ath11k *ar, const void *head, + u32 head_len, const void *data, u32 data_len, + const void *tail, int tail_data) +{ + struct ath11k_cfr *cfr = &ar->cfr; + + if (!cfr->rfs_cfr_capture) + return; + + relay_write(cfr->rfs_cfr_capture, head, head_len); + relay_write(cfr->rfs_cfr_capture, data, data_len); + relay_write(cfr->rfs_cfr_capture, tail, tail_data); + relay_flush(cfr->rfs_cfr_capture); +} + +static void ath11k_cfr_free_pending_dbr_events(struct ath11k *ar) +{ + struct ath11k_cfr *cfr = &ar->cfr; + struct ath11k_look_up_table *lut; + int i; + + if (!cfr->lut) + return; + + for (i = 0; i < cfr->lut_num; i++) { + lut = &cfr->lut[i]; + if (lut->dbr_recv && !lut->tx_recv && + lut->dbr_tstamp < cfr->last_success_tstamp) { + ath11k_dbring_bufs_replenish(ar, &cfr->rx_ring, lut->buff, + WMI_DIRECT_BUF_CFR); + ath11k_cfr_release_lut_entry(lut); + cfr->flush_dbr_cnt++; + } + } +} + +/** + * ath11k_cfr_correlate_and_relay() - Correlate and relay CFR events + * @ar: Pointer to ath11k structure + * @lut: Lookup table for correlation + * @event_type: Type of event received (TX or DBR) + * + * Correlates WMI_PDEV_DMA_RING_BUF_RELEASE_EVENT (DBR) and + * WMI_PEER_CFR_CAPTURE_EVENT (TX capture) by PPDU ID. If both events + * are present and the PPDU IDs match, returns CORRELATE_STATUS_RELEASE + * to relay thecorrelated data to userspace. Otherwise returns + * CORRELATE_STATUS_HOLD to wait for the other event. + * + * Also checks pending DBR events and clears them when no corresponding TX + * capture event is received for the PPDU. + * + * Return: CORRELATE_STATUS_RELEASE or CORRELATE_STATUS_HOLD + */ + +static enum ath11k_cfr_correlate_status +ath11k_cfr_correlate_and_relay(struct ath11k *ar, + struct ath11k_look_up_table *lut, + u8 event_type) +{ + enum ath11k_cfr_correlate_status status; + struct ath11k_cfr *cfr = &ar->cfr; + u64 diff; + + if (event_type == ATH11K_CORRELATE_TX_EVENT) { + if (lut->tx_recv) + cfr->cfr_dma_aborts++; + cfr->tx_evt_cnt++; + lut->tx_recv = true; + } else if (event_type == ATH11K_CORRELATE_DBR_EVENT) { + cfr->dbr_evt_cnt++; + lut->dbr_recv = true; + } + + if (lut->dbr_recv && lut->tx_recv) { + if (lut->dbr_ppdu_id == lut->tx_ppdu_id) { + /* + * 64-bit counters make wraparound highly improbable, + * wraparound handling is omitted. + */ + cfr->last_success_tstamp = lut->dbr_tstamp; + if (lut->dbr_tstamp > lut->txrx_tstamp) { + diff = lut->dbr_tstamp - lut->txrx_tstamp; + ath11k_dbg(ar->ab, ATH11K_DBG_CFR, + "txrx event -> dbr event delay = %u ms", + jiffies_to_msecs(diff)); + } else if (lut->txrx_tstamp > lut->dbr_tstamp) { + diff = lut->txrx_tstamp - lut->dbr_tstamp; + ath11k_dbg(ar->ab, ATH11K_DBG_CFR, + "dbr event -> txrx event delay = %u ms", + jiffies_to_msecs(diff)); + } + + ath11k_cfr_free_pending_dbr_events(ar); + + cfr->release_cnt++; + status = ATH11K_CORRELATE_STATUS_RELEASE; + } else { + /* + * Discard TXRX event on PPDU ID mismatch because multiple PPDUs + * may share the same DMA address due to ucode aborts. + */ + + ath11k_dbg(ar->ab, ATH11K_DBG_CFR, + "Received dbr event twice for the same lut entry"); + lut->tx_recv = false; + lut->tx_ppdu_id = 0; + cfr->clear_txrx_event++; + cfr->cfr_dma_aborts++; + status = ATH11K_CORRELATE_STATUS_HOLD; + } + } else { + status = ATH11K_CORRELATE_STATUS_HOLD; + } + + return status; +} + +static int ath11k_cfr_process_data(struct ath11k *ar, + struct ath11k_dbring_data *param) +{ + u32 end_magic = ATH11K_CFR_END_MAGIC; + struct ath11k_csi_cfr_header *header; + struct ath11k_cfr_dma_hdr *dma_hdr; + struct ath11k_cfr *cfr = &ar->cfr; + struct ath11k_look_up_table *lut; + struct ath11k_base *ab = ar->ab; + u32 buf_id, tones, length; + u8 num_chains; + int status; + u8 *data; + + data = param->data; + buf_id = param->buf_id; + + if (param->data_sz < sizeof(*dma_hdr)) + return -EINVAL; + + dma_hdr = (struct ath11k_cfr_dma_hdr *)data; + + tones = ath11k_cfr_calculate_tones_from_dma_hdr(dma_hdr); + if (tones == TONES_INVALID) { + ath11k_warn(ar->ab, "Number of tones received is invalid\n"); + return -EINVAL; + } + + num_chains = FIELD_GET(CFIR_DMA_HDR_INFO1_NUM_CHAINS, + dma_hdr->info1); + + length = sizeof(*dma_hdr); + length += tones * (num_chains + 1); + + spin_lock_bh(&cfr->lut_lock); + + if (!cfr->lut) { + spin_unlock_bh(&cfr->lut_lock); + return -EINVAL; + } + + lut = &cfr->lut[buf_id]; + + ath11k_dbg_dump(ab, ATH11K_DBG_CFR_DUMP, "data_from_buf_rel:", "", + data, length); + + lut->buff = param->buff; + lut->data = data; + lut->data_len = length; + lut->dbr_ppdu_id = dma_hdr->phy_ppdu_id; + lut->dbr_tstamp = jiffies; + + memcpy(&lut->hdr, dma_hdr, sizeof(*dma_hdr)); + + header = &lut->header; + header->meta_data.channel_bw = FIELD_GET(CFIR_DMA_HDR_INFO1_UPLOAD_PKT_BW, + dma_hdr->info1); + header->meta_data.length = length; + + status = ath11k_cfr_correlate_and_relay(ar, lut, + ATH11K_CORRELATE_DBR_EVENT); + if (status == ATH11K_CORRELATE_STATUS_RELEASE) { + ath11k_dbg(ab, ATH11K_DBG_CFR, + "releasing CFR data to user space"); + ath11k_cfr_rfs_write(ar, &lut->header, + sizeof(struct ath11k_csi_cfr_header), + lut->data, lut->data_len, + &end_magic, sizeof(u32)); + ath11k_cfr_release_lut_entry(lut); + } else if (status == ATH11K_CORRELATE_STATUS_HOLD) { + ath11k_dbg(ab, ATH11K_DBG_CFR, + "tx event is not yet received holding the buf"); + } + + spin_unlock_bh(&cfr->lut_lock); + + return status; +} + +static void ath11k_cfr_fill_hdr_info(struct ath11k *ar, + struct ath11k_csi_cfr_header *header, + struct ath11k_cfr_peer_tx_param *params) +{ + struct ath11k_cfr *cfr; + + cfr = &ar->cfr; + header->cfr_metadata_version = ATH11K_CFR_META_VERSION_4; + header->cfr_data_version = ATH11K_CFR_DATA_VERSION_1; + header->cfr_metadata_len = sizeof(struct cfr_metadata); + header->chip_type = ar->ab->hw_rev; + header->meta_data.status = FIELD_GET(WMI_CFR_PEER_CAPTURE_STATUS, + params->status); + header->meta_data.capture_bw = params->bandwidth; + + /* + * FW reports phymode will always be HE mode. + * Replace it with cached phy mode during peer assoc + */ + header->meta_data.phy_mode = cfr->phymode; + + header->meta_data.prim20_chan = params->primary_20mhz_chan; + header->meta_data.center_freq1 = params->band_center_freq1; + header->meta_data.center_freq2 = params->band_center_freq2; + + /* + * CFR capture is triggered by the ACK of a QoS Null frame: + * - 20 MHz: Legacy ACK + * - 40/80/160 MHz: DUP Legacy ACK + */ + header->meta_data.capture_mode = params->bandwidth ? + ATH11K_CFR_CAPTURE_DUP_LEGACY_ACK : ATH11K_CFR_CAPTURE_LEGACY_ACK; + header->meta_data.capture_type = params->capture_method; + header->meta_data.num_rx_chain = ar->num_rx_chains; + header->meta_data.sts_count = params->spatial_streams; + header->meta_data.timestamp = params->timestamp_us; + ether_addr_copy(header->meta_data.peer_addr, params->peer_mac_addr); + memcpy(header->meta_data.chain_rssi, params->chain_rssi, + sizeof(params->chain_rssi)); + memcpy(header->meta_data.chain_phase, params->chain_phase, + sizeof(params->chain_phase)); + memcpy(header->meta_data.agc_gain, params->agc_gain, + sizeof(params->agc_gain)); +} + +int ath11k_process_cfr_capture_event(struct ath11k_base *ab, + struct ath11k_cfr_peer_tx_param *params) +{ + struct ath11k_look_up_table *lut = NULL; + u32 end_magic = ATH11K_CFR_END_MAGIC; + struct ath11k_csi_cfr_header *header; + struct ath11k_dbring_element *buff; + struct ath11k_cfr *cfr; + dma_addr_t buf_addr; + struct ath11k *ar; + u8 tx_status; + int status; + int i; + + rcu_read_lock(); + ar = ath11k_mac_get_ar_by_vdev_id(ab, params->vdev_id); + if (!ar) { + rcu_read_unlock(); + ath11k_warn(ab, "Failed to get ar for vdev id %d\n", + params->vdev_id); + return -ENOENT; + } + + cfr = &ar->cfr; + rcu_read_unlock(); + + if (WMI_CFR_CAPTURE_STATUS_PEER_PS & params->status) { + ath11k_warn(ab, "CFR capture failed as peer %pM is in powersave", + params->peer_mac_addr); + return -EINVAL; + } + + if (!(WMI_CFR_PEER_CAPTURE_STATUS & params->status)) { + ath11k_warn(ab, "CFR capture failed for the peer : %pM", + params->peer_mac_addr); + cfr->tx_peer_status_cfr_fail++; + return -EINVAL; + } + + tx_status = FIELD_GET(WMI_CFR_FRAME_TX_STATUS, params->status); + if (tx_status != WMI_FRAME_TX_STATUS_OK) { + ath11k_warn(ab, "WMI tx status %d for the peer %pM", + tx_status, params->peer_mac_addr); + cfr->tx_evt_status_cfr_fail++; + return -EINVAL; + } + + buf_addr = (((u64)FIELD_GET(WMI_CFR_CORRELATION_INFO2_BUF_ADDR_HIGH, + params->correlation_info_2)) << 32) | + params->correlation_info_1; + + spin_lock_bh(&cfr->lut_lock); + + if (!cfr->lut) { + spin_unlock_bh(&cfr->lut_lock); + return -EINVAL; + } + + for (i = 0; i < cfr->lut_num; i++) { + struct ath11k_look_up_table *temp = &cfr->lut[i]; + + if (temp->dbr_address == buf_addr) { + lut = &cfr->lut[i]; + break; + } + } + + if (!lut) { + spin_unlock_bh(&cfr->lut_lock); + ath11k_warn(ab, "lut failure to process tx event\n"); + cfr->tx_dbr_lookup_fail++; + return -EINVAL; + } + + lut->tx_ppdu_id = FIELD_GET(WMI_CFR_CORRELATION_INFO2_PPDU_ID, + params->correlation_info_2); + lut->txrx_tstamp = jiffies; + + header = &lut->header; + header->start_magic_num = ATH11K_CFR_START_MAGIC; + header->vendorid = VENDOR_QCA; + header->platform_type = PLATFORM_TYPE_ARM; + + ath11k_cfr_fill_hdr_info(ar, header, params); + + status = ath11k_cfr_correlate_and_relay(ar, lut, + ATH11K_CORRELATE_TX_EVENT); + if (status == ATH11K_CORRELATE_STATUS_RELEASE) { + ath11k_dbg(ab, ATH11K_DBG_CFR, + "Releasing CFR data to user space"); + ath11k_cfr_rfs_write(ar, &lut->header, + sizeof(struct ath11k_csi_cfr_header), + lut->data, lut->data_len, + &end_magic, sizeof(u32)); + buff = lut->buff; + ath11k_cfr_release_lut_entry(lut); + + ath11k_dbring_bufs_replenish(ar, &cfr->rx_ring, buff, + WMI_DIRECT_BUF_CFR); + } else if (status == ATH11K_CORRELATE_STATUS_HOLD) { + ath11k_dbg(ab, ATH11K_DBG_CFR, + "dbr event is not yet received holding buf\n"); + } + + spin_unlock_bh(&cfr->lut_lock); + + return 0; +} + +/* Helper function to check whether the given peer mac address + * is in unassociated peer pool or not. + */ +bool ath11k_cfr_peer_is_in_cfr_unassoc_pool(struct ath11k *ar, const u8 *peer_mac) +{ + struct ath11k_cfr *cfr = &ar->cfr; + struct cfr_unassoc_pool_entry *entry; + int i; + + if (!ar->cfr_enabled) + return false; + + spin_lock_bh(&cfr->lock); + for (i = 0; i < ATH11K_MAX_CFR_ENABLED_CLIENTS; i++) { + entry = &cfr->unassoc_pool[i]; + if (!entry->is_valid) + continue; + + if (ether_addr_equal(peer_mac, entry->peer_mac)) { + spin_unlock_bh(&cfr->lock); + return true; + } + } + + spin_unlock_bh(&cfr->lock); + + return false; +} + +void ath11k_cfr_update_unassoc_pool_entry(struct ath11k *ar, + const u8 *peer_mac) +{ + struct ath11k_cfr *cfr = &ar->cfr; + struct cfr_unassoc_pool_entry *entry; + int i; + + spin_lock_bh(&cfr->lock); + for (i = 0; i < ATH11K_MAX_CFR_ENABLED_CLIENTS; i++) { + entry = &cfr->unassoc_pool[i]; + if (!entry->is_valid) + continue; + + if (ether_addr_equal(peer_mac, entry->peer_mac) && + entry->period == 0) { + memset(entry->peer_mac, 0, ETH_ALEN); + entry->is_valid = false; + cfr->cfr_enabled_peer_cnt--; + break; + } + } + + spin_unlock_bh(&cfr->lock); +} + +void ath11k_cfr_decrement_peer_count(struct ath11k *ar, + struct ath11k_sta *arsta) +{ + struct ath11k_cfr *cfr = &ar->cfr; + + spin_lock_bh(&cfr->lock); + + if (arsta->cfr_capture.cfr_enable) + cfr->cfr_enabled_peer_cnt--; + + spin_unlock_bh(&cfr->lock); +} + +static enum ath11k_wmi_cfr_capture_bw +ath11k_cfr_bw_to_fw_cfr_bw(enum ath11k_cfr_capture_bw bw) +{ + switch (bw) { + case ATH11K_CFR_CAPTURE_BW_20: + return WMI_PEER_CFR_CAPTURE_BW_20; + case ATH11K_CFR_CAPTURE_BW_40: + return WMI_PEER_CFR_CAPTURE_BW_40; + case ATH11K_CFR_CAPTURE_BW_80: + return WMI_PEER_CFR_CAPTURE_BW_80; + default: + return WMI_PEER_CFR_CAPTURE_BW_MAX; + } +} + +static enum ath11k_wmi_cfr_capture_method +ath11k_cfr_method_to_fw_cfr_method(enum ath11k_cfr_capture_method method) +{ + switch (method) { + case ATH11K_CFR_CAPTURE_METHOD_NULL_FRAME: + return WMI_CFR_CAPTURE_METHOD_NULL_FRAME; + case ATH11K_CFR_CAPTURE_METHOD_NULL_FRAME_WITH_PHASE: + return WMI_CFR_CAPTURE_METHOD_NULL_FRAME_WITH_PHASE; + case ATH11K_CFR_CAPTURE_METHOD_PROBE_RESP: + return WMI_CFR_CAPTURE_METHOD_PROBE_RESP; + default: + return WMI_CFR_CAPTURE_METHOD_MAX; + } +} + +int ath11k_cfr_send_peer_cfr_capture_cmd(struct ath11k *ar, + struct ath11k_sta *arsta, + struct ath11k_per_peer_cfr_capture *params, + const u8 *peer_mac) +{ + struct ath11k_cfr *cfr = &ar->cfr; + struct wmi_peer_cfr_capture_conf_arg arg; + enum ath11k_wmi_cfr_capture_bw bw; + enum ath11k_wmi_cfr_capture_method method; + int ret = 0; + + if (cfr->cfr_enabled_peer_cnt >= ATH11K_MAX_CFR_ENABLED_CLIENTS && + !arsta->cfr_capture.cfr_enable) { + ath11k_err(ar->ab, "CFR enable peer threshold reached %u\n", + cfr->cfr_enabled_peer_cnt); + return -ENOSPC; + } + + if (params->cfr_enable == arsta->cfr_capture.cfr_enable && + params->cfr_period == arsta->cfr_capture.cfr_period && + params->cfr_method == arsta->cfr_capture.cfr_method && + params->cfr_bw == arsta->cfr_capture.cfr_bw) + return ret; + + if (!params->cfr_enable && !arsta->cfr_capture.cfr_enable) + return ret; + + bw = ath11k_cfr_bw_to_fw_cfr_bw(params->cfr_bw); + if (bw >= WMI_PEER_CFR_CAPTURE_BW_MAX) { + ath11k_warn(ar->ab, "FW doesn't support configured bw %d\n", + params->cfr_bw); + return -EINVAL; + } + + method = ath11k_cfr_method_to_fw_cfr_method(params->cfr_method); + if (method >= WMI_CFR_CAPTURE_METHOD_MAX) { + ath11k_warn(ar->ab, "FW doesn't support configured method %d\n", + params->cfr_method); + return -EINVAL; + } + + arg.request = params->cfr_enable; + arg.periodicity = params->cfr_period; + arg.bw = bw; + arg.method = method; + + ret = ath11k_wmi_peer_set_cfr_capture_conf(ar, arsta->arvif->vdev_id, + peer_mac, &arg); + if (ret) { + ath11k_warn(ar->ab, + "failed to send cfr capture info: vdev_id %u peer %pM: %d\n", + arsta->arvif->vdev_id, peer_mac, ret); + return ret; + } + + spin_lock_bh(&cfr->lock); + + if (params->cfr_enable && + params->cfr_enable != arsta->cfr_capture.cfr_enable) + cfr->cfr_enabled_peer_cnt++; + else if (!params->cfr_enable) + cfr->cfr_enabled_peer_cnt--; + + spin_unlock_bh(&cfr->lock); + + arsta->cfr_capture.cfr_enable = params->cfr_enable; + arsta->cfr_capture.cfr_period = params->cfr_period; + arsta->cfr_capture.cfr_method = params->cfr_method; + arsta->cfr_capture.cfr_bw = params->cfr_bw; + + return ret; +} + +void ath11k_cfr_update_unassoc_pool(struct ath11k *ar, + struct ath11k_per_peer_cfr_capture *params, + u8 *peer_mac) +{ + struct ath11k_cfr *cfr = &ar->cfr; + struct cfr_unassoc_pool_entry *entry; + int available_idx = -1; + int i; + + guard(spinlock_bh)(&cfr->lock); + + if (!params->cfr_enable) { + for (i = 0; i < ATH11K_MAX_CFR_ENABLED_CLIENTS; i++) { + entry = &cfr->unassoc_pool[i]; + if (ether_addr_equal(peer_mac, entry->peer_mac)) { + memset(entry->peer_mac, 0, ETH_ALEN); + entry->is_valid = false; + cfr->cfr_enabled_peer_cnt--; + break; + } + } + return; + } + + if (cfr->cfr_enabled_peer_cnt >= ATH11K_MAX_CFR_ENABLED_CLIENTS) { + ath11k_info(ar->ab, "Max cfr peer threshold reached\n"); + return; + } + + for (i = 0; i < ATH11K_MAX_CFR_ENABLED_CLIENTS; i++) { + entry = &cfr->unassoc_pool[i]; + + if (ether_addr_equal(peer_mac, entry->peer_mac)) { + ath11k_info(ar->ab, + "peer entry already present updating params\n"); + entry->period = params->cfr_period; + available_idx = -1; + break; + } + + if (available_idx < 0 && !entry->is_valid) + available_idx = i; + } + + if (available_idx >= 0) { + entry = &cfr->unassoc_pool[available_idx]; + ether_addr_copy(entry->peer_mac, peer_mac); + entry->period = params->cfr_period; + entry->is_valid = true; + cfr->cfr_enabled_peer_cnt++; + } +} + +static ssize_t ath11k_read_file_enable_cfr(struct file *file, + char __user *user_buf, + size_t count, loff_t *ppos) +{ + struct ath11k *ar = file->private_data; + char buf[32] = {}; + size_t len; + + mutex_lock(&ar->conf_mutex); + len = scnprintf(buf, sizeof(buf), "%d\n", ar->cfr_enabled); + mutex_unlock(&ar->conf_mutex); + + return simple_read_from_buffer(user_buf, count, ppos, buf, len); +} + +static ssize_t ath11k_write_file_enable_cfr(struct file *file, + const char __user *ubuf, + size_t count, loff_t *ppos) +{ + struct ath11k *ar = file->private_data; + u32 enable_cfr; + int ret; + + if (kstrtouint_from_user(ubuf, count, 0, &enable_cfr)) + return -EINVAL; + + guard(mutex)(&ar->conf_mutex); + + if (ar->state != ATH11K_STATE_ON) + return -ENETDOWN; + + if (enable_cfr > 1) + return -EINVAL; + + if (ar->cfr_enabled == enable_cfr) + return count; + + ret = ath11k_wmi_pdev_set_param(ar, WMI_PDEV_PARAM_PER_PEER_CFR_ENABLE, + enable_cfr, ar->pdev->pdev_id); + if (ret) { + ath11k_warn(ar->ab, + "Failed to enable/disable per peer cfr %d\n", ret); + return ret; + } + + ar->cfr_enabled = enable_cfr; + + return count; +} + +static const struct file_operations fops_enable_cfr = { + .read = ath11k_read_file_enable_cfr, + .write = ath11k_write_file_enable_cfr, + .open = simple_open, + .owner = THIS_MODULE, + .llseek = default_llseek, +}; + +static ssize_t ath11k_write_file_cfr_unassoc(struct file *file, + const char __user *ubuf, + size_t count, loff_t *ppos) +{ + struct ath11k *ar = file->private_data; + struct ath11k_cfr *cfr = &ar->cfr; + struct cfr_unassoc_pool_entry *entry; + char buf[64] = {}; + u8 peer_mac[6]; + u32 cfr_capture_enable; + u32 cfr_capture_period; + int available_idx = -1; + int ret, i; + + simple_write_to_buffer(buf, sizeof(buf) - 1, ppos, ubuf, count); + + guard(mutex)(&ar->conf_mutex); + guard(spinlock_bh)(&cfr->lock); + + if (ar->state != ATH11K_STATE_ON) + return -ENETDOWN; + + if (!ar->cfr_enabled) { + ath11k_err(ar->ab, "CFR is not enabled on this pdev %d\n", + ar->pdev_idx); + return -EINVAL; + } + + ret = sscanf(buf, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx %u %u", + &peer_mac[0], &peer_mac[1], &peer_mac[2], &peer_mac[3], + &peer_mac[4], &peer_mac[5], &cfr_capture_enable, + &cfr_capture_period); + + if (ret < 1) + return -EINVAL; + + if (cfr_capture_enable && ret != 8) + return -EINVAL; + + if (!cfr_capture_enable) { + for (i = 0; i < ATH11K_MAX_CFR_ENABLED_CLIENTS; i++) { + entry = &cfr->unassoc_pool[i]; + if (ether_addr_equal(peer_mac, entry->peer_mac)) { + memset(entry->peer_mac, 0, ETH_ALEN); + entry->is_valid = false; + cfr->cfr_enabled_peer_cnt--; + } + } + + return count; + } + + if (cfr->cfr_enabled_peer_cnt >= ATH11K_MAX_CFR_ENABLED_CLIENTS) { + ath11k_info(ar->ab, "Max cfr peer threshold reached\n"); + return count; + } + + for (i = 0; i < ATH11K_MAX_CFR_ENABLED_CLIENTS; i++) { + entry = &cfr->unassoc_pool[i]; + + if (available_idx < 0 && !entry->is_valid) + available_idx = i; + + if (ether_addr_equal(peer_mac, entry->peer_mac)) { + ath11k_info(ar->ab, + "peer entry already present updating params\n"); + entry->period = cfr_capture_period; + return count; + } + } + + if (available_idx >= 0) { + entry = &cfr->unassoc_pool[available_idx]; + ether_addr_copy(entry->peer_mac, peer_mac); + entry->period = cfr_capture_period; + entry->is_valid = true; + cfr->cfr_enabled_peer_cnt++; + } + + return count; +} + +static ssize_t ath11k_read_file_cfr_unassoc(struct file *file, + char __user *ubuf, + size_t count, loff_t *ppos) +{ + struct ath11k *ar = file->private_data; + struct ath11k_cfr *cfr = &ar->cfr; + struct cfr_unassoc_pool_entry *entry; + char buf[512] = {}; + int len = 0, i; + + spin_lock_bh(&cfr->lock); + + for (i = 0; i < ATH11K_MAX_CFR_ENABLED_CLIENTS; i++) { + entry = &cfr->unassoc_pool[i]; + if (entry->is_valid) + len += scnprintf(buf + len, sizeof(buf) - len, + "peer: %pM period: %u\n", + entry->peer_mac, entry->period); + } + + spin_unlock_bh(&cfr->lock); + + return simple_read_from_buffer(ubuf, count, ppos, buf, len); +} + +static const struct file_operations fops_configure_cfr_unassoc = { + .write = ath11k_write_file_cfr_unassoc, + .read = ath11k_read_file_cfr_unassoc, + .open = simple_open, + .owner = THIS_MODULE, + .llseek = default_llseek, +}; + +static void ath11k_cfr_debug_unregister(struct ath11k *ar) +{ + debugfs_remove(ar->cfr.enable_cfr); + ar->cfr.enable_cfr = NULL; + debugfs_remove(ar->cfr.cfr_unassoc); + ar->cfr.cfr_unassoc = NULL; + + relay_close(ar->cfr.rfs_cfr_capture); + ar->cfr.rfs_cfr_capture = NULL; +} + +static struct dentry *ath11k_cfr_create_buf_file_handler(const char *filename, + struct dentry *parent, + umode_t mode, + struct rchan_buf *buf, + int *is_global) +{ + struct dentry *buf_file; + + buf_file = debugfs_create_file(filename, mode, parent, buf, + &relay_file_operations); + *is_global = 1; + return buf_file; +} + +static int ath11k_cfr_remove_buf_file_handler(struct dentry *dentry) +{ + debugfs_remove(dentry); + + return 0; +} + +static const struct rchan_callbacks rfs_cfr_capture_cb = { + .create_buf_file = ath11k_cfr_create_buf_file_handler, + .remove_buf_file = ath11k_cfr_remove_buf_file_handler, +}; + +static void ath11k_cfr_debug_register(struct ath11k *ar) +{ + ar->cfr.rfs_cfr_capture = relay_open("cfr_capture", + ar->debug.debugfs_pdev, + ar->ab->hw_params.cfr_stream_buf_size, + ar->ab->hw_params.cfr_num_stream_bufs, + &rfs_cfr_capture_cb, NULL); + + ar->cfr.enable_cfr = debugfs_create_file("enable_cfr", 0600, + ar->debug.debugfs_pdev, ar, + &fops_enable_cfr); + + ar->cfr.cfr_unassoc = debugfs_create_file("cfr_unassoc", 0600, + ar->debug.debugfs_pdev, ar, + &fops_configure_cfr_unassoc); +} + +void ath11k_cfr_lut_update_paddr(struct ath11k *ar, dma_addr_t paddr, + u32 buf_id) +{ + struct ath11k_cfr *cfr = &ar->cfr; + + if (cfr->lut) + cfr->lut[buf_id].dbr_address = paddr; +} + +void ath11k_cfr_update_phymode(struct ath11k *ar, enum wmi_phy_mode phymode) +{ + struct ath11k_cfr *cfr = &ar->cfr; + + cfr->phymode = phymode; +} + +static void ath11k_cfr_ring_free(struct ath11k *ar) +{ + struct ath11k_cfr *cfr = &ar->cfr; + + ath11k_dbring_buf_cleanup(ar, &cfr->rx_ring); + ath11k_dbring_srng_cleanup(ar, &cfr->rx_ring); +} + +static int ath11k_cfr_ring_alloc(struct ath11k *ar, + struct ath11k_dbring_cap *db_cap) +{ + struct ath11k_cfr *cfr = &ar->cfr; + int ret; + *** 2276 LINES SKIPPED *** From nobody Wed Apr 22 21:09:22 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bg70KBQz6bLZP for ; Wed, 22 Apr 2026 21:09: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bg63d3hz3mRG for ; Wed, 22 Apr 2026 21:09:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/NbbzpbeEvovlJk5aPVPyrGVyg81/gdJ8Tt9pZqIgf8=; b=vbRY0qeGucInUBd4vZ1SB1yFi6pQFaqBxb7xFv9RHoDjUw0u9GPakOF7YHh4lYZx8BMVed Od8v9cev/nze+TEjvKxvDBrltkpQjjoLHVdxIJzyNsmYNKZ6CsqQ3sbrOR6GFfi317dd34 4/ne4anzKn/RySBORo4zVKSPh/2jeVb77cLKPkq3QVnpmULI7DZLSBJFeOXu3IMZ5SgHVn ke5daM96WidpRqpcU3l+TYQh2mr2C6GHWPys0Krk4KcwWIT4iLSo31iG9EAYJ7R4UdnJxx cS5cIEh4fJBwec1Yr7HG0Rjua33hJF/aWsJrVoBORr3Mw2LlQN4Tr7d1OO+KoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892162; a=rsa-sha256; cv=none; b=XYm7RgH7TeaOcY2K0JZGkJynLPtenMOen42RL85Umot/qNWo7GeaOFnOWQTlRhIftN4eNF /GOu5h7JrKW0h+lXzG6cILNL0hXT/fVjdGEtDJx42mju8fZtKxFRYXtN3gYgx1/l78CUDt 7JprTqPRB2it8KK2mSEax8+ADYLDr+NjlbGHFmsD3l+LmpD0p0d9BnvQpEfhxMOL//gJ6w S60iIfIe8Ypp7uwYvmoXbQJAF0c9jIkLJeOYrEImrR+H9fZQx7jldPSkErCZQHmlrCzP/X ayOfr9cFQ4eRqOlEcb5c9pgYvUFy6cWX06dQt9JAiVwvoQ63V9R3Z73biEPjcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/NbbzpbeEvovlJk5aPVPyrGVyg81/gdJ8Tt9pZqIgf8=; b=PHbZmIG2LnY2mOlZhvDskIyBp+QTjiU9SR3iR/1wBwWjbBp03ffFtgyDyXI9sdwBnZwTrd X9ZLJQQniLUJuQuW/1A2dayqeIvj2Q3FUPmVu+B1vI7NfFXeOwm2EXWLx3vy9Nyj+/NtGM sOzidZDGRbzQ/4BcSXQTMZCD6BnJSW9ySuOVUoxs9kv6V2tcfFpfvTAkJq72s/Rs6a6kqO HgfYA4wfH0QhTw9X7CHdGPaJeCMprxo9MF3cm3Pkc2iBs7JM5Zhz/MaAr8S1jnKD3O7Hzx idgRAvwWdvk95SsRcxkjCD5nZ+FJHBP86hw4v+WQDg74tsEmBg69RMAtEKGpMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bg63BTKzncn for ; Wed, 22 Apr 2026 21:09:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30a8b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:09:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: dd8d3ae8e531 - stable/15 - ath12k: update module Makefiles for v7.0 driver 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: dd8d3ae8e531c5843f1638aa34b290267dca88e6 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:09:22 +0000 Message-Id: <69e93902.30a8b.5696cc54@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=dd8d3ae8e531c5843f1638aa34b290267dca88e6 commit dd8d3ae8e531c5843f1638aa34b290267dca88e6 Author: Bjoern A. Zeeb AuthorDate: 2026-04-19 15:48:58 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:17 +0000 ath12k: update module Makefiles for v7.0 driver version Update LINUXKPI_VERSION to reflect that the driver is based on Linux v7.0. Handle the file changes and the extra wifi7/ subdirectory. Sponsored by: The FreeBSD Foundation (cherry picked from commit 5cfadb6633128dccc32b1e4f84386ad705adc721) --- sys/modules/ath12k/Makefile | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sys/modules/ath12k/Makefile b/sys/modules/ath12k/Makefile index 018504812995..ecca0bc3b409 100644 --- a/sys/modules/ath12k/Makefile +++ b/sys/modules/ath12k/Makefile @@ -13,13 +13,21 @@ ATH12K_TRACING= 0 KMOD= if_ath12k -SRCS+= core.c hal.c hal_tx.c hal_rx.c +SRCS+= core.c hal.c SRCS+= wmi.c mac.c reg.c htc.c qmi.c SRCS+= dp.c dp_tx.c dp_rx.c dp_mon.c debug.c -SRCS+= ce.c peer.c dbring.c hw.c fw.c p2p.c +SRCS+= ce.c peer.c dbring.c fw.c p2p.c +SRCS+= dp_htt.c dp_peer.c + +SRCS+= wifi7/ce.c wifi7/core.c +SRCS+= wifi7/dp.c wifi7/dp_mon.c wifi7/dp_rx.c wifi7/dp_tx.c +SRCS+= wifif/hal.c wifi7/hal_tx.c wifi7/hal_rx.c +SRCS+= wifi7/hal_qcc2072.c wifi7/hal_qcn9274.c wifi7/hal_wcn7850.c +SRCS+= wifi7/hw.c wifi7/wmi.c .if defined(ATH12K_PCI) && ${ATH12K_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} SRCS+= mhi.c pci.c +SRCS+= wifi7/mhi.c wifi7/pci.c .else .error ath12k requires PCI support compiled in at this point .endif @@ -27,6 +35,7 @@ SRCS+= mhi.c pci.c .if defined(ATH12K_AHB) && ${ATH12K_AHB} > 0 CFLAGS+= -DCONFIG_ATH12K_AHB SRCS+= ahb.c +SRCS+= wifi7/ahb.c .endif .if defined(ATH12K_DEBUGFS) && ${ATH12K_DEBUGFS} > 0 CFLAGS+= -DCONFIG_ATH12K_DEBUGFS @@ -62,6 +71,6 @@ CFLAGS+= ${LINUXKPI_INCLUDES} CFLAGS+= -DCONFIG_ATH12K_DEBUG CFLAGS+= -DKBUILD_MODNAME='"ath12k"' -CFLAGS+= -DLINUXKPI_VERSION=61900 +CFLAGS+= -DLINUXKPI_VERSION=70000 .include From nobody Wed Apr 22 21:09:23 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bg81JVqz6bL9B for ; Wed, 22 Apr 2026 21:09:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bg74GgNz3mRP for ; Wed, 22 Apr 2026 21:09:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y5DQ8PGMQnzbiaK+juGX8muq3IweM6rtzCj30FP0Ibw=; b=p4KpyQRY2eZW5hBmQ8gqNgSv5hQYq1vZuYeItL7LA7hVt+6tAMI/P7plj4rLoRjqGQY3fZ uUD8OsjrgPegfcLub2h8sup2T2HPb6vkw0LUa81zdx/O7g8IX1oH0ERURqmsOZhEuMRMw8 hgEjys7FTl219WT5hqiZQsz74/5eJLVAjUKozjKIEquTnI3UMQbfZ5Kpfj1acPdSFKTfmb gumzOxhGBBx9qxruK3TjBfEXmTgg44RYwL/IumTZgaYz/CLo/ldZvHBw95L/1R1Lbaj0is 8daAUg3YBRNaZJtlPE78aOsTm1izl9OXrYvFlutiLUmge4xVIW5Rp5Jrsn4DSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892163; a=rsa-sha256; cv=none; b=J3Xgc/5+3GzCpls245HsBKYdZJmuYh+RID5AlR54KlmHDaXpxLvhsITAnUz5JMbxo4KS4q J6fTIUSHaGbpyrG3uzyyRpYSkHd/KR0DDhV4nUnUVgsuBDkfpjtCaT/DnbC69EYGsEWE6j /7On6M4Ij5IqYH65t1xNwoUBSCr8D1ASbtISbro3m9WtYVjYCBLwvO4tKduv2WMQF8oAon etpLB00554bKHAFmgsPorruNrZC/STMip7HYUNepYkVzltCVsvLsvjO9TqpYrnzpbbzgIq KcHPUlGClv2ZZ83A8Y7l28aWKt3SO2NzXyg6ZNaaH4p8QLtad9POv8JTl1ddZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y5DQ8PGMQnzbiaK+juGX8muq3IweM6rtzCj30FP0Ibw=; b=ylACCP3ZMl//6b9BC+v83qFZq299Zl7HZuuZtZj6qghbjtnPX5LWQH/ccvaLSokSElHAtm 4x95oppGff2nrwtpT61/2T+xq7oEGlyy1FUkuT+zk0Sqa38JbAzdZiXVpyPmQD7Ufsmg+/ BDmHSvCXVxHfi0cXZb1QSY7V62r7CMOk0TlAKTWxXBOOp7el7bITxu1pQo2y7na3DT8Ajh Q74Lew4CBB1w2/kl3w+zw0zPKQZMu5xUvsHz8z97mMLtJeL+U+OHLyoRSmMy7stMaLGeud Kof5sftWGEyx3ojZBU4aMt0Ra7SHFEouV8CPebXUMhGPjrxoczjBKs0oXh1DVA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bg73r60znXC for ; Wed, 22 Apr 2026 21:09:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26abf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:09:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 8696cc8d0bbf - stable/15 - rtw89: fix mismerge List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 8696cc8d0bbf4a87bc7c87186b0c5d35253b91ca Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:09:23 +0000 Message-Id: <69e93903.26abf.36311834@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8696cc8d0bbf4a87bc7c87186b0c5d35253b91ca commit 8696cc8d0bbf4a87bc7c87186b0c5d35253b91ca Author: Bjoern A. Zeeb AuthorDate: 2025-12-03 22:13:10 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:57:17 +0000 rtw89: fix mismerge Due to FreeBSD-specific code it seems a code update was not applied to the FreeBSD part during the v6.17 driver update. Add the missing lines. Sponsored by: The FreeBSD Foundation Fixes: b35044b38f74c (cherry picked from commit adb16cd389c3456cbd538b658c3c0af5145dde91) --- sys/contrib/dev/rtw89/core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/contrib/dev/rtw89/core.c b/sys/contrib/dev/rtw89/core.c index c834649014b4..7fea67b63624 100644 --- a/sys/contrib/dev/rtw89/core.c +++ b/sys/contrib/dev/rtw89/core.c @@ -2278,6 +2278,8 @@ static int rtw89_core_rx_parse_phy_sts(struct rtw89_dev *rtwdev, end = phy_ppdu->buf + phy_ppdu->len; #elif defined(__FreeBSD__) pos = (u8 *)phy_ppdu->buf + PHY_STS_HDR_LEN; + if (phy_ppdu->hdr_2_en) + pos += PHY_STS_HDR_LEN; end = (u8 *)phy_ppdu->buf + phy_ppdu->len; #endif while (pos < end) { From nobody Wed Apr 22 21:09:24 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bg91Bcrz6bLX3 for ; Wed, 22 Apr 2026 21:09:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bg84fxmz3mRb for ; Wed, 22 Apr 2026 21:09:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hdwCJ4229YC5TguB2FT34Cb1SMv6iMbiXOtAfgwmQtQ=; b=Ra6UDmsry2LH0TJ8wxgrGRozoCn4ySIAA716kjrbxKoV3KbKJZX8LrKc2YcYEgeUHdt/2A OehqvqMfNiX6q6b0gSmrA/va+REB9Nxe5OW3OUmWia4nu2x5XuNHahg9OyQFzJvjpT9msQ Tb8KJwGE8U4wH9CMAMPU3bL0W+ldpyvsaevzizvlNdjVEaShfjIGx8+LguZVvBbzWlW+vL VdX13PR4mb2dp8yzKlovwcpAacff5U5sIIlpdgXepoWlvEqhLJSnSegFOD27IB9wGeAwf+ YlawOSF36lNzKoxPehpCXVpyCJcOgj97mwmGv7fkcZHG/aNFaobXFbrG10Aalw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892164; a=rsa-sha256; cv=none; b=bKS9wzTRNWWKH2/6B59MW7hr8/LHsPceEHwMyca21DmpmX136T/r5SuK/ryRhdzrpj4d5N vsfX6TlMIhXV0hWfnrz1fsgTRq15ftrfQTdIaCJbGT9k1bXQEl3i7h5US213oSpPfAE7Q8 VzLXeNsKzKqkiYMXE637TfbA3UE+lW7eYhPN0MN122Ms7HIt7W7mcrgWc86aoSle2cSHC5 4fWnmolM2T9HpgWBF2AAnbDQ6cu5JxEpJYhXNH1c9T8HsOObI5Svs+t9wEdXvBLGWudjpC udlDWWP7frB21Z9ATX3eE4Rt/mgB6JdAx7ehrOeFPqWF/Edf38raoPtvXZm5zA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hdwCJ4229YC5TguB2FT34Cb1SMv6iMbiXOtAfgwmQtQ=; b=pdzOGkKshlSSYYvQO8lbwfZYWRNpYIX5Wt717JIOGL8BZRrmHaz6RKbWLeItDcMhFux9xG bITKvlFoGtoGmToTgRfj+dVedaLuxpOeL1mJ3KtB9Vvgd75Ed6zB14Hzvh7P/749BR8WPy LwImnrlr4C1DTODmAsSa7Jg+CqtMiuHEHsXq7wuBYZ5+8KYnJgr/j+4e9DMaqaxBAf+zuF iU221pBtmSsbh2fp5I0q2sezMCzv/1eJZv/qo1cSubVni3FS3X7dpKjw6ZRhKs/P7MrPnS 13pQ0xBtCAfWKOJLDEFm1r5ly/3ANRVimRP+xiiTKp7Bfcnz+Rl4O6A2UcKDpA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bg84GDyzncq for ; Wed, 22 Apr 2026 21:09:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25f5b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:09:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: d1c800badec7 - stable/15 - UPDATING: Bump __FreeBSD_version to 1500508 List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d1c800badec7750194ba19a225d364377b74362b Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:09:24 +0000 Message-Id: <69e93904.25f5b.44d5e0b9@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d1c800badec7750194ba19a225d364377b74362b commit d1c800badec7750194ba19a225d364377b74362b Author: Bjoern A. Zeeb AuthorDate: 2026-04-22 21:04:02 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 21:04:02 +0000 UPDATING: Bump __FreeBSD_version to 1500508 Bump __FreeBSD_version to 1500508 for LinuxKPI to be able to track changes to eventfd, changes for DRM 6.11, changes of LinuxKPI 802.11 based on Linux v7.0. Sponsored by: The FreeBSD Foundation --- UPDATING | 5 +++++ sys/sys/param.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 3515623bdfb0..034dabc4da81 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,11 @@ 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. +20260422: + Bump __FreeBSD_version to 1500508 for LinuxKPI after merges of + changes to eventfd and changes for DRM 6.11, as well as + LinuxKPI 802.11 based on Linux v7.0. + 20260407: OpenPAM (including libpam and the PAM modules) has moved to the new "pam" package. The pam-lib subpackage, which includes libpam, will diff --git a/sys/sys/param.h b/sys/sys/param.h index c29110945401..af5ff860c082 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -74,7 +74,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1500507 +#define __FreeBSD_version 1500508 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Wed Apr 22 22:42:44 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Dkr6QlBz6b0LM for ; Wed, 22 Apr 2026 22:42:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Dkr5cRsz3VC5 for ; Wed, 22 Apr 2026 22:42:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776897764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gx8OvNj/bN5zZQPiVTJg4ySEvXpukeU6CH5t2V3k/X4=; b=En+DG+k9XRGtOTg3ovCUvEJxRgASyNIe8m6NtJKfnUpP7PYLNCssg76xIrrn+g6jiudskJ P/SoBBnlk9ENxnbZwF5TOQCcVw5zUL5HEF63VXy0osb18/VY1QumpinUJeqpdFGocfKyqn wh6wGE7kcB1Xl14Ju1kqOAKW6KlpLR4WRwCdG/1U2Kiga5cM4mdtpB1o6Dl8gtYV4x2ZRC fmphudsk1TMh67VhMlczJxr/OAvGawvy+69oO/XTrUjkh5WAAGCGVVuxecvv+NDkpjU/Zr ntQInSEStPQrn/tABXGFxCjcnkNeWN0jvs6rA5uNpbfAcdiFX9zBxK/Q5tSStw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776897764; a=rsa-sha256; cv=none; b=RTZS1pk/X7Q4p9pNFUlgJp0g1R2Umf02f3M7AQ7ioCf4UjerI1vvllHad58Yh/z05dOq82 U58z/AJ3YnDmIpF9FlL7wBEp4csybV1IlJylPkxSwfGIUd7aYGeNMb6Few2DMy368d9fGC qyNjUpb4kQuDnhas2Q+sj5m2RZaZlDsBjCRCUTLFpENdD1F8gtXTlpG9L9rXMC21gh/fkx raS8lFthpeLoQqIBHwnTGiZyjgko7QsLzckTTzqdHVf40NvZGaEEi8KkZXyl/NWKC8YE4W ypxbye1EFzvsCtK374OfvNL3tLYdT82C7W8iMJ1sjgBWi/o4JtsDdKfMIjLjcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776897764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gx8OvNj/bN5zZQPiVTJg4ySEvXpukeU6CH5t2V3k/X4=; b=Z1fRS5wWkbJT8BzW0O8jun7SabvYXNKCgcuHfgvuWLpScKey5EBCPfn8Ga1uUks2k9h0jC bBGARdqzeJ3lCoi5z3f0/HWvyPK44+qza9J28gh/oR2gAZP96hMSuY2LPALXYC9Nn88Nps XyMqB0pUWp79CV6wEc5bglR8qGIVIJemSZWlqo965CCmiotLzd0XeB/k6y96Gn/FowVkWC rTAmVTn/lZ389e/WGe2h0tm1Qk3getaWIYg5ikbo5SBVc3YZt7IVwmRodwYVda34ZCatdy I+R87SyGNsywRFgSnUMYT7x0XJlOJAm8T+AjJU/23TwTjk138mrM2fgx6ysHBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Dkr57pwzqyc for ; Wed, 22 Apr 2026 22:42:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ac9b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 22:42:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 0705da1e8085 - stable/15 - Revert "EC2: Add clibs-lib32 pkg to small/builder images" List-Id: Commits to the stable branches 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: 0705da1e80858acaf04a9f103ae2dece1c58c9ab Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 22:42:44 +0000 Message-Id: <69e94ee4.3ac9b.232e176a@gitrepo.freebsd.org> The branch stable/15 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=0705da1e80858acaf04a9f103ae2dece1c58c9ab commit 0705da1e80858acaf04a9f103ae2dece1c58c9ab Author: Colin Percival AuthorDate: 2026-04-13 19:42:57 +0000 Commit: Colin Percival CommitDate: 2026-04-22 22:42:21 +0000 Revert "EC2: Add clibs-lib32 pkg to small/builder images" This should no longer be necessary after 2018ae4e3b6a. This reverts commit cfe0b7d37e552d78762c029f5b15e0f36d9d0d38. (cherry picked from commit fa31e76a4c147eb5148595c9f3615040fcac74e5) --- release/tools/ec2-builder.conf | 1 - release/tools/ec2-small.conf | 1 - 2 files changed, 2 deletions(-) diff --git a/release/tools/ec2-builder.conf b/release/tools/ec2-builder.conf index a272ea49a426..3b0344f9eb9a 100644 --- a/release/tools/ec2-builder.conf +++ b/release/tools/ec2-builder.conf @@ -17,7 +17,6 @@ vm_extra_filter_base_packages() { -e '.*-dbg$' \ -e '.*-lib32$' \ -e '^FreeBSD-set-tests' - echo FreeBSD-clibs-lib32 } # Packages to install into the image we're creating. In addition to packages diff --git a/release/tools/ec2-small.conf b/release/tools/ec2-small.conf index c1a05f98356f..6564a59c2cf6 100644 --- a/release/tools/ec2-small.conf +++ b/release/tools/ec2-small.conf @@ -20,7 +20,6 @@ vm_extra_filter_base_packages() { -e '.*-dbg$' \ -e '.*-lib32$' \ -e '^FreeBSD-set-tests' - echo FreeBSD-clibs-lib32 } # Packages to install into the image we're creating. In addition to packages From nobody Wed Apr 22 22:47:32 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1DrP0vFWz6b0yM for ; Wed, 22 Apr 2026 22:47:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1DrP0Ftsz3VgR for ; Wed, 22 Apr 2026 22:47:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776898053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t2SDsi3bTISLlYO5xWEsAbmRUrr+J6zBcTFczED23Tg=; b=yIt8xR4rMaLfDvIFbrvah+uPHWfBA4ztm8UognB35S7J6gB2c0uMDOpQI/OkqaKNX5RC0t bqwCvIBq9bp2ngwl7jNUjzoV/qfhkMCzzILXtXM0dJDGo1F1MV2LWahU2rpJu7Uh6/6mX8 YTXxjBRdj5mzzr7HK0zJi3B/4iOGGc5Ocpah6Gu5Z9725sErSrbDqSXtFx2CsGtEkwKIDl 6EeQYzUCl+YsMoPzOq1dLtILOCf9FU6fVSCHxwP3FIBFTIMtoMYlCNY3N7N+tcBKGY8xr0 z6PURyXZEcyDV56cbdBAqIPlhpm9YCYS/r+TimQ1NLDtYz7sD4ADqFWw29dqcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776898053; a=rsa-sha256; cv=none; b=xlSp7kit32m7Bj1Mgjq1kcEijsolVZGviCNrdRlgRn+4hZI8tJDZn45pjFrCM7TfYpkGWZ SRAvtmJD3ifrxVW1hwSywWNl74S0pK7hdQNokSAsUBi9LvpOkIXyqTBmfOalETuv0amRWl fOKTwtnC9mVRWcInMNgoEfda2KpBzd8+v5qepraqS2ZWdcN5D0Ie1WgfEuzlK7TN/JGile PPwHJrs/9gekhZ0ELdFIYOKTxngRyBsC66wlwzGSewU/llhTh/le2LCl+UXqJ/yVpvgeE+ 8iSNgr8rwFSVY25mxC02clWGe0vYsN8hmHYZmdjf/QtCIyxPH1Nhj0K99Vt5jg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776898053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t2SDsi3bTISLlYO5xWEsAbmRUrr+J6zBcTFczED23Tg=; b=LeORoD44eKvX5u8pWOkorU8+/qRnRx7MDCE5TjOIlRH4oK1aw2UT90rJgSlCU3xsbLzOmo YQhRIKKMQuWmAr00w0YVle8ws6u0573BPjNWl30Z1M61wBxadO4vg2UTCqkzARKzkEs0AO +FafeuhTzRFNoQkKOT1ybSRXkHkL0D5nFimso6pRVOHQZoJYKAwiyPBrgAuQwEYuHv28cm jh4hp5If4Y/Iig8dC6PI7ocVFzWQsx52Rtcf2IEJojqS4IZuRD2A2sT27NQHgJ9+OYa3oF zJQtL5WakdcN50jQpdYvdmKMXUuhpl/BhBsTTS+aJOO5H7c0Psx1mWRn22hNMw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1DrN6gJjzr9F for ; Wed, 22 Apr 2026 22:47:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39c3a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 22:47:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 5cfbcaa13fb3 - stable/15 - dpaa2: ni: add more stats and link information List-Id: Commits to the stable branches 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5cfbcaa13fb3176dc92574382558f4c4dbfc7d41 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 22:47:32 +0000 Message-Id: <69e95004.39c3a.33a0f417@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=5cfbcaa13fb3176dc92574382558f4c4dbfc7d41 commit 5cfbcaa13fb3176dc92574382558f4c4dbfc7d41 Author: Bjoern A. Zeeb AuthorDate: 2026-02-17 03:04:41 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 22:47:17 +0000 dpaa2: ni: add more stats and link information In addition to the locally generated statistics counters, dpaa2 ni provides a larger set of counters than we currently export via sysctl. Add (most of) the missing counters and descriptions. Around Page 3/4 there are some things left to do if we want. Also the manual was not clear on the descriptions of 3/0 and 3/1. The second half of the change adds another sysctl note which exports the link-state, speed, and capabilities set as a text-blob. This is especially interesting in case the "ni" stops passing packets. From what I have found in that case the (internal) link state of the ni goes DOWN but we do not see an interrupt for a link-state change. Being able to diagnose the state helps to (manually) fix it for now by changing the media status to 10BaseT or none and then back to auto. That usually brings the internal link state back UP. PR: 279352 Reviewed by: dsl, tuexen Differential Revision: https://reviews.freebsd.org/D55321 (cherry picked from commit c8cd633d78d04ff535960002ac9d1ab20f74b201) --- sys/dev/dpaa2/dpaa2_ni.c | 129 +++++++++++++++++++++++++++++++++++++++++------ sys/dev/dpaa2/dpaa2_ni.h | 5 +- sys/dev/dpaa2/dpaa2_rc.c | 9 ++-- 3 files changed, 120 insertions(+), 23 deletions(-) diff --git a/sys/dev/dpaa2/dpaa2_ni.c b/sys/dev/dpaa2/dpaa2_ni.c index 5f9282e120e4..948e903f4329 100644 --- a/sys/dev/dpaa2/dpaa2_ni.c +++ b/sys/dev/dpaa2/dpaa2_ni.c @@ -57,6 +57,7 @@ #include #include #include +#include #include #include @@ -358,19 +359,43 @@ static struct dpni_stat { int cnt; char *name; char *desc; -} dpni_stat_sysctls[DPAA2_NI_STAT_SYSCTLS] = { +} dpni_stat_sysctls[] = { /* PAGE, COUNTER, NAME, DESCRIPTION */ - { 0, 0, "in_all_frames", "All accepted ingress frames" }, - { 0, 1, "in_all_bytes", "Bytes in all accepted ingress frames" }, - { 0, 2, "in_multi_frames", "Multicast accepted ingress frames" }, - { 1, 0, "eg_all_frames", "All egress frames transmitted" }, - { 1, 1, "eg_all_bytes", "Bytes in all frames transmitted" }, - { 1, 2, "eg_multi_frames", "Multicast egress frames transmitted" }, - { 2, 0, "in_filtered_frames", "All ingress frames discarded due to " - "filtering" }, - { 2, 1, "in_discarded_frames", "All frames discarded due to errors" }, - { 2, 2, "in_nobuf_discards", "Discards on ingress side due to buffer " - "depletion in DPNI buffer pools" }, + { 0, 0, "in_all_frames", "All accepted ingress frames" }, + { 0, 1, "in_all_bytes", "Bytes in all accepted ingress frames" }, + { 0, 2, "in_mc_frames", "Multicast accepted ingress frames" }, + { 0, 3, "in_mc_bytes", "Bytes in received multicast frames" }, + { 0, 4, "in_bc_frames", "Broadcast accepted ingress frames" }, + { 0, 5, "in_bc_bytes", "Bytes in broadcast multicast frames" }, + + { 1, 0, "eg_all_frames", "All egress frames transmitted" }, + { 1, 1, "eg_all_bytes", "Bytes in all frames transmitted" }, + { 1, 2, "eg_mc_frames", "Multicast egress frames transmitted" }, + { 1, 3, "eg_mc_bytes", "Bytes in transmitted multicast frame" }, + { 1, 4, "eg_bc_frames", "Broadcast egress frames transmitted" }, + { 1, 5, "eg_bc_bytes", "Bytes in broadcast multicast frames" }, + + { 2, 0, "in_filtered_frames", "All ingress frames discarded due to filtering" }, + { 2, 1, "in_discarded_frames", "All frames discarded due to errors" }, + { 2, 2, "in_nobuf_discards", "Discards on ingress side due to buffer depletion in DPNI buffer pools" }, + { 2, 3, "eg_frames_disc", "Frames discarded on transmit due to DPNI configuration and/or frame state" }, + { 2, 4, "eg_frames_tx", "Frames that have been confirmed after transmission" }, + + /* XXX FIXME Page 3/4 can take a param as well not encoded here. */ + /* XXX 3/0 and 3/1 have the same description in the manual? Where's the difference? */ + { 3, 0, "bytes_dequeued", "Cumulative count of the number of bytes dequeued" }, + { 3, 1, "frames_dequeued", "Cumulative count of the number of frames dequeued" }, + { 3, 2, "bytes_enqueued_rej", "Cumulative count of the number of bytes in all frames whose enqueue was rejected." }, + { 3, 3, "frames_enqueued_rej", "Cumulative count of all frame enqueues rejected." }, + + { 4, 0, "fames_rej_tc", "Rejected frames in associated congestion point (valid if this TC has an associated congestion point)" }, + { 4, 1, "bytes_rej_tc", "Rejected bytes in associated congestion point (valid if this TC has an associated congestion point)" }, + + { 5, 0, "pol_red", "Policer RED packet counter. 32bit value valid only when policer is enabled." }, + { 5, 1, "pol_yel", "Policer YELLOW packet counter. 32bit value valid only when policer is enabled." }, + { 5, 2, "pol_gre", "Policer GREEN packet counter. 32bit value valid only when policer is enabled." }, + { 5, 3, "pol_re_red", "Policer recolored RED packet counter. 32bit value valid only when policer is enabled." }, + { 5, 4, "pol_re_yel", "Policer recolored YELLOW packet counter. 32bit value valid only when policer is enabled." }, }; struct dpaa2_ni_rx_ctx { @@ -453,6 +478,7 @@ static int dpaa2_ni_tx_conf(struct dpaa2_channel *, struct dpaa2_ni_fq *, static int dpaa2_ni_collect_stats(SYSCTL_HANDLER_ARGS); static int dpaa2_ni_collect_buf_num(SYSCTL_HANDLER_ARGS); static int dpaa2_ni_collect_buf_free(SYSCTL_HANDLER_ARGS); +static int dpaa2_ni_sysctl_link_state(SYSCTL_HANDLER_ARGS); static int dpaa2_ni_probe(device_t dev) @@ -1720,7 +1746,7 @@ dpaa2_ni_setup_sysctls(struct dpaa2_ni_softc *sc) node = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "stats", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "DPNI Statistics"); parent = SYSCTL_CHILDREN(node); - for (i = 0; i < DPAA2_NI_STAT_SYSCTLS; ++i) { + for (i = 0; i < nitems(dpni_stat_sysctls); ++i) { SYSCTL_ADD_PROC(ctx, parent, i, dpni_stat_sysctls[i].name, CTLTYPE_U64 | CTLFLAG_RD, sc, 0, dpaa2_ni_collect_stats, "IU", dpni_stat_sysctls[i].desc); @@ -1757,9 +1783,8 @@ dpaa2_ni_setup_sysctls(struct dpaa2_ni_softc *sc) CTLTYPE_U32 | CTLFLAG_RD, sc, 0, dpaa2_ni_collect_buf_free, "IU", "number of free Rx buffers in the buffer pool"); - parent = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)); - /* Add channels statistics. */ + parent = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)); node = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "channels", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "DPNI Channels"); parent = SYSCTL_CHILDREN(node); @@ -1778,6 +1803,13 @@ dpaa2_ni_setup_sysctls(struct dpaa2_ni_softc *sc) "Tx dropped counter"); } + /* Add Link debugging options. */ + parent = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)); + node = SYSCTL_ADD_PROC(ctx, parent, OID_AUTO, "link", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, + sc, 0, dpaa2_ni_sysctl_link_state, + "A", "DPNI link state information"); + return (0); } @@ -3422,7 +3454,7 @@ dpaa2_ni_collect_stats(SYSCTL_HANDLER_ARGS) struct dpaa2_devinfo *rcinfo = device_get_ivars(pdev); struct dpaa2_devinfo *dinfo = device_get_ivars(dev); struct dpaa2_cmd cmd; - uint64_t cnt[DPAA2_NI_STAT_COUNTERS]; + uint64_t cnt[DPAA2_NI_STAT_COUNTERS_PER_PAGE]; uint64_t result = 0; uint16_t rc_token, ni_token; int error; @@ -3454,6 +3486,71 @@ exit: return (sysctl_handle_64(oidp, &result, 0, req)); } +static int +dpaa2_ni_sysctl_link_state(SYSCTL_HANDLER_ARGS) +{ + struct dpaa2_ni_softc *sc; + struct dpaa2_devinfo *rcinfo; + struct dpaa2_devinfo *dinfo; + struct dpaa2_cmd cmd; + struct dpaa2_ni_link_state ls; + struct sbuf s; + int error; + uint16_t rc_token, ni_token; + + if (req->newptr) + return (EPERM); + + sc = (struct dpaa2_ni_softc *)arg1; + + rcinfo = device_get_ivars(device_get_parent(sc->dev)); + dinfo = device_get_ivars(sc->dev); + + DPAA2_CMD_INIT(&cmd); + + error = DPAA2_CMD_RC_OPEN(sc->dev, sc->dev, &cmd, rcinfo->id, &rc_token); + if (error != 0) { + device_printf(sc->dev, "%s: failed to open resource container: " + "id=%d, error=%d\n", __func__, rcinfo->id, error); + goto exit; + } + error = DPAA2_CMD_NI_OPEN(sc->dev, sc->dev, &cmd, dinfo->id, &ni_token); + if (error != 0) { + device_printf(sc->dev, "%s: failed to open network interface: " + "id=%d, error=%d\n", __func__, dinfo->id, error); + goto close_rc; + } + + error = DPAA2_CMD_NI_GET_LINK_STATE(sc->dev, sc->dev, &cmd, &ls); + + (void)DPAA2_CMD_NI_CLOSE(sc->dev, sc->dev, DPAA2_CMD_TK(&cmd, ni_token)); +close_rc: + (void)DPAA2_CMD_RC_CLOSE(sc->dev, sc->dev, DPAA2_CMD_TK(&cmd, rc_token)); + + if (error != 0) + goto exit; + +#define NI_LINK_STATE_OPTIONS_BITS \ + "\20\1AUTONEG\2HDX\3PAUSE\4ASYM_PAUSE" + + sbuf_new_for_sysctl(&s, NULL, 1024, req); + sbuf_putc(&s, '\n'); + sbuf_printf(&s, "Link State: %s (%s)\n", ls.link_up ? "UP" : "DOWN", + ls.state_valid ? "VALID" : "IGNORE"); + sbuf_printf(&s, "Link Rate: %ju\n", (uintmax_t)ls.rate); + sbuf_printf(&s, "Link Options: %b\n", + (int)ls.options, NI_LINK_STATE_OPTIONS_BITS); + sbuf_printf(&s, "Link Speed Capabilities: %#018jx\n", + (uintmax_t)ls.sup_speeds); + sbuf_printf(&s, "Link Speed Advertised for autoneg: %#018jx\n", + (uintmax_t)ls.adv_speeds); + sbuf_finish(&s); + sbuf_delete(&s); + +exit: + return (error); +} + static int dpaa2_ni_collect_buf_num(SYSCTL_HANDLER_ARGS) { diff --git a/sys/dev/dpaa2/dpaa2_ni.h b/sys/dev/dpaa2/dpaa2_ni.h index 9b1397fc544d..51da539dfa66 100644 --- a/sys/dev/dpaa2/dpaa2_ni.h +++ b/sys/dev/dpaa2/dpaa2_ni.h @@ -69,9 +69,8 @@ #define DPAA2_NI_BUFS_PER_TX (1 << 7) #define DPAA2_NI_MAX_BPTX (1 << 8) -/* Number of the DPNI statistics counters. */ -#define DPAA2_NI_STAT_COUNTERS 7u -#define DPAA2_NI_STAT_SYSCTLS 9u +/* Number of the DPNI statistics counters per page. */ +#define DPAA2_NI_STAT_COUNTERS_PER_PAGE 7u /* Error and status bits in the frame annotation status word. */ #define DPAA2_NI_FAS_DISC 0x80000000 /* debug frame */ diff --git a/sys/dev/dpaa2/dpaa2_rc.c b/sys/dev/dpaa2/dpaa2_rc.c index 3cb2fdfeaa2e..11bcf4fae717 100644 --- a/sys/dev/dpaa2/dpaa2_rc.c +++ b/sys/dev/dpaa2/dpaa2_rc.c @@ -1391,9 +1391,10 @@ dpaa2_rc_ni_get_link_state(device_t dev, device_t child, struct dpaa2_cmd *cmd, { struct __packed link_state_resp { uint32_t _reserved1; - uint32_t flags; + uint8_t flags; + uint8_t _reserved2[3]; uint32_t rate; - uint32_t _reserved2; + uint32_t _reserved3; uint64_t options; uint64_t supported; uint64_t advert; @@ -1890,7 +1891,7 @@ dpaa2_rc_ni_get_statistics(device_t dev, device_t child, struct dpaa2_cmd *cmd, uint16_t param; } *args; struct __packed get_statistics_resp { - uint64_t cnt[7]; + uint64_t cnt[DPAA2_NI_STAT_COUNTERS_PER_PAGE]; } *resp; struct dpaa2_mcp *portal = dpaa2_rc_select_portal(dev, child); int error; @@ -1907,7 +1908,7 @@ dpaa2_rc_ni_get_statistics(device_t dev, device_t child, struct dpaa2_cmd *cmd, error = dpaa2_rc_exec_cmd(portal, cmd, CMDID_NI_GET_STATISTICS); if (!error) { resp = (struct get_statistics_resp *) &cmd->params[0]; - for (int i = 0; i < DPAA2_NI_STAT_COUNTERS; i++) + for (int i = 0; i < DPAA2_NI_STAT_COUNTERS_PER_PAGE; i++) cnt[i] = resp->cnt[i]; } From nobody Thu Apr 23 03:49:55 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1MYH6RKPz6bTy0 for ; Thu, 23 Apr 2026 03:49: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1MYH5XNzz44WH for ; Thu, 23 Apr 2026 03:49:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776916195; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oZr0DoXAeOF7Om8fYGLlxH1UCClbu40yAXV1/gDUe4E=; b=Qdw9oAivZ89n5/zLOVQcG4ZUR8ppy2zUgXzkmL/T3YFTpIGlZtHnsH0UvS0PfY7hfLx84y hTUN+CPAxWMlR4rXmVFop333jHTIRkZYtUE3ahzlfWg8h/8EST3CbPJWuDX3g1U1zTdx/1 k45mPIpSTivbkg2iXfy5UmGwHU9p35E/v12NQ9G+Hn/rILvyohR9uN0zhP+LDokEdAkcWr VlWHlLpYndw0aZplv192bem/wsLtShIukAUpOWaGzViRgLsuLP84u0qn+0XdMVxd2PpRIY hayEyASONntYnb1pZ8Wfg3d5I+I5V4vGZh0A2DAG31VmaJsMlw8O4OnxlGNz5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776916195; a=rsa-sha256; cv=none; b=wz41bx2Oj8fFJeklegUjjgt6Q4xfi4mbicF3zC2xnDvIscxYCt1FpNlvteWPD3R5/F2kHh 61NjI5ZJPrs34lbfgFmqD2bQ+bT4IBYMPswfJPWfJSn4dxl/bEwrU941iJ35YDUccb8n4a JJ2d7gDIW4JpsRfdRU029BpJrGchnOlDyCgyLQMkrZpfgj5kuHa9Uks5oIcJIY2X9q1T/J 3lMEOdy9agN5g+NaMPV2B1I7+zKz/uXKA+MvqEWAOQVFoLlA3wkjZccrnyKRxcyuBsxBaO Y1dsFSL4Z/yqcXMGbEBGZKkkx0+7jXe+nvuU3QEVCKZDa0zf3QCqDTf0kD/8Xw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776916195; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oZr0DoXAeOF7Om8fYGLlxH1UCClbu40yAXV1/gDUe4E=; b=FsWIG0UeJq9Of3zFBX0rZ9sC7cLTNCxGRm3TG94KkEaVYRDib7EkYhdFFvp1Tc8Wmz736J 4YephYAY1hP/Me2Fbvo6W6z5vt4BWNaYPUzSFu5TgoQXsCWJf5wz4C2tC6tuMaXRCs8W/B 2ZLZK8xpIXu3WnDxlq4KF39QptYpBbKoUf/tPhLvAnKBY4s8Zv+KBmD74av0FylUNNl3d6 XWd+NvyVi6MVAyLO/GNfBCYRlrxWMX5YtIOahfUfu3gq/Vp4LjtrbaWjsoJzqXn/hGA3MF Yism5QupwVAGSZW+BZcK4XgC8IV6cTQORRMWBguLkNrAjN3eItmY9ImJnQ5r7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1MYH4yQnz10xX for ; Thu, 23 Apr 2026 03:49:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 397de by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Apr 2026 03:49:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 28b8f26beff9 - stable/14 - jail: tests: cleanup the commands test 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 28b8f26beff93c8fdd75b8fa29224938a62b173f Auto-Submitted: auto-generated Date: Thu, 23 Apr 2026 03:49:55 +0000 Message-Id: <69e996e3.397de.5a3c951e@gitrepo.freebsd.org> The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=28b8f26beff93c8fdd75b8fa29224938a62b173f commit 28b8f26beff93c8fdd75b8fa29224938a62b173f Author: Kyle Evans AuthorDate: 2025-07-26 03:13:40 +0000 Commit: Kyle Evans CommitDate: 2026-04-23 03:21:43 +0000 jail: tests: cleanup the commands test a bit We shouldn't be doing setup in a head() function, as this can cause various problems. For instance, in this case, it caused test listing to fail in some cases if we didn't get to execute the cleanup properly by complaining to stderr if the directory could not be created. Switch to using atf_check for sanity checking stdout; most of these expressions are self-explanatory and will make it clear what the problem is. commands.jail.conf contains a hard-coded path that we can avoid, which is probably good to avoid weird conflicts if other tests try to copy it and do the same. Just make a copy of our jail.conf and add the test's $PWD to it to get a generally unique jail root. Finally, simplify the cleanup handler a bit. Reviewed by: jamie (cherry picked from commit cfc595f4a05ed6fc690b17adee967e652b8636b3) --- usr.sbin/jail/tests/commands.jail.conf | 2 -- usr.sbin/jail/tests/jail_basic_test.sh | 35 +++++++++++++++++++--------------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/usr.sbin/jail/tests/commands.jail.conf b/usr.sbin/jail/tests/commands.jail.conf index afd56d1fa5d6..ad152a28b7fe 100644 --- a/usr.sbin/jail/tests/commands.jail.conf +++ b/usr.sbin/jail/tests/commands.jail.conf @@ -4,6 +4,4 @@ exec.prestart = "echo START"; exec.poststart = "env"; persist; -path = "/tmp/test_${name}_root"; - basejail {} diff --git a/usr.sbin/jail/tests/jail_basic_test.sh b/usr.sbin/jail/tests/jail_basic_test.sh index 73ed1f6ebb4b..51ccafb45f60 100755 --- a/usr.sbin/jail/tests/jail_basic_test.sh +++ b/usr.sbin/jail/tests/jail_basic_test.sh @@ -101,38 +101,43 @@ commands_head() { atf_set descr 'Commands jail test' atf_set require.user root - mkdir /tmp/test_basejail_root } commands_body() { + cp "$(atf_get_srcdir)/commands.jail.conf" jail.conf + echo "path = \"$PWD\";" >> jail.conf + # exec.prestart (START) and exec.poststart (env) - atf_check -s exit:0 -o save:stdout -e empty \ - jail -f $(atf_get_srcdir)/commands.jail.conf -qc basejail - grep -E '^START$' stdout || atf_fail "exec.prestart output not found" - grep -E '^JID=[0-9]+' stdout || atf_fail "JID not found in exec.poststart env output" - grep -E '^JNAME=basejail$' stdout || atf_fail "JNAME not found in exec.poststart env output" - grep -E '^JPATH=/tmp/test_basejail_root$' stdout || atf_fail "JPATH not found in exec.poststart env output" + atf_check -o save:stdout -e empty \ + jail -f jail.conf -qc basejail + + # exec.prestart output is missing + atf_check grep -qE '^START$' stdout + # JID was not set in the exec.poststart env + atf_check grep -qE '^JID=[0-9]+' stdout + # JNAME was not set in the exec.poststart env + atf_check grep -qE '^JNAME=basejail$' stdout + # JPATH was not set in the exec.poststart env + atf_check grep -qE "^JPATH=$PWD$" stdout # exec.prestop by jailname atf_check -s exit:0 -o inline:"STOP\n" \ - jail -f $(atf_get_srcdir)/commands.jail.conf -qr basejail + jail -f jail.conf -qr basejail # exec.prestop by jid - jail -f $(atf_get_srcdir)/commands.jail.conf -qc basejail + jail -f jail.conf -qc basejail atf_check -s exit:0 -o inline:"STOP\n" \ - jail -f $(atf_get_srcdir)/commands.jail.conf -qr `jls -j basejail jid` + jail -f jail.conf -qr `jls -j basejail jid` } -commands_cleanup() +commands_cleanup() { - jls -j basejail > /dev/null 2>&1 - if [ $? -e 0 ] - then + if jls -j basejail > /dev/null 2>&1; then jail -r basejail fi - rmdir /tmp/test_basejail_root } + atf_init_test_cases() { atf_add_test_case "basic" From nobody Thu Apr 23 03:49:56 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1MYK1bG4z6bTkg for ; Thu, 23 Apr 2026 03:49:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1MYK0DQ5z44Yy for ; Thu, 23 Apr 2026 03:49:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776916197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G9dVZCgd501SR6jgMp3j55JmFPcf0KapiJ7M3UBiNGY=; b=dN19CDGACbeOPwDz8zJklQmEML9dNajvitOc7zFyAszAnnDsYYBdga15OCRDcMefVBGrO0 a14wLCMB63nXKwbfn0F5BfAT9FE/z3iBKG4V5YZHPDuM8A2h/ZW3JU+e/8VguSirzy0N49 ekoNcaoUxj4k6E5KlZdL5oooJ2XbNKleLOCz/9a4+AoQKoUvFOs1VPzZlnafvPPA0BPrn+ gxQG1rvDfj7LvKd0SN+BAlazFl1OJM395vDn/oYHch0w1FcBvIn6EM8VwiM2b2l9QNovkE 0WXRhMLEHqmF9Kmc5yqszGj0iHrj5REEZpqzr8S8P2PttO8ZQVZE2SA1usOgcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776916197; a=rsa-sha256; cv=none; b=uuKKisq1LMe8kMTC7Ti33g4b55Jn6cQeROd6i/fFWsXxP38ubCdyeNX5MyNuTghfKinkF1 iStwHrziaSxu/wEAJO9V1bYcRGIxDjBaGGxjeCYUXmnghJ58T5ItNKpt9U4JtB+CEB0YyU huvu7eVgVJjf+SrxF/6U7gVQv1J2Z6TCJ8n3BgVW9ezp2Q9bGoiDlZP9we4kuyZF7SpkbJ 0HNL3vHA0OB8Clbu986ooxE6zcU2w0qUMwA4p9ZsfOBkMei5dKjZ/5WF3n12WdLkVnj4N5 nGsmMVtvHjxDBmrAdfN6znXZ+h0am8tA3rlQywAUuwwmW/mU9Zn28UC7z9+Lag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776916197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G9dVZCgd501SR6jgMp3j55JmFPcf0KapiJ7M3UBiNGY=; b=YmXmdZSE5k3413A9YuX0vVXroOGkZZR7p2ZgIEnu2IVXnP4GyA1l35L2Os+MB0+J6U65wJ 4S8BucqEAwfdgKs+o53hjWdAPMTw9o62LgBaqiht9/8/QfncOFA3VuhujQWWfL3MgG2L5Z 61PpJTusrOx2yY0P0I+re2lz0T51vXibA9Mp/O9jhigila08L2VaG6npQqhQqx0mYhMK9g 49ZaHnzsebX/m0jNXgc4z5fVTLQh0ipyLhn8MujFh5RJtsj7VDw2hVEUUC3Gqf/Q60g96A ErNJjm4fOHa+EVj1877PiR3YGjAVn1pcObURLkbeSF7qBHFQpzpoUMsnQnxabA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1MYJ5nmQz10xY for ; Thu, 23 Apr 2026 03:49:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ac9c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Apr 2026 03:49:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: df670d26ad5b - stable/14 - jail: consistently populate the KP_JID and KP_NAME parameters List-Id: Commits to the stable branches 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: df670d26ad5bebce71f39fc3bdc3ef11ed0f1ea8 Auto-Submitted: auto-generated Date: Thu, 23 Apr 2026 03:49:56 +0000 Message-Id: <69e996e4.3ac9c.14b0bfb4@gitrepo.freebsd.org> The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=df670d26ad5bebce71f39fc3bdc3ef11ed0f1ea8 commit df670d26ad5bebce71f39fc3bdc3ef11ed0f1ea8 Author: Kyle Evans AuthorDate: 2025-07-26 03:13:44 +0000 Commit: Kyle Evans CommitDate: 2026-04-23 03:22:59 +0000 jail: consistently populate the KP_JID and KP_NAME parameters The gaps here, specifically, were: - When we have to discover a running jail's jid from name, we should populate the missing jid param - When we populate jid/name from the config, if the name is a jid we wouldn't populate the name; now we do both. - When we create a jail, we should populate jid and name with whatever details we have now that we didn't both. As a consequence, we can cleanup a few things: - vnet.interface and zfs.dataset can just always use the jid - Trying to populate JNAME should always work now, where it would be a little crashy before if you create a jail that didn't have a name or jid on the command line - We can simplify the just-prior JID population now that we'll keep a stringified jid in our intparams. This primarily fixes the below, but the issues with vnet.interface and zfs.dataset were pre-existing. Fixes: d8f021add40c3 ("jail: add JID, JNAME and JPATH to env [...]") Reviewed by: jamie (cherry picked from commit 02944d8c4969ffe97fcf84cb2ccb672e828c1d04) --- usr.sbin/jail/command.c | 36 ++++++--- usr.sbin/jail/config.c | 13 +++- usr.sbin/jail/jail.c | 7 ++ usr.sbin/jail/tests/jail_basic_test.sh | 129 +++++++++++++++++++++++++++++++++ 4 files changed, 173 insertions(+), 12 deletions(-) diff --git a/usr.sbin/jail/command.c b/usr.sbin/jail/command.c index 20f28abc6706..26eaeca442a9 100644 --- a/usr.sbin/jail/command.c +++ b/usr.sbin/jail/command.c @@ -291,8 +291,8 @@ run_command(struct cfjail *j) const struct cfstring *comstring, *s; login_cap_t *lcap; const char **argv; - char *acs, *ajidstr, *cs, *comcs, *devpath; - const char *jidstr, *conslog, *path, *ruleset, *term, *username; + char *acs, *cs, *comcs, *devpath; + const char *conslog, *path, *ruleset, *term, *username; enum intparam comparam; size_t comlen; pid_t pid; @@ -333,6 +333,25 @@ run_command(struct cfjail *j) printf("%d\n", j->jid); if (verbose >= 0 && (j->name || verbose > 0)) jail_note(j, "created\n"); + + /* + * Populate our jid and name parameters if they were not + * provided. This simplifies later logic that wants to + * use the jid or name to be able to do so reliably. + */ + if (j->intparams[KP_JID] == NULL) { + char ljidstr[16]; + + (void)snprintf(ljidstr, sizeof(ljidstr), "%d", + j->jid); + add_param(j, NULL, KP_JID, ljidstr); + } + + /* This matches the kernel behavior. */ + if (j->intparams[KP_NAME] == NULL) + add_param(j, j->intparams[KP_JID], KP_NAME, + NULL); + dep_done(j, DF_LIGHT); } return 0; @@ -457,8 +476,7 @@ run_command(struct cfjail *j) argv[0] = _PATH_IFCONFIG; argv[1] = comstring->s; argv[2] = down ? "-vnet" : "vnet"; - jidstr = string_param(j->intparams[KP_JID]); - argv[3] = jidstr ? jidstr : string_param(j->intparams[KP_NAME]); + argv[3] = string_param(j->intparams[KP_JID]); argv[4] = NULL; break; @@ -772,14 +790,10 @@ run_command(struct cfjail *j) endpwent(); } if (!injail) { - if (asprintf(&ajidstr, "%d", j->jid) == -1) { - jail_warnx(j, "asprintf jid=%d: %s", j->jid, - strerror(errno)); - exit(1); - } - setenv("JID", ajidstr, 1); - free(ajidstr); + if (string_param(j->intparams[KP_JID])) + setenv("JID", string_param(j->intparams[KP_JID]), 1); setenv("JNAME", string_param(j->intparams[KP_NAME]), 1); + path = string_param(j->intparams[KP_PATH]); setenv("JPATH", path ? path : "", 1); } diff --git a/usr.sbin/jail/config.c b/usr.sbin/jail/config.c index 8c9ff0a7bd09..42498f01efd0 100644 --- a/usr.sbin/jail/config.c +++ b/usr.sbin/jail/config.c @@ -156,11 +156,14 @@ load_config(const char *cfname) TAILQ_CONCAT(&opp, &j->params, tq); /* * The jail name implies its "name" or "jid" parameter, - * though they may also be explicitly set later on. + * though they may also be explicitly set later on. After we + * collect other parameters, we'll go back and ensure they're + * both set if we need to do so here. */ add_param(j, NULL, strtol(j->name, &ep, 10) && !*ep ? KP_JID : KP_NAME, j->name); + /* * Collect parameters for the jail, global parameters/variables, * and any matching wildcard jails. @@ -180,6 +183,14 @@ load_config(const char *cfname) TAILQ_FOREACH(p, &opp, tq) add_param(j, p, 0, NULL); + /* + * We only backfill if it's the name that wasn't set; if it was + * the jid, we can assume that will be populated later when the + * jail is created or found. + */ + if (j->intparams[KP_NAME] == NULL) + add_param(j, j->intparams[KP_JID], KP_NAME, NULL); + /* Resolve any variable substitutions. */ pgen = 0; TAILQ_FOREACH(p, &j->params, tq) { diff --git a/usr.sbin/jail/jail.c b/usr.sbin/jail/jail.c index 9e443c9f3f1d..c99fb162786b 100644 --- a/usr.sbin/jail/jail.c +++ b/usr.sbin/jail/jail.c @@ -887,7 +887,14 @@ running_jid(struct cfjail *j, int dflag) j->jid = -1; return; } + j->jid = jail_get(jiov, 2, dflag ? JAIL_DYING : 0); + if (j->jid > 0 && j->intparams[KP_JID] == NULL) { + char jidstr[16]; + + (void)snprintf(jidstr, sizeof(jidstr), "%d", j->jid); + add_param(j, NULL, KP_JID, jidstr); + } } static void diff --git a/usr.sbin/jail/tests/jail_basic_test.sh b/usr.sbin/jail/tests/jail_basic_test.sh index 51ccafb45f60..a6859b4dc7f2 100755 --- a/usr.sbin/jail/tests/jail_basic_test.sh +++ b/usr.sbin/jail/tests/jail_basic_test.sh @@ -137,10 +137,139 @@ commands_cleanup() fi } +atf_test_case "jid_name_set" "cleanup" +jid_name_set_head() +{ + atf_set descr 'Test that one can set both the jid and name in a config file' + atf_set require.user root +} + +find_unused_jid() +{ + : ${JAIL_MAX=999999} + + # We'll start at a higher jid number and roll through the space until + # we find one that isn't taken. We start high to avoid racing parallel + # activity for the 'next available', though ideally we don't have a lot + # of parallel jail activity like that. + jid=5309 + while jls -cj "$jid"; do + if [ "$jid" -eq "$JAIL_MAX" ]; then + atf_skip "System has too many jail, cannot find free slot" + fi + + jid=$((jid + 1)) + done + + echo "$jid" | tee -a jails.lst +} +clean_jails() +{ + if [ ! -s jails.lst ]; then + return 0 + fi + + while read jail; do + if jls -e -j "$jail"; then + jail -r "$jail" + fi + done < jails.lst +} + +jid_name_set_body() +{ + local jid=$(find_unused_jid) + + echo "basejail" >> jails.lst + echo "$jid { name = basejail; persist; }" > jail.conf + atf_check -o match:"$jid: created" jail -f jail.conf -c "$jid" + atf_check -o match:"$jid: removed" jail -f jail.conf -r "$jid" + + echo "basejail { jid = $jid; persist; }" > jail.conf + atf_check -o match:"basejail: created" jail -f jail.conf -c basejail + atf_check -o match:"basejail: removed" jail -f jail.conf -r basejail +} + +jid_name_set_cleanup() +{ + clean_jails +} + +atf_test_case "param_consistency" "cleanup" +param_consistency_head() +{ + atf_set descr 'Test for consistency in jid/name params being set implicitly' + atf_set require.user root +} + +param_consistency_body() +{ + local iface jid + + echo "basejail" >> jails.lst + + # Most basic test: exec.poststart running a command without a jail + # config. This would previously crash as we only had the jid and name + # as populated at creation time. + atf_check jail -c path=/ exec.poststart="true" command=/usr/bin/true + + iface=$(ifconfig lo create) + atf_check test -n "$iface" + echo "$iface" >> interfaces.lst + + # Now do it again but exercising IP_VNET_INTERFACE, which is an + # implied command that wants to use the jid or name. This would crash + # as neither KP_JID or KP_NAME are populated when a jail is created, + # just as above- just at a different spot. + atf_check jail -c \ + path=/ vnet=new vnet.interface="$iface" command=/usr/bin/true + + # Test that a jail that we only know by name will have its jid resolved + # and added to its param set. + echo "basejail {path = /; exec.prestop = 'echo STOP'; persist; }" > jail.conf + + atf_check -o ignore jail -f jail.conf -c basejail + atf_check -o match:"STOP" jail -f jail.conf -r basejail + + # Do the same sequence as above, but use a jail with a jid-ish name. + jid=$(find_unused_jid) + echo "$jid {path = /; exec.prestop = 'echo STOP'; persist; }" > jail.conf + + atf_check -o ignore jail -f jail.conf -c "$jid" + atf_check -o match:"STOP" jail -f jail.conf -r "$jid" + + # Ditto, but now we set a name for that jid-jail. + echo "$jid {name = basejail; path = /; exec.prestop = 'echo STOP'; persist; }" > jail.conf + + atf_check -o ignore jail -f jail.conf -c "$jid" + atf_check -o match:"STOP" jail -f jail.conf -r "$jid" + + # Confirm that we have a valid jid available in exec.poststop. It's + # probably debatable whether we should or not. + echo "basejail {path = /; exec.poststop = 'echo JID=\$JID'; persist; }" > jail.conf + atf_check -o ignore jail -f jail.conf -c basejail + jid=$(jls -j basejail jid) + + atf_check -o match:"JID=$jid" jail -f jail.conf -r basejail + +} + +param_consistency_cleanup() +{ + clean_jails + + if [ -f "interfaces.lst" ]; then + while read iface; do + ifconfig "$iface" destroy + done < interfaces.lst + fi +} atf_init_test_cases() { atf_add_test_case "basic" atf_add_test_case "nested" atf_add_test_case "commands" + atf_add_test_case "jid_name_set" + atf_add_test_case "param_consistency" } From nobody Thu Apr 23 03:49:57 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1MYL1Vrhz6bTfB for ; Thu, 23 Apr 2026 03:49:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1MYK74ZWz44ft for ; Thu, 23 Apr 2026 03:49:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776916198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=INEpm9lsWiO1R2erpUrWAYyVieVZ+/lFdIee6giVoXY=; b=VzdRlvgS62hQrg/8ZBy+bK1CoBXmSwweMB4FIfMMrcC8P2H1DIuv1RAB18/iBs3nF7sZBx p1+jM4HVk9SJZLfazvkViJz2AS2eXOtAoEFm804P88jo57JCST4dXEoHrGYDF00YLZcXr8 DKM/B4n2oqbb3Mqfy4cqDq5PVUrIyLbn9AHhk3cDN9BbRbrWEpsA0VwBBE0Go4axHbN/wr hFzrU1q3N2cOXI5A+eOdUdjtizYN935q+LOjHPpUTGop3Z9EQGs4AFzuwqMYw6wRmSNu23 nKTDJS1OK4qN+V1oRylDh064/jt2ZhW5uXpKrmiFJPEFt739lNU6ZX7plOyzAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776916198; a=rsa-sha256; cv=none; b=hlO7QFlK7bqjJUp+69vHSYNUdZExK+AhnIukjKeeTH+aoVU5BW4aIGctnO7SpbMwB2+XGl V4gtjQ2tCFYP1qM8ktD+WdcD9gCO9R2LonDN5qaJrH3KE4ocvdAnEA57zYZ63AXesQREV/ iRkltFrEt4/KKJIiy3mNoP3GfK45g1SsNS1nR2ixojK+cghux0N85TxWyIalkC0paaRnv+ FZUMujZeXngp7L3jKmC7+R5lcuOJbNctFsPeQmR6ek8/2nT0KOojgBPBG/cilX5jOCgaJu 1lGW9iFqwHE7A6FzBY2Fm/0qJ3ppgwcK4oEdm26we0uvRLiX7rkG9uBWc1TmlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776916198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=INEpm9lsWiO1R2erpUrWAYyVieVZ+/lFdIee6giVoXY=; b=XewBymVq5DhzR+9Ca3HjtJ3caGdGve3U2EL4Ajz7qOsEbN4Wz/QGOvv6JPsdalstPFCF9i Ez1xm/V7fy/7LJ11lTJ+op+COeZ5GWRy/EBJv9Mi3xVrz3MF67HOaIbljnoUjR7aoXowla xPwcM99x58HZzX9mWIcer09SyKQh/lluRHBCt9QXEh2DNlvLCAdd8ePZUQImVzCwf0Vo+m Fn22vfZuxm6+YwZJ73jF8GJ0zig3dadRaFyR62Evgve2cOOM5P0J0U6QdcBeL2wyxCImCp uOhzoArWyg1ykeNmK7apsh4vIXuPMWQ1JsPoSqHf0VQTW98rptv5XQksa78LEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1MYK6YLJz10CR for ; Thu, 23 Apr 2026 03:49:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a52e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Apr 2026 03:49:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 1a4e4e0d19f5 - stable/14 - jail: fix backfilling the "name" for jid-named 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1a4e4e0d19f5e31b94f5772c33f1edcc3a91d146 Auto-Submitted: auto-generated Date: Thu, 23 Apr 2026 03:49:57 +0000 Message-Id: <69e996e5.3a52e.a99ae32@gitrepo.freebsd.org> The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=1a4e4e0d19f5e31b94f5772c33f1edcc3a91d146 commit 1a4e4e0d19f5e31b94f5772c33f1edcc3a91d146 Author: Kyle Evans AuthorDate: 2025-08-16 17:39:47 +0000 Commit: Kyle Evans CommitDate: 2026-04-23 03:23:08 +0000 jail: fix backfilling the "name" for jid-named jails Using the cfparam variant of add_param() will actually copy the name and flags from the passed-in param, which I hadn't considered. We actually want the name/flags from the "name" param so that we can do variable expansion against it right after that -- otherwise it cannot be found, since variable expansion actually searches by name. While we're here, `jls -e` was the intermediate name for `jls -c` that never saw the light of the day. Fix our existence test. Reviewed by: jamie Fixes: 02944d8c49 ("jail: consistently populate the KP_JID [...]") (cherry picked from commit b81fd3fc8b20eaad64b5c41826432124fd92d6a7) --- usr.sbin/jail/config.c | 2 +- usr.sbin/jail/tests/jail_basic_test.sh | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/usr.sbin/jail/config.c b/usr.sbin/jail/config.c index 42498f01efd0..4465839cba0b 100644 --- a/usr.sbin/jail/config.c +++ b/usr.sbin/jail/config.c @@ -189,7 +189,7 @@ load_config(const char *cfname) * jail is created or found. */ if (j->intparams[KP_NAME] == NULL) - add_param(j, j->intparams[KP_JID], KP_NAME, NULL); + add_param(j, NULL, KP_NAME, j->name); /* Resolve any variable substitutions. */ pgen = 0; diff --git a/usr.sbin/jail/tests/jail_basic_test.sh b/usr.sbin/jail/tests/jail_basic_test.sh index a6859b4dc7f2..b0614a923dc9 100755 --- a/usr.sbin/jail/tests/jail_basic_test.sh +++ b/usr.sbin/jail/tests/jail_basic_test.sh @@ -170,7 +170,7 @@ clean_jails() fi while read jail; do - if jls -e -j "$jail"; then + if jls -c -j "$jail"; then jail -r "$jail" fi done < jails.lst @@ -183,10 +183,23 @@ jid_name_set_body() echo "basejail" >> jails.lst echo "$jid { name = basejail; persist; }" > jail.conf atf_check -o match:"$jid: created" jail -f jail.conf -c "$jid" + # Confirm that we didn't override the explicitly-set name with the jid + # as the name. + atf_check -o match:"basejail" jls -j "$jid" name + atf_check -o match:"$jid: removed" jail -f jail.conf -r "$jid" + + echo "$jid { host.hostname = \"\${name}\"; persist; }" > jail.conf + atf_check -o match:"$jid: created" jail -f jail.conf -c "$jid" + # Confirm that ${name} expanded and expanded correctly to the + # jid-implied name. + atf_check -o match:"$jid" jls -j "$jid" host.hostname atf_check -o match:"$jid: removed" jail -f jail.conf -r "$jid" echo "basejail { jid = $jid; persist; }" > jail.conf atf_check -o match:"basejail: created" jail -f jail.conf -c basejail + # Confirm that our jid assigment in the definition worked out and we + # did in-fact create the jail there. + atf_check -o match:"$jid" jls -j "basejail" jid atf_check -o match:"basejail: removed" jail -f jail.conf -r basejail } From nobody Thu Apr 23 03:49:54 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1MYN1fvMz6bTt9 for ; Thu, 23 Apr 2026 03:50:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1MYM5XYNz44gH for ; Thu, 23 Apr 2026 03:49:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776916199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uUVD1tlQE5VZLZ4bdddEmlVnUSPNZ7lCZzjDbpbxB4o=; b=KGwG4PBa+Z8fTWpok4x85k9iBt8yfiHYbXKCHPtDS4KNEc1unWU3hznzHY3hTayNgH0NEt xynqhBzMRwNVTIqSKhTbb3WuRuvwCCzPY7nuQ26GRTaSykkKJlWarJpK093zVpk5nNDZkb wfTC5nekl2bthEt8a9rpByt10WdWsLQPFRLsp2EBpajm+o6HggcvmJ5vYhQ7EjwPmWVhoF KHj9dy6zzNlUpp99DYWFtjtnEkarMFK8jrtexdoSftwf2Oyalve/BWLVwtmDkf1DNLVVGu cv7fw74r5NhivRmK94oCa4NXDrmwsDONvoWhuJ6R5n1GwAqmjX3+U7lIfqyfsA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776916199; a=rsa-sha256; cv=none; b=NPHNFbnnCBpMNJdO2WCyufZ5VU1T0scntCDNonWNEfgYguVPsT0lNVwubGhUzUeKJ8hAlv JkWVhpQI4/Bkmk8QM8nN+MEC+IXIazynDOtZo7umfoGy5587V9L6pDFGFx0YS65ql8LrFV V2elepJcivnMdHMnJza+tWlCVviGJG9Ub1RSGLQQ9xAPZwNyv5TmP0XsLJlQwviah8/JjT TAeKX0p9D4bYwpCiWWbKiNDhHHx8CTMbxAK250qJFt4UcGW9AeU9qjlU9ub/kfhL5LDjZd /wcVAlwWqjvziOSq/2WOKCqBHXc/2+C81/Rsj6t9MIIo4UXsa+Lwno0yjmQy0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776916199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uUVD1tlQE5VZLZ4bdddEmlVnUSPNZ7lCZzjDbpbxB4o=; b=WQuCzI1Dc4aIhWQiJQSLp9RQKTd2vo4QFdHeoNUXPiQBwzJOiAt1l+VetenQ+W3W+TWnPl pNf3VnH/qkD4jUEBXaeFCUYAl747hfa90peSkqENvWA4NG2QNowTfmTc4NFufmBszUlIko gmd+EHLXlj5a8eO5awb2XsMEIA3cCriDQmaKqXCVsW8NIQsZXBqVrDd8CHbIPSxNnSg/s5 lBkShUrZB0IWgWj8jEd8K/NbA29geZAyQo1lW1eauvD3SIBiEKEFQTNk3zMKi3FSgnHe3D OJPb3X2k5tccxH1QFlI5hRrr+gq4Yu49JgeVR+WchMj3y3UBZjaLcuIRFb7T8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1MYM4rVRz10wp for ; Thu, 23 Apr 2026 03:49:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a359 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Apr 2026 03:49:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Quent=?utf-8?Q?in Th=C3=A9?=bault From: Kyle Evans Subject: git: eefbf748bfda - stable/14 - jail: add JID, JNAME and JPATH to environment for exec.* commands List-Id: Commits to the stable branches 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: eefbf748bfdac188ef5e92fc0f79d62333473fd7 Auto-Submitted: auto-generated Date: Thu, 23 Apr 2026 03:49:54 +0000 Message-Id: <69e996e2.3a359.796ebc4d@gitrepo.freebsd.org> The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=eefbf748bfdac188ef5e92fc0f79d62333473fd7 commit eefbf748bfdac188ef5e92fc0f79d62333473fd7 Author: Quentin Thébault AuthorDate: 2025-03-05 09:51:06 +0000 Commit: Kyle Evans CommitDate: 2026-04-23 03:21:38 +0000 jail: add JID, JNAME and JPATH to environment for exec.* commands Although variable substitution is available in the jail configuration file, the jail identifier is often not since it is dynamically attributed at run time. In order to facilitate scripting of exec.* commands executed on the system, this change sets the JID, JNAME and JPATH environment variables. These variables are not added when using exec.clean. Neither are they for commands executed inside jails, to avoid disclosing information about the host system. Reviewed by: imp (cherry picked from commit d8f021add40c321c4578da55dae52fb93c7ccb5f) --- usr.sbin/jail/command.c | 14 +++++++++++++- usr.sbin/jail/jail.8 | 21 +++++++++++++++++++++ usr.sbin/jail/tests/commands.jail.conf | 3 +++ usr.sbin/jail/tests/jail_basic_test.sh | 11 +++++++++-- 4 files changed, 46 insertions(+), 3 deletions(-) diff --git a/usr.sbin/jail/command.c b/usr.sbin/jail/command.c index 9004b4729fec..20f28abc6706 100644 --- a/usr.sbin/jail/command.c +++ b/usr.sbin/jail/command.c @@ -291,7 +291,7 @@ run_command(struct cfjail *j) const struct cfstring *comstring, *s; login_cap_t *lcap; const char **argv; - char *acs, *cs, *comcs, *devpath; + char *acs, *ajidstr, *cs, *comcs, *devpath; const char *jidstr, *conslog, *path, *ruleset, *term, *username; enum intparam comparam; size_t comlen; @@ -771,6 +771,18 @@ run_command(struct cfjail *j) } endpwent(); } + if (!injail) { + if (asprintf(&ajidstr, "%d", j->jid) == -1) { + jail_warnx(j, "asprintf jid=%d: %s", j->jid, + strerror(errno)); + exit(1); + } + setenv("JID", ajidstr, 1); + free(ajidstr); + setenv("JNAME", string_param(j->intparams[KP_NAME]), 1); + path = string_param(j->intparams[KP_PATH]); + setenv("JPATH", path ? path : "", 1); + } if (consfd != 0 && (dup2(consfd, 1) < 0 || dup2(consfd, 2) < 0)) { jail_warnx(j, "exec.consolelog: %s", strerror(errno)); diff --git a/usr.sbin/jail/jail.8 b/usr.sbin/jail/jail.8 index d4b6addfa5ec..6d3b071496bf 100644 --- a/usr.sbin/jail/jail.8 +++ b/usr.sbin/jail/jail.8 @@ -832,6 +832,22 @@ commands in sequence. All commands must succeed (return a zero exit status), or the jail will not be created or removed, as appropriate. .Pp +The following variables are added to the environment: +.Bl -tag -width indent -offset indent +.It Ev JID +The +.Va jid , +or jail identifier. +.It Ev JNAME +The +.Va name +of the jail. +.It Ev JPATH +The +.Va path +of the jail. +.El +.Pp The pseudo-parameters are: .Bl -tag -width indent .It Va exec.prepare @@ -896,6 +912,11 @@ is imported from the current environment. is set to "/bin:/usr/bin". The environment variables from the login class capability database for the target login are also set. +.Ev JID , +.Ev JNAME , +and +.Ev JPATH +are not set. If a user is specified (as with .Va exec.jail_user ) , commands are run from that (possibly jailed) user's directory. diff --git a/usr.sbin/jail/tests/commands.jail.conf b/usr.sbin/jail/tests/commands.jail.conf index 4ea24ec6b058..afd56d1fa5d6 100644 --- a/usr.sbin/jail/tests/commands.jail.conf +++ b/usr.sbin/jail/tests/commands.jail.conf @@ -1,6 +1,9 @@ exec.prestop = "echo STOP"; exec.prestart = "echo START"; +exec.poststart = "env"; persist; +path = "/tmp/test_${name}_root"; + basejail {} diff --git a/usr.sbin/jail/tests/jail_basic_test.sh b/usr.sbin/jail/tests/jail_basic_test.sh index a907e713ab9a..73ed1f6ebb4b 100755 --- a/usr.sbin/jail/tests/jail_basic_test.sh +++ b/usr.sbin/jail/tests/jail_basic_test.sh @@ -101,13 +101,19 @@ commands_head() { atf_set descr 'Commands jail test' atf_set require.user root + mkdir /tmp/test_basejail_root } commands_body() { - # exec.prestart - atf_check -s exit:0 -o inline:"START\n" \ + # exec.prestart (START) and exec.poststart (env) + atf_check -s exit:0 -o save:stdout -e empty \ jail -f $(atf_get_srcdir)/commands.jail.conf -qc basejail + grep -E '^START$' stdout || atf_fail "exec.prestart output not found" + grep -E '^JID=[0-9]+' stdout || atf_fail "JID not found in exec.poststart env output" + grep -E '^JNAME=basejail$' stdout || atf_fail "JNAME not found in exec.poststart env output" + grep -E '^JPATH=/tmp/test_basejail_root$' stdout || atf_fail "JPATH not found in exec.poststart env output" + # exec.prestop by jailname atf_check -s exit:0 -o inline:"STOP\n" \ jail -f $(atf_get_srcdir)/commands.jail.conf -qr basejail @@ -124,6 +130,7 @@ commands_cleanup() then jail -r basejail fi + rmdir /tmp/test_basejail_root } atf_init_test_cases() From nobody Thu Apr 23 03:49:59 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1MYM5WQDz6bThd for ; Thu, 23 Apr 2026 03:49:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1MYM1GGnz44cM for ; Thu, 23 Apr 2026 03:49:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776916199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EQiZR7+Wfdu/k/fXPdLbVIC/TF85Gm8LbvjuOpgHNlI=; b=vdeC2X+uviKzGdu/+AE9inHsCoQVHlHgBJKmmVs3H6yuqJqE4YfVluRQihSis+HrQ/6lYE kOpzc9cOimXDKaeNZlA7CZ7GiH5u8wwz4Ey69QTZj6HVv3HRw4ARzmMAq1GD/Lmv/AsArc 6z9UjP2rILyxNvibncGnKkGvMAC7i+NdDkfY8COVJ+AxR1eIXx5G7jkFUydPJ2unU8WyfX AmTDZrrIRNq/FUe7zMsshxky9uV6FEMRCHkpgau7qbD+L1E+IGocAgTH3ZFjBlL+cL9BRT jcbFc5dlhqG8KWzmbNsEzARxiayi54m7zl8S9FRiQoBeu0lyYb/X8ZaW3DfvEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776916199; a=rsa-sha256; cv=none; b=msJH8Wo3UpYLvwHylMl19uEZRGUxs2La6/dp8vqzwI61spmtepN1lxOp3OyX6l46wPpsm+ zrwIjeqLBX0hlyHzNKGrm9conK31vUbVYCDcVSHPxDVul6kipHx5e3+5MN0NJuovylBsF+ 8ISAHToB2NdB3AevJbufTO50Qh7yjxgTmSmcPxWa6k8Q6QYjmsutNagN8dnm1SXBrYFky2 mTJwzQwSRW0iaqv2iFtZGpJNcwEw9bo/H0+ImSfu6bXDJZUiUTiXK3mrDCAZGy2jLEo5n/ jF+z6fm2ylLruh9UDWINdaHmDCgqSw+5Z1Y2bK94vsYpV7w0WFHl4+GF9vzHCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776916199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EQiZR7+Wfdu/k/fXPdLbVIC/TF85Gm8LbvjuOpgHNlI=; b=GaKg41of4qe6PL/jQ1/JYNNYDvjg9dxfa0lIoAVeUK0Lv68dtxcktP0TJ89Rgp9e5E5aze 0YyNKOSY725D174PBj0F8Lq/2nCTg6LZtVenKSlu/rIl89CBFjucJjb5vYQ0dfvIL2Fwq+ RMX1ft+x+AuVtV36+aZE6svZVqeQuzftUdMzQ35OqymsTil/Qdyx3MlqFzlrAigV1k4qV9 Ce6j4PEHNp8qZoK2Y6foiyjx/Nv9B1hhtGDiXhhPO5MmNNh01viUKZvrlH5ONx77nvqfyy 9J4aR6GK/IP2Pl7fUmt9gcwv6wbtqcdtr7eoAZpWUSMBQFWzdOzUzbme73AqLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1MYM0DcLz10mB for ; Thu, 23 Apr 2026 03:49:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 388e8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Apr 2026 03:49:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Gleb Smirnoff From: Kyle Evans Subject: git: c84d08abf732 - stable/14 - jail: fix crash with startup commands on a jail without name List-Id: Commits to the stable branches 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c84d08abf732deacf082c228c5dbba2bd37ccae3 Auto-Submitted: auto-generated Date: Thu, 23 Apr 2026 03:49:59 +0000 Message-Id: <69e996e7.388e8.573d0080@gitrepo.freebsd.org> The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=c84d08abf732deacf082c228c5dbba2bd37ccae3 commit c84d08abf732deacf082c228c5dbba2bd37ccae3 Author: Gleb Smirnoff AuthorDate: 2026-03-13 20:21:26 +0000 Commit: Kyle Evans CommitDate: 2026-04-23 03:23:13 +0000 jail: fix crash with startup commands on a jail without name Jail name is optional, thus don't try setenv(NULL). Fixes: d8f021add40c321c4578da55dae52fb93c7ccb5f (cherry picked from commit 78c4f821f43d530ba1f2a6308a64a8483208ebe3) --- usr.sbin/jail/command.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/jail/command.c b/usr.sbin/jail/command.c index 26eaeca442a9..6c454053f547 100644 --- a/usr.sbin/jail/command.c +++ b/usr.sbin/jail/command.c @@ -792,8 +792,8 @@ run_command(struct cfjail *j) if (!injail) { if (string_param(j->intparams[KP_JID])) setenv("JID", string_param(j->intparams[KP_JID]), 1); - setenv("JNAME", string_param(j->intparams[KP_NAME]), 1); - + if (string_param(j->intparams[KP_NAME])) + setenv("JNAME", string_param(j->intparams[KP_NAME]), 1); path = string_param(j->intparams[KP_PATH]); setenv("JPATH", path ? path : "", 1); } From nobody Thu Apr 23 03:50:00 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1MYN4rScz6bTkr for ; Thu, 23 Apr 2026 03:50:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1MYN1bV0z44l8 for ; Thu, 23 Apr 2026 03:50:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776916200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FzVh5fWYfqhqW0arxU5VIOx8NewMol3zPcvmGsVuoXw=; b=RhKgWDJMhFihrSVTo1hXWRC9kpS7XxCow/7jbYMnxk2NJsTuEDZN+oVZmUV16//IzL5lmF ghdTqYnA8DaA+uQR5LS0liNQbukJfTxfo6+vaRE3kGMWMvGxjx4F6QXWuqZCaSrEgaGcSR 94jt5DFgX7jfxU1L9dBHVZb84MmuyHGGPysQHMM7cpuhaTIQMnRASimLM5nnaLJ5fYwIVk 7MhFrBKhI1TScNZAo6II5nCYnWLf/1AuF+Yogwt5dqlIEWeSoVzHNBb/tscZKMknkTOGYD O6nx2TG+1gpNYUBgq+wvXAwrUd+WMe/zbzQBqmbkNK3PoiqchZtxsbtv8mBrng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776916200; a=rsa-sha256; cv=none; b=d1w8dX+uhzh5CUNL1+/acxUYnEmQwmrqD+VPABAqoMV/KXTM0zAvsN/3hZqMtrNUXkKHtw bteQChNDzVdM+ioROtglH3m5Nium3v2il/MsyHODooM2fPFNX2rei4/BD7HfR+2VDm5z+F z7i7hHcVlPJ9qjONsi6dm6bhV2n3+cGTkIZhxKxZudK+6Bum+72A0GBcD9dsEJuvk8+7gm iTg7TjlNCbeEaroxxKuS2pqJZSGgpL5rz9kNWy7zp9W5epVDUP18/7ORdzKSn02FHwjrBZ FLqRBPg0e33u/qc1eerchGWFHajjXYGQgCyiMjJftQn0yJ9FJuOfeds9tztJxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776916200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FzVh5fWYfqhqW0arxU5VIOx8NewMol3zPcvmGsVuoXw=; b=sXBHHLbfvHng63FSmXh+tajUYnNm6KOqSHH7Y2tt+yncI+uEMLCHJC61FdkEdtL7BhLZ3R +2xG/cz15evOEVzttPfKffvinAShs8pj9FTe6EVHh1kuADJSli9QfJtvaoJsRqdZNFqBIc qyS46OByoM8Xf8myvkfJGJQdwFDLn6/13XfvsViQ6svphSXbnU681UHG5mk65RVc2PSXnb bWbqKqHPF5yP75bYtSHMfOysJLp08zoxrcUKkwqs0IlMF628PGEf5VEdMZ1ykNplyzZ1Fo SvuPdl38JkA7tC4rHVeedWndPMeDFPyGqr3MLEglW5YtSvnPpKc8mkwARD46bg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1MYN10ZCz10wq for ; Thu, 23 Apr 2026 03:50:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a35f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Apr 2026 03:50:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Yan-Hao Wang From: Kyle Evans Subject: git: a3af06dd953b - stable/14 - jls(8): Complete libxo transition List-Id: Commits to the stable branches 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a3af06dd953b0a845125d7caa1e10f10f740821c Auto-Submitted: auto-generated Date: Thu, 23 Apr 2026 03:50:00 +0000 Message-Id: <69e996e8.3a35f.3fd06b1a@gitrepo.freebsd.org> The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=a3af06dd953b0a845125d7caa1e10f10f740821c commit a3af06dd953b0a845125d7caa1e10f10f740821c Author: Yan-Hao Wang AuthorDate: 2024-10-12 15:14:00 +0000 Commit: Kyle Evans CommitDate: 2026-04-23 03:27:17 +0000 jls(8): Complete libxo transition Reviewed by: des (cherry picked from commit 20bb77c4b91837837dbccc40c9cc90eb43026131) --- usr.sbin/jls/jls.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/jls/jls.c b/usr.sbin/jls/jls.c index 39bd59a02d4e..f30b846a435d 100644 --- a/usr.sbin/jls/jls.c +++ b/usr.sbin/jls/jls.c @@ -39,7 +39,6 @@ #include #include -#include #include #include #include @@ -250,8 +249,9 @@ main(int argc, char **argv) } xo_close_list("jail"); xo_close_container("jail-information"); - xo_finish(); - return (0); + if (xo_finish() < 0) + xo_err(1, "stdout"); + exit(0); } static int From nobody Thu Apr 23 03:50:01 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1MYP6Ztmz6bTkx for ; Thu, 23 Apr 2026 03:50:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1MYP1SVYz44nK for ; Thu, 23 Apr 2026 03:50:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776916201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iy5WOP/C9jRtAN2oaxZpjgv1zNWi/ZN61P63cAqMOq4=; b=BzqDBPxTjrApATTQTQL03OSazv9wlobXoaWwDKdCX2v2WkCGFn8toASg+0VQzstqGH0ZCB d9lW3AjJ2v4KS4wd7sRRAKkHhZUAYrjfo8QYNbofF9bhRbuzmKuXNhp0A0dy1T5zwqwtkd gXGB/842on0bgJOgC0x2hhHrrf0dIQTEbNZ196q8waRzkci4Lr0FTQ7ImR7KdTSaKwnJSo hR0e8MxFUBxSG5ZOzt6+/2Q+PxO2QqEmnBlI+BN1n9N2bMrCOrVrNxK66Y9Q1LO3CyqfWA aIw5XlAFklJTcKp88islqfG/l6tdu4xPVsB1Gwy/PepFOb5AluvaBoqWusTlbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776916201; a=rsa-sha256; cv=none; b=bUYA9NEh8Cs5NPINluY3OweV6gGwJhnwQ8M3Ap49QnN+mmrYxrcq65pFBSVNMaZbjFSnPi zSlKVssDXwuKUL6vhDyWv9IxtzfygDaDWlwK02dS2jeriOTrzTXXN4CWO7xW53mHXD7kqM o9dZKEwqPRwmXXsXiSyUI5KXNKVGzcFXXl7FDs6zg8v4e9GzHgxoEOOnwoVzbkMojDI/TN Ddw1Si/oVJ+vRqKMOly3VzC8oeIe8CVQhDRdwzkJ1SwjdgXeQS5M9Xr8dJ0fXTR3d7E41G JAva3GzA3iiAF7mJEVfPLt4vMgp6i4trJMn+Th51SMv1KfQ8HgFtxUIMZx0erA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776916201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iy5WOP/C9jRtAN2oaxZpjgv1zNWi/ZN61P63cAqMOq4=; b=UXBqpKSU2k0YJ3Wc6T4VfX9fHRTJd+s3a8DNC5tHZqM4WG4jcaO30kQqVju8a8Ox1LPthS zBN2ic9KqbTyv8tQ6uicBBjK8jo6lh51mmODYPiTm0CfnhGNXFd8z0OxxQxGyKMvT3/F+j a7GAOyyFEC/KvqGhW208Ukyr9v0ESDe8FyXzAjslMB6f22b4L79t0jvRIfPbAs2uRM7H9g x3pv4UN4Jg13pkyQMqQqhdXqvX+ETPcj4yHUOBCkfXtaZPRBUHmWPHyBR0pMcnHpLv1Yur xVVSyd+UVkrSUiD1v/TxQEFcS6I0q0Tzh9QQhRB8Oj/i5mgKW+828lZhFzTb5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1MYP0tNbz10CT for ; Thu, 23 Apr 2026 03:50:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b53c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Apr 2026 03:50:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 0985637687de - stable/14 - jls: minor simplification to arg 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0985637687dea7edcb58f76c065271a5036927a9 Auto-Submitted: auto-generated Date: Thu, 23 Apr 2026 03:50:01 +0000 Message-Id: <69e996e9.3b53c.711c73f5@gitrepo.freebsd.org> The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=0985637687dea7edcb58f76c065271a5036927a9 commit 0985637687dea7edcb58f76c065271a5036927a9 Author: Kyle Evans AuthorDate: 2025-07-26 03:13:41 +0000 Commit: Kyle Evans CommitDate: 2026-04-23 03:27:35 +0000 jls: minor simplification to arg handling It's easier to reason about the state of argc/argv if we just augment them by optind after our getopt() loop. No functional change, but this sets the stage for another change to add a `-c` mode to (c)heck for the existence of a jail quietly without the caller having to worry about spurious output. Reviewed by: jamie (cherry picked from commit dbaaadd4373a725950ad11e578dab61537b7c4f2) --- usr.sbin/jls/jls.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/usr.sbin/jls/jls.c b/usr.sbin/jls/jls.c index f30b846a435d..6f8b214e8b9a 100644 --- a/usr.sbin/jls/jls.c +++ b/usr.sbin/jls/jls.c @@ -141,8 +141,11 @@ main(int argc, char **argv) ip4_ok = feature_present("inet"); #endif + argc -= optind; + argv += optind; + /* Add the parameters to print. */ - if (optind == argc) { + if (argc == 0) { if (pflags & (PRINT_HEADER | PRINT_NAMEVAL)) add_param("all", NULL, (size_t)0, NULL, JP_USER); else if (pflags & PRINT_VERBOSE) { @@ -180,9 +183,8 @@ main(int argc, char **argv) } } else { pflags &= ~PRINT_VERBOSE; - while (optind < argc) - add_param(argv[optind++], NULL, (size_t)0, NULL, - JP_USER); + for (i = 0; i < argc; i++) + add_param(argv[i], NULL, (size_t)0, NULL, JP_USER); } if (pflags & PRINT_SKIP) { From nobody Thu Apr 23 03:50:02 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1MYQ661Rz6bTwT for ; Thu, 23 Apr 2026 03:50: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1MYQ2Qp9z44qh for ; Thu, 23 Apr 2026 03:50:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776916202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZMIYXWHoLAaScSzd5/l0+2oDbw6JEq6AxONPSgSGlJU=; b=BboAV1NPCyxgoVFKikmvvUd28tlzDgQAOn0yFe4ZRk3JXap++QxIr7gMVCL9UImuiae3ab wThEXj8YtisBQCY4SYDjCsjZK+GlDdHzpKTDhXOLmhhfZNSISDj0VRkwmxPGSNBZuhZ1yC t3gbLAgKjoEe6UMrUzKyCNuHfF+BBD0HcRI2HJcoM3GrJe4lOif4mWrOWSCB1A7xIzDln7 q4LfdUNWO0kl8kDA2BjVJm3+1k+gbQ1oyrw4t0ZDXI/g37PsOElFYISrQxK6Af4rCFimaI 0w+t1PjtKTd1Ox5jbjZLwkn/6NlHNBLyvHgjGv/YnqN/L1M6e68dTJCLOoPeeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776916202; a=rsa-sha256; cv=none; b=ZdQUTsFnggO7x/IJNHkaYy4tx01Uh7YXz9+IH0KdguEqhai/g8g6wLQ+Z4fl+wnwyieEzn Flp19qX5TrB86X2/nwqh1HgnZ/VM2H/zUwSD1E9qsA8TLOzqmN+8KWNNKAJefjeXFJlwUf inKsIwnbuxQkbSSPlKq7iJ3nxiYtm4nQXV2yW7fKPl7EgM1PHDcm8zUkoFsVOqrkaUpzQn fVXf/w2u2zbXI241mBxf63QmWr9LIFWLvSIm8mS5QfY/ndsVo6n8lZUd3xtwaTGmrpr3Wi C3eEil3ivFZkMthkk4Z+xhtqwbvzpA4FuZkMyl9P5CbBqg2QrRsWX/lkDM6ErQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776916202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZMIYXWHoLAaScSzd5/l0+2oDbw6JEq6AxONPSgSGlJU=; b=iqoBK/NKgNVhXOux4SF5h7+j55vQdkMhCisn5IbJLqLMOYG6WT1pdaT41di674CbwCRXJj 7w4j6g33cIJKjUoCH6YQCDOgxmBOmvYduLQgHuXGvQF3M1Jk4paaSxQXxD9yuid00AWWv3 eUxiOJI/CFGpZHT8jjB07LKsfW63RS/WrCVamKAxqK7sfHJltacmtJgu2brV/O811DPNlv iEjHEAEMHv6DPb15M6hYuhCyOH47a6/UtxlBiaU8j1W4+uanbc0ZaLE+TqT2K41XeGzczX 4B11Zs+6IjDQIdO+K8lh3ZPe2JUAmwVuPA4ebl/mCYnjoyOdQxLxSR6ZH4M7Vg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1MYQ1ZKbz10ZS for ; Thu, 23 Apr 2026 03:50:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b6c9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Apr 2026 03:50:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 6260b7d09a0c - stable/14 - jls: add a -c mode to check for a jail's existence List-Id: Commits to the stable branches 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6260b7d09a0c52a823caab4cfabc61ff5503bd11 Auto-Submitted: auto-generated Date: Thu, 23 Apr 2026 03:50:02 +0000 Message-Id: <69e996ea.3b6c9.446471b8@gitrepo.freebsd.org> The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=6260b7d09a0c52a823caab4cfabc61ff5503bd11 commit 6260b7d09a0c52a823caab4cfabc61ff5503bd11 Author: Kyle Evans AuthorDate: 2025-07-26 03:13:43 +0000 Commit: Kyle Evans CommitDate: 2026-04-23 03:27:47 +0000 jls: add a -c mode to check for a jail's existence This is intended to be primarily used in scripts that want to check if a jail exists before taking some action -- for instance, the jail(8) test cleanup functions that want to remove the jail if it still exists. Having a mode that limits its output for their usage is useful both for cleaner scripts and also to avoid masking real problems. Reviewed by: jamie (cherry picked from commit 1d8590371049bb14a6410fa83cd03d9eca32f764) --- usr.sbin/jls/jls.8 | 20 ++++++++++++++++++-- usr.sbin/jls/jls.c | 48 ++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 62 insertions(+), 6 deletions(-) diff --git a/usr.sbin/jls/jls.8 b/usr.sbin/jls/jls.8 index f7a5eeb321ef..715033082963 100644 --- a/usr.sbin/jls/jls.8 +++ b/usr.sbin/jls/jls.8 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 13, 2025 +.Dd July 25, 2025 .Dt JLS 8 .Os .Sh NAME @@ -35,6 +35,10 @@ .Op Fl dhNnqsv .Op Fl j Ar jail .Op Ar parameter ... +.Nm +.Fl c +.Op Fl d +.Fl j Ar jail .Sh DESCRIPTION The .Nm @@ -54,11 +58,21 @@ for a description of some core parameters. If no .Ar parameters or any of the options -.Fl hns +.Fl chns are given, the following four columns will be printed: jail identifier (jid), IP address (ip4.addr), hostname (host.hostname), and path (path). .Pp +When the +.Fl c +option is used, +.Nm +will not emit any output except for usage errors. +This mode is intended solely to check for a single jail's existence, and it does +not accept any +.Ar parameter +or print-option flags. +.Pp The following options are available: .Bl -tag -width indent .It Fl -libxo @@ -68,6 +82,8 @@ in a selection of different human and machine readable formats. See .Xr xo_options 7 for details on command line arguments. +.It Fl c +Only check for the jail's existence. .It Fl d List .Va dying diff --git a/usr.sbin/jls/jls.c b/usr.sbin/jls/jls.c index 6f8b214e8b9a..f1bddb9bf139 100644 --- a/usr.sbin/jls/jls.c +++ b/usr.sbin/jls/jls.c @@ -38,6 +38,7 @@ #include #include +#include #include #include #include @@ -60,6 +61,7 @@ #define PRINT_SKIP 0x10 #define PRINT_VERBOSE 0x20 #define PRINT_JAIL_NAME 0x40 +#define PRINT_EXISTS 0x80 static struct jailparam *params; static int *param_parent; @@ -82,6 +84,14 @@ static void quoted_print(int pflags, char *name, char *value); static void emit_ip_addr_list(int af_family, const char *list_name, struct jailparam *param); +static void +usage(void) +{ + xo_errx(1, + "usage: jls [-dhNnqv] [-j jail] [param ...]\n" + " jls -c [-d] -j jail"); +} + int main(int argc, char **argv) { @@ -95,12 +105,15 @@ main(int argc, char **argv) xo_set_version(JLS_XO_VERSION); jname = NULL; pflags = jflags = jid = 0; - while ((c = getopt(argc, argv, "adj:hNnqsv")) >= 0) + while ((c = getopt(argc, argv, "acdj:hNnqsv")) >= 0) switch (c) { case 'a': case 'd': jflags |= JAIL_DYING; break; + case 'c': + pflags |= PRINT_EXISTS; + break; case 'j': jid = strtoul(optarg, &ep, 10); if (!jid || *ep) { @@ -131,7 +144,7 @@ main(int argc, char **argv) PRINT_VERBOSE; break; default: - xo_errx(1, "usage: jls [-dhNnqv] [-j jail] [param ...]"); + usage(); } #ifdef INET6 @@ -145,7 +158,24 @@ main(int argc, char **argv) argv += optind; /* Add the parameters to print. */ - if (argc == 0) { + if ((pflags & PRINT_EXISTS) != 0) { + if ((pflags & ~PRINT_EXISTS) != 0) { + xo_warnx("-c is incompatible with other print options"); + usage(); + } else if (argc != 0) { + xo_warnx("-c does not accept non-option arguments"); + usage(); + } else if (jid == 0 && jname == NULL) { + xo_warnx("-j jail to check must be provided for -c"); + usage(); + } + + /* + * Force libxo to be silent, as well -- we're only wanting our + * exit status. + */ + xo_set_style(NULL, XO_STYLE_TEXT); + } else if (argc == 0) { if (pflags & (PRINT_HEADER | PRINT_NAMEVAL)) add_param("all", NULL, (size_t)0, NULL, JP_USER); else if (pflags & PRINT_VERBOSE) { @@ -240,9 +270,17 @@ main(int argc, char **argv) xo_open_list("jail"); /* Fetch the jail(s) and print the parameters. */ if (jid != 0 || jname != NULL) { - if (print_jail(pflags, jflags) < 0) + if (print_jail(pflags, jflags) < 0) { + /* + * We omit errors from existential issues if we're just + * doing a -c check that the jail exists. + */ + if (pflags & PRINT_EXISTS) + exit(1); xo_errx(1, "%s", jail_errmsg); + } } else { + assert((pflags & PRINT_EXISTS) == 0); for (lastjid = 0; (lastjid = print_jail(pflags, jflags)) >= 0; ) ; @@ -393,6 +431,8 @@ print_jail(int pflags, int jflags) jid = jailparam_get(params, nparams, jflags); if (jid < 0) return jid; + else if (pflags & PRINT_EXISTS) + return 0; xo_open_instance("jail"); From nobody Thu Apr 23 08:41:20 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1V1X2F4pz6ZBfT for ; Thu, 23 Apr 2026 08:41: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1V1X1lnjz3hFM for ; Thu, 23 Apr 2026 08:41:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776933680; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SosA4UrvFQHspWBXcEVFLs0EZ0kjX7L4UNQEEWTquNE=; b=wBIyat+tt7/funevIC5M8MvIRbMHd7lSYZsIFuo3nBIaPSALEJzwBsjxTrXUnsIJicRSWK GOOOV7C/Gr4KRdD1pLgu6vPLcuEyxC5x6lqzIadsm6HhiVkJWYFUui6LmOUqbqNEjuKDEa kFFnT5H5ww6+D8KQf4G8qTQ2YGmNshqk/iQjX7Lncoa0NItF/fyirt3gd2PQ60u7KQ8/xZ 6MqROcpo99BEGd61E3LKs48NT2Pa/WlgDohA67A5rfkekPBgzPoimWh5uk8xUE9ttKhI2M VZlUlVVnUPvX5tHkgHgzuSnQfGKZriUgZZHucwB/t0OfpQV+HMgvBMV92aiSQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776933680; a=rsa-sha256; cv=none; b=M03aCF+BhDPbTK27UF60ljChPoEBeJVWNtAMRe2biciUE/elpQiBXRW9POfItBdH20J4Vl CfMZPeviY3ahaIN9nXFUWlCM5Hfzo/pZtHfGDF3BkHTp2Qd20MFpN8EX8vYrszsX3IoEdU bh0FigajqAoi5k8EQGSVUu42rgxEm7VVqWwo7U47xAPDYcf+txh02mWCkoxiPkue99uEul NwM295HWiYlC7JjbehEztfcXPhckkzNQwTY5gr53ASF6SbhDUm9RZxIiYv30XtmLfbe7tr +wq4oMQM6gZltMPpwsvrQ5zT/EhriIXFSjzHYMXoMvvuqE9LQLOqSARxZKfHuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776933680; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SosA4UrvFQHspWBXcEVFLs0EZ0kjX7L4UNQEEWTquNE=; b=h6VZ1BCLLqylUJKG592ME+pvMlnQH5l9RmOHXJRYiCmyFXV+9zYzKzMYvUnb/vUU0U0tbb pqRAcTRalZqGc7MYD47QxiJ7G9NKs0VE921jvnE2LIWqjnTSv/Fz4POiHGErg0tWamfmgq LdOvS5wlEnoDLFMSDDr/Vt6rUUc9W3wsH1+asUvKp9SxRtVN+azjdFArwIZq4+/gYkl0wF HnydH9/D5+UlPuJdUtuIxPB+ab65bKxeh4EXmo0oh61ZVUiiAz9j9DJofXxGfda+boYWfa AfK6e3i34XuShRdFLNHCr7PWj0oCozaxAiNsU6n3VkvD5PNnKBCeQwpP/TB39g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1V1X1JWkz17yF for ; Thu, 23 Apr 2026 08:41:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32503 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Apr 2026 08:41:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: f89909e462e8 - stable/15 - virtual_oss: Introduce virtual_oss_default_control_device rc variable List-Id: Commits to the stable branches 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: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f89909e462e8707d8ac5993959b8899712e282c2 Auto-Submitted: auto-generated Date: Thu, 23 Apr 2026 08:41:20 +0000 Message-Id: <69e9db30.32503.53cf168e@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=f89909e462e8707d8ac5993959b8899712e282c2 commit f89909e462e8707d8ac5993959b8899712e282c2 Author: Christos Margiolis AuthorDate: 2026-04-16 14:51:02 +0000 Commit: Christos Margiolis CommitDate: 2026-04-23 08:41:15 +0000 virtual_oss: Introduce virtual_oss_default_control_device rc variable The -t option gives the user the ability to create a control device for a given virtual_oss(8) instance, so that the instance's configuration can be manipulated during runtime with virtual_oss_cmd(8). As is expected, the control device's name is not known, since it is specified by the user. This patch introduces a virtual_oss_default_control_device rc variable, which defaults to "vdsp.ctl". The goal of this is that third-party programs and scripts can access the control device of the default virtual_oss(8) configuration without guessing. This is especially useful for sbin/devd/snd.conf which deals with hot-swapping sound devices using virtual_oss(8). Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D55670 (cherry picked from commit 70e27ecba51892cbe4cc94bbf785c6dd261dfd57) --- libexec/rc/rc.d/virtual_oss | 6 +++++- sbin/devd/snd.conf | 14 ++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/libexec/rc/rc.d/virtual_oss b/libexec/rc/rc.d/virtual_oss index d55b51463442..a25abf256f55 100644 --- a/libexec/rc/rc.d/virtual_oss +++ b/libexec/rc/rc.d/virtual_oss @@ -25,6 +25,10 @@ required_modules="cuse" configs= pidpath="/var/run/${name}" default_unit=$(sysctl -n hw.snd.default_unit 2> /dev/null) + +# Default configuration's control device. +: "${virtual_oss_default_control_device:="vdsp.ctl"}" + virtual_oss_default_args="\ -S \ -C 2 \ @@ -35,7 +39,7 @@ virtual_oss_default_args="\ -i 8 \ -f /dev/dsp${default_unit} \ -d dsp \ - -t vdsp.ctl" + -t ${virtual_oss_default_control_device}" # Set to NO by default. Set it to "YES" to enable virtual_oss. : "${virtual_oss_enable:="NO"}" diff --git a/sbin/devd/snd.conf b/sbin/devd/snd.conf index 5ca0be86e246..e2dc6d94a299 100644 --- a/sbin/devd/snd.conf +++ b/sbin/devd/snd.conf @@ -7,12 +7,8 @@ notify 0 { # Other audio servers or device switching commands can be used here # instead of virtual_oss(8). - # - # FIXME: We are hardcoding /dev/vdsp.ctl here, simply because it is a - # common virtual_oss control device name. Until we find a proper way to - # define control devices here, /dev/vdsp.ctl can be changed to the - # control device of choice. - action "/usr/sbin/virtual_oss_cmd /dev/vdsp.ctl -R /dev/$cdev"; + action "/usr/sbin/virtual_oss_cmd \ + /dev/$(sysrc virtual_oss_default_control_device) -R /dev/$cdev"; }; notify 0 { @@ -22,7 +18,8 @@ notify 0 { match "cdev" "dsp[0-9]+"; # See comment above. - action "/usr/sbin/virtual_oss_cmd /dev/vdsp.ctl -P /dev/$cdev"; + action "/usr/sbin/virtual_oss_cmd \ + /dev/$(sysrc virtual_oss_default_control_device) -P /dev/$cdev"; }; notify 0 { @@ -32,5 +29,6 @@ notify 0 { # No connected devices. Disable both recording and playback to avoid # repeated virtual_oss error messages. - action "/usr/sbin/virtual_oss_cmd /dev/vdsp.ctl -f /dev/null"; + action "/usr/sbin/virtual_oss_cmd \ + /dev/$(sysrc virtual_oss_default_control_device) -f /dev/null"; }; From nobody Thu Apr 23 08:41:21 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1V1Y51cnz6ZBhH for ; Thu, 23 Apr 2026 08:41:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1V1Y27qNz3hYB for ; Thu, 23 Apr 2026 08:41:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776933681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=97L7oXu/Tike+itsE+m0wQXZNSEiaQhsVY1uMd2mIqc=; b=a1BiSKPRnVoaZ534kTDQisnKcLZQjTok3V52ZqXLLo+uOV5/x6UF7ot7CQ/NpaJj/yhLSB 02DXYL6O2CsblL0gT0Zfw1xtnLSQyJbuFKREXnSCNQ6gb57A0mQIXfJtJwp7pQERCDAlSZ uEjS/Q+vD8RoT/mJm5Yv2D6EbrysEwxXmmm9LkFNak6rIAKkUPKMoGufW71wkovUr4Q80n 0q3Vb+U728ygnUFd4llyK8V06tehGJbHq1HQx/ZmVktT9bm8rqukiUmWsOwhK6827rXHZ0 mI2iEHQ1oWNbqD95XaYIHryEsX84LEvJisNat98F/2IF589FxTrQXf5621qGHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776933681; a=rsa-sha256; cv=none; b=uN33Nlv0SZ59f9UOLEP9R15ZCOy7qyF5fUU2zkXDEKMLGG4WyCzGoYyqUEUm9A/OkjSxCn iYiqIUiUYotOQdExdgeWcmZHkdR1eC9SMKJ5Hz6zmZZ0b27qOS1Csv3jToBJIS7n6JdRaG 9F//vWwmcfAo7wK1wdZMX11rNxU5elz5D+KlDduauOdNSjTB7yd207IygdcU/3tkJNNwxt HvwSv/pRUzbbf0MEHoTuCdgPxBE5+qmsm3FzKFjtrQ8YgS87jBys+Kau0fnivKFUNZAKDU oNIPu7bfTFEDU6hp0coQVlWAQD5z7U1hJkcIppYeb5id/ioT+lr/EjrVmMh5jA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776933681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=97L7oXu/Tike+itsE+m0wQXZNSEiaQhsVY1uMd2mIqc=; b=k+YMIF9yDrCMLmwbxV0SzKEYAgjhbGsmzPW6XL3IlCSkLrkQdP2+gX/qWaL8QqBNkqLskL iZBfAJQSmYhy+WopN3FYAzEr1Wf6BIZ+q41KqYjiks2qICRexaGy3a3OieDwGs5DikVDAj SMckwGBX/ixJCEFPnQRDCE9FVjc/Bbccx/0+1rcOSRPWfvTSpxrtZgGMOgObIr/G0lcs+E LmLTwN4URwoFinEontfAmMKbOSYzxrNBhNxlUNrInGfXmaU3KRUmkW73xrWzD258ngZ7ip bYq0sFA/bQrwhKqMP/bmVZHJaRiEAI/UZJuQQPuZ/WLj76Gl3/fZWXGdJmjxcg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1V1Y1bJRz180v for ; Thu, 23 Apr 2026 08:41:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3026b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Apr 2026 08:41:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: c93b81369b8a - stable/15 - rc.conf.5: Document virtual_oss(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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c93b81369b8aa0196781a05743e6cc338d8e33a9 Auto-Submitted: auto-generated Date: Thu, 23 Apr 2026 08:41:21 +0000 Message-Id: <69e9db31.3026b.35c72809@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=c93b81369b8aa0196781a05743e6cc338d8e33a9 commit c93b81369b8aa0196781a05743e6cc338d8e33a9 Author: Christos Margiolis AuthorDate: 2026-04-16 14:51:06 +0000 Commit: Christos Margiolis CommitDate: 2026-04-23 08:41:15 +0000 rc.conf.5: Document virtual_oss(8) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56225 (cherry picked from commit a3094f522fec70f9e5cf3f12dc6e7a9b5f706459) --- share/man/man5/rc.conf.5 | 57 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index fa8d8aab8c4e..b666345def48 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 14, 2025 +.Dd April 2, 2026 .Dt RC.CONF 5 .Os .Sh NAME @@ -4950,6 +4950,60 @@ For instance, the file is created to prevent .Xr shutdown 8 targeted at the wrong machine. +.It Va virtual_oss_enable +.Pq Vt bool +If set to +.Dq Li YES , +run one +.Xr virtual_oss 8 +instance for each configuration defined in +.Pa virtual_oss_configs . +.It Va virtual_oss_configs +.Pq Vt str +Space-separated list of +.Xr virtual_oss 8 +configurations. +For example: +.Bd -literal +virtual_oss_configs="foo bar" +.Ed +.Pp +Configurations need to be defined in +.Pa virtual_oss_ Ns Aq Ar config_name . +By default, there is a +.Pa dsp +configuration which replaces the +.Pa /dev/dsp +device created by +.Xr sound 4 +with a +.Xr virtual_oss 8 +one. +It can be redefined by setting the +.Pa virtual_oss_dsp +variable. +.It Va virtual_oss_ Ns Aq Ar config_name +.Pq Vt str +.Xr virtual_oss 8 +argument list for configuration +.Aq Ar config_name . +.It Va virtual_oss_default_control_device +.Pq Vt str +The +.Xr virtual_oss 8 +control device's name corresponding to the default configuration, +.Pa virtual_oss_dsp . +This is set by default to +.Pa vdsp.ctl . +When +.Pa virtual_oss_dsp +is set, it is strongly encouraged to set this variable as well, and use it as +the +.Fl t +option's argument in +.Pa virtual_oss_dsp , +because it is used by other programs and scripts, such as +.Pa /etc/devd/snd.conf . .El .Sh SERVICE JAILS The service jails part of the rc system automatically puts a service @@ -5170,6 +5224,7 @@ to .Xr unbound 8 , .Xr usbconfig 8 , .Xr utx 8 , +.Xr virtual_oss 8 , .Xr wlandebug 8 , .Xr yp 8 , .Xr ypbind 8 , From nobody Thu Apr 23 09:44:52 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1WQr4X7jz6ZJVm for ; Thu, 23 Apr 2026 09:44:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1WQr3JZWz3pxF for ; Thu, 23 Apr 2026 09:44:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776937492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OWNJ7lehGzFXhX2Dlrt4/QEmYLG8of9MPHo0lAmb1kk=; b=Thby9FDTr+qlWG5HONC3tyjCro2ABS0jXt2mf9f950gJQaCyFZU3AL5cU+3iK8aQxKWWlr JYXD7rWuYErcgIRIxoYsIThNpnixRC03Rplvau1C1idGFvpzM/lUSEFIy/FXLlhGb+a/sy nInmffGXwdDXGnEfIo34sJOpGiwmVXT7qSINEWYqJzqneHzYOVWlhxLVl7qBNixGrapB9i Ib1Y5wrD3F61LHP1v9Ej44BECh3pyCID/8zahZdXYk6W71SRnIQSn5y37RMU6BxPQxIRQf P40fVkD4XH/bg3z14ZGlR9aF92tzEd+rkxaKSG12nJ9+JeZrU595cqjAWVVUyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776937492; a=rsa-sha256; cv=none; b=EspnrNLeXwOp5z6mTP7TU0ID3B4mKhYUJi0LyJpA6SOcePPxo+w8rHWa8QgMWs/4tnr3Dh dZZ5GxMDZabTPKfZxu8Ft84BYhjHwD0x9mhIGu5Sk72q6zshM9jPm4uNVH8DhAhBaHJxq/ FZ/D67j39iYBKFXLE8I0tbKshqYjfjQDzuhKzfBMHiN+61LGPpuvajgWdJRZPABubFE8a7 00CxSH2riCSaIcT+SNKCquEg2uwyk1l2PpTSMhjmlcFUhnm9dIgvibIbYGmW5UB3Lp0GuZ M9lC7bLFwe7jZ9R5zGJddWj2DjptwFT9L46Ar10C/mX5+zmg/Mj5IOTfL2A4Kg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776937492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OWNJ7lehGzFXhX2Dlrt4/QEmYLG8of9MPHo0lAmb1kk=; b=JsUhqHHBpSVQz36rNM4l+TSiE1fsfaO7/6UWUlUmRHsslE42/tjCHWrL10ZNl6JZ4Yn2rt UYBOD3vJxFYYNQPpt5yn9RImu/mk7gZlFt2edz8omLGNFDZIqRE75ss7A+JB44MpPLR3e+ B9tLTI2SEsGc0sMfzYy8jcaoTjKYpjIG8CIHZXdJTarxH/EAJMRAL9exZN5rhffHOIfUC2 HkKGxGVdtmy9x44V3cOQxqjiU6I9aDCrlEMiYSEeDTxPL14tYFqaPUqU0D7iYBN/FKDW2O G7BaUKqLVtPelS5YXmmd7wloILTqv4+ElPaX6HdcxA5JVc5T0jFRcLSFe6ePvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1WQr2gVRz19wV for ; Thu, 23 Apr 2026 09:44:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38f9f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Apr 2026 09:44:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav From: Martin Matuska Subject: git: d763fce2ec97 - stable/14 - libarchive: Update configuration List-Id: Commits to the stable branches 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: mm X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d763fce2ec97c1654d38fe9ea5e718030cc1fbc0 Auto-Submitted: auto-generated Date: Thu, 23 Apr 2026 09:44:52 +0000 Message-Id: <69e9ea14.38f9f.42c4d1a1@gitrepo.freebsd.org> The branch stable/14 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=d763fce2ec97c1654d38fe9ea5e718030cc1fbc0 commit d763fce2ec97c1654d38fe9ea5e718030cc1fbc0 Author: Dag-Erling Smørgrav AuthorDate: 2026-04-18 08:25:31 +0000 Commit: Martin Matuska CommitDate: 2026-04-23 09:44:14 +0000 libarchive: Update configuration PR: 294577 MFC after: 1 week Reviewed by: mm Differential Revision: https://reviews.freebsd.org/D56468 (cherry picked from commit 05bbe5e3883492dd2afa52039da1fac45c5059a0) --- lib/libarchive/config_freebsd.h | 126 ++++++++++++++++++++++++++++------------ 1 file changed, 89 insertions(+), 37 deletions(-) diff --git a/lib/libarchive/config_freebsd.h b/lib/libarchive/config_freebsd.h index 1601adddd0de..41d91cea9bd3 100644 --- a/lib/libarchive/config_freebsd.h +++ b/lib/libarchive/config_freebsd.h @@ -26,30 +26,11 @@ */ #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 -#include - -/* FreeBSD 5.0 and later has ACL and extattr support. */ -#if __FreeBSD__ > 4 -#define ARCHIVE_ACL_FREEBSD 1 -#define ARCHIVE_XATTR_FREEBSD 1 -#define HAVE_ACL_GET_PERM_NP 1 -#define HAVE_ARC4RANDOM_BUF 1 -#define HAVE_STRUCT_XVFSCONF 1 -#define HAVE_SYS_ACL_H 1 -#define HAVE_SYS_EXTATTR_H 1 -#if __FreeBSD__ > 7 -/* FreeBSD 8.0 and later has NFSv4 ACL support */ -#define ARCHIVE_ACL_FREEBSD_NFS4 1 -#define HAVE_ACL_GET_LINK_NP 1 -#define HAVE_ACL_IS_TRIVIAL_NP 1 -#define HAVE_ACL_SET_LINK_NP 1 -#endif /* __FreeBSD__ > 7 */ -#endif /* __FreeBSD__ > 4 */ - #ifdef WITH_OPENSSL #define HAVE_LIBCRYPTO 1 #define HAVE_OPENSSL_EVP_H 1 #define HAVE_OPENSSL_MD5_H 1 +#define HAVE_OPENSSL_OPENSSLV_H 1 #define HAVE_OPENSSL_RIPEMD_H 1 #define HAVE_OPENSSL_SHA_H 1 #define HAVE_OPENSSL_SHA256_INIT 1 @@ -75,13 +56,59 @@ #define HAVE_SHA512_INIT 1 #endif +#define ARCHIVE_ACL_FREEBSD 1 +#define ARCHIVE_ACL_FREEBSD_NFS4 1 +#define ARCHIVE_XATTR_FREEBSD 1 +#define HAVE_ACL_ADD_FLAG_NP 1 +#define HAVE_ACL_ADD_PERM 1 +#define HAVE_ACL_CLEAR_FLAGS_NP 1 +#define HAVE_ACL_CLEAR_PERMS 1 +#define HAVE_ACL_CREATE_ENTRY 1 +#define HAVE_ACL_DELETE_DEF_FILE 1 +#define HAVE_ACL_ENTRY_T 1 +#define HAVE_ACL_FREE 1 +#define HAVE_ACL_GET_BRAND_NP 1 +#define HAVE_ACL_GET_ENTRY 1 +#define HAVE_ACL_GET_ENTRY_TYPE_NP 1 +#define HAVE_ACL_GET_FD 1 +#define HAVE_ACL_GET_FD_NP 1 +#define HAVE_ACL_GET_FILE 1 +#define HAVE_ACL_GET_FLAGSET_NP 1 +#define HAVE_ACL_GET_FLAG_NP 1 +#define HAVE_ACL_GET_LINK_NP 1 +#define HAVE_ACL_GET_PERMSET 1 +#define HAVE_ACL_GET_PERM_NP 1 +#define HAVE_ACL_GET_QUALIFIER 1 +#define HAVE_ACL_GET_TAG_TYPE 1 +#define HAVE_ACL_INIT 1 +#define HAVE_ACL_IS_TRIVIAL_NP 1 +#define HAVE_ACL_PERMSET_T 1 +#define HAVE_ACL_SET_ENTRY_TYPE_NP 1 +#define HAVE_ACL_SET_FD 1 +#define HAVE_ACL_SET_FD_NP 1 +#define HAVE_ACL_SET_FILE 1 +#define HAVE_ACL_SET_LINK_NP 1 +#define HAVE_ACL_SET_QUALIFIER 1 +#define HAVE_ACL_SET_TAG_TYPE 1 +#define HAVE_ACL_T 1 +#define HAVE_ACL_TAG_T 1 +#define HAVE_ARC4RANDOM_BUF 1 #define HAVE_BSDXML_H 1 #define HAVE_BZLIB_H 1 #define HAVE_CHFLAGS 1 #define HAVE_CHOWN 1 #define HAVE_CHROOT 1 +#define HAVE_CLOSEFROM 1 +#define HAVE_CLOSE_RANGE 1 #define HAVE_CTIME_R 1 #define HAVE_CTYPE_H 1 +#ifndef __linux__ +#define HAVE_D_MD_ORDER 1 +#endif +#define HAVE_DECL_ACL_SYNCHRONIZE 1 +#define HAVE_DECL_ACL_TYPE_EXTENDED 0 +#define HAVE_DECL_ACL_TYPE_NFS4 1 +#define HAVE_DECL_ACL_USER 1 #define HAVE_DECL_EXTATTR_NAMESPACE_USER 1 #define HAVE_DECL_INT32_MAX 1 #define HAVE_DECL_INT32_MIN 1 @@ -95,15 +122,21 @@ #define HAVE_DECL_UINT32_MAX 1 #define HAVE_DECL_UINT64_MAX 1 #define HAVE_DECL_UINTMAX_MAX 1 +#define HAVE_DECL_XATTR_NOFOLLOW 0 #define HAVE_DIRENT_H 1 #define HAVE_DIRFD 1 #define HAVE_DLFCN_H 1 -#ifndef __linux__ -#define HAVE_D_MD_ORDER 1 -#endif #define HAVE_EFTYPE 1 #define HAVE_EILSEQ 1 #define HAVE_ERRNO_H 1 +#define HAVE_EXTATTR_GET_FD 1 +#define HAVE_EXTATTR_GET_FILE 1 +#define HAVE_EXTATTR_GET_LINK 1 +#define HAVE_EXTATTR_LIST_FD 1 +#define HAVE_EXTATTR_LIST_FILE 1 +#define HAVE_EXTATTR_LIST_LINK 1 +#define HAVE_EXTATTR_SET_FD 1 +#define HAVE_EXTATTR_SET_LINK 1 #define HAVE_FCHDIR 1 #define HAVE_FCHFLAGS 1 #define HAVE_FCHMOD 1 @@ -120,26 +153,33 @@ #define HAVE_FSTATFS 1 #define HAVE_FSTATVFS 1 #define HAVE_FTRUNCATE 1 +#define HAVE_FUTIMENS 1 #define HAVE_FUTIMES 1 #define HAVE_FUTIMESAT 1 +#define HAVE_GETEGID 1 #define HAVE_GETEUID 1 #define HAVE_GETGRGID_R 1 #define HAVE_GETGRNAM_R 1 #define HAVE_GETLINE 1 -#define HAVE_GETOPT_OPTRESET 1 #define HAVE_GETPID 1 #define HAVE_GETPWNAM_R 1 #define HAVE_GETPWUID_R 1 +#define HAVE_GETRESGID 1 +#define HAVE_GETRESUID 1 #define HAVE_GETVFSBYNAME 1 #define HAVE_GMTIME_R 1 #define HAVE_GRP_H 1 #define HAVE_INTMAX_T 1 #define HAVE_INTTYPES_H 1 +#define HAVE_ISSETUGID 1 #define HAVE_LANGINFO_H 1 #define HAVE_LCHFLAGS 1 #define HAVE_LCHMOD 1 #define HAVE_LCHOWN 1 +#define HAVE_LIBBZ2 1 +#define HAVE_LIBLZMA 1 #define HAVE_LIBZ 1 +#define HAVE_LIBZSTD 1 #define HAVE_LIMITS_H 1 #define HAVE_LINK 1 #define HAVE_LINKAT 1 @@ -148,9 +188,10 @@ #define HAVE_LONG_LONG_INT 1 #define HAVE_LSTAT 1 #define HAVE_LUTIMES 1 +#define HAVE_LZMA_H 1 +#define HAVE_LZMA_STREAM_ENCODER_MT 1 #define HAVE_MBRTOWC 1 #define HAVE_MEMMOVE 1 -#define HAVE_MEMORY_H 1 #define HAVE_MEMSET 1 #define HAVE_MKDIR 1 #define HAVE_MKFIFO 1 @@ -162,7 +203,16 @@ #define HAVE_PIPE 1 #define HAVE_POLL 1 #define HAVE_POLL_H 1 +#if 0 +/* + * FreeBSD does have posix_spawn() and posix_spawnp(), but they are + * wrappers around fork() + execve() and fork() + execvp() respectively, + * so there is no reason to prefer them to the simpler alternatives, + * unlike e.g. Darwin where posix_spawn() is a system call. + */ +#define HAVE_POSIX_SPAWN 1 #define HAVE_POSIX_SPAWNP 1 +#endif #define HAVE_PTHREAD_H 1 #define HAVE_PWD_H 1 #define HAVE_READLINK 1 @@ -182,6 +232,7 @@ #define HAVE_STATVFS 1 #define HAVE_STDARG_H 1 #define HAVE_STDINT_H 1 +#define HAVE_STDIO_H 1 #define HAVE_STDLIB_H 1 #define HAVE_STRCHR 1 #define HAVE_STRDUP 1 @@ -192,6 +243,8 @@ #define HAVE_STRING_H 1 #define HAVE_STRNLEN 1 #define HAVE_STRRCHR 1 +#define HAVE_STRUCT_STATFS 1 +#define HAVE_STRUCT_STATFS_F_IOSIZE 1 #define HAVE_STRUCT_STATFS_F_NAMEMAX 1 #define HAVE_STRUCT_STAT_ST_BIRTHTIME 1 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1 @@ -200,13 +253,17 @@ #define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1 #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 #define HAVE_STRUCT_TM_TM_GMTOFF 1 +#define HAVE_STRUCT_VFSCONF 1 +#define HAVE_STRUCT_XVFSCONF 1 #define HAVE_SYMLINK 1 +#define HAVE_SYSCONF 1 +#define HAVE_SYS_ACL_H 1 #define HAVE_SYS_CDEFS_H 1 +#define HAVE_SYS_EXTATTR_H 1 #define HAVE_SYS_IOCTL_H 1 #define HAVE_SYS_MOUNT_H 1 #define HAVE_SYS_PARAM_H 1 #define HAVE_SYS_POLL_H 1 -#define HAVE_SYS_QUEUE_H 1 #define HAVE_SYS_SELECT_H 1 #define HAVE_SYS_STATVFS_H 1 #define HAVE_SYS_STAT_H 1 @@ -214,6 +271,8 @@ #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_UTSNAME_H 1 #define HAVE_SYS_WAIT_H 1 +#define HAVE_TCGETATTR 1 +#define HAVE_TCSETATTR 1 #define HAVE_TIMEGM 1 #define HAVE_TIME_H 1 #define HAVE_TZSET 1 @@ -224,6 +283,7 @@ #define HAVE_UNSIGNED_LONG_LONG 1 #define HAVE_UNSIGNED_LONG_LONG_INT 1 #define HAVE_UTIME 1 +#define HAVE_UTIMENSAT 1 #define HAVE_UTIMES 1 #define HAVE_UTIME_H 1 #define HAVE_VFORK 1 @@ -240,19 +300,11 @@ #define HAVE_WMEMCPY 1 #define HAVE_WMEMMOVE 1 #define HAVE_ZLIB_H 1 +#define HAVE_ZSTD_H 1 +#define HAVE_ZSTD_compressStream 1 +#define HAVE_ZSTD_minCLevel 1 #define TIME_WITH_SYS_TIME 1 -#if __FreeBSD_version >= 1100056 -#define HAVE_FUTIMENS 1 -#define HAVE_UTIMENSAT 1 -#endif - -/* FreeBSD 4 and earlier lack intmax_t/uintmax_t */ -#if __FreeBSD__ < 5 -#define intmax_t int64_t -#define uintmax_t uint64_t -#endif - /* FreeBSD defines for archive_hash.h */ #ifdef WITH_OPENSSL #define ARCHIVE_CRYPTO_MD5_OPENSSL 1 From nobody Thu Apr 23 09:44:53 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1WQs5Xyhz6ZJVp for ; Thu, 23 Apr 2026 09:44:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1WQs3P0Rz3pvS for ; Thu, 23 Apr 2026 09:44:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776937493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=utQEBMUcrMOrEOC8R1oYYNpUQKtwJp8ykMtcdrEO1ho=; b=BQ2O0ZNEDkbLBqpmpUqg7lm/SRU2vPPN0kts5wgK0oETx8e6zawF3SIECbTBU3kTgDH6Nh pu/H3WQhH2OQ0/Y41jiBnVYQEeiVD1/e6KWDT2r6ctpZ3WT8bk42pUG86LE2GfWA7CZWec /VaNMwYPCCOjKMUuCyzEHJu5PwabJMOBB0KE4quSaUYcYkveIehnPNK2j4T83DbFM5ii9s U8dMaSpJxFhjhCc+3gRiZRJCiQlG585SwAmBju9uxuUxgofQw27IYWcxx3/Fq7izf1Sw/t l+Ce6KnZt53U5REvSBmXbsJjF6hrL/k0qvJIAVwwXLGuCA6gqpzx+PYWG6kK5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776937493; a=rsa-sha256; cv=none; b=BXsi5ZS4KZj45+Bju5BHz7QZaDSSqpCk/etURmnDdSgeGrc+ZGT3V3IgohFcC+On+IggEk sw9ww5psAmW4ZJXmws4aSQP42vLSXQR/VdR4lBdPv5cKi9F0LEUQBp/wzKmuArth8G6hp7 CRCLIWweGjrPMaB+6HIWRzDtQiLGCEfgNZorDG/15/us3QF8RRW+pn1Oujv9T/NXhW+TzX 8m+2kuSB51ifzE4FThfmjMEs07xqbLgJIMUL/6KxsXdyDODA0qysR6SozmhVNrwKQBIvuq FssX1icLIKhEOQV20y9voBM/sZO3Wje5td1AFOgwI9r67+yM08xovgtQ0tonMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776937493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=utQEBMUcrMOrEOC8R1oYYNpUQKtwJp8ykMtcdrEO1ho=; b=cOcDWK3PBPrqQsf3nKWwpKHcOrgjdL77nTkLYdEliwQgGAsuZSAo3772XON2Aes6Y0JP46 /JUpaqDpOnWKV1tKvsYAnDS+V4R3lWzIy77dqruMGiAuQg0SsnMYzmYkuGqP7Bsw9+thb6 s9ga28UDbAuHj90+EQUYsORakMixPTXFtKMlaYOk9FfrZfV3KDL7pd0vCyEdhiCzd2n+bS xwO3hjnXM/iR1DcaTErOxUsmBaZIJoeE+XhJRxEP25YboJF1gwE/VhLfYI33zkun1PL7wP VSX+Ui67qXtQ0IYBi0bvTOD9WCei9Rw52kRPLCLy5kfwH49lBFojxWzpkjj2Hw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1WQs2sdJz19hJ for ; Thu, 23 Apr 2026 09:44:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38167 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Apr 2026 09:44:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav From: Martin Matuska Subject: git: 2e83ec426ee2 - stable/14 - libarchive: Staticize some variables List-Id: Commits to the stable branches 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: mm X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2e83ec426ee29850efd23f2a0c54dd811d89aa36 Auto-Submitted: auto-generated Date: Thu, 23 Apr 2026 09:44:53 +0000 Message-Id: <69e9ea15.38167.2e4b940f@gitrepo.freebsd.org> The branch stable/14 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=2e83ec426ee29850efd23f2a0c54dd811d89aa36 commit 2e83ec426ee29850efd23f2a0c54dd811d89aa36 Author: Dag-Erling Smørgrav AuthorDate: 2026-04-18 08:25:35 +0000 Commit: Martin Matuska CommitDate: 2026-04-23 09:44:20 +0000 libarchive: Staticize some variables This code was not being built due to errors in our libarchive configuration. Now that those have been addressed, staticize some variables that trip a “no previous extern declaration” error. This is a subset of upstream PR 2962. MFC after: 1 week Reviewed by: mm Differential Revision: https://reviews.freebsd.org/D56471 (cherry picked from commit 7e9d974bc023755161742f66c8c77546bab88586) --- contrib/libarchive/test_utils/test_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/libarchive/test_utils/test_main.c b/contrib/libarchive/test_utils/test_main.c index 1f641bbe8db7..f7364c0ba4e8 100644 --- a/contrib/libarchive/test_utils/test_main.c +++ b/contrib/libarchive/test_utils/test_main.c @@ -187,10 +187,10 @@ const char *testprog; #ifdef RUN_TEST_UNPRIV /* Unprivileged user to run as */ -const char *tuser = "nobody"; +static const char *tuser = "nobody"; /* Original and test credentials */ -uid_t ouid, tuid; -uid_t ogid, tgid; +static uid_t ouid, tuid; +static uid_t ogid, tgid; #endif #if defined(_WIN32) && !defined(__CYGWIN__) From nobody Thu Apr 23 09:44:51 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1WQw481rz6ZJVv for ; Thu, 23 Apr 2026 09:44:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1WQw32R5z3q5c for ; Thu, 23 Apr 2026 09:44:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776937496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mkkOzp+V8bpsc1gO8rQERE2M+LlOz61BTmnq3PyCVwM=; b=il6Ap22Tdqw3/rHmF1Z0kFgbyW8jD3CjN3Li68Fn3/Kixzwp3KZ0a6HwKQFzEhYizF15+V He30bps935gPNPdJki0ZjEzRFewTcEElYy2J+pTopAQCzaMKUKJSIHJ+SdUran6bzvnxyL ldK6t5JPYrYVN0lUoUIIYMi7oxWKxwxR1NpGskqNtmLvxOoHCCvmxFxNd8eVpsaUOWBHxQ mMyGi99hsq5FsbNspU4botj/YIz2ZK8o/r276tTES0aM+aCijMrvJ3mY1V/+EqKGBR/l6O 0asQA3szkJU2Yp+w6b3xGIsQ6sjHYIrnAZUsIFAMJQMPavX/afNAPBlZybDHRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776937496; a=rsa-sha256; cv=none; b=jAOyoW6tLwXWwt8XR642aK0fkUL3lNYmlHecTCjEVXfmf4Mc1kVcMemRQZrf5rj/S2yJJy 9VTl6jjQpESV84twyRuOjWL/Yt4pUW44C5Ctg1Zjls0VMRYC5UnzB/mcaPAzKrpGSntuOr mO9mylcYlv6xiiZNMqqWhhdzfHwSWYmC7mrvOYLpcYdNgG6apFVfDNarntJ9aMPkFo2Gc/ J0hVVE33F/ynYawZx/c1NUmmm5Kfelf1wNbYjfwxHf6mtztLkiZZxikO0l60HF0n8HgI3p hjz/d5qIKlWWL19D1qADVmGddpeINg3zhzQrl9qi1axbGlhsB7VqiZPvf+J0+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776937496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mkkOzp+V8bpsc1gO8rQERE2M+LlOz61BTmnq3PyCVwM=; b=o1OmfAGNpCRyVsvj20S+U3kf4H85AI6KS/VpoudXyApTdjCpT6V5VXGyl53DAOuFN/bDMv xKu/n2a0S6EQ5DMc58XowxeNc7EgFiifbzTQ7hQxwDy9C2mhxivb/Yi9VJfyoXPnXrGKGA j0ZicpZEtW4bY7POpwyu56LSCtRzPF31T9je72ANcTVMzxfdMQRLZ1EbDTi2N//dgbES9D BrhCp+NdnpBeWRjFay6LJEBnuEZMJQJXVWz2dxf9DlFq4K7yWmz1IzhRNg02Qypp/W+2Gd 1ktGAA1pv1gilrWgc6HLCpKnYC6q9UTfAdKoRR+vw4ejJfY5InOZzniuMcQp9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1WQw2WJYz19hL for ; Thu, 23 Apr 2026 09:44:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 371f6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Apr 2026 09:44:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Martin Matuska Subject: git: 2dddbb67c6a1 - stable/14 - libarchive: merge from vendor branch List-Id: Commits to the stable branches 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: mm X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2dddbb67c6a15317df549538be286e908d11de98 Auto-Submitted: auto-generated Date: Thu, 23 Apr 2026 09:44:51 +0000 Message-Id: <69e9ea13.371f6.4a6f2bee@gitrepo.freebsd.org> The branch stable/14 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=2dddbb67c6a15317df549538be286e908d11de98 commit 2dddbb67c6a15317df549538be286e908d11de98 Author: Martin Matuska AuthorDate: 2026-04-13 13:47:17 +0000 Commit: Martin Matuska CommitDate: 2026-04-23 09:44:04 +0000 libarchive: merge from vendor branch libarchive 3.8.7 Important bugfixes: #2871 libarchive: fix handling of option failures #2897 iso9660: fix undefined behavior #2898 RAR: fix LZSS window size mismatch after PPMd block #2900 CAB: fix NULL pointer dereference during skip #2911 libarchive: do not continue with truncated numbers #2919 CAB: Fix Heap OOB Write in CAB LZX decoder #2934 iso9660: fix posibble heap buffer overflow on 32-bit systems #2939 cpio: Fix -R memory leak #2947 libarchive: lzop and grzip filter support Important bugfixes between 3.8.5 and 3.8.6: #2860 bsdunzip: fix ISO week year and Gregorian year confusion #2864 7zip: ix SEGV in check_7zip_header_in_sfx via ELF offset validation #2875 7zip: fix out-of-bounds access on ELF 64-bit header #2877 RAR5 reader: fix infinite loop in rar5 decompression #2878 mtree reader: Fix file descriptor leak in mtree parser cleanup (CWE-775) #2892 RAR5 reader: fix potential memory leak #2893 RAR5: fix SIGSEGV when archive_read_support_format_rar5 is called twice #2895 CAB reader: fix memory leak on repeated calls to archive_read_support_format_cab Obtained from: libarchive Vendor commit: ded82291ab41d5e355831b96b0e1ff49e24d8939 MFC after: 1 week (cherry picked from commit eb5165bb491138f60d9004bc4c781490016d9288) --- contrib/libarchive/NEWS | 4 + contrib/libarchive/README.md | 9 +- contrib/libarchive/cpio/cmdline.c | 15 +- contrib/libarchive/cpio/cpio.c | 123 ++- contrib/libarchive/cpio/cpio.h | 2 - contrib/libarchive/cpio/test/test_format_newc.c | 7 + contrib/libarchive/libarchive/archive.h | 4 +- contrib/libarchive/libarchive/archive_acl.c | 6 +- .../libarchive/libarchive/archive_check_magic.c | 4 +- .../libarchive/archive_cryptor_private.h | 4 + contrib/libarchive/libarchive/archive_entry.h | 2 +- contrib/libarchive/libarchive/archive_hmac.c | 6 + contrib/libarchive/libarchive/archive_options.c | 4 +- contrib/libarchive/libarchive/archive_pathmatch.c | 4 +- contrib/libarchive/libarchive/archive_ppmd8.c | 22 +- .../libarchive/libarchive/archive_ppmd8_private.h | 25 - contrib/libarchive/libarchive/archive_read.c | 12 +- .../libarchive/archive_read_append_filter.c | 4 + .../libarchive/archive_read_disk_posix.c | 6 +- .../libarchive/archive_read_open_filename.c | 7 +- .../libarchive/archive_read_support_filter_grzip.c | 2 +- .../libarchive/archive_read_support_filter_lz4.c | 4 +- .../libarchive/archive_read_support_filter_lzop.c | 2 +- .../archive_read_support_filter_program.c | 2 + .../libarchive/archive_read_support_format_7zip.c | 24 +- .../libarchive/archive_read_support_format_cab.c | 24 +- .../libarchive/archive_read_support_format_cpio.c | 4 +- .../archive_read_support_format_iso9660.c | 26 +- .../libarchive/archive_read_support_format_lha.c | 11 +- .../libarchive/archive_read_support_format_mtree.c | 7 +- .../libarchive/archive_read_support_format_rar.c | 73 +- .../libarchive/archive_read_support_format_rar5.c | 45 +- .../libarchive/archive_read_support_format_tar.c | 6 +- .../libarchive/archive_read_support_format_xar.c | 14 +- .../libarchive/archive_read_support_format_zip.c | 22 +- contrib/libarchive/libarchive/archive_string.c | 16 +- contrib/libarchive/libarchive/archive_write.c | 2 +- .../archive_write_add_filter_b64encode.c | 22 +- .../libarchive/archive_write_add_filter_bzip2.c | 7 +- .../libarchive/archive_write_add_filter_gzip.c | 12 +- .../libarchive/archive_write_add_filter_lrzip.c | 21 +- .../libarchive/archive_write_add_filter_lz4.c | 14 +- .../libarchive/archive_write_add_filter_lzop.c | 7 +- .../libarchive/archive_write_add_filter_uuencode.c | 22 +- .../libarchive/archive_write_add_filter_xz.c | 27 +- .../libarchive/archive_write_add_filter_zstd.c | 52 +- .../libarchive/archive_write_disk_posix.c | 30 +- .../libarchive/archive_write_set_format_7zip.c | 9 +- .../archive_write_set_format_cpio_binary.c | 4 +- .../archive_write_set_format_cpio_newc.c | 2 +- .../libarchive/archive_write_set_format_cpio_odc.c | 2 +- .../libarchive/archive_write_set_format_gnutar.c | 34 +- .../libarchive/archive_write_set_format_iso9660.c | 18 +- .../libarchive/archive_write_set_format_mtree.c | 2 +- .../libarchive/archive_write_set_format_pax.c | 6 +- .../libarchive/archive_write_set_format_ustar.c | 27 +- .../libarchive/archive_write_set_format_v7tar.c | 27 +- .../libarchive/archive_write_set_format_xar.c | 6 +- .../libarchive/archive_write_set_format_zip.c | 49 +- contrib/libarchive/libarchive/test/test_acl_text.c | 23 + .../libarchive/test/test_archive_pathmatch.c | 18 + .../test/test_archive_string_conversion.c | 135 +++ .../test/test_gnutar_filename_encoding.c | 40 + .../libarchive/test/test_read_format_7zip.c | 26 + .../test/test_read_format_7zip_malformed.c | 17 + .../test/test_read_format_7zip_malformed3.7z.uu | 24 + .../test_read_format_7zip_sfx_elf64trunc.elf.uu | 5 + .../libarchive/test/test_read_format_cab_lzx_oob.c | 45 + .../test/test_read_format_cab_lzx_oob.cab.uu | 11 + .../test/test_read_format_cab_skip_malformed.c | 41 + .../test_read_format_cab_skip_malformed.cab.uu | 95 ++ .../test/test_read_format_iso_zisofs_overflow.c | 104 ++ .../test_read_format_iso_zisofs_overflow.iso.uu | 1096 ++++++++++++++++++++ .../test/test_read_format_lha_oversize_header.c | 50 + .../test_read_format_lha_oversize_header.lzh.uu | 60 ++ .../test/test_read_format_rar5_loop_bug.c | 53 + .../test/test_read_format_rar5_loop_bug.rar.uu | 189 ++++ .../libarchive/test/test_read_set_format.c | 34 + .../libarchive/test/test_ustar_filename_encoding.c | 40 + .../libarchive/test/test_v7tar_filename_encoding.c | 67 ++ .../test/test_warn_missing_hardlink_target.c | 2 +- .../libarchive/libarchive/test/test_write_disk.c | 29 + .../libarchive/test/test_write_disk_perms.c | 11 +- .../libarchive/test/test_zip_filename_encoding.c | 40 + .../la_getline.c => libarchive_fe/lafe_getline.c} | 11 +- .../la_getline.h => libarchive_fe/lafe_getline.h} | 15 +- contrib/libarchive/tar/bsdtar.c | 20 +- contrib/libarchive/tar/read.c | 2 +- contrib/libarchive/tar/util.c | 8 +- contrib/libarchive/tar/write.c | 16 +- contrib/libarchive/test_utils/test_common.h | 4 + contrib/libarchive/test_utils/test_main.c | 85 +- contrib/libarchive/unzip/bsdunzip.c | 6 +- lib/libarchive/tests/Makefile | 13 + usr.bin/unzip/Makefile | 2 +- 95 files changed, 3019 insertions(+), 372 deletions(-) diff --git a/contrib/libarchive/NEWS b/contrib/libarchive/NEWS index be14de445b57..d5e9769771e2 100644 --- a/contrib/libarchive/NEWS +++ b/contrib/libarchive/NEWS @@ -1,3 +1,7 @@ +Apr 13, 2026: libarchive 3.8.7 released + +Mar 10, 2026: libarchive 3.8.6 released + Jan 05, 2026: libarchive 3.8.5 released Dec 01, 2025: libarchive 3.8.4 released diff --git a/contrib/libarchive/README.md b/contrib/libarchive/README.md index e9691f1b710b..3009e1b54d18 100644 --- a/contrib/libarchive/README.md +++ b/contrib/libarchive/README.md @@ -37,10 +37,13 @@ The top-level directory contains the following information files: * **CMakeLists.txt** - input for "cmake" build tool, see INSTALL * **configure** - configuration script, see INSTALL for details. If your copy of the source lacks a `configure` script, you can try to construct it by running the script in `build/autogen.sh` (or use `cmake`). -The following files in the top-level directory are used by the 'configure' script: +The following files in the top-level directory are related to the 'configure' script and are only needed by maintainers: -* `Makefile.am`, `aclocal.m4`, `configure.ac` - used to build this distribution, only needed by maintainers -* `Makefile.in`, `config.h.in` - templates used by configure script +* `configure.ac` - used (by autoconf) to build the configure script and related files +* `Makefile.am` - used (by automake) to generate Makefile.in +* `aclocal.m4` - auto-generated file (created by aclocal) used to build the configure script +* `Makefile.in` - auto-generated template (created by automake) used by the configure script to create Makefile +* `config.h.in` - auto-generated template (created by autoheader) used by the configure script to create config.h ## Documentation diff --git a/contrib/libarchive/cpio/cmdline.c b/contrib/libarchive/cpio/cmdline.c index db06c03c011d..a3d029c65161 100644 --- a/contrib/libarchive/cpio/cmdline.c +++ b/contrib/libarchive/cpio/cmdline.c @@ -11,6 +11,9 @@ #ifdef HAVE_ERRNO_H #include #endif +#ifdef HAVE_LIMITS_H +#include +#endif #ifdef HAVE_GRP_H #include #endif @@ -347,9 +350,10 @@ owner_parse(const char *spec, struct cpio_owner *owner, const char **errmsg) owner->gid = pwent->pw_gid; } else { char *end; + unsigned long val; errno = 0; - owner->uid = (int)strtoul(user, &end, 10); - if (errno || *end != '\0') { + val = strtoul(user, &end, 10); + if (errno || *end != '\0' || val > (unsigned)INT_MAX) { snprintf(errbuff, sizeof(errbuff), "Couldn't lookup user ``%s''", user); errbuff[sizeof(errbuff) - 1] = '\0'; @@ -357,6 +361,7 @@ owner_parse(const char *spec, struct cpio_owner *owner, const char **errmsg) *errmsg = errbuff; return (-1); } + owner->uid = (int)val; } free(user); } @@ -373,15 +378,17 @@ owner_parse(const char *spec, struct cpio_owner *owner, const char **errmsg) } } else { char *end; + unsigned long val; errno = 0; - owner->gid = (int)strtoul(g, &end, 10); - if (errno || *end != '\0') { + val = strtoul(g, &end, 10); + if (errno || *end != '\0' || val > (unsigned)INT_MAX) { snprintf(errbuff, sizeof(errbuff), "Couldn't lookup group ``%s''", g); errbuff[sizeof(errbuff) - 1] = '\0'; *errmsg = errbuff; return (-1); } + owner->gid = (int)val; } } return (0); diff --git a/contrib/libarchive/cpio/cpio.c b/contrib/libarchive/cpio/cpio.c index 77eefe809f37..6e6c2c3356c0 100644 --- a/contrib/libarchive/cpio/cpio.c +++ b/contrib/libarchive/cpio/cpio.c @@ -8,6 +8,8 @@ #include "cpio_platform.h" +#include "lafe_getline.h" + #include #include #include @@ -33,6 +35,9 @@ #ifdef HAVE_LOCALE_H #include #endif +#ifdef HAVE_LIMITS_H +#include +#endif #ifdef HAVE_PWD_H #include #endif @@ -83,7 +88,7 @@ struct name_cache { static int extract_data(struct archive *, struct archive *); const char * cpio_i64toa(int64_t); -static const char *cpio_rename(const char *name); +static void cpio_rename(struct archive_entry *); static int entry_to_archive(struct cpio *, struct archive_entry *); static int file_to_archive(struct cpio *, const char *); static void free_cache(struct name_cache *cache); @@ -110,19 +115,16 @@ static void passphrase_free(char *); int main(int argc, char *argv[]) { - static char buff[16384]; struct cpio _cpio; /* Allocated on stack. */ struct cpio *cpio; struct cpio_owner owner; const char *errmsg; char *tptr; - int opt, t; + int opt; + long t; cpio = &_cpio; memset(cpio, 0, sizeof(*cpio)); - cpio->buff = buff; - cpio->buff_size = sizeof(buff); - #if defined(HAVE_SIGACTION) { @@ -204,13 +206,13 @@ main(int argc, char *argv[]) case 'C': /* NetBSD/OpenBSD */ errno = 0; tptr = NULL; - t = (int)strtol(cpio->argument, &tptr, 10); - if (errno || t <= 0 || *(cpio->argument) == '\0' || + t = strtol(cpio->argument, &tptr, 10); + if (errno || t <= 0 || t > INT_MAX || *(cpio->argument) == '\0' || tptr == NULL || *tptr != '\0') { lafe_errc(1, 0, "Invalid blocksize: %s", cpio->argument); } - cpio->bytes_per_block = t; + cpio->bytes_per_block = (int)t; break; case 'c': /* POSIX 1997 */ cpio->format = "odc"; @@ -222,7 +224,7 @@ main(int argc, char *argv[]) if (archive_match_include_pattern_from_file( cpio->matching, cpio->argument, cpio->option_null) != ARCHIVE_OK) - lafe_errc(1, 0, "Error : %s", + lafe_errc(1, 0, "%s", archive_error_string(cpio->matching)); break; case 'F': /* NetBSD/OpenBSD/GNU cpio */ @@ -231,7 +233,7 @@ main(int argc, char *argv[]) case 'f': /* POSIX 1997 */ if (archive_match_exclude_pattern(cpio->matching, cpio->argument) != ARCHIVE_OK) - lafe_errc(1, 0, "Error : %s", + lafe_errc(1, 0, "%s", archive_error_string(cpio->matching)); break; case OPTION_GRZIP: @@ -247,7 +249,7 @@ main(int argc, char *argv[]) cpio->filename = cpio->argument; break; case 'i': /* POSIX 1997 */ - if (cpio->mode != '\0') + if (cpio->mode != '\0' && cpio->mode != opt) lafe_errc(1, 0, "Cannot use both -i and -%c", cpio->mode); cpio->mode = opt; @@ -289,13 +291,13 @@ main(int argc, char *argv[]) cpio->filename = cpio->argument; break; case 'o': /* POSIX 1997 */ - if (cpio->mode != '\0') + if (cpio->mode != '\0' && cpio->mode != opt) lafe_errc(1, 0, "Cannot use both -o and -%c", cpio->mode); cpio->mode = opt; break; case 'p': /* POSIX 1997 */ - if (cpio->mode != '\0') + if (cpio->mode != '\0' && cpio->mode != opt) lafe_errc(1, 0, "Cannot use both -p and -%c", cpio->mode); cpio->mode = opt; @@ -316,17 +318,21 @@ main(int argc, char *argv[]) if (owner_parse(cpio->argument, &owner, &errmsg) != 0) { if (!errmsg) errmsg = "Error parsing owner"; - lafe_warnc(-1, "%s", errmsg); + lafe_warnc(0, "%s", errmsg); usage(); } if (owner.uid != -1) cpio->uid_override = owner.uid; - if (owner.uname != NULL) + if (owner.uname != NULL) { + free(cpio->uname_override); cpio->uname_override = owner.uname; + } if (owner.gid != -1) cpio->gid_override = owner.gid; - if (owner.gname != NULL) + if (owner.gname != NULL) { + free(cpio->gname_override); cpio->gname_override = owner.gname; + } break; case 'r': /* POSIX 1997 */ cpio->option_rename = 1; @@ -409,7 +415,7 @@ main(int argc, char *argv[]) while (*cpio->argv != NULL) { if (archive_match_include_pattern(cpio->matching, *cpio->argv) != ARCHIVE_OK) - lafe_errc(1, 0, "Error : %s", + lafe_errc(1, 0, "%s", archive_error_string(cpio->matching)); --cpio->argc; ++cpio->argv; @@ -427,7 +433,7 @@ main(int argc, char *argv[]) break; default: lafe_errc(1, 0, - "Must specify at least one of -i, -o, or -p"); + "Must specify one of -i, -o, or -p"); } archive_match_free(cpio->matching); @@ -524,7 +530,7 @@ mode_out(struct cpio *cpio) int r; if (cpio->option_append) - lafe_errc(1, 0, "Append mode not yet supported."); + lafe_errc(1, 0, "Append mode not yet supported"); cpio->archive_read_disk = archive_read_disk_new(); if (cpio->archive_read_disk == NULL) @@ -638,7 +644,7 @@ mode_out(struct cpio *cpio) int64_t blocks = (archive_filter_bytes(cpio->archive, 0) + 511) / 512; - fprintf(stderr, "%lu %s\n", (unsigned long)blocks, + fprintf(stderr, "%lld %s\n", (long long)blocks, blocks == 1 ? "block" : "blocks"); } archive_write_free(cpio->archive); @@ -696,7 +702,6 @@ remove_leading_slash(const char *p) static int file_to_archive(struct cpio *cpio, const char *srcpath) { - const char *destpath; struct archive_entry *entry, *spare; size_t len; int r; @@ -738,7 +743,6 @@ file_to_archive(struct cpio *cpio, const char *srcpath) * pass mode or the name that will go into the archive in * output mode. */ - destpath = srcpath; if (cpio->destdir) { len = cpio->destdir_len + strlen(srcpath) + 8; if (len >= cpio->pass_destpath_alloc) { @@ -754,15 +758,17 @@ file_to_archive(struct cpio *cpio, const char *srcpath) } strcpy(cpio->pass_destpath, cpio->destdir); strcat(cpio->pass_destpath, remove_leading_slash(srcpath)); - destpath = cpio->pass_destpath; + archive_entry_set_pathname(entry, cpio->pass_destpath); + } else { + archive_entry_set_pathname(entry, srcpath); } if (cpio->option_rename) - destpath = cpio_rename(destpath); - if (destpath == NULL) { + cpio_rename(entry); + + if (archive_entry_pathname(entry) == NULL) { archive_entry_free(entry); return (0); } - archive_entry_copy_pathname(entry, destpath); /* * If we're trying to preserve hardlinks, match them here. @@ -791,7 +797,6 @@ entry_to_archive(struct cpio *cpio, struct archive_entry *entry) const char *destpath = archive_entry_pathname(entry); const char *srcpath = archive_entry_sourcepath(entry); int fd = -1; - ssize_t bytes_read; int r; /* Print out the destination name to the user. */ @@ -869,21 +874,23 @@ entry_to_archive(struct cpio *cpio, struct archive_entry *entry) exit(1); if (r >= ARCHIVE_WARN && archive_entry_size(entry) > 0 && fd >= 0) { - bytes_read = read(fd, cpio->buff, (unsigned)cpio->buff_size); + static char buff[16384]; + ssize_t bytes_read; + + bytes_read = read(fd, buff, sizeof(buff)); while (bytes_read > 0) { ssize_t bytes_write; bytes_write = archive_write_data(cpio->archive, - cpio->buff, bytes_read); + buff, bytes_read); if (bytes_write < 0) lafe_errc(1, archive_errno(cpio->archive), "%s", archive_error_string(cpio->archive)); if (bytes_write < bytes_read) { lafe_warnc(0, "Truncated write; file may have " - "grown while being archived."); + "grown while being archived"); } - bytes_read = read(fd, cpio->buff, - (unsigned)cpio->buff_size); + bytes_read = read(fd, buff, sizeof(buff)); } } @@ -997,11 +1004,9 @@ mode_in(struct cpio *cpio) } if (archive_match_path_excluded(cpio->matching, entry)) continue; - if (cpio->option_rename) { - destpath = cpio_rename(archive_entry_pathname(entry)); - archive_entry_set_pathname(entry, destpath); - } else - destpath = archive_entry_pathname(entry); + if (cpio->option_rename) + cpio_rename(entry); + destpath = archive_entry_pathname(entry); if (destpath == NULL) continue; if (cpio->verbose) @@ -1040,7 +1045,7 @@ mode_in(struct cpio *cpio) if (!cpio->quiet) { int64_t blocks = (archive_filter_bytes(a, 0) + 511) / 512; - fprintf(stderr, "%lu %s\n", (unsigned long)blocks, + fprintf(stderr, "%lld %s\n", (long long)blocks, blocks == 1 ? "block" : "blocks"); } archive_read_free(a); @@ -1125,7 +1130,7 @@ mode_list(struct cpio *cpio) if (!cpio->quiet) { int64_t blocks = (archive_filter_bytes(a, 0) + 511) / 512; - fprintf(stderr, "%lu %s\n", (unsigned long)blocks, + fprintf(stderr, "%lld %s\n", (long long)blocks, blocks == 1 ? "block" : "blocks"); } archive_read_free(a); @@ -1292,54 +1297,60 @@ mode_pass(struct cpio *cpio, const char *destdir) * that an input of '.' means the name should be unchanged. GNU cpio * treats '.' as a literal new name. */ -static const char * -cpio_rename(const char *name) +void +cpio_rename(struct archive_entry *entry) { - static char buff[1024]; + char *buff = NULL, *p, *ret = NULL; FILE *t; - char *p, *ret; + size_t n = 0; + ssize_t r; #if defined(_WIN32) && !defined(__CYGWIN__) FILE *to; t = fopen("CONIN$", "r"); if (t == NULL) - return (name); + return; to = fopen("CONOUT$", "w"); if (to == NULL) { fclose(t); - return (name); + return; } - fprintf(to, "%s (Enter/./(new name))? ", name); + fprintf(to, "%s (Enter/./(new name))? ", archive_entry_pathname(entry)); fclose(to); #else t = fopen("/dev/tty", "r+"); if (t == NULL) - return (name); - fprintf(t, "%s (Enter/./(new name))? ", name); + return; + fprintf(t, "%s (Enter/./(new name))? ", archive_entry_pathname(entry)); fflush(t); #endif - p = fgets(buff, sizeof(buff), t); + r = getline(&buff, &n, t); fclose(t); - if (p == NULL) + if (r < 1) /* End-of-file is a blank line. */ - return (NULL); + goto done; + p = buff; while (*p == ' ' || *p == '\t') ++p; if (*p == '\n' || *p == '\0') /* Empty line. */ - return (NULL); - if (*p == '.' && p[1] == '\n') + goto done; + if (*p == '.' && p[1] == '\n') { /* Single period preserves original name. */ - return (name); + free(buff); + return; + } ret = p; /* Trim the final newline. */ while (*p != '\0' && *p != '\n') ++p; /* Overwrite the final \n with a null character. */ *p = '\0'; - return (ret); +done: + archive_entry_set_pathname(entry, ret); + free(buff); } static void diff --git a/contrib/libarchive/cpio/cpio.h b/contrib/libarchive/cpio/cpio.h index 9bc631b544fe..2621a4c3dda3 100644 --- a/contrib/libarchive/cpio/cpio.h +++ b/contrib/libarchive/cpio/cpio.h @@ -71,8 +71,6 @@ struct cpio { /* Work data. */ struct archive *matching; - char *buff; - size_t buff_size; char *ppbuff; }; diff --git a/contrib/libarchive/cpio/test/test_format_newc.c b/contrib/libarchive/cpio/test/test_format_newc.c index 33aa16d07a81..9d4e4e9fb674 100644 --- a/contrib/libarchive/cpio/test/test_format_newc.c +++ b/contrib/libarchive/cpio/test/test_format_newc.c @@ -6,6 +6,13 @@ */ #include "test.h" +#ifdef HAVE_GETEUID +#define getuid() geteuid() +#endif +#ifdef HAVE_GETEGID +#define getgid() getegid() +#endif + /* Number of bytes needed to pad 'n' to multiple of 'block', assuming * that 'block' is a power of two. This trick can be more easily * remembered as -n & (block - 1), but many compilers quite reasonably diff --git a/contrib/libarchive/libarchive/archive.h b/contrib/libarchive/libarchive/archive.h index a9d34beb4f5a..41a5440cac75 100644 --- a/contrib/libarchive/libarchive/archive.h +++ b/contrib/libarchive/libarchive/archive.h @@ -34,7 +34,7 @@ * assert that ARCHIVE_VERSION_NUMBER >= 2012108. */ /* Note: Compiler will complain if this does not match archive_entry.h! */ -#define ARCHIVE_VERSION_NUMBER 3008005 +#define ARCHIVE_VERSION_NUMBER 3008007 #include #include /* for wchar_t */ @@ -177,7 +177,7 @@ __LA_DECL int archive_version_number(void); /* * Textual name/version of the library, useful for version displays. */ -#define ARCHIVE_VERSION_ONLY_STRING "3.8.5" +#define ARCHIVE_VERSION_ONLY_STRING "3.8.7" #define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING __LA_DECL const char * archive_version_string(void); diff --git a/contrib/libarchive/libarchive/archive_acl.c b/contrib/libarchive/libarchive/archive_acl.c index 362e3308f43f..ab601833def6 100644 --- a/contrib/libarchive/libarchive/archive_acl.c +++ b/contrib/libarchive/libarchive/archive_acl.c @@ -1256,8 +1256,12 @@ archive_acl_from_text_w(struct archive_acl *acl, const wchar_t *text, tag = 0; s = field[n].start; - st = field[n].start + 1; len = field[n].end - field[n].start; + if (len == 0) { + ret = ARCHIVE_WARN; + continue; + } + st = s + 1; switch (*s) { case L'u': diff --git a/contrib/libarchive/libarchive/archive_check_magic.c b/contrib/libarchive/libarchive/archive_check_magic.c index 6b8e0c5595f4..b6e1257949e1 100644 --- a/contrib/libarchive/libarchive/archive_check_magic.c +++ b/contrib/libarchive/libarchive/archive_check_magic.c @@ -148,14 +148,14 @@ __archive_check_magic(struct archive *a, unsigned int magic, if (!handle_type) { errmsg("PROGRAMMER ERROR: Function "); errmsg(function); - errmsg(" invoked with invalid archive handle.\n"); + errmsg(" invoked with invalid archive handle\n"); diediedie(); } if (a->magic != magic) { archive_set_error(a, -1, "PROGRAMMER ERROR: Function '%s' invoked" - " on '%s' archive object, which is not supported.", + " on '%s' archive object, which is not supported", function, handle_type); a->state = ARCHIVE_STATE_FATAL; diff --git a/contrib/libarchive/libarchive/archive_cryptor_private.h b/contrib/libarchive/libarchive/archive_cryptor_private.h index 272f2f84b9c9..1f9298ffdc46 100644 --- a/contrib/libarchive/libarchive/archive_cryptor_private.h +++ b/contrib/libarchive/libarchive/archive_cryptor_private.h @@ -109,6 +109,10 @@ typedef struct { #include #define ARCHIVE_CRYPTOR_USE_NETTLE 1 +#ifndef AES_MAX_KEY_SIZE +#define AES_MAX_KEY_SIZE AES256_KEY_SIZE +#endif + typedef struct { #if NETTLE_VERSION_MAJOR < 3 struct aes_ctx ctx; diff --git a/contrib/libarchive/libarchive/archive_entry.h b/contrib/libarchive/libarchive/archive_entry.h index b43435692c27..7122a74ed007 100644 --- a/contrib/libarchive/libarchive/archive_entry.h +++ b/contrib/libarchive/libarchive/archive_entry.h @@ -28,7 +28,7 @@ #define ARCHIVE_ENTRY_H_INCLUDED /* Note: Compiler will complain if this does not match archive.h! */ -#define ARCHIVE_VERSION_NUMBER 3008005 +#define ARCHIVE_VERSION_NUMBER 3008007 /* * Note: archive_entry.h is for use outside of libarchive; the diff --git a/contrib/libarchive/libarchive/archive_hmac.c b/contrib/libarchive/libarchive/archive_hmac.c index 210cca70744d..458092f41b29 100644 --- a/contrib/libarchive/libarchive/archive_hmac.c +++ b/contrib/libarchive/libarchive/archive_hmac.c @@ -198,6 +198,7 @@ static void __hmac_sha1_cleanup(archive_hmac_sha1_ctx *ctx) } #elif defined(HAVE_LIBNETTLE) && defined(HAVE_NETTLE_HMAC_H) +#include static int __hmac_sha1_init(archive_hmac_sha1_ctx *ctx, const uint8_t *key, size_t key_len) @@ -216,7 +217,12 @@ __hmac_sha1_update(archive_hmac_sha1_ctx *ctx, const uint8_t *data, static void __hmac_sha1_final(archive_hmac_sha1_ctx *ctx, uint8_t *out, size_t *out_len) { +#if NETTLE_VERSION_MAJOR < 4 hmac_sha1_digest(ctx, (unsigned)*out_len, out); +#else + hmac_sha1_digest(ctx, out); + *out_len = SHA1_DIGEST_SIZE; +#endif } static void diff --git a/contrib/libarchive/libarchive/archive_options.c b/contrib/libarchive/libarchive/archive_options.c index 6e2c0d2a5971..66491bd4183b 100644 --- a/contrib/libarchive/libarchive/archive_options.c +++ b/contrib/libarchive/libarchive/archive_options.c @@ -90,7 +90,9 @@ _archive_set_either_option(struct archive *a, const char *m, const char *o, cons if (r2 == ARCHIVE_FATAL) return (ARCHIVE_FATAL); - if (r2 == ARCHIVE_WARN - 1) + if (r1 == ARCHIVE_WARN - 1) + return r2; + if (r2 == ARCHIVE_WARN -1) return r1; return r1 > r2 ? r1 : r2; } diff --git a/contrib/libarchive/libarchive/archive_pathmatch.c b/contrib/libarchive/libarchive/archive_pathmatch.c index 19e0889ffe55..db0d2b791adf 100644 --- a/contrib/libarchive/libarchive/archive_pathmatch.c +++ b/contrib/libarchive/libarchive/archive_pathmatch.c @@ -202,7 +202,7 @@ pm(const char *p, const char *s, int flags) if (*p == '\0') return (1); while (*s) { - if (archive_pathmatch(p, s, flags)) + if (pm(p, s, flags)) return (1); ++s; } @@ -307,7 +307,7 @@ pm_w(const wchar_t *p, const wchar_t *s, int flags) if (*p == L'\0') return (1); while (*s) { - if (archive_pathmatch_w(p, s, flags)) + if (pm_w(p, s, flags)) return (1); ++s; } diff --git a/contrib/libarchive/libarchive/archive_ppmd8.c b/contrib/libarchive/libarchive/archive_ppmd8.c index 30196d64a9f5..04b1c0c3e165 100644 --- a/contrib/libarchive/libarchive/archive_ppmd8.c +++ b/contrib/libarchive/libarchive/archive_ppmd8.c @@ -61,7 +61,7 @@ typedef struct CPpmd8_Node_ #define EMPTY_NODE 0xFFFFFFFF -void Ppmd8_Construct(CPpmd8 *p) +static void Ppmd8_Construct(CPpmd8 *p) { unsigned i, k, m; @@ -89,14 +89,14 @@ void Ppmd8_Construct(CPpmd8 *p) } } -void Ppmd8_Free(CPpmd8 *p) +static void Ppmd8_Free(CPpmd8 *p) { free(p->Base); p->Size = 0; p->Base = 0; } -Bool Ppmd8_Alloc(CPpmd8 *p, UInt32 size) +static Bool Ppmd8_Alloc(CPpmd8 *p, UInt32 size) { if (p->Base == 0 || p->Size != size) { @@ -407,7 +407,7 @@ static void RestartModel(CPpmd8 *p) } } -void Ppmd8_Init(CPpmd8 *p, unsigned maxOrder, unsigned restoreMethod) +static void Ppmd8_Init(CPpmd8 *p, unsigned maxOrder, unsigned restoreMethod) { p->MaxOrder = maxOrder; p->RestoreMethod = restoreMethod; @@ -1042,7 +1042,7 @@ static void Rescale(CPpmd8 *p) p->FoundState = STATS(p->MinContext); } -CPpmd_See *Ppmd8_MakeEscFreq(CPpmd8 *p, unsigned numMasked1, UInt32 *escFreq) +static CPpmd_See *Ppmd8_MakeEscFreq(CPpmd8 *p, unsigned numMasked1, UInt32 *escFreq) { CPpmd_See *see; if (p->MinContext->NumStats != 0xFF) @@ -1078,7 +1078,7 @@ static void NextContext(CPpmd8 *p) } } -void Ppmd8_Update1(CPpmd8 *p) +static void Ppmd8_Update1(CPpmd8 *p) { CPpmd_State *s = p->FoundState; s->Freq += 4; @@ -1093,7 +1093,7 @@ void Ppmd8_Update1(CPpmd8 *p) NextContext(p); } -void Ppmd8_Update1_0(CPpmd8 *p) +static void Ppmd8_Update1_0(CPpmd8 *p) { p->PrevSuccess = (2 * p->FoundState->Freq >= p->MinContext->SummFreq); p->RunLength += p->PrevSuccess; @@ -1103,7 +1103,7 @@ void Ppmd8_Update1_0(CPpmd8 *p) NextContext(p); } -void Ppmd8_UpdateBin(CPpmd8 *p) +static void Ppmd8_UpdateBin(CPpmd8 *p) { p->FoundState->Freq = (Byte)(p->FoundState->Freq + (p->FoundState->Freq < 196)); p->PrevSuccess = 1; @@ -1111,7 +1111,7 @@ void Ppmd8_UpdateBin(CPpmd8 *p) NextContext(p); } -void Ppmd8_Update2(CPpmd8 *p) +static void Ppmd8_Update2(CPpmd8 *p) { p->MinContext->SummFreq += 4; if ((p->FoundState->Freq += 4) > MAX_FREQ) @@ -1127,7 +1127,7 @@ This code is based on: PPMd var.I (2002): Dmitry Shkarin : Public domain Carryless rangecoder (1999): Dmitry Subbotin : Public domain */ -Bool Ppmd8_RangeDec_Init(CPpmd8 *p) +static Bool Ppmd8_RangeDec_Init(CPpmd8 *p) { unsigned i; p->Low = 0; @@ -1161,7 +1161,7 @@ static void RangeDec_Decode(CPpmd8 *p, UInt32 start, UInt32 size) #define MASK(sym) ((signed char *)charMask)[sym] -int Ppmd8_DecodeSymbol(CPpmd8 *p) +static int Ppmd8_DecodeSymbol(CPpmd8 *p) { size_t charMask[256 / sizeof(size_t)]; if (p->MinContext->NumStats != 0) diff --git a/contrib/libarchive/libarchive/archive_ppmd8_private.h b/contrib/libarchive/libarchive/archive_ppmd8_private.h index 454b75f41f25..f0493de04623 100644 --- a/contrib/libarchive/libarchive/archive_ppmd8_private.h +++ b/contrib/libarchive/libarchive/archive_ppmd8_private.h @@ -83,12 +83,6 @@ typedef struct UInt16 BinSumm[25][64]; } CPpmd8; -void Ppmd8_Construct(CPpmd8 *p); -Bool Ppmd8_Alloc(CPpmd8 *p, UInt32 size); -void Ppmd8_Free(CPpmd8 *p); -void Ppmd8_Init(CPpmd8 *p, unsigned maxOrder, unsigned restoreMethod); -#define Ppmd8_WasAllocated(p) ((p)->Base != NULL) - /* ---------- Internal Functions ---------- */ @@ -104,30 +98,11 @@ extern const Byte PPMD8_kExpEscape[16]; #define Ppmd8_GetStats(p, ctx) ((CPpmd_State *)Ppmd8_GetPtr((p), ((ctx)->Stats))) #endif -void Ppmd8_Update1(CPpmd8 *p); -void Ppmd8_Update1_0(CPpmd8 *p); -void Ppmd8_Update2(CPpmd8 *p); -void Ppmd8_UpdateBin(CPpmd8 *p); - #define Ppmd8_GetBinSumm(p) \ &p->BinSumm[p->NS2Indx[Ppmd8Context_OneState(p->MinContext)->Freq - 1]][ \ p->NS2BSIndx[Ppmd8_GetContext(p, p->MinContext->Suffix)->NumStats] + \ p->PrevSuccess + p->MinContext->Flags + ((p->RunLength >> 26) & 0x20)] -CPpmd_See *Ppmd8_MakeEscFreq(CPpmd8 *p, unsigned numMasked, UInt32 *scale); - - -/* ---------- Decode ---------- */ - -Bool Ppmd8_RangeDec_Init(CPpmd8 *p); -#define Ppmd8_RangeDec_IsFinishedOK(p) ((p)->Code == 0) -int Ppmd8_DecodeSymbol(CPpmd8 *p); /* returns: -1 as EndMarker, -2 as DataError */ - -/* ---------- Encode ---------- */ - -#define Ppmd8_RangeEnc_Init(p) { (p)->Low = 0; (p)->Range = 0xFFFFFFFF; } -void Ppmd8_RangeEnc_FlushData(CPpmd8 *p); -void Ppmd8_EncodeSymbol(CPpmd8 *p, int symbol); /* symbol = -1 means EndMarker */ typedef struct { diff --git a/contrib/libarchive/libarchive/archive_read.c b/contrib/libarchive/libarchive/archive_read.c index c9b9d5981516..e5f89bdc8772 100644 --- a/contrib/libarchive/libarchive/archive_read.c +++ b/contrib/libarchive/libarchive/archive_read.c @@ -171,7 +171,7 @@ static int64_t client_skip_proxy(struct archive_read_filter *self, int64_t request) { if (request < 0) - __archive_errx(1, "Negative skip requested."); + __archive_errx(1, "Negative skip requested"); if (request == 0) return 0; @@ -379,7 +379,7 @@ archive_read_set_callback_data2(struct archive *_a, void *client_data, if (a->client.dataset == NULL) { archive_set_error(&a->archive, ENOMEM, - "No memory."); + "No memory"); return ARCHIVE_FATAL; } a->client.nodes = 1; @@ -388,7 +388,7 @@ archive_read_set_callback_data2(struct archive *_a, void *client_data, if (iindex > a->client.nodes - 1) { archive_set_error(&a->archive, EINVAL, - "Invalid index specified."); + "Invalid index specified"); return ARCHIVE_FATAL; } a->client.dataset[iindex].data = client_data; @@ -409,14 +409,14 @@ archive_read_add_callback_data(struct archive *_a, void *client_data, "archive_read_add_callback_data"); if (iindex > a->client.nodes) { archive_set_error(&a->archive, EINVAL, - "Invalid index specified."); + "Invalid index specified"); return ARCHIVE_FATAL; } p = realloc(a->client.dataset, sizeof(*a->client.dataset) * (++(a->client.nodes))); if (p == NULL) { archive_set_error(&a->archive, ENOMEM, - "No memory."); + "No memory"); return ARCHIVE_FATAL; } a->client.dataset = (struct archive_read_data_node *)p; @@ -625,7 +625,7 @@ _archive_read_next_header2(struct archive *_a, struct archive_entry *entry) r1 = archive_read_data_skip(&a->archive); if (r1 == ARCHIVE_EOF) archive_set_error(&a->archive, EIO, - "Premature end-of-file."); + "Premature end-of-file"); if (r1 == ARCHIVE_EOF || r1 == ARCHIVE_FATAL) { a->archive.state = ARCHIVE_STATE_FATAL; return (ARCHIVE_FATAL); diff --git a/contrib/libarchive/libarchive/archive_read_append_filter.c b/contrib/libarchive/libarchive/archive_read_append_filter.c index cd88df119906..d578b06fe714 100644 --- a/contrib/libarchive/libarchive/archive_read_append_filter.c +++ b/contrib/libarchive/libarchive/archive_read_append_filter.c @@ -104,6 +104,10 @@ archive_read_append_filter(struct archive *_a, int code) strcpy(str, "lrzip"); r1 = archive_read_support_filter_lrzip(_a); break; + case ARCHIVE_FILTER_GRZIP: *** 5263 LINES SKIPPED *** From nobody Thu Apr 23 10:33:25 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1XVs6QxCz6ZPcS for ; Thu, 23 Apr 2026 10:33:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1XVs40gwz4QSB for ; Thu, 23 Apr 2026 10:33:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776940405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wz+8RqQ4hBa3HDCux4n1vLrNjAGHCcAFQs7LSFgYmhk=; b=A1WrbbKB4RTH4lpPRM7s89C5sz4Qf9yGdFG1IHCkmJjjYKdWoLIaoBJEejHMFILobIF3ul diY1+AkvBrH0C6cqJ6ARpWiDcy7sAKlzV0w6AmyhQA/yJOn5agoPi22xFEO7tTv5kNoiPY wf2uZyljfYKfbRqcnF8lNDPRShdAZKH35W+CKWQrRhG87N8x34Y1KSWaIj4gyjyuKlfg+o N59XxMjEHlLhmySLIoQjTdILKKCnJwWp6OuRr8EzeWR1dnGE5C8whil+SkPJ+QfUv+kH+u 6rjA1JYxT4PpW5dVpO0LEWgIZoAMRvKZsL+MxA6881+0pARZ13R2Ho3DieUjVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776940405; a=rsa-sha256; cv=none; b=rsIXZWcxG1/yZx2zXKGRQixAS8SqmkDHlbtTEBgz40TdWTQE3EX3DaDwCU9aMI5+YK4KzK ik2G1xBZYudBmNrGBBod6gnh2j+cWeHAL+krmuLJ5wxe17pvQtJKEak1l7HBAj6TMoej9h b7AdLey6pQVZ5kRZpI5Nd60Celf9YDcHDCFzcU80TXZQJ1OIaF0pxMIc86nL2LGcHBTBeV eF7bKtJOAmkOd6XCutjMqeZ39CTgvbrNBeRFX30SpC0Ev1NPlsvyu+PgiSAQz+yTZ7W4dt /YiCmDU9Ptr2mbhbmqrGIAWIw8FMl/T+gfy7GLsumOsNRgkyKdpaQHGpuCcp0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776940405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wz+8RqQ4hBa3HDCux4n1vLrNjAGHCcAFQs7LSFgYmhk=; b=T+4F5GJfaVqUPv+pWt3kpgXkMFIS/33Jnv8awYWFvhntar+ri54qpU3+85MoIP9JIWLCra Kzy0OD+WkJ7UDFLqqg5RfUN6z3/+QMBsS2Q5Yq0sy8bJjfo+ZK5vlb6pbUGQCpAZWuGdRQ v2Ils4PHhcQRGtMZNDgM0WrEQcbpd78r38Chjq7cGWEaM3Oebjd6udsnuVIjiR695EP3K5 6KXAAmvDmznSw8gWbZvQoqUpptNWZos7QE4nuYt/n8RnFZcnsBJTjj4/+IF6eclcfO4ISO tfLcuwH3hiPgq7nVXeBxTdPpwjKVwd/QQ0pb4Xka9saHVerNIhPftba4vgDcSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1XVs3L1Xz1C1F for ; Thu, 23 Apr 2026 10:33:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3cdd2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Apr 2026 10:33:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Martin Matuska Subject: git: 184dafb54c69 - stable/13 - libarchive: merge from vendor branch List-Id: Commits to the stable branches 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: mm X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 184dafb54c69fa9873e09c852f7de9c7db7458fd Auto-Submitted: auto-generated Date: Thu, 23 Apr 2026 10:33:25 +0000 Message-Id: <69e9f575.3cdd2.3a9f79ce@gitrepo.freebsd.org> The branch stable/13 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=184dafb54c69fa9873e09c852f7de9c7db7458fd commit 184dafb54c69fa9873e09c852f7de9c7db7458fd Author: Martin Matuska AuthorDate: 2026-04-13 13:47:17 +0000 Commit: Martin Matuska CommitDate: 2026-04-23 09:45:11 +0000 libarchive: merge from vendor branch libarchive 3.8.7 Important bugfixes: #2871 libarchive: fix handling of option failures #2897 iso9660: fix undefined behavior #2898 RAR: fix LZSS window size mismatch after PPMd block #2900 CAB: fix NULL pointer dereference during skip #2911 libarchive: do not continue with truncated numbers #2919 CAB: Fix Heap OOB Write in CAB LZX decoder #2934 iso9660: fix posibble heap buffer overflow on 32-bit systems #2939 cpio: Fix -R memory leak #2947 libarchive: lzop and grzip filter support Important bugfixes between 3.8.5 and 3.8.6: #2860 bsdunzip: fix ISO week year and Gregorian year confusion #2864 7zip: ix SEGV in check_7zip_header_in_sfx via ELF offset validation #2875 7zip: fix out-of-bounds access on ELF 64-bit header #2877 RAR5 reader: fix infinite loop in rar5 decompression #2878 mtree reader: Fix file descriptor leak in mtree parser cleanup (CWE-775) #2892 RAR5 reader: fix potential memory leak #2893 RAR5: fix SIGSEGV when archive_read_support_format_rar5 is called twice #2895 CAB reader: fix memory leak on repeated calls to archive_read_support_format_cab Obtained from: libarchive Vendor commit: ded82291ab41d5e355831b96b0e1ff49e24d8939 MFC after: 1 week (cherry picked from commit eb5165bb491138f60d9004bc4c781490016d9288) --- contrib/libarchive/NEWS | 4 + contrib/libarchive/README.md | 9 +- contrib/libarchive/cpio/cmdline.c | 15 +- contrib/libarchive/cpio/cpio.c | 123 ++- contrib/libarchive/cpio/cpio.h | 2 - contrib/libarchive/cpio/test/test_format_newc.c | 7 + contrib/libarchive/libarchive/archive.h | 4 +- contrib/libarchive/libarchive/archive_acl.c | 6 +- .../libarchive/libarchive/archive_check_magic.c | 4 +- .../libarchive/archive_cryptor_private.h | 4 + contrib/libarchive/libarchive/archive_entry.h | 2 +- contrib/libarchive/libarchive/archive_hmac.c | 6 + contrib/libarchive/libarchive/archive_options.c | 4 +- contrib/libarchive/libarchive/archive_pathmatch.c | 4 +- contrib/libarchive/libarchive/archive_ppmd8.c | 22 +- .../libarchive/libarchive/archive_ppmd8_private.h | 25 - contrib/libarchive/libarchive/archive_read.c | 12 +- .../libarchive/archive_read_append_filter.c | 4 + .../libarchive/archive_read_disk_posix.c | 6 +- .../libarchive/archive_read_open_filename.c | 7 +- .../libarchive/archive_read_support_filter_grzip.c | 2 +- .../libarchive/archive_read_support_filter_lz4.c | 4 +- .../libarchive/archive_read_support_filter_lzop.c | 2 +- .../archive_read_support_filter_program.c | 2 + .../libarchive/archive_read_support_format_7zip.c | 24 +- .../libarchive/archive_read_support_format_cab.c | 24 +- .../libarchive/archive_read_support_format_cpio.c | 4 +- .../archive_read_support_format_iso9660.c | 26 +- .../libarchive/archive_read_support_format_lha.c | 11 +- .../libarchive/archive_read_support_format_mtree.c | 7 +- .../libarchive/archive_read_support_format_rar.c | 73 +- .../libarchive/archive_read_support_format_rar5.c | 45 +- .../libarchive/archive_read_support_format_tar.c | 6 +- .../libarchive/archive_read_support_format_xar.c | 14 +- .../libarchive/archive_read_support_format_zip.c | 22 +- contrib/libarchive/libarchive/archive_string.c | 16 +- contrib/libarchive/libarchive/archive_write.c | 2 +- .../archive_write_add_filter_b64encode.c | 22 +- .../libarchive/archive_write_add_filter_bzip2.c | 7 +- .../libarchive/archive_write_add_filter_gzip.c | 12 +- .../libarchive/archive_write_add_filter_lrzip.c | 21 +- .../libarchive/archive_write_add_filter_lz4.c | 14 +- .../libarchive/archive_write_add_filter_lzop.c | 7 +- .../libarchive/archive_write_add_filter_uuencode.c | 22 +- .../libarchive/archive_write_add_filter_xz.c | 27 +- .../libarchive/archive_write_add_filter_zstd.c | 52 +- .../libarchive/archive_write_disk_posix.c | 30 +- .../libarchive/archive_write_set_format_7zip.c | 9 +- .../archive_write_set_format_cpio_binary.c | 4 +- .../archive_write_set_format_cpio_newc.c | 2 +- .../libarchive/archive_write_set_format_cpio_odc.c | 2 +- .../libarchive/archive_write_set_format_gnutar.c | 34 +- .../libarchive/archive_write_set_format_iso9660.c | 18 +- .../libarchive/archive_write_set_format_mtree.c | 2 +- .../libarchive/archive_write_set_format_pax.c | 6 +- .../libarchive/archive_write_set_format_ustar.c | 27 +- .../libarchive/archive_write_set_format_v7tar.c | 27 +- .../libarchive/archive_write_set_format_xar.c | 6 +- .../libarchive/archive_write_set_format_zip.c | 49 +- contrib/libarchive/libarchive/test/test_acl_text.c | 23 + .../libarchive/test/test_archive_pathmatch.c | 18 + .../test/test_archive_string_conversion.c | 135 +++ .../test/test_gnutar_filename_encoding.c | 40 + .../libarchive/test/test_read_format_7zip.c | 26 + .../test/test_read_format_7zip_malformed.c | 17 + .../test/test_read_format_7zip_malformed3.7z.uu | 24 + .../test_read_format_7zip_sfx_elf64trunc.elf.uu | 5 + .../libarchive/test/test_read_format_cab_lzx_oob.c | 45 + .../test/test_read_format_cab_lzx_oob.cab.uu | 11 + .../test/test_read_format_cab_skip_malformed.c | 41 + .../test_read_format_cab_skip_malformed.cab.uu | 95 ++ .../test/test_read_format_iso_zisofs_overflow.c | 104 ++ .../test_read_format_iso_zisofs_overflow.iso.uu | 1096 ++++++++++++++++++++ .../test/test_read_format_lha_oversize_header.c | 50 + .../test_read_format_lha_oversize_header.lzh.uu | 60 ++ .../test/test_read_format_rar5_loop_bug.c | 53 + .../test/test_read_format_rar5_loop_bug.rar.uu | 189 ++++ .../libarchive/test/test_read_set_format.c | 34 + .../libarchive/test/test_ustar_filename_encoding.c | 40 + .../libarchive/test/test_v7tar_filename_encoding.c | 67 ++ .../test/test_warn_missing_hardlink_target.c | 2 +- .../libarchive/libarchive/test/test_write_disk.c | 29 + .../libarchive/test/test_write_disk_perms.c | 11 +- .../libarchive/test/test_zip_filename_encoding.c | 40 + .../la_getline.c => libarchive_fe/lafe_getline.c} | 11 +- .../la_getline.h => libarchive_fe/lafe_getline.h} | 15 +- contrib/libarchive/tar/bsdtar.c | 20 +- contrib/libarchive/tar/read.c | 2 +- contrib/libarchive/tar/util.c | 8 +- contrib/libarchive/tar/write.c | 16 +- contrib/libarchive/test_utils/test_common.h | 4 + contrib/libarchive/test_utils/test_main.c | 85 +- contrib/libarchive/unzip/bsdunzip.c | 6 +- lib/libarchive/tests/Makefile | 13 + usr.bin/unzip/Makefile | 2 +- 95 files changed, 3019 insertions(+), 372 deletions(-) diff --git a/contrib/libarchive/NEWS b/contrib/libarchive/NEWS index be14de445b57..d5e9769771e2 100644 --- a/contrib/libarchive/NEWS +++ b/contrib/libarchive/NEWS @@ -1,3 +1,7 @@ +Apr 13, 2026: libarchive 3.8.7 released + +Mar 10, 2026: libarchive 3.8.6 released + Jan 05, 2026: libarchive 3.8.5 released Dec 01, 2025: libarchive 3.8.4 released diff --git a/contrib/libarchive/README.md b/contrib/libarchive/README.md index e9691f1b710b..3009e1b54d18 100644 --- a/contrib/libarchive/README.md +++ b/contrib/libarchive/README.md @@ -37,10 +37,13 @@ The top-level directory contains the following information files: * **CMakeLists.txt** - input for "cmake" build tool, see INSTALL * **configure** - configuration script, see INSTALL for details. If your copy of the source lacks a `configure` script, you can try to construct it by running the script in `build/autogen.sh` (or use `cmake`). -The following files in the top-level directory are used by the 'configure' script: +The following files in the top-level directory are related to the 'configure' script and are only needed by maintainers: -* `Makefile.am`, `aclocal.m4`, `configure.ac` - used to build this distribution, only needed by maintainers -* `Makefile.in`, `config.h.in` - templates used by configure script +* `configure.ac` - used (by autoconf) to build the configure script and related files +* `Makefile.am` - used (by automake) to generate Makefile.in +* `aclocal.m4` - auto-generated file (created by aclocal) used to build the configure script +* `Makefile.in` - auto-generated template (created by automake) used by the configure script to create Makefile +* `config.h.in` - auto-generated template (created by autoheader) used by the configure script to create config.h ## Documentation diff --git a/contrib/libarchive/cpio/cmdline.c b/contrib/libarchive/cpio/cmdline.c index db06c03c011d..a3d029c65161 100644 --- a/contrib/libarchive/cpio/cmdline.c +++ b/contrib/libarchive/cpio/cmdline.c @@ -11,6 +11,9 @@ #ifdef HAVE_ERRNO_H #include #endif +#ifdef HAVE_LIMITS_H +#include +#endif #ifdef HAVE_GRP_H #include #endif @@ -347,9 +350,10 @@ owner_parse(const char *spec, struct cpio_owner *owner, const char **errmsg) owner->gid = pwent->pw_gid; } else { char *end; + unsigned long val; errno = 0; - owner->uid = (int)strtoul(user, &end, 10); - if (errno || *end != '\0') { + val = strtoul(user, &end, 10); + if (errno || *end != '\0' || val > (unsigned)INT_MAX) { snprintf(errbuff, sizeof(errbuff), "Couldn't lookup user ``%s''", user); errbuff[sizeof(errbuff) - 1] = '\0'; @@ -357,6 +361,7 @@ owner_parse(const char *spec, struct cpio_owner *owner, const char **errmsg) *errmsg = errbuff; return (-1); } + owner->uid = (int)val; } free(user); } @@ -373,15 +378,17 @@ owner_parse(const char *spec, struct cpio_owner *owner, const char **errmsg) } } else { char *end; + unsigned long val; errno = 0; - owner->gid = (int)strtoul(g, &end, 10); - if (errno || *end != '\0') { + val = strtoul(g, &end, 10); + if (errno || *end != '\0' || val > (unsigned)INT_MAX) { snprintf(errbuff, sizeof(errbuff), "Couldn't lookup group ``%s''", g); errbuff[sizeof(errbuff) - 1] = '\0'; *errmsg = errbuff; return (-1); } + owner->gid = (int)val; } } return (0); diff --git a/contrib/libarchive/cpio/cpio.c b/contrib/libarchive/cpio/cpio.c index 77eefe809f37..6e6c2c3356c0 100644 --- a/contrib/libarchive/cpio/cpio.c +++ b/contrib/libarchive/cpio/cpio.c @@ -8,6 +8,8 @@ #include "cpio_platform.h" +#include "lafe_getline.h" + #include #include #include @@ -33,6 +35,9 @@ #ifdef HAVE_LOCALE_H #include #endif +#ifdef HAVE_LIMITS_H +#include +#endif #ifdef HAVE_PWD_H #include #endif @@ -83,7 +88,7 @@ struct name_cache { static int extract_data(struct archive *, struct archive *); const char * cpio_i64toa(int64_t); -static const char *cpio_rename(const char *name); +static void cpio_rename(struct archive_entry *); static int entry_to_archive(struct cpio *, struct archive_entry *); static int file_to_archive(struct cpio *, const char *); static void free_cache(struct name_cache *cache); @@ -110,19 +115,16 @@ static void passphrase_free(char *); int main(int argc, char *argv[]) { - static char buff[16384]; struct cpio _cpio; /* Allocated on stack. */ struct cpio *cpio; struct cpio_owner owner; const char *errmsg; char *tptr; - int opt, t; + int opt; + long t; cpio = &_cpio; memset(cpio, 0, sizeof(*cpio)); - cpio->buff = buff; - cpio->buff_size = sizeof(buff); - #if defined(HAVE_SIGACTION) { @@ -204,13 +206,13 @@ main(int argc, char *argv[]) case 'C': /* NetBSD/OpenBSD */ errno = 0; tptr = NULL; - t = (int)strtol(cpio->argument, &tptr, 10); - if (errno || t <= 0 || *(cpio->argument) == '\0' || + t = strtol(cpio->argument, &tptr, 10); + if (errno || t <= 0 || t > INT_MAX || *(cpio->argument) == '\0' || tptr == NULL || *tptr != '\0') { lafe_errc(1, 0, "Invalid blocksize: %s", cpio->argument); } - cpio->bytes_per_block = t; + cpio->bytes_per_block = (int)t; break; case 'c': /* POSIX 1997 */ cpio->format = "odc"; @@ -222,7 +224,7 @@ main(int argc, char *argv[]) if (archive_match_include_pattern_from_file( cpio->matching, cpio->argument, cpio->option_null) != ARCHIVE_OK) - lafe_errc(1, 0, "Error : %s", + lafe_errc(1, 0, "%s", archive_error_string(cpio->matching)); break; case 'F': /* NetBSD/OpenBSD/GNU cpio */ @@ -231,7 +233,7 @@ main(int argc, char *argv[]) case 'f': /* POSIX 1997 */ if (archive_match_exclude_pattern(cpio->matching, cpio->argument) != ARCHIVE_OK) - lafe_errc(1, 0, "Error : %s", + lafe_errc(1, 0, "%s", archive_error_string(cpio->matching)); break; case OPTION_GRZIP: @@ -247,7 +249,7 @@ main(int argc, char *argv[]) cpio->filename = cpio->argument; break; case 'i': /* POSIX 1997 */ - if (cpio->mode != '\0') + if (cpio->mode != '\0' && cpio->mode != opt) lafe_errc(1, 0, "Cannot use both -i and -%c", cpio->mode); cpio->mode = opt; @@ -289,13 +291,13 @@ main(int argc, char *argv[]) cpio->filename = cpio->argument; break; case 'o': /* POSIX 1997 */ - if (cpio->mode != '\0') + if (cpio->mode != '\0' && cpio->mode != opt) lafe_errc(1, 0, "Cannot use both -o and -%c", cpio->mode); cpio->mode = opt; break; case 'p': /* POSIX 1997 */ - if (cpio->mode != '\0') + if (cpio->mode != '\0' && cpio->mode != opt) lafe_errc(1, 0, "Cannot use both -p and -%c", cpio->mode); cpio->mode = opt; @@ -316,17 +318,21 @@ main(int argc, char *argv[]) if (owner_parse(cpio->argument, &owner, &errmsg) != 0) { if (!errmsg) errmsg = "Error parsing owner"; - lafe_warnc(-1, "%s", errmsg); + lafe_warnc(0, "%s", errmsg); usage(); } if (owner.uid != -1) cpio->uid_override = owner.uid; - if (owner.uname != NULL) + if (owner.uname != NULL) { + free(cpio->uname_override); cpio->uname_override = owner.uname; + } if (owner.gid != -1) cpio->gid_override = owner.gid; - if (owner.gname != NULL) + if (owner.gname != NULL) { + free(cpio->gname_override); cpio->gname_override = owner.gname; + } break; case 'r': /* POSIX 1997 */ cpio->option_rename = 1; @@ -409,7 +415,7 @@ main(int argc, char *argv[]) while (*cpio->argv != NULL) { if (archive_match_include_pattern(cpio->matching, *cpio->argv) != ARCHIVE_OK) - lafe_errc(1, 0, "Error : %s", + lafe_errc(1, 0, "%s", archive_error_string(cpio->matching)); --cpio->argc; ++cpio->argv; @@ -427,7 +433,7 @@ main(int argc, char *argv[]) break; default: lafe_errc(1, 0, - "Must specify at least one of -i, -o, or -p"); + "Must specify one of -i, -o, or -p"); } archive_match_free(cpio->matching); @@ -524,7 +530,7 @@ mode_out(struct cpio *cpio) int r; if (cpio->option_append) - lafe_errc(1, 0, "Append mode not yet supported."); + lafe_errc(1, 0, "Append mode not yet supported"); cpio->archive_read_disk = archive_read_disk_new(); if (cpio->archive_read_disk == NULL) @@ -638,7 +644,7 @@ mode_out(struct cpio *cpio) int64_t blocks = (archive_filter_bytes(cpio->archive, 0) + 511) / 512; - fprintf(stderr, "%lu %s\n", (unsigned long)blocks, + fprintf(stderr, "%lld %s\n", (long long)blocks, blocks == 1 ? "block" : "blocks"); } archive_write_free(cpio->archive); @@ -696,7 +702,6 @@ remove_leading_slash(const char *p) static int file_to_archive(struct cpio *cpio, const char *srcpath) { - const char *destpath; struct archive_entry *entry, *spare; size_t len; int r; @@ -738,7 +743,6 @@ file_to_archive(struct cpio *cpio, const char *srcpath) * pass mode or the name that will go into the archive in * output mode. */ - destpath = srcpath; if (cpio->destdir) { len = cpio->destdir_len + strlen(srcpath) + 8; if (len >= cpio->pass_destpath_alloc) { @@ -754,15 +758,17 @@ file_to_archive(struct cpio *cpio, const char *srcpath) } strcpy(cpio->pass_destpath, cpio->destdir); strcat(cpio->pass_destpath, remove_leading_slash(srcpath)); - destpath = cpio->pass_destpath; + archive_entry_set_pathname(entry, cpio->pass_destpath); + } else { + archive_entry_set_pathname(entry, srcpath); } if (cpio->option_rename) - destpath = cpio_rename(destpath); - if (destpath == NULL) { + cpio_rename(entry); + + if (archive_entry_pathname(entry) == NULL) { archive_entry_free(entry); return (0); } - archive_entry_copy_pathname(entry, destpath); /* * If we're trying to preserve hardlinks, match them here. @@ -791,7 +797,6 @@ entry_to_archive(struct cpio *cpio, struct archive_entry *entry) const char *destpath = archive_entry_pathname(entry); const char *srcpath = archive_entry_sourcepath(entry); int fd = -1; - ssize_t bytes_read; int r; /* Print out the destination name to the user. */ @@ -869,21 +874,23 @@ entry_to_archive(struct cpio *cpio, struct archive_entry *entry) exit(1); if (r >= ARCHIVE_WARN && archive_entry_size(entry) > 0 && fd >= 0) { - bytes_read = read(fd, cpio->buff, (unsigned)cpio->buff_size); + static char buff[16384]; + ssize_t bytes_read; + + bytes_read = read(fd, buff, sizeof(buff)); while (bytes_read > 0) { ssize_t bytes_write; bytes_write = archive_write_data(cpio->archive, - cpio->buff, bytes_read); + buff, bytes_read); if (bytes_write < 0) lafe_errc(1, archive_errno(cpio->archive), "%s", archive_error_string(cpio->archive)); if (bytes_write < bytes_read) { lafe_warnc(0, "Truncated write; file may have " - "grown while being archived."); + "grown while being archived"); } - bytes_read = read(fd, cpio->buff, - (unsigned)cpio->buff_size); + bytes_read = read(fd, buff, sizeof(buff)); } } @@ -997,11 +1004,9 @@ mode_in(struct cpio *cpio) } if (archive_match_path_excluded(cpio->matching, entry)) continue; - if (cpio->option_rename) { - destpath = cpio_rename(archive_entry_pathname(entry)); - archive_entry_set_pathname(entry, destpath); - } else - destpath = archive_entry_pathname(entry); + if (cpio->option_rename) + cpio_rename(entry); + destpath = archive_entry_pathname(entry); if (destpath == NULL) continue; if (cpio->verbose) @@ -1040,7 +1045,7 @@ mode_in(struct cpio *cpio) if (!cpio->quiet) { int64_t blocks = (archive_filter_bytes(a, 0) + 511) / 512; - fprintf(stderr, "%lu %s\n", (unsigned long)blocks, + fprintf(stderr, "%lld %s\n", (long long)blocks, blocks == 1 ? "block" : "blocks"); } archive_read_free(a); @@ -1125,7 +1130,7 @@ mode_list(struct cpio *cpio) if (!cpio->quiet) { int64_t blocks = (archive_filter_bytes(a, 0) + 511) / 512; - fprintf(stderr, "%lu %s\n", (unsigned long)blocks, + fprintf(stderr, "%lld %s\n", (long long)blocks, blocks == 1 ? "block" : "blocks"); } archive_read_free(a); @@ -1292,54 +1297,60 @@ mode_pass(struct cpio *cpio, const char *destdir) * that an input of '.' means the name should be unchanged. GNU cpio * treats '.' as a literal new name. */ -static const char * -cpio_rename(const char *name) +void +cpio_rename(struct archive_entry *entry) { - static char buff[1024]; + char *buff = NULL, *p, *ret = NULL; FILE *t; - char *p, *ret; + size_t n = 0; + ssize_t r; #if defined(_WIN32) && !defined(__CYGWIN__) FILE *to; t = fopen("CONIN$", "r"); if (t == NULL) - return (name); + return; to = fopen("CONOUT$", "w"); if (to == NULL) { fclose(t); - return (name); + return; } - fprintf(to, "%s (Enter/./(new name))? ", name); + fprintf(to, "%s (Enter/./(new name))? ", archive_entry_pathname(entry)); fclose(to); #else t = fopen("/dev/tty", "r+"); if (t == NULL) - return (name); - fprintf(t, "%s (Enter/./(new name))? ", name); + return; + fprintf(t, "%s (Enter/./(new name))? ", archive_entry_pathname(entry)); fflush(t); #endif - p = fgets(buff, sizeof(buff), t); + r = getline(&buff, &n, t); fclose(t); - if (p == NULL) + if (r < 1) /* End-of-file is a blank line. */ - return (NULL); + goto done; + p = buff; while (*p == ' ' || *p == '\t') ++p; if (*p == '\n' || *p == '\0') /* Empty line. */ - return (NULL); - if (*p == '.' && p[1] == '\n') + goto done; + if (*p == '.' && p[1] == '\n') { /* Single period preserves original name. */ - return (name); + free(buff); + return; + } ret = p; /* Trim the final newline. */ while (*p != '\0' && *p != '\n') ++p; /* Overwrite the final \n with a null character. */ *p = '\0'; - return (ret); +done: + archive_entry_set_pathname(entry, ret); + free(buff); } static void diff --git a/contrib/libarchive/cpio/cpio.h b/contrib/libarchive/cpio/cpio.h index 9bc631b544fe..2621a4c3dda3 100644 --- a/contrib/libarchive/cpio/cpio.h +++ b/contrib/libarchive/cpio/cpio.h @@ -71,8 +71,6 @@ struct cpio { /* Work data. */ struct archive *matching; - char *buff; - size_t buff_size; char *ppbuff; }; diff --git a/contrib/libarchive/cpio/test/test_format_newc.c b/contrib/libarchive/cpio/test/test_format_newc.c index 33aa16d07a81..9d4e4e9fb674 100644 --- a/contrib/libarchive/cpio/test/test_format_newc.c +++ b/contrib/libarchive/cpio/test/test_format_newc.c @@ -6,6 +6,13 @@ */ #include "test.h" +#ifdef HAVE_GETEUID +#define getuid() geteuid() +#endif +#ifdef HAVE_GETEGID +#define getgid() getegid() +#endif + /* Number of bytes needed to pad 'n' to multiple of 'block', assuming * that 'block' is a power of two. This trick can be more easily * remembered as -n & (block - 1), but many compilers quite reasonably diff --git a/contrib/libarchive/libarchive/archive.h b/contrib/libarchive/libarchive/archive.h index a9d34beb4f5a..41a5440cac75 100644 --- a/contrib/libarchive/libarchive/archive.h +++ b/contrib/libarchive/libarchive/archive.h @@ -34,7 +34,7 @@ * assert that ARCHIVE_VERSION_NUMBER >= 2012108. */ /* Note: Compiler will complain if this does not match archive_entry.h! */ -#define ARCHIVE_VERSION_NUMBER 3008005 +#define ARCHIVE_VERSION_NUMBER 3008007 #include #include /* for wchar_t */ @@ -177,7 +177,7 @@ __LA_DECL int archive_version_number(void); /* * Textual name/version of the library, useful for version displays. */ -#define ARCHIVE_VERSION_ONLY_STRING "3.8.5" +#define ARCHIVE_VERSION_ONLY_STRING "3.8.7" #define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING __LA_DECL const char * archive_version_string(void); diff --git a/contrib/libarchive/libarchive/archive_acl.c b/contrib/libarchive/libarchive/archive_acl.c index 362e3308f43f..ab601833def6 100644 --- a/contrib/libarchive/libarchive/archive_acl.c +++ b/contrib/libarchive/libarchive/archive_acl.c @@ -1256,8 +1256,12 @@ archive_acl_from_text_w(struct archive_acl *acl, const wchar_t *text, tag = 0; s = field[n].start; - st = field[n].start + 1; len = field[n].end - field[n].start; + if (len == 0) { + ret = ARCHIVE_WARN; + continue; + } + st = s + 1; switch (*s) { case L'u': diff --git a/contrib/libarchive/libarchive/archive_check_magic.c b/contrib/libarchive/libarchive/archive_check_magic.c index 6b8e0c5595f4..b6e1257949e1 100644 --- a/contrib/libarchive/libarchive/archive_check_magic.c +++ b/contrib/libarchive/libarchive/archive_check_magic.c @@ -148,14 +148,14 @@ __archive_check_magic(struct archive *a, unsigned int magic, if (!handle_type) { errmsg("PROGRAMMER ERROR: Function "); errmsg(function); - errmsg(" invoked with invalid archive handle.\n"); + errmsg(" invoked with invalid archive handle\n"); diediedie(); } if (a->magic != magic) { archive_set_error(a, -1, "PROGRAMMER ERROR: Function '%s' invoked" - " on '%s' archive object, which is not supported.", + " on '%s' archive object, which is not supported", function, handle_type); a->state = ARCHIVE_STATE_FATAL; diff --git a/contrib/libarchive/libarchive/archive_cryptor_private.h b/contrib/libarchive/libarchive/archive_cryptor_private.h index 272f2f84b9c9..1f9298ffdc46 100644 --- a/contrib/libarchive/libarchive/archive_cryptor_private.h +++ b/contrib/libarchive/libarchive/archive_cryptor_private.h @@ -109,6 +109,10 @@ typedef struct { #include #define ARCHIVE_CRYPTOR_USE_NETTLE 1 +#ifndef AES_MAX_KEY_SIZE +#define AES_MAX_KEY_SIZE AES256_KEY_SIZE +#endif + typedef struct { #if NETTLE_VERSION_MAJOR < 3 struct aes_ctx ctx; diff --git a/contrib/libarchive/libarchive/archive_entry.h b/contrib/libarchive/libarchive/archive_entry.h index b43435692c27..7122a74ed007 100644 --- a/contrib/libarchive/libarchive/archive_entry.h +++ b/contrib/libarchive/libarchive/archive_entry.h @@ -28,7 +28,7 @@ #define ARCHIVE_ENTRY_H_INCLUDED /* Note: Compiler will complain if this does not match archive.h! */ -#define ARCHIVE_VERSION_NUMBER 3008005 +#define ARCHIVE_VERSION_NUMBER 3008007 /* * Note: archive_entry.h is for use outside of libarchive; the diff --git a/contrib/libarchive/libarchive/archive_hmac.c b/contrib/libarchive/libarchive/archive_hmac.c index 210cca70744d..458092f41b29 100644 --- a/contrib/libarchive/libarchive/archive_hmac.c +++ b/contrib/libarchive/libarchive/archive_hmac.c @@ -198,6 +198,7 @@ static void __hmac_sha1_cleanup(archive_hmac_sha1_ctx *ctx) } #elif defined(HAVE_LIBNETTLE) && defined(HAVE_NETTLE_HMAC_H) +#include static int __hmac_sha1_init(archive_hmac_sha1_ctx *ctx, const uint8_t *key, size_t key_len) @@ -216,7 +217,12 @@ __hmac_sha1_update(archive_hmac_sha1_ctx *ctx, const uint8_t *data, static void __hmac_sha1_final(archive_hmac_sha1_ctx *ctx, uint8_t *out, size_t *out_len) { +#if NETTLE_VERSION_MAJOR < 4 hmac_sha1_digest(ctx, (unsigned)*out_len, out); +#else + hmac_sha1_digest(ctx, out); + *out_len = SHA1_DIGEST_SIZE; +#endif } static void diff --git a/contrib/libarchive/libarchive/archive_options.c b/contrib/libarchive/libarchive/archive_options.c index 6e2c0d2a5971..66491bd4183b 100644 --- a/contrib/libarchive/libarchive/archive_options.c +++ b/contrib/libarchive/libarchive/archive_options.c @@ -90,7 +90,9 @@ _archive_set_either_option(struct archive *a, const char *m, const char *o, cons if (r2 == ARCHIVE_FATAL) return (ARCHIVE_FATAL); - if (r2 == ARCHIVE_WARN - 1) + if (r1 == ARCHIVE_WARN - 1) + return r2; + if (r2 == ARCHIVE_WARN -1) return r1; return r1 > r2 ? r1 : r2; } diff --git a/contrib/libarchive/libarchive/archive_pathmatch.c b/contrib/libarchive/libarchive/archive_pathmatch.c index 19e0889ffe55..db0d2b791adf 100644 --- a/contrib/libarchive/libarchive/archive_pathmatch.c +++ b/contrib/libarchive/libarchive/archive_pathmatch.c @@ -202,7 +202,7 @@ pm(const char *p, const char *s, int flags) if (*p == '\0') return (1); while (*s) { - if (archive_pathmatch(p, s, flags)) + if (pm(p, s, flags)) return (1); ++s; } @@ -307,7 +307,7 @@ pm_w(const wchar_t *p, const wchar_t *s, int flags) if (*p == L'\0') return (1); while (*s) { - if (archive_pathmatch_w(p, s, flags)) + if (pm_w(p, s, flags)) return (1); ++s; } diff --git a/contrib/libarchive/libarchive/archive_ppmd8.c b/contrib/libarchive/libarchive/archive_ppmd8.c index 30196d64a9f5..04b1c0c3e165 100644 --- a/contrib/libarchive/libarchive/archive_ppmd8.c +++ b/contrib/libarchive/libarchive/archive_ppmd8.c @@ -61,7 +61,7 @@ typedef struct CPpmd8_Node_ #define EMPTY_NODE 0xFFFFFFFF -void Ppmd8_Construct(CPpmd8 *p) +static void Ppmd8_Construct(CPpmd8 *p) { unsigned i, k, m; @@ -89,14 +89,14 @@ void Ppmd8_Construct(CPpmd8 *p) } } -void Ppmd8_Free(CPpmd8 *p) +static void Ppmd8_Free(CPpmd8 *p) { free(p->Base); p->Size = 0; p->Base = 0; } -Bool Ppmd8_Alloc(CPpmd8 *p, UInt32 size) +static Bool Ppmd8_Alloc(CPpmd8 *p, UInt32 size) { if (p->Base == 0 || p->Size != size) { @@ -407,7 +407,7 @@ static void RestartModel(CPpmd8 *p) } } -void Ppmd8_Init(CPpmd8 *p, unsigned maxOrder, unsigned restoreMethod) +static void Ppmd8_Init(CPpmd8 *p, unsigned maxOrder, unsigned restoreMethod) { p->MaxOrder = maxOrder; p->RestoreMethod = restoreMethod; @@ -1042,7 +1042,7 @@ static void Rescale(CPpmd8 *p) p->FoundState = STATS(p->MinContext); } -CPpmd_See *Ppmd8_MakeEscFreq(CPpmd8 *p, unsigned numMasked1, UInt32 *escFreq) +static CPpmd_See *Ppmd8_MakeEscFreq(CPpmd8 *p, unsigned numMasked1, UInt32 *escFreq) { CPpmd_See *see; if (p->MinContext->NumStats != 0xFF) @@ -1078,7 +1078,7 @@ static void NextContext(CPpmd8 *p) } } -void Ppmd8_Update1(CPpmd8 *p) +static void Ppmd8_Update1(CPpmd8 *p) { CPpmd_State *s = p->FoundState; s->Freq += 4; @@ -1093,7 +1093,7 @@ void Ppmd8_Update1(CPpmd8 *p) NextContext(p); } -void Ppmd8_Update1_0(CPpmd8 *p) +static void Ppmd8_Update1_0(CPpmd8 *p) { p->PrevSuccess = (2 * p->FoundState->Freq >= p->MinContext->SummFreq); p->RunLength += p->PrevSuccess; @@ -1103,7 +1103,7 @@ void Ppmd8_Update1_0(CPpmd8 *p) NextContext(p); } -void Ppmd8_UpdateBin(CPpmd8 *p) +static void Ppmd8_UpdateBin(CPpmd8 *p) { p->FoundState->Freq = (Byte)(p->FoundState->Freq + (p->FoundState->Freq < 196)); p->PrevSuccess = 1; @@ -1111,7 +1111,7 @@ void Ppmd8_UpdateBin(CPpmd8 *p) NextContext(p); } -void Ppmd8_Update2(CPpmd8 *p) +static void Ppmd8_Update2(CPpmd8 *p) { p->MinContext->SummFreq += 4; if ((p->FoundState->Freq += 4) > MAX_FREQ) @@ -1127,7 +1127,7 @@ This code is based on: PPMd var.I (2002): Dmitry Shkarin : Public domain Carryless rangecoder (1999): Dmitry Subbotin : Public domain */ -Bool Ppmd8_RangeDec_Init(CPpmd8 *p) +static Bool Ppmd8_RangeDec_Init(CPpmd8 *p) { unsigned i; p->Low = 0; @@ -1161,7 +1161,7 @@ static void RangeDec_Decode(CPpmd8 *p, UInt32 start, UInt32 size) #define MASK(sym) ((signed char *)charMask)[sym] -int Ppmd8_DecodeSymbol(CPpmd8 *p) +static int Ppmd8_DecodeSymbol(CPpmd8 *p) { size_t charMask[256 / sizeof(size_t)]; if (p->MinContext->NumStats != 0) diff --git a/contrib/libarchive/libarchive/archive_ppmd8_private.h b/contrib/libarchive/libarchive/archive_ppmd8_private.h index 454b75f41f25..f0493de04623 100644 --- a/contrib/libarchive/libarchive/archive_ppmd8_private.h +++ b/contrib/libarchive/libarchive/archive_ppmd8_private.h @@ -83,12 +83,6 @@ typedef struct UInt16 BinSumm[25][64]; } CPpmd8; -void Ppmd8_Construct(CPpmd8 *p); -Bool Ppmd8_Alloc(CPpmd8 *p, UInt32 size); -void Ppmd8_Free(CPpmd8 *p); -void Ppmd8_Init(CPpmd8 *p, unsigned maxOrder, unsigned restoreMethod); -#define Ppmd8_WasAllocated(p) ((p)->Base != NULL) - /* ---------- Internal Functions ---------- */ @@ -104,30 +98,11 @@ extern const Byte PPMD8_kExpEscape[16]; #define Ppmd8_GetStats(p, ctx) ((CPpmd_State *)Ppmd8_GetPtr((p), ((ctx)->Stats))) #endif -void Ppmd8_Update1(CPpmd8 *p); -void Ppmd8_Update1_0(CPpmd8 *p); -void Ppmd8_Update2(CPpmd8 *p); -void Ppmd8_UpdateBin(CPpmd8 *p); - #define Ppmd8_GetBinSumm(p) \ &p->BinSumm[p->NS2Indx[Ppmd8Context_OneState(p->MinContext)->Freq - 1]][ \ p->NS2BSIndx[Ppmd8_GetContext(p, p->MinContext->Suffix)->NumStats] + \ p->PrevSuccess + p->MinContext->Flags + ((p->RunLength >> 26) & 0x20)] -CPpmd_See *Ppmd8_MakeEscFreq(CPpmd8 *p, unsigned numMasked, UInt32 *scale); - - -/* ---------- Decode ---------- */ - -Bool Ppmd8_RangeDec_Init(CPpmd8 *p); -#define Ppmd8_RangeDec_IsFinishedOK(p) ((p)->Code == 0) -int Ppmd8_DecodeSymbol(CPpmd8 *p); /* returns: -1 as EndMarker, -2 as DataError */ - -/* ---------- Encode ---------- */ - -#define Ppmd8_RangeEnc_Init(p) { (p)->Low = 0; (p)->Range = 0xFFFFFFFF; } -void Ppmd8_RangeEnc_FlushData(CPpmd8 *p); -void Ppmd8_EncodeSymbol(CPpmd8 *p, int symbol); /* symbol = -1 means EndMarker */ typedef struct { diff --git a/contrib/libarchive/libarchive/archive_read.c b/contrib/libarchive/libarchive/archive_read.c index c9b9d5981516..e5f89bdc8772 100644 --- a/contrib/libarchive/libarchive/archive_read.c +++ b/contrib/libarchive/libarchive/archive_read.c @@ -171,7 +171,7 @@ static int64_t client_skip_proxy(struct archive_read_filter *self, int64_t request) { if (request < 0) - __archive_errx(1, "Negative skip requested."); + __archive_errx(1, "Negative skip requested"); if (request == 0) return 0; @@ -379,7 +379,7 @@ archive_read_set_callback_data2(struct archive *_a, void *client_data, if (a->client.dataset == NULL) { archive_set_error(&a->archive, ENOMEM, - "No memory."); + "No memory"); return ARCHIVE_FATAL; } a->client.nodes = 1; @@ -388,7 +388,7 @@ archive_read_set_callback_data2(struct archive *_a, void *client_data, if (iindex > a->client.nodes - 1) { archive_set_error(&a->archive, EINVAL, - "Invalid index specified."); + "Invalid index specified"); return ARCHIVE_FATAL; } a->client.dataset[iindex].data = client_data; @@ -409,14 +409,14 @@ archive_read_add_callback_data(struct archive *_a, void *client_data, "archive_read_add_callback_data"); if (iindex > a->client.nodes) { archive_set_error(&a->archive, EINVAL, - "Invalid index specified."); + "Invalid index specified"); return ARCHIVE_FATAL; } p = realloc(a->client.dataset, sizeof(*a->client.dataset) * (++(a->client.nodes))); if (p == NULL) { archive_set_error(&a->archive, ENOMEM, - "No memory."); + "No memory"); return ARCHIVE_FATAL; } a->client.dataset = (struct archive_read_data_node *)p; @@ -625,7 +625,7 @@ _archive_read_next_header2(struct archive *_a, struct archive_entry *entry) r1 = archive_read_data_skip(&a->archive); if (r1 == ARCHIVE_EOF) archive_set_error(&a->archive, EIO, - "Premature end-of-file."); + "Premature end-of-file"); if (r1 == ARCHIVE_EOF || r1 == ARCHIVE_FATAL) { a->archive.state = ARCHIVE_STATE_FATAL; return (ARCHIVE_FATAL); diff --git a/contrib/libarchive/libarchive/archive_read_append_filter.c b/contrib/libarchive/libarchive/archive_read_append_filter.c index cd88df119906..d578b06fe714 100644 --- a/contrib/libarchive/libarchive/archive_read_append_filter.c +++ b/contrib/libarchive/libarchive/archive_read_append_filter.c @@ -104,6 +104,10 @@ archive_read_append_filter(struct archive *_a, int code) strcpy(str, "lrzip"); r1 = archive_read_support_filter_lrzip(_a); break; + case ARCHIVE_FILTER_GRZIP: *** 5263 LINES SKIPPED *** From nobody Thu Apr 23 10:33:26 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1XVv00pYz6ZQCF for ; Thu, 23 Apr 2026 10:33:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1XVt4RCVz4QQ6 for ; Thu, 23 Apr 2026 10:33:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776940406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rggSXK3zBtQykGaiTeHcsS3Voj3oJSlKtMxKuY9/14k=; b=PqChQ9REcJ4z5S+snVjztJFyrY0JOOYUghrivL+k4/3rLyKR8GbbyXpqgHbMLYL8yZVUbK iHvoV7JB3PZ+Fm33QiSNOYRh3dFpJKXb93/8U5XbPrpZOwno2gvArmi6Xscn77aV95pDAV mCwGvh/5BWp6YX09z8EUA07AsZ6dWHGskke4aiB+3YlU5UeSY74Mzh7S2ePE6QSd52B9Kk sDHpPKlRaHRBnn81CNY//mnmp/c3/W3UfArUB/EkmCOr2H5bSKGYP3Zg3h3zKhBwtmy/z1 wtE6l0gB/AIMdmk/1vk03eQLao2Zp8oAEFPfiP0kmWA5wDz0mJ9CeYPXY5+4uw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776940406; a=rsa-sha256; cv=none; b=n5tVGAYNn3TGANG4yO4KXan3BM3P9HkIYNtl8K35og28om2UC/W/T+WyWlzgvDGhKPc4cz YqZqMUnDRlDvwtVulyus0ay3KGYovr+h3LKYkRvFCpbYo+dvkb7F9Q843KeuMJDG8ivxYN Jabf1QSv2IoQlJwBWc8Tg+MzBuFcOoDeUdqp756k6jwGlYMVQUDJfPygIYzbZvPg1LxlUR dj6R9BvxzSx/MVT+NcZyQSfHnIrCAGXDFDU++A9bgGtrE3/Ymxxjc/0oQ/HSfdXoDcag3O Cy6RtkjiVPO+Cnkf1jbMKpeoOjqIr8cgn10T/sLCTpmAUqB4zBwzFNyhFWEE7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776940406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rggSXK3zBtQykGaiTeHcsS3Voj3oJSlKtMxKuY9/14k=; b=yFwZo2Twq7Sm0sTUmgOPZnMUpHsiN3xRPQMep9gQkZcfU3I5yb7gANpHNUkLIhwazPECSH Kz/1W5dLoNcXWcf43Hl4l766IpnskCJYtCqaJFlovWOcCPKGmBmmqnhh8BoswDsSDE7qz1 gq0edPA2ww5ViA72r+R3+FJGfpunWzMCv/aNUzKzI5LrIIBpi8ZjywAlAr6cT6aEfn7xxO Sq7ZB7KXaHMZcHL6naxRk1zLhctZKqHbGZA8Rb593TFToLloHJ3V7r9vMaPT3kki9O4qo0 zb1WnEhNrRit2LVnsp6fcy/+1uMC5qqkonGcbrHEC2bwTMR7hMXTxYb8AoOtVg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1XVt418sz1CCh for ; Thu, 23 Apr 2026 10:33:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e462 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Apr 2026 10:33:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav From: Martin Matuska Subject: git: 170f7d2168a2 - stable/13 - libarchive: Update configuration List-Id: Commits to the stable branches 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: mm X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 170f7d2168a227ea1fb58f20fe543ac22d4635f2 Auto-Submitted: auto-generated Date: Thu, 23 Apr 2026 10:33:26 +0000 Message-Id: <69e9f576.3e462.52eca80e@gitrepo.freebsd.org> The branch stable/13 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=170f7d2168a227ea1fb58f20fe543ac22d4635f2 commit 170f7d2168a227ea1fb58f20fe543ac22d4635f2 Author: Dag-Erling Smørgrav AuthorDate: 2026-04-18 08:25:31 +0000 Commit: Martin Matuska CommitDate: 2026-04-23 09:45:52 +0000 libarchive: Update configuration PR: 294577 MFC after: 1 week Reviewed by: mm Differential Revision: https://reviews.freebsd.org/D56468 (cherry picked from commit 05bbe5e3883492dd2afa52039da1fac45c5059a0) --- lib/libarchive/config_freebsd.h | 124 ++++++++++++++++++++++++++++------------ 1 file changed, 89 insertions(+), 35 deletions(-) diff --git a/lib/libarchive/config_freebsd.h b/lib/libarchive/config_freebsd.h index 746207360872..ab73b3c67d49 100644 --- a/lib/libarchive/config_freebsd.h +++ b/lib/libarchive/config_freebsd.h @@ -26,30 +26,11 @@ */ #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 -#include - -/* FreeBSD 5.0 and later has ACL and extattr support. */ -#if __FreeBSD__ > 4 -#define ARCHIVE_ACL_FREEBSD 1 -#define ARCHIVE_XATTR_FREEBSD 1 -#define HAVE_ACL_GET_PERM_NP 1 -#define HAVE_ARC4RANDOM_BUF 1 -#define HAVE_STRUCT_XVFSCONF 1 -#define HAVE_SYS_ACL_H 1 -#define HAVE_SYS_EXTATTR_H 1 -#if __FreeBSD__ > 7 -/* FreeBSD 8.0 and later has NFSv4 ACL support */ -#define ARCHIVE_ACL_FREEBSD_NFS4 1 -#define HAVE_ACL_GET_LINK_NP 1 -#define HAVE_ACL_IS_TRIVIAL_NP 1 -#define HAVE_ACL_SET_LINK_NP 1 -#endif /* __FreeBSD__ > 7 */ -#endif /* __FreeBSD__ > 4 */ - #ifdef WITH_OPENSSL #define HAVE_LIBCRYPTO 1 #define HAVE_OPENSSL_EVP_H 1 #define HAVE_OPENSSL_MD5_H 1 +#define HAVE_OPENSSL_OPENSSLV_H 1 #define HAVE_OPENSSL_RIPEMD_H 1 #define HAVE_OPENSSL_SHA_H 1 #define HAVE_OPENSSL_SHA256_INIT 1 @@ -75,13 +56,59 @@ #define HAVE_SHA512_INIT 1 #endif +#define ARCHIVE_ACL_FREEBSD 1 +#define ARCHIVE_ACL_FREEBSD_NFS4 1 +#define ARCHIVE_XATTR_FREEBSD 1 +#define HAVE_ACL_ADD_FLAG_NP 1 +#define HAVE_ACL_ADD_PERM 1 +#define HAVE_ACL_CLEAR_FLAGS_NP 1 +#define HAVE_ACL_CLEAR_PERMS 1 +#define HAVE_ACL_CREATE_ENTRY 1 +#define HAVE_ACL_DELETE_DEF_FILE 1 +#define HAVE_ACL_ENTRY_T 1 +#define HAVE_ACL_FREE 1 +#define HAVE_ACL_GET_BRAND_NP 1 +#define HAVE_ACL_GET_ENTRY 1 +#define HAVE_ACL_GET_ENTRY_TYPE_NP 1 +#define HAVE_ACL_GET_FD 1 +#define HAVE_ACL_GET_FD_NP 1 +#define HAVE_ACL_GET_FILE 1 +#define HAVE_ACL_GET_FLAGSET_NP 1 +#define HAVE_ACL_GET_FLAG_NP 1 +#define HAVE_ACL_GET_LINK_NP 1 +#define HAVE_ACL_GET_PERMSET 1 +#define HAVE_ACL_GET_PERM_NP 1 +#define HAVE_ACL_GET_QUALIFIER 1 +#define HAVE_ACL_GET_TAG_TYPE 1 +#define HAVE_ACL_INIT 1 +#define HAVE_ACL_IS_TRIVIAL_NP 1 +#define HAVE_ACL_PERMSET_T 1 +#define HAVE_ACL_SET_ENTRY_TYPE_NP 1 +#define HAVE_ACL_SET_FD 1 +#define HAVE_ACL_SET_FD_NP 1 +#define HAVE_ACL_SET_FILE 1 +#define HAVE_ACL_SET_LINK_NP 1 +#define HAVE_ACL_SET_QUALIFIER 1 +#define HAVE_ACL_SET_TAG_TYPE 1 +#define HAVE_ACL_T 1 +#define HAVE_ACL_TAG_T 1 +#define HAVE_ARC4RANDOM_BUF 1 #define HAVE_BSDXML_H 1 #define HAVE_BZLIB_H 1 #define HAVE_CHFLAGS 1 #define HAVE_CHOWN 1 #define HAVE_CHROOT 1 +#define HAVE_CLOSEFROM 1 +#define HAVE_CLOSE_RANGE 1 #define HAVE_CTIME_R 1 #define HAVE_CTYPE_H 1 +#ifndef __linux__ +#define HAVE_D_MD_ORDER 1 +#endif +#define HAVE_DECL_ACL_SYNCHRONIZE 1 +#define HAVE_DECL_ACL_TYPE_EXTENDED 0 +#define HAVE_DECL_ACL_TYPE_NFS4 1 +#define HAVE_DECL_ACL_USER 1 #define HAVE_DECL_EXTATTR_NAMESPACE_USER 1 #define HAVE_DECL_INT32_MAX 1 #define HAVE_DECL_INT32_MIN 1 @@ -95,13 +122,21 @@ #define HAVE_DECL_UINT32_MAX 1 #define HAVE_DECL_UINT64_MAX 1 #define HAVE_DECL_UINTMAX_MAX 1 +#define HAVE_DECL_XATTR_NOFOLLOW 0 #define HAVE_DIRENT_H 1 #define HAVE_DIRFD 1 #define HAVE_DLFCN_H 1 -#define HAVE_D_MD_ORDER 1 #define HAVE_EFTYPE 1 #define HAVE_EILSEQ 1 #define HAVE_ERRNO_H 1 +#define HAVE_EXTATTR_GET_FD 1 +#define HAVE_EXTATTR_GET_FILE 1 +#define HAVE_EXTATTR_GET_LINK 1 +#define HAVE_EXTATTR_LIST_FD 1 +#define HAVE_EXTATTR_LIST_FILE 1 +#define HAVE_EXTATTR_LIST_LINK 1 +#define HAVE_EXTATTR_SET_FD 1 +#define HAVE_EXTATTR_SET_LINK 1 #define HAVE_FCHDIR 1 #define HAVE_FCHFLAGS 1 #define HAVE_FCHMOD 1 @@ -118,26 +153,33 @@ #define HAVE_FSTATFS 1 #define HAVE_FSTATVFS 1 #define HAVE_FTRUNCATE 1 +#define HAVE_FUTIMENS 1 #define HAVE_FUTIMES 1 #define HAVE_FUTIMESAT 1 +#define HAVE_GETEGID 1 #define HAVE_GETEUID 1 #define HAVE_GETGRGID_R 1 #define HAVE_GETGRNAM_R 1 #define HAVE_GETLINE 1 -#define HAVE_GETOPT_OPTRESET 1 #define HAVE_GETPID 1 #define HAVE_GETPWNAM_R 1 #define HAVE_GETPWUID_R 1 +#define HAVE_GETRESGID 1 +#define HAVE_GETRESUID 1 #define HAVE_GETVFSBYNAME 1 #define HAVE_GMTIME_R 1 #define HAVE_GRP_H 1 #define HAVE_INTMAX_T 1 #define HAVE_INTTYPES_H 1 +#define HAVE_ISSETUGID 1 #define HAVE_LANGINFO_H 1 #define HAVE_LCHFLAGS 1 #define HAVE_LCHMOD 1 #define HAVE_LCHOWN 1 +#define HAVE_LIBBZ2 1 +#define HAVE_LIBLZMA 1 #define HAVE_LIBZ 1 +#define HAVE_LIBZSTD 1 #define HAVE_LIMITS_H 1 #define HAVE_LINK 1 #define HAVE_LINKAT 1 @@ -146,9 +188,10 @@ #define HAVE_LONG_LONG_INT 1 #define HAVE_LSTAT 1 #define HAVE_LUTIMES 1 +#define HAVE_LZMA_H 1 +#define HAVE_LZMA_STREAM_ENCODER_MT 1 #define HAVE_MBRTOWC 1 #define HAVE_MEMMOVE 1 -#define HAVE_MEMORY_H 1 #define HAVE_MEMSET 1 #define HAVE_MKDIR 1 #define HAVE_MKFIFO 1 @@ -160,7 +203,16 @@ #define HAVE_PIPE 1 #define HAVE_POLL 1 #define HAVE_POLL_H 1 +#if 0 +/* + * FreeBSD does have posix_spawn() and posix_spawnp(), but they are + * wrappers around fork() + execve() and fork() + execvp() respectively, + * so there is no reason to prefer them to the simpler alternatives, + * unlike e.g. Darwin where posix_spawn() is a system call. + */ +#define HAVE_POSIX_SPAWN 1 #define HAVE_POSIX_SPAWNP 1 +#endif #define HAVE_PTHREAD_H 1 #define HAVE_PWD_H 1 #define HAVE_READLINK 1 @@ -178,6 +230,7 @@ #define HAVE_STATVFS 1 #define HAVE_STDARG_H 1 #define HAVE_STDINT_H 1 +#define HAVE_STDIO_H 1 #define HAVE_STDLIB_H 1 #define HAVE_STRCHR 1 #define HAVE_STRDUP 1 @@ -188,6 +241,8 @@ #define HAVE_STRING_H 1 #define HAVE_STRNLEN 1 #define HAVE_STRRCHR 1 +#define HAVE_STRUCT_STATFS 1 +#define HAVE_STRUCT_STATFS_F_IOSIZE 1 #define HAVE_STRUCT_STATFS_F_NAMEMAX 1 #define HAVE_STRUCT_STAT_ST_BIRTHTIME 1 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1 @@ -196,13 +251,17 @@ #define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1 #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 #define HAVE_STRUCT_TM_TM_GMTOFF 1 +#define HAVE_STRUCT_VFSCONF 1 +#define HAVE_STRUCT_XVFSCONF 1 #define HAVE_SYMLINK 1 +#define HAVE_SYSCONF 1 +#define HAVE_SYS_ACL_H 1 #define HAVE_SYS_CDEFS_H 1 +#define HAVE_SYS_EXTATTR_H 1 #define HAVE_SYS_IOCTL_H 1 #define HAVE_SYS_MOUNT_H 1 #define HAVE_SYS_PARAM_H 1 #define HAVE_SYS_POLL_H 1 -#define HAVE_SYS_QUEUE_H 1 #define HAVE_SYS_SELECT_H 1 #define HAVE_SYS_STATVFS_H 1 #define HAVE_SYS_STAT_H 1 @@ -210,6 +269,8 @@ #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_UTSNAME_H 1 #define HAVE_SYS_WAIT_H 1 +#define HAVE_TCGETATTR 1 +#define HAVE_TCSETATTR 1 #define HAVE_TIMEGM 1 #define HAVE_TIME_H 1 #define HAVE_TZSET 1 @@ -220,6 +281,7 @@ #define HAVE_UNSIGNED_LONG_LONG 1 #define HAVE_UNSIGNED_LONG_LONG_INT 1 #define HAVE_UTIME 1 +#define HAVE_UTIMENSAT 1 #define HAVE_UTIMES 1 #define HAVE_UTIME_H 1 #define HAVE_VFORK 1 @@ -236,19 +298,11 @@ #define HAVE_WMEMCPY 1 #define HAVE_WMEMMOVE 1 #define HAVE_ZLIB_H 1 +#define HAVE_ZSTD_H 1 +#define HAVE_ZSTD_compressStream 1 +#define HAVE_ZSTD_minCLevel 1 #define TIME_WITH_SYS_TIME 1 -#if __FreeBSD_version >= 1100056 -#define HAVE_FUTIMENS 1 -#define HAVE_UTIMENSAT 1 -#endif - -/* FreeBSD 4 and earlier lack intmax_t/uintmax_t */ -#if __FreeBSD__ < 5 -#define intmax_t int64_t -#define uintmax_t uint64_t -#endif - /* FreeBSD defines for archive_hash.h */ #ifdef WITH_OPENSSL #define ARCHIVE_CRYPTO_MD5_OPENSSL 1 From nobody Thu Apr 23 10:33:27 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1XVv6HnDz6ZQDr for ; Thu, 23 Apr 2026 10:33:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1XVv5Fg6z4QSD for ; Thu, 23 Apr 2026 10:33:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776940407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uZ6laIRzi+I7lAF+9YoZtTG+gvvUYvDrt2j8fe0QKrE=; b=AYk1foyfij/a/MYCTahdy9jgIY+ZTcuyyYThJRCy8v3jQGIrx4pSqRoMw6F3mPOf2Fw+XZ Wcd35PKJTfehJyUuDcDl8HEndkV7TRRQV1U0OB2kHadmeqG+t7anrQg0Ykj+2YL60bE92m qEUiUwNKk1RMjfXpsgYfLmn3AF4a59C1tcNiBAqcwiBbBV32Phb/2Vmw67wnWkBrHlxVNt jU5aIZ3XfKoG2lZg+ohKl1PPpXn6p2VRI6nXoNBKPUIe8NqAdKbaofH3vQP1973ovZ9wwk /qxWuvAkpmtCZ2exdO+B2s/zGqinRtRNK53CvdJJbNu6evCzb7iLHEq7Ly6PEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776940407; a=rsa-sha256; cv=none; b=FmBY8Iz/xPZ1+ewWhk6SMg1gE3UvFzchgfyuaPQ5dKswbHQeFtcDUCY1zUrhGDJlvzlOt7 fViUs5b4fBnziWDvvroMskux989VxYpoW1x1W9VV2lsX5WtUJIEBzYOq2FlAOCOsVZKUVa BgN3zB7KpgsodnCQx59yfRx0Bhrz6fKM2XJhWYs4LhVuBxiRM0t7/EWY/aQyEGo7FDQb1p gQHfXMihSa5UlVH8gD9lO6PQFtOiq//z//8tVy9387oC2U4JQ6QTEUdl6FAUNpZqv9kYHM fYCBnJRUW/ceZmjNgTuAG3CqFMmDP0rGbfMQI3EexvVnoWvUSlw3kd2TWoAYdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776940407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uZ6laIRzi+I7lAF+9YoZtTG+gvvUYvDrt2j8fe0QKrE=; b=KBwQ1f3k4fvk/5iKoo2R9I4l79G0K+mHKAEcZdoTY+z7MHA5fpN+KdNT6aVLZT8Cz3cVuB cWzunb8MZ1VLK5fhFwbiZ1WQfp2bEdsABa0Qz0g3jsOLrNPRw+whqUfvTd9SkSl64jq3L5 Y3yzkk9j1m5BXHal2bfbyD1hyIlWiswvWTu19Al7lMQIn0i/xA1uJgsYO7GF8mgcAjsxgb tTg2SRqI3FidjZstu7QfK2Ex0VKwx8KLuRXLmQAn7I7+UDh9foK6/UmvGZRIG90+ySA0gf 4UDnw4+0ie8Z2i1xRz5cSombEegWxOL8B+t6dBzESv9zD5aqim5Pf+n+Is0cMw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1XVv4p69z1ByW for ; Thu, 23 Apr 2026 10:33:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3cf6f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Apr 2026 10:33:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav From: Martin Matuska Subject: git: 200b48c5e8be - stable/13 - libarchive: Staticize some variables List-Id: Commits to the stable branches 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: mm X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 200b48c5e8be2151bdff9daea0d01ba1a6375d5d Auto-Submitted: auto-generated Date: Thu, 23 Apr 2026 10:33:27 +0000 Message-Id: <69e9f577.3cf6f.26f741a5@gitrepo.freebsd.org> The branch stable/13 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=200b48c5e8be2151bdff9daea0d01ba1a6375d5d commit 200b48c5e8be2151bdff9daea0d01ba1a6375d5d Author: Dag-Erling Smørgrav AuthorDate: 2026-04-18 08:25:35 +0000 Commit: Martin Matuska CommitDate: 2026-04-23 09:49:15 +0000 libarchive: Staticize some variables This code was not being built due to errors in our libarchive configuration. Now that those have been addressed, staticize some variables that trip a “no previous extern declaration” error. This is a subset of upstream PR 2962. MFC after: 1 week Reviewed by: mm Differential Revision: https://reviews.freebsd.org/D56471 (cherry picked from commit 7e9d974bc023755161742f66c8c77546bab88586) --- contrib/libarchive/test_utils/test_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/libarchive/test_utils/test_main.c b/contrib/libarchive/test_utils/test_main.c index 1f641bbe8db7..f7364c0ba4e8 100644 --- a/contrib/libarchive/test_utils/test_main.c +++ b/contrib/libarchive/test_utils/test_main.c @@ -187,10 +187,10 @@ const char *testprog; #ifdef RUN_TEST_UNPRIV /* Unprivileged user to run as */ -const char *tuser = "nobody"; +static const char *tuser = "nobody"; /* Original and test credentials */ -uid_t ouid, tuid; -uid_t ogid, tgid; +static uid_t ouid, tuid; +static uid_t ogid, tgid; #endif #if defined(_WIN32) && !defined(__CYGWIN__) From nobody Thu Apr 23 13:49:06 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1crf60Swz6ZlTb for ; Thu, 23 Apr 2026 13:49:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1crf5VVgz3Wgj for ; Thu, 23 Apr 2026 13:49:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776952146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OK6URXOAh2mZIVPwj1/eVp5wpJVFyVgmM82jCzXnM/c=; b=NHAQMojXCLz8kz144+cngVShNaTITBvkG5dLD1nwhljmC07IqHTHqtQZP3jhCQGzxk2Ob5 jLnziQ6LdWcKUY/1nA2o8Y7nzzCvAAZWPIa+1cUDekUMiefcQAC+4x+qaw51y5Xkvs3izv 6AlazBcAhVC5AEK4qhU7uN+58qgsYk1yr5bDPyBnQAl/MoPkeSiqWlin8mxWTngA0KN9nv 6PkO//ZLy/ilzTIZ4SeQ1QGPeDH5WxJ7e9zMcHDPg0ChOSNyU9DExheLehUgbL5z2FRHMU yw906mD51UMblRSfr4igKTLWXNHsIP+JsYXMLNf5UBEifwUOtDN2L+FpCRkyDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776952146; a=rsa-sha256; cv=none; b=oOvCrGk7ra3MYIASI8JgSARO/VRhGQFWJfM3Si7hl5/WTsKx3Vee5TR+MB9yyg0NJnQ1Iv iWFbZRxYClUB1tBA1oTRqQOpyqceCutgKgtLbuKM7X4rIo+2RwUOZxco+XLgpDqW0EIrwh Hl2tjP/B1J2UN37zq87pJdTY3B3w3fSwfhz80NMi1N0gJPJHd3//Ltu5hvWxKElsLqB9rl yHlGvrodqaEFnFF7yDArv2kIDk5z0Hl/gyaMHUX5jYsgJXUODE4VsVzGHVnMII945GCDiy cC/qQTSaMyHp4oyP8m9xBuzFtg+jROoKSl+Bt+D0M5b82hPW/peyMxoeVoOC7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776952146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OK6URXOAh2mZIVPwj1/eVp5wpJVFyVgmM82jCzXnM/c=; b=ujdXsgFkkpmPKxnlyptEJam+WebeUMfQ97OQsGHgSMBO6DdegfT6V+zsIGogCzrA5nUppp ezm0NzV2oKcLcw3CR+0yt8mIi5vIIgFMfjMzFU+ap6qbyrlzin/PSaTHXrpa7vhqx6WLTt d0gckAV1+A/g7gnbEsOAeohfxujC8VQtgBKB3V7kh+XUtaHKIj8i4gLKAOHvB69ocX2/7+ 97BST/h6v0r1G4sdDd6rtxmbE+qHXAs87GvOVZqGhd9mDt0ilqGshmyYkXUqI15I/xwJP+ hMngmIukmairekq703FjLNSqmjz2RD1+zgOXCQlVUIIRpco8aaE3nESWzgon0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1crf562Dz4Ns for ; Thu, 23 Apr 2026 13:49:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21471 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Apr 2026 13:49:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: cee4e16cb6fb - stable/15 - libutil: take a size_t in trimdomain() List-Id: Commits to the stable branches 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: cee4e16cb6fbaf1c5b9ed8daad69986886e96af7 Auto-Submitted: auto-generated Date: Thu, 23 Apr 2026 13:49:06 +0000 Message-Id: <69ea2352.21471.a627cfd@gitrepo.freebsd.org> The branch stable/15 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=cee4e16cb6fbaf1c5b9ed8daad69986886e96af7 commit cee4e16cb6fbaf1c5b9ed8daad69986886e96af7 Author: Kyle Evans AuthorDate: 2026-03-03 22:51:01 +0000 Commit: Kyle Evans CommitDate: 2026-04-23 13:48:43 +0000 libutil: take a size_t in trimdomain() INT_MAX is already larger than a reasonable hostname might be, but size_t makes some of this easier to reason about as we do arithmetic with it. This would maybe not be worth it if we had to bump the soversion because of it, but libutil does symbol versioning now so we can provide a compat shim. While we're here, fix some inconsistencies in argument names in the manpage. Reviewed by: des Obtained from: https://github.com/apple-oss-distributions/libutil Sponsored by: Klara, Inc. (cherry picked from commit 7e70589b1bee4853cb11e3d8eb963079b18ff534) --- lib/libutil/Symbol.map | 5 ++++- lib/libutil/libutil.h | 2 +- lib/libutil/trimdomain.3 | 8 ++++---- lib/libutil/trimdomain.c | 18 +++++++++++++++++- 4 files changed, 26 insertions(+), 7 deletions(-) diff --git a/lib/libutil/Symbol.map b/lib/libutil/Symbol.map index 2b28456f4406..fbd10769b2a0 100644 --- a/lib/libutil/Symbol.map +++ b/lib/libutil/Symbol.map @@ -115,7 +115,6 @@ FBSD_1.8 { setclassenvironment; setclassresources; setusercontext; - trimdomain; uu_lock_txfr; uu_lock; uu_lockerr; @@ -130,6 +129,10 @@ FBSD_1.8 { crypt_set_format; }; +FBSD_1.9 { + trimdomain; +}; + FBSDprivate_1.0 { __pw_initpwd; }; diff --git a/lib/libutil/libutil.h b/lib/libutil/libutil.h index 9b5b2abe7f09..17e4f1fba247 100644 --- a/lib/libutil/libutil.h +++ b/lib/libutil/libutil.h @@ -140,7 +140,7 @@ int realhostname(char *_host, size_t _hsize, const struct in_addr *_ip); int realhostname_sa(char *_host, size_t _hsize, struct sockaddr *_addr, int _addrlen); int _secure_path(const char *_path, uid_t _uid, gid_t _gid); -void trimdomain(char *_fullhost, int _hostsize); +void trimdomain(char *_fullhost, size_t _hostsize); const char * uu_lockerr(int _uu_lockresult); int uu_lock(const char *_ttyname); diff --git a/lib/libutil/trimdomain.3 b/lib/libutil/trimdomain.3 index 114d8d139869..4a3a4d5827ec 100644 --- a/lib/libutil/trimdomain.3 +++ b/lib/libutil/trimdomain.3 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 17, 2025 +.Dd March 3, 2026 .Dt TRIMDOMAIN 3 .Os .Sh NAME @@ -34,7 +34,7 @@ .In sys/types.h .In libutil.h .Ft void -.Fn trimdomain "char *fullhost" "int hostsize" +.Fn trimdomain "char *fullhost" "size_t hostsize" .Sh DESCRIPTION The function .Fn trimdomain @@ -53,13 +53,13 @@ the first time this function is called and is cached for future use. The .Fn trimdomain function will only trim the domain name if the passed -.Ar fullname +.Ar fullhost ends with the current domain name and if the length of the resulting host name does not exceed .Ar hostsize . .Pp If the passed -.Ar fullname +.Ar fullhost is actually an X11 .Ev DISPLAY specification of the form diff --git a/lib/libutil/trimdomain.c b/lib/libutil/trimdomain.c index 77518a389419..47297817a76f 100644 --- a/lib/libutil/trimdomain.c +++ b/lib/libutil/trimdomain.c @@ -34,6 +34,7 @@ #include #include +void freebsd15_trimdomain(char *, int); static int isDISP(const char *); /*- @@ -50,7 +51,7 @@ static int isDISP(const char *); * trimdomain("abcde.my.domain:0.0", 8) -> "abcde.my.domain:0.0" */ void -trimdomain(char *fullhost, int hostsize) +trimdomain(char *fullhost, size_t hostsize) { static size_t dlen; static int first = 1; @@ -89,6 +90,21 @@ trimdomain(char *fullhost, int hostsize) } } +void +freebsd15_trimdomain(char *fullhost, int hostsize) +{ + /* + * Note that we intentionally aren't doing anything here about a + * negative `hostsize`, to preserve historical behavior. Functionally, + * it would have ended up as a very large size passing to the memchr(3), + * thus either appearing to work or reading off the end of the buffer if + * `fullhost` is actually malformed. + */ + trimdomain(fullhost, hostsize); +} + +__sym_compat(trimdomain, freebsd15_trimdomain, FBSD_1.8); + /* * Is the given string NN or NN.NN where ``NN'' is an all-numeric string ? */ From nobody Thu Apr 23 13:49:07 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1crh23nyz6Zlhs for ; Thu, 23 Apr 2026 13:49:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1crg6HFKz3WxP for ; Thu, 23 Apr 2026 13:49:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776952147; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E8ZA0wqVjCj8ZaKsZEQdEumHmqHL9LNdkRoLgweA9rE=; b=MeXsTf1E63pPvGvbVvwnAMQCEm02kqjpgmv4b015bqSo3NZydYg0EwPZnG+OhWeQ6NVXxH OAUhTcu8npSLMjdiGCboo9ugXcgiQHHYeH4gy9+V1JhQZxIGya/0myDXtjL+p90uudOy8m G3ouDMPjgHMjhdt6cEOZ5UMDmJ55pAK+iWYpxkH/yoxxGCbwOFbyI/9oLUnLxIAP8z9MFk Csc8TBXMLu1+FW4s+6UGA7SbrhIgc4i2AAUfZMzbKKrvMXllzJsjpzyNgZyH5Xj/GoEFcc Hv6+J+bEBNqH7/et15JFDXQo2x9za0KMIiML5y/kQTI1Rqw5gAlmFQMhTTaOgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776952147; a=rsa-sha256; cv=none; b=R0oSQwbLUKGwtuJVWf4kxdgmi0M3aej5zP2WJtn8Yrmvmk0cX9fs3hlKsKLQ8x4XNY42OS 3jranVn8rBQaHIuF1nmUWtKLiy9DnTc9GhHFmPjY8w7z/oLfbOLVhW2rPs3ff1FviU9Z8N 1lItTuTrLD75UVp6O/B5lg6Xvi5eC6JP5WeYSJPtP2JvG056tvewKRGQuTQl3VhgLPI3HX OT9NZqYBZOOBQ9PXK5kWS4QhrdbirAISaMjKQ4h22kquuMea7it+OCxmGhIBJm1vQF/jBo BbXZkM9bBK3KBAcrTxGVfTxEB+UvkjDtg8/zF5KWKHWyva45acH1Ua7rI3IiYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776952147; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E8ZA0wqVjCj8ZaKsZEQdEumHmqHL9LNdkRoLgweA9rE=; b=k7/WHuibm88M182RIJ+3OXJaxpkrj1JlwjN9NeWUHGUL0ftOOiR9nKjjAY2trFh2QRrsBu EJz1bT7q0NEKqrpKXTRMWrXhsMxmGeymlfJsUi4vuhqLDsadxjHljCsGTnIIt9A39BjnTi VFUZTY5jDgG8brX/wHQHTccyt1tdbY85tloRb5dOjb7Cv57tasnE6/o4tDYm5hEkBwXDY+ 8UrwFLYJUUyyj2jnqdMJP7YEpYCUqAZjdvANvinvbNJ7ZHGRqHn3cFOQZ3/XblEzNRZ/IY d4m24BHrK8zj5dQmnLkzi9sTTLlEHswuMCsKll6k2+belImzgP+WKAjqKZA4Tg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1crg5rb7z4BB for ; Thu, 23 Apr 2026 13:49:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21cf8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Apr 2026 13:49:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: f3c488fc6b9e - stable/15 - libutil: avoid an out-of-bounds read in trimdomain(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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f3c488fc6b9e7af298c44946dc867652e160a8c9 Auto-Submitted: auto-generated Date: Thu, 23 Apr 2026 13:49:07 +0000 Message-Id: <69ea2353.21cf8.62503e1f@gitrepo.freebsd.org> The branch stable/15 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=f3c488fc6b9e7af298c44946dc867652e160a8c9 commit f3c488fc6b9e7af298c44946dc867652e160a8c9 Author: Kyle Evans AuthorDate: 2026-03-03 22:51:02 +0000 Commit: Kyle Evans CommitDate: 2026-04-23 13:48:43 +0000 libutil: avoid an out-of-bounds read in trimdomain(3) memchr(3) will happily believe we've passed in a valid object, but hostsize could easily exceed the bounds of fullhost. Clamp it down to the string size to be safe and avoid UB. This plugs a potential overread noted in the compat shim that was just added. Reviewed by: des Sponsored by: Klara, Inc. (cherry picked from commit f268f95955f5f0f91f4d39e13bcd69a24e0d8ce4) --- lib/libutil/tests/trimdomain_test.c | 4 +++- lib/libutil/trimdomain.c | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/libutil/tests/trimdomain_test.c b/lib/libutil/tests/trimdomain_test.c index ad5b92b0ce1e..c6305fa72ae9 100644 --- a/lib/libutil/tests/trimdomain_test.c +++ b/lib/libutil/tests/trimdomain_test.c @@ -78,11 +78,13 @@ int main(void) { - printf("1..5\n"); + printf("1..6\n"); testit(TESTFQDN, -1, TESTHOST, "self"); testit("XXX" TESTDOMAIN, -1, "XXX", "different host, same domain"); testit("XXX" TESTDOMAIN, 1, NULL, "short hostsize"); + testit("XXX" TESTDOMAIN, strlen(TESTDOMAIN) + 256, "XXX", + "long hostsize"); testit("bogus.example.net", -1, NULL, "arbitrary host"); testit("XXX." TESTFQDN, -1, NULL, "domain is local hostname"); diff --git a/lib/libutil/trimdomain.c b/lib/libutil/trimdomain.c index 47297817a76f..a4d53deaa216 100644 --- a/lib/libutil/trimdomain.c +++ b/lib/libutil/trimdomain.c @@ -73,6 +73,12 @@ trimdomain(char *fullhost, size_t hostsize) if (domain[0] == '\0') return; + /* + * Clamp hostsize down if it's out-of-bounds of fullhost, to avoid any + * kind of out-of-bounds read in the below memchr(). + */ + hostsize = strnlen(fullhost, hostsize); + s = fullhost; end = s + hostsize + 1; if ((s = memchr(s, '.', (size_t)(end - s))) != NULL) { From nobody Thu Apr 23 13:49:08 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1crj1yxsz6ZlXH for ; Thu, 23 Apr 2026 13:49:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1crj03Nqz3Wv9 for ; Thu, 23 Apr 2026 13:49:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776952149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pdvOAVRwQ1YJiMRnmQYRsoST0dVwJTPlXVx4v0QKKOw=; b=RQYUK4Wn2jOYR6hcpiPNyObB8T00cLPOvHRiPq76UpFuHrautHRx5yXIkXsFnoV3l/oQoC OLd+u7SgPqcSmpNLiU4FXgkqVGG866pTOJ6/Mdicm/xtrJHFo3gynyk4vrSOR5+i2xmJQk 1R1NL2erBH/jR/ARpyizTefywZQrwD/I+/VO7KUKNwYKOvj6CKJIFVKmrMjzndsSk7wduh fi9q3XgNZyJfENgXdzdDrcM4/Aj0XCzCg2+44iqnBdfFfHn8isfHwIexmrJw23KzBwcbva SLq+e/EU0uT9wtzrtcwfjliRemE/WijEfP1JUTJBNZJPEIFFxPfwChEYH36GCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776952149; a=rsa-sha256; cv=none; b=AaWXKzY40hW+JCLo6Cpw4SyAz2OKDsUlMgYOYU3ql6cyXj6vpbxOcfvv4kffRco2UN6qlQ JQGCK//hzLFJ+56oZgekutC235l2cYx6OoG02xLo4UuuwNXTl46PR+SQjeLKE3M7/XpEBZ JunSjC3kmGkiiHdH2vztzWquFZ9l+N6CVPpuifTq84EM5C9S5CUzZjJBpFC5hs9PaCpYXU O0sW4DVX0WyTf3IxRCiK+Q1QPqagVfHG6uouGwL5E0RbX9/N4OrM1k/Rtgq7/6JGvzjTHV 4dpDOpt73rz3gmmfUuCCFfy3rhSP1rK6MMqQARIRn13aznZ0XoQyG91KB8QBsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776952149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pdvOAVRwQ1YJiMRnmQYRsoST0dVwJTPlXVx4v0QKKOw=; b=Jd3MeJjxubzJYiBXkG7oX0c61/up7NUjhbYb+zaexPMPSni62jMB/GoVj/hzl9rbpc5Irq obfRHhcWdkdgQEuuYVTxETpoNkGWtN1hyYOAJYOSfcoWptPbX2FDk9D2/ZC7UkBBVGrWA5 tKaqKJ/l9aUp1k3FuzQYIyKhgmmzTj+AD0QnWVLgfmW5ifiraRpau9RWKHfD2EO4OO6jtw 29Gu/U2Cvdu9fXskYyGhqSSOKTk1QytAKXfQ/K0kdzlvLEu0OLAfsV4tFxT37+r0Bl+C95 X5HybVt0s/Q0QCCz0RQfOl1ZGvjEBY4jj2cpihcDBOYUk68m+dOFovALU31zsg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1crh6fRXz4BD for ; Thu, 23 Apr 2026 13:49:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2153d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Apr 2026 13:49:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 5cbb1e05086c - stable/15 - find: add -xattr and -xttrname List-Id: Commits to the stable branches 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5cbb1e05086c2cb510a9b77a6979dfb42c0cf215 Auto-Submitted: auto-generated Date: Thu, 23 Apr 2026 13:49:08 +0000 Message-Id: <69ea2354.2153d.493aa0dd@gitrepo.freebsd.org> The branch stable/15 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=5cbb1e05086c2cb510a9b77a6979dfb42c0cf215 commit 5cbb1e05086c2cb510a9b77a6979dfb42c0cf215 Author: Kyle Evans AuthorDate: 2026-04-09 02:41:12 +0000 Commit: Kyle Evans CommitDate: 2026-04-23 13:48:44 +0000 find: add -xattr and -xttrname We use -xattr in our openrsync tests for convenience, and it seems like a good addition to FreeBSD. -xattr and -xattrname will both consult all available namespaces by default, but -xattrname allows filtering by namespace using a "user:" or "system:" prefix. Inspired by: https://github.com/apple-oss-distributions/shell_cmds Reviewed by: kib, rmacklem Sponsored by: Klara, Inc. (cherry picked from commit 22fba3a9d64140d80a9e2093cfc02c9c503b2e19) --- usr.bin/find/extern.h | 2 + usr.bin/find/find.1 | 23 +++++++++- usr.bin/find/function.c | 94 +++++++++++++++++++++++++++++++++++++++++ usr.bin/find/option.c | 2 + usr.bin/find/tests/find_test.sh | 80 +++++++++++++++++++++++++++++++++++ 5 files changed, 199 insertions(+), 2 deletions(-) diff --git a/usr.bin/find/extern.h b/usr.bin/find/extern.h index 02c85d06a34c..250b5fb6689c 100644 --- a/usr.bin/find/extern.h +++ b/usr.bin/find/extern.h @@ -122,6 +122,8 @@ exec_f f_sparse; exec_f f_type; exec_f f_user; exec_f f_writable; +exec_f f_xattr; +exec_f f_xattrname; extern int ftsoptions, ignore_readdir_race, isdepth, isoutput; extern int issort, isxargs; diff --git a/usr.bin/find/find.1 b/usr.bin/find/find.1 index 98521a98762d..afe10a36607d 100644 --- a/usr.bin/find/find.1 +++ b/usr.bin/find/find.1 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 26, 2025 +.Dd February 14, 2026 .Dt FIND 1 .Os .Sh NAME @@ -976,6 +976,23 @@ This test makes use of the .Xr access 2 system call, and so can be fooled by NFS servers which do UID mapping (or root-squashing). This is a GNU find extension. +.It Ic -xattr +Matches files which have extended attributes set in any supported namespace. +.It Ic -xattrname Ar xattr +Matches files which have the specified +.Ar xattr +extended attribute set. +All supported namespaces are searched by default, but +.Ar xattr +may be prefixed with +.Dq user: +or +.Dq system: +to filter by namespace. +.Pp +Note that named attributes are not supported, only extended attributes as set +by, e.g., +.Xr setextattr 8 . .El .Sh OPERATORS The primaries may be combined using the following operators. @@ -1245,6 +1262,7 @@ section below for details. .Xr whereis 1 , .Xr which 1 , .Xr xargs 1 , +.Xr extattr 2 , .Xr stat 2 , .Xr acl 3 , .Xr fts 3 , @@ -1253,7 +1271,8 @@ section below for details. .Xr strmode 3 , .Xr ascii 7 , .Xr re_format 7 , -.Xr symlink 7 +.Xr symlink 7 , +.Xr setextattr 8 .Sh STANDARDS The .Nm diff --git a/usr.bin/find/function.c b/usr.bin/find/function.c index b260a71ef4a9..c62ac39a9e82 100644 --- a/usr.bin/find/function.c +++ b/usr.bin/find/function.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -49,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -57,6 +59,8 @@ #include "find.h" +static const char * const xattr_ns[] = EXTATTR_NAMESPACE_NAMES; + static PLAN *palloc(OPTION *); static long long find_parsenum(PLAN *, const char *, char *, char *); static long long find_parsetime(PLAN *, const char *, char *); @@ -1752,6 +1756,96 @@ c_user(OPTION *option, char ***argvp) return new; } +/* + * -xattr functions -- + * + * True if the entry has any extended attribute in any namespace. + */ +int +f_xattr(PLAN *plan __unused, FTSENT *entry) +{ + ssize_t asz; + bool deref_link; + + deref_link = (ftsoptions & FTS_LOGICAL) != 0; + if (entry->fts_level == 0 && (ftsoptions & FTS_COMFOLLOW) != 0) + deref_link = true; + + for (size_t ns = 0; ns < nitems(xattr_ns); ns++) { + if (ns == EXTATTR_NAMESPACE_EMPTY) + continue; + + if (deref_link) + asz = extattr_list_file(entry->fts_accpath, ns, NULL, 0); + else + asz = extattr_list_link(entry->fts_accpath, ns, NULL, 0); + if (asz > 0) + return 1; + } + + return 0; +} + +static bool +find_has_xattr(const char *path, int ns, const char *aname, bool deref_link) +{ + size_t asz; + + if (deref_link) + asz = extattr_get_file(path, ns, aname, NULL, 0); + else + asz = extattr_get_link(path, ns, aname, NULL, 0); + + return asz != (size_t)-1; +} + +/* + * -xattrname xattr functions -- + * + * True if the entry has the given extended attribute xattr. The xattr + * may be prefixed with "user:" or "system:" to scope the search + * explicitly, otherwise we assume the user namespace is requested. + */ +int +f_xattrname(PLAN *plan, FTSENT *entry) +{ + const char *aname; + bool deref_link; + + deref_link = (ftsoptions & FTS_LOGICAL) != 0; + if (entry->fts_level == 0 && (ftsoptions & FTS_COMFOLLOW) != 0) + deref_link = true; + + aname = plan->c_data; + for (size_t ns = 0; ns < nitems(xattr_ns); ns++) { + const char *name; + size_t namelen; + + if (ns == EXTATTR_NAMESPACE_EMPTY) + continue; + + name = xattr_ns[ns]; + namelen = strlen(xattr_ns[ns]); + if (strncmp(aname, name, namelen) == 0 && + aname[namelen] == ':') { + aname += namelen + 1; + return find_has_xattr(entry->fts_accpath, ns, aname, + deref_link); + } + } + + for (size_t ns = 0; ns < nitems(xattr_ns); ns++) { + if (ns == EXTATTR_NAMESPACE_EMPTY) + continue; + + if (find_has_xattr(entry->fts_accpath, ns, aname, + deref_link)) + return 1; + } + + return 0; +} + /* * -xdev functions -- * diff --git a/usr.bin/find/option.c b/usr.bin/find/option.c index fa09231a3152..fe3d9b00f90f 100644 --- a/usr.bin/find/option.c +++ b/usr.bin/find/option.c @@ -162,6 +162,8 @@ static OPTION const options[] = { { "-user", c_user, f_user, 0 }, { "-wholename", c_name, f_path, 0 }, { "-writable", c_simple, f_writable, 0 }, + { "-xattr", c_simple, f_xattr, 0 }, + { "-xattrname", c_name, f_xattrname, 0 }, { "-xdev", c_xdev, f_always_true, 0 }, // -xtype }; diff --git a/usr.bin/find/tests/find_test.sh b/usr.bin/find/tests/find_test.sh index 99d2f6af4d45..deb6a66a8dfb 100755 --- a/usr.bin/find/tests/find_test.sh +++ b/usr.bin/find/tests/find_test.sh @@ -174,9 +174,89 @@ find_printf_body() find -s dir -printf '%Te\n' } +atf_test_case find_xattr +find_xattr_head() +{ + atf_set "descr" "Test the -xattr primary" +} +find_xattr_body() +{ + mkdir dir + ln -s dir dirlink + + # No xattrs here + atf_check find dir -xattr + atf_check find dirlink -xattr + + # Set one on the directory and be sure that we also dereference symlinks + # as appropriate with -H/-L. + if ! setextattr user find_test.attr val dir; then + atf_skip "Failed to set xattr (not supported on this fs?)" + fi + + atf_check -o match:"dir$" find dir -xattr + atf_check -o match:"dirlink$" find -H dirlink -xattr + atf_check -o match:"dirlink$" find -L dirlink -xattr + + atf_check -o match:"dir$" -o match:"dirlink" find -sL . -xattr + atf_check -o match:"dir$" -o not-match:"dirlink$" find -sH . -xattr + atf_check -o match:"dir$" -o not-match:"dirlink$" find -s . -xattr +} + +atf_test_case find_xattrname +find_xattrname_head() +{ + atf_set "descr" "Test the -xattrname primary" + atf_set "require.user" "root" +} +find_xattrname_body() +{ + touch foo bar baz none + + ln -s foo link + if ! setextattr user find_test.special1 val foo; then + atf_skip "Failed to set xattr (not supported on this fs?)" + fi + + atf_check setextattr user find_test.special2 val bar + atf_check setextattr user find_test.special2 val baz + + # We want an unqualified 'find_test.special2' search to find all three + # of these, while 'user:' and 'system:' filter appropriately. + atf_check setextattr system find_test.special2 val foo + + atf_check find . -xattrname 'find_test.special3' + + # Be sure that we get symlink dereferencing right, so that one can use + # -H/-L/-P to get the right behavior. + atf_check -o match:foo -o not-match:"bar|baz|link|none" \ + find . -xattrname 'find_test.special1' + atf_check -o match:foo -o match:link \ + find -H foo link -xattrname 'find_test.special1' + atf_check -o match:foo -o match:link -o not-match:"bar|baz|none" \ + find -L . -xattrname 'find_test.special1' + + atf_check -o match:foo -o match:bar -o match:baz \ + -o not-match:"none|link" find . -xattrname 'find_test.special2' + atf_check -o not-match:"foo|none|link" -o match:bar -o match:baz \ + find . -xattrname 'user:find_test.special2' + atf_check -o match:foo -o not-match:"bar|baz|none|link" \ + find . -xattrname 'system:find_test.special2' + + # Now set an extattr on the link itself and be sure that find(1) can + # detect it. With -L, we shouldn't see anything with a special3 xattr + # as symlinks are dereferenced. + atf_check setextattr -h user find_test.special3 val link + atf_check -o match:link find . -xattrname "find_test.special3" + atf_check find -L . -xattrname "find_test.special3" + atf_check find -H link -xattrname "find_test.special3" +} + atf_init_test_cases() { atf_add_test_case find_newer_link atf_add_test_case find_samefile_link atf_add_test_case find_printf + atf_add_test_case find_xattr + atf_add_test_case find_xattrname } From nobody Thu Apr 23 13:49:10 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1crk6FPXz6ZllM for ; Thu, 23 Apr 2026 13:49:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1crk1PcNz3Wgq for ; Thu, 23 Apr 2026 13:49:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776952150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=STQs7CHX3yj4OHbAtjCqRDuKexl8b1fjOepEi/JOvsw=; b=bejpIVWwulCndz3LoD+nRgriDQ9vquyOrlUrNVDSUmQbJMPQlzAyowepE6Z8R+I6fbb2oT O3Ptm96b4PuhXtRMD1E1kVZy8eJ9sOkelQ/Rn9o50LSbGDlmrvrbg/DwzUxhtwGRPajgy+ KvnQKcWHmAOP0USLDwEnMdvINEX+m2m+IKZ7/+nlNcLlJR3qNeSZRL1fnFbMctboKFwVYZ xDJknvHG5mn1AWvIddV74tah/Uu33WNRmI9bQwMrHDc/M4/3q/Wh6mg9sbgyWiqaMb+N5O u8xY+aqCsYa2BpAoyOyMvadqEJnIjSNFuKBpYyIp9sD+K+VnQGh2XPKx+rN+/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776952150; a=rsa-sha256; cv=none; b=TXCtoO/qyPBXgHMO0UytXqs8PghUfKUGkNIJNu5Ybrv78fATMmnvZpHT0B3VQ7gFYNuoG+ 1wDKOmAfPk9dNkSjcnYA8AMKtjMA8dzaI/8hj9mg0JU+duQ4o+6Ou++KJGE2yl4dMpw/4j WEAvJblTyb02n01h552UX59RNJTlqwTcEoQ7Ce63I0G/VtzOdynNaXJMIkeFh+TfVOiNoI 86zuJ0p5he4BCgFgwQJzCRZ/7A6T7mnnTivTZaS4cFQQSX1OHTx0o7p0TeXkHnZUtl3l0S 5cQks0UOSaKuHYF6KRu/vM4AX6L8GpAdU207c3SqlN7mK7Uhs9xlzCeJRWOmQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776952150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=STQs7CHX3yj4OHbAtjCqRDuKexl8b1fjOepEi/JOvsw=; b=gBN11nLMrUnPOx7vFFGDDj3TFXuxeD2NJZFPsiWJAe+mT3vf6xkfiX6ZvpjcxtlNUjmy/f jnCV9unZKn7pjcXMGPXg3IsTEpVarzikbreV9ucADlIVLtMQ3QdwtWQVxbu4lMwJVZdjnG Axd2FWujuc1JzXkGngRWqHVcwBGM3uQagtuAzrRo8dqD58Yg9mrZY3qtJOlcYdm1lluKsn CQIQgQgWrOYWl2f8nJJckRnADTEyRCWPUyv6NutAmbemnVe2y9tzQhlBL1wD+Qce1zW6/s ex1jqU0JY7R/ruex00Rk1KNsixHHzSvjHAGd6wz2RP29VD6wIGXDHrQQrcTJbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1crk0K2mz4BF for ; Thu, 23 Apr 2026 13:49:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21b66 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Apr 2026 13:49:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: ca19c9296ad6 - stable/15 - : use designated initializers for EXTATTR_NAMESPACE_NAMES List-Id: Commits to the stable branches 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ca19c9296ad657216286f78ab23422f52ab6a073 Auto-Submitted: auto-generated Date: Thu, 23 Apr 2026 13:49:10 +0000 Message-Id: <69ea2356.21b66.2a848037@gitrepo.freebsd.org> The branch stable/15 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=ca19c9296ad657216286f78ab23422f52ab6a073 commit ca19c9296ad657216286f78ab23422f52ab6a073 Author: Kyle Evans AuthorDate: 2026-04-09 02:41:12 +0000 Commit: Kyle Evans CommitDate: 2026-04-23 13:48:44 +0000 : use designated initializers for EXTATTR_NAMESPACE_NAMES This is not a functional change, but it makes it more clear upon inspection of the definition that the mapping property described is preserved. Maybe more importantly, if one ends up getting an index wrong or punching a hole in the name array unexpectedly, then it'll hopefully manifest more clearly as a (null) or nullptr deref rather than potentially just emitting the wrong namespace name. It's noted that this almost certainly invalidates its use in C++, but there aren't really any known C++ consumers of it- let's just cross that bridge if we get there. Reviewed by: kib, mckusick, rmacklem Sponsored by: Klara, Inc. (cherry picked from commit 84ce651836e0d037f611cd33a5c65e1d57049432) --- sys/sys/extattr.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/sys/extattr.h b/sys/sys/extattr.h index a16ef238656f..63c0d850599b 100644 --- a/sys/sys/extattr.h +++ b/sys/sys/extattr.h @@ -53,9 +53,9 @@ * char *extattr_namespace_names[] = EXTATTR_NAMESPACE_NAMES; */ #define EXTATTR_NAMESPACE_NAMES { \ - EXTATTR_NAMESPACE_EMPTY_STRING, \ - EXTATTR_NAMESPACE_USER_STRING, \ - EXTATTR_NAMESPACE_SYSTEM_STRING } + [EXTATTR_NAMESPACE_EMPTY] = EXTATTR_NAMESPACE_EMPTY_STRING, \ + [EXTATTR_NAMESPACE_USER] = EXTATTR_NAMESPACE_USER_STRING, \ + [EXTATTR_NAMESPACE_SYSTEM] = EXTATTR_NAMESPACE_SYSTEM_STRING } #define EXTATTR_MAXNAMELEN NAME_MAX From nobody Thu Apr 23 13:49:11 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1crl5F1jz6ZlTk for ; Thu, 23 Apr 2026 13:49:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1crl1XYTz3XB7 for ; Thu, 23 Apr 2026 13:49:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776952151; h=from:from:reply-to:subject:subject: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/yvfi3nJkyFp1NMVNVdzDqrgSuZN8shBQuwPvF7MNw=; b=QghH13QmTwVwxzBwoMutwFqmi1AzvnGSuYv8Bc7pU5ocAt3Uj5fzUz6EQK04allndAL82i RknNZlYQBVA+yDU3dkaTceDi/wgvODjpJb8n+80XPINP97Ch4wGEOsRj5z2td4BggFUUOF v5M/9gjj0ffuFAdh4u9h5LCoWrY2Vvm8I34YxdxgXRJX+BEp/U4IT5clvfBggvrnqiTINw HWhWbP25l2XO4/Pvypbpi2PQu8uTTvJV8kQfYXOqcHEwFYHNBps7+l3c2EZ9TNRM2qa6tO 5GLOamm7HzYm6H60OnyXokxj2kPrfT8M980raiR0KQGGnfZiX8GKiiNLhOJqAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776952151; a=rsa-sha256; cv=none; b=HwTez2nmdVHn1aS1rbWOIRt5S7xjvwyTKp9gc31Iq+LR2mSEaO5In4Ar74f2urp+Rg/7wy 3LbmE61dcVlhJFIZuGzYVhLUPvjZSNHK/wEX6cgASzcX1G6iocMoS/ocz90/+BwADw6P3U 1agY02GK3UhucK2QEvFdcOg8xqqr/FMnF6x4F9r3LQE2lO0RvpSARj1DVxse1o2ts8XdbO Axg+Fny2UDFrj5ELoSIZXD1B8y7eQfPvdmyEttNcWGQdf6cOhd4vEaW3wRwk2PaT8ZAtaO KGLdWU8ywDkPNcXNwuJSUo+Hgoxq5o0z2fGBTs/z9k5J/qbrmL2n+skgk4ZqhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776952151; h=from:from:reply-to:subject:subject: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/yvfi3nJkyFp1NMVNVdzDqrgSuZN8shBQuwPvF7MNw=; b=GmTkh9Af8BiMi5ysQuZyt+cchSKihYFhXzP7mMkoi9XuZln5Aci99TCsPAva/C6fwrhjH/ qYa2vUpGYSpiSl+JXA1IGQnvGLKAFP02TuB+f6+AQHCX0pHtmftEaZQyeOw4daSV3cN8WE oSrbTFaeOaQyk3af3Yvnjrt5sk3nvsnXn5vNEtSYsSGepcT88vu7Ez+WUL5COQFoQAF/Qk t+HqCoORs1kkXd2dN7JP0+xtt2rDmW+6WSpMtl9dLb7Sl1+uMVdxDNO7bdD/vuprXtn4Xv z58wr+yc7hYEUUMSGoEUWz2MRWcXq7EhgLBDQNG0mEB7u6R+GsPoaEE3I+gTQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1crl16Cnz4BG for ; Thu, 23 Apr 2026 13:49:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21dc4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Apr 2026 13:49:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 09fe5cc789d5 - stable/15 - tests: kqueue: improve diagnostics for our CPONFORK 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 09fe5cc789d5eaa2ed98535a1b3efd5e7366cfe3 Auto-Submitted: auto-generated Date: Thu, 23 Apr 2026 13:49:11 +0000 Message-Id: <69ea2357.21dc4.4fdf0738@gitrepo.freebsd.org> The branch stable/15 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=09fe5cc789d5eaa2ed98535a1b3efd5e7366cfe3 commit 09fe5cc789d5eaa2ed98535a1b3efd5e7366cfe3 Author: Kyle Evans AuthorDate: 2026-04-17 03:57:06 +0000 Commit: Kyle Evans CommitDate: 2026-04-23 13:48:45 +0000 tests: kqueue: improve diagnostics for our CPONFORK test Notably, confirm in the child that our close-on-fork fd is actually closed, and break RECV_ALL out into a table and check each bit individually to provide a better message when the test fails. While we're here, just switch to waitid() rather than trying to identify the point where we have to make the switch. This reduces maintenance slightly, as keeping our assertion static would require still adding to a _RECV_ALL mask *just* for that purpose. Reviewed by: kib, markj (both slightly earlier version) (cherry picked from commit 51d2c38010824b90d7462711896a88165db9d015) --- tests/sys/kqueue/kqueue_fork.c | 71 +++++++++++++++++++++++++++++++++++------- 1 file changed, 60 insertions(+), 11 deletions(-) diff --git a/tests/sys/kqueue/kqueue_fork.c b/tests/sys/kqueue/kqueue_fork.c index 6f517a2e0e29..ad8f69056e07 100644 --- a/tests/sys/kqueue/kqueue_fork.c +++ b/tests/sys/kqueue/kqueue_fork.c @@ -92,21 +92,68 @@ ATF_TC_BODY(shared_table_filt_sig, tc) #define RECV_VNODE 0x02 #define RECV_CLOREAD 0x04 #define RECV_ERROR 0x80 -#define RECV_ALL (RECV_TIMER | RECV_VNODE) + +static const struct cponfork_recv { + const char *recv_error_desc; + unsigned int recv_bit; + bool recv_parent_only; +} cponfork_recv[] = { + { "EVFILT_TIMER did not fire", RECV_TIMER, false }, + { "EVFILT_VNODE expected with creation of canary", RECV_VNODE, false }, + { "EVFILT_READ received for fd closed on fork", RECV_CLOREAD, true }, +}; + +static void +cponfork_notes_mask_check(unsigned int mask, bool childmask) +{ + const struct cponfork_recv *rcv; + unsigned int expect; + + ATF_REQUIRE(mask != RECV_ERROR); + for (size_t i = 0; i < nitems(cponfork_recv); i++) { + rcv = &cponfork_recv[i]; + + expect = childmask && rcv->recv_parent_only ? 0 : rcv->recv_bit; + ATF_REQUIRE_EQ_MSG(expect, mask & rcv->recv_bit, + "%s (%s, mask %x)", rcv->recv_error_desc, + childmask ? "child" : "parent", + mask); + } +} + +static unsigned int +cponfork_notes_mask(bool inchild) +{ + const struct cponfork_recv *rcv; + unsigned int mask = 0; + + for (size_t i = 0; i < nitems(cponfork_recv); i++) { + rcv = &cponfork_recv[i]; + + if (!inchild || !rcv->recv_parent_only) + mask |= rcv->recv_bit; + } + + ATF_REQUIRE(mask != 0); + return (mask); +} static int cponfork_notes_check(int kq, int clofd) { struct kevent ev; + unsigned int mask; int error, received = 0; + mask = cponfork_notes_mask(true); + EV_SET(&ev, TIMER_TIMEOUT, EVFILT_TIMER, EV_ADD | EV_ENABLE | EV_ONESHOT, NOTE_SECONDS, 4, NULL); error = kevent(kq, &ev, 1, NULL, 0, NULL); if (error == -1) return (RECV_ERROR); - while ((received & RECV_ALL) != RECV_ALL) { + while ((received & mask) != mask) { error = kevent(kq, NULL, 0, &ev, 1, NULL); if (error < 0) return (RECV_ERROR); @@ -138,7 +185,8 @@ ATF_TC_WITHOUT_HEAD(cponfork_notes); ATF_TC_BODY(cponfork_notes, tc) { struct kevent ev[3]; - int clofd, dfd, error, kq, pdfd, pmask, status; + siginfo_t info; + int clofd, dfd, error, kq, pdfd, pmask; pid_t pid; kq = kqueuex(KQUEUE_CPONFORK); @@ -164,8 +212,8 @@ ATF_TC_BODY(cponfork_notes, tc) /* * Every event we setup here we should expect to observe in both the * child and the parent, with exception to the EVFILT_READ of clofd. We - * except that one to be dropped in the child when the kqueue it's - * attached to goes away, thus its exclusion from the RECV_ALL mask. + * expect that one to be dropped in the child when the kqueue it's + * attached to goes away, thus its exclusion from the child mask. */ EV_SET(&ev[0], dfd, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_ONESHOT, NOTE_WRITE, 0, NULL); @@ -195,6 +243,9 @@ ATF_TC_BODY(cponfork_notes, tc) else if (kf.kf_type != KF_TYPE_KQUEUE) _exit(RECV_ERROR); + if (fcntl(clofd, F_KINFO, &kf) != -1 || errno != EBADF) + _exit(RECV_ERROR); + _exit(cponfork_notes_check(kq, clofd)); } @@ -209,15 +260,13 @@ ATF_TC_BODY(cponfork_notes, tc) * still fire twice (once in parent, once in child). */ pmask = cponfork_notes_check(kq, clofd); - ATF_REQUIRE_EQ(pmask, RECV_ALL | RECV_CLOREAD); + cponfork_notes_mask_check(pmask, false); /* Wait for the child to timeout or observe the timer. */ - _Static_assert(RECV_ALL <= UCHAR_MAX, - "Too many events to observe -- switch from waitpid -> waitid"); - error = waitpid(pid, &status, 0); + error = waitid(P_PID, pid, &info, WEXITED); ATF_REQUIRE(error != -1); - ATF_REQUIRE(WIFEXITED(status)); - ATF_REQUIRE_EQ(WEXITSTATUS(status), RECV_ALL); + ATF_REQUIRE_EQ(CLD_EXITED, info.si_code); + cponfork_notes_mask_check(info.si_status, true); } ATF_TP_ADD_TCS(tp) From nobody Thu Apr 23 13:49:12 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1crm3Dpgz6Zld1 for ; Thu, 23 Apr 2026 13:49:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1crm2Hcfz3XBH for ; Thu, 23 Apr 2026 13:49:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776952152; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BUgfjkB4J2XzLuGv2BuUagERSLhv6d4eV+aQk0g49Ko=; b=mXM56DczBMcdEOTKqm6eDwhy+1yp6VCE9UCfk8QOoh6UglJzh+MvqenloXhlm7v35JGz3b zQ3lpFAh0gKGsQwtDjjiIAJPo05ZHd3vZYKKfXKe7NNwM8413eJuWZtipAKUr5eh400jhP Ao6SYc918M34CSEFPbt+1mNU89Bjj6DHGKFX2pVXFrLDnPcTKpZISUeJw7O/ofd8TO+xO1 G2gZ9D1KlVZUVID4VjPqN/FVxupzEtPbrfM4xlN7uBGJJ8ljUL+xYuS4b19ggQwsa5K3DH AzfcnbEcfYRrqtCsYIfnEs0D93agpZ6WNvthym14Q4I5lx+wODkfUdmgjjsXrA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776952152; a=rsa-sha256; cv=none; b=UJp1HOxZ6Dbvc4gPmNwJNt/3/9GLXKcQgaNAhkiUV2P9guQei/U/B49hdpvxs6kT/5DMMx JI0cRnEpBejhDNq0SY5/Hv8bqB7KaC78h6O+mRTNylcwQgq6IU6UJnyoQXNcq7wdX95Hrv VWvoEgFaTPfYwlzPytAuLhHCwxb1Sq8JaCFtvZfJKF5Tbk86FXQoaLwBzCR+50ubBzDP/H +lbN9zpbZ4JjhdlR5cEtX/oatgcWGXnFUHh42cJwfDSRNcPezBLyQiwFKZBhncQiodjQuQ CtuK4yBwJPI6uxzIV9USH43ITm8XqrzATXw9Ax1gN+aKbWJOAwNrU1CtdYP+dw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776952152; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BUgfjkB4J2XzLuGv2BuUagERSLhv6d4eV+aQk0g49Ko=; b=YrbFO1e//THSqZT1uCQZcT1IbWZ9WT8cApB9FdFKRQBj8h2zDl1yH8nAQpZtAybek4J/yY Ul1eH1hlNy8ZzylXu26l5ZIt5Rq/0Zq1xmpUSh/nkvvSZSsiboiENVV9z485FN8p1ginNL 9qY0I595oGx/fvKDecRhgH1SoIBM972nFuCIXYjBuNjxd2a6RnHYpdQwHzjya9IsOGLVvL 1Y5b04Ug5hwfn26V5hpwCueYHau1esHunZEd5z3prw96I0z2UOrUDu0yCUvJWcwFQ0iAQ0 29AjiSU+GkWGMjWLlGTs+GfzA1SHZnJMuz9IeV/lG6AF/7bZ2FXSwEV7cYpdeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1crm1rqbz42t for ; Thu, 23 Apr 2026 13:49:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21cfc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Apr 2026 13:49:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 280cfe2264d7 - stable/15 - amd64: fix INVLPGB range invalidation List-Id: Commits to the stable branches 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 280cfe2264d7bf2199e5a41bdcbb9acb49d059c1 Auto-Submitted: auto-generated Date: Thu, 23 Apr 2026 13:49:12 +0000 Message-Id: <69ea2358.21cfc.11b04d9f@gitrepo.freebsd.org> The branch stable/15 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=280cfe2264d7bf2199e5a41bdcbb9acb49d059c1 commit 280cfe2264d7bf2199e5a41bdcbb9acb49d059c1 Author: Kyle Evans AuthorDate: 2026-04-20 20:18:17 +0000 Commit: Kyle Evans CommitDate: 2026-04-23 13:48:45 +0000 amd64: fix INVLPGB range invalidation AMD64 Architecture Programmer's Manual Volume 3 says the following: > ECX[15:0] contains a count of the number of sequential pages to > invalidate in addition to the original virtual address, starting from > the virtual address specified in rAX. A count of 0 invalidates a > single page. ECX[31]=0 indicates to increment the virtual address at > the 4K boundary. ECX[31]=1 indicates to increment the virtual address > at the 2M boundary. The maximum count supported is reported in > CPUID function 8000_0008h, EDX[15:0]. ECX[31] being what we call INVLPGB_2M_CNT, signaling to increment the VA by 2M. > This instruction invalidates the TLB entry or entries, regardless of > the page size (4 Kbytes, 2 Mbytes, 4 Mbytes, or 1 Gbyte). [...] Combined with this, my interpretation of the current code is: if is aligned on a PDE boundary, we'll use INVLPGB_2M_CNT to try and invalidate PDEs with a single call, but that only works if is the start of at least 2M pages. Otherwise, if or any of the subsequent PDEs isn't actually a superpage, then we would actually only invalidate the *first* page within the PDE before skipping to the next PDE, leaving the remainder of the 4K pages in between as they were. The implication would seem to be that we would need to inspect the range that we're trying to invalidate if we're planning on using INVLPGB_2M_CNT at all, so this patch just simplifies it to a series of 4K invalidations. My gut feeling is that we likely still come out on top vs. the TLB shootdown we're avoiding. This seems to explain some issues we've seen lately with fdgrowtable() and kqueue on recent Zen4/Zen5 EPYC hardware, where we'd experience corruption that we can't explain. PR: 293382 Reviewed by: alc, kib, markj (cherry picked from commit 1b8e5c02f5c07521129e06ff8ab7c660238fd75c) --- sys/amd64/amd64/mp_machdep.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 91f725c93158..1de6fe9227c7 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -726,25 +726,12 @@ smp_masked_invlpg_range(vm_offset_t addr1, vm_offset_t addr2, pmap_t pmap, addr2 = round_page(addr2); total = atop(addr2 - addr1); for (va = addr1; total > 0;) { - if ((va & PDRMASK) != 0 || total < NPDEPG) { - cnt = atop(NBPDR - (va & PDRMASK)); - if (cnt > total) - cnt = total; - if (cnt > invlpgb_maxcnt + 1) - cnt = invlpgb_maxcnt + 1; - invlpgb(INVLPGB_GLOB | INVLPGB_VA | va, 0, - cnt - 1); - va += ptoa(cnt); - total -= cnt; - } else { - cnt = total / NPTEPG; - if (cnt > invlpgb_maxcnt + 1) - cnt = invlpgb_maxcnt + 1; - invlpgb(INVLPGB_GLOB | INVLPGB_VA | va, 0, - INVLPGB_2M_CNT | (cnt - 1)); - va += cnt << PDRSHIFT; - total -= cnt * NPTEPG; - } + cnt = MIN(total, invlpgb_maxcnt + 1); + /* 4K increments because these may not be superpages. */ + invlpgb(INVLPGB_GLOB | INVLPGB_VA | va, 0, + cnt - 1); + va += ptoa(cnt); + total -= cnt; } tlbsync(); sched_unpin(); From nobody Thu Apr 23 13:49:26 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1cs33F1yz6ZljV for ; Thu, 23 Apr 2026 13:49:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1cs30NSgz3XWV for ; Thu, 23 Apr 2026 13:49:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776952167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=osoanKBERZdUoGcztq/nT/psg60OgZLw4V0iRSnUfa4=; b=jSKymASriKUPzbWhk+dsa/M6KPUOQuaxxbXZ4TE4pVj10KLfWVyCzmJgw+ykeswlkHoiJe aXK013u54jnfizTSg12RCO2eLPioj3nLUH1VyCRZfC2vEeFbHxgDx71zQ7TTcsTvsrQbeZ 7rzdLGdwsBFh71iWf6zW7OeAT/N1DzcRg+r5m3fyhnarvfXrhHKBW+Og/y6OtrYjNpM9Cf nPI2Q+HrtfqotwlYD4ay4+q297O3gT5lZAzhAy2xDo+wrFFRCzp72XlrDYBMcXjfOZpq8g HumEYFxBFyQeuPHa2u2DRSnG8LBO/grNJsuDRvy5ZStKb5NsNzg3teWdsOhRnA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776952167; a=rsa-sha256; cv=none; b=eEx65+YOEZk5uUE2/FmEkugW6lWxadAfIH5hP0NG8lQf5x5SHTJX21ap1KI9Pb5b79IVii QFODMvsVkgC5+XhvNUNMYUZE6Mt/63fZ3qzQulYYj+MziREsnHriycYXAGivgY8AaJEiJ1 W+sXsg89Z+6PM8qTbfrf1QnbS2o5DdP51JvuNd+3UnfPmhKWjEB4c/4crrvqmo1OpxE1SU HnA0NtjhIER4tO2z+vBA2oJpcNWkUIkuBJ7eq2rFLkKr43DAMXl05LYYnz86GBSlPpKTs6 m2Vu2izj7Rc4wSR2x/k/YeL+EDpUteEC6D1yKPNr2ERy1VVOfD46jcJWaK35Bg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776952167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=osoanKBERZdUoGcztq/nT/psg60OgZLw4V0iRSnUfa4=; b=iNgURjK0ns9XgjJCbUtmPEH55xjqGCRex3rbZfBvw099PULMK8vO9P2sc648ndIb/84jq8 K0eit//cD3hdzIoZx9Tc2cxparXM4PwOuwbn5HPONLMqC2TI4wvpURYCfBhMA31l/LSLpK y3+2ZAdJqfUbEToEePQjdvWiLMWzUpBIqWVXA3FBx8/wrGD/+L+EpnT25JUJW7eIAvQELL 3cm6XygeMgL4rHLVYTjjrO8tRSCjSiOTXwVd0TW8DZXZ7XuElPKar1JGPyAxaHvY7A47yR tyJOxYxj2gDNGfT40ow9QqFmsefV/rGGjfSFWr8UbKeouhGFk2aJr1w6uetoog== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1cs26mg6z3sC for ; Thu, 23 Apr 2026 13:49:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2315f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Apr 2026 13:49:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: ff11ae166cd9 - stable/14 - amd64: fix INVLPGB range invalidation List-Id: Commits to the stable branches 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ff11ae166cd9f8ae16a5c384d46aa1218f3ff013 Auto-Submitted: auto-generated Date: Thu, 23 Apr 2026 13:49:26 +0000 Message-Id: <69ea2366.2315f.220702c5@gitrepo.freebsd.org> The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=ff11ae166cd9f8ae16a5c384d46aa1218f3ff013 commit ff11ae166cd9f8ae16a5c384d46aa1218f3ff013 Author: Kyle Evans AuthorDate: 2026-04-20 20:18:17 +0000 Commit: Kyle Evans CommitDate: 2026-04-23 13:49:23 +0000 amd64: fix INVLPGB range invalidation AMD64 Architecture Programmer's Manual Volume 3 says the following: > ECX[15:0] contains a count of the number of sequential pages to > invalidate in addition to the original virtual address, starting from > the virtual address specified in rAX. A count of 0 invalidates a > single page. ECX[31]=0 indicates to increment the virtual address at > the 4K boundary. ECX[31]=1 indicates to increment the virtual address > at the 2M boundary. The maximum count supported is reported in > CPUID function 8000_0008h, EDX[15:0]. ECX[31] being what we call INVLPGB_2M_CNT, signaling to increment the VA by 2M. > This instruction invalidates the TLB entry or entries, regardless of > the page size (4 Kbytes, 2 Mbytes, 4 Mbytes, or 1 Gbyte). [...] Combined with this, my interpretation of the current code is: if is aligned on a PDE boundary, we'll use INVLPGB_2M_CNT to try and invalidate PDEs with a single call, but that only works if is the start of at least 2M pages. Otherwise, if or any of the subsequent PDEs isn't actually a superpage, then we would actually only invalidate the *first* page within the PDE before skipping to the next PDE, leaving the remainder of the 4K pages in between as they were. The implication would seem to be that we would need to inspect the range that we're trying to invalidate if we're planning on using INVLPGB_2M_CNT at all, so this patch just simplifies it to a series of 4K invalidations. My gut feeling is that we likely still come out on top vs. the TLB shootdown we're avoiding. This seems to explain some issues we've seen lately with fdgrowtable() and kqueue on recent Zen4/Zen5 EPYC hardware, where we'd experience corruption that we can't explain. PR: 293382 Reviewed by: alc, kib, markj (cherry picked from commit 1b8e5c02f5c07521129e06ff8ab7c660238fd75c) --- sys/amd64/amd64/mp_machdep.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 8f3d339d9dc7..015f23f75df5 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -727,25 +727,12 @@ smp_masked_invlpg_range(vm_offset_t addr1, vm_offset_t addr2, pmap_t pmap, addr2 = round_page(addr2); total = atop(addr2 - addr1); for (va = addr1; total > 0;) { - if ((va & PDRMASK) != 0 || total < NPDEPG) { - cnt = atop(NBPDR - (va & PDRMASK)); - if (cnt > total) - cnt = total; - if (cnt > invlpgb_maxcnt + 1) - cnt = invlpgb_maxcnt + 1; - invlpgb(INVLPGB_GLOB | INVLPGB_VA | va, 0, - cnt - 1); - va += ptoa(cnt); - total -= cnt; - } else { - cnt = total / NPTEPG; - if (cnt > invlpgb_maxcnt + 1) - cnt = invlpgb_maxcnt + 1; - invlpgb(INVLPGB_GLOB | INVLPGB_VA | va, 0, - INVLPGB_2M_CNT | (cnt - 1)); - va += cnt << PDRSHIFT; - total -= cnt * NPTEPG; - } + cnt = MIN(total, invlpgb_maxcnt + 1); + /* 4K increments because these may not be superpages. */ + invlpgb(INVLPGB_GLOB | INVLPGB_VA | va, 0, + cnt - 1); + va += ptoa(cnt); + total -= cnt; } tlbsync(); sched_unpin(); From nobody Thu Apr 23 17:09:35 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1jHz4ZmYz6b7p5 for ; Thu, 23 Apr 2026 17:09:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1jHz31rQz3DxF for ; Thu, 23 Apr 2026 17:09:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776964175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FawUqTqW0GHjn1/RC/9R7pcQ1Pbn3H6o564kkrRN9eo=; b=RjUZzuFopDShS/lBgL0rvMpOiSpXevx8IVCr7xVQAnXd8dj4QOZk3Lf0o3wdCvNzaEichO YwCddVHAIYJXpJYu4bkVi35VCNdS+ny8FezuwrKr08w8xQFTV0F8ms/FsprJiPOOVW7JNW Fsl4SU4fyTCsdRCKszS/wdH23kUdPQdNG5/EVDuPhNmpc8EydnJWid6+Ji186wWH6l6zQI SDCNnmNFN0KDXyQDUyFn3K2hOzE2/l204CHDjGnH2bVn/5Lhh+hDML+v4SLI40Kx7IEtnC umAMcDfSQ2yIhNx8wrVNJOniWwtAUX8yWaElV7YTYR2LDVoK+LxiXzO9WC3n6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776964175; a=rsa-sha256; cv=none; b=rdvkFmlf4+CEhaRAFPJiB0UDMsVbcZKonctZ3adMc0Obx3pnHLlRK2XzCrwdA9MFKR17cM xMxcYsT8m2cgWn1n2mDA1bcutDt3cXc3wL/BBPCOjsxsVw3DQAen/aml4qs8oGiNdNXQZ3 tGuia4KfW8BGfWAyMwiCOfo8K374HvyGjPww5m+FlVHThb1U4t+RRE6LC9dXVrDlYC2mEE 5r7ijcfyV7XYof56kYl1iDj39OLVbynopFYgPOaEArxICMAvWz3WaPPQ/m/rHOxdyyEk52 cwHQMys3X9wog1OnWitZHp0RfS8RuJCFEtXK442lhDapjWhypIa7+9EsqbuKNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776964175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FawUqTqW0GHjn1/RC/9R7pcQ1Pbn3H6o564kkrRN9eo=; b=mMIxxjxQ9S+wgLfPbuuqT9F20teKs3CN3Kx/+nqLqmHNDguuJ24EwuPZpKfViruAULbRrb 2BZFJ9OwnAjbEawPtYZEhg2nMbhiNJbOXQytpJkVAWXUpLrWIErq7uAMXWDyhb5yllu1RP nlscEf+MtvJq7UfD5dwg3RK+IyMm0AqjrTGvluu7bMd42XEb0v6sfY284ogGabVLLR2XZo pno8azX5JPAiLKCi9dVcn3j1uqTxdA6G057iO2jWgwEmONM0/9B4MuxUKY44qmK6x/x4xE m+b8Jb0BW1iknlLWKWKf8UkxoZvD2rEDTSoj4rpDzAYfOtKLo139gsshrSpkrQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1jHz25tGz8d7 for ; Thu, 23 Apr 2026 17:09:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e0f3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Apr 2026 17:09:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: f3ca689d176f - stable/15 - kdump: tweaks for the extended errors decoding List-Id: Commits to the stable branches 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: f3ca689d176f6653ddccd22674b9b19755dcc55d Auto-Submitted: auto-generated Date: Thu, 23 Apr 2026 17:09:35 +0000 Message-Id: <69ea524f.3e0f3.6b7af7ea@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f3ca689d176f6653ddccd22674b9b19755dcc55d commit f3ca689d176f6653ddccd22674b9b19755dcc55d Author: Konstantin Belousov AuthorDate: 2026-04-21 06:13:04 +0000 Commit: Konstantin Belousov CommitDate: 2026-04-23 17:09:06 +0000 kdump: tweaks for the extended errors decoding (cherry picked from commit 5c89d661a023c83a2001cf5b354b09c7d3ac91d8) --- usr.bin/kdump/Makefile | 1 + usr.bin/kdump/kdump.c | 23 ++++++++++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/usr.bin/kdump/Makefile b/usr.bin/kdump/Makefile index 2c5c456a6de5..cef87f665b46 100644 --- a/usr.bin/kdump/Makefile +++ b/usr.bin/kdump/Makefile @@ -5,6 +5,7 @@ PROG= kdump SRCS= kdump.c subr.c CFLAGS+= -I${SRCTOP}/usr.bin/ktrace +CFLAGS+= -I${SRCTOP}/lib/libc/gen LIBADD= sysdecode .if ${MK_CASPER} != "no" diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c index d3f2ac882e61..9ebd18646474 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -2442,15 +2443,31 @@ bad_size: return; } +static const char * const cat_to_filenames[] = { +#include +}; + +static const char * +cat_to_filename(int category) +{ + if (category < 0 || (unsigned)category >= nitems(cat_to_filenames) || + cat_to_filenames[category] == NULL) + return ("unknown"); + return (cat_to_filenames[category]); +} + static void ktrexterr(struct ktr_exterr *ke) { + char *msg; struct uexterror *ue; ue = &ke->ue; - printf("{ errno %d category %u (src line %u) p1 %#jx p2 %#jx %s }\n", - ue->error, ue->cat, ue->src_line, - (uintmax_t)ue->p1, (uintmax_t)ue->p2, ue->msg); + asprintf(&msg, ue->msg, (uintmax_t)ue->p1, (uintmax_t)ue->p2); + printf("{ errno %d %s:%u \"%s\" (category %u p1 %#jx p2 %#jx) }\n", + ue->error, cat_to_filename(ue->cat), ue->src_line, msg, + ue->cat, (uintmax_t)ue->p1, (uintmax_t)ue->p2); + free(msg); } static void From nobody Thu Apr 23 17:09:36 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1jJ06Pdgz6b7gR for ; Thu, 23 Apr 2026 17:09:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1jJ037hwz3Drf for ; Thu, 23 Apr 2026 17:09:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776964176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EOAzitiSK8kMoWVzwuVZfM1SZacyrkf2S8CpzSFUl1k=; b=kzFcsqX/kGy04BogGORIBYeo9M2+Wj0NDPzE7Y/Ygcg5mAnb5N8cKDv2Na9C612V5LOiP5 LxV9KCKRuH7HlISW41Ob1Ll4l26SXpILbKACBdyatkeLWD37limH/td3NN2mQq7u+v8ETD OYWnrTpmr+Eib5/jKn/wUd2uz48CkavlWsok160hp8/NDO0uQd0+OLrPNJApZr33pKeUGy LwILwGlT7DTK+q/pztolmJABz8HxgIsu0LGL+074DnoJIzJM/xGc7F+SwCRtFBu4BVnXZ5 TqAIVmedR2eAemAXQgF3JP3eYhPOQ6EUNz4mG9cCuGqUj317pWizVcRRk1bwPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776964176; a=rsa-sha256; cv=none; b=YFjpdQTJxHRs/cUBxgkQbudiX7HqIxeRY0gT49bvRiyJrfHsg8F9zBvHkx6WuUnEYReIPW M+uLk7nHrSErWSvy2MK4KTQSv20qVcz1Y7mMAISDv/acKSTsgEMgnEWIXvmksqQfxDx/Rw Xix8dBCY0Vyeo3TabfmE6TPf6J/90kjKoya2U8RWsRR/yEIBOUO/TJFhPKz476MBLPQwD0 VVOVazJY2qBmVWKByKFerICmCYA+MQvhGx9zHMd0Hurdwqyt0oSjuvOuYrOMNpxWElY3yz lYG6kaCalOM+mwz3Le9kvJbIDTBBK8QBrM65dnNSJlmNRusKshyVOvuHMeE/IQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776964176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EOAzitiSK8kMoWVzwuVZfM1SZacyrkf2S8CpzSFUl1k=; b=UyCyoXhLR6ByB6Y3eraU1y/6PYzlK1nMZ5A3Gj9ISNOszbKJkjg131UjkJI6VvnmVYLzEK WhoENnQvJtERpLWwza3TduSkK+DaPliSmAq8CDAcbm+EcMBcufmXX05rudEvY8q1orzcxi WJtV4Zh0NAnrU3doHmMb51g5EEOYrIf7PSoLrv9PKne6g/0bqAAXO8+H4i7T0xd5cCvbSb CarLb9wLp3c+7suTa+4vk5Tkc+JGkOO5NZ4TSAyaEDl8NTATj1mCyJPtPLxq6MY2kJqbae wXBlI/k1iXftFwFhwXKTIIjDe1Q1YNA8j6IQOWFHsDeQthVsuugR3bXHZkW/XQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1jJ02SLcz9pP for ; Thu, 23 Apr 2026 17:09:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d459 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Apr 2026 17:09:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 75ae51b7241a - stable/15 - kdump(1): add sys/ prefix for exterror source file name List-Id: Commits to the stable branches 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: 75ae51b7241ace697eb9f3fa6f2f8ac3727c7390 Auto-Submitted: auto-generated Date: Thu, 23 Apr 2026 17:09:36 +0000 Message-Id: <69ea5250.3d459.4d63efc6@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=75ae51b7241ace697eb9f3fa6f2f8ac3727c7390 commit 75ae51b7241ace697eb9f3fa6f2f8ac3727c7390 Author: Konstantin Belousov AuthorDate: 2026-04-22 07:35:06 +0000 Commit: Konstantin Belousov CommitDate: 2026-04-23 17:09:06 +0000 kdump(1): add sys/ prefix for exterror source file name (cherry picked from commit 4d062dbc20dce5a94da8dca1253ac9337b951c51) --- usr.bin/kdump/kdump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c index 9ebd18646474..75bee040a92c 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -2464,7 +2464,7 @@ ktrexterr(struct ktr_exterr *ke) ue = &ke->ue; asprintf(&msg, ue->msg, (uintmax_t)ue->p1, (uintmax_t)ue->p2); - printf("{ errno %d %s:%u \"%s\" (category %u p1 %#jx p2 %#jx) }\n", + printf("{ errno %d sys/%s:%u \"%s\" (category %u p1 %#jx p2 %#jx) }\n", ue->error, cat_to_filename(ue->cat), ue->src_line, msg, ue->cat, (uintmax_t)ue->p1, (uintmax_t)ue->p2); free(msg); From nobody Thu Apr 23 17:09:34 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1jJ35t0Mz6b7pG for ; Thu, 23 Apr 2026 17:09:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1jJ33rZxz3F3M for ; Thu, 23 Apr 2026 17:09:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776964179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GdP7PsUJbLfgHE5csjgAS6nY5ppX1ByfNNIDLWs+Cng=; b=DQLzLPKiFees1HURW80zGXuY/pi4OGl/23u2KXrPT5VAhSO/SnVOIPIdPu/JEfrPjucmsP c+0qq6yvTi7uPH2SRUOFR4D26us8BjU9AN27OfWgKE404PUgypy1DzJwV322p46UCzyk0N qXpkpiKAKWJASoTyFABPEbqNWnncJjAhe95Y45h7n+xBF8oZXm4f6ImzcH71dlQYP7hN9U hnRxFgRjFYWHN0VrXf/ugLxCanlyYJf9KrSl9mKisa780ufJWwMLONOBn07uNRCaGnkA5/ VfRoYYnu0oWDaf91MvIZppz/rapBMHKQtJdhRxzdADDbO9kjGL9dGwpB8DgASQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776964179; a=rsa-sha256; cv=none; b=vkPpII63ApDDiy1eNsJ2RSoNXl69UOnNUvSThCroja7WthwTd95TjOwq//Pdl9dpQ6y9bF 80QmB6sKG2UZKvHP+mC7LiE0z/GRKPN/DdqA69rrhiBn6QUmPjKJDl2uM2i7zRmNUQLDre thHZUY90irHsM1agxRp00953g6xB8kU3iBw8eFAVlXVkWt5FAoVCVT8E//6SDJ/ioZrOm8 WzBiSv17hg/Q2r0Kg67uBrXs3mwwgmSwZEoIiWbsK9gQG4Jn2ww1jq8VXlonaq5BJLzXth ZXtwvyk0C9oPjDfH00HsaXs7LwwY/SXJS3WOMzz5rJorJKrRGi46YJXsLQzcLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776964179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GdP7PsUJbLfgHE5csjgAS6nY5ppX1ByfNNIDLWs+Cng=; b=MIRAGo/2t7Nfi4arc4NYwZSYBz0fcy3x+37XVK8Lnh9/fXA1+AL15bR/ZhhGFsf+P04YyW JDq27PVLDcPhNPnubTDjE+bBx8Bo3ug64G5I8jgzu2gGs/LR3Zj/JTiVpnkOF/Qpy66MiG vQ+ov7y66cQcSsWsa20zM0AIxOoOc/aAgnDczd4OGzVuU3AgOErxsPyeubzq7vwz8N/YkJ Agqxbu2yjzhq2Tllvtt4p2GtZngGxghtLXNYZxhjsaIcN8o0iv/4RGs32oTSfyCUgjKU44 tX7alp8qqLBlBa9ZVfMe1I05At9kMIZBIwj44giCJB2NMhRdsmPAQX8X+eZ9ag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1jJ33Sbxz8d9 for ; Thu, 23 Apr 2026 17:09:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f72f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Apr 2026 17:09:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 0b6f465fc5a4 - stable/15 - rtld: fix processing of preloaded z_initfirst objects List-Id: Commits to the stable branches 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: 0b6f465fc5a45369246ab29bc366687090baee2f Auto-Submitted: auto-generated Date: Thu, 23 Apr 2026 17:09:34 +0000 Message-Id: <69ea524e.3f72f.1bf7ad5@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0b6f465fc5a45369246ab29bc366687090baee2f commit 0b6f465fc5a45369246ab29bc366687090baee2f Author: Konstantin Belousov AuthorDate: 2026-04-16 23:07:43 +0000 Commit: Konstantin Belousov CommitDate: 2026-04-23 17:08:50 +0000 rtld: fix processing of preloaded z_initfirst objects (cherry picked from commit 9b844b495e8e63439ffe523757ac7444a16317af) --- libexec/rtld-elf/rtld.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index db5d22dfefdb..aa17041fdc2d 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -2655,6 +2655,11 @@ initlist_add_objects(Obj_Entry *obj, Obj_Entry *tail, Objlist *list, initlist_add_neededs(obj->needed_aux_filtees, NULL, iflist); objlist_push_tail(iflist, obj); + + /* Recursively process the successor objects. */ + nobj = globallist_next(obj); + if (nobj != NULL && obj != tail) + initlist_add_objects(nobj, tail, list, iflist); } else { if (obj->init_scanned) return; From nobody Thu Apr 23 17:10:03 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1jJW4vTTz6b7x9 for ; Thu, 23 Apr 2026 17:10:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1jJW2rglz3FmZ for ; Thu, 23 Apr 2026 17:10:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776964203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dTbYfkXkiwx/i9epZFSWP1AJ5ETcGWXHfKmTs4adXXQ=; b=fAyopKkwK4v6xbUEu9BAQwyS1WzDnQDMfOyywof4CHyDoT5yoDgoZbuuuWzkO30IrriLfH bk+5YdwT1hkk8W8lBS0SYy/lsbmmzFgjv4sT3jgG34mz1UvQkNcOdFzr8cjTsnCyOj3R1Y ur0UlPlC3uN/vj40K4cPq/DLuLGwaYQjtQ+81Syx6maSfVhYSj09Pbo/uZIO2T3e6WIFAE /O5uRXB1h85nb0YjQZZ2jBy7+BeVOIYvVhSLjjDl5+rWS3Y96r9NQzfHuz0M8PE/5yvwTT RbjD0EIfeyRfTQjANw3KCh0sBtFxJzPnSb6plXBLOBYFO5jzsi0s0Uw3VOMhqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776964203; a=rsa-sha256; cv=none; b=TCRDLnlPPg0txd6jBgu0/Mn6FDlTLNd5QYHvvym19qmtJMJezi8Bt637Z5AwK9aF4kwGQT uDs1oguMIs9vkrKdcGOVY6LXIRhnTFs751mwddO/2WFnU/bidRfbdpuawL7t7eZ4CnICOr fnUaQsf1kuGTI1vQUdqwS8fOuDiSRH71RxJ06siPKEGAaq5SzNPJEB5AyLJoOOpL44oKYA qgVK1qroTpLKkosKelanhz3gDUkU7uXSyhc0totLZFCOOB7SczFwaMitv6hbBR1fAFleFi qOya6vh+742386kjNm7LmIM7PNFb2mlqoezu3LBZ1pIBKsA/q4T+6vEJgNYwdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776964203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dTbYfkXkiwx/i9epZFSWP1AJ5ETcGWXHfKmTs4adXXQ=; b=nigjQ7Pl7CvA3JD+mtKjJtD5f7zwcfCRePKyAC4uvhILDKTYIYy5oVMdmQYzUOCrhTUtNa X59J/7YSVXXN5Jm8XuRI9SFqohnuzpl8zmDwqxcd3NvMIgpkV7Th7ePlKgBm8OOPo3W6Pe J1MuBOsSQk43n9e9zI9t3e8JhUuddv0nlgOyNcgXjHgWfkXhZJsEsfSugvJPjLMhybWx11 VDAW1Ac9n48baO/Y1okX7P850lyfbUVyueJYc0PfFGzlYuzbwcR7QgaOUeIXBBlnBdRsrY a1Z3sma80e5F6tsgkc6sULEmV15pR2pOY/NqpLOq9pja+BI8taId/lSFs+M7PQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1jJW1WZHz9sV for ; Thu, 23 Apr 2026 17:10:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4028a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Apr 2026 17:10:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 2ddefc8259ef - stable/14 - rtld: fix processing of preloaded z_initfirst objects List-Id: Commits to the stable branches 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: 2ddefc8259ef386bd0c58460e7c44aae93839cfd Auto-Submitted: auto-generated Date: Thu, 23 Apr 2026 17:10:03 +0000 Message-Id: <69ea526b.4028a.1886a803@gitrepo.freebsd.org> The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2ddefc8259ef386bd0c58460e7c44aae93839cfd commit 2ddefc8259ef386bd0c58460e7c44aae93839cfd Author: Konstantin Belousov AuthorDate: 2026-04-16 23:07:43 +0000 Commit: Konstantin Belousov CommitDate: 2026-04-23 17:09:46 +0000 rtld: fix processing of preloaded z_initfirst objects (cherry picked from commit 9b844b495e8e63439ffe523757ac7444a16317af) --- libexec/rtld-elf/rtld.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 5117448a0d28..7e12aa3d9c7f 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -2606,6 +2606,11 @@ initlist_add_objects(Obj_Entry *obj, Obj_Entry *tail, Objlist *list, initlist_add_neededs(obj->needed_aux_filtees, NULL, iflist); objlist_push_tail(iflist, obj); + + /* Recursively process the successor objects. */ + nobj = globallist_next(obj); + if (nobj != NULL && obj != tail) + initlist_add_objects(nobj, tail, list, iflist); } else { if (obj->init_scanned) return; From nobody Thu Apr 23 20:29:07 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1nkD2TgZz6b1VX for ; Thu, 23 Apr 2026 20:29:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1nkC6sy1z3tJ4 for ; Thu, 23 Apr 2026 20:29:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776976148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jm0GiKE4U8nKcRvaz56qvacV5V5E53glQ77KcZW/MbI=; b=Y2GYOapDrU8SCAJIJOBwxzQGu/csB58i2PHCIdGap6PNSqATzlQx30k7AiS9kmjXwo0+uG ejtwWJFzF6AJ0uwlmH5cr/St0IZjJDUVfoepU6EETkj/LHgazy3LCxm93+5DX6QR7jPG/6 zUa1A3StiRSK0E40C9Y+yRTfUc/pH4SwwVz0m6QDyd0NRQz83QZ2XhEnCIL/GBSuxtsfp6 tbQfpt45MYD6Vc5oqsEKE1GVH12Tgvpl/L1NsIQ9IGKF8SOdXyJtUnRqAXt+XrMPb/zDlw SRy/P34u5Z61uT9I2NbskbHHj2cLShfeuJ0AB4DCkpxb1ud2z0E0hpKwHWTu6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776976148; a=rsa-sha256; cv=none; b=Jh5UdwFf2QUkRu+Q4W4f53AEC4lR4KQ+YYsh7AGYO7NKhcCyMVckgg2fbnEOVYi4hlY4eI 7RyCrgujjlJR451h7YLT6NzJ3UE6U0no1SS0ysMqyLCj8uzbjzvbyGyxmvnz1hPOh67s3z phD6HU2qUwEr9NaZJgRu0RjGLlpx0FD2bAYRCI5VuThQqhxbLP7tlRONRU9C3sEJsX46so n0Zi2MCVzfG1wGh9chnjT+2vfNDLwZuCEL/V/kuUIMvPK9VlJrNZqc82tkvs/IcQhBQfId 33hOVFjqVkS4yKQczr2rC0bIPKVB53z8tyZnAFwaYTPfKN/YNaCA32eVmQW+jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776976148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jm0GiKE4U8nKcRvaz56qvacV5V5E53glQ77KcZW/MbI=; b=jUdtTITt6mt8kI6aLDuUkz5QmVP9IGGWvxXvj7owF4KglDHaz88U/onaeoqbbG2cA8ED1l /feMvPX7Ez5NfhLhWks2BR7EKdHM+6dkeDEVmlpzN5LWDY0/yBwgM1dYeMd3CTb5iS3uFl 9wSNY+LfvP7DM/8awlCZXqI1qvzoJn8TQwqIJpjjxGz7QzQiDyMhsnJHfFh/xotcibkXFr 81uzxkEOcSOQr2bhWphnhCofzltQVtRS14IlT14jvGyKrcQPI81ergtdV2ENm7fICqGIRR 6DdfPOkTRfisNtUadlqjYjDpdKDq1kurq25/fv5CLXOBh7kAfurR85y5T3MUFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1nkC6B1wzYhJ for ; Thu, 23 Apr 2026 20:29:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 256c3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Apr 2026 20:29:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: 7ac7604b9141 - stable/15 - geom manuals: Clarify units List-Id: Commits to the stable branches 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: 7ac7604b9141005cc0663a5d021bceaf7746e940 Auto-Submitted: auto-generated Date: Thu, 23 Apr 2026 20:29:07 +0000 Message-Id: <69ea8113.256c3.68ca5f8c@gitrepo.freebsd.org> The branch stable/15 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=7ac7604b9141005cc0663a5d021bceaf7746e940 commit 7ac7604b9141005cc0663a5d021bceaf7746e940 Author: Alexander Ziaee AuthorDate: 2026-04-20 17:21:23 +0000 Commit: Alexander Ziaee CommitDate: 2026-04-23 20:28:54 +0000 geom manuals: Clarify units The gpart manual says that sizes are specified in blocks, unless an SI unit suffix is provided. This confuses new operators because GEOM uses binary bytes, a large difference at modern storage pool sizes. Rewrite suffixes in all GEOM manuals to consistently clarify this, matching what we and the rest of the industry have been doing in other documentation. While here, use non-breaking spaces between numbers and units, unless they are already written with a hyphen. MFC after: 3 days Reviewed by: fuz Reported by: bbaovanc Differential Revision: https://reviews.freebsd.org/D56534 (cherry picked from commit 975e3605ebb15cbaf5a25c1c9d1f51aed41291d0) --- lib/geom/cache/gcache.8 | 4 ++-- lib/geom/eli/geli.8 | 8 +++---- lib/geom/part/gpart.8 | 52 ++++++++++++++++++++++++++-------------------- sbin/ggate/ggatec/ggatec.8 | 8 +++---- sbin/ggate/ggated/ggated.8 | 4 ++-- 5 files changed, 41 insertions(+), 35 deletions(-) diff --git a/lib/geom/cache/gcache.8 b/lib/geom/cache/gcache.8 index 026c66b0966b..072f35e92c01 100644 --- a/lib/geom/cache/gcache.8 +++ b/lib/geom/cache/gcache.8 @@ -82,9 +82,9 @@ The utility is used to control GEOM cache, which can speed up read performance by sending fixed size read requests to its consumer. It has been developed to address -the problem of a horrible read performance of a 64k blocksize FS +the problem of a horrible read performance of a 64\~KiB blocksize FS residing on a RAID3 array with 8 data components, where a single -disk component would only get 8k read requests, thus effectively +disk component would only get 8\~KiB read requests, thus effectively killing disk performance under high load. .Pp Caching can be configured using two different methods: diff --git a/lib/geom/eli/geli.8 b/lib/geom/eli/geli.8 index 876caf67ab40..b38f54d82293 100644 --- a/lib/geom/eli/geli.8 +++ b/lib/geom/eli/geli.8 @@ -249,7 +249,7 @@ Additional options include: .It Fl a Ar aalgo Enable data integrity verification (authentication) using the given algorithm. This will reduce the size of storage available and also reduce speed. -For example, when using 4096 bytes sector and +For example, when using 4096\~bytes sector and .Nm HMAC/SHA256 algorithm, 89% of the original provider storage will be available for use. Currently supported algorithms are: @@ -883,8 +883,8 @@ The crypto card and the driver have to support this feature. .It Va kern.geom.eli.key_cache_limit : No 8192 Specifies how many Data Keys to cache. The default limit -(8192 keys) will allow caching of all keys for a 4TB provider with 512 byte -sectors and will take around 1MB of memory. +(8192 keys) will allow caching of all keys for a 4\~TiB provider with 512\~byte +sectors and will take around 1\~MiB of memory. .It Va kern.geom.eli.key_cache_hits Reports how many times we were looking up a Data Key and it was already in cache. @@ -936,7 +936,7 @@ Exit status is 0 on success, and 1 if the command fails. .Sh EXAMPLES Initialize a provider which is going to be encrypted with a passphrase and random data from a file on the user's pen drive. -Use 4kB sector size. +Use 4\~KiB sector size. Attach the provider, create a filesystem, and mount it. Do the work. Unmount the provider and detach it: diff --git a/lib/geom/part/gpart.8 b/lib/geom/part/gpart.8 index 97dd60182435..32a247529dfe 100644 --- a/lib/geom/part/gpart.8 +++ b/lib/geom/part/gpart.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 4, 2025 +.Dd April 20, 2026 .Dt GPART 8 .Os .Sh NAME @@ -168,7 +168,9 @@ to be multiple of value. .It Fl b Ar start The logical block address where the partition will begin. -An SI unit suffix is allowed. +A single-character suffix +.Pq k, m, g, etc. +is allowed to specify binary byte sizes. .It Fl f Ar flags Additional operational flags. See the section entitled @@ -187,7 +189,9 @@ partition labels. .It Fl s Ar size Create a partition of size .Ar size . -An SI unit suffix is allowed. +A single-character suffix +.Pq k, m, g, etc. +is allowed to specify binary byte sizes. .It Fl t Ar type Create a partition of type .Ar type . @@ -422,8 +426,10 @@ about its use. .It Fl i Ar index Specifies the index of the partition to be resized. .It Fl s Ar size -Specifies the new size of the partition, in logical blocks. -An SI unit suffix is allowed. +Specifies the new size of the partition, in logical blocks, +or binary byte sizes if a single-character suffix +.Pq k, m, g, etc. +is provided. .El .\" ==== RESTORE ==== .It Cm restore @@ -1134,7 +1140,7 @@ with type (see the .Sx "PARTITION TYPES" section). -It uses 8 KB size bootstrap code image +It uses 8\~KiB size bootstrap code image .Pa /boot/boot , embedded into the partition table's metadata area. .Pp @@ -1149,7 +1155,7 @@ partition (see the section) and runs the next bootstrap stage from it. The .Cm freebsd-boot -partition should be smaller than 545 KB. +partition should be smaller than 545\~KiB. It can be located either before or after other .Fx partitions on the disk. @@ -1190,13 +1196,13 @@ After all pools are detected, is started from the first one found set as bootable. .Pp The APM scheme also does not support embedding bootstrap code. -Instead, the 800 KBytes bootstrap code image +Instead, the 800\~KiB bootstrap code image .Pa /boot/boot1.hfs should be written with the .Cm gpart bootcode command to a partition of type .Cm apple-boot , -which should also be 800 KB in size. +which should also be 800\~KiB in size. .Sh OPERATIONAL FLAGS Actions other than the .Cm commit @@ -1351,8 +1357,8 @@ naming scheme. .Sh EXIT STATUS Exit status is 0 on success, and 1 if the command fails. .Sh EXAMPLES -The examples below assume that the disk's logical block size is 512 -bytes, regardless of its physical block size. +The examples below assume that the disk's logical block size is 512\~bytes, +regardless of its physical block size. .Ss GPT In this example, we will format .Pa ada0 @@ -1384,31 +1390,31 @@ for UFS or .Pa /boot/gptzfsboot for ZFS .Pc , -but smaller than 545 kB since the first-stage loader will load the +but smaller than 545\~KiB since the first-stage loader will load the entire partition into memory during boot, regardless of how much data it actually contains. -We create a 472-block (236 kB) boot partition at offset 40, which is -the size of the partition table (34 blocks or 17 kB) rounded up to the -nearest 4 kB boundary. +We create a 472-block (236\~KiB) boot partition at offset 40, which is +the size of the partition table (34\~blocks or 17\~KiB) rounded up to the +nearest 4\~KiB boundary. .Bd -literal -offset indent /sbin/gpart add -b 40 -s 472 -t freebsd-boot ada0 /sbin/gpart bootcode -p /boot/gptboot -i 1 ada0 .Ed .Pp -We now create a 4 GB swap partition at the first available offset, -which is 40 + 472 = 512 blocks (256 kB). +We now create a 4\~GiB swap partition at the first available offset, +which is 40 + 472 = 512 blocks (256\~KiB). .Bd -literal -offset indent /sbin/gpart add -s 4G -t freebsd-swap ada0 .Ed .Pp -Aligning the swap partition and all subsequent partitions on a 256 kB +Aligning the swap partition and all subsequent partitions on a 256\~KiB boundary ensures optimal performance on a wide range of media, from plain old disks with 512-byte blocks, through modern .Dq advanced format disks with 4096-byte physical blocks, to RAID volumes with stripe -sizes of up to 256 kB. +sizes of up to 256\~KiB. .Pp -Finally, we create and format an 8 GB +Finally, we create and format an 8\~GiB .Cm freebsd-ufs partition for the root filesystem, leaving the rest of the device free for additional filesystems: @@ -1424,8 +1430,8 @@ using a traditional .Bx disklabel. .Pp -First, we create the partition table as well as a single partition 64 GB in -size and an alignment of 4 kB, then we mark that partition active (bootable) +First, we create the partition table as well as a single partition 64\~GiB in +size and an alignment of 4\~KiB, then we mark that partition active (bootable) and install the first-stage boot loader: .Bd -literal -offset indent /sbin/gpart create -s MBR ada0 @@ -1444,7 +1450,7 @@ with room for up to 20 partitions: /sbin/gpart create -s BSD -n 20 ada0s1 .Ed .Pp -We then create an 8 GB root partition and a 4 GB swap partition: +We then create an 8\~GiB root partition and a 4\~GiB swap partition: .Bd -literal -offset indent /sbin/gpart add -t freebsd-ufs -s 8G ada0s1 /sbin/gpart add -t freebsd-swap -s 4G ada0s1 diff --git a/sbin/ggate/ggatec/ggatec.8 b/sbin/ggate/ggatec/ggatec.8 index 99f9bcab5964..b8c5af570f06 100644 --- a/sbin/ggate/ggatec/ggatec.8 +++ b/sbin/ggate/ggatec/ggatec.8 @@ -101,7 +101,7 @@ providers. .El .Pp Available options: -.Bl -tag -width ".Fl s Cm ro | wo | rw" +.Bl -tag -width "-q queue_size" .It Fl f Forcibly destroy .Nm ggate @@ -136,15 +136,15 @@ start to be canceled. Default is 1024. .It Fl R Ar rcvbuf Size of receive buffer to use. -Default is 131072 (128kB). +Default is 131072 (128\~KiB). .It Fl S Ar sndbuf Size of send buffer to use. -Default is 131072 (128kB). +Default is 131072 (128\~KiB). .It Fl s Ar sectorsize Sector size for .Nm ggate provider. -If not specified, it is taken from the device, or set to 512 bytes for files. +If not specified, it is taken from the device, or set to 512\~bytes for files. .It Fl t Ar timeout Number of seconds to wait before an I/O request will be canceled. Default is 0, which means no timeout. diff --git a/sbin/ggate/ggated/ggated.8 b/sbin/ggate/ggated/ggated.8 index 8e3ad68d1db0..c48967268df8 100644 --- a/sbin/ggate/ggated/ggated.8 +++ b/sbin/ggate/ggated/ggated.8 @@ -72,10 +72,10 @@ PID file that uses. .It Fl R Ar rcvbuf Size of receive buffer to use. -Default is 131072 (128kB). +Default is 131072 (128\~KiB). .It Fl S Ar sndbuf Size of send buffer to use. -Default is 131072 (128kB). +Default is 131072 (128\~KiB). .It Fl v Do not fork, run in foreground and print debug information on standard output. From nobody Fri Apr 24 00:54:13 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1vc56HQsz6bW2d for ; Fri, 24 Apr 2026 00:54:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1vc53fXlz3Pfq for ; Fri, 24 Apr 2026 00:54:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776992053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=53ToDbkNrVl1/fK0rNXY5PCRHNnTptLm2zHrOE0skXk=; b=mnAy7GGRYGfo9gqJWSBzMtKmGTF+CJqDuLFiesXj/mZmnNRUlRZ2YKl9ODjj/pKbG6zlR7 UQ7nCjU4iNTV2NT06+bKFdDa8PP/xgmcCxfrGpDScGX6wV6nIBeNCQMZOe9EHnvt3ty5Bp kcvQNRj/1rYtro6ct+3WodSffcrYr7g7ivguWV1GAGuAQ2sYGJW9L6oZU3HDg6LvFmbNXV 6ThHa2TVtnpZybmPrCv6RtjA0QE8NpnE/khiE/F0KZFSExd5sElkCCZD/96hemDsd9U3kE GP3PCvUKQG8T4GH2zvAhW9W+OCPJPHCM3Ks2cRs03oVW2xx/v4zDtfLl6pGOkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776992053; a=rsa-sha256; cv=none; b=NB8OGV78uyc7KjMldLkJ6V4z1nIAVw4DgSOgxHtmnqXK1dWLygckgkaT2hgdx6ASgIgcHY 2m9vOH7ACIZsnODEuwhLW+uhreYmM/V2dlxc3J49D2pZJE856f1RyVPzDt86VFb3KOmF42 iGTxhtRuRSw1HPJEe+XzIW3iFJomkffMea436KEzcunMCr9rIWTjfJAFT8HIyC0SwLrjS6 SDVpEasXzfGbdwKALiZD25p4fZaCBFh5TUJjETpGlORSyGKxlYBytx3GsbTJtSJZyJqSKx Jwec5BluPdwnQ/tWSuehpFSS0Sj9APmBy6rPhD0L9kSrWQWdVBa7X7wIgDQmlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776992053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=53ToDbkNrVl1/fK0rNXY5PCRHNnTptLm2zHrOE0skXk=; b=ZoPskxA3xp1MMSh6oQ+iPuyaYW2PC9/DYLAgqifjRD4YA3Aqt9E9T1M8yqBhtlsWMvAV63 SnXm/FIVa1NJIFk8QkLZJyV7Rnffw2E3vfPpG9cxWcNaS2IauOc4DtO/yzJVVKv8dtpMd4 QjopcuaxC6eu1S4j4jL50TpXmVSs5RDFD3qnDxOtgmKwiAmaijoprkiMKXKnzb7qIVK5WS pThbhChfVVRcgQpnCiVDvCFXKdq7xNy31ndp1IC8D1TgRpsCZDM37Q1lOaMy8krp+QUZKH P2tD/FBcGL0IuqUpMeaGhchM9pGq4trdp0X7V9hx/WEAPRJlbcCAerhypvBxxg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1vc52jw3zhHJ for ; Fri, 24 Apr 2026 00:54:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21b1e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 00:54:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Christos Longros From: Jose Luis Duran Subject: git: 5fd7eb1b8996 - stable/15 - ping6: treat setsockopt failures as fatal List-Id: Commits to the stable branches 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: 5fd7eb1b89962c16ed7f2c551790dfded6534659 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 00:54:13 +0000 Message-Id: <69eabf35.21b1e.f2c36e9@gitrepo.freebsd.org> The branch stable/15 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=5fd7eb1b89962c16ed7f2c551790dfded6534659 commit 5fd7eb1b89962c16ed7f2c551790dfded6534659 Author: Christos Longros AuthorDate: 2026-04-17 18:19:24 +0000 Commit: Jose Luis Duran CommitDate: 2026-04-24 00:51:05 +0000 ping6: treat setsockopt failures as fatal ping6 needs IPV6_RECVPKTINFO and IPV6_RECVHOPLIMIT to process incoming replies. When these options fail, replies are silently dropped and ping6 appears to hang. Use err(3) instead of warn(3) so the user gets a clear error and immediate exit. Signed-off-by: Christos Longros Reviewed by: pouria, jlduran, glebius MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56237 (cherry picked from commit 9a4a9f623bbaf991b3ba580593d47f2ee9f7b03b) --- sbin/ping/ping6.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/ping/ping6.c b/sbin/ping/ping6.c index 356f0f72a6f8..f81de062e59a 100644 --- a/sbin/ping/ping6.c +++ b/sbin/ping/ping6.c @@ -1083,21 +1083,21 @@ ping6(int argc, char *argv[]) #ifdef IPV6_RECVPKTINFO if (setsockopt(srecv, IPPROTO_IPV6, IPV6_RECVPKTINFO, &optval, sizeof(optval)) < 0) - warn("setsockopt(IPV6_RECVPKTINFO)"); /* XXX err? */ + err(1, "setsockopt(IPV6_RECVPKTINFO)"); #else /* old adv. API */ if (setsockopt(srecv, IPPROTO_IPV6, IPV6_PKTINFO, &optval, sizeof(optval)) < 0) - warn("setsockopt(IPV6_PKTINFO)"); /* XXX err? */ + err(1, "setsockopt(IPV6_PKTINFO)"); #endif #endif /* USE_SIN6_SCOPE_ID */ #ifdef IPV6_RECVHOPLIMIT if (setsockopt(srecv, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, &optval, sizeof(optval)) < 0) - warn("setsockopt(IPV6_RECVHOPLIMIT)"); /* XXX err? */ + err(1, "setsockopt(IPV6_RECVHOPLIMIT)"); #else /* old adv. API */ if (setsockopt(srecv, IPPROTO_IPV6, IPV6_HOPLIMIT, &optval, sizeof(optval)) < 0) - warn("setsockopt(IPV6_HOPLIMIT)"); /* XXX err? */ + err(1, "setsockopt(IPV6_HOPLIMIT)"); #endif cap_rights_clear(&rights_srecv, CAP_SETSOCKOPT); From nobody Fri Apr 24 00:54:31 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1vcS0x33z6bW7B for ; Fri, 24 Apr 2026 00:54:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1vcR5ljCz3PyJ for ; Fri, 24 Apr 2026 00:54:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776992071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BrNGagBkrGhpEzKKV0leTXZ77Ngr8TLWgOoYqgcTMh4=; b=OxfuUmHvE8XKHkE52aazxUwDpqLigX++s6PEBD2yaMampTGhmzj12Ko9hP/9XbQ23U+JIG eumt66JFKKYMIPyhFnGgdtVYjv4sruwoW/JXYEPItPWTt0IgW3FYlCGre8Ps33CuA2QrFI ivRL2Q2QJoV7OZk1Xr/bR9vF2wAZqK2G49gZupB6QU/UTJ1CKv5FVvfFwlMkJXVvtRpgxo EmkL1sZp0Gfuw5fybYnIGwjhFwoCk6NPx2HXxr89lksWBh4zNJBf2ey3UwbRPlgw9lzJkN naqXHaJ7D9y22fPuuNq6D6QbfgZBHZA+ueWrdBiCA/wK5E9RmZcVA5EmrEqaRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776992071; a=rsa-sha256; cv=none; b=OUX4X+d+uLagylunWXKLjFqWTx8jsdfqNZeNV6BBq1jg4Cyu+PNA7582pf3tOu9xizP0co vcC8DuHR9ENwQpaqVrjmZCXxkNo5ctXLIZG46KkBDG2TypMvNU/86c2/p63vST00FBlNDI Y8dQRkKT1JfN6b5dO7CtADNV6MwrtGtGhfRKdv0GC5/V2ff+y1L91jeNK4pSuwgyQFKGS2 iX7/x700Mjp0Q3Cfd1hCOMBTIe71TE5wca6aUxl6WDVpDLtfjyf3KbM35YYEX7rKtAAESv b3nlPgAGaPIkma37sO4zxsCEyp3mqu/0BxHejWQIIqj6ApCk3T27C9rus24mSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776992071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BrNGagBkrGhpEzKKV0leTXZ77Ngr8TLWgOoYqgcTMh4=; b=oQRVNkyXNE1KpMHJG+xWRH+HPWsrA17yG1kW5/yRczlc6Zyi+LT8n3CweNZoYjwXIaeJbu JW2FHlaZX1+51wjjjWLVDcNeqSWOMej5rrHtsikaULrmVE4e3HTyHzvIxbbGvlNDpAo5+j LpNENBIeIr0lTg/16smoUCpDcDPKf8eL+VMWFCLmDqlKaIQixNF/3UhYS63BORNpUpo3pi PRjvUURQLaVe08z5GKNbSLntVgUGXyY86RCx0ZzvnqfiejDUcSCnebovRQbsGVSRsHBOLQ L+o6n4XyjbKCDG2qucb051eTDwRtckEOEGus/h/1DWHRWKxxNwXHo41CMW9pNg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1vcR5GHMzhQQ for ; Fri, 24 Apr 2026 00:54:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 213df by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 00:54:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Christos Longros From: Jose Luis Duran Subject: git: 2d2f92194f07 - stable/14 - ping6: treat setsockopt failures as fatal List-Id: Commits to the stable branches 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: 2d2f92194f0776c89afcbc1244fcc8e1de69107e Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 00:54:31 +0000 Message-Id: <69eabf47.213df.65263a01@gitrepo.freebsd.org> The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=2d2f92194f0776c89afcbc1244fcc8e1de69107e commit 2d2f92194f0776c89afcbc1244fcc8e1de69107e Author: Christos Longros AuthorDate: 2026-04-17 18:19:24 +0000 Commit: Jose Luis Duran CommitDate: 2026-04-24 00:52:26 +0000 ping6: treat setsockopt failures as fatal ping6 needs IPV6_RECVPKTINFO and IPV6_RECVHOPLIMIT to process incoming replies. When these options fail, replies are silently dropped and ping6 appears to hang. Use err(3) instead of warn(3) so the user gets a clear error and immediate exit. Signed-off-by: Christos Longros Reviewed by: pouria, jlduran, glebius MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56237 (cherry picked from commit 9a4a9f623bbaf991b3ba580593d47f2ee9f7b03b) --- sbin/ping/ping6.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/ping/ping6.c b/sbin/ping/ping6.c index afbaba33e4f7..de2f34dd78db 100644 --- a/sbin/ping/ping6.c +++ b/sbin/ping/ping6.c @@ -1096,21 +1096,21 @@ ping6(int argc, char *argv[]) #ifdef IPV6_RECVPKTINFO if (setsockopt(srecv, IPPROTO_IPV6, IPV6_RECVPKTINFO, &optval, sizeof(optval)) < 0) - warn("setsockopt(IPV6_RECVPKTINFO)"); /* XXX err? */ + err(1, "setsockopt(IPV6_RECVPKTINFO)"); #else /* old adv. API */ if (setsockopt(srecv, IPPROTO_IPV6, IPV6_PKTINFO, &optval, sizeof(optval)) < 0) - warn("setsockopt(IPV6_PKTINFO)"); /* XXX err? */ + err(1, "setsockopt(IPV6_PKTINFO)"); #endif #endif /* USE_SIN6_SCOPE_ID */ #ifdef IPV6_RECVHOPLIMIT if (setsockopt(srecv, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, &optval, sizeof(optval)) < 0) - warn("setsockopt(IPV6_RECVHOPLIMIT)"); /* XXX err? */ + err(1, "setsockopt(IPV6_RECVHOPLIMIT)"); #else /* old adv. API */ if (setsockopt(srecv, IPPROTO_IPV6, IPV6_HOPLIMIT, &optval, sizeof(optval)) < 0) - warn("setsockopt(IPV6_HOPLIMIT)"); /* XXX err? */ + err(1, "setsockopt(IPV6_HOPLIMIT)"); #endif cap_rights_clear(&rights_srecv, CAP_SETSOCKOPT); From nobody Fri Apr 24 00:54:47 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1vcl6nvMz6bWNq for ; Fri, 24 Apr 2026 00:54:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1vcl6GWDz3Q93 for ; Fri, 24 Apr 2026 00:54:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776992087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JJIqoR6y1iJqPlDMm6LrVRqNY84ptHfEqI9rlerMFP4=; b=ZN3v8w1UDsREYgb6+qxHgwC7QcUlVMs1+bSLx9LZggOktrnCBD3MPHwg4MA/uqRIAMgYeu LkvRqj73mFV6RZvXiBHJRWQ/9QGG7QW0wQ3YlOfFn8wVg/LCZqgj5MUIGTJMo1U8i16/51 3Yj34nlsORFnv9FNAMXr//VD153tvLGP1mBfbG4lxiF2gmen56aQGcCO4T8Er1JcLg78pt AU39UhoBtijKDrAnQ3+IxbuM8AN+skDmcxxGmkZ4/MDDxv+Hf3HOVEaVyw4LJYHOJWnjWh AcgVkl1BAje9iiJLce549IaxKgqzM3LP3nMYvH2U9ZUJMpEEUfTYXaxhugUpEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776992087; a=rsa-sha256; cv=none; b=T7aL9OfHAXFguuTKaad8MsANxYcoTi9V8ZWC0+FE8dUm4ZUBUykZgW2Wfe2Fy2OydfFstu zIiiBOn3eWTZfI71tSy/HCasm1zd7WPUci72Jt8IHekRzUmqMxrKkRTLVvvOxih2HPiGP1 KzcSmJd3Pi2FcPtKHoOgB4KE6ZDosbLFFgk8rF1Y41+NQW171Ksho+hPYGi6d5y3K76MOi KT462a4Ri5/3WuCwkiFZPaI59T1si7eEr+pGF/LwEQGGGYHH6q/xoTlhckIGN54vGfik5Q QAEL5u1REDRdm0yY92d+U2AmIRa4y2Z50XBx/ZDDteuMxaAcKupaHj+zYvB1ZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776992087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JJIqoR6y1iJqPlDMm6LrVRqNY84ptHfEqI9rlerMFP4=; b=D9C6je5RFdvYquIjWXRodji9aMKGlW2Jtx9j/FFM3s0SnHQHO4rrycMhG4G5YyUJJlGRt1 XvafELy4niNRoW2H0f/oAqJCSXs+Xz/EhEy+wgIS5Vhkp5aQsI2BNbiY8KtVhQzm65ZEzf XwGUCpi2L0nZ1YdSaEGyPAkMDxURTPoWjmYDtGjG2XNuqZDEdKRypI3AAvzwuBDlS00YkP QWVFQOnz1AZUfjcwqf5yNMh7RDfk8Rp9Nzj4c7lcPf0IuduPuNRQJ+oG1hFkBLNG4FiABX IzNX2WcZnzKbbDoT+8NKRhp+wLkdjO5+/yLr8VS8LqbRCjJ7TMWKJKgPO5763Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1vcl5dP9zgty for ; Fri, 24 Apr 2026 00:54:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 219a7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 00:54:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Christos Longros From: Jose Luis Duran Subject: git: c2b4fbdb45e9 - stable/13 - ping6: treat setsockopt failures as fatal List-Id: Commits to the stable branches 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: c2b4fbdb45e995c91afde8ab796270bc0dadea37 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 00:54:47 +0000 Message-Id: <69eabf57.219a7.3f25e4ca@gitrepo.freebsd.org> The branch stable/13 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=c2b4fbdb45e995c91afde8ab796270bc0dadea37 commit c2b4fbdb45e995c91afde8ab796270bc0dadea37 Author: Christos Longros AuthorDate: 2026-04-17 18:19:24 +0000 Commit: Jose Luis Duran CommitDate: 2026-04-24 00:53:10 +0000 ping6: treat setsockopt failures as fatal ping6 needs IPV6_RECVPKTINFO and IPV6_RECVHOPLIMIT to process incoming replies. When these options fail, replies are silently dropped and ping6 appears to hang. Use err(3) instead of warn(3) so the user gets a clear error and immediate exit. Signed-off-by: Christos Longros Reviewed by: pouria, jlduran, glebius MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56237 (cherry picked from commit 9a4a9f623bbaf991b3ba580593d47f2ee9f7b03b) --- sbin/ping/ping6.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/ping/ping6.c b/sbin/ping/ping6.c index d1f4c192b4c4..c029f7412dce 100644 --- a/sbin/ping/ping6.c +++ b/sbin/ping/ping6.c @@ -1119,21 +1119,21 @@ ping6(int argc, char *argv[]) #ifdef IPV6_RECVPKTINFO if (setsockopt(srecv, IPPROTO_IPV6, IPV6_RECVPKTINFO, &optval, sizeof(optval)) < 0) - warn("setsockopt(IPV6_RECVPKTINFO)"); /* XXX err? */ + err(1, "setsockopt(IPV6_RECVPKTINFO)"); #else /* old adv. API */ if (setsockopt(srecv, IPPROTO_IPV6, IPV6_PKTINFO, &optval, sizeof(optval)) < 0) - warn("setsockopt(IPV6_PKTINFO)"); /* XXX err? */ + err(1, "setsockopt(IPV6_PKTINFO)"); #endif #endif /* USE_SIN6_SCOPE_ID */ #ifdef IPV6_RECVHOPLIMIT if (setsockopt(srecv, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, &optval, sizeof(optval)) < 0) - warn("setsockopt(IPV6_RECVHOPLIMIT)"); /* XXX err? */ + err(1, "setsockopt(IPV6_RECVHOPLIMIT)"); #else /* old adv. API */ if (setsockopt(srecv, IPPROTO_IPV6, IPV6_HOPLIMIT, &optval, sizeof(optval)) < 0) - warn("setsockopt(IPV6_HOPLIMIT)"); /* XXX err? */ + err(1, "setsockopt(IPV6_HOPLIMIT)"); #endif cap_rights_clear(&rights_srecv, CAP_SETSOCKOPT); From nobody Fri Apr 24 04:46:23 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g20m01lmnz6bsF1 for ; Fri, 24 Apr 2026 04:46:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g20m0112Cz3r6Z for ; Fri, 24 Apr 2026 04:46:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777005984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wzASQSXToczHuxG73DDALX6fYxNHiBWKULq8B/0zU1o=; b=frpdNDDKGWGvnkb+g0s0fOWZUof/o+729tT62Q/b3b1HK7SWnfSrjgpm5PPPEutldeM/FU v4teoAaeRzUI9244cqCLyzoE0keWdYTpieADAbFO/05Suf9862fGVeoKptcF/1uyhWMBg6 5v9GPNOCTpwzc0oL5gnMfAF41njEvwVt3ehRdKVWGeEs7BekA2fnPG3bt5Za8uq2eVSzny Zv5Odu4cKr5Mv7YgCtiorEyr5ubq9JHVWtitDoMFsxtLp9wnlITWHoFiHL83wuFGVrUji2 aCSO1il7pVxZdQHZYKCFK8gc/67N/MR+y7FL3SBOnlOpsywsjWazuNovD2+1/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777005984; a=rsa-sha256; cv=none; b=KA+If2YE3I/Sk/kzSNgvAwzdISKG6sIS/FMYfqG19QPrtOkNf9BhWyIUEWmr/L6M4yVJg7 rVo/eho1QdPm7J+hJjpxDFzR2TrshIPAjibgRdX3UZrbjkTS++lsC9DKN4UTjavJSNhaBP OEPlLDRGXtUSDUQNiyJAu9GMFKYQz8+MseoMDglJ6uJ52AI7fktcMnfAe75U0X+iKKUzHH bQ/TVAvLiDbhn2ZPxW907gieVHyHfLK1rhNSJcKhWwuOGCqLmYvs4QQ5SPJpIcMHP4nrMu 7IqtanVBzmGjsiXcoMqFBmBDhkiz2L0BzBQED6Dg4FfkkDVl3twYn16qfk1x5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777005984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wzASQSXToczHuxG73DDALX6fYxNHiBWKULq8B/0zU1o=; b=Qwiv76vIJsWO8aB3DtGF45tr2axtkaeyKqWJ0MXyUwsGbIFiUkq7VvZ8yueiIFcgifT4UA goHACTKqDVs88toQPSsnG2oV1LxiJai/4quc0Lxa95H0AOlisGWCnuSkE8Ee0qJ3QGZw0e v3102o7aY5pUD91a6oY/inzRDWytKALxTZm9WfYI91+DUrG/lRAkXTgjCEpFyMxTqOHaGz 1zzZiFNSUAsRyvdnMMJn1aCNzrH6Xlyk5sJbb3m4TcWtDN/Ni3cH2uixfnQU5LIo3pkvt7 b0K2wkWjI2oA2IFnRYwpAFkeBMT2FsFzAsEgvctaFZ/yM9d0V42hD1S/lvjVWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g20m00Kxsznxj for ; Fri, 24 Apr 2026 04:46:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4169e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 04:46:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 89b81d732f43 - stable/15 - ippool(5): Correct example in man page List-Id: Commits to the stable branches 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: 89b81d732f43e2d6b159c5becda29ca5c7506d69 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 04:46:23 +0000 Message-Id: <69eaf59f.4169e.49ca5329@gitrepo.freebsd.org> The branch stable/15 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=89b81d732f43e2d6b159c5becda29ca5c7506d69 commit 89b81d732f43e2d6b159c5becda29ca5c7506d69 Author: Cy Schubert AuthorDate: 2026-04-17 04:05:59 +0000 Commit: Cy Schubert CommitDate: 2026-04-24 04:46:08 +0000 ippool(5): Correct example in man page The example provided puts the semicolon in the wrong place. It must come after the file:// specification, not in it. (cherry picked from commit f5d0b30e4af1163bdc18a893b17236517b67790a) --- sbin/ipf/ippool/ippool.5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ipf/ippool/ippool.5 b/sbin/ipf/ippool/ippool.5 index b45675bea069..1ab8681bef8b 100644 --- a/sbin/ipf/ippool/ippool.5 +++ b/sbin/ipf/ippool/ippool.5 @@ -121,7 +121,7 @@ addresses from. To do this simply use a "file://" URL where you would specify an actual IP address. .PP .nf -pool ipf/tree (name rfc1918;) { "file:///etc/ipf/rfc1918;" }; +pool ipf/tree (name rfc1918;) { "file:///etc/ipf/rfc1918"; }; .fi .PP The contents of the file might look something like this: From nobody Fri Apr 24 04:46:59 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g20mg3JQZz6bsSr for ; Fri, 24 Apr 2026 04:46:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g20mg29t6z3rGh for ; Fri, 24 Apr 2026 04:46:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777006019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O8OFQ8X0lbM+AzjEV0KTA1GeZp9g6iBC2meBZ8Hv1cc=; b=PeciD95O0PVTTmsOLLU0GZLmHMuCp1q9rXUhi6TPo7w9qXym5zhbSWjnW+sC9ioWIr44wI o0HuOtDY5cdgGCQ6cEg/L6DWKip2hD/fc0q5yZFV9CHwRabpZvaxZ9FHkwKbsC18iJ2qD6 PjmzOnS1XDvTX81YEpupS1a9RKzBw4U4Aygsy9fsDOtWGJ6ex1Xr5QEuFeYD9p2N5sYv/M C7ayCc7p7PZwTOLwaAld5ifB/hdqUPkm/6bI5XuzbRXueZxa8XliIW4+jcecvt1cLfJiid BsbI9Rb7YrdL73bcxN5veZDBNIkX1/67CLVu/SJgC9hP5z+6SmsAPvzPVAjV3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777006019; a=rsa-sha256; cv=none; b=FtAnJf9FdLrOnOCnNiUElOh+IZpqG69t1E0sVV0/ATcnbQR/SemwN7iPvZpXPajs65TFF4 v9BkGlRm5qPi8q9TcTXaE1eIC1bPDXvejUPBJhlaWGze2zOqVIPdArbPomwFTLeFBgomhM SwAJTP1PL+DDX7gfqAllOz0pAErB26VvjQnrTunfXpd5B2CRG6mTnkRP+ckS34v673CIu2 ql9ggVIw/ztZXFH69fX0KprOmo5sRWVvNlp9j1aE8FyN/A85JtMio6gMMpOs5OxnRr+GAO YM7eqRblNcvhzy405vEyc1sXRkF+xirlLHh7cTlgdVOvSPq4XAAD3whBdUyCKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777006019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O8OFQ8X0lbM+AzjEV0KTA1GeZp9g6iBC2meBZ8Hv1cc=; b=yuCimC3nQpVuOqwQHrY8xRx1mRG1hP//OuViCqne1rmeA1WPPhK2vJmIFi9BPqBttiJUXi GcDaBDzTq8EHQGrtOLRYp7l/aSf69EbJwGEnqdh5g03g+aG02Sj+IEdkUC4XcU7phGl7ZN FS42csgezYEIvIppsmVTJQwT3iLC30FhylUj3Aktz2zomAaMkxboQKWZ1HQaBk2woO4QhN Z7AKvmxFjLSr2pDPzIHE4ThR32tGw9Jv++5CncUN609XqwRAvVl53+U6vtFWAt4vhr2j+m AMChjYvf5b9HzBoArAP1i4ARE+qX4Sf2682kmXMJqyx08Z4CsdOd/18euO91DQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g20mg1jKGzpGS for ; Fri, 24 Apr 2026 04:46:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42381 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 04:46:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 94d944048226 - stable/14 - ippool(5): Correct example in man page List-Id: Commits to the stable branches 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/14 X-Git-Reftype: branch X-Git-Commit: 94d944048226a5dac1585a791d9cb5ccb75ee5b4 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 04:46:59 +0000 Message-Id: <69eaf5c3.42381.1f26d868@gitrepo.freebsd.org> The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=94d944048226a5dac1585a791d9cb5ccb75ee5b4 commit 94d944048226a5dac1585a791d9cb5ccb75ee5b4 Author: Cy Schubert AuthorDate: 2026-04-17 04:05:59 +0000 Commit: Cy Schubert CommitDate: 2026-04-24 04:46:49 +0000 ippool(5): Correct example in man page The example provided puts the semicolon in the wrong place. It must come after the file:// specification, not in it. (cherry picked from commit f5d0b30e4af1163bdc18a893b17236517b67790a) --- sbin/ipf/ippool/ippool.5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ipf/ippool/ippool.5 b/sbin/ipf/ippool/ippool.5 index 1adda3822422..97e831cfc8cc 100644 --- a/sbin/ipf/ippool/ippool.5 +++ b/sbin/ipf/ippool/ippool.5 @@ -124,7 +124,7 @@ addresses from. To do this simply use a "file://" URL where you would specify an actual IP address. .PP .nf -pool ipf/tree (name rfc1918;) { "file:///etc/ipf/rfc1918;" }; +pool ipf/tree (name rfc1918;) { "file:///etc/ipf/rfc1918"; }; .fi .PP The contents of the file might look something like this: From nobody Fri Apr 24 04:47:22 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g20n66NDyz6bsF7 for ; Fri, 24 Apr 2026 04:47:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g20n64RKVz3rpp for ; Fri, 24 Apr 2026 04:47:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777006042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cbbqV70UNglew6pkfEZbQeksAhAQPgFR88igJbtzoOk=; b=adOLjVBPtlKdCSjJF1KcG1tqt1GWXntUQfDG+H52UehCmKDS09M/ohwPlXcYkS+YTdZxnD 8JfeT/9ZtBLxkFcwD0hn1jdkOi4nEzkxiCjtIrBjImkiKx/DU53lu9FYMtMWp4rRcwjIRI AiyoZOuZMqH/NCpzOOUJnl+afjRqawtdJB/Nwgj0+sVUao4RargcWupbF8ryJGrGeQG8JA uFQvMNbsEfqpVu8x3edRxhUm2hrEygy4oML8LRWcisdsXV6aHduKO73T7jRNj5BbaqZ3Q9 7ZQyWG+Z4DhSLLL+zTbNLOvdS/O9KpM3zYG4+POSbb4WFRiTt9nUy+ny9kqOtQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777006042; a=rsa-sha256; cv=none; b=H1kr8qc+3rpZo25SO3Ub1EBGb1m0R+Njelw2Yt1scfYtsJVWq9V+WHdbC3U0oaP/0D/KKc DoEOfNmL9e8Gd+7sU5dtnFk3kVRjVcs/wkAic0+UMijOBVrPHqLYaUi567j8lN/MMujPV9 RJOCAljT5rdddrTXu04Fqfb/VzYODJpBTtPhAt5O7w5d2AS4GLM3HIQcA1EfgwBAPd9ZUL Gs3/s69oVOZBrUibjRkycyIO8jcX0Kw+j5AmX9TSRySaM2yVU8oYNqpgl2p2vbwDJXAv2J jWzETo3c03Tpjbi4bpc6BFdW212VpchWKoC6UQXzNLzsMFPS+8TXGFlrKwK0vg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777006042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cbbqV70UNglew6pkfEZbQeksAhAQPgFR88igJbtzoOk=; b=rLKX9xNkIk+rei/3xNIchePTI7motO6OvI3lTh6QfjoRk/thmPT26y8YKQLu9OI1wOipk4 kZzVBm8H3GCtlLlWHrh6QSqntU+6n/S/6WIxe6fUC8cip40TX+zmvyRKOl/N6pZqE5sJ12 r5PLokYg0LE15AuzkOj9eAurp99WKP/v6MKCJ4rmcy/KHQW2fur1DtmHCwt8Y7ZVJJC+fQ c/xe2qkxRlzXc9BshPnAqWFk47hatbWSc8bgMZq7Sw6sNtWR6q964fiIccEsmeMnMqZiYg Q320s/1f0UWK4ObEuuWypuXeixsxXQZOQZhZwQs3RO9OIJmXjvPvwwfBLU220w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g20n63klPznxn for ; Fri, 24 Apr 2026 04:47:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 416a2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 04:47:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 3246fe5f6167 - stable/13 - ippool(5): Correct example in man page List-Id: Commits to the stable branches 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/13 X-Git-Reftype: branch X-Git-Commit: 3246fe5f6167a40e813af5f1332e639efaab5f16 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 04:47:22 +0000 Message-Id: <69eaf5da.416a2.5f4a3d4@gitrepo.freebsd.org> The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=3246fe5f6167a40e813af5f1332e639efaab5f16 commit 3246fe5f6167a40e813af5f1332e639efaab5f16 Author: Cy Schubert AuthorDate: 2026-04-17 04:05:59 +0000 Commit: Cy Schubert CommitDate: 2026-04-24 04:47:14 +0000 ippool(5): Correct example in man page The example provided puts the semicolon in the wrong place. It must come after the file:// specification, not in it. (cherry picked from commit f5d0b30e4af1163bdc18a893b17236517b67790a) --- sbin/ipf/ippool/ippool.5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ipf/ippool/ippool.5 b/sbin/ipf/ippool/ippool.5 index 1adda3822422..97e831cfc8cc 100644 --- a/sbin/ipf/ippool/ippool.5 +++ b/sbin/ipf/ippool/ippool.5 @@ -124,7 +124,7 @@ addresses from. To do this simply use a "file://" URL where you would specify an actual IP address. .PP .nf -pool ipf/tree (name rfc1918;) { "file:///etc/ipf/rfc1918;" }; +pool ipf/tree (name rfc1918;) { "file:///etc/ipf/rfc1918"; }; .fi .PP The contents of the file might look something like this: From nobody Fri Apr 24 06:44:26 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g23NZ1g67z6Zbqf; Fri, 24 Apr 2026 06:44:46 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g23NZ0djlz43JZ; Fri, 24 Apr 2026 06:44:46 +0000 (UTC) (envelope-from zlei@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777013086; 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=EC4X/7Lmp78Vk3iZBoqwIbT2RfmINzInsbcRW7BLCxs=; b=ytVGlp/Tn2IsTRM7rsohYqlEjB0botgpb6e4AegQKVGjm3Z7gOfJPv/TL4xLbXU46gtuyQ W3t3iATevHSNWsrwNWKGFdP2scrrXAaR3pZGD2YES7yWovSOMHK/pb0DT0nJTajKmuOScm n5cnR+TjZjxShkeIMvOLh5M67OG+acOfqY5Sdsr3kTDq8vpjIUPRb8+CSwZsnIq4T6kA9/ 4OYtBOT7nevlRMFrGtf8DdF+m5i5/Cxh0CRFrPeKhu55tAfCbtrv58LGiB58HiWz9SYizg 1iCAMFCfNTP20GKgPe8FQyNKMhHZ8xdOPGrjDQp69yplFL9kvBX7sDaLcwd4ww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777013086; a=rsa-sha256; cv=none; b=NjG+jOrfFFHqSV1rxjMjP6PiwSZZIVv6QfdBKmz2TsPSPenrkmp6bC95eevMLFc9i7+3Ki 3cJwXPvQhdm87IDkaJrIgK9fFUii9t9dSe6LEyCu5VxSJLuqG3X1l8ks0TjwGNDbx0wNYa b98a0CaeW5L+ZYL7IqSTRKvNlaahiPZ5WWsbHarw2WcTiMWlT0WSGlyvYK/8SXc0v09VtB gXuDzdMcxfU67+bxfCLvkfw/qFS9ip5jOzlKRtOufMvffS506q62SWzibS49/X6yrLAjI2 AlpEWMUMjd6PJY9VSif+el/Vambv7hFZT3SnhoQaQqRgUZrSJvRqlUhfsyXUoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777013086; 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=EC4X/7Lmp78Vk3iZBoqwIbT2RfmINzInsbcRW7BLCxs=; b=KDZghIfZhjOFlaFjtwm4Bnfe8TLnJLgFVpmKHkHc9khO0tcnnxziDhwFhruk9KVqo4099B an1x06+ac6MoPQhi7O504qfI8cGCjUnjtSPUPrciEDBsxHcEZSsXGXwadfau1MaRFk/Rgq lcCQv+oSSA04WF20/FnJg7ZwcFQCryyg/rswQ1aU4C92uiyiwJDrYKqpdTmAAV0/aLZN48 WpZGgdgbqFyFNrID1tL2Rou7C6RhrGJF36PLPGWrV2rG3HaGYhXnkrPrShg6WKiSXkddtt FM/LaenargmZ+QATy3JFjcq0cdnVmqkZ+DU0gVeLFgK5qBQJmadbzHPwAhI9Nw== Received: from smtpclient.apple (unknown [IPv6:2001:19f0:6001:9db:98f0:9fe0:3545:10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: zlei/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4g23NT6NNGz2Lf; Fri, 24 Apr 2026 06:44:41 +0000 (UTC) (envelope-from zlei@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 \(3696.120.41.1.10\)) Subject: Re: git: df670d26ad5b - stable/14 - jail: consistently populate the KP_JID and KP_NAME parameters From: Zhenlei Huang In-Reply-To: <69e996e4.3ac9c.14b0bfb4@gitrepo.freebsd.org> Date: Fri, 24 Apr 2026 14:44:26 +0800 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-branches@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <1B692EB3-E2C4-4AB2-9694-2F24223E0E17@FreeBSD.org> References: <69e996e4.3ac9c.14b0bfb4@gitrepo.freebsd.org> To: Kyle Evans X-Mailer: Apple Mail (2.3696.120.41.1.10) > On Apr 23, 2026, at 11:49 AM, Kyle Evans wrote: >=20 > The branch stable/14 has been updated by kevans: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Ddf670d26ad5bebce71f39fc3bdc3ef11= ed0f1ea8 >=20 > commit df670d26ad5bebce71f39fc3bdc3ef11ed0f1ea8 > Author: Kyle Evans > AuthorDate: 2025-07-26 03:13:44 +0000 > Commit: Kyle Evans > CommitDate: 2026-04-23 03:22:59 +0000 >=20 > jail: consistently populate the KP_JID and KP_NAME parameters >=20 > The gaps here, specifically, were: > - When we have to discover a running jail's jid from name, we = should > populate the missing jid param > - When we populate jid/name from the config, if the name is a jid = we > wouldn't populate the name; now we do both. > - When we create a jail, we should populate jid and name with = whatever > details we have now that we didn't both. >=20 > As a consequence, we can cleanup a few things: > - vnet.interface and zfs.dataset can just always use the jid > - Trying to populate JNAME should always work now, where it would = be > a little crashy before if you create a jail that didn't have a = name > or jid on the command line > - We can simplify the just-prior JID population now that we'll = keep a > stringified jid in our intparams. >=20 > This primarily fixes the below, but the issues with vnet.interface = and > zfs.dataset were pre-existing. Thanks for doing this ! >=20 > Fixes: d8f021add40c3 ("jail: add JID, JNAME and JPATH to env = [...]") > Reviewed by: jamie >=20 > (cherry picked from commit = 02944d8c4969ffe97fcf84cb2ccb672e828c1d04) > --- > usr.sbin/jail/command.c | 36 ++++++--- > usr.sbin/jail/config.c | 13 +++- > usr.sbin/jail/jail.c | 7 ++ > usr.sbin/jail/tests/jail_basic_test.sh | 129 = +++++++++++++++++++++++++++++++++ > 4 files changed, 173 insertions(+), 12 deletions(-) >=20 > diff --git a/usr.sbin/jail/command.c b/usr.sbin/jail/command.c > index 20f28abc6706..26eaeca442a9 100644 > --- a/usr.sbin/jail/command.c > +++ b/usr.sbin/jail/command.c > @@ -291,8 +291,8 @@ run_command(struct cfjail *j) > const struct cfstring *comstring, *s; > login_cap_t *lcap; > const char **argv; > - char *acs, *ajidstr, *cs, *comcs, *devpath; > - const char *jidstr, *conslog, *path, *ruleset, *term, *username; > + char *acs, *cs, *comcs, *devpath; > + const char *conslog, *path, *ruleset, *term, *username; > enum intparam comparam; > size_t comlen; > pid_t pid; > @@ -333,6 +333,25 @@ run_command(struct cfjail *j) > printf("%d\n", j->jid); > if (verbose >=3D 0 && (j->name || verbose > 0)) > jail_note(j, "created\n"); > + > + /* > + * Populate our jid and name parameters if they = were not > + * provided. This simplifies later logic that = wants to > + * use the jid or name to be able to do so = reliably. > + */ > + if (j->intparams[KP_JID] =3D=3D NULL) { > + char ljidstr[16]; > + > + (void)snprintf(ljidstr, sizeof(ljidstr), = "%d", > + j->jid); > + add_param(j, NULL, KP_JID, ljidstr); > + } > + > + /* This matches the kernel behavior. */ > + if (j->intparams[KP_NAME] =3D=3D NULL) > + add_param(j, j->intparams[KP_JID], = KP_NAME, > + NULL); > + > dep_done(j, DF_LIGHT); > } > return 0; > @@ -457,8 +476,7 @@ run_command(struct cfjail *j) > argv[0] =3D _PATH_IFCONFIG; > argv[1] =3D comstring->s; > argv[2] =3D down ? "-vnet" : "vnet"; > - jidstr =3D string_param(j->intparams[KP_JID]); > - argv[3] =3D jidstr ? jidstr : = string_param(j->intparams[KP_NAME]); > + argv[3] =3D string_param(j->intparams[KP_JID]); > argv[4] =3D NULL; > break; >=20 > @@ -772,14 +790,10 @@ run_command(struct cfjail *j) > endpwent(); > } > if (!injail) { > - if (asprintf(&ajidstr, "%d", j->jid) =3D=3D -1) { > - jail_warnx(j, "asprintf jid=3D%d: %s", j->jid, > - strerror(errno)); > - exit(1); > - } > - setenv("JID", ajidstr, 1); > - free(ajidstr); > + if (string_param(j->intparams[KP_JID])) > + setenv("JID", = string_param(j->intparams[KP_JID]), 1); > setenv("JNAME", string_param(j->intparams[KP_NAME]), 1); > + > path =3D string_param(j->intparams[KP_PATH]); > setenv("JPATH", path ? path : "", 1); > } > diff --git a/usr.sbin/jail/config.c b/usr.sbin/jail/config.c > index 8c9ff0a7bd09..42498f01efd0 100644 > --- a/usr.sbin/jail/config.c > +++ b/usr.sbin/jail/config.c > @@ -156,11 +156,14 @@ load_config(const char *cfname) > TAILQ_CONCAT(&opp, &j->params, tq); > /* > * The jail name implies its "name" or "jid" parameter, > - * though they may also be explicitly set later on. > + * though they may also be explicitly set later on. = After we > + * collect other parameters, we'll go back and ensure = they're > + * both set if we need to do so here. > */ > add_param(j, NULL, > strtol(j->name, &ep, 10) && !*ep ? KP_JID : KP_NAME, > j->name); > + > /* > * Collect parameters for the jail, global = parameters/variables, > * and any matching wildcard jails. > @@ -180,6 +183,14 @@ load_config(const char *cfname) > TAILQ_FOREACH(p, &opp, tq) > add_param(j, p, 0, NULL); >=20 > + /* > + * We only backfill if it's the name that wasn't set; if = it was > + * the jid, we can assume that will be populated later = when the > + * jail is created or found. > + */ > + if (j->intparams[KP_NAME] =3D=3D NULL) > + add_param(j, j->intparams[KP_JID], KP_NAME, = NULL); > + > /* Resolve any variable substitutions. */ > pgen =3D 0; > TAILQ_FOREACH(p, &j->params, tq) { > diff --git a/usr.sbin/jail/jail.c b/usr.sbin/jail/jail.c > index 9e443c9f3f1d..c99fb162786b 100644 > --- a/usr.sbin/jail/jail.c > +++ b/usr.sbin/jail/jail.c > @@ -887,7 +887,14 @@ running_jid(struct cfjail *j, int dflag) > j->jid =3D -1; > return; > } > + > j->jid =3D jail_get(jiov, 2, dflag ? JAIL_DYING : 0); > + if (j->jid > 0 && j->intparams[KP_JID] =3D=3D NULL) { > + char jidstr[16]; > + > + (void)snprintf(jidstr, sizeof(jidstr), "%d", j->jid); > + add_param(j, NULL, KP_JID, jidstr); > + } > } >=20 > static void > diff --git a/usr.sbin/jail/tests/jail_basic_test.sh = b/usr.sbin/jail/tests/jail_basic_test.sh > index 51ccafb45f60..a6859b4dc7f2 100755 > --- a/usr.sbin/jail/tests/jail_basic_test.sh > +++ b/usr.sbin/jail/tests/jail_basic_test.sh > @@ -137,10 +137,139 @@ commands_cleanup() > fi > } >=20 > +atf_test_case "jid_name_set" "cleanup" > +jid_name_set_head() > +{ > + atf_set descr 'Test that one can set both the jid and name in a = config file' > + atf_set require.user root > +} > + > +find_unused_jid() > +{ > + : ${JAIL_MAX=3D999999} > + > + # We'll start at a higher jid number and roll through the space = until > + # we find one that isn't taken. We start high to avoid racing = parallel > + # activity for the 'next available', though ideally we don't = have a lot > + # of parallel jail activity like that. > + jid=3D5309 > + while jls -cj "$jid"; do > + if [ "$jid" -eq "$JAIL_MAX" ]; then > + atf_skip "System has too many jail, cannot find = free slot" > + fi > + > + jid=3D$((jid + 1)) > + done > + > + echo "$jid" | tee -a jails.lst > +} > +clean_jails() > +{ > + if [ ! -s jails.lst ]; then > + return 0 > + fi > + > + while read jail; do > + if jls -e -j "$jail"; then > + jail -r "$jail" > + fi > + done < jails.lst > +} > + > +jid_name_set_body() > +{ > + local jid=3D$(find_unused_jid) > + > + echo "basejail" >> jails.lst > + echo "$jid { name =3D basejail; persist; }" > jail.conf > + atf_check -o match:"$jid: created" jail -f jail.conf -c "$jid" > + atf_check -o match:"$jid: removed" jail -f jail.conf -r "$jid" > + > + echo "basejail { jid =3D $jid; persist; }" > jail.conf > + atf_check -o match:"basejail: created" jail -f jail.conf -c = basejail > + atf_check -o match:"basejail: removed" jail -f jail.conf -r = basejail > +} > + > +jid_name_set_cleanup() > +{ > + clean_jails > +} > + > +atf_test_case "param_consistency" "cleanup" > +param_consistency_head() > +{ > + atf_set descr 'Test for consistency in jid/name params being set = implicitly' > + atf_set require.user root > +} > + > +param_consistency_body() > +{ > + local iface jid > + > + echo "basejail" >> jails.lst > + > + # Most basic test: exec.poststart running a command without a = jail > + # config. This would previously crash as we only had the jid = and name > + # as populated at creation time. > + atf_check jail -c path=3D/ exec.poststart=3D"true" = command=3D/usr/bin/true > + > + iface=3D$(ifconfig lo create) > + atf_check test -n "$iface" > + echo "$iface" >> interfaces.lst > + > + # Now do it again but exercising IP_VNET_INTERFACE, which is an > + # implied command that wants to use the jid or name. This would = crash > + # as neither KP_JID or KP_NAME are populated when a jail is = created, > + # just as above- just at a different spot. > + atf_check jail -c \ > + path=3D/ vnet=3Dnew vnet.interface=3D"$iface" = command=3D/usr/bin/true > + > + # Test that a jail that we only know by name will have its jid = resolved > + # and added to its param set. > + echo "basejail {path =3D /; exec.prestop =3D 'echo STOP'; = persist; }" > jail.conf > + > + atf_check -o ignore jail -f jail.conf -c basejail > + atf_check -o match:"STOP" jail -f jail.conf -r basejail > + > + # Do the same sequence as above, but use a jail with a jid-ish = name. > + jid=3D$(find_unused_jid) > + echo "$jid {path =3D /; exec.prestop =3D 'echo STOP'; persist; = }" > jail.conf > + > + atf_check -o ignore jail -f jail.conf -c "$jid" > + atf_check -o match:"STOP" jail -f jail.conf -r "$jid" > + > + # Ditto, but now we set a name for that jid-jail. > + echo "$jid {name =3D basejail; path =3D /; exec.prestop =3D = 'echo STOP'; persist; }" > jail.conf > + > + atf_check -o ignore jail -f jail.conf -c "$jid" > + atf_check -o match:"STOP" jail -f jail.conf -r "$jid" > + > + # Confirm that we have a valid jid available in exec.poststop. = It's > + # probably debatable whether we should or not. > + echo "basejail {path =3D /; exec.poststop =3D 'echo JID=3D\$JID'; = persist; }" > jail.conf > + atf_check -o ignore jail -f jail.conf -c basejail > + jid=3D$(jls -j basejail jid) > + > + atf_check -o match:"JID=3D$jid" jail -f jail.conf -r basejail > + > +} > + > +param_consistency_cleanup() > +{ > + clean_jails > + > + if [ -f "interfaces.lst" ]; then > + while read iface; do > + ifconfig "$iface" destroy > + done < interfaces.lst > + fi > +} >=20 > atf_init_test_cases() > { > atf_add_test_case "basic" > atf_add_test_case "nested" > atf_add_test_case "commands" > + atf_add_test_case "jid_name_set" > + atf_add_test_case "param_consistency" > } >=20 From nobody Fri Apr 24 12:29:20 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2C284f70z6bB0d for ; Fri, 24 Apr 2026 12:29: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2C2842Xqz3vG9 for ; Fri, 24 Apr 2026 12:29:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777033760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6M/0X0Ur5w6Jb6Ad9A0wMV/OWe4fF3b0UjZS//bJYpE=; b=yM8PDLivS/exB+Djsj3NKzE1kbZFEUVOKrzJ4LDJNLMBpHKZlTjxblLxoIl2KjGxOJ9zBH gy3twgPcY92i40dUOShzLEarM7oQ2PsRUpEYZXXs89kKHaZWgSJyVzAm7UwLbvAQTwCchD NOan9mHeMazLdGuMQOVhYN6CMyEiQflA2o/bRavpuwu9uRTKpsiLF+P3LjggOILqf9jmXO PhTTmDGCFcV3YvywL2YtxmyQZgQTjR9T2uAQ6jakuHBE+/bRiC6WTxBIPyxt/R8UR34jcb G30qbwKYXhBpeq3os4RVid+GOdXOTv24UJv1JAdE4fKv7nrx99mzk6Lq8eoypw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777033760; a=rsa-sha256; cv=none; b=OL+dPBYeYaSQctKLYjrgBDNErGVX+SSBp6DHsaL8Vh+Bh74uYXQGripDGAcUPXZuWw5Loi nIAjKJ/PG9zqHYsOd60pFHwXJ5aiukcmMYuf6zzWz3z34p+CayYJ9Y6MXjEmRCZ0G0Hgor tRIMjE4iZbQ3/Mpf13DMwg/a4AOHaeNmtWSytIs8PWWslGYYBMuuS8sYcEBXvsYoc8PP9F oD/IL/A8dIq2x+XLpGu2HSmpCGAf1o8WA8rfOayug1IBn6UnHlqhybsA9mTwR1ff7dFTdJ zMQxNzSehHtsej8dZ7FJe4Pa5PdaOnx47+hALEHO1v1Xbu6VwL3AOdR3uc22Gg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777033760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6M/0X0Ur5w6Jb6Ad9A0wMV/OWe4fF3b0UjZS//bJYpE=; b=i3/slyhaGVmeN2qEQQMp3vOBbposyb2mP2QTAoSayo6orw0f9TLgghu0teryHxwhqEfGbD eFGVLcrfI2RV/nHwhDU4EdMvQa8qz/BSC8HwCKL9wMlV5ZckpMRHzKxR/VYwlhb271sAqK a3umK884jjCXMRTrMjm9OsGF9S1vJUwhfXEqZD4bEZtXYKKdFurWNrWORw6h3NePcxXd8w 8G1xU29tOf0XYX22tf6Qr0/+TUC2a+RH6EnJFniiBApsia2YlokIZXcurp707xSolXc8I5 ETyEcTl1dus31GySfvk9rNo3TynruotA2nqX00Xg2fQ0CyLDYMFkB09OyHVoJw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2C283dK2z137X for ; Fri, 24 Apr 2026 12:29:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1a181 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 12:29:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 8a1693d0cc53 - stable/15 - dpaa2: 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: 8a1693d0cc5361362165010e8f529a76d29b52dc Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 12:29:20 +0000 Message-Id: <69eb6220.1a181.3665a540@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=8a1693d0cc5361362165010e8f529a76d29b52dc commit 8a1693d0cc5361362165010e8f529a76d29b52dc Author: Michael Tuexen AuthorDate: 2026-01-21 07:16:46 +0000 Commit: Michael Tuexen CommitDate: 2026-04-24 12:24:38 +0000 dpaa2: cleanup No functional change intended. Reviewed by: bz, dsl Differential Revision: https://reviews.freebsd.org/D54805 (cherry picked from commit d8b8dc776b7ce28bff8939dd185b4d6554b5e351) --- sys/dev/dpaa2/dpaa2_ni.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/sys/dev/dpaa2/dpaa2_ni.c b/sys/dev/dpaa2/dpaa2_ni.c index 948e903f4329..d94770b3c3ec 100644 --- a/sys/dev/dpaa2/dpaa2_ni.c +++ b/sys/dev/dpaa2/dpaa2_ni.c @@ -2615,26 +2615,10 @@ dpaa2_ni_ioctl(if_t ifp, u_long c, caddr_t data) break; case SIOCSIFCAP: changed = if_getcapenable(ifp) ^ ifr->ifr_reqcap; - if (changed & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) { - if ((ifr->ifr_reqcap & changed) & - (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) { - if_setcapenablebit(ifp, - IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6, 0); - } else { - if_setcapenablebit(ifp, 0, - IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6); - } - } - if (changed & (IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6)) { - if ((ifr->ifr_reqcap & changed) & - (IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6)) { - if_setcapenablebit(ifp, - IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6, 0); - } else { - if_setcapenablebit(ifp, 0, - IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6); - } - } + if ((changed & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) != 0) + if_togglecapenable(ifp, IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6); + if ((changed & (IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6)) != 0) + if_togglecapenable(ifp, IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6); rc = dpaa2_ni_setup_if_caps(sc); if (rc) { From nobody Fri Apr 24 12:30:23 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2C3N48FYz6bBH0 for ; Fri, 24 Apr 2026 12:30:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2C3N3B0Gz3vVW for ; Fri, 24 Apr 2026 12:30:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777033824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R5t/ZD1l7D0gtzWzPCORJPREmTtBMS8irlc7Lm9Eapc=; b=ypZbqteclk/9wPq4lLth52/d/9lxXCMpIwgX+1RrgJKcmEwSaiQPE8kqBe8ET5yvbLtZXE sa7/OWuauTg333zUSvN+UZvhZteowL7y6Lt5iKQHeSIPhhLQetML4zgSomw5hJNky8JA8m vWy54+VgzCOf2opBx05FK/R6UGdgA2ULfoAxU67S17Q8c0uC0C484t4ap4UOxGX/ztEztI TvnRzjmWN6VTpaeUHWqbPh/3MeoRALhFYvXWN9LgdM162Dfpg6PHf260stB0hWG5JXtWv8 dTRpODhPaTBb0IhrxJZR6DHYuOEwQL/VNw+Peqqcj/5WExKqPye7JFJqQrOYVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777033824; a=rsa-sha256; cv=none; b=jRC4rWcc23Z2Tqn+8GS7K3T0RqmN57UWkKnLpd8PE6bts5Vq/fuf+E5qxxAYrcTYoyvBSh rzCdyLmknweaOQ7qdcj/h0dIf/9r7kjux+N15MQ/ZajsLuzWIIuPCC5YlKnAiEWDfF/Q5+ Ey3/E7FGtBQfsUq7ymD9gFGrc8S3Vk2mbPgGan0GnFpZqo8pPt3XuTc9JG4WvXJKguXby1 CyioZGcn9xt+DTzAydseDV6rKfH6eyEtsTZa3tmLH2QtHBabFBGJWlwxK/WhbnM7j9nJop +5+Z8HFaFdbtJDUIN4Q7PJfg1KhS+M9Y17G//T0oTgvvqoOnmwqVqj4QL6ofPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777033824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R5t/ZD1l7D0gtzWzPCORJPREmTtBMS8irlc7Lm9Eapc=; b=gAMBizETIAQPcYsnXSe+om+UxXFpTRMhEO9oN/wCs4xW7hs9tUn8u96JHNymid91v0F36W Mp6bmpiFi23m0Na2JuEGiKcaeY8JVAwlIzkPRZIVD4Dm8Wn6qzyqBR3KW9EOlKE4RDksO2 G5AD40IcOGAJtk1txOvx7yyVJgeRAdXqJCfCB29TotkjW832VjyqHokWVNTWZV7JrDApT+ 3bYqqAFpFX41Ai2UOgbXmr5H8PAJ1AUhCZH3PBuk78pAuvlyh+0B5Db1U+lByb+W5uR+KH fWOe9W/awqBBVNZ6tI48WWD+QhFzu+NyaFPUI+17DDCECB1g/nkneD7LzoMcwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2C3N083fz139m for ; Fri, 24 Apr 2026 12:30:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1a65a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 12:30:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: b9446b22bcf6 - stable/15 - dpnaa2: announce transmit checksum 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b9446b22bcf61500a628f42bf04a7a4d6fcbee76 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 12:30:23 +0000 Message-Id: <69eb625f.1a65a.77ff964e@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=b9446b22bcf61500a628f42bf04a7a4d6fcbee76 commit b9446b22bcf61500a628f42bf04a7a4d6fcbee76 Author: Michael Tuexen AuthorDate: 2026-01-23 07:59:57 +0000 Commit: Michael Tuexen CommitDate: 2026-04-24 12:29:06 +0000 dpnaa2: announce transmit checksum support Let the network stack know that the NIC supports checksum offloading for the IPv4 header checksum and the TCP and UDP transport checksum. This avoids the computation in software and therefore provides the expected performance gain. PR: 292006 Reviewed by: dsl, Timo Völker Differential Revision: https://reviews.freebsd.org/D54809 (cherry picked from commit f31336b3e3146fed9cc517fef8e877c17496f9e0) --- sys/dev/dpaa2/dpaa2_ni.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/dev/dpaa2/dpaa2_ni.c b/sys/dev/dpaa2/dpaa2_ni.c index d94770b3c3ec..460e2a02a9a7 100644 --- a/sys/dev/dpaa2/dpaa2_ni.c +++ b/sys/dev/dpaa2/dpaa2_ni.c @@ -210,6 +210,9 @@ MALLOC_DEFINE(M_DPAA2_TXB, "dpaa2_txb", "DPAA2 DMA-mapped buffer (Tx)"); #define RXH_L4_B_2_3 (1 << 7) /* dst port in case of TCP/UDP/SCTP */ #define RXH_DISCARD (1 << 31) +/* Transmit checksum offload */ +#define DPAA2_CSUM_TX_OFFLOAD (CSUM_IP | CSUM_DELAY_DATA | CSUM_DELAY_DATA_IPV6) + /* Default Rx hash options, set during attaching. */ #define DPAA2_RXH_DEFAULT (RXH_IP_SRC | RXH_IP_DST | RXH_L4_B_0_1 | RXH_L4_B_2_3) @@ -567,6 +570,7 @@ dpaa2_ni_attach(device_t dev) if_settransmitfn(ifp, dpaa2_ni_transmit); if_setqflushfn(ifp, dpaa2_ni_qflush); + if_sethwassist(sc->ifp, DPAA2_CSUM_TX_OFFLOAD); if_setcapabilities(ifp, IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6 | IFCAP_JUMBO_MTU); if_setcapenable(ifp, if_getcapabilities(ifp)); @@ -2617,8 +2621,10 @@ dpaa2_ni_ioctl(if_t ifp, u_long c, caddr_t data) changed = if_getcapenable(ifp) ^ ifr->ifr_reqcap; if ((changed & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) != 0) if_togglecapenable(ifp, IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6); - if ((changed & (IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6)) != 0) - if_togglecapenable(ifp, IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6); + if ((changed & (IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6)) != 0) { + if_togglecapenable(ifp, IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6); + if_togglehwassist(ifp, DPAA2_CSUM_TX_OFFLOAD); + } rc = dpaa2_ni_setup_if_caps(sc); if (rc) { From nobody Fri Apr 24 12:31:55 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2C575C9mz6bB8B for ; Fri, 24 Apr 2026 12:31:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2C574Tzkz3w07 for ; Fri, 24 Apr 2026 12:31:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777033915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C5Nd/0iHlVC0h7xbQmjiSaMdyQi+MnXa2B9vXEAhLtY=; b=PpBj3jyv0F89kDT/isXkBQRhM0D5vSVu75HvTzdpJhheEJrqs7usvnCukBru+gbKhbqStN xtGS2MddYxge11zKIIjPQFd9k+EHTpJPWCPrCftIGkRNLDbk02NmUuh+Yp9C5fGgKz3Tkf 2fP64KuiRMQygBq6or7VaEsF6CzMi5t1WXz4mpy8VenK0eWOczo/S8ljLXGaDp6ZmSfa5X rWi4xwtBSe5Zgl3zs1Nu/pRYZOYI5cg9LMm4o0c9wOwdoH3wV3C7v6xZqZoZGSmR0n4/u1 58QCMHWsmpIH3Txxgu/ALW4p3YBxM9O/Fyr/zaZiQUQe3XZ6DsrWL8dN9LoSlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777033915; a=rsa-sha256; cv=none; b=LO72GZ5esavs9DAkbzavHuqaF/pVVVbHqsJGy01xWwXc1MmM72dcA1RKOZjtKTXAZiUVWg am/YdeZaRTwVK2+r5hulW70RHprlPtDr41e3kBhlKOFZWeQsK3hSzyHcqhhOD+H5aniIRu UTiDaNREvYPA5YdhLtaOzBu4xBrvYhh9k8BG+1ZDh34AWUQp6ugVxeFIbhVJah4pzR4XbD oma2xyRwUINNSyvgmOEWR49k6lMdc9Leh1MoTVQoXMurcGWV07i88baViuM9ovPkyN6wvc p4c4n8EUi3cGF8ZWG3oqsAv4X7y1qP4WwZESlfbvCeYO7ccRcphsR5rua1C3WQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777033915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C5Nd/0iHlVC0h7xbQmjiSaMdyQi+MnXa2B9vXEAhLtY=; b=uwHx/Tn7Q7nRFa2Ke5t8WKvFQCDlZqQBYN1h8h4pumj+THM7uInAgMiZDiZPY16NUSt8I1 LhLt6rzvW5pEj0m+TX5lHNna73ORCVc6WSbZltyKA/NDwQXr+tc4L6ZxmD9IRhEk8biYt2 QMgXGWeYLAUB6l6hhDGwouGvoOonGvCXEc4STGAcAXqXq91PKXlVsX0ROsYna/CJLHDd84 SGxIe8g6UJVcXzTZB/guZHyAswEYx0qa8hPi5bUnhcL1BGJZV1fuL/Ow8y22MYODyCQQ0r dRS09ScdK4MccOJVwggypwWK0/cm3aksmJ8maRKYMnuPSct0xptwJE45zEo1cg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2C57426Mz136W for ; Fri, 24 Apr 2026 12:31:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1bc81 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 12:31:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 2fce3f27127b - stable/15 - dpaa2: add support for several interface counters List-Id: Commits to the stable branches 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: 2fce3f27127b9ec47b156d6ed883d550fabe46cc Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 12:31:55 +0000 Message-Id: <69eb62bb.1bc81.1e5541bd@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=2fce3f27127b9ec47b156d6ed883d550fabe46cc commit 2fce3f27127b9ec47b156d6ed883d550fabe46cc Author: Michael Tuexen AuthorDate: 2026-01-30 09:58:57 +0000 Commit: Michael Tuexen CommitDate: 2026-04-24 12:30:09 +0000 dpaa2: add support for several interface counters Add support for IFCOUNTER_IPACKETS, IFCOUNTER_OPACKETS, IFCOUNTER_OBYTES, IFCOUNTER_OMCASTS, IFCOUNTER_OERRORS, and IFCOUNTER_OQDROPS. This allows tools like systat to report the incoming and outgoing bandwidth. Reviewed by: dsl, Timo Völker Differential Revision: https://reviews.freebsd.org/D54893 (cherry picked from commit 33596d92555e5b1632fca14eb9af295e4b8f751c) --- sys/dev/dpaa2/dpaa2_ni.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sys/dev/dpaa2/dpaa2_ni.c b/sys/dev/dpaa2/dpaa2_ni.c index 460e2a02a9a7..f85dc41a748c 100644 --- a/sys/dev/dpaa2/dpaa2_ni.c +++ b/sys/dev/dpaa2/dpaa2_ni.c @@ -2549,6 +2549,7 @@ dpaa2_ni_transmit(if_t ifp, struct mbuf *m) ch = sc->channels[chidx]; error = buf_ring_enqueue(ch->xmit_br, m); if (__predict_false(error != 0)) { + if_inc_counter(ifp, IFCOUNTER_OQDROPS, 1); m_freem(m); } else { taskqueue_enqueue(ch->cleanup_tq, &ch->cleanup_task); @@ -2960,6 +2961,8 @@ dpaa2_ni_tx(struct dpaa2_ni_softc *sc, struct dpaa2_channel *ch, bus_dma_segment_t segs[DPAA2_TX_SEGLIMIT]; int rc, nsegs; int error; + int len; + bool mcast; mtx_assert(&tx->lock, MA_NOTOWNED); mtx_lock(&tx->lock); @@ -2974,6 +2977,8 @@ dpaa2_ni_tx(struct dpaa2_ni_softc *sc, struct dpaa2_channel *ch, buf->m = m; sgt = buf->sgt; } + len = m->m_pkthdr.len; + mcast = (m->m_flags & M_MCAST) != 0; #if defined(INVARIANTS) struct dpaa2_ni_tx_ring *btx = (struct dpaa2_ni_tx_ring *)buf->opt; @@ -2991,6 +2996,7 @@ dpaa2_ni_tx(struct dpaa2_ni_softc *sc, struct dpaa2_channel *ch, if (md == NULL) { device_printf(dev, "%s: m_collapse() failed\n", __func__); fq->chan->tx_dropped++; + if_inc_counter(sc->ifp, IFCOUNTER_OERRORS, 1); goto err; } @@ -3001,6 +3007,7 @@ dpaa2_ni_tx(struct dpaa2_ni_softc *sc, struct dpaa2_channel *ch, device_printf(dev, "%s: bus_dmamap_load_mbuf_sg() " "failed: error=%d\n", __func__, error); fq->chan->tx_dropped++; + if_inc_counter(sc->ifp, IFCOUNTER_OERRORS, 1); goto err; } } @@ -3010,6 +3017,7 @@ dpaa2_ni_tx(struct dpaa2_ni_softc *sc, struct dpaa2_channel *ch, device_printf(dev, "%s: failed to build frame descriptor: " "error=%d\n", __func__, error); fq->chan->tx_dropped++; + if_inc_counter(sc->ifp, IFCOUNTER_OERRORS, 1); goto err_unload; } else sc->tx_sg_frames++; /* for sysctl(9) */ @@ -3028,8 +3036,13 @@ dpaa2_ni_tx(struct dpaa2_ni_softc *sc, struct dpaa2_channel *ch, if (rc != 1) { fq->chan->tx_dropped++; + if_inc_counter(sc->ifp, IFCOUNTER_OERRORS, 1); goto err_unload; } else { + if (mcast) + if_inc_counter(sc->ifp, IFCOUNTER_OMCASTS, 1); + if_inc_counter(sc->ifp, IFCOUNTER_OPACKETS, 1); + if_inc_counter(sc->ifp, IFCOUNTER_OBYTES, len); fq->chan->tx_frames++; } return; @@ -3233,6 +3246,7 @@ dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, m->m_pkthdr.rcvif = sc->ifp; m->m_pkthdr.flowid = fq->fqid; M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); + if_inc_counter(sc->ifp, IFCOUNTER_IPACKETS, 1); if (update_csum_flags && ((if_getcapenable(sc->ifp) & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) != 0)) { From nobody Fri Apr 24 13:17:50 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2D663V6mz6bFnF for ; Fri, 24 Apr 2026 13:17:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2D6622qXz43rs for ; Fri, 24 Apr 2026 13:17:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777036670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=byaoS3jUwkStc+DtbU5N8kc9V7F/CSOfUklJSQ1Npyg=; b=IkvDOCJwrZSr9VuE5dgIe1PHlJvt7AMVEOW7rZsjtsW6Ju2akSC0fu8MTA2KixEM7sTHhV NBT3l/HIVx1pJ1RAG6fAtMiiIGfWzOhOUXwpPyd8TeUHR0WdnKL+ISRShYdLr2m6Sn4As+ f4pouTaRynIF2hVhIcHq9qw/OnGw79lACVhD0yzjY4TiHVbzwIFnGOSrtREyQ79tpMJ4EW vjIHtAT9PuXWK/SmxcUfpq17CHv8etKsFx/wp+3OPEORcQSqsye9wosyUjJFrJlUSa8eAs AYcDsmw8bO3zLJHoSWotAEszm/4JRV0ow4JetPWSimFRnUFFUbNfbdhRTQkdzg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777036670; a=rsa-sha256; cv=none; b=vvIrFuT9APcKRhwrmO8cmi8eAFp/wrgsAQDGcnt9rr3Q6DENVKy6In2OlAFiNz9+IMjmBU BNRSYpkkVIqN8T8+MDAMD3VIvTV5skX0Sj1kVwPO+fgp8I6uJ3vXIpATMp4QZ0u1PzxwOm lcYqZCd81OUIe9Khif1QjNNq7O0AZZPz85RLvlxXCck5JJa1U58elF+u2+LuX86C+I901k RZ9VxwIOkwpuVJbiGgQI9u8rwgWMimCK21bbx/kvwhNLtd1gFY4yNOKmLQ2BXpez4ZlPo+ 8pyD6z49KxlbbJN6NDRbXWM+q1mZxHEAlkcZai26siccMCLgW//fuP26XOqmpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777036670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=byaoS3jUwkStc+DtbU5N8kc9V7F/CSOfUklJSQ1Npyg=; b=udpg3u1aWm+xO84zP3JD4Tm2/9nvby9EvLjLpKnfwSFy89P2DvbNQCuea0P9J0VKGYNeAZ i2/p9UiMiwnblLOWkqjlOuIX1Nu8DUy/hy9qmthQerwYt1NB/k4/pw2/oM+kpm+1UJhfDi fO7I/+u7Jv8mzbc/kCzdTBOFZArxLQFE/bcvIQ6ihPy6vxk6BUYSgPYEjdPT0RZ9SPgNOM psvyQR8umjN0tGC4TtweEY9cePKsQzs+CaFGovFBvV5Sm4dIBpzWrXYkHCOX3sMmY6VOAN rLatezkUn2Cx+GilEDgulIksKtgyOij9w+b+FR6qHIW0sbJYxTxwSjlC0Cj1FQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2D661S3wz14Jg for ; Fri, 24 Apr 2026 13:17:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1fb7f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 13:17:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 074f7743a9ab - stable/14 - dpaa2: 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: 074f7743a9aba904db96a866ed9ac87936ac09f4 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 13:17:50 +0000 Message-Id: <69eb6d7e.1fb7f.7eb5ec4c@gitrepo.freebsd.org> The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=074f7743a9aba904db96a866ed9ac87936ac09f4 commit 074f7743a9aba904db96a866ed9ac87936ac09f4 Author: Michael Tuexen AuthorDate: 2026-01-21 07:16:46 +0000 Commit: Michael Tuexen CommitDate: 2026-04-24 11:09:54 +0000 dpaa2: cleanup No functional change intended. Reviewed by: bz, dsl Differential Revision: https://reviews.freebsd.org/D54805 (cherry picked from commit d8b8dc776b7ce28bff8939dd185b4d6554b5e351) --- sys/dev/dpaa2/dpaa2_ni.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/sys/dev/dpaa2/dpaa2_ni.c b/sys/dev/dpaa2/dpaa2_ni.c index 5f9282e120e4..20d4440b5532 100644 --- a/sys/dev/dpaa2/dpaa2_ni.c +++ b/sys/dev/dpaa2/dpaa2_ni.c @@ -2583,26 +2583,10 @@ dpaa2_ni_ioctl(if_t ifp, u_long c, caddr_t data) break; case SIOCSIFCAP: changed = if_getcapenable(ifp) ^ ifr->ifr_reqcap; - if (changed & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) { - if ((ifr->ifr_reqcap & changed) & - (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) { - if_setcapenablebit(ifp, - IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6, 0); - } else { - if_setcapenablebit(ifp, 0, - IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6); - } - } - if (changed & (IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6)) { - if ((ifr->ifr_reqcap & changed) & - (IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6)) { - if_setcapenablebit(ifp, - IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6, 0); - } else { - if_setcapenablebit(ifp, 0, - IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6); - } - } + if ((changed & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) != 0) + if_togglecapenable(ifp, IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6); + if ((changed & (IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6)) != 0) + if_togglecapenable(ifp, IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6); rc = dpaa2_ni_setup_if_caps(sc); if (rc) { From nobody Fri Apr 24 13:24:27 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2DFl2yX6z6bGbp for ; Fri, 24 Apr 2026 13:24:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2DFl2Hnvz44q7 for ; Fri, 24 Apr 2026 13:24:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777037067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=keiv7X7SdUeXOk7RNsO7ZRdnxqtm6slMcD2mZwDB+5c=; b=ndlfCn4VCEnZNhepADURdaebeBbdRhlKQp/DFB9Xs+hYtEYA1+NdXQ12Gv0I1B52k8q0QQ zdpCcREMnx4dNulw6az3gWXVEFXddN4zW1IW2B1p+JUSr5g1ECuoK2nVpvYRcMOz48cgxx xZNBDwdU1UWlEUwgfKQFxJEwuX7/VjE63f5ULICQmG7Np1okKDXIvWoYbPmf/OI0oc9tkT 5nrEnIbYTHtDRfmvNlL1iLjmOKaIOa6wZWMjJgP5y6f9FWiT3/NhWssrQC+nzHpe+aqLVC 21CCOzO2QxF0zKfChYyBMH64pWsWzXaTVQafinWDl7fhwKi6xCtkV2LnVZ58ZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777037067; a=rsa-sha256; cv=none; b=uOXGVOXhbNgy1PFZpU2OzVKhV7wLg+wndEmnWbispWZmPio6YibiW6zKgmKPwoR85gAA7V fvoehTF90J71cHRvN3o2dPlLIFhI8z82hOGHfZAiIcri30FJaMoZ5jgV9oqvl0yFhBLLDq azDjixJZzsTW2gM/25lW4+xWK2HktzxU0/OdHaW9rhtTEoDOkEpuDNslABv3HyQwtu5MxZ 803YDZwUIe7jfllWICStAM4eQYTMAJBoMbqXQMp2Pqxu7dItFfbkny6MA3aTq4cD892WB/ 4fAkBW8RaYBwCFq4k+ZPkhf17vNLNzXeT1GVWlB5++8TrBY+1/oHWCTzt9VRZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777037067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=keiv7X7SdUeXOk7RNsO7ZRdnxqtm6slMcD2mZwDB+5c=; b=C9a8KvWF0EXBzvMR+avGy9uJK/0A3k0AWq6uJ500/lKNr+X7qyQgyY+KIiATTgC7QxPMb9 /yq9sDiFRASb00amKRYTOKZQPf5pq3p8ThGGKcA3hsGW8G58UERb5bfqUx95oXUGKZn0gj b09SYBDD7wo5cScJAUXHMAzeTqK1tfu2KIxrB+x5C8240Dk7Hw6E83niOP5tprpndznR8y DmhyUMso5MlS25xRquKnYOUbm0q2NoVr2czsiiV32vH2iGpdXTPPI+rvWfDgWAoWidqWT7 pHSy4ttNm8uNk6Al+ToVpFAs0Yy5Ed7EZy4hVrEkN3679DN2K8BP+Qg1tf+Y2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2DFl1H6Yz14WY for ; Fri, 24 Apr 2026 13:24:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1ead8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 13:24:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: e820964dc7c4 - stable/14 - dpnaa2: announce transmit checksum 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e820964dc7c4626a9f51f534434109418caa3acb Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 13:24:27 +0000 Message-Id: <69eb6f0b.1ead8.2f825e26@gitrepo.freebsd.org> The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=e820964dc7c4626a9f51f534434109418caa3acb commit e820964dc7c4626a9f51f534434109418caa3acb Author: Michael Tuexen AuthorDate: 2026-01-23 07:59:57 +0000 Commit: Michael Tuexen CommitDate: 2026-04-24 11:17:23 +0000 dpnaa2: announce transmit checksum support Let the network stack know that the NIC supports checksum offloading for the IPv4 header checksum and the TCP and UDP transport checksum. This avoids the computation in software and therefore provides the expected performance gain. PR: 292006 Reviewed by: dsl, Timo Völker Differential Revision: https://reviews.freebsd.org/D54809 (cherry picked from commit f31336b3e3146fed9cc517fef8e877c17496f9e0) --- sys/dev/dpaa2/dpaa2_ni.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/dev/dpaa2/dpaa2_ni.c b/sys/dev/dpaa2/dpaa2_ni.c index 20d4440b5532..f72217084cdd 100644 --- a/sys/dev/dpaa2/dpaa2_ni.c +++ b/sys/dev/dpaa2/dpaa2_ni.c @@ -209,6 +209,9 @@ MALLOC_DEFINE(M_DPAA2_TXB, "dpaa2_txb", "DPAA2 DMA-mapped buffer (Tx)"); #define RXH_L4_B_2_3 (1 << 7) /* dst port in case of TCP/UDP/SCTP */ #define RXH_DISCARD (1 << 31) +/* Transmit checksum offload */ +#define DPAA2_CSUM_TX_OFFLOAD (CSUM_IP | CSUM_DELAY_DATA | CSUM_DELAY_DATA_IPV6) + /* Default Rx hash options, set during attaching. */ #define DPAA2_RXH_DEFAULT (RXH_IP_SRC | RXH_IP_DST | RXH_L4_B_0_1 | RXH_L4_B_2_3) @@ -541,6 +544,7 @@ dpaa2_ni_attach(device_t dev) if_settransmitfn(ifp, dpaa2_ni_transmit); if_setqflushfn(ifp, dpaa2_ni_qflush); + if_sethwassist(sc->ifp, DPAA2_CSUM_TX_OFFLOAD); if_setcapabilities(ifp, IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6 | IFCAP_JUMBO_MTU); if_setcapenable(ifp, if_getcapabilities(ifp)); @@ -2585,8 +2589,10 @@ dpaa2_ni_ioctl(if_t ifp, u_long c, caddr_t data) changed = if_getcapenable(ifp) ^ ifr->ifr_reqcap; if ((changed & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) != 0) if_togglecapenable(ifp, IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6); - if ((changed & (IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6)) != 0) - if_togglecapenable(ifp, IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6); + if ((changed & (IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6)) != 0) { + if_togglecapenable(ifp, IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6); + if_togglehwassist(ifp, DPAA2_CSUM_TX_OFFLOAD); + } rc = dpaa2_ni_setup_if_caps(sc); if (rc) { From nobody Fri Apr 24 13:25:27 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2DGv4Lw0z6bGR3 for ; Fri, 24 Apr 2026 13:25:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2DGv3gs0z45RD for ; Fri, 24 Apr 2026 13:25:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777037127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3ViTSkTu4h+D9t4LfHqGcLhiHMg94pDrusvrRAOpf9Q=; b=Ywz7HSc759w6yNs2U45LpGZdZv378O9FKdoEICq6locsnqt+nJbaXwMPbDRxA7imWFFfC4 rSlPGIDQ57/irVvoKA4JBhbs0xalUD/bRE5S4d4dFEgJiMXYMrk1aPgZF9ahfvtr921Z0K NzZoW7NkPnfQdclw4cLCAftAMPbRaVhr93tIA9CVrf8RGOflc18Y8zoRdJChks3v1RlkR6 H9MqFG+CnV+wL9dveLuvfRSVebl6iVxKu0WiGmerfcJks+r/AfR2Jw+7UxHFyyNNihbigI guTAluudiZErtvofRxNhP8uwxyhbb73P0eatHGmfRVPYt2z239eH/TtdesSxHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777037127; a=rsa-sha256; cv=none; b=UJRB+F9BXQDmQcY+syBlyVtwX45GRTCGEAucFxRpTvAz6Mpb4iUSfRlYLXqeltUKCPUvqu Fd0fSPJPymGY36B6A0KFZnuWuFx3IxXV0ooS19DVCcHUxeeg+MYRoWoXqpQj7OC/LMbe8G J65PPpxfLMmVgJuGnFPiXNi6QekmhQN5wysqXzIf+O970+EFJZsnyxPadvwiwh2tw2AQxr J5bVaXI+a3HUcgA0lSlrydrteAhqUGFW5an1Zm48Sv2W12tV3RtB/6QFaDia9smqH/cevZ g70n6RKYb3Py3YJQnFf4X+EHIJoQXB0D6/qJ4The2FiojtH2tHFDiQqQAngGfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777037127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3ViTSkTu4h+D9t4LfHqGcLhiHMg94pDrusvrRAOpf9Q=; b=U6GDisGYIPK+am+kwtIC+kq0+D2pI86f2YtEQdggM32WXYD/2o8YHOGhZwpjWRjMzuJbAp seG+r8LxZFUP3wwYFrWLVs17+ZOoMZgWdRJf9jTE5DoYRve94+zgBBdpm4AwImQGyRPPMU Ej+kLCOuCoapSihJ3N4oVwe+eD0YYNxqdNF9oHp6BoN9FOEf9AvrbS3j+VictoGRZ9JFRb 2zomLzl93ygx/LW6LQzugRKGTyy/xaGIpq4whLW3o3Pw5xCj0dRmIPPbmhNayxtiM2tny0 uDujBnlDMrrcsGX7YDVEIkCe1bi6RKdkFY9NKzuqtihLAhUHv6u7z4hifyk5Ug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2DGv32B3z140n for ; Fri, 24 Apr 2026 13:25:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 20c6a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 13:25:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 35f8e4b961cb - stable/14 - dpaa2: add support for several interface counters List-Id: Commits to the stable branches 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: 35f8e4b961cb2a1ee5b04f8ce14b340b80e57395 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 13:25:27 +0000 Message-Id: <69eb6f47.20c6a.473759d5@gitrepo.freebsd.org> The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=35f8e4b961cb2a1ee5b04f8ce14b340b80e57395 commit 35f8e4b961cb2a1ee5b04f8ce14b340b80e57395 Author: Michael Tuexen AuthorDate: 2026-01-30 09:58:57 +0000 Commit: Michael Tuexen CommitDate: 2026-04-24 11:23:54 +0000 dpaa2: add support for several interface counters Add support for IFCOUNTER_IPACKETS, IFCOUNTER_OPACKETS, IFCOUNTER_OBYTES, IFCOUNTER_OMCASTS, IFCOUNTER_OERRORS, and IFCOUNTER_OQDROPS. This allows tools like systat to report the incoming and outgoing bandwidth. Reviewed by: dsl, Timo Völker Differential Revision: https://reviews.freebsd.org/D54893 (cherry picked from commit 33596d92555e5b1632fca14eb9af295e4b8f751c) --- sys/dev/dpaa2/dpaa2_ni.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sys/dev/dpaa2/dpaa2_ni.c b/sys/dev/dpaa2/dpaa2_ni.c index f72217084cdd..3be33cd18b66 100644 --- a/sys/dev/dpaa2/dpaa2_ni.c +++ b/sys/dev/dpaa2/dpaa2_ni.c @@ -2517,6 +2517,7 @@ dpaa2_ni_transmit(if_t ifp, struct mbuf *m) ch = sc->channels[chidx]; error = buf_ring_enqueue(ch->xmit_br, m); if (__predict_false(error != 0)) { + if_inc_counter(ifp, IFCOUNTER_OQDROPS, 1); m_freem(m); } else { taskqueue_enqueue(ch->cleanup_tq, &ch->cleanup_task); @@ -2928,6 +2929,8 @@ dpaa2_ni_tx(struct dpaa2_ni_softc *sc, struct dpaa2_channel *ch, bus_dma_segment_t segs[DPAA2_TX_SEGLIMIT]; int rc, nsegs; int error; + int len; + bool mcast; mtx_assert(&tx->lock, MA_NOTOWNED); mtx_lock(&tx->lock); @@ -2942,6 +2945,8 @@ dpaa2_ni_tx(struct dpaa2_ni_softc *sc, struct dpaa2_channel *ch, buf->m = m; sgt = buf->sgt; } + len = m->m_pkthdr.len; + mcast = (m->m_flags & M_MCAST) != 0; #if defined(INVARIANTS) struct dpaa2_ni_tx_ring *btx = (struct dpaa2_ni_tx_ring *)buf->opt; @@ -2959,6 +2964,7 @@ dpaa2_ni_tx(struct dpaa2_ni_softc *sc, struct dpaa2_channel *ch, if (md == NULL) { device_printf(dev, "%s: m_collapse() failed\n", __func__); fq->chan->tx_dropped++; + if_inc_counter(sc->ifp, IFCOUNTER_OERRORS, 1); goto err; } @@ -2969,6 +2975,7 @@ dpaa2_ni_tx(struct dpaa2_ni_softc *sc, struct dpaa2_channel *ch, device_printf(dev, "%s: bus_dmamap_load_mbuf_sg() " "failed: error=%d\n", __func__, error); fq->chan->tx_dropped++; + if_inc_counter(sc->ifp, IFCOUNTER_OERRORS, 1); goto err; } } @@ -2978,6 +2985,7 @@ dpaa2_ni_tx(struct dpaa2_ni_softc *sc, struct dpaa2_channel *ch, device_printf(dev, "%s: failed to build frame descriptor: " "error=%d\n", __func__, error); fq->chan->tx_dropped++; + if_inc_counter(sc->ifp, IFCOUNTER_OERRORS, 1); goto err_unload; } else sc->tx_sg_frames++; /* for sysctl(9) */ @@ -2996,8 +3004,13 @@ dpaa2_ni_tx(struct dpaa2_ni_softc *sc, struct dpaa2_channel *ch, if (rc != 1) { fq->chan->tx_dropped++; + if_inc_counter(sc->ifp, IFCOUNTER_OERRORS, 1); goto err_unload; } else { + if (mcast) + if_inc_counter(sc->ifp, IFCOUNTER_OMCASTS, 1); + if_inc_counter(sc->ifp, IFCOUNTER_OPACKETS, 1); + if_inc_counter(sc->ifp, IFCOUNTER_OBYTES, len); fq->chan->tx_frames++; } return; @@ -3201,6 +3214,7 @@ dpaa2_ni_rx(struct dpaa2_channel *ch, struct dpaa2_ni_fq *fq, m->m_pkthdr.rcvif = sc->ifp; m->m_pkthdr.flowid = fq->fqid; M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); + if_inc_counter(sc->ifp, IFCOUNTER_IPACKETS, 1); if (update_csum_flags && ((if_getcapenable(sc->ifp) & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) != 0)) { From nobody Fri Apr 24 14:12:50 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2FKb2yFqz6bLYj for ; Fri, 24 Apr 2026 14:12:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2FKb0SCtz4Fln for ; Fri, 24 Apr 2026 14:12:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777039971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6XYGlWSN6THYlNtNWmYeGFRQkROx5GQ8hA1kEBUNjQg=; b=jycdyH5dB+GfKDKN2KIiF9xyiBtcvXnf88v+noMaETst3rLUFHNGY4yRwd+zct4VzjCDQ+ 3hnIjQ/9FlflLz+KwPeMy4/Y8SWWUfN1RW/RLUFjtdw8tgaQU6gg0amzef2IBoLKpbkmJt D7h3d0dgbgAtY57WkFt6Gay2ecrveh1+r11vkffTIcNWuz9cQ3Nh5jLn1KygR+XrAycCEN 8LMj30dSMWVd2cNUMbHBoV4V8i4sf5S4zxm7OGnSdfAPKjIz3YEa+rVhHoSxqvV6KSSQyc ErQ7mWIkqg6CwgHBBJG9DEKDqha3EvrX5EJPPMEE/N+bV3+QAkE96AED99jqrA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777039971; a=rsa-sha256; cv=none; b=TFP+lELXUljGXterl8ic1e0iQWrFpapVKNCC1MjGTBNqHzVEZa2RoFZnHZ90r9i/x3Ahej /ProFuR3xqMdUicnF02PDEk6rroT38EzBHV9I0A0QsadjFLJPuma87WNj0+Lyexxb0enLw vcYnZ23HnjOBZURb3Sko+M1Fl/aU3MXaPNb7RENEQhKm/qQHeS+iOOzMwDGwSOQCVclHi4 bkteqO/MxuJxBnJBkXa9aSAwJgOSqh+h08/Od5q3nZopaKjJRhIKaNmzhurMbd4O34In0R VqYQTEqocBFLrf/1Xiupi2nVb5gfWpJEDmXI+tgcGlTf6eGbbeL7FHmKFGD/Zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777039971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6XYGlWSN6THYlNtNWmYeGFRQkROx5GQ8hA1kEBUNjQg=; b=P+3g9OrmWoc7VFVuGLCZZ1E0J8YOIQsnPEV5i8wMXLiiXZArk1/fGdHYi2stIcp4bMItxE CkYgcTxyfcoCunypcLvI/kZzoAhkh972yGc9uT9v8l085QaPOJZDvEiRydaE2nQ7Qhl87F 1I8HYIqUO7zewxP/ZlMXTttYveIq45E2/f5xqw5FlasVCs6bV7b9RWaI7w/LThAHXREw4R m3Zi4bWQDqGffmcp6UxhYU58O4JHa+X5IFkzMErsnn4Nm4AG7riDyC4LqR0rGzZRsjEbmO uGg0U76Puy3jdOKj85/xLhB6rQJSZ6wNuO8bbpu8RrwnoSFwRnijAsnhPskFcQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2FKZ6ywMz15n3 for ; Fri, 24 Apr 2026 14:12:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24f74 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 14:12:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 202d9ba2817b - stable/15 - virtual_oss.8: Remove CPU performance example List-Id: Commits to the stable branches 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: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 202d9ba2817bdee0dff33a3e00c8a7092d8781f8 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 14:12:50 +0000 Message-Id: <69eb7a62.24f74.538a78c1@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=202d9ba2817bdee0dff33a3e00c8a7092d8781f8 commit 202d9ba2817bdee0dff33a3e00c8a7092d8781f8 Author: Christos Margiolis AuthorDate: 2026-04-17 20:47:16 +0000 Commit: Christos Margiolis CommitDate: 2026-04-24 14:12:44 +0000 virtual_oss.8: Remove CPU performance example See also: https://github.com/freebsd/virtual_oss/issues/2 Sponsored by: The FreeBSD Foundation MFC after: 1 week (cherry picked from commit 788d71e73f1b4fdac572dae72d3eac5cfb0f9f18) --- usr.sbin/virtual_oss/virtual_oss/virtual_oss.8 | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/usr.sbin/virtual_oss/virtual_oss/virtual_oss.8 b/usr.sbin/virtual_oss/virtual_oss/virtual_oss.8 index 6aa9f1289b35..b607f45cd369 100644 --- a/usr.sbin/virtual_oss/virtual_oss/virtual_oss.8 +++ b/usr.sbin/virtual_oss/virtual_oss/virtual_oss.8 @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" -.Dd September 3, 2024 +.Dd April 17, 2026 .Dt VIRTUAL_OSS 8 .Os .Sh NAME @@ -325,17 +325,6 @@ server: virtual_oss -S -b 16 -C 2 -c 2 -r 48000 -s 4ms \\ -f /dev/sndio/default -d dsp .Ed -.Pp -How to set intel based CPUs in performance mode: -.Bd -literal -offset indent -sysctl -aN | fgrep dev.hwpstate | fgrep epp | \ -while read OID -do -sysctl ${OID}=0 -done - -sysctl kern.sched.preempt_thresh=224 -.Ed .Sh NOTES All character devices are created using the 0666 mode which gives everyone in the system access. From nobody Fri Apr 24 15:28:52 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1K0nzMz6bSCj for ; Fri, 24 Apr 2026 15:28:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1J4tBMz3CPD for ; Fri, 24 Apr 2026 15:28:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ns2aFVIabdUt0vhhbSOdr0ZDpj2rjTXuXuI4hDCpGA0=; b=ODEs0Kj87/DvT9DiFWP2fGrtDEKoxPvWR1w3wYyuVKl1kEf5yT7kWZVsl+aoGTOi/CQL/Y pYbJvPAbuPzvC2kiJ6Sh45hCVLet9MygkTMkypGUrj4SfXUYav32KgikfLm3uwnkxQndsc bMgzRJ36xC9oYNNKxj2QV6eG0OAYOssG7b6YgSraNnX4kLNBUg3zHdjU7l7TBs8eSBjQ8o jhIUJCWG1AI9z2VlI34ZsUbL6l2ikBibcSEFkim/ygcS+yKxF0z/g7iBqTFL2VnXJlCNu+ Jz5xIxb3xMsTTBmfCdvHtVvWN19EncIuo4Y/ThVLBjhKOaRBAse3A5aAYnhXLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044532; a=rsa-sha256; cv=none; b=ghNb+25TkfCLex7qpCp84N3G5Ci6FEPAd1jGZ3fY1S05Jhi5WdwxkBXEcgYdan04r50Gop 12rwdTsotByRm2ckWy01Fh3F5VLnrnj0tVgaa62p26g3igceWluR/feRVcbXXUrzLsC7QO AjAdl9viT9XNef2mj/DGPQPhpZoMBJcUdZ0avHLBOuRWMmEGk5yJzy9XbUHSR3NwhWEEPa cJtcQda6SOtvpNEONFk8OX0Hn7fKR7ks2sD+Owrxnkb6AozP43xsJRrTb+VXV3pdVqHTK/ o7prTgu8DxBqwPPGTIDe/cw/IPHtVFWNtedmNOgc1r+k6f7gAzW64uAmGLRpJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ns2aFVIabdUt0vhhbSOdr0ZDpj2rjTXuXuI4hDCpGA0=; b=U6nMisw/A5vX6xvVrA5ZZQXO+gNm+icMD/abzX8tH/VVUXGgGSBd4tQhi3ZmbJtroI9nRP XzuuNez0gwXQlB3DxTjsm9vYACAIOeWy9+njO2wLlIcfzQ3SarqgHaWqwvXI6Ih3eOBgmY Hs76PecreXAxDsX87jG7AKYA2izZHpzysRDhuIJyjO63Fp15VcctLGZ9IN6PNg2jbp6sFS xxng6AkKSviM3HMsnCv7nWLwYtgHQg8KP3azyuWe97aY7ytQTPRiywGhTeI2sywu1Tl3ZP hW8zN/TDs9fdXG8ZUKaY84jg/LyQ6jFyzd0+fOYtop6je2r+YPWdXJ/4Jjgg2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1J4Tknz17RB for ; Fri, 24 Apr 2026 15:28:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35f4e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:28:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: d37cbfe3ef55 - stable/15 - nvme: Abstract out function to obtain a disk ident string from cdata List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d37cbfe3ef550aa36693d859bc4580891d16701a Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:28:52 +0000 Message-Id: <69eb8c34.35f4e.1ebd07b7@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d37cbfe3ef550aa36693d859bc4580891d16701a commit d37cbfe3ef550aa36693d859bc4580891d16701a Author: John Baldwin AuthorDate: 2025-11-17 18:21:39 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:37 +0000 nvme: Abstract out function to obtain a disk ident string from cdata This will permit sharing the code with nvmf(4). Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D53338 (cherry picked from commit 8d2a50bb38051fefeb1427fdbfd249f2829310d8) --- sys/dev/nvme/nvme.h | 19 +++++++++++++++++++ sys/dev/nvme/nvme_ctrlr.c | 21 +-------------------- sys/dev/nvme/nvme_ns.c | 2 +- sys/dev/nvme/nvme_private.h | 1 - 4 files changed, 21 insertions(+), 22 deletions(-) diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index 8e69c0ffe339..85b9658b755a 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -1912,6 +1912,7 @@ void nvme_sc_sbuf(const struct nvme_completion *cpl, struct sbuf *sbuf); void nvme_strvis(uint8_t *dst, const uint8_t *src, int dstlen, int srclen); #ifdef _KERNEL +#include struct bio; struct thread; @@ -2000,6 +2001,24 @@ nvme_ctrlr_has_dataset_mgmt(const struct nvme_controller_data *cd) return (NVMEV(NVME_CTRLR_DATA_ONCS_DSM, cd->oncs) != 0); } +/* + * Copy the NVME device's serial number to the provided buffer, which must be + * at least DISK_IDENT_SIZE bytes large. + */ +static inline void +nvme_cdata_get_disk_ident(const struct nvme_controller_data *cdata, uint8_t *sn) +{ + _Static_assert(NVME_SERIAL_NUMBER_LENGTH < DISK_IDENT_SIZE, + "NVME serial number too big for disk ident"); + + memmove(sn, cdata->sn, NVME_SERIAL_NUMBER_LENGTH); + sn[NVME_SERIAL_NUMBER_LENGTH] = '\0'; + for (int i = 0; sn[i] != '\0'; i++) { + if (sn[i] < 0x20 || sn[i] >= 0x80) + sn[i] = ' '; + } +} + /* Namespace helper functions */ uint32_t nvme_ns_get_max_io_xfer_size(struct nvme_namespace *ns); uint32_t nvme_ns_get_sector_size(struct nvme_namespace *ns); diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 12b39ce3b3ac..16e67b127c9c 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -1264,24 +1263,6 @@ nvme_ctrlr_poll(struct nvme_controller *ctrlr) nvme_qpair_process_completions(&ctrlr->ioq[i]); } -/* - * Copy the NVME device's serial number to the provided buffer, which must be - * at least DISK_IDENT_SIZE bytes large. - */ -void -nvme_ctrlr_get_ident(const struct nvme_controller *ctrlr, uint8_t *sn) -{ - _Static_assert(NVME_SERIAL_NUMBER_LENGTH < DISK_IDENT_SIZE, - "NVME serial number too big for disk ident"); - - memmove(sn, ctrlr->cdata.sn, NVME_SERIAL_NUMBER_LENGTH); - sn[NVME_SERIAL_NUMBER_LENGTH] = '\0'; - for (int i = 0; sn[i] != '\0'; i++) { - if (sn[i] < 0x20 || sn[i] >= 0x80) - sn[i] = ' '; - } -} - /* * Poll the single-vector interrupt case: num_io_queues will be 1 and * there's only a single vector. While we're polling, we mask further @@ -1534,7 +1515,7 @@ nvme_ctrlr_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int flag, break; case DIOCGIDENT: { uint8_t *sn = arg; - nvme_ctrlr_get_ident(ctrlr, sn); + nvme_cdata_get_disk_ident(&ctrlr->cdata, sn); break; } /* Linux Compatible (see nvme_linux.h) */ diff --git a/sys/dev/nvme/nvme_ns.c b/sys/dev/nvme/nvme_ns.c index f50b8993a362..170fab34ad81 100644 --- a/sys/dev/nvme/nvme_ns.c +++ b/sys/dev/nvme/nvme_ns.c @@ -90,7 +90,7 @@ nvme_ns_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int flag, } case DIOCGIDENT: { uint8_t *sn = arg; - nvme_ctrlr_get_ident(ctrlr, sn); + nvme_cdata_get_disk_ident(&ctrlr->cdata, sn); break; } case DIOCGMEDIASIZE: diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index d499c6f34ca8..52f84f899c6e 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -560,7 +560,6 @@ void nvme_notify_new_controller(struct nvme_controller *ctrlr); void nvme_notify_ns(struct nvme_controller *ctrlr, int nsid); void nvme_ctrlr_shared_handler(void *arg); -void nvme_ctrlr_get_ident(const struct nvme_controller *ctrlr, uint8_t *sn); void nvme_ctrlr_poll(struct nvme_controller *ctrlr); int nvme_ctrlr_suspend(struct nvme_controller *ctrlr); From nobody Fri Apr 24 15:28:53 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1L1lcsz6bSB9 for ; Fri, 24 Apr 2026 15:28:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1K6BQDz3CjX for ; Fri, 24 Apr 2026 15:28:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JwYPQtZm+xocKUs9SBeCQ99NybxuDIzdcyZqOGhaagQ=; b=GZgBgmmOFwG5QWjScJNMh2TynqgZAMcOBoz1Mpj5yjdmiDH82mrOglvrkh0p+DM/ug0vE+ 8ld7r3l+B/rDIcM8wwoHuTvygrwAVM0FJOBQS7VD15j7i9Q9eK5YL48FibXDww2kExI46u SaT7gXcEbIoUjqx5vEMPs66W9wQrbBcLFWtLzOLCQGEyBMXIj/pXlLQ3X2lv+rITHzu1P9 R3v3MYVPImt3Aj6aBcD4myq58sM1kalvDQhAv0/Skjj3RjaHwVMEtfc0kWT5MB/Q5f70oJ oDEQUtNoljB7wQ+/RKrmA8Dcyscddc4OQTi8vsQIwntwdGH53+0q1Y18hLKGgQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044533; a=rsa-sha256; cv=none; b=fzRCTQ0KsnfFtCTxy+J0uUESyf3ZlPJShTft5N2050Zl5RX/7pfdbBN1VUURfFlm9x9Kzt l5uUN0TmVjrppbsRuaR7k23hawhVjoz5JzjquHLGbag8o4Nmfa8AJLVqaHE5dwqYkA4210 UqZ/u8HEukZkfokvq+UCFLkfAhKe5Uj4ZmUpT4EJWjwITTgeq2LmloD4rWLLWOpCEjDdiF DjVin72hR5sZnN+16U4RTwDsLmWPuqancT2L9sdeO6Dia5W2DG5uP3LEjirgYYkBOgHXFI 6b/iiJ9sf2QMERJRIewO8NbnFE9BVxG5gEcuvnW8Li76eTtjaWpjmiUSBkbI9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JwYPQtZm+xocKUs9SBeCQ99NybxuDIzdcyZqOGhaagQ=; b=SkNxtlaTx6qvqNCBfb1RMaj2OdXYQeu9WTrV33XVVytgTHlCkl4n2jF8Ov52dcz/dRAE8Y bvP0UdF3zQreTqvDGQegRU3CQAmv6KGIBQW21uvOuIXsaKyRXoU6xCpzfQUabnl6YNGD2E TGuUgajViMHLbdh1QdZpSo7BMDuCgEmxkTwiCMPv+62dd7dbOVC8Bmkt72zMck+VYSu8P2 4SRapVQzYioC/u6xmsaP9mpck/uR0vGWgv+jTjtOGZAWi0XtC2tNA6xGQcifgqo8KoefiW 8uhBig9Sjru7wQXyuVp8pbzDLncyd2dQrZjsl3yEF0WeMCr0xoaAXEZs/a0MxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1K5D8bz17nR for ; Fri, 24 Apr 2026 15:28:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35b82 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:28:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: fad5c74b0449 - stable/15 - nvmf: Add support for DIOCGIDENT List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: fad5c74b04491982db60c756c210eeddfac11271 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:28:53 +0000 Message-Id: <69eb8c35.35b82.3ed11171@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=fad5c74b04491982db60c756c210eeddfac11271 commit fad5c74b04491982db60c756c210eeddfac11271 Author: John Baldwin AuthorDate: 2025-11-17 18:26:30 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:37 +0000 nvmf: Add support for DIOCGIDENT This mirrors commit 6d0001d44490becdd20d627ce663c72a30b9aac3 but for nvmf(4). Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D53339 (cherry picked from commit 33383fbf606be619af0e107106f4f6028c9eab0d) --- sys/dev/nvmf/host/nvmf.c | 3 +++ sys/dev/nvmf/host/nvmf_ns.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/sys/dev/nvmf/host/nvmf.c b/sys/dev/nvmf/host/nvmf.c index 1ac0d142443b..f9c64f8f8e64 100644 --- a/sys/dev/nvmf/host/nvmf.c +++ b/sys/dev/nvmf/host/nvmf.c @@ -1230,6 +1230,9 @@ nvmf_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int flag, case NVME_GET_CONTROLLER_DATA: memcpy(arg, sc->cdata, sizeof(*sc->cdata)); return (0); + case DIOCGIDENT: + nvme_cdata_get_disk_ident(sc->cdata, (uint8_t *)arg); + return (0); case NVMF_RECONNECT_PARAMS: nv = (struct nvmf_ioc_nv *)arg; return (nvmf_reconnect_params(sc, nv)); diff --git a/sys/dev/nvmf/host/nvmf_ns.c b/sys/dev/nvmf/host/nvmf_ns.c index 4215c8295d2e..d57280e19d41 100644 --- a/sys/dev/nvmf/host/nvmf_ns.c +++ b/sys/dev/nvmf/host/nvmf_ns.c @@ -278,6 +278,9 @@ nvmf_ns_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, sizeof(gnsid->cdev)); gnsid->nsid = ns->id; return (0); + case DIOCGIDENT: + nvme_cdata_get_disk_ident(ns->sc->cdata, (uint8_t *)arg); + return (0); case DIOCGMEDIASIZE: *(off_t *)arg = ns->size; return (0); From nobody Fri Apr 24 15:28:54 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1M14b5z6bSFw for ; Fri, 24 Apr 2026 15:28: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1L6Rccz3Cwr for ; Fri, 24 Apr 2026 15:28:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T35kVIUuWEOW1Oby8tcOBbM7rBeHRjTS9R+q4YaQhFY=; b=vWS6BAnLYIkuAQgWnFOkmvgFEFb6O9rq9jVJvt3kyIlHrRW3rqmJBNQL6nd9Zzyk/zvETJ DV8pvwVo+uiGctu5Hf1GhBtd0nfcfQNKv2RA5vGzX4ku2ZJWrowy3Q36jicFF74gSLhRuf AbuPd5zLVf4uUtoiXkuAx0JcbV4oeUmRMgPAwcdQxcZGiUnR/dfecEJwiQaB/XlXuQBx9S bW0GK9ej4BrdXccvsZj9Ko0Z0bZFmaVQPRXzV7gj7Uhe8KXATH3Bm9QgrIfMSI2fqqqdcE cKqFWax3gWsbuJwIs51oSy0a3grIRXRApLjgwy9byUGVatOPvZWePaKmT1gUqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044534; a=rsa-sha256; cv=none; b=Uuxz2aaQ7tUfzfAeAKRVFL68HBAr3v4AN7L8rlKaBt4YXpcrfh1sEX66IBwakjOPQ5Yzrl f/dkqdeSjY8jt90QowsLo6QmE5/a1pHwIMlOmrp+NSk5GEsmu1oLjEsryeZTl4/BZw+NVz NExTvw5AnzATcr51RalLT3tJnJ/o0UnYasTW8GPgyZ+jJrI3nhJXBk193WJPqr8HtGsRtZ QmymqR+Hqi1yrlvGNQeoRdVdb1PSksgGLpliq5Z0SAyuHBjmnHiq3njOHX0ALZ31EKTD8m 1UgadcD+Ct5wsqGx9WL15xYlnS30f0IIVbjpxCnEK9JnsuV+jEG7kzq1TQmfQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T35kVIUuWEOW1Oby8tcOBbM7rBeHRjTS9R+q4YaQhFY=; b=HwybXTJxZVs/8DUzeDQPw+i2DQ8kSCXEwE6S0ZVW4gg1twhutsCo2WMKJpj9hn9s7NjCBg YfcEox9Q1hdGaRTxeVRXro9Wx5PUTWgh4YHVGUh37QIqnqoTPsUkE7f/Iur21TH7KLpzEa jvVPST3MeVKlQz6EIYtjda6O52lLlF8uJzVIpVufrPi9P06fSFk821mdEBxryW++nGAgou A94fG+7PU31nU3uWvlkusLgaK6jMzTogHL6zSpZLlxAH/BXXFy3fPKECyubWzrX1nubh6A 95svvicYdnp96fiFdVj8vOeDKe8UG1wKeO7T4AuLx0igC0nL3WMsXmnk5K6RAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1L60gSz17RC for ; Fri, 24 Apr 2026 15:28:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35f52 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:28:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 80c8d742510c - stable/15 - nvme: Include explicitly for memmove List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 80c8d742510cb64965b468a141a57ab552a19e25 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:28:54 +0000 Message-Id: <69eb8c36.35f52.1192561b@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=80c8d742510cb64965b468a141a57ab552a19e25 commit 80c8d742510cb64965b468a141a57ab552a19e25 Author: John Baldwin AuthorDate: 2025-11-20 14:36:50 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:37 +0000 nvme: Include explicitly for memmove Reported by: andrew, rpokala Fixes: 8d2a50bb3805 ("nvme: Abstract out function to obtain a disk ident string from cdata") Sponsored by: Chelsio Communications (cherry picked from commit 032fbda024d78a8e2f9479efcdda8604c62bcea0) --- sys/dev/nvme/nvme.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index 85b9658b755a..42620468e6f6 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -1912,6 +1912,7 @@ void nvme_sc_sbuf(const struct nvme_completion *cpl, struct sbuf *sbuf); void nvme_strvis(uint8_t *dst, const uint8_t *src, int dstlen, int srclen); #ifdef _KERNEL +#include #include struct bio; From nobody Fri Apr 24 15:28:55 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1N2bJyz6bSJh for ; Fri, 24 Apr 2026 15:28:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1M6wF8z3CrQ for ; Fri, 24 Apr 2026 15:28:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vkw9HAWU9+49I/q3O1iIdJKbaFfs2rtrBOY84bVHirg=; b=IicwqiFYfjR6CcAE+G48Pwx9ZyFw4YVelAQeMpoviib08DQMVBYDkdppXt168fef/3z4Mp Fh39bNw9TuxFHUXRppfNYTcIE40dJ6vBJvnfUShmxF84D4+PhQuD22whw3NNRYkzcei7FG x8hq+SrdWFSsZTMZlkaNJQQepRcWu6Cd+KltymnF4BztICUfE7Vnk90QI2p78pwVZX2Kfm B1G8QZJUR/UkthVu8bYhAWp8BJoZcNEmgFatUadujQJK0JPW5VZZ5jtj36dyk3mJcNSFUH sg0Q9Vycn628U4/g46vetFyUCu2NwyS7CWkddSlTZol7/1FylevwLaN1hTEznw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044536; a=rsa-sha256; cv=none; b=g2lBMktDMNBntPSp3vzPQzLdX1qMoHZnH/Yd3ZsLKGqSR54bzv0a6AU0qhrT4R3qrgpJCB S/jqkNRb58RM4TTPAClIlePVVC0DhYRngqctuhjmv1Z9GxO5WsY+/RfHZxe7B/1dmY4qKH QacWTwpASAaqGLUPlGtIVZixExaEOcGB8E+frSUHGL3u4PhhvqDRYInIS7tx5s2tb4/qcM SolZ4SOOC6xVmTv8vnCeLdVQRYDi3czLwCXCHSSUM7PyHarUMn8UUJaFoZMVR397s5Hom3 Tq8JaUrVLbuj8Pa5/P8WyrJmQ6xFIU3q9Mmqh4N4hdtR5k6oidHS+ouXNydgcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vkw9HAWU9+49I/q3O1iIdJKbaFfs2rtrBOY84bVHirg=; b=t4S0KU6oeKIEUa9uP84jklQNP5x7/fPUb1U31zzkuF3fUOQPxXu/fyjBjYEr1bk/aqmGF6 sFJ3DF3psLZRYeGsY5R34WDvjw27BS/4lB5FHCxY67LpxeYgVLLLXwaa7k53sUuBe8kAOH 7CyXbecLI8QCeUmI5EtFiGy9niIQT9TvPQZxMjxVBxqPqBSrrRj3u4eAY9vzGx0LkMQizw 4myEqeZHVVsPyZVfPg6DbBtlVNeE9w50TRDH4TIHTTugGsvCR0Rd2ZjG1jpEtpiKullcWD Y67dYT3QGlrprV/Jr8XoqJMLF56T1ei0riSiCGmS+ZTab+2VLPVw+k8i8K5VYw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1M6N5fz17RD for ; Fri, 24 Apr 2026 15:28:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34aaa by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:28:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 41abe983dbd9 - stable/15 - nvme: Use memcpy instead of memmove in nvme_cdata_get_disk_ident List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 41abe983dbd9c8a4d9e398c48b85739e5d1dbd2d Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:28:55 +0000 Message-Id: <69eb8c37.34aaa.5c863b26@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=41abe983dbd9c8a4d9e398c48b85739e5d1dbd2d commit 41abe983dbd9c8a4d9e398c48b85739e5d1dbd2d Author: John Baldwin AuthorDate: 2025-12-02 15:57:08 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:37 +0000 nvme: Use memcpy instead of memmove in nvme_cdata_get_disk_ident These buffers should not overlap. Reviewed by: imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D53842 (cherry picked from commit 44d6df4f65b1441cf9cd9f12cd41edd52205d084) --- sys/dev/nvme/nvme.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index 42620468e6f6..5ee7afcbcfec 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -2012,7 +2012,7 @@ nvme_cdata_get_disk_ident(const struct nvme_controller_data *cdata, uint8_t *sn) _Static_assert(NVME_SERIAL_NUMBER_LENGTH < DISK_IDENT_SIZE, "NVME serial number too big for disk ident"); - memmove(sn, cdata->sn, NVME_SERIAL_NUMBER_LENGTH); + memcpy(sn, cdata->sn, NVME_SERIAL_NUMBER_LENGTH); sn[NVME_SERIAL_NUMBER_LENGTH] = '\0'; for (int i = 0; sn[i] != '\0'; i++) { if (sn[i] < 0x20 || sn[i] >= 0x80) From nobody Fri Apr 24 15:28:57 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1P4sw2z6bSPb for ; Fri, 24 Apr 2026 15:28:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1P0m46z3Cdh for ; Fri, 24 Apr 2026 15:28:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZxJ3rtusvBfTt56nSF0dPxEJhKuhqe8DuMqsFcU6IHk=; b=wxn4RRUDZxJV5umoP9x3pGFiW3tbj5H2gqtC6VpxTWApXR0dlWUD/YIQb7eRBMAtEb0pDQ jS7deWWCb1nkEt9NVfcsi14CUSw2ISbzx6c1eTr6e4NimLsGBiWyGtJ+60E3QtDf11reIJ cdFp2fi0ZWRctXd/dHh6UDIEeB1Re1MnA658Xdr/R8DS6CNZp79sbct6wQSrttrLOeoAp/ Z1wCBSBIoAAZuHohI/+WNuF/4dIhS6oRsyjq7vqHWZffdPjE7H1spdaC7Q8ajF8dX1Y3Pw NQPr8q9RcsacQ4q1QSCCiQCfxqf8McA5i73Me/RpsBCqfEgnBgf5CsDG8dmZoA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044537; a=rsa-sha256; cv=none; b=HLA8vzux5VgjMdOQNrwxcQYzYjMcWblg+O/uzexZ8Ql06HZZre2Ex0I08m4luOmhE8n17M Pu0NK9lzvCfEhqFYq28LvONrdKzjOEYKuKapMcjhtZAG+MYGisT44UU04nRvbPjxNRAK+a 8u6JjOBGAoOWb5lu1bH1jXGrYTaf/eau9g6CCNaNc25IxFDowKoG0nnLtaYjBFVphJ7+Mt lTmSf5fQ/B2j52we2NwcDg6W081e14soFmuW6MdeBxGuCj14r9rJdfEQePqlClCXD3htLp 8CGVagmbBZq66xQDtu5uQrlKrt31HATzVZi2XFusWTsPpWlEPjssHJ/T5nq6uQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZxJ3rtusvBfTt56nSF0dPxEJhKuhqe8DuMqsFcU6IHk=; b=tECrjyIS2rjQGIIV+5zFxK/RvGUD5JOSsLu1NEFpX1GU4wsuVLfgvRrbUwd5osaBZROsug k3fTjfCmpQp70p7u6uD55yiEgmAZjzec7Wby5e9PggJtCqakR+NDdBCb3J6KnzTdhWEPWq g582a08jANXoMPVKEVAf9A6236c4qrcf4hijydX0msr8M78mddVkly/69F6KJF7z2SCRr7 oPzhtTXL5rX7xOdDQBDahvmx1NpXOcdaUxLrBz+kuiwW9Ihaw3pqJok3lgc5waZSKtDKJY UR+TdfnJ2lChmNRHpmQ0xruXuirJxnxhSXojRK6MgABsLBpsFxDlKka2YFUCOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1P05skz17lr for ; Fri, 24 Apr 2026 15:28:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33c7c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:28:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 2233463df7de - stable/15 - cxgbe: Stop using bus_space_tag/handle directly List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2233463df7de6f95e45c018e26cf99fbdb1102bf Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:28:57 +0000 Message-Id: <69eb8c39.33c7c.5c9aded2@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2233463df7de6f95e45c018e26cf99fbdb1102bf commit 2233463df7de6f95e45c018e26cf99fbdb1102bf Author: John Baldwin AuthorDate: 2025-12-09 15:46:55 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:37 +0000 cxgbe: Stop using bus_space_tag/handle directly Reviewed by: np, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D53030 (cherry picked from commit bc2b10a5931442bb39653cd8d5712b2d7195cf46) --- sys/dev/cxgbe/adapter.h | 18 ++++++++---------- sys/dev/cxgbe/t4_iov.c | 6 +----- sys/dev/cxgbe/t4_main.c | 6 ++---- 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index 55f09fefb7e3..6ff1f07ddf50 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -941,8 +941,6 @@ struct adapter { struct resource *regs_res; int msix_rid; struct resource *msix_res; - bus_space_handle_t bh; - bus_space_tag_t bt; bus_size_t mmio_len; int udbs_rid; struct resource *udbs_res; @@ -1252,7 +1250,7 @@ t4_read_reg(struct adapter *sc, uint32_t reg) { if (hw_off_limits(sc)) MPASS(curthread == sc->reset_thread); - return bus_space_read_4(sc->bt, sc->bh, reg); + return bus_read_4(sc->regs_res, reg); } static inline void @@ -1260,7 +1258,7 @@ t4_write_reg(struct adapter *sc, uint32_t reg, uint32_t val) { if (hw_off_limits(sc)) MPASS(curthread == sc->reset_thread); - bus_space_write_4(sc->bt, sc->bh, reg, val); + bus_write_4(sc->regs_res, reg, val); } static inline uint64_t @@ -1269,10 +1267,10 @@ t4_read_reg64(struct adapter *sc, uint32_t reg) if (hw_off_limits(sc)) MPASS(curthread == sc->reset_thread); #ifdef __LP64__ - return bus_space_read_8(sc->bt, sc->bh, reg); + return bus_read_8(sc->regs_res, reg); #else - return (uint64_t)bus_space_read_4(sc->bt, sc->bh, reg) + - ((uint64_t)bus_space_read_4(sc->bt, sc->bh, reg + 4) << 32); + return (uint64_t)bus_read_4(sc->regs_res, reg) + + ((uint64_t)bus_read_4(sc->regs_res, reg + 4) << 32); #endif } @@ -1283,10 +1281,10 @@ t4_write_reg64(struct adapter *sc, uint32_t reg, uint64_t val) if (hw_off_limits(sc)) MPASS(curthread == sc->reset_thread); #ifdef __LP64__ - bus_space_write_8(sc->bt, sc->bh, reg, val); + bus_write_8(sc->regs_res, reg, val); #else - bus_space_write_4(sc->bt, sc->bh, reg, val); - bus_space_write_4(sc->bt, sc->bh, reg + 4, val>> 32); + bus_write_4(sc->regs_res, reg, val); + bus_write_4(sc->regs_res, reg + 4, val>> 32); #endif } diff --git a/sys/dev/cxgbe/t4_iov.c b/sys/dev/cxgbe/t4_iov.c index 452ebaaf0172..9ccf63fd6516 100644 --- a/sys/dev/cxgbe/t4_iov.c +++ b/sys/dev/cxgbe/t4_iov.c @@ -54,8 +54,6 @@ struct t4iov_softc { int pf; int regs_rid; struct resource *regs_res; - bus_space_handle_t bh; - bus_space_tag_t bt; }; struct { @@ -147,7 +145,7 @@ static inline uint32_t t4iov_read_reg(struct t4iov_softc *sc, uint32_t reg) { - return bus_space_read_4(sc->bt, sc->bh, reg); + return bus_read_4(sc->regs_res, reg); } static int t4iov_attach_child(device_t dev); @@ -249,8 +247,6 @@ t4iov_attach(device_t dev) device_printf(dev, "cannot map registers.\n"); return (ENXIO); } - sc->bt = rman_get_bustag(sc->regs_res); - sc->bh = rman_get_bushandle(sc->regs_res); pl_rev = t4iov_read_reg(sc, A_PL_REV); whoami = t4iov_read_reg(sc, A_PL_WHOAMI); diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 22d2f504c257..88a1cb9d3eb9 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -2660,8 +2660,8 @@ reset_adapter_with_pl_rst(struct adapter *sc) { /* This is a t4_write_reg without the hw_off_limits check. */ MPASS(sc->error_flags & HW_OFF_LIMITS); - bus_space_write_4(sc->bt, sc->bh, A_PL_RST, - F_PIORSTMODE | F_PIORST | F_AUTOPCIEPAUSE); + bus_write_4(sc->regs_res, A_PL_RST, + F_PIORSTMODE | F_PIORST | F_AUTOPCIEPAUSE); pause("pl_rst", 1 * hz); /* Wait 1s for reset */ return (0); } @@ -3971,8 +3971,6 @@ t4_map_bars_0_and_4(struct adapter *sc) device_printf(sc->dev, "cannot map registers.\n"); return (ENXIO); } - sc->bt = rman_get_bustag(sc->regs_res); - sc->bh = rman_get_bushandle(sc->regs_res); sc->mmio_len = rman_get_size(sc->regs_res); setbit(&sc->doorbells, DOORBELL_KDB); From nobody Fri Apr 24 15:28:58 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1Q60vDz6bS7h for ; Fri, 24 Apr 2026 15:28:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1Q29sbz3CmP for ; Fri, 24 Apr 2026 15:28:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tRRdz3bTcdsYjdT2RSWw4kOVqCkl/9m5U4qXLw09rFk=; b=iTvoxgYBw6+Gpk7NsKmd8ktWgvnoKGeylhbffArxvcx/PBSuyjxr296p/cOmo4TbYTscSi VfexPHa26fJCz2RPPrGn7PekE/2yimYBswX16DKAbN6Ix0ceKwQeGo98KQ645ysfNqjXZN ms6QQVMUCgxCySq3FSepv6EAms0PphbohlhpYHWqrM6ACkyKqx3d1OdIH264fOfK+1R50m 0cHUD/Dpof8XoJPN190YBT2unnmfuFiQMh1fuWoueP9sVl87txodSEXGnDY6XV7ER6mpTI LPqwNoE8UpCyL7oU+uDkurW/jA69Y/V94cxw5e9VsbYZEiVBsHehiznZLgNM8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044538; a=rsa-sha256; cv=none; b=Jel6MMGjpMRaeowUw1aYKIMz9Hrb7AmflAwqHoCe6GaAhHdHoe9hYvPnwYcE1GmyKMxKhw ETAWkR+DA/yPIpL9zSMoetz1xDvEMEdDe4dwlgAEUvaQ5qHbiZT8LVt2jsYAxKAuWCQwok +gfkukzdBJu1ZKpwnLLmkWQI1DeMGdMLnQasV6XjFoC/0QjGTDuOxtMtJnvOCOk8KTUo6v DIvYC8n22Q2VJZnsjGkP9zzIiOPjpSYiAFQjDBmkKGESMu6TpwEN6GvBYjrsuRIu3I9CWf /LuLYFeBQwPHphb5gA6QgtUH+h44SN0S5oE6+IXHAdVRlSemvRlGmvJE1mynwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tRRdz3bTcdsYjdT2RSWw4kOVqCkl/9m5U4qXLw09rFk=; b=svslxqB6osMXBX9213yd9e+8rolsod7p5Sr+yNx95hKWnn17HFAqsNpt+jJa+fdj3N83fF KcdyY2a/PGgMwJq9d+jTAu4egVKM6X2jZgPtFJHTCTVMO4F0ruZ5vq9XAhDlg1mlqS/L8j CYBKswqKYS476wjLQp3l8akgiDUKFtu38e7uqBF3Afyb58fYlEEwZsIwbkNLMjWHKVcKvF 0GflWLGidAn/lng3+FqVNKuL9igT/clyKlX4+s/STbc3Xk8cmy23sAv2Po9g7uOY+gBwax VLtbn+2ZnFpNw5y7fIDIgnnlSQYC5Y4ZXxntcnBvNWJurOtYA/H3gQtFZiH1Qw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1Q0tFGz1739 for ; Fri, 24 Apr 2026 15:28:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36420 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:28:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 8963d6715331 - stable/15 - acpi: Free ivars in bus_child_deleted method List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 8963d6715331c94e0b43ad830a5a8895eabaeb4d Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:28:58 +0000 Message-Id: <69eb8c3a.36420.135b3fa1@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8963d6715331c94e0b43ad830a5a8895eabaeb4d commit 8963d6715331c94e0b43ad830a5a8895eabaeb4d Author: John Baldwin AuthorDate: 2025-12-26 15:36:12 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:38 +0000 acpi: Free ivars in bus_child_deleted method Reviewed by: imp Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D54309 (cherry picked from commit 5b39245ab6f37450fd025127b4fc76b5e5ba135e) --- sys/dev/acpica/acpi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 4a6c805f9c6a..bac5b8c889e0 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -1040,6 +1040,7 @@ acpi_child_deleted(device_t dev, device_t child) if (acpi_get_device(dinfo->ad_handle) == child) AcpiDetachData(dinfo->ad_handle, acpi_fake_objhandler); + free(dinfo, M_ACPIDEV); } /* From nobody Fri Apr 24 15:28:59 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1R5f5bz6bSD3 for ; Fri, 24 Apr 2026 15:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1R2VcQz3CmW for ; Fri, 24 Apr 2026 15:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=01wohteJ1wOc1XajRhFeHDrjxhR47pjsW0sNbwAf40w=; b=HxVsoEtyTQ2HP9WoT1KKihdZu1WE3dgiOO6SznQhxNPCvvcVG0426bdY5So7IzFeM94kae GbtKVzeSNsy+see+DjTRf/pfi5+SbpOd6LqDpOwTeLwYs1kQkJGQxjuqrrYmIaXGuCzO0b OPmYcMs4Cw/tQ7myRPesmGJGMiWQQmpWfzDDdl0CO/t8baq3gUw8bIlq4o5xqRXvk7vBDZ Euthw3IDkYdJfHS7y/SsIufgDRcNd9cDQWxFA2CrNAM9SEBc2q+YHxMHjhJcD6KpshQ0cN +kqUQmgj2YAXWIOqdXEuUc/v5u/5IUIvJTjeBmAPE/Yqf4dgdbzqqsA/dGPqdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044539; a=rsa-sha256; cv=none; b=sQxuHORXOakDGJpAAbG8J1FsmDQMKZxj1WHG1+K2Orv1XNIM5cMMh2CLHjxO2yMKcMSing 6CZf6ULxN7yU3baYDf+zLzh4CAOVKeyCAi3weydpQczWHZlZt0KbOOory1j5DnCckZotn4 r44v9OwN9C8Pmofwkk6V10/vrYPQLlAB36i2gRjP0GTXUXZk5IsgiKDuDUP7PjNLKYVODN ryCq9Z95AGDGQtDEb7NvrrzqYdjT5W6nyeqXfiSpgiL/KorsUrhRWu8qwlFhEFczNb9c4m VIwS2ecEVi3UkPOZPVtU0aWZplue1V68+WnJLLqKrbPMp5Fxv10w2FFrmwQz+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=01wohteJ1wOc1XajRhFeHDrjxhR47pjsW0sNbwAf40w=; b=G5/i6IjCaUVFxZyfZht9JmhPVFGvIlgvSDMqYUGHnR7Pw/wAhWV3LFIMydJhVJ1cW71SMZ sPcjpjjpBae8SAtGzMRZ+1CBWN6ceInhst3wVylya5m9pK6eev1t35kMF9GwjLGyh0Y/cA k/XtlRlRm/r7+NvFj6aW0/tqcFaEdAkuwN+yFMFtpTzRjD1dqAxzAWQCdvOY/vM7muWuxK TROk5/bG4dfnEj/XA5vtrSqdKYBEdGKxmHvSVH+Hx6jrFW+LhBFAK463LUCQ2Kj09kd54e rvPsSaembaeAql5x8n1DAZh+Rzrwt4ZkbsiMtQsb8z+HUM3TZTZgn5792LNpkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1R1fr5z178Q for ; Fri, 24 Apr 2026 15:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33dbd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:28:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: f6add67808f3 - stable/15 - acpi_apei: Remove the hest member from the softc List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f6add67808f332719787c4260dbb0fcf7525fb3e Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:28:59 +0000 Message-Id: <69eb8c3b.33dbd.6774e032@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f6add67808f332719787c4260dbb0fcf7525fb3e commit f6add67808f332719787c4260dbb0fcf7525fb3e Author: John Baldwin AuthorDate: 2025-12-26 15:36:24 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:38 +0000 acpi_apei: Remove the hest member from the softc This is only used during attach and freed after use, so just use a local variable in the attach routine instead to avoid leaving a dangling pointer around in the softc. Reviewed by: imp Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D54310 (cherry picked from commit 88f8e3c5ab97025587d7df761c8ae72e2db6c1d3) --- sys/dev/acpica/acpi_apei.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sys/dev/acpica/acpi_apei.c b/sys/dev/acpica/acpi_apei.c index 9cfd46c97430..8b79be5d97c4 100644 --- a/sys/dev/acpica/acpi_apei.c +++ b/sys/dev/acpica/acpi_apei.c @@ -86,7 +86,6 @@ struct apei_pges { }; struct apei_softc { - ACPI_TABLE_HEST *hest; TAILQ_HEAD(, apei_ge) ges; struct apei_nges nges; struct apei_iges iges; @@ -562,9 +561,8 @@ hest_parse_structure(struct apei_softc *sc, void *addr, int remaining) } static void -hest_parse_table(struct apei_softc *sc) +hest_parse_table(ACPI_TABLE_HEST *hest, struct apei_softc *sc) { - ACPI_TABLE_HEST *hest = sc->hest; char *cp; int remaining, consumed; @@ -662,6 +660,7 @@ static int apei_attach(device_t dev) { struct apei_softc *sc = device_get_softc(dev); + ACPI_TABLE_HEADER *hest; struct acpi_softc *acpi_sc; struct apei_pges *pges; struct apei_ge *ge; @@ -691,11 +690,11 @@ apei_attach(device_t dev) } /* Search and parse HEST table. */ - status = AcpiGetTable(ACPI_SIG_HEST, 0, (ACPI_TABLE_HEADER **)&sc->hest); + status = AcpiGetTable(ACPI_SIG_HEST, 0, &hest); if (ACPI_FAILURE(status)) return (ENXIO); - hest_parse_table(sc); - AcpiPutTable((ACPI_TABLE_HEADER *)sc->hest); + hest_parse_table((ACPI_TABLE_HEST *)hest, sc); + AcpiPutTable(hest); rid = 0; TAILQ_FOREACH(ge, &sc->ges, link) { From nobody Fri Apr 24 15:29:00 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1S6YlXz6bSG4 for ; Fri, 24 Apr 2026 15:29:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1S2sc3z3CwS for ; Fri, 24 Apr 2026 15:29:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rtpcWnFgbo9inSMGWOTG0FkLECJiOCcLalBEKXkaDcc=; b=tSIAndlNw3cqLuxsHIINKGDGhvyDoQ/PQu4lzw9ZGYMC8y56W7dMUJfm1TZX6eGMqbm6x2 Tpa/YuMmCiMBc5u/jk1VOgEFyWPZSHX6N9L2X++G5G0CA4MNNBip+NSGwOAyu14aGnQzbt SavQPo4YBRzmyDmkUW118IEud5PLHonD6rvcgD/tWjEkax6ABKu8MJptbXrU6n3fEphguR Rglr7SkQAlP3wwMtcEaSQG8xK1VkTHwSaahd7lcEaXbq0qlxkPYlt6lBycQWR4Z48hm5Zm gMsxZyBrZ8ErFT+O0GrZ+bWR8jBR//OoLpzlryDPkN5uv7n3HgFmNdZH45bGCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044540; a=rsa-sha256; cv=none; b=QKIZzJ8k+Ct6a/v3Ce+DYqmkyfASBg4JnDt2NV6B890a551uPXY8XajAg+lh0Qi8dlP3Mk D9cEHEMtnp+pKrDCCggOzkYqDSbR8ZqhZH8p3OIqTuzp3jIhXt9FRRwA9itfsIAhQZBXy/ J4FfEQJy4B6CGQ9gepDfZauxk5HA/BgYx9Ou1aqoiE0D/KDuZ/oA04kmgfr4yrE6qrHJ9/ aZjyBPZoz299TjnsFu4//GesnGQl8gqAUc0+tjs13MXd+XynYeayQGgI89OHwdbNaAH4Ec RHWG4mW4knRmezAMOMKycDsELVqR+1AZKJnvCfVXYZsAwKdmMTVQe7/2kKXc6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rtpcWnFgbo9inSMGWOTG0FkLECJiOCcLalBEKXkaDcc=; b=X/k6Lm30ogYHVF8l2NziVNUFhQsPLDPdfGXD9EcFKB8F7RpyISiUKXSs7McKmtQ3CcBbQZ fE/msCtomXrckgqvOZyaGd4aqaenmy9s1ZJQoXvlsbPYNQm9FpTGx4A43mC97F8jNLUTJy xZwlgMLd6D54WjV6K/PYgkl1MZIYqtozsts7gAvha+Xk4P4SS7oafnjMPmxluC7Wtcdfdi iy4J23dQfkDkF9eYq4NHj8sDiFdWwZhTwKWyLoUPExDJs87c9sC1ANlS1RQkggLdBRARd5 Gt5U97xEabvfqU8i3Bz4Dh0zxxBKMw6t2pCbVNY5WNzB40rQDPR4+g7JHVteqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1S2RKnz17ZD for ; Fri, 24 Apr 2026 15:29:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33ef3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 03792b24472f - stable/15 - acpi: Reject duplicate handlers for ioctl commands List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 03792b24472f6dc3a043007c7eef455291737889 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:00 +0000 Message-Id: <69eb8c3c.33ef3.62d53012@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=03792b24472f6dc3a043007c7eef455291737889 commit 03792b24472f6dc3a043007c7eef455291737889 Author: John Baldwin AuthorDate: 2025-12-26 15:36:38 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:38 +0000 acpi: Reject duplicate handlers for ioctl commands Reviewed by: imp Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D54311 (cherry picked from commit 4eb560faa725771e536a850a9467fbb592ab3c1b) --- sys/dev/acpica/acpi.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index bac5b8c889e0..47c8ae1d1d6b 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -4109,7 +4109,7 @@ static int acpi_ioctl_hooks_initted; int acpi_register_ioctl(u_long cmd, acpi_ioctl_fn fn, void *arg) { - struct acpi_ioctl_hook *hp; + struct acpi_ioctl_hook *hp, *thp; if ((hp = malloc(sizeof(*hp), M_ACPIDEV, M_NOWAIT)) == NULL) return (ENOMEM); @@ -4122,6 +4122,14 @@ acpi_register_ioctl(u_long cmd, acpi_ioctl_fn fn, void *arg) TAILQ_INIT(&acpi_ioctl_hooks); acpi_ioctl_hooks_initted = 1; } + TAILQ_FOREACH(thp, &acpi_ioctl_hooks, link) { + if (thp->cmd == cmd) { + ACPI_UNLOCK(acpi); + free(hp, M_ACPIDEV); + return (EBUSY); + } + } + TAILQ_INSERT_TAIL(&acpi_ioctl_hooks, hp, link); ACPI_UNLOCK(acpi); From nobody Fri Apr 24 15:29:01 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1T5y7rz6bSMV for ; Fri, 24 Apr 2026 15:29:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1T3jXDz3Cmp for ; Fri, 24 Apr 2026 15:29:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VlwuS22L42TwDlvkA2FCb6jld37QvnlwHZmh8oY8RyE=; b=s4RXeQchAJCd+DJ2rz1wBDUeVKaUkUSba0ZarabxCmVDiLHAW8bzIQNm5DyajqZekoxWLh XfUiZCH8eYaYDho0I2cfUPeKkHk/jQD0+bi1wabaiTlfKO/Qbkw0erJ/xHUwr9ZeaYBqTV flo73eXmylb9TvI5dfadBuqK9LZJrkBWGED/G4Z8ibHIWwXc7e5BX/21/XQ235JWHRAcOl hhnaEjz3n1OK/sC/j8BVIwEMRS+BUt08DruBT4y7LoVvtEo2XZcVmmuQt4st6HvE0g2uHK XbFA8ukQ3aSQN7l+vbjMGZCG7vLhCqUkUUOSRjqEAMF0aquHK/bg0nxgONPExQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044541; a=rsa-sha256; cv=none; b=DKcjHvUxSus7doaKCCoWk3PXANFls2NsVskUBrHMwaGViyhVWY8m2XSbCnGeyNcyBBzhfc NVyghPkctN1kjmIt5B0u7wDZ7DeO3KQpy2+oQHO+kpG4gJXwT+yFIKngLUwB0Ruxarkdgn p3U0t/pwxFmLjFa+2VHFU38jxtg8rHobpevvl/AJmrMuJ3TkEIuo0yPW8GLOy09akqb80z a6uzoiQZ7QKqAPhlZR5qXxYVM9TemM+M1shStYRGm6iUtACcIPWWYyhgKWrZHOJO95oyEF lgpfRN4f1m4K5yiRPu5qPD/trdrnW/KZ996sKVFh36M8w2PRMcoGVY81qhF1Hw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VlwuS22L42TwDlvkA2FCb6jld37QvnlwHZmh8oY8RyE=; b=EcRaGRPAUZK/hNQhVKkTBJSczPW0e5tXvRnOrUBuj4s0JUDR6fEypocKF5oXrA24i0Z2lD 0owKjkV4A1jTSlzfWi122bQJtm8PQkFVls71n3wuBSiwiiSYqUad8Ezp+BHwi1gTC/Cm/B K/LOO4RK7xfCz/VvLVSt+tiwvMTkr6ZVLiHyM6KiN4JTlbXDx7DF9HrjuqnvRNyZ/O0/Qa sqWDy66jubaGu2i8Q4UdFKgW8OmwJ4kri8tCvpCG5Q4iHZz5Po9OlRwcc+GFyaqF8i67If LZ4Q9jdUtCDEN2Ee9j/wxCgBAI2+Hufti86ltggCH5s+3aSyU/5REVSbSC03Bg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1T3DCRz17cC for ; Fri, 24 Apr 2026 15:29:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 361dc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 5c373870e9d6 - stable/15 - acpi: Use M_WAITOK in acpi_register_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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5c373870e9d69fb057ac8c551bb4299f8e277c23 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:01 +0000 Message-Id: <69eb8c3d.361dc.7d2581e7@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=5c373870e9d69fb057ac8c551bb4299f8e277c23 commit 5c373870e9d69fb057ac8c551bb4299f8e277c23 Author: John Baldwin AuthorDate: 2025-12-26 15:36:48 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:38 +0000 acpi: Use M_WAITOK in acpi_register_ioctl This function is only called from device attach routines which can sleep. Reviewed by: imp Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D54312 (cherry picked from commit 425b41f81634fd5a8f7d038191560040d1d4d32c) --- sys/dev/acpica/acpi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 47c8ae1d1d6b..ce202bb60167 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -4111,8 +4111,7 @@ acpi_register_ioctl(u_long cmd, acpi_ioctl_fn fn, void *arg) { struct acpi_ioctl_hook *hp, *thp; - if ((hp = malloc(sizeof(*hp), M_ACPIDEV, M_NOWAIT)) == NULL) - return (ENOMEM); + hp = malloc(sizeof(*hp), M_ACPIDEV, M_WAITOK); hp->cmd = cmd; hp->fn = fn; hp->arg = arg; From nobody Fri Apr 24 15:29:02 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1W0d2Gz6bSD9 for ; Fri, 24 Apr 2026 15:29: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1V4nHMz3D0x for ; Fri, 24 Apr 2026 15:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oaX52GQ9OYsn9yM+MKJfhyoP0X+ZwBo6PcsM7YYqipI=; b=S5I2T+94ehC8GIbRa1MMo6G7HSQousvFZmGpoGVguOjLvV3jooc0vtsUDp2JkaHZ+cvC6B Uwiyk83TkvoydUo/khy1f5h29pZMg2Dc+mkAYf3/nOny5p9hBpg/AvqsqPEr3C6e5UdtOg txap02i+ba5QTpTBP4PHTimPqa2sIViKN1Q63MJQgk0sbkZXkBaQyg/yfyMjQIY6ZH/t4D W4uQm6IuLk2PPJRIgmvRFJTuJuoEtojBSZsO2M61BjmGZ5qsanUDq0GLOLiyDrHrpQslsi MVsIsZ2XKN8uQO+NxHzhJohkhEx1sm6kMczOfqh/SD2GwL8sbzTHZmoumSB20A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044542; a=rsa-sha256; cv=none; b=hpHk+COnryJ0ySkDUnDkf9VC/mSZjnQ+idRNAi5V3xj4qHdr7+p929AW+pf+CHGQhyuuHA HNcSkxtUmw+rpCip3+Nt0dOuR5ER/hopOg1aUceYYRaC4g12vdkPzfTYt8aaaXmewgEGb+ 8J0gCBqdBajG0lfTsQToEhrjKF5rS/VMP0D9UgbKvhEgtFvr+dMVbyV76MCN/x/EpnArgS zQxiTTBzrvvlIRxD7JWHLGbJGUye4Ih5WBbhjt0rH7AuvAYSfKQu6gCEayuMGQF/DgCipH xBdGm8XtdNlLsEtXI2NQduGmIN8hCBVUdC5PBkFUiO3AyzNfc88rivIflC/PXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oaX52GQ9OYsn9yM+MKJfhyoP0X+ZwBo6PcsM7YYqipI=; b=v997Ufj27hoPdzoyGvygVdUeiQzGKiqkjVGr2cDzA4MQPRw7OKLYpKWkZJhQMZv7FMOXXv IDY553ZGr78Hq3P4M4HEVPoexFPIjR5Ij+ncmZhR8bTVt3j0UqFApI2zjvPG+8euzrbfXP en6N9nLCjqpsUY4Ilw7HDTHfU6OChdDXnMcvlX+LfCRLbR4PsBeVo3IrEWcSbLvaCVlZP9 xdYUjJXVGyutpRzPL9Ij5zPbcbQ8z03Ez45MBinGbG55ZzdANEt+PkqhdVXpaHOEY0ZugR BdC1cBF/59W+XNzSBR+QyHH36YCYbJvDTS/ZR8JcD0Vn8gGFDX8TV/rVhuTebA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1V40YDz17RK for ; Fri, 24 Apr 2026 15:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35f56 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 2d3136984827 - stable/15 - acpi: Statically initialize acpi_ioctl_hooks List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2d313698482730bcabe60492e9a02e70e02eb53c Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:02 +0000 Message-Id: <69eb8c3e.35f56.7bce113f@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2d313698482730bcabe60492e9a02e70e02eb53c commit 2d313698482730bcabe60492e9a02e70e02eb53c Author: John Baldwin AuthorDate: 2025-12-26 15:37:10 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:38 +0000 acpi: Statically initialize acpi_ioctl_hooks Reviewed by: imp Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D54313 (cherry picked from commit 11757b1487e3e8ca0479dff5da0815b42aea3fe0) --- sys/dev/acpica/acpi.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index ce202bb60167..7db4c776b00b 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -4103,8 +4103,8 @@ struct acpi_ioctl_hook void *arg; }; -static TAILQ_HEAD(,acpi_ioctl_hook) acpi_ioctl_hooks; -static int acpi_ioctl_hooks_initted; +static TAILQ_HEAD(,acpi_ioctl_hook) acpi_ioctl_hooks = + TAILQ_HEAD_INITIALIZER(acpi_ioctl_hooks); int acpi_register_ioctl(u_long cmd, acpi_ioctl_fn fn, void *arg) @@ -4117,10 +4117,6 @@ acpi_register_ioctl(u_long cmd, acpi_ioctl_fn fn, void *arg) hp->arg = arg; ACPI_LOCK(acpi); - if (acpi_ioctl_hooks_initted == 0) { - TAILQ_INIT(&acpi_ioctl_hooks); - acpi_ioctl_hooks_initted = 1; - } TAILQ_FOREACH(thp, &acpi_ioctl_hooks, link) { if (thp->cmd == cmd) { ACPI_UNLOCK(acpi); @@ -4179,11 +4175,10 @@ acpiioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *t * Scan the list of registered ioctls, looking for handlers. */ ACPI_LOCK(acpi); - if (acpi_ioctl_hooks_initted) - TAILQ_FOREACH(hp, &acpi_ioctl_hooks, link) { - if (hp->cmd == cmd) - break; - } + TAILQ_FOREACH(hp, &acpi_ioctl_hooks, link) { + if (hp->cmd == cmd) + break; + } ACPI_UNLOCK(acpi); if (hp) return (hp->fn(cmd, addr, hp->arg)); From nobody Fri Apr 24 15:29:03 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1X2FPzz6bSJs for ; Fri, 24 Apr 2026 15:29:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1W5VsTz3CkN for ; Fri, 24 Apr 2026 15:29:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UfITEtMVVnK9Elu/xWj+ZVePPT9XCYDzDt1pFXsXDm8=; b=eATWngwgRqclOsJFqebzjZiX5TP/VGyn7ySq6FFt+YCIc/onvjQ6Gx+PKDn0TMSqI/bjTm Ro/szVz/znI1roneLg2MOMDmy/BlAXqzadMdkJJVdCRr7gOjoaO0S9/GgJB9PWfQ+q62dq t2K+PcNny9KI935RUJNkbX8lwExdYxvCh5+NR1YOTj5I2dM1+7oRReA4dAkYW3jH0r0qGw gtca0+btAyHWQ9zVVcrwtImwCUJ8s21ItL/qDuTuEc8fe9iUOz3drz551Wxy66nHooB3YA 1oHljY6W9ZNirWQxIryCLJaQk1b9R19miIiOny6Q+hLvd7qJl/bn9fEXeM10zg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044543; a=rsa-sha256; cv=none; b=qKpR77LAPkUyiUTuVrre86KnuIKHzjIHnu/YZJeqPhmtJOKFYHbziWNsyFektEYtdWD/87 vBth0+CjtSB2zJ4eDoErbl+wOkqNz53x3dozSpYEu76/P1x0a+blxnCGd91NfRK5MPtOHl OSx3++yuJST9pdB/lZXFJwmylhLr2CKq5JnItlQnIiRCGDtB8q70cOTS0K9yq982FWm7pd n6kHQOonsJFBReCJSh4F41fsISfum4aBY0O/NT5zQdcbYvZ2KhPkGzpekVrHB+Rq6DRC1E LVr4ILIj0P5n+VnuwQx4VudGw0EgsTOQpdhCJXjVI6z3CWZE+VM5q8G52XEqEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UfITEtMVVnK9Elu/xWj+ZVePPT9XCYDzDt1pFXsXDm8=; b=PyBeeNkjW2Bw/Z6bckNuduGUXhtMIN6g5D0AasVs/6tPEVvTcYgLgzu2VncsgDSp5KzJLT UVUgJUm1oQ0/6vKgSm9YX1yKoU1GhCvecHElDx+E6ALVFiVXxHZwXlzi/4EkdBPGl4BXIL myvNphVBZRIX66vT3vBN8JbpgX5xBAzW9NXN6GPoKOb2ZjiJIE3sDpn42GsJH0cDHNp3qM P3wVR7PTOdZ0Xysu7zYzcDlKBFoEFNu7WszkMC6e6pqDqyBklGaLj3/nOQas52xQwHNKDU WxDp3fC0Qpa72gzEaioLFfWuipvw6XRZPAUkrsxc4dGaA5+PexVxa5PqG4W9XQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1W4ntdz17BY for ; Fri, 24 Apr 2026 15:29:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35b8b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: dc1b130c6a07 - stable/15 - sys/modules/acpi/Makefile: One line per subdirectory List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: dc1b130c6a07bb0aaf65a572856b17a262e7ad3f Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:03 +0000 Message-Id: <69eb8c3f.35b8b.3825eedd@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=dc1b130c6a07bb0aaf65a572856b17a262e7ad3f commit dc1b130c6a07bb0aaf65a572856b17a262e7ad3f Author: John Baldwin AuthorDate: 2025-12-26 15:37:20 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:38 +0000 sys/modules/acpi/Makefile: One line per subdirectory This makes diffs that add or remove modules easier to read. Reviewed by: imp Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D54314 (cherry picked from commit fe74d52de5dca506fe07693ffd6a35140bb55abd) --- sys/modules/acpi/Makefile | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/sys/modules/acpi/Makefile b/sys/modules/acpi/Makefile index f646589c9fa4..098161e08836 100644 --- a/sys/modules/acpi/Makefile +++ b/sys/modules/acpi/Makefile @@ -1,5 +1,17 @@ -SUBDIR= acpi_asus acpi_asus_wmi acpi_dock acpi_fujitsu acpi_hp \ - acpi_ged acpi_ibm acpi_panasonic acpi_sbl_wmi acpi_sony \ - acpi_toshiba acpi_video acpi_wmi aibs +SUBDIR= \ + acpi_asus \ + acpi_asus_wmi \ + acpi_dock \ + acpi_fujitsu \ + acpi_ged \ + acpi_hp \ + acpi_ibm \ + acpi_panasonic \ + acpi_sbl_wmi \ + acpi_sony \ + acpi_toshiba \ + acpi_video \ + acpi_wmi \ + aibs .include From nobody Fri Apr 24 15:29:05 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1Z2Xfhz6bSMh for ; Fri, 24 Apr 2026 15:29:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1Y6SgSz3D1W for ; Fri, 24 Apr 2026 15:29:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wb2WLVDL9Y6/n1SLLB1cuwDSPEQHUsytKjh4HseFPHY=; b=MViXQGtSrJlX4af0HBbGbj6a6yYyB4StaQTt+ZvToqhb8ymd6ZLbjuuoOoS7DJYvZnd3W/ gZNf4EIXuJZVp2e36nYy6w1O8lrf54wwUkh8FJnVG/xIvEbEMdkJIuRU0Y5JPIAzPlaUFB 7wdxhBDWGhBmeFJXmtQubN64Xzp/v9z7YUkw2wB/S52DLbWRCZXeD8dXHNM6UdevB1mXc2 PCXfbqnwZsQ2GqyYiRFC4lx7L1CsGk5Zo4omrKy9IJJNgZWWWMHafKuARAGSCkLsk+O2qs 6/1UKmyJPtN07E++2KsDsgewfTo38/QBCe/FOXlCV5xgDSX4HBKrRKWMk92cUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044545; a=rsa-sha256; cv=none; b=uTe/9IQpZHfkB/EIhnhEJYujWo/y6fIb8rc1cNc1zhUO83BzFp9yO1uAXvMn4EqHCWTD9L eEVCuZ0E3VXTHPjAsYRCs3xySY0QakOZQ9b7HIWOfTQLs1pxSFy3GkYAhaqRXcJV9gYEUP 9R1fSY8rQUnHw7P70dovHOilICuh7NA5fmdnnJctzrIKv0fLytjvad0Hcg3GNc1T54ilNp pQr9pgjUzX+z7luJm/8WJNXo9e6M6evEl4jnXGGlEYJYQfYrTjmrOjENobGlpcYycFVJRo GQQBE4F6EW6gWIINM9LRKEQ0uIPhECoQwHLstHil/Pe7NG3OqDOXbByxz8TyLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wb2WLVDL9Y6/n1SLLB1cuwDSPEQHUsytKjh4HseFPHY=; b=rsjVhsdWzlzbKbml4TD50sImNgS8X6+G36MxE+rIpkjmmcNDua7ibO09KsxMlQlD6w5jkI +LzxhYy3L30ZIoBI+TaPKbjRoC3LCG0kNQHid91NL2lvWNqZCa6DJdIsL1/enErF2od0BM Q1kpq+O8Qva5ZU8xOxqi/d9apkYD6LROyw6tZoYZeRmxVuUuQQ7FAcEmul4L9V3+PArzDk 22cHxFbSweTClU9TuKxuQJkOz+J+0QEnb3qxZE8XM974c4ZWVXR0w6kfKs64oS899TtPfX VrBv5CUUny0RgG8OddUTtIRnkhlekFuVttATNvDHVg94sjm0sT2VCPZ4otnmxg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1Y5rSwz173G for ; Fri, 24 Apr 2026 15:29:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33dc5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 852edd195aee - stable/15 - csu: Remove unused constant List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 852edd195aee581322773e70184468a463d06ef6 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:05 +0000 Message-Id: <69eb8c41.33dc5.755969ec@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=852edd195aee581322773e70184468a463d06ef6 commit 852edd195aee581322773e70184468a463d06ef6 Author: John Baldwin AuthorDate: 2026-01-13 15:19:04 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:38 +0000 csu: Remove unused constant This is no longer used after commit 99282790b7d01ec3c4072621d46a0d7302517ad4 moved ELF notes from C to assembly. Reviewed by: kib Fixes: 99282790b7d0 ("Remove the sed hack for ABI tag notes.") Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D54506 (cherry picked from commit 113dc9ed98874d15f4f43287dcb6d0f59633b19b) --- lib/csu/common/notes.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/csu/common/notes.h b/lib/csu/common/notes.h index fc4e4d082c21..8f35e0eb2491 100644 --- a/lib/csu/common/notes.h +++ b/lib/csu/common/notes.h @@ -27,6 +27,4 @@ #define NOTE_FREEBSD_VENDOR "FreeBSD" -#define NOTE_SECTION ".note.tag" - #endif From nobody Fri Apr 24 15:29:04 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1Y1tv9z6bSTX for ; Fri, 24 Apr 2026 15:29:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1X65g1z3D5c for ; Fri, 24 Apr 2026 15:29:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6VFJdPcPLJ7DvLv+R9aTjO/jzyCOm/P1tcaDLDORIgE=; b=fCr/eV1ltANtzIt9K7daLFAmt7BEdU98WhwthCXdj5sYOH5xP2Lhx7fuxXKL/0X2z+15YG 2KS2uFHqJ5bnRjn2rAdrkZXqiXzWGOgBBnZ6l9RlT0ptAlbLr3dAGD6rxiE2Ag9F3bowQ+ GjM39vvvmd/c9stoDwNHBmWGttA8bbr29ZwkqwO+3UVxS7//qdPbHbcDVaC5o593CuUhv5 EArz772V/jxYY0xl4ya3loF2/CvH0NnmDxsDk/OKgIMIZ94JCmC5Pg3u6aBA7XaeIlIOH3 HnRDBlkegT5pWMHDkLu2UWrIE/EfkseMwyFA6cOfy1BubhTIozQzlhCZSTIJ4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044544; a=rsa-sha256; cv=none; b=mSOlw4grFipcE/pf/m39f/Ru6kz2Jgn0VBAVp4QCz21jV04bVzEfn8YUHJcyXrm7oGERf6 b3dWSg9gu6TKfgM0KR46pY59ZRDt15hSR1Qyc8ATlJ/v5N9d837DrOP/RBvz0/LeI/WqXU n9hqPnzeXghR7vm+pU7iP/jkBwPjMRapY0grUOb0wTLHuLFMT6hUuotND92ZMZ8ihA6S9W ksaf8kbb/08IC23TwimEskHP5RZQRiAlHOp3bwCH+uJCkjiOTy869TXexdptJrDKwEJo4B gd8Xn5T8KMhlbFI1cKof6e4VGf+qHbukkTwheBT1cpm+O92bTAXdpbwbmkQDAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6VFJdPcPLJ7DvLv+R9aTjO/jzyCOm/P1tcaDLDORIgE=; b=LtFoB/FyEHvSFA+lKcCKHUA0JMMu9lguRmz0ptNQhOLfEyZpvxF6I6jbHu4i9TpjFeaWxK AWFVIPS1Y+CJ9+MJPJvekrRbeC6klIH7NUl4y1Ve60ZriregXTAd8iF+30G+qTRarKPbdw K4VqNHDEs0A+pqdK/QanaZc9yUYxtBj7x3RbV3u3Rxb5vTKa06mi3cOF38mdckeGF/S0G0 2uOGLpgSO9AhdjXOOCcRkveYSa0kXfJmDs111XLzUJhFqa88fVDSd54xkDxH/6S7Aam+WB 8kux4JJzAjcrdDmm0O6KM0haMRa9mmTJe6aQDGI8bUtxQEVwR0PDwaSOKwqbOg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1X5Ydwz17RM for ; Fri, 24 Apr 2026 15:29:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33dc1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: b2516469fed2 - stable/15 - Build acpi kernel modules on aarch64 List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b2516469fed27d8d664b74340ce21bf1b77ecec0 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:04 +0000 Message-Id: <69eb8c40.33dc1.3752a79@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b2516469fed27d8d664b74340ce21bf1b77ecec0 commit b2516469fed27d8d664b74340ce21bf1b77ecec0 Author: John Baldwin AuthorDate: 2025-12-26 15:37:34 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:38 +0000 Build acpi kernel modules on aarch64 For now, the only kernel module built is acpi_ged.ko. Sponsored by: Netflix Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D54315 (cherry picked from commit bd8296bd81d55563f7ccafca77b7b74fb219df9e) --- sys/modules/Makefile | 2 +- sys/modules/acpi/Makefile | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 204f604166e0..cb18bb07b8ab 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -587,6 +587,7 @@ _mlx5ib= mlx5ib .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ ${MACHINE_CPUARCH} == "i386" +_acpi= acpi _ena= ena _gve= gve _igc= igc @@ -776,7 +777,6 @@ _wdatwd= wdatwd _aac= aac _aacraid= aacraid -_acpi= acpi .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) _aesni= aesni .endif diff --git a/sys/modules/acpi/Makefile b/sys/modules/acpi/Makefile index 098161e08836..5040187e906f 100644 --- a/sys/modules/acpi/Makefile +++ b/sys/modules/acpi/Makefile @@ -1,9 +1,9 @@ +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" SUBDIR= \ acpi_asus \ acpi_asus_wmi \ acpi_dock \ acpi_fujitsu \ - acpi_ged \ acpi_hp \ acpi_ibm \ acpi_panasonic \ @@ -13,5 +13,9 @@ SUBDIR= \ acpi_video \ acpi_wmi \ aibs +.endif + +SUBDIR+= \ + acpi_ged .include From nobody Fri Apr 24 15:29:06 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1b4htmz6bSQ6 for ; Fri, 24 Apr 2026 15:29:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1b00ygz3CyD for ; Fri, 24 Apr 2026 15:29:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RswJuOE1ze1xdH7oh5VJuxO1PiZfHGudxzuBhOhJo4U=; b=i9IPqA7ZkTJCIvqjBSIo7X0EGqITvPqHU+FexOvevz7xNa0zdZG5V28hAF1Ht/Oty68Yjh rZI06mvbPQw8dOzFdidTzBBQhn7VDQ/jshz3w72H7CGz6fAZ/uLiH8z2OrYFWLIXHrzTuo wBGr0siET069b4ZCiB6U9PR1yS6bas1hSssxjlt64ySeIsaQiJFMJxnPI3/UlDmI2DxNaf nicm91Jb7ETP0C03Quy/9E5OXAObLGHvHFWh1zA0ttNjAEWalWzw3axXNW8s8zW08c3g9h 1OAHW4ij3JyvAx3Wbc39yt5DHu2N8yokOPuQ50IM43sleQ35OLoVx79a3HXzvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044547; a=rsa-sha256; cv=none; b=ZNbkOP7pHzGPOb3R6zktMsOgOCOPyuaWbkx9CqOMgH2Imp0/QC9OcW6aRwSKLOGyksIwKB bd9tFlKl+1yHFXUq6UDpykJYXXskA5zDAsFwdqp9hO0HnjGoq18OXl/k+7V7XeYlOPdZyW AWAg0ApH8QjnP3BHNW2h/gdIhtOXpc0yL3RD5Tfgp8KBakpSuxMWC/jw4vArhpgjyoPBmy TcttVwp6W35uyAYaIaS4mq6I0Kdk28piYGiUl8kgZ6mIhJzzPVXPTbvv7LPuiHYNgk11sD wJAHrtEgeVf6EpFRjTKmi9RbinYuLNxN7n+VBMkMYd8KcmUULzyE4YMGZ1UC6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RswJuOE1ze1xdH7oh5VJuxO1PiZfHGudxzuBhOhJo4U=; b=gsgLxn6zSh7l6zVUtIHXbuN71PuE39ozG2v9AdXwv857fn6CmChEFlVO4DbsSPjIKrL7sR ndV65ZxyqKqhuRj6ngPpOKgOthkB+/5ztD4jpEPCyns76orq2V9lDk/hSaAKh6SwWDnxyg vPdugC02+7frfwjJ5ImlxIo5OWCbG3mxUsl1fvidx95thquXWaCFKKcgj0NRc7NV0amkb1 YSx+8tJ4iGrrhkb78MOlbdGjaPKiJ+OOR5Hn0jl4DkPunw7iPYguEcNoWkmLu2ruZwD9QQ 6ScCLSZrcarEo7ZiiE8OVnIqWWZ9MH2yTB9yKL6am3KYx3DNIANDU/M1+lED/A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1Z6NqDz17lt for ; Fri, 24 Apr 2026 15:29:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36980 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: deebb011a443 - stable/15 - swab: Correctly treat the data as misaligned List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: deebb011a443f45a0ab13c7a48cbaf5c846aef38 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:06 +0000 Message-Id: <69eb8c42.36980.5a57406b@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=deebb011a443f45a0ab13c7a48cbaf5c846aef38 commit deebb011a443f45a0ab13c7a48cbaf5c846aef38 Author: John Baldwin AuthorDate: 2026-01-14 17:10:33 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:38 +0000 swab: Correctly treat the data as misaligned The __aligned attribute in the previous version applied to the location of the pointers, not the data the pointers pointed to. While this could be fixed by applying the attribute to a local typedef of uint16_t, just using memcpy() for the unaligned access is simpler and ISO C. This fixes the build on CHERI architectures which do not support misaligned pointers and were thus failing with: lib/libc/string/swab.c:12:18: error: alignment (1) of 'const uint16_t *' (aka 'const unsigned short *') is less than the required capability alignment (16) [-Werror,-Wcheri-capability-misuse] 12 | const uint16_t *f __aligned(1) = from; | Co-authored by: Jessica Clarke Fixes: 02ebbc781f08 ("swab: Fix implementation to support overlapping copies") Sponsored by: AFRL, DARPA Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D54399 (cherry picked from commit 2a5c5b8f7cddf14537707895fceb454cabc1b3bd) --- lib/libc/string/swab.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/libc/string/swab.c b/lib/libc/string/swab.c index ed4436a49810..4f4fb26379c6 100644 --- a/lib/libc/string/swab.c +++ b/lib/libc/string/swab.c @@ -3,14 +3,16 @@ * Copyright (c) 2024 rilysh */ +#include #include #include void swab(const void * __restrict from, void * __restrict to, ssize_t len) { - const uint16_t *f __aligned(1) = from; - uint16_t *t __aligned(1) = to; + const char *f = from; + char *t = to; + uint16_t tmp; /* * POSIX says overlapping copy behavior is undefined, however many @@ -19,7 +21,12 @@ swab(const void * __restrict from, void * __restrict to, ssize_t len) * and swapping them before writing them back accomplishes this. */ while (len > 1) { - *t++ = bswap16(*f++); + memcpy(&tmp, f, 2); + tmp = bswap16(tmp); + memcpy(t, &tmp, 2); + + f += 2; + t += 2; len -= 2; } } From nobody Fri Apr 24 15:29:07 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1c4QHtz6bSK6 for ; Fri, 24 Apr 2026 15:29:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1c0LkGz3CyJ for ; Fri, 24 Apr 2026 15:29:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z9ILQBjQM56BY/CFgI9TaPxpkZmpoGaWSA9AAqBB4kE=; b=SMkUmcr7Ue+ZTQHsvTeNPZiaruWMXs9z8VtGHeSVZDOMGqahMCLCwe+O8O/YGlD3vXNcb2 882Mf1UVm2wEQpISYAdc7ltR1CjH0NmK/s5Ai7mNFKtdsccUDFTxPxx7i1y2/Io+wp0pLl X4TNZIZpLft12gmDHsYByYTYSzYN5a9JACdfv2QVsgoJXxID24QV2XIqzPxZr4hc5MlfZi meNJlWC19huSXwJ4hEZGS3tJoirQ5q36hWXjbpEuDG9GpaNhM+CikWwGYLn7Z1eG8Dmp1i hOR+oscsXCBzGA35raDFOAgzpZiem1ANVm8d6S2YJzSiU1QROcLETb96cQgzrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044548; a=rsa-sha256; cv=none; b=D20ocT14hTuljzW8z5/i6CnvYoRY2bF/9cEEpV0ri6X4Xl0cokNUjbhMTLxpFhBP6t6AGt iZw7A1gc/u44zy8ycElEECTECbCW1H+zYv6PghquE5rbbTMsqcdtwyfVgLbO474rtJ5PVn sCsSNkuz8Yy4XKxEDsf2ZWERx93+QmqN5mt9FxB7lkZ6ZvY6mKfA4shRi3ck1rxGsDCm3g TjDtO7FEkJexr+F5ZFthJV4kIvp5APRRcDUK9SirpCsDepuAljIe7snewc1kc9V+DKWdo8 a1DlwhYaSZJ3Qv4NwEtsb2rtMKozW1Kc/TT0dKAJHLpvwWXbSseapgujeC9E/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z9ILQBjQM56BY/CFgI9TaPxpkZmpoGaWSA9AAqBB4kE=; b=KXbwbd9RzsHGF8MWbVYj/KVTABcuUhzxgt7ch6FNx3RNh/XICznZKkENWhxUCNmkiw5Qj9 APVFvFLYDecXIiAzLebF29SB10H5mRjx6mjIjG0+psDrabj0WRbETf3CE/oUEn7BENYU2/ TZ8iQs/+L1plthlc2K9mhvTuxJoCD+m5nn9v4XwlweJHiy73LEozTdcRejccv/hyAgTkIO idQ9k19Kd6cB4EtBk0BGz+qI4ogumBvZKxcqzRQOsylsub6gQ2iI6ZU4sXbm5qIemq4gi9 8GAT9IReVroCkIBl3t+1quDGbaNYhEC9oxq18DitDLq8Fj6T7046dBmQxuy6eQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1b71cSz17BZ for ; Fri, 24 Apr 2026 15:29:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32e74 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 4bbc38778316 - stable/15 - rtld: Simplify walking program headers List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4bbc38778316711e552ada29bf15c0f850351974 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:07 +0000 Message-Id: <69eb8c43.32e74.7d208cdf@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4bbc38778316711e552ada29bf15c0f850351974 commit 4bbc38778316711e552ada29bf15c0f850351974 Author: John Baldwin AuthorDate: 2026-01-14 17:10:33 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:38 +0000 rtld: Simplify walking program headers Store phnum in Obj_Entry instead of phsize and use that to simplify the terminate expressions when iterating over program headers. Reviewed by: kib Obtained from: CheriBSD Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D54710 (cherry picked from commit 31a440a0e9a26fee109ed753e3493c72b9dc05e9) --- libexec/rtld-elf/map_object.c | 2 +- libexec/rtld-elf/powerpc/reloc.c | 4 +--- libexec/rtld-elf/powerpc64/reloc.c | 4 +--- libexec/rtld-elf/rtld.c | 18 ++++++++---------- libexec/rtld-elf/rtld.h | 2 +- 5 files changed, 12 insertions(+), 18 deletions(-) diff --git a/libexec/rtld-elf/map_object.c b/libexec/rtld-elf/map_object.c index 5e5774c0b017..6c6f0c9289b9 100644 --- a/libexec/rtld-elf/map_object.c +++ b/libexec/rtld-elf/map_object.c @@ -318,7 +318,7 @@ map_object(int fd, const char *path, const struct stat *sb, bool ismain) phsize); obj->phdr_alloc = true; } - obj->phsize = phsize; + obj->phnum = phsize / sizeof(*phdr); if (phinterp != NULL) obj->interp = (const char *)(obj->relocbase + phinterp->p_vaddr); diff --git a/libexec/rtld-elf/powerpc/reloc.c b/libexec/rtld-elf/powerpc/reloc.c index c160028cea6d..eb6f50c3c841 100644 --- a/libexec/rtld-elf/powerpc/reloc.c +++ b/libexec/rtld-elf/powerpc/reloc.c @@ -366,9 +366,7 @@ done: * Synchronize icache for executable segments in case we made * any changes. */ - for (phdr = obj->phdr; - (const char *)phdr < (const char *)obj->phdr + obj->phsize; - phdr++) { + for (phdr = obj->phdr; phdr < obj->phdr + obj->phnum; phdr++) { if (phdr->p_type == PT_LOAD && (phdr->p_flags & PF_X) != 0) { __syncicache(obj->relocbase + phdr->p_vaddr, phdr->p_memsz); diff --git a/libexec/rtld-elf/powerpc64/reloc.c b/libexec/rtld-elf/powerpc64/reloc.c index 4a4107aef861..a107da6b0a6a 100644 --- a/libexec/rtld-elf/powerpc64/reloc.c +++ b/libexec/rtld-elf/powerpc64/reloc.c @@ -364,9 +364,7 @@ done: * Synchronize icache for executable segments in case we made * any changes. */ - for (phdr = obj->phdr; - (const char *)phdr < (const char *)obj->phdr + obj->phsize; - phdr++) { + for (phdr = obj->phdr; phdr < obj->phdr + obj->phnum; phdr++) { if (phdr->p_type == PT_LOAD && (phdr->p_flags & PF_X) != 0) { __syncicache(obj->relocbase + phdr->p_vaddr, phdr->p_memsz); diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index aa17041fdc2d..b987ce4d2a9d 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -1693,7 +1693,7 @@ digest_phdr(const Elf_Phdr *phdr, int phnum, caddr_t entry, const char *path) continue; obj->phdr = phdr; - obj->phsize = ph->p_memsz; + obj->phnum = ph->p_memsz / sizeof(*ph); obj->relocbase = __DECONST(char *, phdr) - ph->p_vaddr; break; } @@ -2432,8 +2432,7 @@ parse_rtld_phdr(Obj_Entry *obj) first_seg = true; obj->stack_flags = PF_X | PF_R | PF_W; - for (ph = obj->phdr; - (const char *)ph < (const char *)obj->phdr + obj->phsize; ph++) { + for (ph = obj->phdr; ph < obj->phdr + obj->phnum; ph++) { switch (ph->p_type) { case PT_LOAD: if (first_seg) { @@ -2495,7 +2494,7 @@ init_rtld(caddr_t mapbase, Elf_Auxinfo **aux_info) ehdr = (Elf_Ehdr *)mapbase; objtmp.phdr = (Elf_Phdr *)((char *)mapbase + ehdr->e_phoff); - objtmp.phsize = ehdr->e_phnum * sizeof(objtmp.phdr[0]); + objtmp.phnum = ehdr->e_phnum; /* Initialize the object list. */ TAILQ_INIT(&obj_list); @@ -3015,7 +3014,7 @@ load_kpreload(const void *addr) obj = obj_new(); phdr = (const Elf_Phdr *)((const char *)addr + ehdr->e_phoff); obj->phdr = phdr; - obj->phsize = ehdr->e_phnum * sizeof(*phdr); + obj->phnum = ehdr->e_phnum; phlimit = phdr + ehdr->e_phnum; seg0 = segn = NULL; @@ -3397,10 +3396,10 @@ reloc_textrel_prot(Obj_Entry *obj, bool before) { const Elf_Phdr *ph; void *base; - size_t l, sz; + size_t sz; int prot; - for (l = obj->phsize / sizeof(*ph), ph = obj->phdr; l > 0; l--, ph++) { + for (ph = obj->phdr; ph < obj->phdr + obj->phnum; ph++) { if (ph->p_type != PT_LOAD || (ph->p_flags & PF_W) != 0) continue; base = obj->relocbase + rtld_trunc_page(ph->p_vaddr); @@ -4395,7 +4394,7 @@ rtld_fill_dl_phdr_info(const Obj_Entry *obj, struct dl_phdr_info *phdr_info) phdr_info->dlpi_addr = (Elf_Addr)obj->relocbase; phdr_info->dlpi_name = obj->path; phdr_info->dlpi_phdr = obj->phdr; - phdr_info->dlpi_phnum = obj->phsize / sizeof(obj->phdr[0]); + phdr_info->dlpi_phnum = obj->phnum; phdr_info->dlpi_tls_modid = obj->tlsindex; phdr_info->dlpi_tls_data = (char *)tls_get_addr_slow(_tcb_get(), obj->tlsindex, 0, true); @@ -6213,8 +6212,7 @@ obj_remap_relro(Obj_Entry *obj, int prot) caddr_t relro_page; size_t relro_size; - for (ph = obj->phdr; (const char *)ph < (const char *)obj->phdr + - obj->phsize; ph++) { + for (ph = obj->phdr; ph < obj->phdr + obj->phnum; ph++) { if (ph->p_type != PT_GNU_RELRO) continue; relro_page = obj->relocbase + rtld_trunc_page(ph->p_vaddr); diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h index d4829b17cebb..023e9af9a2a8 100644 --- a/libexec/rtld-elf/rtld.h +++ b/libexec/rtld-elf/rtld.h @@ -152,7 +152,7 @@ typedef struct Struct_Obj_Entry { const Elf_Dyn *dynamic; /* Dynamic section */ caddr_t entry; /* Entry point */ const Elf_Phdr *phdr; /* Program header if it is mapped, else NULL */ - size_t phsize; /* Size of program header in bytes */ + size_t phnum; /* Number of program headers */ const char *interp; /* Pathname of the interpreter, if any */ Elf_Word stack_flags; From nobody Fri Apr 24 15:29:09 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1d3c54z6bSX5 for ; Fri, 24 Apr 2026 15:29:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1d0y50z3DHZ for ; Fri, 24 Apr 2026 15:29:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044549; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w1Sd8nH6ZGI/TdR89eitKI/EOFITL0Pmf3j99tkEeng=; b=hIR1nV48MLkwBpEbjVEMDMZj0wlrA/BCe9ULhT/Bw9TUSzMeEFGQHq++DpdifQ6yzWWbwN bpZxlgv3Szj6f+PGJj1h+dd7GUoSizm5HYTYysLADiESQsOWAu4NN8J/GEm/KqBxIHq1Co LDdBsKe5O4YRFznMalZKsBh1fxbRkdfcQanxq7XgYyNk3JmbPIqPljF23jIokiKMFhw4sr p2AWZINPvNYlnrnR9LoGfHD4b5rXgFO9wvr+gI1koY8xwvq03zLqT7zijGZBRTIBDc37F7 itJws99uFUl7FT1ApNt2Ybyyu8KdYQPAdj4NPaaAcD40KMT91sJSdvdVnmljJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044549; a=rsa-sha256; cv=none; b=qQKZc8NfbKu8zEKg6iWwslxZj04oDs3m5vocIBTLBAQAMZMrZhTJ8tc/wsWD0oGC1raLRc 8zsITfogHdkiqutd5yZcc8sBs0XowC05hAw5bMsz3uAYX1N8lpLORJS2jtRJ08EdCmQoQr O2M/DwXnMyySb6vd4jpMC0lqNRywXqFo8nnftFJvqKh5VJ0iM2ZQl6ZqsnbjvgmWL94CV9 FzvPxEMJX6k6ZqxxL6Ge4yB4s90le+G8PfQuTUZjjGwuQUD0UB7qjhj+3+R3xJrUW4gYFz PrFj9U8nZ7YGl0hJpWNhLlUzweoeKO7jQ5E/bhlQTELLU8nLAw4qZaEUWtwIxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044549; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w1Sd8nH6ZGI/TdR89eitKI/EOFITL0Pmf3j99tkEeng=; b=LOmWhXdb7Rv81VumxxHTH3NJv9tYCOkrap2JiuQx8TyrDJuq0Ik+F40nLr8qhRMx5dem2Y o8opUI1mLptG2MtCanINkBMRz3J22YXuYKnEzrtVrwk/B9RYgNpnCU61wvPTSydD4QsRbt K2JTC0BAvh7LYeSQdAkQV5Ttl0IvsCfTT8stnEAKLfLIhyHqSKic5oVsKR7dGoaKSqaBEw P3ePQHiSLCvWEEyQRxzelkbm0rhd55KChRIBVvxBaWz6hHzuNOxOQlxHg1bjNa928AiWBn CxBA+Jfr9xlbQr6oM7uJQbfoRB5Ndf1NT7m+DHnhCrClTfs7rJo9gczqIQuWZw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1d0Vddz17nX for ; Fri, 24 Apr 2026 15:29:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35fd2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 3c01c7df9840 - stable/15 - rtld: Use uintptr_t instead of Elf_Addr for init/fini function pointers List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 3c01c7df984019d3db1b7a1d5e4d61d8c366df28 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:09 +0000 Message-Id: <69eb8c45.35fd2.28d9e136@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3c01c7df984019d3db1b7a1d5e4d61d8c366df28 commit 3c01c7df984019d3db1b7a1d5e4d61d8c366df28 Author: John Baldwin AuthorDate: 2026-01-14 17:10:33 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:38 +0000 rtld: Use uintptr_t instead of Elf_Addr for init/fini function pointers This is a no-op on non-CHERI architectures, but is required for CHERI where Elf_Addr is only an address and not a complete pointer. While here, consistently use `uintptr_t *` for arrays of init/fini function pointers. Reviewed by: imp, kib Effort: CHERI upstreaming Obtained from: CheriBSD Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D54711 (cherry picked from commit e96ec1a1eb935aa2febcbf9629a52c85297a088e) --- libexec/rtld-elf/rtld.c | 42 ++++++++++++++++++++---------------------- libexec/rtld-elf/rtld.h | 10 +++++----- 2 files changed, 25 insertions(+), 27 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index b987ce4d2a9d..10b84246d4ce 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -987,9 +987,9 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp) * functions for binaries linked with old crt1 which calls * _init itself. */ - obj_main->init = obj_main->fini = (Elf_Addr)NULL; + obj_main->init = obj_main->fini = 0; obj_main->preinit_array = obj_main->init_array = - obj_main->fini_array = (Elf_Addr)NULL; + obj_main->fini_array = NULL; } if (direct_exec) { @@ -1508,43 +1508,43 @@ digest_dynamic1(Obj_Entry *obj, int early, const Elf_Dyn **dyn_rpath, break; case DT_INIT: - obj->init = (Elf_Addr)(obj->relocbase + + obj->init = (uintptr_t)(obj->relocbase + dynp->d_un.d_ptr); break; case DT_PREINIT_ARRAY: - obj->preinit_array = (Elf_Addr)(obj->relocbase + + obj->preinit_array = (uintptr_t *)(obj->relocbase + dynp->d_un.d_ptr); break; case DT_PREINIT_ARRAYSZ: obj->preinit_array_num = dynp->d_un.d_val / - sizeof(Elf_Addr); + sizeof(uintptr_t); break; case DT_INIT_ARRAY: - obj->init_array = (Elf_Addr)(obj->relocbase + + obj->init_array = (uintptr_t *)(obj->relocbase + dynp->d_un.d_ptr); break; case DT_INIT_ARRAYSZ: obj->init_array_num = dynp->d_un.d_val / - sizeof(Elf_Addr); + sizeof(uintptr_t); break; case DT_FINI: - obj->fini = (Elf_Addr)(obj->relocbase + + obj->fini = (uintptr_t)(obj->relocbase + dynp->d_un.d_ptr); break; case DT_FINI_ARRAY: - obj->fini_array = (Elf_Addr)(obj->relocbase + + obj->fini_array = (uintptr_t *)(obj->relocbase + dynp->d_un.d_ptr); break; case DT_FINI_ARRAYSZ: obj->fini_array_num = dynp->d_un.d_val / - sizeof(Elf_Addr); + sizeof(uintptr_t); break; case DT_DEBUG: @@ -2608,8 +2608,7 @@ initlist_for_loaded_obj(Obj_Entry *obj, Obj_Entry *tail, Objlist *list) STAILQ_FOREACH(tmp, &iflist, link) { Obj_Entry *tobj = tmp->obj; - if ((tobj->fini != (Elf_Addr)NULL || - tobj->fini_array != (Elf_Addr)NULL) && + if ((tobj->fini != 0 || tobj->fini_array != NULL) && !tobj->on_fini_list) { objlist_push_tail(&list_fini, tobj); tobj->on_fini_list = true; @@ -2686,8 +2685,7 @@ initlist_add_objects(Obj_Entry *obj, Obj_Entry *tail, Objlist *list, * Add the object to the global fini list in the * reverse order. */ - if ((obj->fini != (Elf_Addr)NULL || - obj->fini_array != (Elf_Addr)NULL) && + if ((obj->fini != 0 || obj->fini_array != NULL) && !obj->on_fini_list) { objlist_push_head(&list_fini, obj); obj->on_fini_list = true; @@ -3092,10 +3090,10 @@ obj_from_addr(const void *addr) static void preinit_main(void) { - Elf_Addr *preinit_addr; + uintptr_t *preinit_addr; int index; - preinit_addr = (Elf_Addr *)obj_main->preinit_array; + preinit_addr = obj_main->preinit_array; if (preinit_addr == NULL) return; @@ -3122,7 +3120,7 @@ objlist_call_fini(Objlist *list, Obj_Entry *root, RtldLockState *lockstate) { Objlist_Entry *elm; struct dlerror_save *saved_msg; - Elf_Addr *fini_addr; + uintptr_t *fini_addr; int index; assert(root == NULL || root->refcount == 1); @@ -3155,7 +3153,7 @@ objlist_call_fini(Objlist *list, Obj_Entry *root, RtldLockState *lockstate) * defined. When this happens, DT_FINI_ARRAY is * processed first. */ - fini_addr = (Elf_Addr *)elm->obj->fini_array; + fini_addr = elm->obj->fini_array; if (fini_addr != NULL && elm->obj->fini_array_num > 0) { for (index = elm->obj->fini_array_num - 1; index >= 0; index--) { @@ -3173,7 +3171,7 @@ objlist_call_fini(Objlist *list, Obj_Entry *root, RtldLockState *lockstate) } } } - if (elm->obj->fini != (Elf_Addr)NULL) { + if (elm->obj->fini != 0) { dbg("calling fini function for %s at %p", elm->obj->path, (void *)elm->obj->fini); LD_UTRACE(UTRACE_FINI_CALL, elm->obj, @@ -3209,7 +3207,7 @@ objlist_call_init(Objlist *list, RtldLockState *lockstate) Objlist_Entry *elm; Obj_Entry *obj; struct dlerror_save *saved_msg; - Elf_Addr *init_addr; + uintptr_t *init_addr; void (*reg)(void (*)(void)); int index; @@ -3254,14 +3252,14 @@ objlist_call_init(Objlist *list, RtldLockState *lockstate) * It is legal to have both DT_INIT and DT_INIT_ARRAY defined. * When this happens, DT_INIT is processed first. */ - if (elm->obj->init != (Elf_Addr)NULL) { + if (elm->obj->init != 0) { dbg("calling init function for %s at %p", elm->obj->path, (void *)elm->obj->init); LD_UTRACE(UTRACE_INIT_CALL, elm->obj, (void *)elm->obj->init, 0, 0, elm->obj->path); call_init_pointer(elm->obj, elm->obj->init); } - init_addr = (Elf_Addr *)elm->obj->init_array; + init_addr = elm->obj->init_array; if (init_addr != NULL) { for (index = 0; index < elm->obj->init_array_num; index++) { diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h index 023e9af9a2a8..322d1ee94d6f 100644 --- a/libexec/rtld-elf/rtld.h +++ b/libexec/rtld-elf/rtld.h @@ -212,11 +212,11 @@ typedef struct Struct_Obj_Entry { Ver_Entry *vertab; /* Versions required /defined by this object */ int vernum; /* Number of entries in vertab */ - Elf_Addr init; /* Initialization function to call */ - Elf_Addr fini; /* Termination function to call */ - Elf_Addr preinit_array; /* Pre-initialization array of functions */ - Elf_Addr init_array; /* Initialization array of functions */ - Elf_Addr fini_array; /* Termination array of functions */ + uintptr_t init; /* Initialization function to call */ + uintptr_t fini; /* Termination function to call */ + uintptr_t *preinit_array; /* Pre-initialization array of functions */ + uintptr_t *init_array; /* Initialization array of functions */ + uintptr_t *fini_array; /* Termination array of functions */ int preinit_array_num; /* Number of entries in preinit_array */ int init_array_num; /* Number of entries in init_array */ int fini_array_num; /* Number of entries in fini_array */ From nobody Fri Apr 24 15:29:11 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1g5x60z6bSTn for ; Fri, 24 Apr 2026 15:29:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1g2FSfz3DD5 for ; Fri, 24 Apr 2026 15:29:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cXbUN7oQLKlo9fxilLRUIExTDXG3gq2cC1Jj+o1FLe8=; b=MiXteQ3r5fY/AcrabT0i9NGgeccJXSawakMfp7snwNYlxJIayfweUxCk91cvOiiKIobOqG O3ck3dWKxKAxRyE6vcVpBfSBFFOXXSsDcusUzGTWjsSzwoOTlpq/6fNuEqIftAbHdbfg8S 6/MFrzh6coc08nreUr5iizw1YLQMJzoALG0+4U3H6Mw3xJvcYqlyyfL69pL7OXYE3zdTHM IPVk7pgoKVvFpCSJWHP44O0oGjiAd0rDQzbSWrw/KnUPIbF89yKsYI0vyH2VYs9kJsdhkt Rz+0aC6bzoEQkvR2xLTOfjruQibrDy3+Ro97f/FLUEXJg8SP1whYNTX2jl6lEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044551; a=rsa-sha256; cv=none; b=EVJjjGlUEziTw1FhHUJ98iZBQrRYjysG8eTVAl82Dt4ExoUBzDeYjpJhfAL7ll82oS1PfS GAyNoVSV+9Q+1OBZRxWAoYbEPrIZQcaZxD9qQ0Nn9TeWFy8bdEP/EVTDRCUQnV6T4yIid6 V/rgEmXqRwHn/8RYyGBUw9aeqcRqIo3Bbab/66zpamHPSN4Gb00f86QDLfePPS1W1hJnzH ncUR9JQvespebkiiUs5eKxrdMk39e0lTbeKaBeEVC+P1KC5IVgktY0qMVT0gYsOEyKBIro mzoUlK6i/4SInDPC7v5RPfOGWPjjlLd8IHWOmHvpZAggqkcgdmhyS/Vpl0p9nA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cXbUN7oQLKlo9fxilLRUIExTDXG3gq2cC1Jj+o1FLe8=; b=ipQrb2wDJmm1CbjHxyIN7Zj3svlGx6mnWbAQjOQpfMnLNEN0EahLbQQ+1TENyAxtgFue5W KlAeO0iO7bUDPbH9LUfNqhf2u3Wa8T9JvbNz4v69UIsV6nrjxeUHSIsvAPJsiA9qbdKX1+ QD4TrsUtiPe/OPIY6dOrXCeUK+gyUFvC6OshitzkQ+fFMXW363o4WR+iC9JmytHUFxSGvY Wd5rFDKIs/2IvlU3otH8STkJ+FfpyDsbZVaIsKOunLyv44gE4GlzEeS9u8FWE6SwxnYK06 dnXHYa/gU7N8g56kU+65ly5f6seizdY1jIo3SGWUNwH8+TwHFtCRloZY7EcTUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1g1hwLz17RN for ; Fri, 24 Apr 2026 15:29:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33ab8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: c57d2b6f97d2 - stable/15 - rtld: Use a helper variable to simplify a few lines List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c57d2b6f97d2b8c2dc67ab053f6bf1e006792309 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:11 +0000 Message-Id: <69eb8c47.33ab8.402787f5@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c57d2b6f97d2b8c2dc67ab053f6bf1e006792309 commit c57d2b6f97d2b8c2dc67ab053f6bf1e006792309 Author: John Baldwin AuthorDate: 2026-01-15 18:23:42 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:38 +0000 rtld: Use a helper variable to simplify a few lines Reviewed by: kib Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D54507 (cherry picked from commit 6d6bf4a892d6be84ec59fce5419eab616bcabb40) --- libexec/rtld-elf/rtld.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 10b84246d4ce..8ae0685b02d9 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -5560,7 +5560,7 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign) char *addr; size_t i; size_t extra_size, maxalign, post_size, pre_size, tls_block_size; - size_t tls_init_align, tls_init_offset; + size_t tls_init_align, tls_init_offset, tls_bss_offset; if (oldtcb != NULL && tcbsize == TLS_TCB_SIZE) return (oldtcb); @@ -5618,11 +5618,10 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcbsize, size_t tcbalign) obj->tlsinitsize); } if (obj->tlssize > obj->tlsinitsize) { - memset(addr + tls_init_offset + - obj->tlsinitsize, - 0, - obj->tlssize - obj->tlsinitsize - - tls_init_offset); + tls_bss_offset = tls_init_offset + + obj->tlsinitsize; + memset(addr + tls_bss_offset, 0, + obj->tlssize - tls_bss_offset); } dtv->dtv_slots[obj->tlsindex - 1].dtvs_tls = addr; } From nobody Fri Apr 24 15:29:10 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1f6vRLz6bSQP for ; Fri, 24 Apr 2026 15:29:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1f1dkGz3D95 for ; Fri, 24 Apr 2026 15:29:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NKWCTH4fgHBUHGJgVBPdjooeOvtmr/uAZWxIhKyPdlg=; b=T5W2SScXK91VpsKClr5WKNxSgnNlQotQdujlonMrw5sKenu9+3EQfhIcyxcDnljh0fhfeP bFRirR5vuRmeN40Tj3GKi4k1pfZJXNAab1iMECAnKrykRsHNJhCbUpBZJw3rFjjBW2f9RL os3Bw+X5Vb/r1/rytYK4+nRv0DfScEw66cWZ96Id0nDy+UBZWv97tW/O6b5GGLojvMfaC+ 0aCZlHRnnSPiClL7si/AvBeeXynSWxfc/+cRCImXsBUIaTmTGQ+ehqRJS/w+Ipa4TwuqH/ gXepRZDYrF7T6VnljwJERLdw+sohTOZrnSbitWAbk4wt6y8MR0lAkVQzOX4zlg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044550; a=rsa-sha256; cv=none; b=G+gYhb19Z5aqcSyxyQ7/LZyebmmTtfgHXrzqM9eX+ZEQfQJGYfkAAzjj87whZpxJ4PDcpZ 5AS0JGvVLARZcZP+5DH8ChS5F0K0QgTMaBjFBfFcr7Dt4i3j4d+6X0Vl62mn5neMEU8xDp gB2EDrZVyH7guCvUjtaBeyghXc1AE3pMi4p/NPyF89s1Sm+1mVz9TK2lFHHHQ0iJ31jizR 16/9Sw3+4tuTU6/w4QakPUelAULSaC9gCaTmLS1dG2mezU60dgAACte72o6jlWvIy8M2GA tagsV+bzxbeCk4R8EuliOd+nBQxHjr9Yxox61EgT9/mYKW+JtCAQta+WNGCv0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NKWCTH4fgHBUHGJgVBPdjooeOvtmr/uAZWxIhKyPdlg=; b=pRdvdZXUCVG1or9TQzI8vuNr0kfCmbcOI0MAT66NlrAwkEUxbhehfB1Syys45LxOvWT51S Wj5fEGi5J74igVAeJBCYqL/18rAPKzRmDMS463T2peGsHtexHjKfyWejzVeBb14RxRH1XL vwx38XMO9n72qWCfsj219GFv13sX3rUxfjqE0lMlC4yPG/0Rfc9W5XcejUBp9ky/1IEhZK qHuE0EyRLxK8InQizfyk5Ibqk0miE9YBOPEGfLaYRTN6ZBMTNZw4Uawglj4yCYpmEWYJgU fcdV3IhD11LudlE7TGF2bnFZ4kqTuxGgiKWO/YI/QDw/SA7EwZgwQ4SJcMv2zw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1f179Cz173J for ; Fri, 24 Apr 2026 15:29:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33b53 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 4f536daec8fb - stable/15 - rtld: Switch to using for assert List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4f536daec8fbfc05ae0097a825386848056cbbbd Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:10 +0000 Message-Id: <69eb8c46.33b53.487f66df@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4f536daec8fbfc05ae0097a825386848056cbbbd commit 4f536daec8fbfc05ae0097a825386848056cbbbd Author: John Baldwin AuthorDate: 2026-01-14 17:10:33 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:38 +0000 rtld: Switch to using for assert The stock assert() works because rtld-libc includes a custom implementation of __assert(). Reviewed by: imp, kib Obtained from: CheriBSD Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D54712 (cherry picked from commit 3ea97c9de2b24c685d42be12dd57fad2f67b3f1b) --- libexec/rtld-elf/debug.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libexec/rtld-elf/debug.h b/libexec/rtld-elf/debug.h index 1a019f07750a..09de6057e1e7 100644 --- a/libexec/rtld-elf/debug.h +++ b/libexec/rtld-elf/debug.h @@ -33,7 +33,7 @@ #define DEBUG_H 1 #include - +#include #include #include "rtld_paths.h" #include "rtld_printf.h" @@ -47,9 +47,6 @@ extern int debug; #define dbg(...) ((void) 0) #endif -#define assert(cond) ((cond) ? (void) 0 : \ - (msg(_BASENAME_RTLD ": assert failed: " __FILE__ ":" \ - __XSTRING(__LINE__) "\n"), abort())) #define msg(s) rtld_putstr(s) #define trace() msg(_BASENAME_RTLD ": " __XSTRING(__LINE__) "\n") From nobody Fri Apr 24 15:29:12 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1h5NLMz6bSGX for ; Fri, 24 Apr 2026 15:29:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1h2hh1z3D6k for ; Fri, 24 Apr 2026 15:29:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y6S6wMxKLpB93ynkhl7vs43jv3hoi92rj9/aa5TMDOI=; b=woe5exUGcPvcZimcagpswuyWVuQoH9Z2xr2YEdi3Ze4B5SiegQA7nKG2LC5OxKbG8UaZ1J iWH8dlA9UwbAKG9EA4VsFsztb3LuKnHViiqEwW3tWua/iB1BqRcnMEEaAu7hkFRH/TROpJ Glz+IsnEnEG33br6jvUyxMel4SHRY8c1Qdc1GUnK6FawYyLQ56b12hBeiqp6Fak6jJBOjL yIlGlzs9VjA3SI9ZonjXw1xSD0Jfn9ZJlD3cDshNkqca5kCfEhKoGavG9no91pSBwHgZXW vJ30rW5wDMixMpE+RCMn9w20mwNnEaH49zk691KRA0YYCFfbyXwGFOhBfPNjCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044552; a=rsa-sha256; cv=none; b=Om92rOmajsbIh3YSlkYyt+bIYJkcKYZbHEBCNg2Ssn2TrydA45+/x2XFkG4Ju5Q9ZVGOaG 2Rdv+9iCc0vdoaq9N+EUMqpFpJ9F/0dO0YN0WYTUijB/1JXhMDsDdcJR9mZSzTimAwqrrb YkzMPhzHNIlKMUD5zhsXkXoW1yMgEJK3H0Cm/vfxgWaVM4vb8Z54mFUqbBBL22DtkejBxo Q+dQ9zwYpsQtlNS7zCVk2taDNaSIDIJVG2ouXIbRf8QBw6IeupmKWFSJBNyYiVXZEdcMhG h1eeXHeOmebaWJTXSjpyRaaeubGN76AAxWjnS98m2cqd8BvLOWv4CjnLKd7WwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y6S6wMxKLpB93ynkhl7vs43jv3hoi92rj9/aa5TMDOI=; b=csyOdSUhYyvlM3eI0+fsIWIVaV2G8r6PiHG7bIHK/re4WS4XCGw8YeMZmHmdlmQXOmGDD/ QEwYeLVJbCiPXbiQ1grFAWuedFeQLyxe2XdPQ1gytPPhkUStFaI0nDSTOaSduizMeCWF8t +O8PQRX9B0SALHJNp+isuU8myvUWVdHW2SvJ79bg0KhhVDdvlSneeoapC2MYgvb1G4xMCY 2w8+KzcCHlnqobPimPbxOJLw+/dmubySytdIwcsZzU/78aanEBXc6Pm7NHuUac9aputphj 2Rvbv2GtS+SJZype2KKogekD6C+HVd5AEvQhAnsfv8DD1JHp5pIQ5BHEY5aOXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1h2GZSz178X for ; Fri, 24 Apr 2026 15:29:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33b57 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: ff90e613e783 - stable/15 - acpi: Add a function to deregister all ioctl commands using the same function List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ff90e613e7836fb5a8bfef26758c07b4f1d3eb67 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:12 +0000 Message-Id: <69eb8c48.33b57.61b6966c@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ff90e613e7836fb5a8bfef26758c07b4f1d3eb67 commit ff90e613e7836fb5a8bfef26758c07b4f1d3eb67 Author: John Baldwin AuthorDate: 2026-01-15 18:24:08 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:38 +0000 acpi: Add a function to deregister all ioctl commands using the same function This simplifies detach/cleanup for drivers that add multiple ACPI ioctls. Reviewed by: imp Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D54420 (cherry picked from commit 5bd84c4f0d016a2ca87ee115370ec1e7802e6d8a) --- sys/dev/acpica/acpi.c | 15 +++++++++++++++ sys/dev/acpica/acpi_battery.c | 8 +------- sys/dev/acpica/acpiio.h | 1 + 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 7db4c776b00b..3951d817f0e3 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -4148,6 +4148,21 @@ acpi_deregister_ioctl(u_long cmd, acpi_ioctl_fn fn) ACPI_UNLOCK(acpi); } +void +acpi_deregister_ioctls(acpi_ioctl_fn fn) +{ + struct acpi_ioctl_hook *hp, *thp; + + ACPI_LOCK(acpi); + TAILQ_FOREACH_SAFE(hp, &acpi_ioctl_hooks, link, thp) { + if (hp->fn == fn) { + TAILQ_REMOVE(&acpi_ioctl_hooks, hp, link); + free(hp, M_ACPIDEV); + } + } + ACPI_UNLOCK(acpi); +} + static int acpiopen(struct cdev *dev, int flag, int fmt, struct thread *td) { diff --git a/sys/dev/acpica/acpi_battery.c b/sys/dev/acpica/acpi_battery.c index cfd8261d5eab..f1eebda705c1 100644 --- a/sys/dev/acpica/acpi_battery.c +++ b/sys/dev/acpica/acpi_battery.c @@ -531,13 +531,7 @@ acpi_battery_init(void) out: if (error) { - acpi_deregister_ioctl(ACPIIO_BATT_GET_UNITS, acpi_battery_ioctl); - acpi_deregister_ioctl(ACPIIO_BATT_GET_BATTINFO, acpi_battery_ioctl); - acpi_deregister_ioctl(ACPIIO_BATT_GET_BATTINFO_V1, acpi_battery_ioctl); - acpi_deregister_ioctl(ACPIIO_BATT_GET_BIF, acpi_battery_ioctl); - acpi_deregister_ioctl(ACPIIO_BATT_GET_BIX, acpi_battery_ioctl); - acpi_deregister_ioctl(ACPIIO_BATT_GET_BST, acpi_battery_ioctl); - acpi_deregister_ioctl(ACPIIO_BATT_GET_BST_V1, acpi_battery_ioctl); + acpi_deregister_ioctls(acpi_battery_ioctl); } return (error); } diff --git a/sys/dev/acpica/acpiio.h b/sys/dev/acpica/acpiio.h index 63779d309951..4df049ed196a 100644 --- a/sys/dev/acpica/acpiio.h +++ b/sys/dev/acpica/acpiio.h @@ -205,6 +205,7 @@ union acpi_battery_ioctl_arg { typedef int (*acpi_ioctl_fn)(u_long cmd, caddr_t addr, void *arg); extern int acpi_register_ioctl(u_long cmd, acpi_ioctl_fn fn, void *arg); extern void acpi_deregister_ioctl(u_long cmd, acpi_ioctl_fn fn); +extern void acpi_deregister_ioctls(acpi_ioctl_fn fn); #endif #endif /* !_ACPIIO_H_ */ From nobody Fri Apr 24 15:29:13 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1j6DNqz6bSQW for ; Fri, 24 Apr 2026 15:29:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1j3D8Cz3DDV for ; Fri, 24 Apr 2026 15:29:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YaFFLwqrLihYniOvTyg4puIDHIiullGZwEkEOjK7xSk=; b=Tfaj8vJuDOfFXWf4qSA1UdySJJIn4mbHKZwOiGzjhAQjkVorNkGIrkXFHJR0lLphHaoamO 9dzeMDPVgdyeUq9KILwSjpmSjcHz7cP31pjPiJW0tK014GCDEIBuk29ZYy9+oomj39Dnd6 O6WmKB66c6zfBf1oiei35t1sSFiTCtLuKkZ0RU9yEO0RRLwUbCb2NxjhIZer93eJNeIYmr FnQKtxTy7nIHwagx15cBAujHVpBvkYST/Opap3kKKIL8mwI2loqdbhRzpMS22xHb1b0Qgg zm8kdU1h7QEUyxa1+YftIlb37uuGGBk7u6RH7E0tZBLTrw/wxMx1QE7s4F3nqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044553; a=rsa-sha256; cv=none; b=ocBVTBnfUoqwJQryfUxPbFxZHRdSGqV06TlGJYJRR5Hknz4KlkYk0KiQe8RbrZUff5tUd4 UydLYtvYF3omejoifmLSJ5TsMXvrgu9uek3+ex4nQLYGimf65ZtXaWuhBJcphDJ0IJBe9n TC36z4zV1BvgX9FVHpMuFGqyOb1BdUksVhjx09/lEEcYAlUmA2Z/l8b3/QPvot2aL6dZ32 ZEGsaoozllnBhXfqTjlOkZMlqcVAM11cc/0X3oUAqV46aVvkzlGA8bddpxHPmQwuEaN0pX +/rMgh7Df3YkJCSvGakSIhWVZOU61dtB+Jqjd6fRdtY4It5I0DocjiYn7Pr5lQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YaFFLwqrLihYniOvTyg4puIDHIiullGZwEkEOjK7xSk=; b=RiDiD5BDzeslfmTZZuBV3pd+GvswRwa4bF2XYBsrQJaJD/LL8ZJdhux1/LLa6q+Huutpkb Ken+o2Rl0+k4KY9dXcDufLalVqZXKljbrNSOrSI02iuwFXyg5fXDVcBHwjJBhd/ltsDJIR AgSOZw444puIcsS0u1nSLJg1KL8j9bWtK/0A19IOWh51x//w2RwXrRj6LUs9zo1Y7qcWza 5KFADIh/oh8H8xzmMg9iTwylErk1n4TPG/AIGBcv6XIyWNou480FdkmHkrDFv9IJChKzNN Q+VNeQYejQm18aruNeeLHxbXrXWj/DXchmN26eLbBHE5nAzevPlJyMFcJmoMNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1j2rFTz17lv for ; Fri, 24 Apr 2026 15:29:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35b84 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: c62cae9b53fe - stable/15 - rpctls_impl.c: Use a direct cast to uintptr_t instead of __DECONST List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c62cae9b53fe2c5e52a185d3ed37f55ef383f064 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:13 +0000 Message-Id: <69eb8c49.35b84.335571b4@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c62cae9b53fe2c5e52a185d3ed37f55ef383f064 commit c62cae9b53fe2c5e52a185d3ed37f55ef383f064 Author: John Baldwin AuthorDate: 2026-01-21 16:10:53 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:38 +0000 rpctls_impl.c: Use a direct cast to uintptr_t instead of __DECONST This fixes the build on CHERI architectures where the compiler warns about a direct cast between uint64_t and const void * inside of __DECONST. However, GCC would also complain about this on 32-bit kernels due to uint64_t not being the same size as a pointer. Also, a direct cast to uintptr_t to right-size the cookie value is more direct than using __DECONST given that there is no "const" pointer involved in the expression. Reviewed by: brooks, glebius Obtained from: CheriBSD Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D54797 (cherry picked from commit 5eb1d4eec67685a933cedd5a20fbec86febcd3a9) --- sys/rpc/rpcsec_tls/rpctls_impl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/rpc/rpcsec_tls/rpctls_impl.c b/sys/rpc/rpcsec_tls/rpctls_impl.c index 51fe270b13d9..22ba699a6fab 100644 --- a/sys/rpc/rpcsec_tls/rpctls_impl.c +++ b/sys/rpc/rpcsec_tls/rpctls_impl.c @@ -163,7 +163,7 @@ sys_rpctls_syscall(struct thread *td, struct rpctls_syscall_args *uap) mtx_lock(&rpctls_lock); upsp = RB_FIND(upsock_t, &upcall_sockets, &(struct upsock){ - .so = __DECONST(struct socket *, uap->socookie) }); + .so = (struct socket *)(uintptr_t)uap->socookie }); if (__predict_true(upsp != NULL)) { RB_REMOVE(upsock_t, &upcall_sockets, upsp); /* From nobody Fri Apr 24 15:29:14 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1l0tzcz6bSN9 for ; Fri, 24 Apr 2026 15:29:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1k4BdDz3DDf for ; Fri, 24 Apr 2026 15:29:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HV1S7WnU91OK7kfzTCAo4qoSbJxxDfUCwhI+X2vqH/c=; b=XoY6zvT3iwDM2htgWXFAkorT9tRC8/JNGFrCK5eDkNgytCeQvvi1VPMXlGu1TtKn116n79 dOnaEpel9dxnpTGjtZCuyzaVd3CtmDJhFICBufWNSryAxa61gmEVmnYkdt4X/H4AQuy6p2 aFSTP7LztjWh8St/T4UdWPhJFPIPs9DVMA9ASLD7n2bmB7S16gaFrbheVF+Nmm1lOtPyEF 8v6kV2xy//AeUVqPSwoIZ9R9fUYXdd2jUKRmalx3RrHkMO+g7WEXRYvbH2sjzwJuzR4Epb E0yBNCkFMKFDJQ2cOMIksaRlGUDb3xvGirZYnJjgJYrD6aV48CPYPwvUfF2UfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044554; a=rsa-sha256; cv=none; b=XhONfwtOp1Ze0tYuzhJh4jLdJHbV8watgqTk94TXMy1WmFxI1QyRu6T87IE3U6mwJZxUGX brC5gS4uChAkfSNRi6UYddFSQEWluQNU1dYx7bToxdZwl11ugu33ypALA3uaMTgIJgWdfD FPXuNPqSX1UlyLjcXubuSvTGoHPZ25s7r4B7RAYuLHWQW82ByrrlDO7is+l7X0NeJuaAGl NfkjeLsurg11aVj7aIxPHCsdB+2hAOV0AfcYrmQC+6c9t72Co4H7ajPqyzE1Bw1CXBqpzS eAy4FOXvO8VMixZBq/7LAxuYjnYVQnjAYX2xjPC50L5fU46TFtFZBR8XCSZ2fQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HV1S7WnU91OK7kfzTCAo4qoSbJxxDfUCwhI+X2vqH/c=; b=L0WV5hPpNT1CfYGjcNKtcTAggjKviPgXxlCQR+wkQFTaQDCIT6Hqz8DN+12r2674a7MnJ5 xyKyhdAnqnkMrYVggH2XgZOBwxDGYGxEtiUOvD4mUlaApkpUOxl2UN5zycLHKN3Coa2vI4 XNig9VdRPkqp1wkKPB4VEcD30A20tYj4+zNLcoNozuOAyOQUF12G2ki8H8cslxjmHygEpV osF20qyhlo/AVeXZCBple0hJ9I1PZkv1JNlKsEZW5J338+Fh+wI1GfCp8XtLQrjg9ZMCBQ YvPVWwBd7enpzlIVe089x/Fgy3RYPLYAf/ZPzLXo02795eRTqbLo1FkawIzlPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1k3YwZz17cK for ; Fri, 24 Apr 2026 15:29:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 363ae by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 251267aa38af - stable/15 - arm: Make init_proc0 static List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 251267aa38afd6e8ab1cc13468ba24b25eaef5e2 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:14 +0000 Message-Id: <69eb8c4a.363ae.31641c09@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=251267aa38afd6e8ab1cc13468ba24b25eaef5e2 commit 251267aa38afd6e8ab1cc13468ba24b25eaef5e2 Author: John Baldwin AuthorDate: 2026-01-27 18:30:23 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:39 +0000 arm: Make init_proc0 static This function is not used outside of machdep.c and is already static on arm64 and riscv. Reviewed by: imp Effort: CHERI upstreaming Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D54838 (cherry picked from commit 05609c5eff27ea7b382237bd2a937c01c1ceb59a) --- sys/arm/arm/machdep.c | 2 +- sys/arm/include/machdep.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/arm/arm/machdep.c b/sys/arm/arm/machdep.c index 3287485d684e..0b395d42fc4a 100644 --- a/sys/arm/arm/machdep.c +++ b/sys/arm/arm/machdep.c @@ -374,7 +374,7 @@ pcpu0_init(void) /* * Initialize proc0 */ -void +static void init_proc0(vm_offset_t kstack) { proc_linkup0(&proc0, &thread0); diff --git a/sys/arm/include/machdep.h b/sys/arm/include/machdep.h index 45e44a65368b..ada2dfa502aa 100644 --- a/sys/arm/include/machdep.h +++ b/sys/arm/include/machdep.h @@ -15,7 +15,6 @@ extern vm_offset_t abtstack; /* misc prototypes used by the many arm machdeps */ struct trapframe; -void init_proc0(vm_offset_t kstack); void halt(void); void abort_handler(struct trapframe *, int ); void set_stackptrs(int cpu); From nobody Fri Apr 24 15:29:15 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1m0C0Tz6bSNC for ; Fri, 24 Apr 2026 15:29:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1l5H6vz3DNR for ; Fri, 24 Apr 2026 15:29:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=avBGjF4WlJncIEo7PqAtzRQxkv1UoSAjKn56KB20aw8=; b=D/LgN8m3F+APXcK5RiePRmOnLgiSg7a1musEhbF3MsT4WGIUXqiP/5Vkj1sVCzQmnEhhPg KS/hRI7V1qjCaRrNaGtSTFVZMQlyO5gjbIj+CWRMZP2/vdo4M48nJUNT9+bvnECGlsG7Vh bGz5AY6+GS631614ZTiUWGJY0cRJ1t+bC3WkzUbJ+o/TQc3zMqn+uC1PaBC9LtXFU2+pLV CuAnYWLMtjYwY3ZrNs1wf81KKXOeM4+ld8kzik3f/oGTdqrPeVv9ABB4h1d8etLILNJnFd hGT/WenF/A0mv2kolt3eIOYVEeSGxveLFaBWwdhkEo5i+i2knPdMllEecgdGjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044555; a=rsa-sha256; cv=none; b=hquTlFwCqs7kSCWu9ZnKhHwf6JND4sihNO+jDGPZd5AtDVefhV93Dtb65blx9+d0FvmRSj 7gzuHZ/WpYI7ywij0U5AIweizJu5Z1anIiC+L/RCSa0Zd1z16Th6mcf7O6sJXvEwujFBKE +hkpbyzP+MXlvYMvVGMOI8Qp6kMBLbQuznn1FlSmljjpt75JFFngNhnlUGa5CNyzzfHDpR 6AM7n0wEtXkTQEGJRBbdjvvxaPEke8PVBNYbMyIUtDqXzQdco0RmDuj1q86Xy4x4UxBvU7 wkhfOhUGg0IJ795V9rLaDwB3N7T3HWU1wb/6gLWfOHI8voXx0PCzofOFF9u9AA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=avBGjF4WlJncIEo7PqAtzRQxkv1UoSAjKn56KB20aw8=; b=rR/+NLmMeOTkxz7cN3fJPOwn1FGVLa/65V0NGd+K62Eondgd+ftEIg8v+aKCwmQ/0TmWNH U7LzrSHV8KIBSYUQNAcisjyMHp9AVq8ZboJt8wK/m3wBaZ08qSg/yQeA7FHODKtlGQMunh 5VdDZxkxd8l2yV/zDvjMRQ9YtU4PNuOj3nWzbZnJzXQx0NtEudQAZ3cCvbrSzYFzaCU1Nz MciqjrysjdSvvPE5mWDDnHKY74vTz5lEli8FNija/UTqbrQPi07bcYlqLs5aiudrtMVRII ipSfWtyrp1HhdGuGGzEbLfLVBoCMoJ3V8ya8+9BP71a6TApUTmSxQpHfpq0ojg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1l4Sdkz173L for ; Fri, 24 Apr 2026 15:29:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35e01 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: c9501b977642 - stable/15 - powerpc: Fix alignment of initial PCB on kstack List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c9501b97764246c59dcc5d3fb4cbaa54aea7e41e Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:15 +0000 Message-Id: <69eb8c4b.35e01.f51230e@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c9501b97764246c59dcc5d3fb4cbaa54aea7e41e commit c9501b97764246c59dcc5d3fb4cbaa54aea7e41e Author: John Baldwin AuthorDate: 2026-01-27 18:30:46 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:39 +0000 powerpc: Fix alignment of initial PCB on kstack Commit cc81c44dd806737f98b4fd4094674dd71c8749f3 aimed to consolidate duplicated code between the Book-E and AIM backends. For cpu_thread_alloc cpu_thread_alloc and cpu_fork it used the AIM functions which used a bogus alignment mask (~0x2f). The Book-E functions used a proper alignment mask (~0x3f). The AIM functions appear to have been busted since they were first imported in commit 919cb3362fded33aca682a6ac57777f8fff86e36. To fix, use the Book-E mask which requests 64 byte alignment. Probably this was harmless in practice since td_kstack is page aligned and struct pcb is probably a multiple of 32 bytes in size, so the 0x10 bit should have been clear anyway. Reviewed by: fuz, jhibbits Fixes: cc81c44dd806 ("Unify ABI-related bits of the Book-E and AIM...") Effort: CHERI upstreaming Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D54839 (cherry picked from commit 9272b780626640ce9b9ac378fbdd2783aaa33625) --- sys/powerpc/powerpc/exec_machdep.c | 2 +- sys/powerpc/powerpc/vm_machdep.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/powerpc/powerpc/exec_machdep.c b/sys/powerpc/powerpc/exec_machdep.c index 8a33d0f589a7..fde24370842e 100644 --- a/sys/powerpc/powerpc/exec_machdep.c +++ b/sys/powerpc/powerpc/exec_machdep.c @@ -1095,7 +1095,7 @@ cpu_thread_alloc(struct thread *td) struct pcb *pcb; pcb = (struct pcb *)((td->td_kstack + td->td_kstack_pages * PAGE_SIZE - - sizeof(struct pcb)) & ~0x2fUL); + sizeof(struct pcb)) & ~0x3fUL); td->td_pcb = pcb; td->td_frame = (struct trapframe *)pcb - 1; } diff --git a/sys/powerpc/powerpc/vm_machdep.c b/sys/powerpc/powerpc/vm_machdep.c index d47beedb595e..1fd853783cc8 100644 --- a/sys/powerpc/powerpc/vm_machdep.c +++ b/sys/powerpc/powerpc/vm_machdep.c @@ -124,7 +124,7 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) cpu_update_pcb(td1); pcb = (struct pcb *)((td2->td_kstack + - td2->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb)) & ~0x2fUL); + td2->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb)) & ~0x3fUL); td2->td_pcb = pcb; /* Copy the pcb */ From nobody Fri Apr 24 15:29:16 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1n2J4Gz6bSQb for ; Fri, 24 Apr 2026 15:29:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1m5mrnz3DB0 for ; Fri, 24 Apr 2026 15:29:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b3m4A6n/8auVl3TT3OJ503BVq1RVlK/hd5VZ86+0ySY=; b=HT9Zw1YH6TfFf3OOA+Ec3I0i20/QaeZv8j2CiJawfm5+5+eBolkdyWS3tm4Nnv+IeBlkmw SxFpkrJHKnGam+OjaODyvyGpGAxX/2iD2rEegdHon42CIKNhwWSGfYtWjRTbOAeQoKVQ05 psXTdB95Q8iTKbnrQ8jEv/O+CU3bNJN9k5/3SDlV87RYgW9SAYoWDQFIHt1Im+Izh/lJZa JG4XA2vA1jblpBS7V/LHvZbUWqkOlD4bYES57LbXSRHuJdz4zE0g3QkLd4NgpRY1si/hv2 QrRc9R3o82bsfl6TEox6RMLBqf6TcvnFF9uMqROMJooYCIsH11txK/eYCHmjiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044556; a=rsa-sha256; cv=none; b=SGG5eVHO5kFlAvQmxU4W7Ijq7rLolcX66drPaxEC/mp2w2zFwivpfeJYiRUe7/wHn1HbSM NTQqDDS15bCyNGPHyZD0OS2HhXCC318nc50rmMoNKkYGyxiGKQESB7IIMCir+HaVDTVrrH tW8IbhH6O5B7mFK1/8Uo9jUBVRjE8adWqgXaqCdzya+wW2qNI9YvPJmEm0CbAw5yF03wWW /srZwBfQxA6OSCSIpUSWLYrKXuF0OH4sguNk/8dDC1UaFRxpPA4Ytc6Ma0cjPJwhl8sEkv aQz17SKQOYd3EXn41llIA+4dRyNDraZrNkBtrmmrTNUb09NHCaQqDugvNg+7fg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b3m4A6n/8auVl3TT3OJ503BVq1RVlK/hd5VZ86+0ySY=; b=cTv45NN/I3hf+OukdRUG+bnnO3VZwMTcU/4vgeZ9t/zKmQZuUtgn+kgKfVuSpJrnocOhql MXV3PTpRbSvMyg8fKl8TvB7jc/mWc5PmBVdf6J+K4DArAgqOiGe+bbsFA0TmyrzhhjM88a Vp3GfCyTR0Awz/4b99EL8I2GvU4WFuiE57m0OT40ZLVBQa0RzbV/aD0masqb+ck4is0xm5 f27VLrv91DSMipBSsmRPvLyriHRMS5r3eWMETAiFED7uJ2Gcu6w0NGrzAHsoJiEPeXeu/+ HocC5mW2W4ehziGC0HXI1oNdkzEOnmnuAgJ4KxG4qOjY75rBCh/RdCwVm8UEsw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1m5LbCz17lw for ; Fri, 24 Apr 2026 15:29:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 363b2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: f5b85cc09186 - stable/15 - sys: Use __is_aligned and __align_down for some kstack alignment operations List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f5b85cc091868d48bbea60c82d511e5f2309666c Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:16 +0000 Message-Id: <69eb8c4c.363b2.5badf330@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f5b85cc091868d48bbea60c82d511e5f2309666c commit f5b85cc091868d48bbea60c82d511e5f2309666c Author: John Baldwin AuthorDate: 2026-01-27 18:31:23 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:39 +0000 sys: Use __is_aligned and __align_down for some kstack alignment operations Reviewed by: kib, jhibbits Effort: CHERI upstreaming Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D54840 (cherry picked from commit 093fffa296d009de8cebf713a58ddbf876f05c5c) --- sys/amd64/amd64/vm_machdep.c | 3 +-- sys/i386/i386/vm_machdep.c | 3 ++- sys/powerpc/powerpc/exec_machdep.c | 4 ++-- sys/powerpc/powerpc/machdep.c | 5 ++--- sys/powerpc/powerpc/vm_machdep.c | 4 ++-- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index c763ff58680e..2e180003e93d 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -93,8 +93,7 @@ set_top_of_stack_td(struct thread *td) struct savefpu * get_pcb_user_save_td(struct thread *td) { - KASSERT(((vm_offset_t)td->td_md.md_usr_fpu_save % - XSAVE_AREA_ALIGN) == 0, + KASSERT(__is_aligned(td->td_md.md_usr_fpu_save, XSAVE_AREA_ALIGN), ("Unaligned pcb_user_save area ptr %p td %p", td->td_md.md_usr_fpu_save, td)); return (td->td_md.md_usr_fpu_save); diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index 80b45070d896..698d3b26813c 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -91,7 +91,8 @@ get_pcb_user_save_td(struct thread *td) p = td->td_kstack + td->td_kstack_pages * PAGE_SIZE - roundup2(cpu_max_ext_state_size, XSAVE_AREA_ALIGN); - KASSERT((p % XSAVE_AREA_ALIGN) == 0, ("Unaligned pcb_user_save area")); + KASSERT(__is_aligned(p, XSAVE_AREA_ALIGN), + ("Unaligned pcb_user_save area")); return ((union savefpu *)p); } diff --git a/sys/powerpc/powerpc/exec_machdep.c b/sys/powerpc/powerpc/exec_machdep.c index fde24370842e..4df70feb31bc 100644 --- a/sys/powerpc/powerpc/exec_machdep.c +++ b/sys/powerpc/powerpc/exec_machdep.c @@ -1094,8 +1094,8 @@ cpu_thread_alloc(struct thread *td) { struct pcb *pcb; - pcb = (struct pcb *)((td->td_kstack + td->td_kstack_pages * PAGE_SIZE - - sizeof(struct pcb)) & ~0x3fUL); + pcb = (struct pcb *)__align_down(td->td_kstack + td->td_kstack_pages * + PAGE_SIZE - sizeof(struct pcb), 0x40); td->td_pcb = pcb; td->td_frame = (struct trapframe *)pcb - 1; } diff --git a/sys/powerpc/powerpc/machdep.c b/sys/powerpc/powerpc/machdep.c index 1bbe165e5fe5..04b3967ee110 100644 --- a/sys/powerpc/powerpc/machdep.c +++ b/sys/powerpc/powerpc/machdep.c @@ -490,9 +490,8 @@ powerpc_init(vm_offset_t fdt, vm_offset_t toc, vm_offset_t ofentry, void *mdp, /* * Finish setting up thread0. */ - thread0.td_pcb = (struct pcb *) - ((thread0.td_kstack + thread0.td_kstack_pages * PAGE_SIZE - - sizeof(struct pcb)) & ~15UL); + thread0.td_pcb = (struct pcb *)__align_down(thread0.td_kstack + + thread0.td_kstack_pages * PAGE_SIZE - sizeof(struct pcb), 16); bzero((void *)thread0.td_pcb, sizeof(struct pcb)); pc->pc_curpcb = thread0.td_pcb; diff --git a/sys/powerpc/powerpc/vm_machdep.c b/sys/powerpc/powerpc/vm_machdep.c index 1fd853783cc8..00fdc301a7e7 100644 --- a/sys/powerpc/powerpc/vm_machdep.c +++ b/sys/powerpc/powerpc/vm_machdep.c @@ -123,8 +123,8 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) if (td1 == curthread) cpu_update_pcb(td1); - pcb = (struct pcb *)((td2->td_kstack + - td2->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb)) & ~0x3fUL); + pcb = (struct pcb *)__align_down(td2->td_kstack + + td2->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb), 0x40); td2->td_pcb = pcb; /* Copy the pcb */ From nobody Fri Apr 24 15:29:17 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1p1xf8z6bSV0 for ; Fri, 24 Apr 2026 15:29:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1n6GzFz3DRL for ; Fri, 24 Apr 2026 15:29:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044557; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h2P9OIR6h5KoLmmCbXui6TXdP7WmbWdG4EgXZsACOMc=; b=m5VjODFmC872ibOMEvnat1rm3EnUGK3oGQ1Xl0xLI62TtP39iTxeQ8b5ufRYnBtrifYrOK n7fxCZOurYdtVt1IHZLhqbtzOqku1IfQQj2Nva1VLUZ5fude21X2JldYp2/S9OAA+oMxhy PYXTMSomM4Ii6wKVHVrJAme4ZNxDDH8UzaE6ORth2p9qBRzGlcvFkdSHYWPpGopr0GudyR VLBhl7EY4FHNLZmUXQvmGlztYu3S+EcwC6SBIaV2rjmloDof4V6i2bvXkgGCewRxz8UbLR gg4CGZE+UCjyKjiewHa8ylMv+hZda+bHXckEWf8yApLd0L/5BOeoeC6Lz2hgmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044557; a=rsa-sha256; cv=none; b=rW3EqxQR9hCYJ0BQLFgJKDP6bU0Zz4nOprkOEZFD9QYSGkB211Zt/Qpx3b70ONiTJiauWT mbsnf9sUJLUnoVqZoQYzO5J7lQkhuP3AUzQtmbaQi7LF6ZODctGrT1hirUsDmgXZDsxACN T4QnsJoUQ91JwJcyLgGjuz6KCUa5zsIpZu8u6i3EnI3BKXGB6yiS5fYaF7zECp6FP3Jgl9 eceugGNK9vYnMYyCzzbPTldRp1OR2AquSpdUShSwP8hC5dZ+N0hjVGaQs13MoOl0eEkaLz hl7DYF/yL0dJT6jlL6s5VTNQ5pzqxZkny+lrO0Wrwq3I6lSK40ZKzkSROmH5Yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044557; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h2P9OIR6h5KoLmmCbXui6TXdP7WmbWdG4EgXZsACOMc=; b=FCIswgt+I0jm1HVjTU5/m5a2SpC7BsZrvGhp9osS6FTgdz5XuK3CP9lbOJOnNOHVUBelg8 l2Gs4V/6qGJzQ4LbYVhWTfdNJenRodQ9T0uzIdFY83nc9KwtsxdfaVtRU5y+Bv8T19wri9 9ZqwThz+u6F3wSE492kwDopnaEI877oovUTr2uPHZmVo5eSzq2dQJpqE5dGQ13M2mK+YbN a5UwOA60SnDXYlgJkWCP/W6UyJDzxtvuUHCAB2NAb+YpvmIqDlscjQE3xqaR9MhT3xlTJe wXlJOXPQ9VXMcvE8JNI71kES2toAWQfu3mn/8gjlw6wWP38/6v/IV79KbolrGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1n5pLQz17lx for ; Fri, 24 Apr 2026 15:29:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35b8f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 441beb326fbf - stable/15 - netbsd-tests t_regex_att: Use __nonstring for a non-string constant List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 441beb326fbf62a36f129a0766fa6b8d4cf994a1 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:17 +0000 Message-Id: <69eb8c4d.35b8f.d06e3e2@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=441beb326fbf62a36f129a0766fa6b8d4cf994a1 commit 441beb326fbf62a36f129a0766fa6b8d4cf994a1 Author: John Baldwin AuthorDate: 2026-01-27 18:38:31 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:39 +0000 netbsd-tests t_regex_att: Use __nonstring for a non-string constant Fixes the following warning from GCC 15: contrib/netbsd-tests/lib/libc/regex/t_regex_att.c:54:30: error: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (4 chars into 3 available) [-Werror=unterminated-string-initialization] 54 | static const char delim[3] = "\\\\\0"; | ^~~~~~~~ Reviewed by: ngie, imp, dim Differential Revision: https://reviews.freebsd.org/D54866 (cherry picked from commit 2dea50a661b903513efc42e270c4e6f5c2b89bc3) --- contrib/netbsd-tests/lib/libc/regex/t_regex_att.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c b/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c index dd5b818a1ef3..7962b1914f79 100644 --- a/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c +++ b/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c @@ -51,7 +51,7 @@ __RCSID("$NetBSD: t_regex_att.c,v 1.3 2017/01/14 20:59:23 christos Exp $"); #include static const char sep[] = "\r\n\t"; -static const char delim[3] = "\\\\\0"; +static const char delim[3] __nonstring = "\\\\\0"; static void From nobody Fri Apr 24 15:29:18 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1q14x6z6bSQk for ; Fri, 24 Apr 2026 15:29:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1p6Xstz3D7p for ; Fri, 24 Apr 2026 15:29:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lYQfPvbPLseEDXRjlh/oCBBunLOFqZGxvpabvJCJ5h0=; b=ePcLvrVdDz6dfp2ee3brOqXW4yHj9X+/H81mwVDwnjldFX3sLzGqr2Ecawi6GyGkgsPSv9 CBV0gTLXjvHU/U/ctA9/vYF9O61dM+4jbveW9rLvJiTiaJcIyJvMhAQu/FA95GTvLlebRI j1mzl+QMkFMQsXAn5LgS88/wKJfgTuaq8Vb++klYjvoZUDOj++Y4PMpd0sjgebN+8cZ3eU nNBCxR35Vv4qe21DQLaHNROCR7h0Z3/jQMB3hNziJ03wSSxtgcyg6AK+1nsb3A/FMd+4uY rPp3uzVIxZd+K8t77DFNbGwqSo6+YfW+NcUCNQ1xarpvT3yD1W7XVu2cfHzVlg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044558; a=rsa-sha256; cv=none; b=H6LN8uXy0rJSLtgRBHrB9x89qr3dHjUqPCHoqiksp8b8gWY+AD6HU1/4gyIAZnwYHH/OzZ HZIxdpSZrJxODlYlUSGIPPEMqNXM5MavKlPruorywAwZ4XYnhF9sqfzeluf467IALs2GKs JjTVEKTDUg3HVl1JvWZTO5bI6hdPSwppU+nZvZUKRUX4E/T/b1Wranvfpo0/nEVZ+g2jzY lLa4yHKtQaI99xUww5/7B8svzfp6nBs5mn2xji75d6SbMGYABhVTEOqQxf3nQQuTvaD7WC sU+gJhBNmJWsqmTmI6FXf/khHXceHryAysss86ulVjGM28+mcFGAM1X2j45LNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lYQfPvbPLseEDXRjlh/oCBBunLOFqZGxvpabvJCJ5h0=; b=J9dh2qBkgWc2FiicQWZh0rF2BCQvZgMM0cT9HxMkfEPQjr/SXqIKYJxpUqbW+qLdbB0i2L bSfvra26jHVTuOyrwsnJJnuHSPQ2Wz4YjvKnNX0SQ7ucvQlXL5oqh84bvbc9oe6B7pO/Kg QukX9+HaMfLm0lRENyD2VoUYoMnEYTO72HFHQwvenXXYR6YBc04jbkdvQXXP5RhiEzIO0M Be1Awl+erpARn0ZN/PcCXyVWFhHuh6HaFNMARA2cRmQ63otCSps6SJQacIbC9BwGlso6Uy 9IeOqq7hWHSgznqG9EzgVF65i3JecuhKzlTjkLnXD9f+V7A5Ld7RFWB/DTqJew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1p68DSz17Bd for ; Fri, 24 Apr 2026 15:29:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33dc9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 628d378aaa4e - stable/15 - bsd.sys.mk: Silence a few GCC warnings for 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 628d378aaa4e1d1ff132cdac518e131922759352 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:18 +0000 Message-Id: <69eb8c4e.33dc9.7f7e5788@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=628d378aaa4e1d1ff132cdac518e131922759352 commit 628d378aaa4e1d1ff132cdac518e131922759352 Author: John Baldwin AuthorDate: 2026-01-27 18:39:05 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:39 +0000 bsd.sys.mk: Silence a few GCC warnings for C++ These warnings were already marked with -Wno-error=, but they trigger so many false positives in libc++ headers to be utterly useless for C++ code, so disable them entirely for C++. Reviewed by: imp, dim Differential Revision: https://reviews.freebsd.org/D54867 (cherry picked from commit 6fb87a1a6042887550571316fa9e539239f158d1) --- share/mk/bsd.sys.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 8ca3fd21c616..d58830ad48c7 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -190,6 +190,11 @@ CWARNFLAGS+= -Wno-error=address \ -Wno-error=uninitialized \ -Wno-error=unused-function \ -Wno-error=unused-value + +# These warnings are raised by headers in libc++ so are disabled +# globally for all C++ +CXXWARNFLAGS+= -Wno-attributes \ + -Wno-deprecated-declarations .endif # GCC 6.1.0 @@ -243,6 +248,7 @@ CWARNFLAGS+= -Wno-error=overflow # globally for all C++ CXXWARNFLAGS+= -Wno-literal-suffix \ -Wno-c++20-extensions \ + -Wno-attributes \ -Wno-error=unknown-pragmas .endif From nobody Fri Apr 24 15:29:19 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1r4mrBz6bScv for ; Fri, 24 Apr 2026 15:29: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1r0TkMz3DPJ for ; Fri, 24 Apr 2026 15:29:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oAcs0rtWASp9zG7v+8Z0EeaxbHu9c/BjkaCY/aivs24=; b=uumPVYzX++MWtGsrg1M2CyG4SSMsQj4sqDYqZ9LrzvuWPnIQuxNtICa/4msgjtgzqW1+/Z lq+XMWU8vWkeGvdsLkszXEXGPlbMwFsaA45xn+MQa1KDVaO2jvXKQPwdB58VnSCowQKmlk oy1J+QpORqTdbbcK7kHR9hTv24NtD4DbWRZ5KkitOdzAlBYYcG1iwxAnF4Tjjzkc7Y2aOl jjIsq4kh6R7aWLzzKtsTfh11f1PhaZfxYd58fOWQqlf4WpqJBYZH6K/KaVIiFvkLpZBA9I fi73+nKsQtkt/CMzlUoGbfeTWNJ/geIYiDyuQ/boep3MDj6sqaCZDf7JjLLXsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044560; a=rsa-sha256; cv=none; b=yTbFdjYABpx8oUU7dG6ccTCYiKpIHusAcybqnV8498MyCVkKqlHLTSBJB2hBY+jxBzBALH +R6liXoYUcTezvFIVsmi2NdHKt9tS5Zm9AbRZIXL0NngCZPuuPvb5WvpMNB9PGBTcC3ZBi 0Ub2Im3QiH2Ch656k9L2Gv4ClrcXUSXVgFsLiHcA/JqpMvxppy0PIcuJCsK4coTytV7eQA ZvtnSRCMlHHHJE9yrg+qtgYdhb0k1c9+HD6eyYxRf9k9r1kq+BYZqoa7t6dohRtL6ol1Ar zMZgLqQcmKRMwO81UMDldARq+JpzpHoZIkiflBA3K2yV1Q5U0oD5jW9ofOfeAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oAcs0rtWASp9zG7v+8Z0EeaxbHu9c/BjkaCY/aivs24=; b=dePgUITfPH4U8qsTAKXUMy8u6OMO59GSSbYzskXaWG+/6zWJAqP/nAisuKB5ZRmf28h5tP ezn0OQ1N6MdP8IFDG4TQQnqkVxZW/1UClJT7wBDQMTwD8aKsavbIXbALtJHRDurBvvaw1Y jVOIXP5byUf2YbVLqbP5r8ts4NenuWdXI27eXQx11aiVfm42eHK3HROvl2G/XxPj28uhhc NxwdF6FowyfyoNDpu0D/s/xoa/f2n2D4FyvFz8kam0/+6Ackx/lly8ckapn4F99MpFxhwm WFLAHjhC0Z3uZbcRXfMBtQkfPuziYspClYq+vMKnpERTS/eVURHSVTBB72r99w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1q6wFnz17RP for ; Fri, 24 Apr 2026 15:29:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33ef7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 63e4b5c5e924 - stable/15 - kyua: Workaround unclear warning from GCC List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 63e4b5c5e92422abbb7f08f973d34ba7402b82d7 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:19 +0000 Message-Id: <69eb8c4f.33ef7.3bd27366@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=63e4b5c5e92422abbb7f08f973d34ba7402b82d7 commit 63e4b5c5e92422abbb7f08f973d34ba7402b82d7 Author: John Baldwin AuthorDate: 2026-01-27 18:39:41 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:39 +0000 kyua: Workaround unclear warning from GCC GCC 15 does not like a push_back() invocation in utils::find_core() and incorrectly believes libc++ will free a non-heap pointer. Disable the warning to pacify GCC. In function 'void std::__1::__libcpp_operator_delete(_Args ...) [with _Args = {void*, long unsigned int}]', inlined from 'void std::__1::__do_deallocate_handle_size(void*, size_t, _Args ...) [with _Args = {}]' at /usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/new:298:39, inlined from 'void std::__1::__libcpp_deallocate(void*, size_t, size_t)' at /usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/new:311:39, inlined from 'void std::__1::allocator<_Tp>::deallocate(_Tp*, size_t) [with _Tp = utils::fs::path]' at /usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/__memory/allocator.h:132:31, inlined from 'static void std::__1::allocator_traits<_Alloc>::deallocate(allocator_type&, pointer, size_type) [with _Alloc = std::__1::allocator]' at /usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/__memory/allocator_traits.h:314:19, inlined from 'std::__1::__split_buffer<_Tp, _Allocator>::~__split_buffer() [with _Tp = utils::fs::path; _Allocator = std::__1::allocator&]' at /usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/__split_buffer:365:31, inlined from 'std::__1::vector<_Tp, _Alloc>::pointer std::__1::vector<_Tp, _Alloc>::__push_back_slow_path(_Up&&) [with _Up = utils::fs::path; _Tp = utils::fs::path; _Allocator = std::__1::allocator]' at /usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/vector:1504:1, inlined from 'void std::__1::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = utils::fs::path; _Allocator = std::__1::allocator]' at /usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/vector:1526:34, inlined from 'utils::optional utils::find_core(const fs::path&, const process::status&, const fs::path&)' at contrib/kyua/utils/stacktrace.cpp:217:25: /usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/new:274:38: error: 'void operator delete(void*, size_t)' called on pointer '' with nonzero offset [24, 9223372036854775807] [-Werror=free-nonheap-object] 274 | __builtin_operator_delete(__args...); | ^ In function 'void* std::__1::__libcpp_operator_new(_Args ...) [with _Args = {long unsigned int}]', inlined from 'void* std::__1::__libcpp_allocate(size_t, size_t)' at /usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/new:289:31, inlined from '_Tp* std::__1::allocator<_Tp>::allocate(size_t) [with _Tp = utils::fs::path]' at /usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/__memory/allocator.h:118:54, inlined from 'constexpr std::__1::__allocation_result::pointer> std::__1::__allocate_at_least(_Alloc&, size_t) [with _Alloc = allocator]' at /usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/__memory/allocate_at_least.h:41:27, inlined from 'std::__1::__split_buffer<_Tp, _Allocator>::__split_buffer(size_type, size_type, __alloc_rr&) [with _Tp = utils::fs::path; _Allocator = std::__1::allocator&]' at /usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/__split_buffer:353:49, inlined from 'std::__1::vector<_Tp, _Alloc>::pointer std::__1::vector<_Tp, _Alloc>::__push_back_slow_path(_Up&&) [with _Up = utils::fs::path; _Tp = utils::fs::path; _Allocator = std::__1::allocator]' at /usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/vector:1498:47, inlined from 'void std::__1::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = utils::fs::path; _Allocator = std::__1::allocator]' at /usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/vector:1526:34, inlined from 'utils::optional utils::find_core(const fs::path&, const process::status&, const fs::path&)' at contrib/kyua/utils/stacktrace.cpp:216:25: /usr/obj/.../amd64.amd64/tmp/usr/include/c++/v1/new:265:42: note: returned from 'void* operator new(size_t)' 265 | return __builtin_operator_new(__args...); | ^ Reviewed by: imp, dim Differential Revision: https://reviews.freebsd.org/D54868 (cherry picked from commit 5c504c625d1faffd7cc7c3dfece62c72c012b4c5) --- usr.bin/kyua/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/kyua/Makefile b/usr.bin/kyua/Makefile index 178a1d083b79..82a2b0d03821 100644 --- a/usr.bin/kyua/Makefile +++ b/usr.bin/kyua/Makefile @@ -49,6 +49,8 @@ CFLAGS+= -DGDB=\"/usr/local/bin/gdb\" \ -DPACKAGE_VERSION=\"${KYUA_VERSION}\" \ -DVERSION=\"${KYUA_VERSION}\" +CXXWARNFLAGS.gcc+= -Wno-free-nonheap-object + SRCS+= utils/datetime.cpp \ utils/env.cpp \ utils/memory.cpp \ From nobody Fri Apr 24 15:29:21 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1s5MJ5z6bSgS for ; Fri, 24 Apr 2026 15:29:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1s0rh1z3DHK for ; Fri, 24 Apr 2026 15:29:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044561; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=swKgIbEvOOFJY7pmWHk5C78Zj1a8mluPSTs5b5n/4pk=; b=DkAo/7HFr6gWoWm/xk78GjN0QnVOnfjz0zcEQmZpN8w/vo9OaIXdM1RG+6fF0euUhxIkio 3yGsvk9yrEqnGHjwTQS24L4I8ktjGJN/Vco1sDyd1Y5LOBPVvIXU6kwEDgFJRiigoka+I2 AY+w9eUrjnu604dBZ1Vqu5SHWTRzjYm/jaqCN1UvvfH8MzTVT/HR7Z5Xj/lqpZbZA6Mq12 FCQCoTRiyA7jEPDPX7cWonnOTsM03rAKsTn6d5j8EyqDv/cioGZP4ZUnEPRorkOfCNhu+g PLf1v2Si94AXxaFoHUDFyGIrax1HMkLImLiF234Qn2tjm6TmUfpXUrlSi5MWbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044561; a=rsa-sha256; cv=none; b=Q3i6JNO3NkR12XE0aBBhp+WxDNYXdOW43HbE8SQAJTaWTH9HhywKMtBQ7L0ttoKTbvuXQ2 BqyGsvsrhJxjTFMyCQpXIdzTBJ1cVUCQ1JtdAZHjbP+n/IK/6IlTixAKs4699OM2uaByx1 H1FZQmmX57jibqScNxk8f4Py722ufKiemyDf4qCa5XY4kdeNd5vfP34Mu7brqXWBgpR/Fm BGfRF6roVdX6iQx64RY5bZ4dPqdde4atjIIsHLbthm+Jt3Zm+EZ+ncCFFOatYtEfPtvPnL DR3WGUUUkjXAuWgkebWJLbGkUDUPk1Kl9/mdWuRXIE6j2/smbiiKTNVjqx9zvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044561; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=swKgIbEvOOFJY7pmWHk5C78Zj1a8mluPSTs5b5n/4pk=; b=tlgtohV2oCnmXIx9Lk2TjHsLbR0D9MG5WJt5Oxa3p1KNxIix78K9BhfVsNnGm2sM7sCRd6 zIadEr+rXA+AgAOe8VNVv7ckq1hK75G8ztPScdm/J4CIP/nXz6LGgEqRyI3EyeotysRx6M fZAQDwU/yOsfr7JARSipSM3Xzk/44Tue3+hRPUXGx16dmJ0T3NJG7fY2rczeNNs7X4KxUh xgvPHw7hZqfYsqtcnLeuFmJMUYfdmubdJNJoaeScG9bDMXvTqg3tMmJUcpKX10ZCOF9A/T zOXsvrfrfEVEKaBdMQspv74jFhAOwINEZNXQzt/vShG7ZnIwvBUbsGg6u8C+aQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1s0C38z17cN for ; Fri, 24 Apr 2026 15:29:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 362e0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 6ca22d1666be - stable/15 - wlanstat: Drop unneeded bsd.compiler.mk from Makefile List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6ca22d1666be6a332be2debd333c8180463241a0 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:21 +0000 Message-Id: <69eb8c51.362e0.2d25e449@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6ca22d1666be6a332be2debd333c8180463241a0 commit 6ca22d1666be6a332be2debd333c8180463241a0 Author: John Baldwin AuthorDate: 2026-01-31 16:58:39 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:39 +0000 wlanstat: Drop unneeded bsd.compiler.mk from Makefile No functional change, but downstream in CheriBSD this was causing a link error as the Makefile was overriding CFLAGS set via a side effect of bsd.compiler.mk. Reviewed by: bz, brooks, emaste Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D54894 (cherry picked from commit 6e82cb29066765c03408a81c9bec4ed0d99cab81) --- usr.sbin/wlanstat/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/usr.sbin/wlanstat/Makefile b/usr.sbin/wlanstat/Makefile index ec1fc3206267..c6f62e46c859 100644 --- a/usr.sbin/wlanstat/Makefile +++ b/usr.sbin/wlanstat/Makefile @@ -1,5 +1,3 @@ -.include - PROG= wlanstat MAN= wlanstat.8 From nobody Fri Apr 24 15:29:22 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1t50sbz6bSGx for ; Fri, 24 Apr 2026 15:29:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1t1Wvjz3DS0 for ; Fri, 24 Apr 2026 15:29:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bygq9S1Y8jNIxnVqtBuBib9YI2D8Kzp8Z02FlYS1UHs=; b=Dj9Sj0NruHXiqmomk5YI7W+FGwgaEJKYbJtjlFhPdaYElVEUFHcu4qeQdDo1f2V68N3NIn Boiom466FLQL6c+zUxoe+8xKDagWZWj7DdCvp/UYEJs7i4kaNA/yson4bZLrm56zsRpA9b zLd7tpSexAYP9HauzqiYoAKNjz/vs5hVcSHuMeEYtwDRGHfEGTE9YBxZ2BUV8sBXF9JVjt Z9+WZH/6IX5mpervXcB80CjcRWIxRcoa40VNSAtrkomE9nMvFr9/cvWHYMpAYP8vC6io7a OKortFn6vE6GQSfQ9yh+3WOV6PAktZiAtBjzGaEO8ys7+iv8u4Bugy8Nr5k4Hg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044562; a=rsa-sha256; cv=none; b=ULS2NLUhcd7S2WOsXufoL6v4ZAy4qRVPzC0UEWSXj23n+uI13iKbvBj1ImOYka4eN6jWRW leAf2QtC4mAlGL9AGL96ZJEoSFYKYtrFKBXDXcs2dBEnEP5g6Egzjixuk1+yha6hHxq2QN /mKY+cRJTOcurB2wrrvgo2ISXqCwFEtVV1nxrrFYdg+iK+fM8ML86JjkKinQR8WZLeZboU aeQM12rp60rvHNMpB+QDNO+RxX8VrbNJLXkxfQ5+g3Cajwpc6FzQ++jp01ZeqXo11P75P8 ovZXKuJ6HV4Ex6IvfymKs24E42N3PVOVSRiQPrgeqOKfQXSfPkJs4wWcN6L+aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bygq9S1Y8jNIxnVqtBuBib9YI2D8Kzp8Z02FlYS1UHs=; b=TJalDGZwtaEo30sjJ28iIvK3qBWkGAgjzK0fd4RLgLBGJYw7O4nbzSSsCgq5xZdLggQitR 7gZ3T7rTEBaUiFulwWJsC1/ooOW2cwfKGqBnpdv2xSOS9l8lQzqjTSLtSL5wy8aEzGvfRA +nUjQzAvTjKVV4t5jG77gdIdZA3BaPVgYjRlBe03IKgpJmXsVX/B68t1NqKrRHvtLcQ0ly Jx0ibuprr091At/tpyKzq9B2mMN7wHJcaS/CQNdDHNCwAuXz2JdPlttgDxKcUMBpleRP4r 32tVcMP8oFwdMJ5GbENNmFCioVKr2+W1q/SHsFqgp6CZ6L0GRjBeogbr4srfDw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1t11Wvz173P for ; Fri, 24 Apr 2026 15:29:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 361e0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: ec5370457e3a - stable/15 - stand: Use the correct OUTPUT_ARCH in the linker script for RISC-V List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ec5370457e3a59a1dc53cdd39017a636fc4ff6ce Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:22 +0000 Message-Id: <69eb8c52.361e0.7efde823@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ec5370457e3a59a1dc53cdd39017a636fc4ff6ce commit ec5370457e3a59a1dc53cdd39017a636fc4ff6ce Author: John Baldwin AuthorDate: 2026-01-31 17:09:44 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:39 +0000 stand: Use the correct OUTPUT_ARCH in the linker script for RISC-V Compare to the OUTPUT_ARCH in sys/conf/ldscript.riscv. Reviewed by: mhorne Differential Revision: https://reviews.freebsd.org/D54962 (cherry picked from commit 2e8ef82b3418b41e7c54e2dbd16df0edb3cb8376) --- stand/efi/loader/arch/riscv/riscv.ldscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/efi/loader/arch/riscv/riscv.ldscript b/stand/efi/loader/arch/riscv/riscv.ldscript index 63b71c3bd702..1c585e7d59c6 100644 --- a/stand/efi/loader/arch/riscv/riscv.ldscript +++ b/stand/efi/loader/arch/riscv/riscv.ldscript @@ -1,5 +1,5 @@ OUTPUT_FORMAT("elf64-littleriscv", "elf64-littleriscv", "elf64-littleriscv") -OUTPUT_ARCH(riscv64) +OUTPUT_ARCH(riscv) ENTRY(_start) SECTIONS { From nobody Fri Apr 24 15:29:23 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1v5BZLz6bSH2 for ; Fri, 24 Apr 2026 15:29: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1v2Gvtz3DMC for ; Fri, 24 Apr 2026 15:29:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uv2I4Jec5C10dAdanUjvcJftDeoMPxjZD7BYVK/ifz8=; b=YGhbFXGZ3oi3cz3/JPf92X2YRJL+jRgfd9B0zZqugPN9oASpdDp3yQwJsoWw4MgypTG283 8XmRq+lZMBYgzKc7Znd9PHKgyKmZ51IvmOx+QEk4/4Xrma0lmphjkEu2uVv96FpYRRB4wr 0O9okj9VW3YzQEn2veuPDXkqXZdVaHDhevkdTu6XItRr0IxzRx0+RdB8SUUgoHuHYLL8nN hwiqjKouK/7peOn77s3UifJzMl1e4rhRq/TNOG3qi7MsZkBcpcHgf5VPRh5K+uEGTN/Jsa I3fd2fYLRrbJTs+Y+S7N+lLbfQVi6DieAsNesd8FvX8390UvygWfaIcqUMXFqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044563; a=rsa-sha256; cv=none; b=dA5lcLoZXdlkKeLjswsih42zkCNZG2jLlTywbpiU2Fr1LFPrkFQrGBnn/AX6/2nvI1ByGW iNiIBp8c/z7n8w2wk+BZL82zSQIELUYGzPR0gGdf/IdWo9GVzq2kd0aHVvxMsrXUzvhIqK fGwzZrQ0ggX5SOvodeYyfeeIQksLtv7ri0jW2RhI7mOAcPv7BR69ICJoBFmdCU1U7lsvRD YBjebi9zw7KD+ibU0z8uKj6yNKjFtLaSiYZZYweXUsRHGW7ca5z68iOcuHKaqerJBcU7vB CQTo+MwGNEKukuibWuR3UgtGYGeh3zIRHnuumAhgeMZvnBRaxzADnN61YHAyLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uv2I4Jec5C10dAdanUjvcJftDeoMPxjZD7BYVK/ifz8=; b=b/TZa73pRLVh7dSMik3SgBW1RdMAiH7nP9VMrEXg1X+DqLanAm77XZXPOctSsCs9zb5zKZ i4aMWlHsu5TeR5+dvid6yXVSopphCpZAcnZg2PC8qjuJQ2h3Y/6VhK678td8WuwdZKHIRR 0eXzVibmHu14yJ8DYB5IXeHojIJbuCVPGozR67UCgRvFJTH+HOkuYto5u8Lz4zMThxURc/ hDF3NXUTdqhRXqhbJR/iDvpL0NlXS1gb3kKTAbESZg6YJfoDOnSxjCEtdw03zFuvh5DkTO Mzkb9vCwejuY/QLMQy5NHFoA0pLGiplP+Fy2wBxWzNl4RgjdbcTEwWTDzNCCBg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1v1pz2z17ql for ; Fri, 24 Apr 2026 15:29:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33dcd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: dadecd7293e2 - stable/15 - stand: Add compiler builtins needed by GCC for RISC-V List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: dadecd7293e210ec04c9065da3a460fb37a015e2 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:23 +0000 Message-Id: <69eb8c53.33dcd.1eea2eea@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=dadecd7293e210ec04c9065da3a460fb37a015e2 commit dadecd7293e210ec04c9065da3a460fb37a015e2 Author: John Baldwin AuthorDate: 2026-01-31 17:10:36 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:39 +0000 stand: Add compiler builtins needed by GCC for RISC-V Reviewed by: mhorne Differential Revision: https://reviews.freebsd.org/D54963 (cherry picked from commit fe45651224bea513c7db88abbc53bd1241ab442f) --- stand/libsa/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile index 470c03032f61..11896cf1a2ab 100644 --- a/stand/libsa/Makefile +++ b/stand/libsa/Makefile @@ -66,6 +66,9 @@ SRCS+= clzsi2.c ctzsi2.c SRCS+= divmoddi4.c divmodsi4.c divdi3.c divsi3.c moddi3.c modsi3.c SRCS+= udivmoddi4.c udivmodsi4.c udivdi3.c udivsi3.c umoddi3.c umodsi3.c SRCS+= ashldi3.c ashrdi3.c lshrdi3.c +.if ${MACHINE_CPUARCH} == "riscv" +SRCS+= bswapdi2.c bswapsi2.c clzdi2.c ctzdi2.c +.endif .if ${MACHINE_CPUARCH:Namd64:Ni386} == "" .PATH: ${SASRC}/x86 From nobody Fri Apr 24 15:29:25 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1x5y7yz6bSZh for ; Fri, 24 Apr 2026 15:29:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1x42NFz3Dgk for ; Fri, 24 Apr 2026 15:29:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y5zptyctvgZ7juYsJv2Q3eBaZWEx0ILp+KtddduZpco=; b=Eck1xjddGOZfMd/qwwnY8nR38uupTcgDzPvd9F4x3sRS7DdCPXJmS0jvfQBnhwisWxbI9G 1UfIRmgfcZq18951pVRKXZYxHZEhMwi0DIIst5slO2usgU51uxjcEuO9O0lPOYA/Sks2d4 MOcFONsxjCbAT/Oxlo4A8fiEihwp68W641Bcsk3SoiPIYizEqv4ACxt/y8O3jouoaSb7TB Zj32kZvjCt6m37+Iqb3RumJonDdr+WZMngpRYkMi+o7C/jJ5lCQkBBzHa7XDQSGM7Vyb6B T+HtBNDOkiOuOP14Lnq5yZwNHwetWmh+cA6P+HZ/NiCm0dpgIWAYh+dhN9284g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044565; a=rsa-sha256; cv=none; b=iDbypkKGLQ8AE9wE2eG4L8lANR36U7Vq6/D0c4gq37NeQGvxoeV/tMqDGhLZsmYyk3oCo+ kIDuSJuwW/7RrLMhBAcAKA3mVrr0ZjOMdPPfHigOa48hCzEoDBn497h/RfE47h+WjKRMPD IEuJaRbVOFf5g4uMqC79DV3jlgrWr0H9XQjjJCcXsWyl6mRPKWDp9QMcYhbI8sI3M4Vj5R VO1qJRQSnIau6h/DCjim+zBrEwmpl/AxPc6DOiDlg/p6VCh+ehu0NV4JG60Bqe5bCDings miO8lt6bFaX/mqxsfjWxv5dzseXNskDGSr3fEE9nuWTtGdAZrtkn1+i9jD+CYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y5zptyctvgZ7juYsJv2Q3eBaZWEx0ILp+KtddduZpco=; b=aAcBZ3Lv/mDnnsaD70o4s9ruqJnXAcH/JN+bSepVlgGDbVGyGE69fa5dd8w4f1J5cSXhGT oVDLOgrlr5YSVaCYGar4MbXKGYMm7F2tlBD4VKQoCLXv59T6kBqpmjbdpqUkVvk/4aUCaY zqIYPr5530w6/GS8lIdP+MGYY0oBXT2vqJtNWDglCriZ8Y0M3rmtm6gTWCMPIc7VyPwoBw RY7mTD1FRnddxev8yo1xNfbVf92EiW9gf4dLtaD3LGb16s2+R9Tbap1GxZcO6t5KGHo8X2 2Hia4ylIeggwsIuMpwGi0BId3lb7uvhV3OgzkYpJfYxIb3DRXErG2PWIQqfipA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1x3TZYz17cR for ; Fri, 24 Apr 2026 15:29:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35ef0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: d100ff6c09c9 - stable/15 - libkern: Add libcalls for ffs and __ffsdi2 List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d100ff6c09c97babda963d2c295601650faeeebf Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:25 +0000 Message-Id: <69eb8c55.35ef0.7db8de48@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d100ff6c09c97babda963d2c295601650faeeebf commit d100ff6c09c97babda963d2c295601650faeeebf Author: John Baldwin AuthorDate: 2026-01-31 17:20:50 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:39 +0000 libkern: Add libcalls for ffs and __ffsdi2 These are needed when compiling a RISC-V kernel with GCC which does not inline __builtin_ffs*. The __ffsdi2 is adapated from the previous ffsl.c. This partially reverts commit f4db342d44198973c1c7b9005d0c5683a582707e. Reviewed by: mhorne Differential Revision: https://reviews.freebsd.org/D54967 (cherry picked from commit 4c822dd4a15c533c08271b2286da949fffafc89e) --- sys/libkern/ffs.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ sys/libkern/ffsdi2.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ sys/libkern/quad.h | 1 + 3 files changed, 95 insertions(+) diff --git a/sys/libkern/ffs.c b/sys/libkern/ffs.c new file mode 100644 index 000000000000..e0308ef76bae --- /dev/null +++ b/sys/libkern/ffs.c @@ -0,0 +1,47 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright (c) 1990, 1993 + * The Regents of the University of California. 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. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +int ffs(int mask); + +/* + * Find First Set bit + */ +int +ffs(int mask) +{ + int bit; + + if (mask == 0) + return (0); + for (bit = 1; !(mask & 1); bit++) + mask = (unsigned int)mask >> 1; + return (bit); +} diff --git a/sys/libkern/ffsdi2.c b/sys/libkern/ffsdi2.c new file mode 100644 index 000000000000..33e255a26dc6 --- /dev/null +++ b/sys/libkern/ffsdi2.c @@ -0,0 +1,47 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright (c) 1990, 1993 + * The Regents of the University of California. 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. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +/* + * Find First Set bit + */ +int +__ffsdi2(quad_t mask) +{ + int bit; + + if (mask == 0) + return (0); + for (bit = 1; !(mask & 1); bit++) + mask = (quad_t)mask >> 1; + return (bit); +} diff --git a/sys/libkern/quad.h b/sys/libkern/quad.h index 59b3da44dbaa..cbb94ab98828 100644 --- a/sys/libkern/quad.h +++ b/sys/libkern/quad.h @@ -102,6 +102,7 @@ quad_t __ashrdi3(quad_t, qshift_t); int __cmpdi2(quad_t a, quad_t b); quad_t __divdi3(quad_t a, quad_t b); quad_t __divmoddi4(quad_t a, quad_t b, quad_t *rem); +int __ffsdi2(quad_t a); quad_t __lshrdi3(quad_t, qshift_t); quad_t __moddi3(quad_t a, quad_t b); u_quad_t __qdivrem(u_quad_t u, u_quad_t v, u_quad_t *rem); From nobody Fri Apr 24 15:29:24 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1w5LcFz6bSgj for ; Fri, 24 Apr 2026 15:29:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1w3C42z3DSJ for ; Fri, 24 Apr 2026 15:29:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SkcM9qF6HOMgGX+VmQuYPsmn+lQPrXmeHYJK8Klw4pE=; b=ywwh3S4teO1nXdM7pIqYLSNpKuRZq5hdG/0l46UOAh2ib8O1Yi99jqIpTruashBrCU+mkm ELswOw2Yv7LJgiI7Y4hMH6MJM5YMtnVmj5zPOf2eBx4AHkp4FQTVf42ktJPH3/+FTeagUo UEl8l+x3J5d5/unUxdAzOmm89K+8k33ARPwIuXUmIcbq75m4xrl7lkan0Ey87exAXn66Os Rh6LwXFT+sNMIPrPXPfBw35xDAGJsk9XF4/xOfD8QcHnEunxaaOl2RVrssVyclIgQ1Jm8d ZjPw/a60+U30HVEA6pu0CWcDnvzI6DqKjgvUFEq201MzVFu7GAgSSe1u+3DYfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044564; a=rsa-sha256; cv=none; b=qKsrD8t4gfdXx6UrMrSqhcpid65yUYYHDfIXRCVTTngTve+H7FUl10cCxIYRUM5BNjqxBM hPp5X57m22XiwFTsTyxt52rMfIlMA2rSJo5OwEDj+VAckm7FmVgmWecacLzgQ1Z+ssi0U4 ygFWI+ObFZo+qsJ/DKYu0sIv/yrClWjFDqBktj0owbubQANekGcIRm1rpzgdCfGJndY/2C 8Tfp50h/wcY6F4ZyaI5pp01TQdEZ+kcLDi/36/Qh9uSzznuqOEp3Yn01Ff8PUvIYbdJDOM lCV205GOTLaFai7HkYff5LV7jEVgg0RJwHbNrAfPH57mJUw/8P8uTkrbQSEYjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SkcM9qF6HOMgGX+VmQuYPsmn+lQPrXmeHYJK8Klw4pE=; b=uEJpSwSEkKuK8Nd4lMh+0Vxi/sv3aAXFRzwuvTlG/VjIWaEM+JU5TZEB90WmNlW9gpwHP1 NOqoE6MaI9wa2PZJhfe4xxpyS5f7yeSaH1KpIUDqVF/SCezZTAvJ9o7kdrRy3UqsU5z7oz sDezzkP4enGnfN97TIgkdMsnZ9oWXPLpQj4eaojIM97SatMkuX70RexECkX2Lfo6YvBVHU xONEW6GYj7Fte81NYZVyzA5p0NCG8An/kCeQhNW3HkH75Za6n0roatgybcFxNyEapmRiSw kNcoycKgs8TH0SMaRLJ1wSogqomabNCevu7nnctAIfwUNWUXGFhCuodqZcX3tg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1w2jbbz17ly for ; Fri, 24 Apr 2026 15:29:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35eec by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 91cdb8f0c1c4 - stable/15 - riscv: Enable the zifencei extension explicitly in -march List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 91cdb8f0c1c40563344969d969b7505c32c980b6 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:24 +0000 Message-Id: <69eb8c54.35eec.5ff2ed7@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=91cdb8f0c1c40563344969d969b7505c32c980b6 commit 91cdb8f0c1c40563344969d969b7505c32c980b6 Author: John Baldwin AuthorDate: 2026-01-31 17:10:56 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:39 +0000 riscv: Enable the zifencei extension explicitly in -march clang is more tolerant and implies this extension whereas GCC is stricter and requires it to be included. Reviewed by: mhorne Differential Revision: https://reviews.freebsd.org/D54965 (cherry picked from commit 31b259049e2b932ae6527d1dc850c2bec58e94e0) --- sys/conf/kern.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 31036c4080a1..958203c3dedd 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -166,7 +166,7 @@ INLINE_LIMIT?= 8000 # code model as "medium" and "medany" respectively. # .if ${MACHINE_CPUARCH} == "riscv" -CFLAGS+= -march=rv64imafdch +CFLAGS+= -march=rv64imafdch_zifencei CFLAGS+= -mabi=lp64 CFLAGS.clang+= -mcmodel=medium CFLAGS.gcc+= -mcmodel=medany From nobody Fri Apr 24 15:29:26 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1z4NfRz6bSH9 for ; Fri, 24 Apr 2026 15:29:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1z19fpz3DSl for ; Fri, 24 Apr 2026 15:29:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cOywet23hSgEAVYh0EZ/W6FhPFxjcsWUB7wbin7w39Q=; b=nkOeAxbj0KfY0bbYf+qLuccEICFm38XYDMKUA28CkJK7C7LqtrY4YFC+kcKCDgVt3QWhkv 9jzGoMwxI3g3ndVTYr/uz3Sud/aIO5fhk+tLyMoZ2TOGXECjp8ENphMp9Yf8ciMnixy/tF 7WKlNOgWl5yzQDn3+uGjXZ0Hl7XpNBk9S57qVmAD9yqtQ6owG8xhHGGfHMknKZCNVyTRM1 PiIyYZGxabkAK9Qce30EYndRUfbwG/3/EgBV8YR8yEWyyYTO+3HXj09hoJZRLYU/ETY7WC Zgjv6vrG3imdEXFH8JbB+jJi2sh1++Je48xFR8IicWgWMA9dPLVSL/SMHK/j6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044567; a=rsa-sha256; cv=none; b=bK0wV2U5Lrbjwz2KOXwxHDwbi3uRivjWU9sXH8Qa6EPmbFlIzOVsDU3qOBv4E/5/0G/Jlo +jmhav8+aZwyZwdWwJPgcqfxSwDijbeUIJJHopev9o4o+rtJ7ScIKn/B+DFIsPK6++gj3v ktB939aVdPeKtzETdgIiHV3OKqQAxmqNePCTUTCXwL+9HGADIvNO+qh1uDhgvWkg64XFP1 bIB7oe/LUYAlZQHfEXlKWmXBJ0mCnoJd5Ov3XDMPXyRxSVQmi5gO9508B0Zv277XaHWlfc SicO+VTv4spPbucVrFPXtSYWG7/nGYo9gdcerqw54+F39CDybCJorU84v12Yjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cOywet23hSgEAVYh0EZ/W6FhPFxjcsWUB7wbin7w39Q=; b=TCwhTSQtHO8qKxUWGQOICv5aYk6QSFsGCQHZeIAbK+FFl4GkuvlG8urQoGelG7FpPQjJnZ FgSz8/PLHaeN2qiXjNNy6noY8S6QoeM83dPrtkh5vXJxePVfn8Zy7XhwwlpWoPAclDK5K2 jkpCpc64lsLuaXA4Q8QwJYMtIxoUnzHRtsoUJH65yrU4Sgwd3X5/d+ho+r7JNlR9/uE6Dl /6RAmJIKKUbSotBiuxmyozg0xaAX5qKbRTCSC/5EdGd69zJLnqRKL65kv59Tcrru2e5oVd rQfQBKDOGBP9r/IuD+4y5nTFLqry/Nk1pAS+hMMTqrNreZ8nzmHguTVr492VrQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1y4KFJz17RQ for ; Fri, 24 Apr 2026 15:29:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33fdd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 9fefd5146b74 - stable/15 - riscv: Add ffs.c and ffsdi2.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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 9fefd5146b748d5154fb00f2bcf3bbce1139320a Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:26 +0000 Message-Id: <69eb8c56.33fdd.607d2be8@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9fefd5146b748d5154fb00f2bcf3bbce1139320a commit 9fefd5146b748d5154fb00f2bcf3bbce1139320a Author: John Baldwin AuthorDate: 2026-01-31 17:21:11 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:39 +0000 riscv: Add ffs.c and ffsdi2.c These are only needed for GCC, but it doesn't hurt to include these always. Reviewed by: mhorne Differential Revision: https://reviews.freebsd.org/D54968 (cherry picked from commit f4c40a5acb16e542934ed17ee475183b87420eae) --- sys/conf/files.riscv | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/conf/files.riscv b/sys/conf/files.riscv index e77a15ce8dae..6254c237b047 100644 --- a/sys/conf/files.riscv +++ b/sys/conf/files.riscv @@ -33,6 +33,8 @@ kern/subr_dummy_vdso_tc.c standard kern/subr_efi_map.c standard kern/subr_intr.c standard kern/subr_physmem.c standard +libkern/ffs.c standard +libkern/ffsdi2.c standard libkern/bcopy.c standard libkern/memcmp.c standard libkern/memset.c standard From nobody Fri Apr 24 15:29:27 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H200Mm8z6bSRv for ; Fri, 24 Apr 2026 15:29:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H1z5f3Gz3DhD for ; Fri, 24 Apr 2026 15:29:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ew4B9QBlmOhg4esUZSEfY8UFi+Xt4sBl4Fe3SFw1jCE=; b=hr54sfFz/0eTTwpYVxY6aBzrO/AxET5eEwwHkKJe/XSor6u3nV21+Yx4xVAB3GxAnL6hXS rPYFHOVk/n+qXqA1unHEg0XOS+z9YJje8OhDKF8/aWOKr8ikxOQqbPROv4LvdAYB539XW3 nWDsdZ3P3PuP03ix0R/mJYbJILEBIYDw/4yF2b9ihDb4OXqZ8fsDxdCONBTHQlan9MM6lH g5PsIqwmKVj8HW61vt/8RMkgNiwLaz46IEWS/3ZVQYDVSD7U+Y+VOTrBYndP6WTem1IwR4 1CAaQxKOu/O2Q8MhiKbuACj8JCfYH8r5c+TeZhoWvgOUqulPkcTaKgw0Pup/sA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044567; a=rsa-sha256; cv=none; b=aBSvG58VmANlbfsKtDgqo+X06kcx/k4aDwP22zslr62VKl1swQkehKsu4L2vD4KvRzxmCS K96wtuz5z4qfGYOw6FILQJaMwa6+kUA3G5vuUgRUXem8mCP1datvWLe5FqD6CT1XTKJHaW LgvSwD0/Yx7mLCHc6QkHD3XURCCMTjHt1QQIYdkKytHHz4Al3SKQ6K+3r+bHUAJ5fc+sW6 0WShVnYlWqFv5XDh4EIkXvaYIfUsdJNtkIgjFWka294a2jpTnI6wFlb9rJlsLokV4OzxxM 8PLdfT4Dp8z8SrwWUjVVKAlst8K7v44EZX3mwK8OTmjZO6RqNb6+RxaxHuHckA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ew4B9QBlmOhg4esUZSEfY8UFi+Xt4sBl4Fe3SFw1jCE=; b=KcPg4zkGTCp04BLYddNpjnH3oCYwNZl7ohsMpVi0Uj1b2x7Cgz4qzPJ9FnXA7x63KR35be 4fzxYnEMse0Rjvb/EIhL5Z+U4aFHBoV0qgFPoeVK18BkZzgYn6URAW6BxiDDEMZx/CgeCA FqmMO4ZHMGYw0xUEu7Man39+ZGYlFOauzPO3oiJnV9R4aCBlUJdS9LmjeVWefhGctH/KYl Nemw4Ysf1vsKP2z1xuCNKkwxIjyt+L6U+ypODMYE/UpeM3qGYsLQOPUHq/6YXPFwmmtaCp 4/LqvWQ4cj1CkVw53WquBDh1FJLvGH6veVKgkY6DayAPpJ7hAcaBJtKJPeHZ2A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H1z56qvz17ZT for ; Fri, 24 Apr 2026 15:29:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34aae by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: d6e1660971ce - stable/15 - sdt: Use the "cc" operand modifier for the address of probes for GCC 15+ List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d6e1660971ce70d2589377990e42dcd234ad2063 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:27 +0000 Message-Id: <69eb8c57.34aae.23a17bad@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d6e1660971ce70d2589377990e42dcd234ad2063 commit d6e1660971ce70d2589377990e42dcd234ad2063 Author: John Baldwin AuthorDate: 2026-02-02 17:19:51 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:39 +0000 sdt: Use the "cc" operand modifier for the address of probes for GCC 15+ This is required for GCC on RISC-V. The GCC 15 docs claim that "cc" is similar to "c" except that it "tries harder". NB: I have not yet found a way to make the DTrace probes compile on RISC-V with older versions of GCC. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D54964 (cherry picked from commit f7144a9c4a11214a71a3091ce1b232a8243b83ea) --- sys/sys/sdt.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/sys/sdt.h b/sys/sys/sdt.h index cd45bc1a1ffd..1913ddb5cbfa 100644 --- a/sys/sys/sdt.h +++ b/sys/sys/sdt.h @@ -194,8 +194,12 @@ SET_DECLARE(sdt_argtypes_set, struct sdt_argtype); #define _SDT_ASM_PROBE_CONSTRAINT "i" #endif #ifndef _SDT_ASM_PROBE_OPERAND +#if !defined(__clang__) && __GNUC_PREREQ__(15, 0) +#define _SDT_ASM_PROBE_OPERAND "cc" +#else #define _SDT_ASM_PROBE_OPERAND "c" #endif +#endif /* * The asm below generates records corresponding to the structure's layout, so From nobody Fri Apr 24 15:29:28 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H2138nwz6bSVK for ; Fri, 24 Apr 2026 15:29: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H206QR3z3Df2 for ; Fri, 24 Apr 2026 15:29:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044568; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VwS4NdX+mFXRhOn/HWJDFQtyMGNxjNBmzs30bRpQ50A=; b=MFyu6Yz7piECZORRM8Lo07SH2h1YSXRxDSR7GwQtuvedJ/Lu6aTEBuGk9EQbe3izH4h/+M waCwgrxjFToCC7phuOJjrjUXb5yJc8no4s70hp4o9NkHbHFqSgmoH3rIzFpBviZuIycmbV 9mPfQLGu5IJ+dZU9MUqKuXEeV/wyVO6OQmOvYNasnOlgNsSggOYcJA9Wn5sxJUI9IkuJQf R1w4VApaXezg3vB8BwfWJSxMON6na6F9Gp5E2cJZLDQP05WWb6KBiDU8B3lqNnOb+DbSaa CrajSGKIC1YyseFogkGbhtFaP4qSYue71MSiMlQMGr2TsLaPBZxVsCbb2E9aEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044568; a=rsa-sha256; cv=none; b=A0gQV7bQyMCjChsR8F6nwu584lUsx84zGlyO6HdeRWWxw3gP3IB4VONgE7aYysTAtbOEcu w7QiJy52ms0qSLVU07CbXLLivrT8NQb4KCK5qzf0LyPOkhorw1UmWg2z9iHsJtiOFEIMi4 uWUvJoofGKl2MujE8OciLmwCQJDkbViOHM21CSrsJVbhT+rUH4jgEFpaY1e4Ho00+k9DCL 6eW0Oycpr2xNthLdFOjTBp7/3CU/HJtS5Rub0vV3ZSxRfr1Y5q5Wm2/ec4AZOfNgO3id9O 5oAHKB2chUvMWTJMDnz6Byk/U9Gpqo26xq48olJerrrd1i5U7NLhM+dQ3aFZ7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044568; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VwS4NdX+mFXRhOn/HWJDFQtyMGNxjNBmzs30bRpQ50A=; b=tttBY5ecvEzU7X8Zor4czBQdjTaZJMjReqbA4ZsEGo5j9uJtLrkmPI7Q/hCKSoCGgSEdat CXKbbqrIUovrQSReKJtUkiLIwva0NnjuGZVvn+DNC0jNgS6V8anRLZhaADkOP48g5VGeYT recctUZ17OzGcwnZK4bRkdphzbJQymYXrj/RdzVbGfK89U9kVn53ZmkStXxuL8Z3FgTY1e WCxjkRPTjXNBB4zbPv7luZUg5edydknwXMel/CPfQixw9wJlZ4s83kk5kKRJp366vvTTGR fte07aZ4UAtszmJtOodSdAndHLSgvIjKZ6Ww060LIynK399yFBL8OeZy3AnlAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H205wq1z17m1 for ; Fri, 24 Apr 2026 15:29:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35fd6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Alex Richardson From: John Baldwin Subject: git: 66b5d1ffadb6 - stable/15 - libthr: fix -Wunterminated-string-initialization List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 66b5d1ffadb6d9254b16aaad1a928480333dcb74 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:28 +0000 Message-Id: <69eb8c58.35fd6.39ac384e@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=66b5d1ffadb6d9254b16aaad1a928480333dcb74 commit 66b5d1ffadb6d9254b16aaad1a928480333dcb74 Author: Alex Richardson AuthorDate: 2025-12-16 18:04:18 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:39 +0000 libthr: fix -Wunterminated-string-initialization Reviewed by: jhb, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52528 (cherry picked from commit 4cfc7de13f110563463c15be99690c6fe7b8676a) --- lib/libthr/thread/thr_printf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/libthr/thread/thr_printf.c b/lib/libthr/thread/thr_printf.c index e1edffe5acb2..b7cb6ce81bda 100644 --- a/lib/libthr/thread/thr_printf.c +++ b/lib/libthr/thread/thr_printf.c @@ -61,7 +61,7 @@ _thread_printf(int fd, const char *fmt, ...) void _thread_vprintf(int fd, const char *fmt, va_list ap) { - static const char digits[16] = "0123456789abcdef"; + static const char digits[16] __nonstring = "0123456789abcdef"; char buf[20]; char *s; unsigned long r, u; @@ -147,4 +147,3 @@ pstr(int fd, const char *s) __sys_write(fd, s, strlen(s)); } - From nobody Fri Apr 24 15:29:29 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H221H5wz6bSgy for ; Fri, 24 Apr 2026 15:29:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H216tp2z3DYR for ; Fri, 24 Apr 2026 15:29:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UKFEVCHa+H/gRofzQXWh6HH+MoiNcsPu4aQK/Gzn68Q=; b=SFJJ19u3kzlWuLtkZ7DDBbYDKGQ52Gqfzv78JI1NKlJ3dDQMMxhzn4TJkj7cK1VVkIo9+0 4UKxPIM9XaxNFr9rNLH2BiJxzHnJaOFfYvtP1YCExtxnsLrS3SL3uihij69dfE31rNqwzw qpUtFFcH27o9SCafdKehX0KNmc9s7ZgmbnXwRLQkI3FT8Xt6qEiOhfwU2rj4QO29bRJw8j KRVVlgaXHmFl1BNN260ixTAzpI1i7CA1HCuPqod/5+EcEXx4Cmz+6KlEAfarvC1HT+XAeW kiWAI2uux782kLEnt+2rEDjGgFFR3GYSPsdWwExqf2HsHod4OD5U/Jkf7/ggYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044570; a=rsa-sha256; cv=none; b=I4DUHsnW36Y6535KYPCIsZoVW3Q0SrD583Xw8c5F/nBIcPeD1G0EJQwnv3lTUNUnhzlPRD BcqVxGgQ0AO2XSZngApOcEOgVD6jpsD46UJq+B56M9QgMEqDxKluPtk0RrxJH9IxTM8A1T Es8JCmXGfEvVLdLS5RhF5/NEFKsq9E0wC/C0yLbvhCLpUH4+q2anm4djhlnn+GlmP/mBz4 Q65+z9Zyt5E3okbyYYT0b+oO26b+hUe77+Is2/junEUuxV0bmVb2wFs3AWndqzW5twOoeN 7gNoGhu/9sp8JI0ibou0JdQBqh6fLZMktArBgBqvRTEDHyCiDhbl7ZIOuiK09Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UKFEVCHa+H/gRofzQXWh6HH+MoiNcsPu4aQK/Gzn68Q=; b=c0JEllwRhbcchifdtLnP8noQETw4s0mr3Ng9MT5Ji8u09eKz9nYhGuMIBpWPxwMIVe0S4N WVwP3X73CT16IUNkMvRZwxWnctV9s1wGdhz1HWuch+ElwbCmBnxN3Dng6CoRI8FwTZZ6hq DZBhn9OLAtG3uGV+54QX7kkHxe2lr8hxXQyu+KTGqzv9BrgLRutmbiqdLgcBOhrCR5bnxa 5a0tr0JQVRXErjqyxKP6HrWcaOR5WIo0wY3Os14yvKCe9ruPwXNzZBb+BEpGx0pFMAUQto bpZvTexWFxxbuTN2OMhLHE4g5WHyu3QKSW/KzaWB9vI/MVXdOGdqSx0Rj3zjWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H216FzBz17Bj for ; Fri, 24 Apr 2026 15:29:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34ab2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Alex Richardson From: John Baldwin Subject: git: 27a7b982ba6e - stable/15 - libfetch: Fix -Wunterminated-string-initialization List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 27a7b982ba6e008d10062de185ffd29fad8a8fc7 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:29 +0000 Message-Id: <69eb8c59.34ab2.63aa431b@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=27a7b982ba6e008d10062de185ffd29fad8a8fc7 commit 27a7b982ba6e008d10062de185ffd29fad8a8fc7 Author: Alex Richardson AuthorDate: 2025-12-16 18:08:51 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:39 +0000 libfetch: Fix -Wunterminated-string-initialization This defaults to an error in clang HEAD, use a char-by-char initializer instead. Reviewed by: emaste, jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52532 (cherry picked from commit 79f578531f21aa57307cbffd858a8a89e562aa5c) --- lib/libfetch/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c index f8a0517b6a5b..88b5e5a2f096 100644 --- a/lib/libfetch/common.c +++ b/lib/libfetch/common.c @@ -135,7 +135,7 @@ static struct fetcherr socks5_errlist[] = { }; /* End-of-Line */ -static const char ENDL[2] = "\r\n"; +static const char ENDL[2] = { '\r', '\n' }; /*** Error-reporting functions ***********************************************/ From nobody Fri Apr 24 15:29:32 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H243Vbcz6bSdJ for ; Fri, 24 Apr 2026 15:29:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H240w7Jz3Dk5 for ; Fri, 24 Apr 2026 15:29:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eSOUE7QQGgAP8i+IzhP4iI113GNNFfQmDsXaW120G9g=; b=izdOUJJbwsvlxqi7LVLpoqFYaAzCa9R2ZoouPv69mN/Kck6QgYlSytX9mh22Vnz89pxsz3 m/5E16KoErgOESzqqyKRb/KbAUARCW23CKx8g3uoOQ6gxiM5W18NCaGUyx5ki8bsUc5JSj Cim92BH+mjm2wCmH+Czmjt3JywNyQa3TN+O0kkPNfltFVbpDGGCj8HeOa89TmE0IaLrcgQ xWNbIIoqSY1DELevlb5CctR3W/HgbIkEMP48BTaE0o4XTPe5rSFn+TTLj5ueVL8f4v9KRM r7q+VRDfk9Z6ocn+zQND6Z7epUV58v4ufVaY1wc8r4HzmhmCwBWdb6WLy7hIWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044572; a=rsa-sha256; cv=none; b=nyeNjwHQVX+Q3uTpW6XiGqOjeZgOMlOAnLS2di6CcCKFnuNZQznxWcEOXdtNTN2Ki80hM+ cYPRHzmWhOMQNudmFDNJDoGAVobo8GrgkPBx1gQ6hsWoAieVpbnXJaxW+ph1GehkAaYUcY rZH6ZX66qp5gWFtVLJWhd0OPZMFh9emz0RYCTJkijZQKINjbrwyhJEg0cgCnbotdPVCN3N 1ocLnlxXP76bOTtK/oh/+8yTu7L+LNxXXRSO9xWUdI3X5aDT4ukxjBsZuwzYW6uH7mfVwH pVr1g8WSN1ZeElP4chW9lhvNLNiETMafNgiDIH4Z1JfnFWuYpGwEQCHrTyYm0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eSOUE7QQGgAP8i+IzhP4iI113GNNFfQmDsXaW120G9g=; b=yBXfnwzH6Myz5RPliQW5fTw2rsadf7XTMAmLaJzlQGfkjB9pQhi5zVuvuy13b48uMAxfSp nINyqNWyAK9sKHaDfDZwUhPZwlui79fXEL+eklGXW2k0Iy/tJTMWjJTP6z64Vh3KZD29RT 8rG7L5GHk4I4g/JYyDVfckwr5wAyw3FbyJ8Uo4oMfL4x8yLkbS+kh7u84tuTI5GXP/yOWt sEiBzoY1owCaxsJUTwKwM6SwlW3qULaHZMJS634MKAPu3SXrDczHuwqMvSmRXfhyvuo2KO v574S0F2ss5aLm5F7kIxifoHInjvWNz0T87ULODBa2iJly4WKhyz3kR0hkndIw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H240KmSz17nc for ; Fri, 24 Apr 2026 15:29:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 362e4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Ryan Libby From: John Baldwin Subject: git: 3a86c769feb9 - stable/15 - sys/time: appease gcc -Wtype-limits List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 3a86c769feb91a4b4e5817d07fa9eb62eb15b114 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:32 +0000 Message-Id: <69eb8c5c.362e4.19751ccb@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3a86c769feb91a4b4e5817d07fa9eb62eb15b114 commit 3a86c769feb91a4b4e5817d07fa9eb62eb15b114 Author: Ryan Libby AuthorDate: 2026-04-15 08:08:37 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:40 +0000 sys/time: appease gcc -Wtype-limits In environments where time_t is 32 bits, including the 32-bit library build on amd64, the overflow being tested for cannot happen, and gcc complains with -Wtype-limits, causing the gcc build to fail. Work around this by ifdef'ing out the saturation code on i386. Reviewed by: imp, jfree Discussed with: markj Fixes: e3799530b3ba ("sys/time: Add saturating sbt conversions") Differential Revision: https://reviews.freebsd.org/D56369 (cherry picked from commit 00dccc3164c6dff38350a1baeeea7238acf2efc3) --- sys/sys/time.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/sys/time.h b/sys/sys/time.h index 707565b6a6f1..6f18d8bd844d 100644 --- a/sys/sys/time.h +++ b/sys/sys/time.h @@ -355,10 +355,12 @@ tstosbt(struct timespec _ts) static __inline sbintime_t tstosbt_sat(struct timespec _ts) { +#ifndef __i386__ if (_ts.tv_sec > SBT_MAX >> 32) return (SBT_MAX); if (_ts.tv_sec < -(SBT_MAX >> 32) - 1) return (-SBT_MAX - 1); +#endif return (tstosbt(_ts)); } @@ -382,10 +384,12 @@ tvtosbt(struct timeval _tv) static __inline sbintime_t tvtosbt_sat(struct timeval _tv) { +#ifndef __i386__ if (_tv.tv_sec > SBT_MAX >> 32) return (SBT_MAX); if (_tv.tv_sec < -(SBT_MAX >> 32) - 1) return (-SBT_MAX - 1); +#endif return (tvtosbt(_tv)); } From nobody Fri Apr 24 15:29:30 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H231x99z6bSZr for ; Fri, 24 Apr 2026 15:29:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H2308sPz3Dht for ; Fri, 24 Apr 2026 15:29:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BAKujkfnOtI/2n8LAY7hBxCZbxvCnwkfNqzKPNmKt74=; b=KO0hPdJ37+eaH6pg5EGqKlMn0dRu15Z+GqQzsy2sakpD+GGSh73CmBvZRrbNzI2U//Was8 qmhc4BCHzqwdQHGDtBigjQAbLMi9wtW1Q6+bIutPlOrNdcIvTTN5sysuS8Nw6TWiu21XnK S+bOibbd2jfx+uUCZx3B7JNciDSnCYnkWL+xr1gnIOt1UUHxICSNDwB1afyWfGG6u5C/Dz XXvUngppxjLEbZuA6E2kb0/Jp4Pk7ccWc5qy4JZY9Mb2jQOEc1H0/RfqEHDMXMO58616i2 7fTbtLSuBwxBZW11K73PWdkX7CUwWjLRcP87j3XWyq8dveadXD70ndPP5tGqGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044571; a=rsa-sha256; cv=none; b=nXbTpLW6LFCduq9J2PeI34goG0Wz8YpHf0b2ZNcEqb89TBAxi7QfTHgI1fkoro6fsm5fB7 mKaSSwR2YqXjT2vkkmG0dlp8e7RQn+ICYyMhkQZKwgQ7fc8CKo3NBiPTJGaK9/vhyqg7lP y4ed6LyFZIJ/WbcV3H10Adm4Vqkv0juq5mjXt7S+q+irTlTYr99xtAfiGXlvdiVXyuL0IM fZHYvAWFJwXdbi6xyLuM0pIwo5Dody1HuPUq26q0xE+mAB+QRP/xf4O7zWRhtodVN6eHNK vH70R24M3+mZywnAZUxkMNxhZf1/Mlp/5lGh5iXBejPPhe/G4YNRdUorF5H+Zg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BAKujkfnOtI/2n8LAY7hBxCZbxvCnwkfNqzKPNmKt74=; b=ezE2Kp1hH4oNJxoGusTyEMEMzWxU6Fl6QukTwkNQJVoB/30ctbe2rnre4MlQaWMUBqDPjl zw8OND4owFYyoklTNpWqbmOZzi5ypPShUzRfs1DRVdnCDSJt8ZGGcq+kE21QQ9ZKdPD5vJ HXqaF9rfVURAzxcpEyHgvSnPkFm6J90dXDShT85zVYDKVgsS4rdSMcpR5UY1kzQJITechk OTVNzd1ELD5QoKBvSRThsdPoeRtuJMqraYnk680nUj2AiOysIAHkH+BfFm5Aexi1feAhvH K20YTbCBaACtw2qM+QkgAYRQoI98avsCyQtWNsQDPOKAS4wLSaf9LYh8cXc7FA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H226qRrz17Bk for ; Fri, 24 Apr 2026 15:29:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 360f1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Alex Richardson From: John Baldwin Subject: git: 9c4106c35059 - stable/15 - rtld: silence clang's unterminated-string-initialization warning List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 9c4106c350592b59874e8612458871025020df8b Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:30 +0000 Message-Id: <69eb8c5a.360f1.2b25d0ea@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9c4106c350592b59874e8612458871025020df8b commit 9c4106c350592b59874e8612458871025020df8b Author: Alex Richardson AuthorDate: 2025-12-16 18:09:10 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:39 +0000 rtld: silence clang's unterminated-string-initialization warning Since the initializer is used in other places where we can't just replace it with a char-by-char initializer, this adds a macro for the nonstring attribute (match the linuxkpi definition). Reviewed by: emaste, jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52535 (cherry picked from commit 86f325711c07b723b85c031d581d0a5c1a0964f3) --- lib/libsysdecode/utrace.c | 3 ++- libexec/rtld-elf/rtld.c | 3 ++- libexec/rtld-elf/rtld_utrace.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/libsysdecode/utrace.c b/lib/libsysdecode/utrace.c index 67ba86bfbf7b..8932f4b7e58f 100644 --- a/lib/libsysdecode/utrace.c +++ b/lib/libsysdecode/utrace.c @@ -169,7 +169,8 @@ sysdecode_utrace(FILE *fp, void *p, size_t len) struct utrace_malloc um; struct utrace_malloc32 *pm; #endif - static const char rtld_utrace_sig[RTLD_UTRACE_SIG_SZ] = RTLD_UTRACE_SIG; + static const char rtld_utrace_sig[RTLD_UTRACE_SIG_SZ] __nonstring = + RTLD_UTRACE_SIG; if (len == sizeof(struct utrace_rtld) && bcmp(p, rtld_utrace_sig, sizeof(rtld_utrace_sig)) == 0) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 8ae0685b02d9..29984e40b574 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -363,7 +363,8 @@ ld_utrace_log(int event, void *handle, void *mapbase, size_t mapsize, int refcnt, const char *name) { struct utrace_rtld ut; - static const char rtld_utrace_sig[RTLD_UTRACE_SIG_SZ] = RTLD_UTRACE_SIG; + static const char rtld_utrace_sig[RTLD_UTRACE_SIG_SZ] __nonstring = + RTLD_UTRACE_SIG; memset(&ut, 0, sizeof(ut)); /* clear holes */ memcpy(ut.sig, rtld_utrace_sig, sizeof(ut.sig)); diff --git a/libexec/rtld-elf/rtld_utrace.h b/libexec/rtld-elf/rtld_utrace.h index c14a62ddcb0b..dee807cc0098 100644 --- a/libexec/rtld-elf/rtld_utrace.h +++ b/libexec/rtld-elf/rtld_utrace.h @@ -49,7 +49,7 @@ #define RTLD_UTRACE_SIG "RTLD" struct utrace_rtld { - char sig[RTLD_UTRACE_SIG_SZ]; + char sig[RTLD_UTRACE_SIG_SZ] __nonstring; int event; void *handle; void *mapbase; /* Used for 'parent' and 'init/fini' */ From nobody Fri Apr 24 15:29:33 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H254ykGz6bSh6 for ; Fri, 24 Apr 2026 15:29:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H25143Nz3Dc9 for ; Fri, 24 Apr 2026 15:29:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D6Nkh6UoqvWgASuAKOyYDatdZ5oOzXeaU9ClgsEZOyM=; b=UoPjhowo2mDOICah2YYRJ/PtLQfSW8ij759hDd2nlViFPrsElLP9B38atOlVTXYiF9P5pj 6EukK8WTuZ5BFbg3SRaxNOszRboE0RQ8nhTwdhuM3OC75tZfm1E0zIJXfmguQG8AylojfU EJeka/xToQKdWsIs3J2uRiCRM7Y5rnFlrbjQJ8LLEPnuOzC1XPhqfkO/GYQvjUFILDxNWD fOkEA2Y4z9Y2YSQOeJUSb3LweizV1CwBLOvAJFzAFAOoiFR34qFr9xTQWnpoW9obcpzLu4 ebCilHS5CTbph3s9wwv2XA8gGRPbIGNM20GuLdkI0L32MsvIU5ek+iC4hNVuPQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044573; a=rsa-sha256; cv=none; b=bQgQHgSaO0oMGExMeUd5E4eJKMPsdIIzubzCqzimtLDEshiVYAhIMZP+QzBqvwRCNnzIp7 ycO0+6dBFZ5IulWppkGjbBYnBVvTH2LD0CZP5Vtlzrsa4bnXKLshH5d++yS/aL43PknpIN ZKM29mmvjw2TthDxeoWdAlUl0P8xur9bked8lMbenFPtJNDn02HuSC2jBpmoIfYVcRNh55 01pYPC3b6BQSST51TdKtUWbpNOlu1fKNk/m6FscmsM7UxOjpPkUCqU8Ks3UZhTPhNWfDXL Ux9Jl5pfkK0fjIN9EfiwaEOJVfuR3Y3IFPp8aQxcmiUHaSZGmPc8T2sT/upWNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D6Nkh6UoqvWgASuAKOyYDatdZ5oOzXeaU9ClgsEZOyM=; b=lG6+lE11VAG07pUb84dgjgaocrS9Mzrpp46JqltOfcci8s6frInn2R8UhlK1eE+8tp5ARR QrnZeNfi9x6lXbq6htEKGHZDRxvDlYmDJmQ+5ybKwuxYuWWBlp5d3ruMb4Ki+0m7hP1Gc0 gZDFpMWhcP8nb9cbGMS7cCDW7ne36dump+P2hdb8N+EEsMIIFYD6gqma+G4LLzvR41U57s Ec2Wp4kto/nIdV1IrRdp/Px1BgYtIJoDAjWFeQ4brYL8+JOFWy0mhbPXhFUU6qpPaoAdCi pgMfrqQG4K3UJsqR6ZgN6ccijK8hEjVFdgAXig80DtaUl3eyGeh+7X/TcafdAg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H250fycz17Bm for ; Fri, 24 Apr 2026 15:29:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35b8b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Mark Johnston From: John Baldwin Subject: git: 3b0fc4472aa5 - stable/15 - bhyve/slirp: Avoid a nested declaration of environ List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 3b0fc4472aa5e147ebad6d4bae5e001ca6a4b415 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:33 +0000 Message-Id: <69eb8c5d.35b8b.71c71e6b@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3b0fc4472aa5e147ebad6d4bae5e001ca6a4b415 commit 3b0fc4472aa5e147ebad6d4bae5e001ca6a4b415 Author: Mark Johnston AuthorDate: 2025-11-24 14:08:21 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:40 +0000 bhyve/slirp: Avoid a nested declaration of environ Fixes: 0e62ebd20172 ("bhyve: Move the slirp backend out into a separate process") (cherry picked from commit bac572b2b1c9aec0ebfd3ae1fd02b314984cb716) --- usr.sbin/bhyve/net_backend_slirp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/net_backend_slirp.c b/usr.sbin/bhyve/net_backend_slirp.c index f565ecaee4f3..6084ca31966d 100644 --- a/usr.sbin/bhyve/net_backend_slirp.c +++ b/usr.sbin/bhyve/net_backend_slirp.c @@ -76,11 +76,12 @@ struct slirp_priv { uint8_t *buf; }; +extern char **environ; + static int slirp_init(struct net_backend *be, const char *devname __unused, nvlist_t *nvl, net_be_rxeof_t cb, void *param) { - extern char **environ; struct slirp_priv *priv = NET_BE_PRIV(be); nvlist_t *config; posix_spawn_file_actions_t fa; From nobody Fri Apr 24 15:29:35 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H276bJbz6bSVg for ; Fri, 24 Apr 2026 15:29:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H272Wdkz3Dg5 for ; Fri, 24 Apr 2026 15:29:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s9+USUIpV5Br5pa7noLnHMU6cPOkSGNy9wbjWNhVSo8=; b=Ts2OPCeKa/7cjLQ7DgSIVnWmGO+PXgBC7qNefTxI6prx9mTRJD52nSDBrPiRDGZiCjyCSD UgrY0cWiA+Ga9tjOsXgEdwgYFpaETXi/G640tSJZTZzr6QWhmfsu5DEWaRfQqLs3u6D/DG ELefLcjBdNBWjuDbXZITXL9EGxnvv0waaYF6qR+JwMQIZsRGU2R19eJm7GrmJ9tLPsjfql uODxfzravUb+6ijqFvTs/i38URlJ4HtPPQ3C8uFQsdCwwo/jOwdZToTGQkAClMCxfXD/EV GQ/Q3cqQwrOr0/VHNAxXEZWUoyN1u7/pKZfhwv2p1GMFJfBnkrzi3/Ba+JU6Bg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044575; a=rsa-sha256; cv=none; b=s/6gI60ihjakBmDfNMxRI+IE+dQFIe+mJWbPFQ1jCAcdRap95wCffQi0GLxNMTh8raRQup Smiau0c226gEgJwKrNggxu5L/P0EPbu9gY3KXxVglFQ4hndGU1CLL69HlN613H3AbulBLc wgpqy27QraTFovm4JZBQNYJPaem0Kxv+NM7WMDi4uY6EWlocEVV8z1O3zJnoy1D5BALeMZ NTtK+RnvJp6+lEIvcRWhg6q6gR6FO7Dmvv8axjsfWIp08KjGCfO0mrWS/49W1ZA9C0CfAO X/Jv9iym/AB5od1Pq2dBRp0j7VekJg1yxIbTsXhqEyRiFLnzCIs6J3wzKXYX/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s9+USUIpV5Br5pa7noLnHMU6cPOkSGNy9wbjWNhVSo8=; b=PifnvwKUWNKHnsUHHmoxhCcI9TTGCJs4Dfs5UDNUd29jqnwq6KO9Ggv01KbrvV8btrsNb+ WHUSdovEWILymNjzNZi0a9aH2PwakbRNIhLas5WYoJbH9Av8QRKrQsxFYB27CdQ3KCfR7N kRSrj3xqpoH9fuAZ+Tr9W0yHkWD3DX8jkzYjip7WdWPBYpbiMKXtHSDZmZnXFyCj2eLmKB JPzN4X4yH6OvwJck/IvZ8QWeGiE948mSVgBkWQRRw63J0OrjP2oUt564eB3YFVDXEkal/u ZzFUDHw6AWzH4rxlh0rrt8ZPv+iEG15ORGqZKp7pJAFl/jfKPV+waSQbo5itYA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H271yj6z17Bp for ; Fri, 24 Apr 2026 15:29:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35b95 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: bc28aaff6078 - stable/15 - Makefile.inc1: Don't mark GCC broken for riscv64 List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: bc28aaff6078ea07ecfd44cf34328727c6f272c0 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:35 +0000 Message-Id: <69eb8c5f.35b95.6ba14337@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bc28aaff6078ea07ecfd44cf34328727c6f272c0 commit bc28aaff6078ea07ecfd44cf34328727c6f272c0 Author: John Baldwin AuthorDate: 2026-02-03 16:56:44 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:40 +0000 Makefile.inc1: Don't mark GCC broken for riscv64 Reviewed by: mhorne Differential Revision: https://reviews.freebsd.org/D54969 (cherry picked from commit dbe9fa0be1d627522a532160f6f8780701b86c72) --- Makefile.inc1 | 3 --- 1 file changed, 3 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 79eaf94fc9ff..8d8d8cbfe931 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -183,9 +183,6 @@ _GCC_BROKEN=Missing atomic builtins in libc++. .if ${TARGET_ARCH:Mpowerpc64*} _GCC_BROKEN=libsys.so.7.full has a LOAD segment with RWX permissions. .endif -.if ${TARGET} == "riscv" -_GCC_BROKEN=boot code linker script issues. -.endif .if defined(_GCC_BROKEN) .warning Target ${TARGET} is broken with GCC: ${_GCC_BROKEN} .if defined(TRY_GCC_BROKEN) From nobody Fri Apr 24 15:29:34 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2H265R1Bz6bSS3 for ; Fri, 24 Apr 2026 15:29:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2H261jFfz3DqM for ; Fri, 24 Apr 2026 15:29:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SmMDL0kh1GbnLIxwuoqH9e33fZNcjuF+sZUZ7QCIsGM=; b=Ogk+BKBcwNpDGsBQTkfYkWUonxu7mgFTO9A+6cWsKk97JYAzGmLJFTWW/1PrgWAmroSOev xd08LQH9e9/MDwtXCqLRI+X2yKptXTpBvJF/4RsffM1cDTg3oDNI39p18mCCEgYtP9f7or pFXow2CN6m67mQu+CdYqIg/y0tG/85HEgaaKrt09fWjGCW/Pk9rzDtLXqayOhh8pq97tGE xWj6ddSIDAwcdgvOTHR3uXzlUgx3Na2zjvyA1IQA+5NIvxSWPn7Tn/eVTfuwTijfAqpKdW wbAHxVpAHHWQBWW/jCb9p2GKwwP8WGUDcYgQLmmw72H9T3yiIBhadVJ0mc9WLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777044574; a=rsa-sha256; cv=none; b=wDbkP/PmlQT2knMnuSqZm4bFxvM0ItwuP3EEAICJpW6XE8flRqfU4IJSwgAFvUXRk+Dvsd txQdOxWi5QWr7CBmw6CcEb1jjzcBpt2ZiUHrlIwHBvpQ76h9JV1DdIug7nkaQOZlqbdoWN 72+scd5wHqynhpAS7CdMlTk0+lcHppwaYj2KbkNFzysGyMgwPxP9uoP/C5IHQas109sp4S vChPP35F2IDrOrp4z1Kevnu78S0/8qXTv8GEbDh9ZBaPpg/qvO9OL2mEeT5kHI3i+xErdv TMpEvgnLGpNBz5RXO9G1XG5l6sj76w/o6vO6tgZNAlW3HnBB8UA5AZXJRUxnCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777044574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SmMDL0kh1GbnLIxwuoqH9e33fZNcjuF+sZUZ7QCIsGM=; b=vf7SHJUPKqPWxA3oaFVBbPqQiKjdZVAG/o5pkVtDzOqjhid4KleZx4oKoPNf63EgZ5Pzib yN+IZrfx7nWSdwaH9al/cEHSYtcIkD3fuf+aO/HUog91yTqjUx8WCtsWfIyBODdU6n5/wa XEkL1G32N93VEo+8SSnydsIIRNElA9/iMLL/kekmWp1iEMbVRjgne0oB4WY+A6X54a7yIV zeIEQbFF+gBGW1eP3tXb43XoCC0I7pilL91ZwnsWDC1D7nubmWEttPAVH9nQwC0eK5lNPb K/rLYKoyRiJ63CeaLi4JTbEwSy/MAvFB93ibk/4XshE3+0VMGOND3BraRvNGqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2H2619zBz17RS for ; Fri, 24 Apr 2026 15:29:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35b90 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 15:29:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Ryan Libby From: John Baldwin Subject: git: 7a2de8121a2f - stable/15 - tests/fusefs: appease gcc -Wcast-qual List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7a2de8121a2f4779eb5d22de3611fd95af17cc88 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 15:29:34 +0000 Message-Id: <69eb8c5e.35b90.5ee569eb@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7a2de8121a2f4779eb5d22de3611fd95af17cc88 commit 7a2de8121a2f4779eb5d22de3611fd95af17cc88 Author: Ryan Libby AuthorDate: 2026-04-15 16:32:22 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:26:40 +0000 tests/fusefs: appease gcc -Wcast-qual Fix gcc build error. Reviewed by: asomers, kib Fixes: 7e68af7ce2c1 ("fusefs: redo vnode attribute locking") Differential Revision: https://reviews.freebsd.org/D56370 (cherry picked from commit 0c09c6527b16953d355125bee7a839f743a39dad) --- tests/sys/fs/fusefs/rename.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/sys/fs/fusefs/rename.cc b/tests/sys/fs/fusefs/rename.cc index 385f26953aae..d518071ca681 100644 --- a/tests/sys/fs/fusefs/rename.cc +++ b/tests/sys/fs/fusefs/rename.cc @@ -239,8 +239,8 @@ TEST_F(Rename, erelookup) _) ).WillRepeatedly(Invoke(ReturnErrno(EIO))); - ASSERT_EQ(0, pthread_create(&th0, NULL, setattr_th, (void*)FULLSRC)) - << strerror(errno); + ASSERT_EQ(0, pthread_create(&th0, NULL, setattr_th, + const_cast(FULLSRC))) << strerror(errno); ASSERT_EQ(0, clock_gettime(CLOCK_MONOTONIC, &timeout)); timeout.tv_nsec += NAP_NS; From nobody Fri Apr 24 17:55:49 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LGs6W6Jz6ZxGm for ; Fri, 24 Apr 2026 17:55:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LGs4QZLz3py2 for ; Fri, 24 Apr 2026 17:55:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Bhl7h6VJko/scO52WkekwKNYaYRg/HdEGMbkw/nOrNQ=; b=RQER0MDNtlNqsqY3Db6NG+uVwOYTKsSCSATwtU3VN44HcgJwfxotJcmqW6uS/oBxwgyrV+ Dtan3+INQzIHJqKuQ0JS0g22Y0nhxzJeGpkCpbguzEN2q2h9GZ6/J/2ZQrvHQV1oSkfhht YvqQMWBDtgsEXptfMVvFGWuv8LOjOeGh8GqJnJBSQoA7GsCzT+EbmreBzRc9S216FBiSec HN0JY7Uen+/4QRf+PNvZM62ZZKoCa+yx2oBxflgyYXYszfeZKFuRwrqEUg7DMgcx+RNdE1 4BRjvjIJq34fDZzeW3zA+w3AFGI+iftA0Xyh8FkbQgOlyR4rznJHjRfKnEI99A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053349; a=rsa-sha256; cv=none; b=J+AgHQDGd9NE7HnHTZidTPdkNoYo1tIxaFQCMqXv6eahDglsLbkGPYWfeuSfNCCuXpgvDy v84t2rPvCKZGDoHssjxi932dCe2KR0VCr+fSrbQP2GQ33EcMsyzNWDj54UQXnvtRQjS6+d ne+prFq9p5Xk+HdpxD4v9PJOjwdT7POBs8KtPG7eLypkQWYmTjNr7k0Pp2j4H3LAiGxIBv 9HgGaQRRN9/ASW9Xpf8ltNqZsB/wezfyjKmawnupNE9hi0jL8RaqYHTs/OGFxF/w+AHvtW pOwzBOdSgHVeqdt80EB9xSgQ+T9gXXwKBjpKp89YaiQITt/0eTHPUnSlKqFCGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Bhl7h6VJko/scO52WkekwKNYaYRg/HdEGMbkw/nOrNQ=; b=JXBVW0BMjFA9jQPUzNEVYLH7LKlZKcjIFRvw9tgPEet5+tmbKNlNUh9g0aC4oagSrfYYbN y5B3G2zzEmlfehPZb04cZ6e6c0xfNNj58QbihPyK6yZVEk4VadjyaJT3hjuAdgZ+lVikOJ ZmR03/qFmojJs0eM7Vb1Eg4fEJe8+bWWOLpNQ1rn9+g2e+Co++Sdw59Y5J5s31/J9bybCF a9KMMxSNR1MKNz4kWoOoqYcE0lFEcka7w55SbNF4poAvpboZtAXHK7WZl1bcd90mYM8IBc IB+iTTClvBkiFf8l3wOHFrdgxo6LljjTBmWYAfGAGapgx69JQ7N8347BQ21P1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LGs3lQ0z1CLx for ; Fri, 24 Apr 2026 17:55:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e6e6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:55:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: b339a4a042f9 - stable/15 - spibus: Don't leak KVA when freeing a mmap region List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b339a4a042f97cb5bb334f5551703cc5a475af18 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:55:49 +0000 Message-Id: <69ebaea5.1e6e6.4caa12c0@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b339a4a042f97cb5bb334f5551703cc5a475af18 commit b339a4a042f97cb5bb334f5551703cc5a475af18 Author: John Baldwin AuthorDate: 2026-02-06 15:30:26 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:32:19 +0000 spibus: Don't leak KVA when freeing a mmap region Effort: CHERI upstreaming Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D54837 (cherry picked from commit 06fd19b5349a1ff27ef338619fdade596986fc2f) --- sys/dev/spibus/spigen.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/spibus/spigen.c b/sys/dev/spibus/spigen.c index 66c93e927281..39b94c6123fc 100644 --- a/sys/dev/spibus/spigen.c +++ b/sys/dev/spibus/spigen.c @@ -283,8 +283,10 @@ spigen_mmap_cleanup(void *arg) { struct spigen_mmap *mmap = arg; - if (mmap->kvaddr != 0) + if (mmap->kvaddr != 0) { pmap_qremove(mmap->kvaddr, mmap->bufsize / PAGE_SIZE); + kva_free(mmap->kvaddr, mmap->bufsize); + } if (mmap->bufobj != NULL) vm_object_deallocate(mmap->bufobj); free(mmap, M_DEVBUF); From nobody Fri Apr 24 17:55:50 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LGv03vsz6ZxBy for ; Fri, 24 Apr 2026 17:55:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LGt4WnLz3py3 for ; Fri, 24 Apr 2026 17:55:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nSZRb9uIiZ6+KFtYOIaZcK9sL+TYl94aTyELvrois3A=; b=Fq6jMDlzsq3+XPFczyqL8AgUaf/tpc7qs5s2HVXVh56QR3R6Au9UXre98FInASOu9W0IHb eDoTv3A6rM1J7ruP7x7eR6Sh+/V9jWWfRdhf+rAn+DE5kcx+w9K/SWEZmN3aLnBOVFFxTL D7aD5wByBAvWLiYpYHdNGbnLlhjlNBhFrlpsIN7pyvtAmot3v6dmGq3Kxis+5Pf+q8gnLZ cYRuGckgl0P1sHOvR1BiWbiqdX2aAhDSzbrtwWAoYMmPjVRjQHcyZdpvVaXyCoWsp4ZPhD zU2qSTpbD2l1AmKyQqsLUTiFsWc4ESbn9Wtu2e96f34hIc9cOZqLgJPXiAuwEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053350; a=rsa-sha256; cv=none; b=WosFtBlIjJOOS8xqzq/v71XhMRKcpSJ3GplAswhVKid6XvScla9Yr3IcAbuoRABITeGX8d P8qxwWeFhiKM7mzcRvb/bKFd2Rv6UcLBTa6bhhMp138i6H7waKbOT4MyPDL1ZkjX3kwwLU M66OXv5WKPuuAiTZne4ujrNZyK4LEWbolPVsmPydVo1QK2E9HQetduG4+vVSMvcIzNgMrN ZJ4IMSS5wxRCqgPjgNKOd0NctvxQhbzj5sPOl2mga7cTfznNGjwqlqAkAblEQRWWbi385B diq2YTb6JZAXi7r8Qv72lrTht1QCPSakQpVj23X1XBscS6QqdHizOxf8YEvWPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nSZRb9uIiZ6+KFtYOIaZcK9sL+TYl94aTyELvrois3A=; b=dkZyYVTI9hqieY7v/zkP6cLRB1OVpDEThdysjxBXAYIEyurO5Ka95KNXU6U1wHC54tFlqR GcRJFhp3XWVfEeTPM6bGb+SLPWlNVP0XGwk6WY2j/wi0HqfXMpwdSXJjiyLWuregQO7lHs x2ZJCyXId3MLK6XwKw4Xjs0FS9sN2XMMc9vAhfsZTvcuL8pY1bzKGdXB2POvI+hrNMWazQ rFhoU8yN14i7FiGnC/9LJ2W0bL/8jqA1jV37/EzzsyDmJcZRxYrWKviIfBxPq5UDDflQOi f0+AvMSgg/Y36cEG1RywiHfya747i/IogxXKmduwtHvM0tzURtyBpH19LOgIzw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LGt3yFrz1CLy for ; Fri, 24 Apr 2026 17:55:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1cfc9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:55:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 42107129088c - stable/15 - universe: Bump default GCC version to 15 List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 42107129088c62a6006c3f365a7b090108cef86e Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:55:50 +0000 Message-Id: <69ebaea6.1cfc9.7966c2c7@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=42107129088c62a6006c3f365a7b090108cef86e commit 42107129088c62a6006c3f365a7b090108cef86e Author: John Baldwin AuthorDate: 2026-02-06 15:32:58 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:32:34 +0000 universe: Bump default GCC version to 15 Reviewed by: lwhsu, emaste Differential Revision: https://reviews.freebsd.org/D55085 (cherry picked from commit f73101fabc74255d70f4e7ce0e71f0f6655c51ea) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index da4bac4673fa..4a98f9d539b0 100644 --- a/Makefile +++ b/Makefile @@ -546,7 +546,7 @@ TARGET_ARCHES_${target}= ${MACHINE_ARCH_LIST_${target}} .endfor .if defined(USE_GCC_TOOLCHAINS) -_DEFAULT_GCC_VERSION= gcc14 +_DEFAULT_GCC_VERSION= gcc15 _GCC_VERSION= ${"${USE_GCC_TOOLCHAINS:Mgcc*}" != "":?${USE_GCC_TOOLCHAINS}:${_DEFAULT_GCC_VERSION}} TOOLCHAINS_amd64= amd64-${_GCC_VERSION} TOOLCHAINS_arm= armv7-${_GCC_VERSION} From nobody Fri Apr 24 17:55:52 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LGx5G33z6ZxH0 for ; Fri, 24 Apr 2026 17:55:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LGw64pkz3pjn for ; Fri, 24 Apr 2026 17:55:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/5/+rN/AE8F/Iz+yuajDTKt6hPbiM5VGcmMF09wOopQ=; b=BXWTisLndET5gGsc3yIlshPrZOqJwblevXso+rTGWdwS95sOrQgsprygPQJUGKWufXrIBW wS7wJhcCDf0TS+x2f3R+Qjquk5U29SZlhZJt/gbsBrvWYSecFXSEUNCPKod6YcPU/0xPjB 0A40WEOTd86EEiKyny+W4FHfHrbbwiDwXeWio9vGBmXBumy4t+UJyzjjVHjin+4Aih//mP MOm603K3mPlfMZKaF8QtSPghbMfTVp5O0w5zUjUzUzBDJC1ej0Eif0jZBuH7YzPJYulat3 iG7X+Sw4EAOD6jfizlfq06oRxKhy3/wqkJrYdcQI6/lBhhDymo809xohTfNhwQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053352; a=rsa-sha256; cv=none; b=q/HVANrhbs0etvt+CVmZ6mN2ZKk9FLp1uKMXTL40KH5U+TQuR+Ckn/VTUb7Kiiksenm/Vu Fg4R07xtCGud9gjJ6xYqVrek3t3WD8dBCrdkzRzs/AglFOzVvuYup764BU3AEzsmxrq5kV DlfkipceNaqQcfMNlWibYqJJBlu0ZOxAUbAZWFP6n1AS+0B4fjLWgkGb6N5+OjM0Qkb98G SYK4elhW6bduB7A16hngsfzhCREO0/lli37CpRxb3pNz8tuIfLYDD5J5LxBLkpoFt/6sbD XvZkHnuCkHvCN6tTIuXuWEcmMhnqQH7ndq3GrWv33/Y9vrBLT/hrdOHgzgmg1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/5/+rN/AE8F/Iz+yuajDTKt6hPbiM5VGcmMF09wOopQ=; b=be83BP6so32p+lvsEN+9IB4NDbChEVJDEu+Et5hQHNYcUberAuhg9vbuiX+lGNJiMo5gEg qzpqJT3qCY/LZhYQW2qfKU6/Rw8GRLwyLAE7y8YPQLNClEhHz2JR9GmfGZ7Z0d+V2ZXSc9 IKMV602/1nblJsTZCp4MnVB0XxjBkl6QeARqbuvn+D4Crzr2VLLggfcCjVLK3KeT+vZtIY PyKZcfvios8Hfl33YX9LCORt7baX9eQOP7xY3oaDWOQYOFJKxy7SHbzonlLejJ9R3MJRC7 WlEtcaIr9dvGBdoXEvtQhHMlTlbrya/ueCFnoE83uY+UUeVrjyaDtDNMfdx49Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LGw5QjZz1CYw for ; Fri, 24 Apr 2026 17:55:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e131 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:55:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 2df675298a99 - stable/15 - sdhci_fdt_rockchip: Move ofw_bus_status_okay 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2df675298a99cb7c77962e6a13f8f01de50aeaa2 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:55:52 +0000 Message-Id: <69ebaea8.1e131.563b5c28@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2df675298a99cb7c77962e6a13f8f01de50aeaa2 commit 2df675298a99cb7c77962e6a13f8f01de50aeaa2 Author: John Baldwin AuthorDate: 2026-02-09 16:27:04 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:33:06 +0000 sdhci_fdt_rockchip: Move ofw_bus_status_okay check This fixes a warning from GCC: sys/dev/sdhci/sdhci_fdt_rockchip.c: In function 'sdhci_fdt_rockchip_probe': sys/dev/sdhci/sdhci_fdt_rockchip.c:120:14: error: statement will never be executed [-Werror=switch-unreachable] 120 | if (!ofw_bus_status_okay(dev)) | ^~~~~~~~~~~~~~~~~~~~~~~~ Reviewed by: bnovkov, imp, emaste Differential Revision: https://reviews.freebsd.org/D55158 (cherry picked from commit efdd30c94e0ac4007b52b6f40afdab52fecf2aa5) --- sys/dev/sdhci/sdhci_fdt_rockchip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/sdhci/sdhci_fdt_rockchip.c b/sys/dev/sdhci/sdhci_fdt_rockchip.c index 44a5e2ffe271..79d299f75fb4 100644 --- a/sys/dev/sdhci/sdhci_fdt_rockchip.c +++ b/sys/dev/sdhci/sdhci_fdt_rockchip.c @@ -116,9 +116,10 @@ sdhci_fdt_rockchip_probe(device_t dev) struct sdhci_fdt_softc *sc = device_get_softc(dev); sc->quirks = 0; - switch (ofw_bus_search_compatible(dev, compat_data)->ocd_data) { if (!ofw_bus_status_okay(dev)) return (ENXIO); + + switch (ofw_bus_search_compatible(dev, compat_data)->ocd_data) { case SDHCI_FDT_RK3399: device_set_desc(dev, "Rockchip RK3399 fdt SDHCI controller"); break; From nobody Fri Apr 24 17:55:51 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LGw539fz6ZxPx for ; Fri, 24 Apr 2026 17:55:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LGw0Q2zz3py7 for ; Fri, 24 Apr 2026 17:55:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jcxS0ZZm0LHy9uunIJuHbLdzyL8n/1NCBrIw1mk3QPA=; b=lt0NM6SVpw/qtgesnpo5/lYSflajaSEm4cQKhVcrIbLaAk7sBvRzbfBmrf6fqCoW+vw17/ 0bAy2568IFbNTfZk/PvBJ7XffNB9tmBNz7m59Bb/6u+O6r5nd5Ko36tVdt6D/qrzLsy4fw kmtkl1N+NBjSoUzIOg0b3O8FYPdttxOSMYSUJPZ9pV+/iwS7MKAesDvTJ8gr7TrCVHF0ux P3w4WcRGC5AITeLTRJciGgpgr2h0vxhpbDXCxFN1+0obSI/phfweWxcZ9YhLyp8vH9YCQp 5n5oqFgkO/QH3iEGqLCzr7WuVvwyIU1/zL4nXmsOqbLc7UsbEtDx4wl9J1BGSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053352; a=rsa-sha256; cv=none; b=fcJ3sGb7YLLvgnqht24w3czIZP3rCbet4IQJG99qYI85G3ETnprAln808rt4V40WCWSDpG wA2dtqiml6bXgVM6bUMLrccb1MJD/5RXGPYm4bpXWHR2zcPslMg9jgq8gPaYqfBVADRu3Q T2eL13PqtWBUaUexMT9h+9Z+wlPvgXu1XaEhP+iNr+lg4lbU0hF+LaicXTWyINLpG8+5/e PEuIkiorJKDhQRU6MZSUi/wSq05A5J/+wt5IWvCCtebTAu5QAquKZmVRXEMRjUXaWuBk3o ks9M+KOFSPlJi0ow/kIw2Akfgdbz85b1T+Qwn+vSnJH1aorXB+aMK9Wc63OinA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jcxS0ZZm0LHy9uunIJuHbLdzyL8n/1NCBrIw1mk3QPA=; b=mR2hmxkoFew7d45Ln5iPNZreYiLZs2JDMekKALsj/0HG1CKo/9oZxgB66WMgQewMlRoOJ9 wAFbU40wgD+2Z9Mon9zFWt6h18Kvg6KidBuSi3TLtw3hGpmPvdMo3JuqmAQAGFdtd9w3gW Q2dBU8bCZ/0aIHU+bq36aAamhh3ph+uBF3ObojU1LUMmKOraSyXi6CYWzELh9mhdJQfuhY H9+15VcQTV1LUVbfr4nGIQH4FnA89pvyZptl5IFA9kHRhLwD0xsU4H/EPTXpFWmITEOgyE LACxZb0h/mgRtbvd5Ctz5Opjh+jVrl+gb3Py2JmH57+kPf6nG1e/41cgVCWjnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LGv4fGwz1CYt for ; Fri, 24 Apr 2026 17:55:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1c464 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:55:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 1c7e291da65a - stable/15 - libmd aarch64: Use ands instead of bics to round down the length List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 1c7e291da65a1dd30edc59e6ecc4b5bdc5e49af2 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:55:51 +0000 Message-Id: <69ebaea7.1c464.5588ac6@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1c7e291da65a1dd30edc59e6ecc4b5bdc5e49af2 commit 1c7e291da65a1dd30edc59e6ecc4b5bdc5e49af2 Author: John Baldwin AuthorDate: 2026-02-09 16:26:29 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:32:43 +0000 libmd aarch64: Use ands instead of bics to round down the length GNU as does not accept bics with two register operands but instead requires three register operands. However, clang assembles the bics instruction to ands anyway, so just use ands directly. Reviewed by: fuz Differential Revision: https://reviews.freebsd.org/D55155 (cherry picked from commit 244f498074b5574d18d4518583863580498b8d3b) --- lib/libmd/aarch64/md5block.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libmd/aarch64/md5block.S b/lib/libmd/aarch64/md5block.S index b928c8dd795a..297db7f6bdbd 100644 --- a/lib/libmd/aarch64/md5block.S +++ b/lib/libmd/aarch64/md5block.S @@ -134,7 +134,7 @@ d_ .req m5 stp x23, x24, [sp, #0x20] stp x25, x26, [sp, #0x30] - bics len, len, #63 // length in blocks + ands len, len, #~63 // length in blocks add end, buf, len // end pointer beq .Lend // was len == 0 after BICS? From nobody Fri Apr 24 17:55:53 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LGy245Pz6ZxQ6 for ; Fri, 24 Apr 2026 17:55:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LGx6V50z3pjq for ; Fri, 24 Apr 2026 17:55:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aI59UxBckIgEdGXkOYxF5VJd4qMOotVSAx7R5rAoW6g=; b=p8KW6SVxOIvvdOcKRETZORTz0V/NxT7sNZ029r561YDmrbJFtCIYy7WrPdatlRHLQYe5gR QQqufmNuoPlp0cg20lZMnyVKB/qr8+7RfbpfwxmNwwIKsYP4VwfI38yRtk/BXjBP2vtjBL GM92N9+tY5ZpT/1R+z306x388wii+hEN4ejNWsFCQOpQjWp6SRCNMcCYpvcr1208WtoQve +zN9fNhwh/9iJHQCc2y4O29vhjOKJeLZdb4p+1ZKLlLwaLYX+rPv1Urs2/y4fpwTJEkWVw yhA3DaMfkiZW2NlvtHcV0Jbq4w/o+7LvBE9eds5AYUfRdwHeMFHhJRbSk8FOoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053353; a=rsa-sha256; cv=none; b=dTBymqktoaeQGpxWit1DQ7G5CL0iuwxfAM5GUjhOhcbvybKWFTSqya/L+XkwLgEYvxGBVv f7T8Mz2/cHpXf09JpIHnwMB/M/sAkN5+LYlB7YHpue3kA68bm0WeY0bhh+XDb0jSm9ozrj 5ELi8sMITXvIuXHKCdRa+q/pDIDTmGMW3BY3U0RXc9VrDz9mrlJX7wvbiFPG/idFhxxyqZ fJLTJQD3I/tL/fu/My/l8PJrZNQYqdYrnPOxjAjB0991e55UFKUkgCESsiC46xa4m8vnC5 /NxJwqnE6RPbKjhZpgF8lmyd2R+8kj3rXRijLHXhzRyoyKKI9KfZqjW27CI47w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aI59UxBckIgEdGXkOYxF5VJd4qMOotVSAx7R5rAoW6g=; b=jweqIffmZfR8Lv2I2gZ38k+ZhN8KzrhweOtzGUjDd0gn5MPOpIJosmo5VIcG1/0VZ+k6ss H7jej98U4c5UE6GGB1q8Wa3UGUgdbIQ4udX9J82m1KrAWEsq0QgaqnYF6Cx/zt2gRkl7J/ josC5eLV3og8/dFHGBM6zPqoO0/kfE7+UTBCSoq8eD2sjCetRb7JxYExQKAUvHQkYUR4Ru W5ERHoRgOV3PJn4Z7hCvMdyEruQz+UF3jz7IqMUXAz3Rl4MvKb1D/3qEUKiS6VgIVffWaH g4KwyKg/GZ0doKD/xfa/MM9k14lhPjamYQ8TcHHnWmAR7W26CLUzEVuMEil0xQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LGx62cJz1CG6 for ; Fri, 24 Apr 2026 17:55:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1cbcd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:55:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 06fcab1f02fe - stable/15 - sdhci_fdt_rockchip: Don't return 0 from probe routine List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 06fcab1f02feb2614751f875b18af9f1ffc2cbfb Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:55:53 +0000 Message-Id: <69ebaea9.1cbcd.52203e15@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=06fcab1f02feb2614751f875b18af9f1ffc2cbfb commit 06fcab1f02feb2614751f875b18af9f1ffc2cbfb Author: John Baldwin AuthorDate: 2026-02-09 16:27:23 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:33:21 +0000 sdhci_fdt_rockchip: Don't return 0 from probe routine The only write to the softc is a no-op (softcs are initialized to all zeroes), so remove that and just use BUS_PROBE_DEFAULT. Reviewed by: bnovkov Differential Revision: https://reviews.freebsd.org/D55159 (cherry picked from commit 3f18463745c9c75e1fdcfacc710799838ef5c9d9) --- sys/dev/sdhci/sdhci_fdt_rockchip.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/dev/sdhci/sdhci_fdt_rockchip.c b/sys/dev/sdhci/sdhci_fdt_rockchip.c index 79d299f75fb4..2d0ade8055e7 100644 --- a/sys/dev/sdhci/sdhci_fdt_rockchip.c +++ b/sys/dev/sdhci/sdhci_fdt_rockchip.c @@ -113,9 +113,6 @@ static struct ofw_compat_data compat_data[] = { static int sdhci_fdt_rockchip_probe(device_t dev) { - struct sdhci_fdt_softc *sc = device_get_softc(dev); - - sc->quirks = 0; if (!ofw_bus_status_okay(dev)) return (ENXIO); @@ -130,7 +127,7 @@ sdhci_fdt_rockchip_probe(device_t dev) return (ENXIO); } - return (0); + return (BUS_PROBE_DEFAULT); } static int From nobody Fri Apr 24 17:55:54 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LGz6F5sz6ZxS8 for ; Fri, 24 Apr 2026 17: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LGz0KJkz3pgV for ; Fri, 24 Apr 2026 17: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=1777053355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PmWlG6lUTjur+Cvwe/UtVYOCqFU8S0nUnsUMdeQTUjM=; b=PU2BPsuVi+wrON0KYQMdoKFTqszvNEBrOr5S+53WL2WT757OA3Si9PQmQkIVjyhSLd6Nky 7xo5X88picF4SlBB08ZxQSiOElJ3+kKacorALy7C0OcR4aMyj10xrzLGuPo4xrqc1vO7U8 EwU5dc545vG4WdskVg5qH2VduZEsKogwqjelSzw85nQPQM86LG+v2E1tc9X+vNIdPAAjXh F2rVloGwiTjK5yBsDNyn/7vsWNVy6BQ6aCrK1n5ifhiD5l5MONT6bSGHhwq1xhAVGlqKzm qscyKJLGxXZMs4REGDPzRdqLy4d8H6L07Ls3vtRaGvg8d2jtxAIXqd1N6amtHQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053355; a=rsa-sha256; cv=none; b=Tm/AECaQbg0qmRbDHBpzLNbzorkbOMGc/hTw5R7BwbJSCCd6Mc2Q0d1tTg0/R0lfEUPm4x dLCKWqLH+n2odVPWLmA242wdxu5EltTLia+pE8y4XnU70uBk2pKnWJE1vSp76qT0vxnCl7 m6zbI+Mr0rLzorgpBn5MqZRYZqY0WIxHSiFQjv4OgNjdrzahNgTY9Y17WT4VPflxlCqyQJ gEsXloNu2s6VTfMhfQ0j/y4fSyJ1b0XA99IkgGD31PDbcYyONsC1nQmjbrGx7D5yNfEEhd DMZS4PEZyAcKINwfNU26vMZVOoEeaWV0+BTU0bWDxsE7gYsFbT4sh9kh6Cqllw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PmWlG6lUTjur+Cvwe/UtVYOCqFU8S0nUnsUMdeQTUjM=; b=EUERyc8RKirR3gxdcPEqPlMKqspCz9erFBerQDlaWpzDNQnP0i5PCPDpCGgig+m3IfWp9V cYFJ+M4cjvcIauRZs1E4wDmpwMLJUd4RzQosGcVw86kNmuQOqrDevwAqaUbmPsiLKccB8h Ds1SybMzwld2ynG1yrFhf3Lb0PoXgAE8FJVNvKIp0xEls8/F8XwzWUDc1yR2RLlqj5+QVh bt6nr7g0dQkxIVIZrqUnxXTVQ6gcq52QZbBiSVgoaj4x9mVXpy/4gVAuWA671AuynMKBDb /Nwbncx2hmo0LUCmznfAL63aCek4hOLZiO1K5si8wZPxKHkxdXAw6XjdO3fArQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LGy6mRrz1CG7 for ; Fri, 24 Apr 2026 17:55:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e6ea by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:55:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: e2f8bae08fb9 - stable/15 - ext2fs: Use __sdt_used for variables only used by SDT probes List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: e2f8bae08fb97985c94aa27b9e253346f32081b7 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:55:54 +0000 Message-Id: <69ebaeaa.1e6ea.21205bac@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e2f8bae08fb97985c94aa27b9e253346f32081b7 commit e2f8bae08fb97985c94aa27b9e253346f32081b7 Author: John Baldwin AuthorDate: 2026-02-09 16:27:44 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:33:29 +0000 ext2fs: Use __sdt_used for variables only used by SDT probes Reviewed by: imp, markj Differential Revision: https://reviews.freebsd.org/D55164 (cherry picked from commit 83e5b79c7c98a7f8c94a99b102bc8a90c195769a) --- sys/fs/ext2fs/ext2_extents.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sys/fs/ext2fs/ext2_extents.c b/sys/fs/ext2fs/ext2_extents.c index 146aa48f6743..0aa709a8e354 100644 --- a/sys/fs/ext2fs/ext2_extents.c +++ b/sys/fs/ext2fs/ext2_extents.c @@ -447,11 +447,7 @@ static int ext4_ext_check_header(struct inode *ip, struct ext4_extent_header *eh, int depth) { -#ifdef KDTRACE_HOOKS - char *error_msg; -#else - char *error_msg __unused; -#endif + char *error_msg __sdt_used; if (le16toh(eh->eh_magic) != EXT4_EXT_MAGIC) { error_msg = "header: invalid magic"; From nobody Fri Apr 24 17:55:56 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LH04hr8z6ZxVM for ; Fri, 24 Apr 2026 17:55:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LH00fcDz3pvj for ; Fri, 24 Apr 2026 17:55:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7ShnQO5Qxxiqyva5gKkjwMXdBgEAOs500od8rCQ/oiE=; b=oVnwgfDaPnE4S2bcE4YmCQsxMNu12uM4IvByM676YMZ0Ew+0QsgF8DAIJXkslzcKI2eGgH b3+RHVYX8Q/OWgJ6IAGYHZDEJUtoHVyyA1l+4dPF8eZ8s+CLXNec5/0+oFv2b9qW6cyut5 LGysGC8UIuDgDBtUACG41VyB+hihIl2GaZ3Icqjsr2nCJfGb35VuRTBPsuUisaRq6CtElb dN2koigfyY0VhFjePcKEPbRrpqJOWCClzxKa+V5/hHlc0WcU46KerbPznKlJA8WkjCyAte CCP9CHufcE7U5PelnHZaD28MTN2b77Teb0aTro1ZCNwRXqr8wxygmHPZ1l7Y8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053356; a=rsa-sha256; cv=none; b=MIrLW8QDGfD4yAxAxRtoksaDhcB3uefFVszMRaXXWPKLJtU+i22a/JAUllFfU9f2rLkYkN Z3oMhJJ/wu5Da1x3kYlrZCqrLQ0J5PB2OxyImVhBAucogsoSSssXxJtypt85BHHxabq5rt /FxvYBF+9EVeFHGznliSu1HbF030UyZ2dx4M1EPqD6DxezI3bXhQpUKtiAaPaHN8Izo5Fs 0AiG6AO9w+4pwg/d8Dd2kjKCRHcrykL2Tp6pbsZTQxwkWrGu/SYxrld99W4Tm31ie4WDog OEqS4KywoyILvzVQtkZh3qeeXYrBP+V4Vw1t2hCNbFPxmg4tAxsYWQXFnahGQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7ShnQO5Qxxiqyva5gKkjwMXdBgEAOs500od8rCQ/oiE=; b=Cn3+tk36RA0xxEW80GojzlTq+QetLkE/LlRTbjQQuT5WtynMBZsvFcHcVIH7oEXsClKxDG l1WH4+O6V2EShYvsvkfUVv0Q7lmHGUzYq29o+WW9UPxXUaAJDalhtBUywf8IFng+bkRU/Z ZozqW52p4WM1JcHKlEWxZYh1bKfFnpyMFvE4Y4J98P8i0pcABkoNHdPolD2v5CVDLHXNFf HarxQE9OstmkLxvQcS98JlxXlNkwQSe80kYGZEuzrZyTYf2hR3juqZyudf+847GLw1T25e Rl6YBYTnJsveHEXQRinez+5D2ZQt0FWZkoaYnpzquZOSc+GzchtaNNQYvVfiiQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LH00FfPz1CYx for ; Fri, 24 Apr 2026 17:55:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e1e6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:55:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 9c6f96d18998 - stable/15 - sctp: Use __sdt_used for variables only used by SDT probes List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 9c6f96d18998f7a3fbeb9e2fbce020e6d2b8b65b Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:55:56 +0000 Message-Id: <69ebaeac.1e1e6.2c54bc3b@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9c6f96d18998f7a3fbeb9e2fbce020e6d2b8b65b commit 9c6f96d18998f7a3fbeb9e2fbce020e6d2b8b65b Author: John Baldwin AuthorDate: 2026-02-09 16:27:55 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:33:36 +0000 sctp: Use __sdt_used for variables only used by SDT probes Previously this used a home-rolled version. Reviewed by: tuexen, imp, markj Differential Revision: https://reviews.freebsd.org/D55165 (cherry picked from commit d4d735b26537662565001d86685080256cf95758) --- sys/netinet/sctp_cc_functions.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/sys/netinet/sctp_cc_functions.c b/sys/netinet/sctp_cc_functions.c index 1a252da31b27..db46f5e34195 100644 --- a/sys/netinet/sctp_cc_functions.c +++ b/sys/netinet/sctp_cc_functions.c @@ -51,12 +51,6 @@ #define SHIFT_MPTCP_MULTI_Z 16 #define SHIFT_MPTCP_MULTI 8 -#ifdef KDTRACE_HOOKS -#define __dtrace -#else -#define __dtrace __unused -#endif - static void sctp_enforce_cwnd_limit(struct sctp_association *assoc, struct sctp_nets *net) { @@ -255,7 +249,7 @@ static int cc_bw_same(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw, uint64_t rtt_offset, uint64_t vtag, uint8_t inst_ind) { - uint64_t oth __dtrace, probepoint __dtrace; + uint64_t oth __sdt_used, probepoint __sdt_used; probepoint = (((uint64_t)net->cwnd) << 32); if (net->rtt > net->cc_mod.rtcc.lbw_rtt + rtt_offset) { @@ -390,7 +384,7 @@ static int cc_bw_decrease(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw, uint64_t rtt_offset, uint64_t vtag, uint8_t inst_ind) { - uint64_t oth __dtrace, probepoint __dtrace; + uint64_t oth __sdt_used, probepoint __sdt_used; /* Bandwidth decreased. */ probepoint = (((uint64_t)net->cwnd) << 32); @@ -530,7 +524,7 @@ out_decision: static int cc_bw_increase(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw, uint64_t vtag) { - uint64_t oth __dtrace, probepoint __dtrace; + uint64_t oth __sdt_used, probepoint __sdt_used; /* * BW increased, so update and return 0, since all actions in our @@ -574,7 +568,7 @@ static int cc_bw_limit(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw) { uint64_t bw_offset, rtt_offset; - uint64_t probepoint __dtrace, rtt, vtag; + uint64_t probepoint __sdt_used, rtt, vtag; uint64_t bytes_for_this_rtt, inst_bw; uint64_t div, inst_off; int bw_shift; @@ -687,7 +681,7 @@ sctp_cwnd_update_after_sack_common(struct sctp_tcb *stcb, int accum_moved, int reneged_all SCTP_UNUSED, int will_exit, int use_rtcc) { struct sctp_nets *net; - int old_cwnd __dtrace; + int old_cwnd __sdt_used; uint32_t t_ssthresh, incr; uint64_t t_ucwnd_sbw; uint64_t t_path_mptcp; @@ -800,7 +794,7 @@ sctp_cwnd_update_after_sack_common(struct sctp_tcb *stcb, continue; } } else { - uint64_t vtag __dtrace, probepoint __dtrace; + uint64_t vtag __sdt_used, probepoint __sdt_used; probepoint = (((uint64_t)net->cwnd) << 32); probepoint |= ((0xa << 16) | 0); @@ -998,7 +992,7 @@ sctp_cwnd_update_after_sack_common(struct sctp_tcb *stcb, static void sctp_cwnd_update_exit_pf_common(struct sctp_tcb *stcb, struct sctp_nets *net) { - int old_cwnd __dtrace; + int old_cwnd __sdt_used; old_cwnd = net->cwnd; net->cwnd = net->mtu; @@ -1339,7 +1333,7 @@ static void sctp_cwnd_new_rtcc_transmission_begins(struct sctp_tcb *stcb, struct sctp_nets *net) { - uint64_t vtag __dtrace, probepoint __dtrace; + uint64_t vtag __sdt_used, probepoint __sdt_used; if (net->cc_mod.rtcc.lbw) { /* Clear the old bw.. we went to 0 in-flight */ @@ -1402,7 +1396,7 @@ static void sctp_set_rtcc_initial_cc_param(struct sctp_tcb *stcb, struct sctp_nets *net) { - uint64_t vtag __dtrace, probepoint __dtrace; + uint64_t vtag __sdt_used, probepoint __sdt_used; sctp_set_initial_cc_param(stcb, net); stcb->asoc.use_precise_time = 1; From nobody Fri Apr 24 17:55:57 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LH16zdlz6ZxY5 for ; Fri, 24 Apr 2026 17: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LH12tPQz3pvn for ; Fri, 24 Apr 2026 17: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=1777053357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZqJwwgEetyz5cHoy9I9i/Q2jXqom9vvIuUdRHLHIoUE=; b=LqXWa9HDCoB/J52QwvpeD29FqNBHWaa6GR3oycOJh1xZZru3ioqQpYXxk/Y6umqrxGFT/W x48iKGC5tHypnT/sdf+xEaEXAhcjiUI2xKIxAkglYuZf42nK+nF+RXrDdFiIVHPukUAH/0 q3OPsWsOzj8QE+fOoLHLLpWiEcRlYQQUyHFfOo6kSYfp3VPh9A9aGHxMJZiDTTeU57I9C+ XGIGCOR4m7ve7M8wMFJRAu4VjSuQJ53ld9UBHjz47tLuUpT+cr8oYwL9Xa5n25l879J0y2 /PqUjqGudRzo4CPHTEW99HpBNZYucj43HBcLQ+l/O8vyxbu1WITbIMXCoz3B2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053357; a=rsa-sha256; cv=none; b=TMu+6erw0Wd072cHAA9VBD9lw/Yk9bExKIl5nIwTEyzoeasvsOVBTLKkVoStC9pYaZHDGg ttkCv+Sej2Hyd+nH/XBJVo3QGjDqFuQWsxdnxN+eV6vPNPFxD7a/BexjXeecTYDYWztjb5 cUWa0ayBPS705ZwQlJpHRMRtFSas5OwKlKFHtYSn/EEf+Yg8IP/PV37o/TYNLc02TD1HyN gPrsZSep9mu1pxxgvHDEcgrkkotYXamI959ZwjHNAkxEf554ZDlZUzyE4lNSLZzQWrOUWI RmaBr23bSpeEfbelz3wPJNag/0zXiWbGDlrawaiOTlfcCY8JRaGTNpW+7LvNjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZqJwwgEetyz5cHoy9I9i/Q2jXqom9vvIuUdRHLHIoUE=; b=ToxPfLmN98ztUuURLksTK+9Q7Ol9meqaLUPrDBJfi9241hgwVScMQUoPKmNDt95xmulBJg Bz9aMIeYfWwD8VlinqKRVikZS/PszNESTyVIqdvIvTyZ7RpxgMIaSzGx3gyoueThEH/wC9 t1TfD8tTMjjJRZKdBmV35U4PjJVEcdIj6+FNXd+zwKtlHyxLnz0ghoYFeyC6yx2HJZ8/Sg ScDjmtrIaT9IX58YC5UqswijjONk3R9vCmS07Age+gJd+bOvLmy/ooCJlGkyD9GaMH1yRQ xaNwV0/yjk6imVtvaJqg7WLGAzRQt6Jvl6m6BGE5TqXwLMIYs0YWuNozMbODUQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LH10pFRz1CM1 for ; Fri, 24 Apr 2026 17:55:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1ebdb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:55:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: b833e83b79bd - stable/15 - arm64: Explicitly use movz List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b833e83b79bd832d7ea1271f0e321d678aca1a1b Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:55:57 +0000 Message-Id: <69ebaead.1ebdb.502ec05c@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b833e83b79bd832d7ea1271f0e321d678aca1a1b commit b833e83b79bd832d7ea1271f0e321d678aca1a1b Author: John Baldwin AuthorDate: 2026-02-17 20:46:35 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:36:15 +0000 arm64: Explicitly use movz This appeases GNU as which doesn't map the mov alias to movz. Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D55160 (cherry picked from commit 4092df8820ea01951ab6df6cfd4fdc5b239e636e) --- sys/arm64/arm64/locore.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index cebea0b13649..39eb762a4cbe 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -44,7 +44,7 @@ * This can be used early on when we don't know the CPUs endianness. */ .macro mov_q reg, val - mov \reg, :abs_g0_nc:\val + movz \reg, :abs_g0_nc:\val .if (\val >> 16) & 0xffff != 0 movk \reg, :abs_g1_nc:\val .endif From nobody Fri Apr 24 17:55:58 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LH23pWMz6ZxYB for ; Fri, 24 Apr 2026 17:55:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LH21ZK9z3q8F for ; Fri, 24 Apr 2026 17:55:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0VR+zcTHrfxGKusm/VrQfkmxcXKdk4C5rZ7z0smRlxs=; b=M1A9FXabI80OJlQqCwy1QFE7BKq0f4/D4PXYSDMS1DXDHeL7wNaznilayoB9sETpZsgs3U BIDOAJe/VhXX2YbY9BCxi8wQ+7cSKFRRAdsBOkGPEpkmeqoaZCuSOYsDW8hA2jD4b947hh yIQvIvWIwXPl1r9Oee8ngK6uLun0nXDMduEELHtMjha7B+GJdRZaF8aM1RdFiaxMG74DSN IXt0Vpc7TXikkIXK+0UfsPztQ86tndjPUnqU+9hdsVnvPYhL5U9GyMOl/8V4CUJE1vyvss mqNClICGwBstY1YV/3Sl6le/gwjwDz3qlxeWVhAVcRdJW/YOSl+pXt9SBvKATw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053358; a=rsa-sha256; cv=none; b=fcyweL7FpzMtvZ3Zt+uLF3lhaktxoznFqGkVEJHvzEJku4h8sGIeedg/JsYhdda2UEKAy5 tBTxEAqmVPCaoucGAXuXbSdXdW9vT83+cjLIb+OhYqdps2EXJqexI3fQ4yx9KG4yUVwTNV fiAik8AwJa1I0PSI+p6QgD7WSLshYXeYMOoYLaBHlrg0s9LWogA6Mu2k7qDqqy2SCyVIlu pvC2ZUIEfoqUykkxeWoLxluoImqsNeysB1nP7suLGcArcaKPE1Y5HsLAgzjonjzw6Hrbcs gn5pLET90YtaQrEzZPtArrR6hIZSmUk2NtztiCJwHPbt/zZZre+RrQzggTMahQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0VR+zcTHrfxGKusm/VrQfkmxcXKdk4C5rZ7z0smRlxs=; b=acBhO/XFKKUkKESF0E0jqSVqBC85O5XHStal9EzAeLHCVu2qQx+tZbQTMlTPAzcl1UvCiH FzVayHUC2t32ungdEw+lq194eai4s7QlaurE13mUmIAVT0Eup0lNaatzh+Td0YUhsZLbzN TRAZVWlHN6l0e4ZNXrbwXGtJrRxH1XcUSTXQ3UJAKrqqA1AxppDp8GvwJbUcW7dAp6TfF5 vesDveKB5KYQegIhNx9gKDmgWFSNeIAwdq7HTgpFq4U8hw9kv6E56zZxgXQ2/PCcGUHZCH Q91k5cgWACJwGUoOCGz62lbK5nvpgQOeD2ZjDZEthxV0KtZfwO/JAcdJwCM6Sg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LH216Wrz1C4V for ; Fri, 24 Apr 2026 17:55:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e3da by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:55:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 59aa4cf921af - stable/15 - arm bcm2835: Appease a warning from GCC List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 59aa4cf921afa5cff80ca8fc45524dc835541584 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:55:58 +0000 Message-Id: <69ebaeae.1e3da.11d43ebd@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=59aa4cf921afa5cff80ca8fc45524dc835541584 commit 59aa4cf921afa5cff80ca8fc45524dc835541584 Author: John Baldwin AuthorDate: 2026-02-17 20:46:48 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:37:15 +0000 arm bcm2835: Appease a warning from GCC No code currently uses the vc_audio_msg_type_names array of strings. Reported by: -Wunused-variable Differential Revision: https://reviews.freebsd.org/D55162 (cherry picked from commit c7f7b67411b2ac325b548422191896cfa66d15cb) --- sys/arm/broadcom/bcm2835/vc_vchi_audioserv_defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/broadcom/bcm2835/vc_vchi_audioserv_defs.h b/sys/arm/broadcom/bcm2835/vc_vchi_audioserv_defs.h index 896e706ff492..1b4a5720dcaf 100644 --- a/sys/arm/broadcom/bcm2835/vc_vchi_audioserv_defs.h +++ b/sys/arm/broadcom/bcm2835/vc_vchi_audioserv_defs.h @@ -56,7 +56,7 @@ typedef enum } VC_AUDIO_MSG_TYPE; -static const char *vc_audio_msg_type_names[] = { +static const char __used *vc_audio_msg_type_names[] = { "VC_AUDIO_MSG_TYPE_RESULT", "VC_AUDIO_MSG_TYPE_COMPLETE", "VC_AUDIO_MSG_TYPE_CONFIG", From nobody Fri Apr 24 17:55:59 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LH509JFz6Zxbn for ; Fri, 24 Apr 2026 17:56:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LH32P7Gz3pk4 for ; Fri, 24 Apr 2026 17:55:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZR/rmjUCOFNcs7H90bMolhs3GV2O+J5zivWzcXYviic=; b=jou370AMx4yUcNWsQgHdd5l3VjI2p9JWoI8tiLZWC3DZLGi1FXM1Xc3H7sZAyq03tix6NF S6FaA3Vl3DCOJIe6OwKx/UVvp5M5NLg9NcyRlR80HvBfY119yuk2P1ASFzqicjIuqbYP7k xBMEI+GloDafDFexblmajzLhhXeKehs/+telvMFuUQAPy8h7E8Y4sVK1a+t4wgqDeRQk/v WoLXFN0w1QRJS4Pz/FkF/S6nQ97BfGBeuE4/Wtp0ml8j9CoXPNrw3KP2vAjNOlrNEpDZV3 lVRz1gQSfckapW151/yzDsvws08iBuSnxGiK4hrPcdMXWdSXlUlMOaLA2wwMZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053359; a=rsa-sha256; cv=none; b=SMo7ArNzpxGv0xUmyavBX+Z1rx+es/kBl/c1lcUzM8LzXYdaAKkgDU7x2OlJsVnhDCRnXI VNA4lYIxJS9YEPu69qPOBuN+KJz406vp7V6m4SgQu5OB+6MVSzPwGdZ1krlL6xoXoQc2jv jzUZCazhgfQkf9Lc1t4Y6+oDhCfyPfOioG5GTysu3dumCdUMq60L4oQ7g60ObaKD+pOsl9 lpPscNE4+8cjZJP4FF4TfIPMzJJUJTsLZhDH1VBZJhNbD4gmtdVCoiZflpjVeQyJ7DrMKr rvRZNT3BL3GaqzH29WbmfSSKHErbMKOnnPfvFmPAx7gAxlUa85RCxygY0xeHdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZR/rmjUCOFNcs7H90bMolhs3GV2O+J5zivWzcXYviic=; b=MHrJGPjayFD1BbDMKDUQ+a17gm6Oyicsjo7nZjk4sSEMaJEKPqRqnKDrysEN7AmCqLU9Zb 4dX3IpqnPpwQMFk54MG/zrbtHKzQbEC4bVM3io9D5Uj593CvloEymtsbwPMqr5m/6Uwjmr ZVbf+tRJRRvSN+KiUC8rqncxH7t7r1hroLfFTJ3UFwLUL52StVHd3+m4BJctJGvA/GTA+E lyRgWDqVwqaMjDjOeQLz81xxLOJIhqleSTuclUWqm+znEHuqcQaI8adlJKZg+uevCQktzW GKAgr9pYwIS4NG5ULG68Mv2YCd3yjex0fOjRXUnJ9CCYB7Qv1Uqxf3dW/P5l4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LH31TBdz1CYy for ; Fri, 24 Apr 2026 17:55:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1c4dd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:55:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: d17f7f9e911a - stable/15 - vchiq: Fix return type of vchiq_copy_from_user List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d17f7f9e911ad77ac14cb2974935c57931a7720b Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:55:59 +0000 Message-Id: <69ebaeaf.1c4dd.42086423@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d17f7f9e911ad77ac14cb2974935c57931a7720b commit d17f7f9e911ad77ac14cb2974935c57931a7720b Author: John Baldwin AuthorDate: 2026-02-17 20:47:00 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:37:25 +0000 vchiq: Fix return type of vchiq_copy_from_user Change the function definition to map the declaration and consistently return an enum value. This fixes the following error reported by GCC: sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c:322:1: error: conflicting types for 'vchiq_copy_from_user' due to enum/integer mismatch; have 'int(void *, const void *, int)' [-Werror=enum-int-mismatch] 322 | vchiq_copy_from_user(void *dst, const void *src, int size) | ^~~~~~~~~~~~~~~~~~~~ In file included from sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.h:38, from sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c:61: sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.h:647:1: note: previous declaration of 'vchiq_copy_from_user' with type 'VCHIQ_STATUS_T(void *, const void *, int)' 647 | vchiq_copy_from_user(void *dst, const void *src, int size); | ^~~~~~~~~~~~~~~~~~~~ Differential Revision: https://reviews.freebsd.org/D55163 (cherry picked from commit 1101292a555d24c11d7630b638dc25e1ed22c061) --- sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c b/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c index 0150ce72f0a4..8e30e1c38b6d 100644 --- a/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c +++ b/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c @@ -255,7 +255,7 @@ vchiq_platform_get_arm_state(VCHIQ_STATE_T *state) return &((VCHIQ_2835_ARM_STATE_T*)state->platform_state)->arm_state; } -int +VCHIQ_STATUS_T vchiq_copy_from_user(void *dst, const void *src, int size) { @@ -266,7 +266,7 @@ vchiq_copy_from_user(void *dst, const void *src, int size) else bcopy(src, dst, size); - return 0; + return VCHIQ_SUCCESS; } VCHIQ_STATUS_T From nobody Fri Apr 24 17:56:01 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LH70kv1z6ZxSd for ; Fri, 24 Apr 2026 17:56: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LH537n7z3ph0 for ; Fri, 24 Apr 2026 17:56:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=63BQgOmxDW+tSa/+fXGTG3vY2ST/UHvc8OTIGX0Yacc=; b=FtVcBg4+MOhEjPrfdYkotXVzFQICrQ93iiG/vxUbSFw4d3m8GPNBev9ldESTAqTQOY2dVS RY+Z1viwhmqAdwxAEMYNWqhvB01hQKcoCVx6IjmlpQ4XNIPD6g0tC5ro+FMg0b0GwUk4Sq 4bDmYiwpJY1RkozwlOUb+oCIRbYGhUPtSB3tpjaGPO0m/4kB9ov34PbkHD+GJd2HYho4Rv ib8GjOqcV1esFxlLYFlgWkzfGisB/B+u74Z4pOa3CC3EHCCOb98wKp9ed9Mq10G9b08Q5f PQBqKBYFMbJ3R9+k5Wp9f5bFF998ZWhT/HdzRilnTEOwHIf8ymbMJoPk7dyAog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053361; a=rsa-sha256; cv=none; b=LUSuGOpXBZ+BQ1tvETVhRmek5BeFqApm/EW+AODqZm0WKN36cKHwk76L8lvPa+XVMhljGT HMKEtv4CQJTVnek3qrdJMEJiZNpaucX1N7nTsFgipJt/6HCJFOz/Bnunah6AN165C1WxQy zWzVyi7z8uvys0y3qQNv3qAfpyW4l9Oy9mGUgT8TZOMGd4sGRMSFt6b3C8JQPiWW32xSJU ftor0dYHgC9u9dQUsbrLSNsy/0Pm4izKUuq2k7VHrEgjZ0A2zcEYyi+s+Mtz+TNnaqg3R3 Marsrx/uCY/Vrza1j2XDuUnKGgEJJoZCq7RslpyctL1muxoRfwqKZMJOvLhB8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=63BQgOmxDW+tSa/+fXGTG3vY2ST/UHvc8OTIGX0Yacc=; b=rmbFMqKgPrPRATnEjyuW22t791WdXkYkqyze+FVxBjmfX1dERUkQ5Xvc4NpQ8453zZNnER MCIcjGZbUsjTXP0Loa0aIekdj5N6Xfu6urw0L/x8t936k7URFhMBzHDuyX244jG42h/bco oRwlSUj4J9WtYTRVX7H6h4YcI80nzjJD0hw0ZD5OvNPJJfUNV1AKEgVkS0ob+3+3dVT61Q vzrFA2dmrjoh/+sGohVSfncU04CPKjNxY7577IFV8bFvOHbDmUGOIMT/+6ksVaUN1jeRwQ ylzFxjZ7+SLMo7mGNwIgas5ZHsh1a7vH5tm3HeEuqsolCLl2e4pHRBeYP9voiA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LH52jTGz1CQD for ; Fri, 24 Apr 2026 17:56:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1dda3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 7e7745666352 - stable/15 - ctld: Honor the default maximum I/O queue size for NVMeoF controllers List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7e7745666352714c8ff33c98bf861c4ebf67962c Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:01 +0000 Message-Id: <69ebaeb1.1dda3.40298863@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7e7745666352714c8ff33c98bf861c4ebf67962c commit 7e7745666352714c8ff33c98bf861c4ebf67962c Author: John Baldwin AuthorDate: 2026-02-20 18:56:00 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:39:51 +0000 ctld: Honor the default maximum I/O queue size for NVMeoF controllers exports a constant to set the default maximum I/O queue size which is used by ctl(4) if an explicit size is not set. This value was chosen to match Linux's default, but it also avoids excessive resource usage for I/O queues. ctld was using the absolute maxium size as the default instead. Sponsored by: Chelsio Communications (cherry picked from commit 0788e7c40ddbeedfd9713842440a8db2a8f7ea2f) --- usr.sbin/ctld/nvmf.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/usr.sbin/ctld/nvmf.cc b/usr.sbin/ctld/nvmf.cc index eb116903f5c1..e1ecf8ccc552 100644 --- a/usr.sbin/ctld/nvmf.cc +++ b/usr.sbin/ctld/nvmf.cc @@ -165,7 +165,7 @@ nvmf_portal::prepare() "max_admin_qsize", NVME_MAX_ADMIN_ENTRIES, NVME_MIN_ADMIN_ENTRIES, NVME_MAX_ADMIN_ENTRIES); p_aparams.max_io_qsize = parse_number(nvl.get(), "max_io_qsize", - NVME_MAX_IO_ENTRIES, NVME_MIN_IO_ENTRIES, + NVMF_MAX_IO_ENTRIES, NVME_MIN_IO_ENTRIES, NVME_MAX_IO_ENTRIES); p_aparams.tcp.pda = 0; break; @@ -334,9 +334,6 @@ nvmf_port::kernel_create_port() nvlist_add_string(nvl.get(), "ctld_transport_group_name", pg->name()); nvlist_add_stringf(nvl.get(), "portid", "%u", pg->tag()); - if (!nvlist_exists_string(nvl.get(), "max_io_qsize")) - nvlist_add_stringf(nvl.get(), "max_io_qsize", "%u", - NVME_MAX_IO_ENTRIES); return ctl_create_port("nvmf", nvl.get(), &p_ctl_port); } From nobody Fri Apr 24 17:56:02 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LH70nHcz6ZxNc for ; Fri, 24 Apr 2026 17:56: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LH63j7qz3pkT for ; Fri, 24 Apr 2026 17:56:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KogMIAUnLNFm6CmC9rnVPUC10rjuOm9kHxmz6WA6fOQ=; b=n/7QbouWM7mCj1tD2a2zLPo9rO2ClAZ32TczshvZouXH4wTw2OOS8J4vHT/nNh4Fp96QiG NOwor+2RLrnMJGpfKoX4haQzkPEWtJcw4iBmHvKEZ5vJrYLFgPgTrqDp9xmXWQv2ghvQzO 0ymTxn5g4qaBjVHRxJYKzp4nehK8u4RHTvpsT+lHHItWjqXrcCLRgM64jTiuKwmahMtkqy RmmLD5JjhtbYZShX2F4ttARS93Nb4G5D00f6qp8eBMwotHWDSrzCx7cFh36UjaAo/PgO92 /d8B4tYlY1givotlvqTgFMwnRzL5v7JIypZ8Ma4NA1M50897h08kH/DLXFmAJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053362; a=rsa-sha256; cv=none; b=Q0en5fsQ00s/DKihkGEFUS0xDv6XVh/4G21aZhTobYyPKOi3fugLFpkCI1P6ulgeqea9s+ R3U51nMFK7LEDoOcnAdJdY7HCh6BXd+85Yd1payRTWMq6rlCi7Iglmcbtbl93jrOWAAxcW PD+CIBsiefncPaAHDjDDcNGQ9iSq+HESAmlm6MpY9oHo7SuIopyUdiH0fj8kc6uKXR8gkS u204O5yKwid1PEb8EawkxU4GhyYTSdM6+osPAllr7cYYrtHfrpUevBWN/tLQpK4ZnJgE6h 03051eOkBXWcSBD7CTEIz1woMYn9yksjpaG8dHep4E5CBviT+YlRccT8GtD0Aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KogMIAUnLNFm6CmC9rnVPUC10rjuOm9kHxmz6WA6fOQ=; b=NKv4iKZoOesrvazcPfwyfWl8ryLXD6gIN3v5gzOQjETDDT4aqA3x5byWYr6dzbmko7qJvL L8L21uJnymFFXle/XN4QJDvJV7jik1Br0cD5eQe99RF02lBSeOXtn2JpfvHcr7mVuS/ypu 1qQOTvR+HFbYWWsrp28tBNDbngMXapBo73vejLrZ5r36df2GQXEnCdOWapnfdTA9PN3Uhl WSfe/1m5nhMPpSR4fpGAyCmfusj7zCIzA+ElYk2cLU4iI5G9+jzDFdSDRAuK7PgZPQqs9y rZg0vaMGvn9EhYTsDNWWCP0MBcqUiF1J7Fe7P6ujjjaLwhcb3CzoDMq3Tvla+g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LH63GWlz1Cn5 for ; Fri, 24 Apr 2026 17:56:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e3de by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 45c8b3b908f3 - stable/15 - nvmf: Limit the default I/O queue size to 128 entries List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 45c8b3b908f3a5e9002db1dd4de74f413e52ef93 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:02 +0000 Message-Id: <69ebaeb2.1e3de.79429f08@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=45c8b3b908f3a5e9002db1dd4de74f413e52ef93 commit 45c8b3b908f3a5e9002db1dd4de74f413e52ef93 Author: John Baldwin AuthorDate: 2026-02-20 19:21:18 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:42:35 +0000 nvmf: Limit the default I/O queue size to 128 entries Previously the size defaulted to the maximum supported size reported by the remote host. The value of 128 matches the default on Linux and avoids excessive resource usage for I/O queues. Sponsored by: Chelsio Communications (cherry picked from commit 1602f0013bddc7b59b0b8de94c0e6cd742ffc9be) --- sbin/nvmecontrol/fabrics.c | 2 +- sbin/nvmecontrol/nvmecontrol.8 | 6 +++--- sys/dev/nvmf/nvmf.h | 3 ++- tools/tools/nvmf/nvmfdd/nvmfdd.c | 3 ++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/sbin/nvmecontrol/fabrics.c b/sbin/nvmecontrol/fabrics.c index 5fdbf68127d4..b120118cf022 100644 --- a/sbin/nvmecontrol/fabrics.c +++ b/sbin/nvmecontrol/fabrics.c @@ -485,7 +485,7 @@ connect_nvm_queues(const struct nvmf_association_params *aparams, /* Validate I/O queue size. */ memset(io, 0, sizeof(*io) * num_io_queues); if (queue_size == 0) - queue_size = (u_int)mqes + 1; + queue_size = MIN(NVMF_DEFAULT_IO_ENTRIES, (u_int)mqes + 1); else if (queue_size > (u_int)mqes + 1) { warnx("I/O queue size exceeds controller maximum (%u)", mqes + 1); diff --git a/sbin/nvmecontrol/nvmecontrol.8 b/sbin/nvmecontrol/nvmecontrol.8 index dc757bcf90c3..55373f428ddf 100644 --- a/sbin/nvmecontrol/nvmecontrol.8 +++ b/sbin/nvmecontrol/nvmecontrol.8 @@ -33,7 +33,7 @@ .\" .\" Author: Jim Harris .\" -.Dd July 9, 2025 +.Dd February 20, 2026 .Dt NVMECONTROL 8 .Os .Sh NAME @@ -827,8 +827,8 @@ NVMe Qualified Name to use for this host. By default an NQN is auto-generated from the current host's UUID. .It Fl Q Ar entries Number of entries in each I/O queue. -By default the maximum queue size reported by the MQES field -of the remote host's CAP property is used. +The default is the minimum of 128 or the maximum queue size reported +by the MQES field of the remote host's CAP property. .El .Ss connect-all Query the Discovery Controller at diff --git a/sys/dev/nvmf/nvmf.h b/sys/dev/nvmf/nvmf.h index 9b2b4c1dea40..e53eecca156e 100644 --- a/sys/dev/nvmf/nvmf.h +++ b/sys/dev/nvmf/nvmf.h @@ -27,11 +27,12 @@ #define NVMF_NN (1024) /* - * Default timeouts for Fabrics hosts. These match values used by + * Default settings for Fabrics hosts. These match values used by * Linux. */ #define NVMF_DEFAULT_RECONNECT_DELAY 10 #define NVMF_DEFAULT_CONTROLLER_LOSS 600 +#define NVMF_DEFAULT_IO_ENTRIES 128 /* * (data, size) is the userspace buffer for a packed nvlist. diff --git a/tools/tools/nvmf/nvmfdd/nvmfdd.c b/tools/tools/nvmf/nvmfdd/nvmfdd.c index 0f181682aac2..9cc426c3ede9 100644 --- a/tools/tools/nvmf/nvmfdd/nvmfdd.c +++ b/tools/tools/nvmf/nvmfdd/nvmfdd.c @@ -474,7 +474,8 @@ main(int ac, char **av) memset(&qparams, 0, sizeof(qparams)); tcp_qpair_params(&qparams, false, address, port); - io = nvmf_connect(na, &qparams, 1, info.mqes + 1, hostid, + io = nvmf_connect(na, &qparams, 1, + MIN(NVMF_DEFAULT_IO_ENTRIES, info.mqes + 1), hostid, nvmf_cntlid(admin), av[2], hostnqn, 0); if (io == NULL) { warn("Failed to create I/O queue: %s", From nobody Fri Apr 24 17:56:00 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LH525KWz6Zxbp for ; Fri, 24 Apr 2026 17:56:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LH42fXVz3pw9 for ; Fri, 24 Apr 2026 17:56:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=okw/hjZSC5Rse77wgy0cZgjoFeAPFAYGxQUzN2MHnZ8=; b=mTcGtaxFLn0NqawI7deVgWSrMOAKuCoDqBahcUq0R+0g7uHK7x5czExkcF/++cMmMQ+e0L iYtl6EXJpA+DC9xMQzWF1UdJa/oM7U2hYUr7WRptpNoOnBumpKh9OmKsfJITxBldY6KSuU 2n6pjEXw9nnhwpT7erKKSNYos8+YVY4zcP4jQt4WdUtrMdLSB9f/M008kwuXGGYbsvORQR dXV4kPABsYw1vEaYX5e6wLk1EfPErYd/uXnB6oO2W3UPSrtiqhUubtP/yDYP6YCuZK6bPZ RavB42NJMsBMOcIKJhvKl/Lf4RIgmmdD3gusxYDTpDUAMg8h5M5Li2CXWULtrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053360; a=rsa-sha256; cv=none; b=lEN+1vuKEgkiI3BudIc4ZhooRzGhNIGU453kA8DBMVre8eqf5YeetzCb8TgvjY0YmT3l67 rhA/8jO9/N9FklI8hXZDr13kKkjISSozQq95BMF6ZsBaJH5YnWGVoy7qCHBz4y/91V/pCz pJDKeChgUgHfLUiEd1IO8MKlKHU1NmOTdLJQeX1MvJFLuzXlbxad3mWeNeuifB+8tC3E7n Qj0VIGD1YB/+wehPAxs5zniiH0A60fjv3pfrgVnKN7JrVi+nZ+TQunDNYpiTH8IVt1edvv qim7WZYJjaET9JFPir+I5S0tNU8WXOTIJZc+b/dM0kxI8ugu/F8LMe1JBqfTAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=okw/hjZSC5Rse77wgy0cZgjoFeAPFAYGxQUzN2MHnZ8=; b=NwpjsIgBsrp1YU44rMF2Fmf2lgS+/DvBRlT9ZUB75lqcSSfZXttqLUP1HwTjiIUWseQpTv hC1QbLTt5pTcJ1UYzPYoNu975KEUKQ/WpTDuXRFaybFoiSZE8X/yCDStjb6MK62YsLM8ml pL4DeTPaKMPNlFxgz7vmcZfn4Z00XxMGQgUIbUTF6ie/kU9JGX/0l3tj7nRvXO1kv2goEu /w6CUDEsllU0ARbA2P3mdqu+PF1iFVUNFF/C2lq8KYJqVHfmEzZakxnSl7OrUC39PeUMeS hSmxVt7e+uwu9fw35FxpbnKgnASzflPGEY2o09aQCF3xh+1QKa1/YqOSMHn+3w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LH4277mz1CZ0 for ; Fri, 24 Apr 2026 17:56:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1c468 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 4f20ccd7500b - stable/15 - pcib: Assume a window where both the base and limit are 0 is uninitialized List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4f20ccd7500b995259d82bae1cd8779c03216ade Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:00 +0000 Message-Id: <69ebaeb0.1c468.3bc1feaf@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4f20ccd7500b995259d82bae1cd8779c03216ade commit 4f20ccd7500b995259d82bae1cd8779c03216ade Author: John Baldwin AuthorDate: 2026-02-18 16:04:54 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:39:43 +0000 pcib: Assume a window where both the base and limit are 0 is uninitialized Since the low bits of a window's limit are hardwired to 1, this configuration looks like a minimally sized window at address 0. However, PCI resources are not generally at address 0 (see the __PCI_BAR_ZERO_VALID macro that was only defined on sparc64), and some PCI-PCI bridges report these register values after a reset. The result today is a lot of spam in dmesg as the minimally-sized windows fail to allocate. By ignoring these windows and treating them as closed the end result is the same, but there is less spam during boot. Reported by: jrtc27 Differential Revision: https://reviews.freebsd.org/D43922 (cherry picked from commit 349808d8bd197165390a286bccdaa29a1d77c7ab) --- sys/dev/pci/pci_pci.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c index 40ed5db4480e..3b4b15b25fa7 100644 --- a/sys/dev/pci/pci_pci.c +++ b/sys/dev/pci/pci_pci.c @@ -437,6 +437,24 @@ pcib_alloc_window(struct pcib_softc *sc, struct pcib_window *w, int type, if (!pcib_is_window_open(w)) return; + /* + * Assume that a window where both the base and limit read as + * zero is not really open, or at least not assigned a valid + * range by the firmware. This can happen if a bridge device + * is never initialized by firmware, or if a platform driver + * resets the bridge. + * + * If devices behind this bridge have firmware-assigned + * resources in this range then the window will be reallocated + * on-demand. + */ + if (w->base == 0 && w->limit == ((pci_addr_t)1 << w->step) - 1) { + w->base = max_address; + w->limit = 0; + pcib_write_windows(sc, w->mask); + return; + } + if (w->base > max_address || w->limit > max_address) { device_printf(sc->dev, "initial %s window has too many bits, ignoring\n", w->name); From nobody Fri Apr 24 17:56:04 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LH92BQkz6ZxHV for ; Fri, 24 Apr 2026 17:56:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LH8508Wz3pwv for ; Fri, 24 Apr 2026 17:56:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=40lRm2cSprkRAhkOPQDGc3xlpQA1NjdhzqJYanXC47A=; b=eASW7iQ58MowjHJ0Ugmlwk5TkaGxqzVN66QDtvrV3gJ5Zm9CcQuAmv87YulOXdJUhvSVD7 5zUGFaMvwKH/BQvIQRcTSFEIFIxfjZ2gHZFroeVVIEEBKNnrR1Wr0UWYkThdF97M0+M/zR a6aPfPsGudVn4lWiyW8KHq81gtDRNku9Jd+rPS3r7wXoKAuIMr9oN29BNFboTlOsgwinGu a86u7AB4swLZrzCfT1hLaaSjAFOipSE+XuI1T3za3GM4AkR9qUPp+weiJWNsu8QJz/OEq0 0+DaZiznHIK5ximZSm3Fbqx2Knbtu148PZ5EPMX4O4ULcQNa4OOSVhjk7annbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053364; a=rsa-sha256; cv=none; b=ACPEt1e0l9X5RCskl34Z4cGegssTwq+4XqzpNBStmZqmSDPCXERQo350MsfGQ2QPwPwZE1 IIw4NytqJ+Rmd5vuAhA0bB6gPoGEgQSGwzKdoRjI6llOgbxJB0nGKvEwKyU5Nl82UepMgz 4d/7T0HSNl5aUAbMOBgD5PbGi334C1K/AxwL+GP9oRkDECLLRIhUslp8CtaTROh7Q7kUP2 M/2WNgXsAVJsxhZu/IxOVyyccGWoUt+GZsiwBI/yX+BiSu9qKfVPQCG4IhKS3SJJXatibi cdaBa4arUU2BvQK2gXGRz3SPDb66wRslg/5iZ+kmgWLULHtMUxLNxx4zxZSOwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=40lRm2cSprkRAhkOPQDGc3xlpQA1NjdhzqJYanXC47A=; b=M9nbk6JKXiORPF7i/osdJBLryYucW5lDzQ+0W72tsK7wVfjh2jTj/69Tft70VSETG2PJg8 j7X0/sGAm9LMU5SpkSfm1K5BaZkBnkYozfax8gXjTAky3Yh/vgxsMgoTv3CaPqsKFk9qAW Q9iIUkx70l1yAfp4wo9XJ6gvQ5Gd/IbAU20VL5hh7Rj1t9DiWejjjZvR8LgYBQhmE+CB4K uLeUmShvBvELal4f3rOlWRQNiDiQWkn/PYdau4ViOKjSV0xeJpFybWfjrpjbRGAK+D/rON KhGlrYY1ND1Keq4Gx4JKy+OfYaUqAPtEW5OPWDKmcU3qQzqNFmQNjJZ3FwvsKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LH84QqNz1CZ3 for ; Fri, 24 Apr 2026 17:56:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1ebdf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 2e3a575bf7a5 - stable/15 - ccp: Don't name anonymous structure and union 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2e3a575bf7a5ac2c003d7a9953d8e11968741f7a Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:04 +0000 Message-Id: <69ebaeb4.1ebdf.5dcc248a@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2e3a575bf7a5ac2c003d7a9953d8e11968741f7a commit 2e3a575bf7a5ac2c003d7a9953d8e11968741f7a Author: John Baldwin AuthorDate: 2026-02-24 20:25:45 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:43:10 +0000 ccp: Don't name anonymous structure and union types Keep the dword labels as comments instead. Anonymous structs and unions don't have type names in C11+. Differential Revision: https://reviews.freebsd.org/D55144 (cherry picked from commit 8d3f41dbcb2a949b52660501d7efc6bb12850b09) --- sys/crypto/ccp/ccp_hardware.h | 10 +++++----- sys/modules/ccp/Makefile | 3 --- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/sys/crypto/ccp/ccp_hardware.h b/sys/crypto/ccp/ccp_hardware.h index 95779491acf2..1a1063acbe13 100644 --- a/sys/crypto/ccp/ccp_hardware.h +++ b/sys/crypto/ccp/ccp_hardware.h @@ -259,7 +259,7 @@ enum ccp_passthru_byteswap { */ struct ccp_desc { - union dword0 { + union /* dword0 */ { struct { uint32_t hoc:1; /* Halt on completion */ uint32_t ioc:1; /* Intr. on completion */ @@ -382,7 +382,7 @@ struct ccp_desc { uint32_t length; uint32_t src_lo; - struct dword3 { + struct /* dword3 */ { uint32_t src_hi:16; uint32_t src_mem:2; uint32_t lsb_ctx_id:8; @@ -390,12 +390,12 @@ struct ccp_desc { uint32_t src_fixed:1; }; - union dword4 { + union /* dword4 */ { uint32_t dst_lo; /* NON-SHA */ uint32_t sha_len_lo; /* SHA */ }; - union dword5 { + union /* dword5 */ { struct { uint32_t dst_hi:16; uint32_t dst_mem:2; @@ -407,7 +407,7 @@ struct ccp_desc { uint32_t key_lo; - struct dword7 { + struct /* dword7 */ { uint32_t key_hi:16; uint32_t key_mem:2; uint32_t reserved_5:14; diff --git a/sys/modules/ccp/Makefile b/sys/modules/ccp/Makefile index d268f0b58a91..9ab5f524b35c 100644 --- a/sys/modules/ccp/Makefile +++ b/sys/modules/ccp/Makefile @@ -10,9 +10,6 @@ SRCS+= device_if.h SRCS+= cryptodev_if.h SRCS+= pci_if.h -CFLAGS+= -fms-extensions -CFLAGS.clang+= -Wno-microsoft-anon-tag - MFILES= kern/bus_if.m kern/device_if.m opencrypto/cryptodev_if.m \ dev/pci/pci_if.m From nobody Fri Apr 24 17:56:03 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LH76VFjz6ZxQV for ; Fri, 24 Apr 2026 17:56: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LH74xP0z3q2S for ; Fri, 24 Apr 2026 17:56:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X0HGr7PapbvT7O2gv5DQvCq/RLRaOSWbNBtG64tC1Dk=; b=ePuLosqrkVqGihX0Us9BI3yE7KTXnggey0FZNOafz6Oow9sIlk+sKj3VrP3a9C37LC39mO NJwoY+wnRwq1HVa4H30raCNrQNLJe5ML9WcQwT/Hc7njuSezKD0rt5xvDZUTd00eK3ZeL4 Y4ylcIU73W6639ioWeNWCwmjbGAaVT0Lg0NIy/xrL/sSzehKAZe/j/uRUC4DAiycpz/5n+ UqhROXCimnj5ZGOUo2Ac90/9lgbNBT95pZAd86nufKtTc6NchTEhSbLENxWmIKdIl7rvDM deaOw1Cq/euVxIwC2AVdmk3BoEk9WN5koJEI6RxfaWRtnqUjwIPnQ6iEwpQmOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053363; a=rsa-sha256; cv=none; b=ocB4RrGHPDJ0GA4qNl3CJ4HxpjI7rc4LYRP9tXorCndNf/1CCKiFWAGXOOvvwUZ6GmRy5i Cz67H4LvaCuSXJgTvTeCWDN0ZzK7r+gq5QoiWreI00GwaPIaacgZKkZvSBADDrw1UR8TNB cIdwVy5XIHat0DStW2QVEpZ4kSg2AJ9VpHOsy/1veupSfADE/S+lt8G/HynmvI44Vx5Jaf amwWZlTFSHuxlofxHpzRtzWBvLDNR70nW36TLl4g2odLuXr6bwM1D0yqYHjotgXOmiK+QG pXFqX1LJchN3T8Md5lN97b9bHeV7fbB5ij/LYTzVxXwn3OvezPNdocO5DyoEVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X0HGr7PapbvT7O2gv5DQvCq/RLRaOSWbNBtG64tC1Dk=; b=hRFyBtZICPbSyIRf+a3wWcscthfrpicnXkqjQG9l99QVeAiqdsJPZu2leRInR/QphBWEJe v3ezPZi3fBPnrVFguOTQm3KUBxGl8IxOFeKcTgnqupBWpsgh1EaKefq3rM/6Ttc5qk1MjG M/C0XU/R6CkEXzdtaJzIhSOBedtnIrBk8m0gX5wmJYYsC7zfoaPMgXYR3opIHLU5UmBDHX K0KtTEELBMFCQ7lh1cw1qGVtz1LUzrkDRgr42YDoe33uZ6LhcNvxVJmaf4mTI+zjwvwWyR UQ6298tY/1rAWEEIuJAsC+wPNomUickA4qulI1+9ifBBtXbpZrgcTyxWUTqXzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LH73vyJz1CQF for ; Fri, 24 Apr 2026 17:56:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1a17a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: d46ff9d8389b - stable/15 - __builtin_align_down: Cast value to __uintptr_t in the fallback List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d46ff9d8389b6d096dcc543fb330b53ea59ba910 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:03 +0000 Message-Id: <69ebaeb3.1a17a.1f117816@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d46ff9d8389b6d096dcc543fb330b53ea59ba910 commit d46ff9d8389b6d096dcc543fb330b53ea59ba910 Author: John Baldwin AuthorDate: 2026-02-24 20:24:17 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:42:57 +0000 __builtin_align_down: Cast value to __uintptr_t in the fallback This matches the behavior of the fallbacks for __builtin_align_up and __builtin_is_aligned. Reviewed by: arichardson, ngie, kib Differential Revision: https://reviews.freebsd.org/D55161 (cherry picked from commit 5faceb84142f3c9886f38a03dd5214785ac6961f) --- sys/sys/cdefs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index ea6a92ad0056..132d4809b0ed 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -649,7 +649,7 @@ #endif #if !__has_builtin(__builtin_align_down) #define __builtin_align_down(x, align) \ - ((__typeof__(x))((x)&(~((align)-1)))) + ((__typeof__(x))((__uintptr_t)(x)&(~((align)-1)))) #endif #define __align_up(x, y) __builtin_align_up(x, y) From nobody Fri Apr 24 17:56:05 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHB1V2hz6ZxT0 for ; Fri, 24 Apr 2026 17:56:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LH95NWWz3q0H for ; Fri, 24 Apr 2026 17:56:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7rQ6vSCfiADkC6PV+dp+fK4UXBayuety1n3EV+rvJrE=; b=pmwpJyON6OZxNH4DcHxcisG1thah0tIZQXbT4nT6Wn4AP/t7GT8wtLMwHbWdXhYM7O5wHu py/Do0Y8wsJr2QV3T+AjzJWT1pFx+qTaELI7cRMQEB979QmjBBWuOlwDDrFS9C9L+Njyh3 u0nHTO/zCMM5G96vUjG5g2YTrY6DEyeSUEwjZmPz4VkvXXjkqpmWWBVaGQMcCu44EBIQdc Dd811a6hA8SGTyy/Jkwczx2LXyZ/0YZf0cTm+uN0m/tc89LezhIzYqfCS7QDceQG/os1Ao zskMOLuu2Wa9ePLfVM5fvBpxuDG30xXELop3KUPsrYRiQ68+kdF/9Cl044ZT4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053365; a=rsa-sha256; cv=none; b=UQ0gBX1X4wBEcqpDaYqyYJZrqbUKhfXkubQKSN0vKmyiC/AFFxajYHlwNDEPrgWCMM8Agy 9mupR33c8pFuUu0H26PMCpnTiNumDlEZ2QoiduXbdVVCIYefeSW8qVghk2eVThZ/Vzurej Bvvok1NjMJcoe9UtLc2JM2BVAZS6iXk5NRh4EQXvn2ytNGui4pYDqpjbZHbOb52Itws8o9 6lQCOglExFZU2jYmTTR28WhpFugxZ6VVFjmNlRfPZgkicGXu7OlycVRp03uU0rGw9BuW+J KHspL0hMSLt3nn4XNKeRwJl3ORvWkdBWQBoPyzvKn7YwFTnWcNHuazJkXM08/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7rQ6vSCfiADkC6PV+dp+fK4UXBayuety1n3EV+rvJrE=; b=I6bgruw3srtKBjUNw87acXdHqtiRrnPbxLLfiEW3taJ6HxZ6eiUTIgAAWRkt+O5xpHAo+l DvbcEzZpPAKDkRvE7HASqFDsfr2JLTTuk59VgcAwq5dXHGNuitt/YqT2mBb4D4fQ3vZwV8 WzdTr5LaE9sUw1V02IZ2QdXW8rZg2VMEzbGjgVdAFPGbtj0iwje8cZnXUe7W12ZE3N/awM cTJzNnL5nA4u2BFPMPFFVeAevs0QbZozJwNtvflE1EyNQIlUt9vouHytsxOt6GAe+YTwVE qZztG1uHJlEQRTVlUUm9E47e5u+E8bXY1MRA89Lulnt3yZpNi/GMI+Si6BvOsg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LH94zPlz1CZ5 for ; Fri, 24 Apr 2026 17:56:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1d5b8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 249c230d7546 - stable/15 - sdiob: Forward-declare struct sdio_func List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 249c230d754660747f5658111592209c181f3a49 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:05 +0000 Message-Id: <69ebaeb5.1d5b8.6c947b1e@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=249c230d754660747f5658111592209c181f3a49 commit 249c230d754660747f5658111592209c181f3a49 Author: John Baldwin AuthorDate: 2026-02-24 20:26:55 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:43:17 +0000 sdiob: Forward-declare struct sdio_func Currently this happens as a side effect of the return type of sdio_get_function() in the expansion of __BUS_ACCESSOR, but this is fragile and can break if __BUS_ACCESSOR changes to define other functions first. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55351 (cherry picked from commit 82b293ea6987ebcadf1142acd2218f50ab5e3fc8) --- sys/dev/sdio/sdiob.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/sdio/sdiob.h b/sys/dev/sdio/sdiob.h index 316a23b86103..841a3a969879 100644 --- a/sys/dev/sdio/sdiob.h +++ b/sys/dev/sdio/sdiob.h @@ -73,6 +73,8 @@ enum sdiob_dev_enum { SDIOB_IVAR_DRVDATA, }; +struct sdio_func; + #define SDIOB_ACCESSOR(var, ivar, type) \ __BUS_ACCESSOR(sdio, var, SDIOB, ivar, type) From nobody Fri Apr 24 17:56:07 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHD1tmRz6ZxQn for ; Fri, 24 Apr 2026 17:56:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LHD00Kyz3qHp for ; Fri, 24 Apr 2026 17:56:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053368; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cefLoKgHExJLITJrYnzUt2PLYIxVUAdFbVif9p/IacA=; b=COtz/9hE3pfOV7M+pYlueyt5GbbZaK3W0iOxa1TEl3VjvN2bdePeY9RIQA0QtaKgXduTlf G9JSPHKB7HaO339KJNFP5NWMdnfxVpWYRd/uHl12TA0nck4IIK7minbOsK4DbAs3lDTaOU co86q9NDY0CYqLgRJ4xuZQ5w2mE2BDIVxAphV1NO41XFgPe1rBMUgbOO6MFwONT9QDXXpO Q60dTHABbyEGqWm3Dkx62H1dFH0CjGpoC+52FUF1UG0V3XBqDDleIjkBIWCJmcw0PzKXvC Z8Esryp1Laz6oR/eZzj+JDmeg1Dfp9U1CDtmZ6hvv+rg2bHsvZxmizseLLvO4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053368; a=rsa-sha256; cv=none; b=LnuJlkYaQ8mfMm5FdJpVEc+lui4HZ31fpVcYnwLwPqPNEDH2WOyur0RyhWrCFJNZQORTYP lABkAqcKpvMaTnUTqXyc2/HTHVKIQRVygopOpDjB77CEKHoORz1rB/I5r6zz8CtbTC9GxH GnHwmxQN1wZpeYwtIOkYfCD+8GziXZSBw3Oq5/NbS8E96vKSup8qEArjHCCH8kCc6JKymq lZa4bu+hkj0LX6pxfpHqNb5u3zJ02++nrLCY/3D0T3NIgVCv1aAqcsqFbRIa95SzTcB9vr UfjHPEymkonnlcXM5UJmwbDoDg3aDirokRT3d75p0ebWNl6uH/Lg1FR28Ghx4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053368; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cefLoKgHExJLITJrYnzUt2PLYIxVUAdFbVif9p/IacA=; b=h8chjivehF9S6h2SdIVmoO97wElqxjQkI7cZrO+9oF9npoDyrpC7MyNLp+Z/qfYsX+6QfB 6fCZq5TFJimNz7nAQIrfD3vPPr0slZClxJup4ehxAPEPGUOPrlqXLOoswiDAR1l6+kg2YK RjS00OBF6qZ2j1ynA5r67kDcmizOsXMp13sfP+MpzhgZjPraDRnxg5rF+n6vYrUvf3b2dW JnwNTvpFeCWROkdQvgB9zS+TRPko2lUv9eC3MqhvP2doq25001Y/OREFrLcKu6EGwuHUG9 NBK6w1uSvOwbGFlgdKgX2wWBcAkdMPN04Fj7O5BZJjNFDUNg5+ut6GZvJ01oQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHC6W1fz1Cn7 for ; Fri, 24 Apr 2026 17:56:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e63d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: d9421acec5d2 - stable/15 - sys: Declare 'end' as an extern char[] List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d9421acec5d25b7c106fab9259f03e89ac8abe2a Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:07 +0000 Message-Id: <69ebaeb7.1e63d.17df739d@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d9421acec5d25b7c106fab9259f03e89ac8abe2a commit d9421acec5d25b7c106fab9259f03e89ac8abe2a Author: John Baldwin AuthorDate: 2026-02-25 02:20:59 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:43:38 +0000 sys: Declare 'end' as an extern char[] While here, remove an unused declaration. Reviewed by: jrtc27 Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D53898 (cherry picked from commit 6513c2845f8912c30749cf64704d3dfeeeb9a47a) --- sys/arm/arm/machdep.c | 2 -- sys/arm/arm/machdep_boot.c | 2 +- sys/arm64/arm64/machdep_boot.c | 2 +- sys/riscv/riscv/machdep.c | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/arm/arm/machdep.c b/sys/arm/arm/machdep.c index 0b395d42fc4a..d51b4f10fe6b 100644 --- a/sys/arm/arm/machdep.c +++ b/sys/arm/arm/machdep.c @@ -120,8 +120,6 @@ vm_offset_t vector_page; /* The address at which the kernel was loaded. Set early in initarm(). */ vm_paddr_t arm_physmem_kernaddr; -extern int *end; - #ifdef FDT vm_paddr_t pmap_pa; vm_offset_t systempage; diff --git a/sys/arm/arm/machdep_boot.c b/sys/arm/arm/machdep_boot.c index 8a6c63af3c92..2eee28c7078b 100644 --- a/sys/arm/arm/machdep_boot.c +++ b/sys/arm/arm/machdep_boot.c @@ -69,7 +69,7 @@ static char static_kenv[4096]; #endif -extern int *end; +extern char end[]; static uint32_t board_revision; /* hex representation of uint64_t */ diff --git a/sys/arm64/arm64/machdep_boot.c b/sys/arm64/arm64/machdep_boot.c index 0ccfd1b67a39..742622879f56 100644 --- a/sys/arm64/arm64/machdep_boot.c +++ b/sys/arm64/arm64/machdep_boot.c @@ -53,7 +53,7 @@ #include #endif -extern int *end; +extern char end[]; static char *loader_envp; #ifdef FDT diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c index b213e8812bc7..366cf1d5703f 100644 --- a/sys/riscv/riscv/machdep.c +++ b/sys/riscv/riscv/machdep.c @@ -118,7 +118,7 @@ uint32_t boot_hart = BOOT_HART_INVALID; /* The hart we booted on. */ cpuset_t all_harts; -extern int *end; +extern char end[]; static char static_kenv[PAGE_SIZE]; From nobody Fri Apr 24 17:56:06 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHC37dgz6ZxVl for ; Fri, 24 Apr 2026 17:56:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LHC06p9z3qHc for ; Fri, 24 Apr 2026 17:56:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MOxwZ3yvwr2Na9oW6fTZUDKtrMRfKvKvC+cSQmvq3g0=; b=Ox7um4B/gIolnGlWgREWPuKecdshuRai7AzT95PKtp5LskOG5tBynuq4fbdOuYPMNuxa0t AuV4cKFJmLHlzcwypAy6+XmF65bepeAThYKjoKF/2YjtbW3CCRhUlFDFMPRUFehjbBBzlG yT/wKBoyoetKxtusSmqMtXquu/vWv43n/zEl7bZV44xDDkS3N+huq8tn0iKg1GqLr+QhKn w4V0E//VPV8mFr0LoNwR/87xXPw6DhJnbwNreMWXBwCQG2jmCTu4JUYa0nEeYojUt6OTVI YCjKG0jPRHsWOwP3Ld3HGg1mpGst/Odjp3dKpaW6gOanUWDqviDeCA3eoGtkOg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053367; a=rsa-sha256; cv=none; b=triXjdlr/hgCA9/N+QX3i1AmDEfwKnLUYMgjDrJSuF5QCR6CPzDCzFezu4ucfXofsH4kmn l92Ke7emt40dkBiYrjdBXbJAQ05D/YLH3J6LXlXDB7hCmnLGEjgmAWqyi5FoOFTGW/vTji FV78Xg4mIBs/M/yuxY5rGlUZWtnDaRYl3LGwezGkqtS+xLuz5mwB4A60RUurjMRDentsV+ x2pOa3tmURFkqO8U0CyyPD3nqU/s8EYa4MemV8eHg0ZtEK5yd93IVeFcfOFXqnFr7W0sUq koxt9xWx6KXPGPZK1QB2o73qTE7gX/o7WcfE5P17cgiSGF9SqxcGUdeMVbKHWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MOxwZ3yvwr2Na9oW6fTZUDKtrMRfKvKvC+cSQmvq3g0=; b=JZlNjgF3DPMZM3ekbq+u2XJ0/R/AiCm3FVyzo60rmajoqOMp9G9EMb3vG+A7ld0rkPKCAl JwGxadIWdmW7igH8TX+ocfezlDMPuEwvlaBNUA1IHnMzeaR4/VoId54z6y+SJwS/M3xkE/ Sq/9TS3H1ZmMWzy3j9vWrQj8bYD6GoQQ52eWXwwypWuK8siIv9yNrNwwk3B3wGCY6vjTlv KPI7CHHqD+88dWsscSx2Kokh2glPlrbpEOL/kHTxOendOgd5FCU6wgd8UsIpbBBHWrQVEQ k0XNdIa7fcqvm9qfGYk+6ZyAM/iQofEK2B5bdtDXhghpU70SQG+EONdwZh9ajA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHB5lKDz1CZy for ; Fri, 24 Apr 2026 17:56:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1ec00 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Marcin Cieslak From: John Baldwin Subject: git: 92d9d996538b - stable/15 - Do not fail 'devctl clear driver' if another driver is not found List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 92d9d996538bd6bdb1e6d35a7e5c13a7d0b24134 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:06 +0000 Message-Id: <69ebaeb6.1ec00.7091c8e1@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=92d9d996538bd6bdb1e6d35a7e5c13a7d0b24134 commit 92d9d996538bd6bdb1e6d35a7e5c13a7d0b24134 Author: Marcin Cieslak AuthorDate: 2026-02-25 01:58:59 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:43:30 +0000 Do not fail 'devctl clear driver' if another driver is not found Detaching the bhyve(4) ppt driver from an unsupported PCI device should not raise a "Device not configured" error. We do not expect that a new driver must take over the device in this case. Reviewed by: imp, jhb Differential Revision: https://reviews.freebsd.org/D52050 (cherry picked from commit fba56be09f1c344cc5805b898fbfef6066950942) --- lib/libdevctl/devctl.3 | 3 ++- sys/kern/subr_bus.c | 14 +++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/libdevctl/devctl.3 b/lib/libdevctl/devctl.3 index c8a4704825c2..94fe350e524b 100644 --- a/lib/libdevctl/devctl.3 +++ b/lib/libdevctl/devctl.3 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 4, 2019 +.Dd February 24, 2026 .Dt DEVCTL 3 .Os .Sh NAME @@ -193,6 +193,7 @@ is true, the device will be detached from its current device driver. After the device's name is reset, it is reprobed and attached to a suitable device driver if one is found. +If no suitable device driver is found, no error is reported. .Pp The .Fn devctl_rescan diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 1001aab2dc54..37c4bfa2cf78 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -5961,7 +5961,19 @@ devctl2_ioctl(struct cdev *cdev, u_long cmd, caddr_t data, int fflag, dev->flags &= ~DF_FIXEDCLASS; dev->flags |= DF_WILDCARD; devclass_delete_device(dev->devclass, dev); - error = device_probe_and_attach(dev); + + /* + * Don't use device_probe_and_attach so that failing + * to find a new driver isn't reported as an error. + */ + error = device_probe(dev); + if (error == ENXIO) { + error = 0; + break; + } + if (error == 0) { + error = device_attach(dev); + } break; case DEV_RESCAN: if (!device_is_attached(dev)) { From nobody Fri Apr 24 17:56:09 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHF5cQNz6ZxNs for ; Fri, 24 Apr 2026 17:56:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LHF0bR6z3qJ2 for ; Fri, 24 Apr 2026 17:56:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8FdRzMlCoD17Wy7Wj5Z+cQ4q4CkbvLpIeBdsqUR3Rw4=; b=qBE2ybPASR3gvuiA5lsvBtwo3TgMaX6xVbvK9U0HRA+3dbzFAl2VWqb0MANu5gwGPnhslu wrahoZ0fVVHk5Wkf5CudjGFg+Qf1U78NtKMjUiR+w56Auh0i1yzovX5mGCPxv4IKq8M/g/ 0928OPqhFp/Tx5DOjbA6QSKyyUkvrKPkvbT81iXfoEawJxdodhdMZtncMm2A8TTUlHFSOQ LntUQ7S2tbcBNVvzC+6zkENWVXqX1iJEm6WUgwPv71CbIMjR5t0WGZ1NkMRyoJ9nF96MAO 1uvIZKiP6Akyu7ifn5DIysWdzos1Tf0YIUJSa7DCplBW0jtXRBvcnTZNDLy94A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053369; a=rsa-sha256; cv=none; b=CsaoyrkrJIajdZvIjHr6lxN9fMyeLxyK3PUhfQ8XL3gU2TUK3SHEV9ad5BIFTpma7PaH1L sI8QlKKI6jJiGXqDZhtcRglRxqMLbx3F4OoC2YCkP8Nso4h1HrwOXH0h4MIKlk4UZ35WBk ifmYgDD/7qvD9nN/CcVEsY6Ajnw0CB3tLPizNjPnsxnUAQmyNZw/q96/DIOd7KVYJXIu9e Q2djuAQ9BlON8+Tx8CBbI6TmJZ9tk0/8n3O/2S8Iz3AD2jeT62GvP5wf/l5XICGPAeSQyX KVcN3fna8kSdI5UXKv2SVC2uyNklc2FhmrndmRQDvu/MmZgeYIB2fT9/LyDC8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8FdRzMlCoD17Wy7Wj5Z+cQ4q4CkbvLpIeBdsqUR3Rw4=; b=Ep7bH1UlcMwAcSSVkaQUtryWGLwx4maSjecI+QkWiJZzSoPE0IOH8iXOI4TVCYa130F9OK OYjTmP1jTtbVN2EfMzP4qBilU3e5jMUSONUlW++efng/FmLvK8TzwQJPtif+nlBJQpOPfb FuDk4xY2Sjf5jbZArzuIRSvGURUeEWX/DI8qsft3A41irO9kGGo1PRTv13mfdafSuD1nJ9 ODH3ep4CWP53QmjrBufyK61qmg0y8U3ECuZCQLt8Nf0b1UOE3TWM6S9VBOTOt3b7vumaFf tvFmZaLZb7iDWG2ZIZDl6BmOojt46FZ9rZgcyPwuiIugfffW9EXkYBTQ85PUYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHF0BkXz1C4X for ; Fri, 24 Apr 2026 17:56:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1d5bc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: dbba1080f245 - stable/15 - bsd.linker.mk: Document ifunc, ifunc-noplt, riscv-relaxations 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: dbba1080f245a154f721fdee67dcad129071bc65 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:09 +0000 Message-Id: <69ebaeb9.1d5bc.7c7a46eb@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=dbba1080f245a154f721fdee67dcad129071bc65 commit dbba1080f245a154f721fdee67dcad129071bc65 Author: John Baldwin AuthorDate: 2026-03-05 19:07:09 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:43:55 +0000 bsd.linker.mk: Document ifunc, ifunc-noplt, riscv-relaxations features Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D55655 (cherry picked from commit 1b77f6ec6b9f5e0e916e2f559f045262645f2364) --- share/mk/bsd.linker.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/mk/bsd.linker.mk b/share/mk/bsd.linker.mk index 95d98231b641..116b437e6de9 100644 --- a/share/mk/bsd.linker.mk +++ b/share/mk/bsd.linker.mk @@ -12,8 +12,11 @@ # linker support for that feature: # # - build-id: support for generating a Build-ID note +# - ifunc: support for indirect functions +# - ifunc-noplt: support for indirect functions without PLT stubs # - retpoline: support for generating PLT with retpoline speculative # execution vulnerability mitigation +# - riscv-relaxations: support for RISC-V relocation relaxations # - bti-report: support for specifying how to report the missing # Branch Target Identification (BTI) property (AArch64) # From nobody Fri Apr 24 17:56:10 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHG3Dm5z6ZxW0 for ; Fri, 24 Apr 2026 17:56:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LHG1Vnmz3qJP for ; Fri, 24 Apr 2026 17:56:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JpqQMTP2qxNh5O3MVO0Wy8jxErWRCD9dpQsUeZIpLW0=; b=LQO27hlBqlKntSza+fGBMVWIomEn+Qsu3O3reqxzzumbt/WPRZzRbIaeNlnnSOhE7Qs2DM 41uXF3xkFB9KgMXiNjec5C5NG07aUfXaDZSsMjzId3Rsvme1MbYaAy+LTdQlAjYZ9vUpWX MjF4PtvQC9xHPKWdGX/jggns+KEh8NTgyAOhKLuPGkMBQjxgMGvy/AP3+XD7pqGWCNXaZT V+UOaV9IDu3gkSPed0NUyGlz+gnPPZCJJEMOf0KLeD1/xVSTpFxZN4QTtd2Nzjj96IbmbN zhtRrhGnN/xwtpzvewxZKUcxN6U32MfpEllXxxdlJ0I+LwXpmHr46U3P4JMyag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053370; a=rsa-sha256; cv=none; b=NIhzW8vRc8m46vSwb91+pAcqOpq3ypiEzQjtLmtoS45JWl9IpZVUpEmrYN7pW0wpwnsSm4 ba6CPZgXaksHd60+UrH8k9OStKEcXpOwhBYT4ynEwkzvi3s9nj9W0m124/aJj2wQC5KN72 bJuWMumq61pvIgfHeMpEgz7+XnOYmgwmiTVRd4mi8r/+sAGBvKQODyt71QY1tzWvIm4V09 6EM5ML686+2QPjvHqirmVY0lTD3BdM8VaNHa+vG/8NkCKRz6KFU/TnlMddRkkjqKDPR94B ddoraFq8L2J45xX37IphuD8phkCDbzfMEfBy3xu90nbabXohHwkehAE++Y5J9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JpqQMTP2qxNh5O3MVO0Wy8jxErWRCD9dpQsUeZIpLW0=; b=HNDB5JE2s6+3LKxN+TQ5idnIiK1wwgmCnkHVcbVuctjh0hGCGnFqwvajZ6nt1c0Yn95Tt6 GCYBNGBlapqcoTJd+ju6JpchtoB0Qc1QqytahEQMaofzdANZqJ4rIFKnUXOyQpb22VgPIE 6m2449EGwCiZ2zrgFKxYETSWWE2G3jgYbKPgo81nNbtNA8xXvL1rHXszyy5pnN8cPAdbVf eO6C1sLGRpbsN9URGEwOAqUCGefMxeHAhcRjR2YP0AHt9kUWTe6qoVxtUQR7WymuRDbzd+ PdW+1yViFaSEJ1HH74LB5ofmjdtJIYGciQSWfTDkCnk32TFBRi8kp7Zk1g7SCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHG0xpDz1C4Y for ; Fri, 24 Apr 2026 17:56:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1dda7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: c23161bc1afc - stable/15 - bsd.linker.mk: Sort list of linker 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c23161bc1afc3d158f376accce8a8c23ec3bfb52 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:10 +0000 Message-Id: <69ebaeba.1dda7.68f745d0@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c23161bc1afc3d158f376accce8a8c23ec3bfb52 commit c23161bc1afc3d158f376accce8a8c23ec3bfb52 Author: John Baldwin AuthorDate: 2026-03-05 19:07:09 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:44:03 +0000 bsd.linker.mk: Sort list of linker features Reindent the features as well to be friendly to long feature names. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D55656 (cherry picked from commit cf92fa337074b0ac36f89b826ecf0769a1c45609) --- share/mk/bsd.linker.mk | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/share/mk/bsd.linker.mk b/share/mk/bsd.linker.mk index 116b437e6de9..4b3305dc82b3 100644 --- a/share/mk/bsd.linker.mk +++ b/share/mk/bsd.linker.mk @@ -11,14 +11,14 @@ # LINKER_FEATURES may contain one or more of the following, based on # linker support for that feature: # -# - build-id: support for generating a Build-ID note -# - ifunc: support for indirect functions -# - ifunc-noplt: support for indirect functions without PLT stubs -# - retpoline: support for generating PLT with retpoline speculative -# execution vulnerability mitigation -# - riscv-relaxations: support for RISC-V relocation relaxations -# - bti-report: support for specifying how to report the missing -# Branch Target Identification (BTI) property (AArch64) +# - bti-report: support for specifying how to report the missing +# Branch Target Identification (BTI) property (AArch64) +# - build-id: support for generating a Build-ID note +# - ifunc: support for indirect functions +# - ifunc-noplt: support for indirect functions without PLT stubs +# - retpoline: support for generating PLT with retpoline speculative +# execution vulnerability mitigation +# - riscv-relaxations: support for RISC-V relocation relaxations # # LINKER_FREEBSD_VERSION is the linker's internal source version. # From nobody Fri Apr 24 17:56:11 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHJ425hz6ZxW3 for ; Fri, 24 Apr 2026 17:56:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LHH2WbDz3qTg for ; Fri, 24 Apr 2026 17:56:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aEIFI7mkzUiIRWgbuxm+azNWpIkGdUi0fZw03i4HMH4=; b=GnbDUR1uclbS2rlF3PPERfMsiOaQmULA7OIGDN1ISt83v57bcXRqMCDDeRTl5NA+rJGaX+ 0RhP1YmleNG+OKJVSzU6Q9+9FAKNlmmNRm4cyDkoz76cB9Izs1n+vXTkfCIKlgm/0bCO7w qUc8d/3X1mGBN00pMwaus9SGmT8kMCHXw2oQwphHMkqE/5SYP5qUMIUMYgSGXGGS+ezLj1 9DU2TkSZkklwdvV4sgDF4y9UJhrTuJGZHy90Rc1Y3aGCgqOYzXn/MbZ2I5S4RuDZY+8S03 HLobjwmQeownBXIWQsBfNASg+D5n5p9otGb3hsxDtqlVHtf/bt9IB+Ss+JQbAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053371; a=rsa-sha256; cv=none; b=ne1Fivr2c/KGp9LlK9mZfKW0nUJe06GBhBmD7hqACTssaWb3dyHT5hhUUqEYi0boci2Kcd 8sDmI2DUaL6WdYTuM3Q03VR244IHed9ZT1hlSc9uszLmezqWIVj3bUkrOHrJZWNGkRjSfZ semL7MGfKSv+G1knE+9XTflejcoK571GUc/R4YJIN2oZAciryqA5sO5yJnRsNlEhDkYaOL Pm5iZqQz5mlgdBOk+Q54dZRyu/tpo2Cra21FNz9K0qC/TbVQX5VGafAd0CkTAf5S+95CEY QS/vK2zMytiNPxN9gS+eubF4jsOUftl9cg7FmtTc+ahM/u17d5wXibTzkMNviA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aEIFI7mkzUiIRWgbuxm+azNWpIkGdUi0fZw03i4HMH4=; b=boshRmvsfAZVgRmjz1TT1Wa1t+dS8NLVvLpRHUNEWXqRjDEdRywXsqpFrD3BIiuBdvjdmx LIxf51CX0SpNCI8Jacdksv+KzUoW4U9qPNzSkCsCDOoeDI1bgpOT+EDawrqq02I0MHvavZ ijDvzf1Y3FA9tDj9sMIPA4WKzImvQ9ojfYhrY67VRAwpea783NYL6WngnlKLh3F0zgorlP mBWi+eEzRoKoai609TN2LQ6AZFCRzUBGC9pvCTcI1l34SdwjrU5AJCjxOsjr4k1tT8fo05 m0mrI0Qi6q2dv//1VTSCmcs59ICtvUFoSY4IQuYvJCI1DdtBCqqfdsvnqgDlLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHH1xt6z1CGB for ; Fri, 24 Apr 2026 17:56:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e1ea by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 0a9ffadcf9ff - stable/15 - libc/quad: narrow list of symbols exposed for 32-bit arm List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 0a9ffadcf9ffa0796973ee7c603016e5b4b848df Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:11 +0000 Message-Id: <69ebaebb.1e1ea.56fb6ad9@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0a9ffadcf9ffa0796973ee7c603016e5b4b848df commit 0a9ffadcf9ffa0796973ee7c603016e5b4b848df Author: John Baldwin AuthorDate: 2026-03-05 19:07:09 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:44:10 +0000 libc/quad: narrow list of symbols exposed for 32-bit arm lld doesn't notice, but ld.bfd complains. Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D55657 (cherry picked from commit 27cfa8ec633ae7527dc6187c6a78db04983c9ccf) --- lib/libc/quad/Symbol.map | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/libc/quad/Symbol.map b/lib/libc/quad/Symbol.map index f7dcdebfc7ae..7c60d8183b75 100644 --- a/lib/libc/quad/Symbol.map +++ b/lib/libc/quad/Symbol.map @@ -8,36 +8,50 @@ FBSD_1.0 { #ifndef __i386__ __adddi3; __anddi3; +#ifndef __arm__ __ashldi3; __ashrdi3; #endif +#endif +#ifndef __arm__ __cmpdi2; __divdi3; +#endif #ifndef __i386__ +#ifndef __arm__ __fixdfdi; __fixsfdi; __fixunsdfdi; __fixunssfdi; __floatdidf; __floatdisf; +#endif __floatunsdidf; __iordi3; __lshldi3; +#ifndef __arm__ __lshrdi3; #endif +#endif +#ifndef __arm__ __moddi3; +#endif #ifndef __i386__ +#ifndef __arm__ __muldi3; __negdi2; +#endif __one_cmpldi2; #endif __qdivrem; #ifndef __i386__ __subdi3; #endif +#ifndef __arm__ __ucmpdi2; __udivdi3; __umoddi3; +#endif #ifndef __i386__ __xordi3; #endif From nobody Fri Apr 24 17:56:14 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHL75Gwz6ZxLM for ; Fri, 24 Apr 2026 17:56:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LHL44Fdz3qK6 for ; Fri, 24 Apr 2026 17:56:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N0ZG219epcgGnc3ZpZnmwYCROlm4AWebxN184/Lq8Is=; b=EoCSy69XYIrK6onuUfuHwuRnDnya25dSB/GrJuvV6BFUcgToA1jI37OnuRgTwWmYvAn9kq 3psvtFixLlc1Fta6nXdoI+SMf+oNlleUZR08aMBVd0uf5qU3QV9NGRXbj3YWP/i8fI8EI3 JGl9Vl3KsxTpU/r25HBlV+++d3xgVrlVYxxtLwCVSC8I80G9spN6Au2OJ32zbu3DmO9E5b D5341KLCe+5P+viMDTqhMHQZbcwtsV5sxsO2nKPtH/YGD4/Ta3a99zu240snMQ1auF+dEx 02HQkLkP5mUv8za1toBnJ0ad0PNjMGNPka0EYcyGl3CaYVM0lNSPsJwlkIkDKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053374; a=rsa-sha256; cv=none; b=ltrG3pHOe8KAaivDqWN7kgnZc5SDA3sjHW8M5xdGcKy8uw4xXyOLlWZugh0LutkUEFwu0k yKqEQNIYHvMU1+zdIXWYcrWWSn7nbMi3c6eRApbFBLGJnD9n0NQVNEeQNuQDRE4mt0aIFV +22fi+io5x6Hd5WUAel3PaeCSSQzzWdplSg2wC59ceDBU6nFnODPtJai0V6M0Dlfu+3bMd dZvwkj6NwqTg4kDWZQnf+1oJEBXQ/OM/KS/ARedbfJnVq1gXNnwKudkqwb9D3magPrAzZq DdWoHNlMq4TI0+fPuq456KLcVd7gBaPjYZr9v416JJhISBa37Xo/3YP3JVkquQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N0ZG219epcgGnc3ZpZnmwYCROlm4AWebxN184/Lq8Is=; b=UkoiRHzd5hkq5Ez4437h+g0sqA3V369yglW2JJJW32o5a0wH2m/inYSWdv4z9Ye9DAkeDL D5KHI9NUCj+NGJu/kUENuOt2N8Mx3yFoZmfHFulQLzGFDzLSeSP23YrgRLzOPlxOc+90uv moDqGxi+XRWQgUKi/bzweruvNqotroZD6m+xjeqsTfmwEYgY0OkZY4xVgAILF5sneOEgIa XEkzMZHhvQku/vLTLs/WwN7PIxQo7GuOxqCM1Nz3+ojnkeX6gZnXPKBkaxn4hznQ+x9D25 6wvXulv7vXIjnHLOwOfRpeujWH3pcRZZmE6bGDLPwYkJ/y4+uI8e8iPaZHA+/g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHL38w0z1CQN for ; Fri, 24 Apr 2026 17:56:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1cbd1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: b9a823bcb986 - stable/15 - devinfo: Support PCI DBSF and ACPI handles for -p List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b9a823bcb9868468aaf01a04746c80b202d48554 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:14 +0000 Message-Id: <69ebaebe.1cbd1.7b3fce2@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b9a823bcb9868468aaf01a04746c80b202d48554 commit b9a823bcb9868468aaf01a04746c80b202d48554 Author: John Baldwin AuthorDate: 2026-03-06 20:36:05 +0000 Commit: John Baldwin CommitDate: 2026-04-24 17:33:52 +0000 devinfo: Support PCI DBSF and ACPI handles for -p When matching on a name of a device, match on ACPI handles and PCI selectors in addition to device names. This can be useful for matching on devices without an attached driver. For example: devinfo -p pci0:0:31:0 Reviewed by: imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D55673 (cherry picked from commit ca25b1b26379e27bf2bab7742a7b383ca0bfc7d2) --- usr.sbin/devinfo/devinfo.8 | 22 +++++++++++++++++- usr.sbin/devinfo/devinfo.c | 58 +++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 78 insertions(+), 2 deletions(-) diff --git a/usr.sbin/devinfo/devinfo.8 b/usr.sbin/devinfo/devinfo.8 index 15a6059c166f..2dd82419b1ed 100644 --- a/usr.sbin/devinfo/devinfo.8 +++ b/usr.sbin/devinfo/devinfo.8 @@ -26,7 +26,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 August 28, 2025 +.Dd March 6, 2026 .Dt DEVINFO 8 .Os .Sh NAME @@ -53,6 +53,26 @@ The following options are accepted: Display the path of .Ar dev back to the root of the device tree. +.Ar dev +can either be a device name, +the absolute path of an ACPI handle +.Po must begin with a +.Dq \e +.Pc , +or a PCI selector +.Po +either +.Sy pci Ns Fa domain Ns : Ns Fa bus Ns : Ns Fa slot Ns : Ns Fa function +or +.Sy pci Ns Fa bus Ns : Ns Fa slot Ns : Ns Fa function +.Pc . +.Pp +If +.Fl v +is specified, +each device is output on a separate line including the device name and +additional verbose information; +otherwise, a space-separated list of device names is output. .It Fl r Causes hardware resource information .Pq such as IRQ, I/O ports, I/O memory addresses diff --git a/usr.sbin/devinfo/devinfo.c b/usr.sbin/devinfo/devinfo.c index 43d88481d903..bea082ba6285 100644 --- a/usr.sbin/devinfo/devinfo.c +++ b/usr.sbin/devinfo/devinfo.c @@ -275,13 +275,69 @@ print_device_path_entry(struct devinfo_dev *dev) printf("\n"); } +/* + * This assumes the string to be compared in *cp is either space or + * nul terminated. + */ +static bool +match_value(const char *cp, const char *name) +{ + const char *end; + size_t len; + + end = strchr(cp, ' '); + if (end == NULL) + return (strcmp(cp, name) == 0); + + if (end == cp) + return (false); + + /* NB: strncmp(3) would return zero if name matches a prefix. */ + len = end - cp; + return (strlen(name) == len && memcmp(name, cp, len) == 0); +} + +static bool +device_matches_name(struct devinfo_dev *dev, const char *name) +{ + const char *cp, *val; + + if (strcmp(dev->dd_name, name) == 0) + return (true); + + if (*dev->dd_location) { + /* Permit matches on the ACPI handle stored in location. */ + if (name[0] == '\\' && (cp = strstr(dev->dd_location, + "handle=\\")) != NULL) { + if (match_value(cp + strlen("handle="), name)) + return (true); + } + + /* Permit matches on the PCI dbsf stored in location. */ + if (strncmp(name, "pci", strlen("pci")) == 0 && + (cp = strstr(dev->dd_location, "dbsf=pci")) != NULL) { + cp += strlen("dbsf=pci"); + val = name + strlen("pci"); + if (match_value(cp, val)) + return (true); + + /* Also match on pci:: for domain 0. */ + if (strncmp(cp, "0:", strlen("0:")) == 0 && + match_value(cp + strlen("0:"), val)) + return (true); + } + } + + return (false); +} + static int print_device_path(struct devinfo_dev *dev, void *xname) { const char *name = xname; int rv; - if (strcmp(dev->dd_name, name) == 0) { + if (device_matches_name(dev, name)) { print_device_path_entry(dev); return (1); } From nobody Fri Apr 24 17:56:13 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHK55HDz6ZxW5 for ; Fri, 24 Apr 2026 17:56:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LHK3B6pz3qM4 for ; Fri, 24 Apr 2026 17:56:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d8zNnbbQ+algJUZR6WcnjGXVXkkmXtTavEd8V4oX5/g=; b=FvA6OyT3fRPcwA/tx5tnnezIDJRC6SgXzBw6Jjpouiu48WcdDlW1VsCq3OBZubfd2lb8DN MDqFjkJVGaZWXbMvR2E7CN66sN4naeGUWajj9W1ZNzXm/909qQ+HaHufTHy2bPcFQ+r+62 GAv2+RU/W4udagjVx8W9oMtTTQ77moU4Y77S1SdMhOnaiOvQfPxI7+WJ34pFn3wanmlM4r bECIgLV/ULOpmXxQGEo6h0C/igTStWrziZywtX2LwTdXjuMIkrC7dsQWgHtuSoWlyZk9kU batyZ4nTuXU9JYlpAaZhypKE/TF6g9ctqY5+4scrBKeJRS2cSLvKmR01Z5HGGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053373; a=rsa-sha256; cv=none; b=qFkQQt3ZVCUXEtb/f5SYSRp08Bh9ApTGKUSJSaf3Bwy0xAiwu0mOzzdu8h16xyvtu/C2W4 XnahqbCbDiZkBGalrjCMkvMUBtn4eXc/beXyOKZhDNIG+MgJjcHByjImM/vJf+vfSHAGbQ onmYtcVM0smj0hO2TRKSLN5Jx/0zY3Vzla5Wl82vleZfXzMOEvbTrGpB2F7jt5E+ihHX8l waRJY6VmEpsPJxHcngUeHQHbahQV8pQpcr092qfKm5pR4ieFlqPP7wMCZfai6p8wSIUO8F eUM6g5ZK7OGO76x1rTEgf3CW0vmtOfIXhu9PtS1VFN35NYUqpmi6uIgrhCkrzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d8zNnbbQ+algJUZR6WcnjGXVXkkmXtTavEd8V4oX5/g=; b=ljgOsXXx7oZlo0zE3mvbj6NagKgW7N/BOzKjSORyGro+XnLNIUUrY8VgdfTtr81MgQgD1M kFDOcLnJROFC2IEyHGiuTjX4wgYS5BujuQO9EUMKjIZulIy8N0zoyLtt8m6QoWF9pzvkJ1 fikV4vfUBIaQhWbS/+j3eSFoMemiuGVDmw4mycV5LGfOt8vE+Fnggdmh1DSK/I8sunBwT7 TyidBo4ANeZrSC4j0AQ+YLEJ9OpaMOeAzGRQGUx6daKckY08qu5qw/dcyd6Bfb7HIlexCC kREFir1PglQgZa0RuEqDFiPqMEadGv8YwSfZkeqgCdseDacmW/bfUD/hMWCAhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHK2ksjz1CM5 for ; Fri, 24 Apr 2026 17:56:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1d10d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Xin LI From: John Baldwin Subject: git: 65d949e9a81e - stable/15 - libc/quad: fix missing closing #endif in Symbol.map List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 65d949e9a81eab15955a15e08c7b3a10830299e4 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:13 +0000 Message-Id: <69ebaebd.1d10d.7a927249@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=65d949e9a81eab15955a15e08c7b3a10830299e4 commit 65d949e9a81eab15955a15e08c7b3a10830299e4 Author: Xin LI AuthorDate: 2026-03-06 08:22:06 +0000 Commit: John Baldwin CommitDate: 2026-04-24 17:33:38 +0000 libc/quad: fix missing closing #endif in Symbol.map Without this lib32 libc.so.7 would be missing critical symbols, including malloc / free and all syscall wrappers. (cherry picked from commit 8dd28e13e41b6200e58d6e99981ff8323cff3711) --- lib/libc/quad/Symbol.map | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libc/quad/Symbol.map b/lib/libc/quad/Symbol.map index c28f9a180704..251814cb238f 100644 --- a/lib/libc/quad/Symbol.map +++ b/lib/libc/quad/Symbol.map @@ -50,4 +50,5 @@ FBSD_1.0 { __udivdi3; __umoddi3; __xordi3; +#endif }; From nobody Fri Apr 24 17:56:15 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHM6fF3z6ZxYs for ; Fri, 24 Apr 2026 17:56:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LHM4YGgz3qKF for ; Fri, 24 Apr 2026 17:56:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2ZrfB+EZRNimGDYbzZX73kM0tPMylnH+xoEU+k/i+m0=; b=MdfWhMSNQCw+vslKRXMF2VUqqp/hYtF45WeyLNcwvpXCmGL1E1qgUhUmSqQIikl+BntKEX sLGKE7BR2qK8skhcJ4x72DX11qOfnOwPvGjtjPL2+zZYd/Sfmg1Z1w6pxViOhfMOcPrJ0G jV+gdyTawA3yHtNTrMJa0tjNX4kRiQjQL+4ZHMoDYrv4fK9LiklsUrnq3GuUALoAZoH4pd WGVnD+IZRVH6z0S+s1ZaMeoeVJykME9CHpjIOlUlcjFweobeuPGjaHOTEwThqbFkAEg+eK 8oH/nS8zZmiJIQPhitn9X3fZOGQm6ejNMD07mfqdSkEDVN/gMKv+9gQB/LIkLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053375; a=rsa-sha256; cv=none; b=svyzRaEmlUvCM3IyIG4UNEfdGqqayPA1Tq93GM5ekn6K/nNpTcVKjXDw94dWmM1+fE5bwk QBB1EDB/f9rJp0F9LdIS62ZvRQTx5Ks/lN1cVkK297cha9MimHsYABSGUSnXc9sz1jyLfi Ur7tlnjp+vW2knQEufb/3stXkVz/ognjip9pkl6MDozOeSRL3mkUCZ9mag2jZkWtckjnJW NY6QuKATYdLmhRMkxAlB3SSk3W9j6kyDKALS/aI8MMmnunvl21g8PTgvOCiXB5c1/HSp1/ mYaFDbGFZa+d2vW3ivOykgtna7A7MZMw+7p26k86UIiJ3tWW7+MuJ6v2Y9SRKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2ZrfB+EZRNimGDYbzZX73kM0tPMylnH+xoEU+k/i+m0=; b=Wgw+W228rKHGtTNPD2Wj7TyZBe5qMnFHkhpJxjrht4NxCx0EqtYHA6peROY9Cnb3TOzFQ3 v2ZfIZn+gftF6oTE7CPlZzhg/H9yvWHveF65tBdauaAZSe0uc4FJnxYUePwqUisqt2auE5 nlrGxpvSpoxvgo7Pjj2Iy8lPmfUBhVMhsx+S61305D01JpkpJwtgneHr4cRJvVgm+YXP/M 50Sw8wwo+8J+4qjMA3iqpFULurzxzyEDVT3g9I5kA7HVUvPFANgPsI9RACZlBg0rYovSgA M8xQK1C4Ac2IvoVkJy/6apuy3HepwmLfkPODnKAJUB/Y0gi+aL5sSOQAXdH+kg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHM44Tnz1CZ6 for ; Fri, 24 Apr 2026 17:56:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1dca1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 7f4940dd226c - stable/15 - sys: Don't pass RF_ALLOCATED to bus_alloc_resource* List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7f4940dd226c56db7758e8c234ac0dacb2867325 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:15 +0000 Message-Id: <69ebaebf.1dca1.580135ac@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7f4940dd226c56db7758e8c234ac0dacb2867325 commit 7f4940dd226c56db7758e8c234ac0dacb2867325 Author: John Baldwin AuthorDate: 2026-03-06 21:32:33 +0000 Commit: John Baldwin CommitDate: 2026-04-24 17:33:52 +0000 sys: Don't pass RF_ALLOCATED to bus_alloc_resource* This is a nop as eventually these flags are passed to rman_reserve_resource which unconditionally sets RF_ALLOCATED in the new flags for a region. However, it's really a layering violation to use RF_ALLOCATED in relation to struct resource objects outside of subr_rman.c as subr_rman.c uses this flag to manage it's internal tracking of allocated vs free regions. In addition, don't document this as a valid flag in the manual. I think the intention here was that if a caller didn't want to pass RF_ACTIVE or RF_SHAREABLE, they could pass RF_ALLOCATED instead of 0, but given the layering violation, I think it's best to just pass 0 instead in that case. NB: The bhnd bus uses RF_ALLOCATED (along with RF_ACTIVE) in a separate API to manage resource regions that are not struct resource objects (but a separate wrapper object). It would perhaps be cleaner if the chipc_retain_region and chipc_release_region functions used their own flag constants instead of reusing the rman(9) flags. Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D55683 (cherry picked from commit 1e4086d05297b711081fe06933677925c5ee6232) --- share/man/man9/bus_alloc_resource.9 | 10 +++------- sys/arm/nvidia/tegra_pcie.c | 5 ++--- sys/x86/iommu/amd_drv.c | 2 +- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/share/man/man9/bus_alloc_resource.9 b/share/man/man9/bus_alloc_resource.9 index 210abb3074e1..d69917d17ffd 100644 --- a/share/man/man9/bus_alloc_resource.9 +++ b/share/man/man9/bus_alloc_resource.9 @@ -26,7 +26,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 October 30, 2025 +.Dd March 6, 2026 .Dt BUS_ALLOC_RESOURCE 9 .Os .Sh NAME @@ -142,12 +142,8 @@ is used, if it is bigger than the default value. .It .Fa flags sets the flags for the resource. -You can set one or more of these flags: -.Bl -tag -width RF_SHAREABLE -.It Dv RF_ALLOCATED -resource has been reserved. -The resource still needs to be activated with -.Xr bus_activate_resource 9 . +You can set zero or more of these flags: +.Bl -tag -width RF_PREFETCHABLE .It Dv RF_ACTIVE activate resource atomically. .It Dv RF_PREFETCHABLE diff --git a/sys/arm/nvidia/tegra_pcie.c b/sys/arm/nvidia/tegra_pcie.c index ec272523df1b..c7a30965a5e5 100644 --- a/sys/arm/nvidia/tegra_pcie.c +++ b/sys/arm/nvidia/tegra_pcie.c @@ -1468,7 +1468,7 @@ tegra_pcib_attach(device_t dev) } /* * XXX - FIXME - * tag for config space is not filled when RF_ALLOCATED flag is used. + * tag for config space is not filled when RF_ACTIVE flag is not used. */ sc->bus_tag = rman_get_bustag(sc->pads_mem_res); @@ -1482,8 +1482,7 @@ tegra_pcib_attach(device_t dev) } rid = 2; - sc->cfg_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, - RF_ALLOCATED); + sc->cfg_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, 0); if (sc->cfg_mem_res == NULL) { device_printf(dev, "Cannot allocate config space memory\n"); rv = ENXIO; diff --git a/sys/x86/iommu/amd_drv.c b/sys/x86/iommu/amd_drv.c index bf7ac4b157c4..3a7b2819cbdd 100644 --- a/sys/x86/iommu/amd_drv.c +++ b/sys/x86/iommu/amd_drv.c @@ -494,7 +494,7 @@ amdiommu_attach(device_t dev) } sc->mmio_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->mmio_rid, sc->mmio_base, sc->mmio_base + sc->mmio_sz - 1, sc->mmio_sz, - RF_ALLOCATED | RF_ACTIVE | RF_SHAREABLE); + RF_ACTIVE | RF_SHAREABLE); if (sc->mmio_res == NULL) { device_printf(dev, "bus_alloc_resource %#jx-%#jx failed\n", From nobody Fri Apr 24 17:56:16 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHP1vZ9z6ZxcL for ; Fri, 24 Apr 2026 17:56:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LHN5Tdlz3qSL for ; Fri, 24 Apr 2026 17:56:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UyFZJvAUhOY0cfzki3C6olRhyRAIjXav2vpnNnGbiKE=; b=KZF/+8m7yTRrQ8jzxfO+NVg5VJ/1mIrR5ZO0we9eash27Y9v3/CwIZdFKUfD78GWlBc3qX W7/HdLCL7Ci5Uo0njF9wdiFaFm3kbWdndHnsWhh0HKb+5ZPe+37zeNiuehbPLGtVTBTyQx mHN2JvGbtECXK6bOnGxs0RD3iEnvVsxhuZo4gnAXzGZWlOfjXDTmJAmtJTIn069cOH2/sf 1/5HxucU/NKVrs2OrGhiEOUm1iEcVNaNEU2UDSxdqPShI6mXeGRIMWj3A6noanfVs06QyP gV0wog5oqGnf8e5i6NTiHPVF+gSPhdihtV8atza+nwlqv0KtRYZ+tMwN/9kpMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053376; a=rsa-sha256; cv=none; b=lALANC413slMXM22GOOa4OfFOPDQISZx6CvmrubzdzFpzSOZOTZbyMlPIlnAVL4oN4uXaN IDyyOpX/50IYDK3ponpA/oiJP6lj4HdiJPsj5kMc4th1VSf46LvDAfYGiHzQX73rPcn5Qj gvxdYhkI6Zryz1XWPPYzPdMau2W9srBNc4qtUhWJiStKFg/N7wvjat0ar5PYaJLaPcdqoR Ji6RQRsLeLj3sS3Mg6XAkQ6xLLH+Yp+FhqMqx3WiSSKp7W3TEnjlN3BoWE7YphPlRDZ+8o F5lITn3vMBXugRwsRHtJxTXZP+sbiQkEKQIMihqoF+is7I2EaHRMUL8zsHOU5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UyFZJvAUhOY0cfzki3C6olRhyRAIjXav2vpnNnGbiKE=; b=Xr7ywTm5F+1UElHulTitlqkzyb6I3H5h9QPkLfiG8EERLtX+1gfrTQ9Ipn4cqORxKJBhJR 68kDhuVVPJbeBJApMViV0/FPN7z19NxhDvTKVCjDTV/9ZyTWq/VHDQ0Ux1hKaHJBWUurWG vlh7wQYpyVD4vMsr7r5iXNL5l8sbYgTttLC4tlROdRZZDUm6ugDCH3+huDvgXU8ikv2G/g jOoILIkuqsuloQbN+EHFlQ4rPLP0QylCkpqb/+V92VyhnSbLmswuDwFQgoyL7ewGOanzrN 7bg7WOffBtQSGkGtsBDzoG3xuozIZt8w6XF6foZIWswgCjAdlFz84ew7/dyNdg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHN54Ygz1CQP for ; Fri, 24 Apr 2026 17:56:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1a17e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 656838ab3fcc - stable/15 - pciconf: Factor out fetching of matching devices from list_devs List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 656838ab3fcc5ae9d0be816bbdbb23549b6bd5b3 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:16 +0000 Message-Id: <69ebaec0.1a17e.69f93ea2@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=656838ab3fcc5ae9d0be816bbdbb23549b6bd5b3 commit 656838ab3fcc5ae9d0be816bbdbb23549b6bd5b3 Author: John Baldwin AuthorDate: 2026-03-10 16:48:04 +0000 Commit: John Baldwin CommitDate: 2026-04-24 17:33:52 +0000 pciconf: Factor out fetching of matching devices from list_devs The new fetch_devs function fetches the entire list of PCI devices into a single list, retrying if the list changes while it is being fetched. Reviewed by: imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D55768 (cherry picked from commit 9eb035ff8439195f565b9e3180b727333a4e7170) --- usr.sbin/pciconf/pciconf.c | 168 ++++++++++++++++++++++++++------------------- 1 file changed, 96 insertions(+), 72 deletions(-) diff --git a/usr.sbin/pciconf/pciconf.c b/usr.sbin/pciconf/pciconf.c index 4d3941131858..6aa33d332c08 100644 --- a/usr.sbin/pciconf/pciconf.c +++ b/usr.sbin/pciconf/pciconf.c @@ -200,23 +200,13 @@ main(int argc, char **argv) return (exitstatus); } -static void -list_devs(const char *name, int verbose, int bars, int bridge, int caps, - int errors, int vpd, int listmode) +static bool +fetch_devs(int fd, const char *name, struct pci_conf **confp, size_t *countp) { - int fd; struct pci_conf_io pc; struct pci_conf conf[255], *p; struct pci_match_conf patterns[1]; - int none_count = 0; - - if (verbose) - load_vendors(); - - fd = open(_PATH_DEVPCI, (bridge || caps || errors) ? O_RDWR : O_RDONLY, - 0); - if (fd < 0) - err(1, "%s", _PATH_DEVPCI); + size_t count; bzero(&pc, sizeof(struct pci_conf_io)); pc.match_buf_len = sizeof(conf); @@ -232,75 +222,109 @@ list_devs(const char *name, int verbose, int bars, int bridge, int caps, pc.patterns = patterns; } + p = NULL; + count = 0; do { if (ioctl(fd, PCIOCGETCONF, &pc) == -1) err(1, "ioctl(PCIOCGETCONF)"); - /* - * 255 entries should be more than enough for most people, - * but if someone has more devices, and then changes things - * around between ioctls, we'll do the cheesy thing and - * just bail. The alternative would be to go back to the - * beginning of the list, and print things twice, which may - * not be desirable. - */ if (pc.status == PCI_GETCONF_LIST_CHANGED) { - warnx("PCI device list changed, please try again"); - exitstatus = 1; - close(fd); - return; - } else if (pc.status == PCI_GETCONF_ERROR) { + free(p); + p = NULL; + count = 0; + pc.offset = 0; + continue; + } + + if (pc.status == PCI_GETCONF_ERROR) { warnx("error returned from PCIOCGETCONF ioctl"); - exitstatus = 1; - close(fd); - return; + return (false); } - if (listmode == 2) - printf("drv\tselector\tclass rev hdr " - "vendor device subven subdev\n"); - for (p = conf; p < &conf[pc.num_matches]; p++) { - if (listmode == 2) - printf("%s%d@pci%d:%d:%d:%d:" - "\t%06x %02x %02x " - "%04x %04x %04x %04x\n", - *p->pd_name ? p->pd_name : "none", - *p->pd_name ? (int)p->pd_unit : - none_count++, p->pc_sel.pc_domain, - p->pc_sel.pc_bus, p->pc_sel.pc_dev, - p->pc_sel.pc_func, (p->pc_class << 16) | - (p->pc_subclass << 8) | p->pc_progif, - p->pc_revid, p->pc_hdr, - p->pc_vendor, p->pc_device, - p->pc_subvendor, p->pc_subdevice); - else - printf("%s%d@pci%d:%d:%d:%d:" - "\tclass=0x%06x rev=0x%02x hdr=0x%02x " - "vendor=0x%04x device=0x%04x " - "subvendor=0x%04x subdevice=0x%04x\n", - *p->pd_name ? p->pd_name : "none", - *p->pd_name ? (int)p->pd_unit : - none_count++, p->pc_sel.pc_domain, - p->pc_sel.pc_bus, p->pc_sel.pc_dev, - p->pc_sel.pc_func, (p->pc_class << 16) | - (p->pc_subclass << 8) | p->pc_progif, - p->pc_revid, p->pc_hdr, - p->pc_vendor, p->pc_device, - p->pc_subvendor, p->pc_subdevice); - if (verbose) - list_verbose(p); - if (bars) - list_bars(fd, p); - if (bridge) - list_bridge(fd, p); - if (caps) - list_caps(fd, p, caps); - if (errors) - list_errors(fd, p); - if (vpd) - list_vpd(fd, p); + + p = reallocf(p, (count + pc.num_matches) * sizeof(*p)); + if (p == NULL) { + warnx("failed to allocate buffer for PCIOCGETCONF results"); + return (false); } + + memcpy(p + count, conf, pc.num_matches * sizeof(*p)); + count += pc.num_matches; } while (pc.status == PCI_GETCONF_MORE_DEVS); + *confp = p; + *countp = count; + return (true); +} + +static void +list_devs(const char *name, int verbose, int bars, int bridge, int caps, + int errors, int vpd, int listmode) +{ + int fd; + struct pci_conf *conf, *p; + size_t count; + int none_count = 0; + + if (verbose) + load_vendors(); + + fd = open(_PATH_DEVPCI, (bridge || caps || errors) ? O_RDWR : O_RDONLY, + 0); + if (fd < 0) + err(1, "%s", _PATH_DEVPCI); + + if (!fetch_devs(fd, name, &conf, &count)) { + exitstatus = 1; + close(fd); + return; + } + + if (listmode == 2) + printf("drv\tselector\tclass rev hdr " + "vendor device subven subdev\n"); + for (p = conf; p < conf + count; p++) { + if (listmode == 2) + printf("%s%d@pci%d:%d:%d:%d:" + "\t%06x %02x %02x " + "%04x %04x %04x %04x\n", + *p->pd_name ? p->pd_name : "none", + *p->pd_name ? (int)p->pd_unit : + none_count++, p->pc_sel.pc_domain, + p->pc_sel.pc_bus, p->pc_sel.pc_dev, + p->pc_sel.pc_func, (p->pc_class << 16) | + (p->pc_subclass << 8) | p->pc_progif, + p->pc_revid, p->pc_hdr, + p->pc_vendor, p->pc_device, + p->pc_subvendor, p->pc_subdevice); + else + printf("%s%d@pci%d:%d:%d:%d:" + "\tclass=0x%06x rev=0x%02x hdr=0x%02x " + "vendor=0x%04x device=0x%04x " + "subvendor=0x%04x subdevice=0x%04x\n", + *p->pd_name ? p->pd_name : "none", + *p->pd_name ? (int)p->pd_unit : + none_count++, p->pc_sel.pc_domain, + p->pc_sel.pc_bus, p->pc_sel.pc_dev, + p->pc_sel.pc_func, (p->pc_class << 16) | + (p->pc_subclass << 8) | p->pc_progif, + p->pc_revid, p->pc_hdr, + p->pc_vendor, p->pc_device, + p->pc_subvendor, p->pc_subdevice); + if (verbose) + list_verbose(p); + if (bars) + list_bars(fd, p); + if (bridge) + list_bridge(fd, p); + if (caps) + list_caps(fd, p, caps); + if (errors) + list_errors(fd, p); + if (vpd) + list_vpd(fd, p); + } + + free(conf); close(fd); } From nobody Fri Apr 24 17:56:12 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHP5hFJz6ZxLT for ; Fri, 24 Apr 2026 17:56:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LHP3KQWz3qSS for ; Fri, 24 Apr 2026 17:56:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mAUocHTwJokhale68WaOB+wh44zMgocwycRKwuzjhbY=; b=LXDlQfLVGXwp1LpzlQBCsMAAjzELKGuBfNm0o1sV5MnCPlgmje6NgUCi3Qjpmrs+qy0QkT rTpwqqmVWLz+nxz+9+aik2RmaoDx3x7qrrFLBEFq815jhDyhNvEoYchsMax8uhWkwYbvRH gG+fPakosszV2GGGL8OVHbV7+KSvc0NaEFdG8337i8/gXvCzf5kn8q2Q7r9w7+n6pdm3NZ 7w647AHfFm6FNxjjwVvYipghnf/bVpV0NHGFrezm6UrzNj9uD4aOoVVq+hzGmbAs7FkCAa A8K3blUtvewt0PK3YdRqvjjUBt71SbNzSZZsCZNf8W3hmTtIQcqw5kP7WQppjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053377; a=rsa-sha256; cv=none; b=euRktmIvpX+6UPkO/O7HTe6gRW7YMxwmj//rRzlYhF/JwcsQdxunp45ePGDS8IB7v9e84D 5OQL4Zf5/+QZWUdlN1SPXxnha/ojoPQXtyLWBHAxD2eULQ47VLksi9s9vdysOEjoTw/Xbm IQTLKmfB+JkvD+MhYnIS2+IQqNkPEKcqrZ4q/QoVQKqUC5/Sa2J5yzkDEbYJwB/P5fKBXh ilHy5d/EN/6JgrLK/ek6QWY553it62pd5hqRN47BXg4jQqnf/NWo7U/l0iC/d+rNIUt1PD lqZFpe4diQeJDPzyIDxyz3pin8PXKK63F8rODgBBV39IoUZTv1TwkwAtC1PgVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mAUocHTwJokhale68WaOB+wh44zMgocwycRKwuzjhbY=; b=E5jYeNAG3VMlsuAkte/p5L1J5CxH/X8NAiJveYCdX9+xbKn//A8Fd5s4tGgX4rRsYqxLIH TZzqpiOS4ovckZLhDLoBVWiqXKESHhdCwUHqCR0eTfxWe345C9hNwe4w7zii36e+m3iUA3 +4a7QtoWzLexs1SNhneNkQHd4jPmYyavbVFIzOmuLJnKfSbYppyQHomKBXcWy5NCDhQWpu +ETtZ9Y19suNY0oWYMKXl863V9XKnPTXE9th/0YMpH/lF5CHC9UyO7odBydgWhGOMBokCe lhdqm6K0zUcCOf6Dx/QGfasg04gkK7Q4TZQZOsmt72c4fnci6ZBc4Diwfj+j6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHP2SvBz1CQQ for ; Fri, 24 Apr 2026 17:56:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1ebe3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 893cf0292352 - stable/15 - libc/quad: Switch to per-arch lists of symbols List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 893cf02923522e85cb0cde979804f1619078069f Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:12 +0000 Message-Id: <69ebaebc.1ebe3.40ae1daf@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=893cf02923522e85cb0cde979804f1619078069f commit 893cf02923522e85cb0cde979804f1619078069f Author: John Baldwin AuthorDate: 2026-03-05 19:07:09 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:44:16 +0000 libc/quad: Switch to per-arch lists of symbols This more closely mirrors libc/quad/Makefile.inc and is easier to read. Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D55658 (cherry picked from commit 54bf594851f671e231d2786cdacaf68f290ff738) --- lib/libc/quad/Symbol.map | 43 +++++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/lib/libc/quad/Symbol.map b/lib/libc/quad/Symbol.map index 7c60d8183b75..c28f9a180704 100644 --- a/lib/libc/quad/Symbol.map +++ b/lib/libc/quad/Symbol.map @@ -5,54 +5,49 @@ FBSD_1.0 { * broken and they expect to see them in libc. glibc exports * them, but they do not appear to be exported in Solaris. */ -#ifndef __i386__ +#ifdef __i386__ + __cmpdi2; + __divdi3; + __moddi3; + __qdivrem; + __ucmpdi2; + __udivdi3; + __umoddi3; +#elif defined(__arm__) + __adddi3; + __anddi3; + __floatunsdidf; + __iordi3; + __lshldi3; + __one_cmpldi2; + __qdivrem; + __subdi3; + __xordi3; +#else __adddi3; __anddi3; -#ifndef __arm__ __ashldi3; __ashrdi3; -#endif -#endif -#ifndef __arm__ __cmpdi2; __divdi3; -#endif -#ifndef __i386__ -#ifndef __arm__ __fixdfdi; __fixsfdi; __fixunsdfdi; __fixunssfdi; __floatdidf; __floatdisf; -#endif __floatunsdidf; __iordi3; __lshldi3; -#ifndef __arm__ __lshrdi3; -#endif -#endif -#ifndef __arm__ __moddi3; -#endif -#ifndef __i386__ -#ifndef __arm__ __muldi3; __negdi2; -#endif __one_cmpldi2; -#endif __qdivrem; -#ifndef __i386__ __subdi3; -#endif -#ifndef __arm__ __ucmpdi2; __udivdi3; __umoddi3; -#endif -#ifndef __i386__ __xordi3; -#endif }; From nobody Fri Apr 24 17:56:17 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHQ2Ytwz6Zxdl for ; Fri, 24 Apr 2026 17:56:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LHP6Syvz3qDV for ; Fri, 24 Apr 2026 17:56:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FtFdk/qGqr/TufaXTYWJ/ABk2MZ5CD8wM5D9Uyz6doM=; b=CbDWMz5YxkywH0ImBBZE/Ntj0vCm1bwHRu3PEe3WfrIk7flFHKLWU2GUOHmg9rT1GVCvYZ yevliBYS4CulE51Y8S8+hpz5qK4TzelIIGPzYon8nCIijJeowOc7LAUlCENg+3VBE2rtJ6 35W3v64C4gGNQClfCr9ynrZKxbPKyd4HCffAha/34YuVm2gVUbtGixMCOPV1VKUAzMdS1a 5DGgv6d9ITVS19pM1rUwxPWdYQHNFVEto1P0S5AOFsPFwIOBimFbmpA3Lyk85AL+vzopRf RgjXSuKjjSIaAMA65MmLkoA8SA3LTL4/SdWW6vUMnFrtlgbyByH1uYNTXLtMqw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053377; a=rsa-sha256; cv=none; b=skVDbmevfZTgq6xDBFfNpLynzE+Sv+Pb0tG/kA4fftnPemqmWQkgp1YzQW69P5YxsBa8WS bD5xwbmb0lZ9VNDm39W4OhTfROYEhbBFNvJkcxhGu4z1MJ8F7bvWzjzAfsHGIa8jNji9NO XLf9BkRFwcGjZa9bERbUg7Whd9KNj3LZOm4nGRFs1e3npaViwPugz4NlKWwm1S0NCoDNGA TKiSXFNaI9MKEjyctDA21mWMdQ8AG13WhFfpRh9fUAEUR2/yu8ndW2JRtPzpYaPMXSJd9H b5gh4pIFy9vxivgykX9L5naebmR1hHTzr6M1sOwC8+kzWYt2M83BPNx7VFW1zA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FtFdk/qGqr/TufaXTYWJ/ABk2MZ5CD8wM5D9Uyz6doM=; b=vcxCj9aUYNi6a+4OzWDlenCWYGyez7ChFPnISMNxu9NWAlzB7fR3OdiebI9XupdjIB4vvh H9PROsvWFYUZihe2374/ThuDSdNUhpDS3Df6SODrKPa/vQz8x2cBxB2oN+mIF4a82IuDTY vG4XFI+gw4WufDjgBbxKE2aWFsx3Vg4AESo93oSj0CIQ/MS4FvgJ5qx6rHrzP7yt89itkp e7/r4h+fNbsXtTVdj7s5v9ZFYiB1rDPRVmnttx9KqACrVGyWsab7kELGCXUkgkNbSUvj1q KEdZD5jB8khjdvPhsoTlblQDd2GOUGOMQU3K10/zana0bFIOhYab+/gfx0nWEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHP649Cz1C4c for ; Fri, 24 Apr 2026 17:56:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1ec05 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: f1bf5417c64e - stable/15 - pciconf: Use a single enum to track the current operation 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f1bf5417c64ef9aef4878e3ae5a7854f7d87b771 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:17 +0000 Message-Id: <69ebaec1.1ec05.307b0caa@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f1bf5417c64ef9aef4878e3ae5a7854f7d87b771 commit f1bf5417c64ef9aef4878e3ae5a7854f7d87b771 Author: John Baldwin AuthorDate: 2026-03-10 16:48:16 +0000 Commit: John Baldwin CommitDate: 2026-04-24 17:33:52 +0000 pciconf: Use a single enum to track the current operation mode Reviewed by: imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D55769 (cherry picked from commit c8fb16542a52ca889c1adf56b2ce13b4ad4cf887) --- usr.sbin/pciconf/pciconf.c | 66 ++++++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 28 deletions(-) diff --git a/usr.sbin/pciconf/pciconf.c b/usr.sbin/pciconf/pciconf.c index 6aa33d332c08..6c26621ae186 100644 --- a/usr.sbin/pciconf/pciconf.c +++ b/usr.sbin/pciconf/pciconf.c @@ -71,7 +71,7 @@ static struct pcisel getsel(const char *str); static void list_bridge(int fd, struct pci_conf *p); static void list_bars(int fd, struct pci_conf *p); static void list_devs(const char *name, int verbose, int bars, int bridge, - int caps, int errors, int vpd, int listmode); + int caps, int errors, int vpd, int compact); static void list_verbose(struct pci_conf *p); static void list_vpd(int fd, struct pci_conf *p); static const char *guess_class(struct pci_conf *p); @@ -103,17 +103,17 @@ int main(int argc, char **argv) { int c, width; - int listmode, readmode, writemode, attachedmode, dumpbarmode; - int bars, bridge, caps, errors, verbose, vpd; + enum { NONE, LIST, READ, WRITE, ATTACHED, DUMPBAR } mode; + int compact, bars, bridge, caps, errors, verbose, vpd; - listmode = readmode = writemode = attachedmode = dumpbarmode = 0; - bars = bridge = caps = errors = verbose = vpd= 0; + mode = NONE; + compact = bars = bridge = caps = errors = verbose = vpd = 0; width = 4; while ((c = getopt(argc, argv, "aBbcDehlrwVvx")) != -1) { switch(c) { case 'a': - attachedmode = 1; + mode = ATTACHED; break; case 'B': @@ -130,7 +130,7 @@ main(int argc, char **argv) break; case 'D': - dumpbarmode = 1; + mode = DUMPBAR; break; case 'e': @@ -142,15 +142,17 @@ main(int argc, char **argv) break; case 'l': - listmode++; + if (mode == LIST) + compact = 1; + mode = LIST; break; case 'r': - readmode = 1; + mode = READ; break; case 'w': - writemode = 1; + mode = WRITE; break; case 'v': @@ -170,30 +172,38 @@ main(int argc, char **argv) } } - if ((listmode && optind >= argc + 1) - || (writemode && optind + 3 != argc) - || (readmode && optind + 2 != argc) - || (attachedmode && optind + 1 != argc) - || (dumpbarmode && (optind + 2 > argc || optind + 4 < argc)) - || (width == 8 && !dumpbarmode)) - usage(); - - if (listmode) { + switch (mode) { + case LIST: + if (optind >= argc + 1) + usage(); list_devs(optind + 1 == argc ? argv[optind] : NULL, verbose, - bars, bridge, caps, errors, vpd, listmode); - } else if (attachedmode) { + bars, bridge, caps, errors, vpd, compact); + break; + case ATTACHED: + if (optind + 1 != argc) + usage(); chkattached(argv[optind]); - } else if (readmode) { + break; + case READ: + if (optind + 2 != argc || width == 8) + usage(); readit(argv[optind], argv[optind + 1], width); - } else if (writemode) { + break; + case WRITE: + if (optind + 3 != argc || width == 8) + usage(); writeit(argv[optind], argv[optind + 1], argv[optind + 2], width); - } else if (dumpbarmode) { + break; + case DUMPBAR: + if (optind + 2 > argc || optind + 4 < argc) + usage(); dump_bar(argv[optind], argv[optind + 1], optind + 2 < argc ? argv[optind + 2] : NULL, optind + 3 < argc ? argv[optind + 3] : NULL, width, verbose); - } else { + break; + default: usage(); } @@ -258,7 +268,7 @@ fetch_devs(int fd, const char *name, struct pci_conf **confp, size_t *countp) static void list_devs(const char *name, int verbose, int bars, int bridge, int caps, - int errors, int vpd, int listmode) + int errors, int vpd, int compact) { int fd; struct pci_conf *conf, *p; @@ -279,11 +289,11 @@ list_devs(const char *name, int verbose, int bars, int bridge, int caps, return; } - if (listmode == 2) + if (compact) printf("drv\tselector\tclass rev hdr " "vendor device subven subdev\n"); for (p = conf; p < conf + count; p++) { - if (listmode == 2) + if (compact) printf("%s%d@pci%d:%d:%d:%d:" "\t%06x %02x %02x " "%04x %04x %04x %04x\n", From nobody Fri Apr 24 17:56:18 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHR6CClz6ZxZ1 for ; Fri, 24 Apr 2026 17: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LHR0Q9hz3qXm for ; Fri, 24 Apr 2026 17: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=1777053379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EDtXdnw9SZWp8KaFlNz2fV7SMhE5IJAjDFIPDF4w6Rk=; b=YVkQOCAGuGudZLW5mADT1Uh5eMlhTRIWoQbdroESGJ3YXD168ZxDpD4D6jwRd6pMLeJsUn O8/eIDYtcrywDVUKIlM6A6wewxRkJlSxn5QFnGWD8qSnH6SzlQADwS0H2rFXw+GXuXtvvm 7J3VrwfErn150b1NVJ4A3mFdU+NzSN2KnUGstyWg5pPlTCbWG2sgURwBMJFrcEbFTYjn45 5XTFto4OoEf+OiKBXouDDuNdmd8gHWNGyk22XoDUayPjRGv7KKDeiWcfKkuDDBqvHI0J16 JlDarHjZmWOjO1nqdpHrcgQTYeUJl8Rn7BgwJ/dQCDWszvSEhFGRNCzipK4hdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053379; a=rsa-sha256; cv=none; b=XefnTNZwrsykD4/HiWaNXD+yJe35K3Ff4xJuuTRx/v5kNU7pmTUbMHBxbhSsPgInjQvuNC JLNcPue50RGfVfVghcctyvQ/weafmTrZFf8FCZAexGc9vMfa1qONk03c7E7varq5fnzjou 4FTrNAxHCrSSP/bt/HPzMgGA8wIm2+jzSWpwyW2S18Jug5xKlZ1h1gHQrtXsC1ziuBRCfI 2HgAnxlB74EmhXSAFun9gomjTPxRTwXjz/GFyrzLi8VzkGnOUmpWo/w2nQ2WCO5ULNMMn/ VOGmhlBQg2pfOx+jKN4bfEUv7IyTPJg2bUrDeHvrXkQkFtBrrCg3Di4J4aXedg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EDtXdnw9SZWp8KaFlNz2fV7SMhE5IJAjDFIPDF4w6Rk=; b=mybzOrLpW3WHPTY9kGEtXeWOM4adDT6C9fLVm4a1JjZvJ3lMt9J7fNwLc+//PtUbFgS82C rxqn70gPuwvJ3yj2TJ8qrSTAL7E/pu/SVRCNHWZCe2p/S4F4YRYM/FATpPhybbRNaOYIQY J90YUF0IhAfRrGqACNtUyOOEy+3QO+kiMu8jCFs5seTMGpQ3jAyoz6lp5+Ynt/5Ziggv2U Ry+q1SPv16O10k8jQyRJUBYJwMcxJnUF9YJ23xlpeLF1lgsefEMrXimWKInGH0iuc37RhP eqpXParIiudA+2wMUA7BdFzTJq0AObeGudZ0Lj84Gi3j/yGbIJ78HVGPGNzlcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHQ6pwcz1CM7 for ; Fri, 24 Apr 2026 17:56:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1df8c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: f97ba9f0c863 - stable/15 - pci.4: Quote argument to -width for a list block List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f97ba9f0c86368736c9f441859a32f31f3812ca9 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:18 +0000 Message-Id: <69ebaec2.1df8c.56687817@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f97ba9f0c86368736c9f441859a32f31f3812ca9 commit f97ba9f0c86368736c9f441859a32f31f3812ca9 Author: John Baldwin AuthorDate: 2026-03-10 16:49:10 +0000 Commit: John Baldwin CommitDate: 2026-04-24 17:33:52 +0000 pci.4: Quote argument to -width for a list block This fixes an mdoc warning and also properly indents this list. While here, update the quoted argument to be the longest tag in the list. Also while here, correct the description of pd_numa_domain. NUMA domains are a property of the device, not of the driver. Reviewed by: ziaee, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D55770 (cherry picked from commit c3ac5f14c8b330c036149d1d24cd3369d1418de2) --- share/man/man4/pci.4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man4/pci.4 b/share/man/man4/pci.4 index b99747969035..f5d42efb4f37 100644 --- a/share/man/man4/pci.4 +++ b/share/man/man4/pci.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 31, 2025 +.Dd March 10, 2026 .Dt PCI 4 .Os .Sh NAME @@ -236,7 +236,7 @@ Driver name. .It pd_unit Driver unit number. .It pd_numa_domain -Driver NUMA domain. +Device NUMA domain. .It pc_reported_len Length of the valid portion of the encompassing .Vt pci_conf @@ -382,7 +382,7 @@ the memory-mapped PCI BAR into its address space. The input parameters and results are passed in the .Va pci_bar_mmap structure, which has the following fields: -.Bl -tag -width Vt struct pcise pbm_sel +.Bl -tag -width "uint64_t pbm_bar_length" .It Vt void *pbm_map_base Reports the established mapping base to the caller. If From nobody Fri Apr 24 17:56:20 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHS5MZTz6Zxf2 for ; Fri, 24 Apr 2026 17:56: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LHS0xSFz3qXt for ; Fri, 24 Apr 2026 17:56:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LdFRgrkPZCXK0FKWxA8pLRqac+ZiOe3NZRjU9E5FNj8=; b=fPS3JOiqXrtuhdzI+yzFkuh8lIpfNtXB7rjAiGzHUB1ReI05jWGZKVi/PuO5Kzl8n3uhmI gcFOdVQN1sOswqdPuON1X/C1KcPjNcr4hfIlnaWd2hJa69DONnx7nqHEFYM95Y+8Duom96 woSFLCckSV3yF99jzH+VY+hKFFA01CMleDxR8Nxs3nlup1i848+OFAtvoTCtMAFztVNRSY MVd3ke6PUL3xdCfxlWteX7T0vNL2BUEEE1qxu3MBoKjDl2zJKh65MuwK1xCn+6uoSb08A5 jqalhYyftuid9q+EGJAxicOieqElaM/1rh3VguYbMsR/j9oevxKBwORRRMZBgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053380; a=rsa-sha256; cv=none; b=P/159HeFjuaz6trCVV6NgO/hcpP1ytMfIR5FP6kB7ikylR/keOSBYbPb7jCxflZ3Eu0Ijc V2v2kjqAcjOdvJvQTas02oihEFr/FaCErm4s+8CWgyuOUS3lnpH88zoCnbTOdH5M5gFyW/ L711UCDCpFIYZBq3ni/YS45pTmvEwfHFzeX527Np6KV2ktM5777i7EgxmfRb3JqH/OwdSL jhwaJx2cwWlkdsBJcRHm1hQuIY2mVCxVlRwCwHRCcVKZ6MIZ1XA9r4molXJZySRZ2CE2Vg hhqGjdtVwLUrB1FE3eIb4V83KZhYBoXGS6NrLaA+WO0Jh0o5BOFS5EyJ4zrVSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LdFRgrkPZCXK0FKWxA8pLRqac+ZiOe3NZRjU9E5FNj8=; b=A/nlmYY7tOr45WZ0Jm/CpfRK58gNUSAR9o7FQyUjRoT+d6j0bo4nwjqXg6Yh+bpltS61+u 4RorGqg37ciRzFpCC29Ly1IShR3JcD1zed70DdwOFc+VNvt6MRsyIvCf6RqL4ohUThR7yJ g67yZbnfwxovIr99qfyxw38T/J6wB3vWthw3aE/PhUtT0PlAnMo3jHAv/Vm2aAqmY2JKde hiSIDysrMjXWMRcseBjST5GuMOmTDkD4JLKLXwuN3wn0RJPxreZT4Z6PvGokIif8sGe3AU OTwkcvwkcTatpMG6xgqsmJkhS1b7iZ/xGxfL4s6g3AV5u3jZskBgNlQQEV2X7A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHS0Rzwz1Cb4 for ; Fri, 24 Apr 2026 17:56:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1d5c0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 920d0afddc82 - stable/15 - pci: Export bus numbers for bridge devices in struct pci_conf List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 920d0afddc82a1a9e95f81ec3760555084050217 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:20 +0000 Message-Id: <69ebaec4.1d5c0.3d3d8959@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=920d0afddc82a1a9e95f81ec3760555084050217 commit 920d0afddc82a1a9e95f81ec3760555084050217 Author: John Baldwin AuthorDate: 2026-03-10 16:49:21 +0000 Commit: John Baldwin CommitDate: 2026-04-24 17:33:53 +0000 pci: Export bus numbers for bridge devices in struct pci_conf This exports bus information about bridges to userspace via the less-privileged PCIOCGETCONF ioctl. Previously if userspace wished to query this information, it had to use direct PCI config register access which requires higher privilege. Reviewed by: imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D55771 (cherry picked from commit 7e7a1b61531a29b4a0a5cdac66b96f420e6c66e4) --- share/man/man4/pci.4 | 6 ++++++ sys/dev/pci/pci.c | 3 +++ sys/dev/pci/pci_user.c | 32 +++++++++++++++++++++++++++++++- sys/sys/pciio.h | 4 +++- 4 files changed, 43 insertions(+), 2 deletions(-) diff --git a/share/man/man4/pci.4 b/share/man/man4/pci.4 index f5d42efb4f37..38a427e64f4f 100644 --- a/share/man/man4/pci.4 +++ b/share/man/man4/pci.4 @@ -244,6 +244,12 @@ structure. This should always be equivalent to the offset of the .Va pc_spare member. +.It pc_secbus +Secondary PCI bus number. +.Pq Only valid for bridge devices +.It pc_subbus +Subordinate PCI bus number. +.Pq Only valid for bridge devices .It pc_spare Reserved for future use. .El diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index cde98cb62cef..9a1dbc5f66ed 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -798,6 +798,9 @@ pci_fill_devinfo(device_t pcib, device_t bus, int d, int b, int s, int f, devlist_entry->conf.pc_progif = cfg->progif; devlist_entry->conf.pc_revid = cfg->revid; + devlist_entry->conf.pc_secbus = cfg->bridge.br_secbus; + devlist_entry->conf.pc_subbus = cfg->bridge.br_subbus; + pci_numdevs++; pci_generation++; diff --git a/sys/dev/pci/pci_user.c b/sys/dev/pci/pci_user.c index 9768030995e7..0e23363fba73 100644 --- a/sys/dev/pci/pci_user.c +++ b/sys/dev/pci/pci_user.c @@ -81,7 +81,9 @@ struct pci_conf32 { u_int32_t pd_unit; /* device unit number */ int pd_numa_domain; /* device NUMA domain */ u_int32_t pc_reported_len;/* length of PCI data reported */ - char pc_spare[64]; /* space for future fields */ + uint8_t pc_secbus; /* secondary bus number */ + uint8_t pc_subbus; /* subordinate bus number */ + char pc_spare[62]; /* space for future fields */ }; struct pci_match_conf32 { @@ -889,6 +891,8 @@ pci_conf_for_copyout(const struct pci_conf *pcp, union pci_conf_union *pcup, pcup->pc32.pd_unit = (uint32_t)pcp->pd_unit; if (cmd == PCIOCGETCONF32) { pcup->pc32.pd_numa_domain = pcp->pd_numa_domain; + pcup->pc32.pc_secbus = pcp->pc_secbus; + pcup->pc32.pc_subbus = pcp->pc_subbus; pcup->pc32.pc_reported_len = (uint32_t)offsetof(struct pci_conf32, pc_spare); } @@ -1315,6 +1319,32 @@ pci_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *t else dinfo->conf.pd_numa_domain = 0; + if (dinfo->cfg.dev != NULL) { + /* + * Re-read the values in case a driver + * changed them after the device was + * initially scanned. + */ + switch (dinfo->conf.pc_hdr) { + case PCIM_HDRTYPE_BRIDGE: + dinfo->conf.pc_secbus = + pci_read_config(dinfo->cfg.dev, + PCIR_SECBUS_1, 1); + dinfo->conf.pc_subbus = + pci_read_config(dinfo->cfg.dev, + PCIR_SUBBUS_1, 1); + break; + case PCIM_HDRTYPE_CARDBUS: + dinfo->conf.pc_secbus = + pci_read_config(dinfo->cfg.dev, + PCIR_SECBUS_2, 1); + dinfo->conf.pc_subbus = + pci_read_config(dinfo->cfg.dev, + PCIR_SUBBUS_2, 1); + break; + } + } + if (pattern_buf == NULL || pci_conf_match(cmd, pattern_buf, num_patterns, &dinfo->conf) == 0) { diff --git a/sys/sys/pciio.h b/sys/sys/pciio.h index 64c0b32cb8e2..58928544f171 100644 --- a/sys/sys/pciio.h +++ b/sys/sys/pciio.h @@ -79,7 +79,9 @@ struct pci_conf { u_long pd_unit; /* device unit number */ int pd_numa_domain; /* device NUMA domain */ size_t pc_reported_len;/* length of PCI data reported */ - char pc_spare[64]; /* space for future fields */ + uint8_t pc_secbus; /* secondary bus number */ + uint8_t pc_subbus; /* subordinate bus number */ + char pc_spare[62]; /* space for future fields */ }; struct pci_match_conf { From nobody Fri Apr 24 17:56:21 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHT6yjmz6ZxTs for ; Fri, 24 Apr 2026 17:56:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LHT1d1Pz3qQW for ; Fri, 24 Apr 2026 17:56:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iPcU4PRPm909teKpBA0DCI5OlAVuxOa65HRl9L8Ils4=; b=UToM9MOux3HpGxffD7AYWrxi/K2KuYt7wDVw67NxpIjL0VOniIC4GkXLJf1AsCkOPjiqlr zSnRXjtQhWxzz8noRun1oNaVFHovY/iVEbh8far2kNOZ90kuBg9qC0jCOHYOFkQK6y+yQS vlmuL8u/42ZIUd+y6rzNq0zUL43QxH/mAKiFq0n3a46ZYk40aFUf8AdSe0lfaiRBc0VLrx UJk/3UXwcE0tIaSiQxDuR90udHw0+sd7ujck4h3LBcvG9hlCOFRhlR3kWj29UHGrFWsqQO TC0+nfZa9AhME9tfMtYFIg6XRPxtyHIPhbHdclF0ILEe87d+A4tPIWCXst6jgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053381; a=rsa-sha256; cv=none; b=Tq8gXATH6vGcSoZyww4l+jWC74OryakaEYaPPZP6QOSq74YKe0d8y3t+qiRVqoIxJ27bud SsHS5P1aeXohXuh1nPB2DxaYZsSKg5WBLygvXmg1FaR6M+Lnk/ETMKQP/2iODihzmlrXFL gVHJSkk/P12sXwlN7YG+C5j9ofdFxNs1IAeJGGdvPGUI4PEuF5Nw3c++ih3ZQiL5fCRJ+Y cFilYND/06X8Wv2bDIzTfZw0ogxCIUvtw47SRNEgWhEKqBAfMc95BAkFVQ2JABXDy/+bP/ V1so8c+SXjWULyCZFkovIpYcmUldCjiWNj/6eCjcTvyY4J6Qvf3Gtwu8FILAaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iPcU4PRPm909teKpBA0DCI5OlAVuxOa65HRl9L8Ils4=; b=cgN0S994p4l8OP3iR6dqIcH5dDgU2FLqviyx2olGaqFHeMnc4JkCzu4Kuq0BrxV8HQ7bXV IgHv6UoWx5OFk2VuzVVSBidulu3mZO/Xc7TtNf820MNjB4b7GXWWKhNE21h0ZhzlDcN4FQ 7A4cT77sz7lpYmKblT5SkWIpe7W1IJnv6iHU81wpwOK6hJ8hQmTaQ9y/83x3RFTyZX4ZO2 MdA2Ayel14JtIrr+tJ/lcwAdGhsw6rgQELYx5M/Q40rD0AXNDtmECA+6L8EetEN+00Rkf3 ndDNOqk4z+HhEOqqVVp7vyrsKZBNLgqkbjqMk7yvmbZ+y6KYrqWU0LC/3cWeuw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHT0xv1z1C7Q for ; Fri, 24 Apr 2026 17:56:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1de1d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 5daad074124c - stable/15 - pciconf: Use the exported values of bus numbers for PCI bridges List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5daad074124cc07bfd1c437d95ec5ad021d2eabf Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:21 +0000 Message-Id: <69ebaec5.1de1d.70bf2772@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=5daad074124cc07bfd1c437d95ec5ad021d2eabf commit 5daad074124cc07bfd1c437d95ec5ad021d2eabf Author: John Baldwin AuthorDate: 2026-03-10 16:50:08 +0000 Commit: John Baldwin CommitDate: 2026-04-24 17:33:53 +0000 pciconf: Use the exported values of bus numbers for PCI bridges Reviewed by: imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D55772 (cherry picked from commit 9a1394957c3054c24995d684e8bc26878702dc6b) --- usr.sbin/pciconf/pciconf.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/usr.sbin/pciconf/pciconf.c b/usr.sbin/pciconf/pciconf.c index 6c26621ae186..48520687197b 100644 --- a/usr.sbin/pciconf/pciconf.c +++ b/usr.sbin/pciconf/pciconf.c @@ -339,13 +339,9 @@ list_devs(const char *name, int verbose, int bars, int bridge, int caps, } static void -print_bus_range(int fd, struct pci_conf *p, int secreg, int subreg) +print_bus_range(struct pci_conf *p) { - uint8_t secbus, subbus; - - secbus = read_config(fd, &p->pc_sel, secreg, 1); - subbus = read_config(fd, &p->pc_sel, subreg, 1); - printf(" bus range = %u-%u\n", secbus, subbus); + printf(" bus range = %u-%u\n", p->pc_secbus, p->pc_subbus); } static void @@ -511,11 +507,11 @@ list_bridge(int fd, struct pci_conf *p) switch (p->pc_hdr & PCIM_HDRTYPE) { case PCIM_HDRTYPE_BRIDGE: - print_bus_range(fd, p, PCIR_SECBUS_1, PCIR_SUBBUS_1); + print_bus_range(p); print_bridge_windows(fd, p); break; case PCIM_HDRTYPE_CARDBUS: - print_bus_range(fd, p, PCIR_SECBUS_2, PCIR_SUBBUS_2); + print_bus_range(p); print_cardbus_windows(fd, p); break; } From nobody Fri Apr 24 17:56:22 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHV4JSfz6ZxRb for ; Fri, 24 Apr 2026 17:56:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LHV26W4z3qgg for ; Fri, 24 Apr 2026 17:56:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jFKXfuytrsKsuyvJ/D7GJVU18r99pASuk1WQ+swljhI=; b=VqW6xIQjHIk6y5T4TV0sr3KVGz5U/AqIQrh9crb2P8QcJ5ePIzA2dByb+0UzQkI48TyHTU BY72moTgk1O87oN6ftkE+u/BEL4QqndgTgeFFMsXQqtIPH9bwR0Jlwscy0NjH+5tbeFV0C K3q9B2bnvSo2T7+5n/P2sY6CM/dd2nToyBZOCEcL/Ztr3rvu98UgeNSY7+yt1Vx+ryNb5E kZEVh/oRU9QjN18CC1GDReZuULKHzu+X+zsDr83RWxcagDTNWJJG11r7FidbJ35GSumc0F quaM9gO2cDeqsXygpqRSNlzlzy9yD/nWbpVNvpKYcLlhAvQKRlXvuoYaC4IZNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053382; a=rsa-sha256; cv=none; b=EBKexXpyjAmqQ0O5hKevMs6BdrD9EcmbM17xUpCf4sOmT4D6WzVDao28R1FIrcu3aBlygF eI4dTYDFY0QvtSzaAhJp1vWDsXPjpsCwEcI0ITUZyQexOr4Lcg+IA2SJCTpoj1GpHtAbHS Cs+YbpyPVeBNxzx2FbDfE+Rtpn6O13MFIF7bZ7BrdwtEIZotUnLLlH6lUcbR21NKv6vvZQ Mwp3Qz8KMb2/6j8GzozGDoiadMlC0AhxXG6lsN+B+W+emvnhujgt4RPPyYfmyumgzzLmkh fAlYbmnQCRnVIZ0R74JQyPGX9d0tLGrqGriZaZnVJMMVOwWKRMjS3b6oFtgMjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jFKXfuytrsKsuyvJ/D7GJVU18r99pASuk1WQ+swljhI=; b=JpdEhSv4dbaku9XR31wWneaiOvjcepn+HOGAfn7/NUL9Hvh9HJ9P1RVqtqSFr/YvjceVtB IIFAbsHe/kq/1y35pXbq06qyuoBMpmLMnYwAd+ydArlY9gNVWf9ebeJPxnYIg/9TBCSj8q 7PoTWlXBacdBHErtkfALP7vMxx/Y00pk2ouog2hgfmggMn2MqGSgvS0a4QdlNaa7RNsxWB 59/v5IVw/wlAnQGvxcwPWxLmpssF1p98f+W+qBSqmcfOibyDDRkOGeNhKphcHIccZbsyl5 f+dKHZWAOm/JrRD9poBENMstBWkr4v1yMd8/a4bnpv3VGMJOvY4OzWCgmO4jAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHV1jMRz1C4f for ; Fri, 24 Apr 2026 17:56:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1d112 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: c4a3c64993fd - stable/15 - pciconf.8: Reorganize slightly to handle additional modes List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c4a3c64993fd59ca07c066de81b5bb2bc7bea6e1 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:22 +0000 Message-Id: <69ebaec6.1d112.47d4cee2@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c4a3c64993fd59ca07c066de81b5bb2bc7bea6e1 commit c4a3c64993fd59ca07c066de81b5bb2bc7bea6e1 Author: John Baldwin AuthorDate: 2026-03-10 16:50:52 +0000 Commit: John Baldwin CommitDate: 2026-04-24 17:33:53 +0000 pciconf.8: Reorganize slightly to handle additional modes Move the description of the optional device argument earlier before describing individual command modes. Add a subsection for list mode and a second subsection for the other modes that work with a single device. Reviewed by: imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D55773 (cherry picked from commit 98a0d2283701e08353ce670c8023803c58a4994c) --- usr.sbin/pciconf/pciconf.8 | 58 +++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 31 deletions(-) diff --git a/usr.sbin/pciconf/pciconf.8 b/usr.sbin/pciconf/pciconf.8 index 6c67e9e50df6..c9cbe483a1ac 100644 --- a/usr.sbin/pciconf/pciconf.8 +++ b/usr.sbin/pciconf/pciconf.8 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 19, 2025 +.Dd March 10, 2026 .Dt PCICONF 8 .Os .Sh NAME @@ -52,6 +52,31 @@ access to .Pa /dev/pci , normally only the super-user. .Pp +A +.Ar device +can be identified either by a device name if the device is +attached to a driver or by a selector. +Selectors identify a PCI device by its address in PCI config space and +can take one of the following forms: +.Pp +.Bl -bullet -offset indent -compact +.It +.Li pci Ns Va domain Ns \&: Ns Va bus Ns \&: Ns Va device Ns \&: \ +Ns Va function Ns +.It +.Li pci Ns Va bus Ns \&: Ns Va device Ns \&: Ns Va function Ns +.It +.Li pci Ns Va bus Ns \&: Ns Va device Ns +.El +.Pp +In the case of an abridged form, omitted selector components are assumed to be 0. +An optional leading device name followed by @ and an optional final colon +will be ignored; this is so that the first column in the output of +.Nm +.Fl l +can be used without modification. +All numbers are base 10. +.Ss List Mode With the .Fl l option, @@ -260,36 +285,7 @@ argument is given with the flag, .Nm will only list details about a single device instead of all devices. -.Pp -All invocations of -.Nm -except for -.Fl l -require a -.Ar device . -The device can be identified either by a device name if the device is -attached to a driver or by a selector. -Selectors identify a PCI device by its address in PCI config space and -can take one of the following forms: -.Pp -.Bl -bullet -offset indent -compact -.It -.Li pci Ns Va domain Ns \&: Ns Va bus Ns \&: Ns Va device Ns \&: \ -Ns Va function Ns -.It -.Li pci Ns Va bus Ns \&: Ns Va device Ns \&: Ns Va function Ns -.It -.Li pci Ns Va bus Ns \&: Ns Va device Ns -.El -.Pp -In the case of an abridged form, omitted selector components are assumed to be 0. -An optional leading device name followed by @ and an optional final colon -will be ignored; this is so that the first column in the output of -.Nm -.Fl l -can be used without modification. -All numbers are base 10. -.Pp +.Ss Device Information Modes With the .Fl a flag, From nobody Fri Apr 24 17:56:23 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHW5RMZz6Zxkw for ; Fri, 24 Apr 2026 17:56: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LHW2bm3z3qTD for ; Fri, 24 Apr 2026 17:56:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eQMdEg4Fi5FuvoenPaHggO23sssRxKTdxIxaB2zRC9k=; b=b0MIsVmDSWSOdNKeEcuKpg3Rmwn2HqAhoTyKNTZTRlAAppZEq6xJxXmqmTOkJcHEV4mTij xkUsqu8c/0ttLBLSnPI42WoKHhZ5S37eSblBGb6UexBpNFL9ktqtU5y6AAeWGE8pRbYbm3 962H7zgtJNKrqG8Oh5FHSIPGyquc0qK0WQZlKv283obqIWHIzzSvgpN1WFxR698PO6oIej q425wb0H7ff/ySUQ5oS7KUkB5Ezemr/WV03QEpPSM/fzw5bBMxumsRUvntNlkU17O7efJz 7gF9/oO1+uifwb8SC4kKqRH6rWgdjku9jdruf76Khl2foxPinBJOm18MP3uRUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053383; a=rsa-sha256; cv=none; b=U6olIuewh6dPoiaqvmhO8FCvooMUT2jXiE5DXoTxO0XJDan23m4ti7WC4hmrGXKoDBEs9V 7czuygEj0mtn28GF0IPJq9vpU6dAcrFX3DxOs0Bmo1V0I1wVfy4BG6cQCafe6yzbYJgeBt eob6JzbRLckrtcR92fu3PFkSp066p2Vz4IGg6trqsIRrHyZG+L/w4XVfr0GVsNEsHxSXmk d22Lp7ZT4ef42JtyDyC1Jq2IJWDzOJRrJCd6MdbT/lTBpxbo/O65oxdM91ojF5RaZGmBi9 q7WjACO1ZitvQzjdbpgSKd7wAZva96ZKlOGYz9KjotYUnnfmfRAXYqGPPE89kA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eQMdEg4Fi5FuvoenPaHggO23sssRxKTdxIxaB2zRC9k=; b=xtZAgcwEgoBHrzCGEIPOMSRtMUDRpi5gm+dn/RTIc7KoR7NPkAjluG0eL6GxGThLHaA1GS O+OgEVRb+Cn61e9eCkKSX06n+IVsj6WLPm3lDABAe3oFI99HqCuGqWA7v9QLPiUeyN9FeB u2y6O8TtIhJukhN+aVbMtUUEXRP1Y+QVQJSOSgWMmmXzaXCXt1G2LOIcZtlEAfrUu8xh+5 p+/aggIOapntStbPhCG1RBdOumIKJfSGC7t+/M0QuIOzEHINXx6QIIKwj0a/TJqPBq+iEh Hbrp/0QxTCu4XTO2XnAsK28rk6lPn7JFjSRA6tlcNveyJIf1Xk4eViaROJuPKA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHW2Bfnz1C7R for ; Fri, 24 Apr 2026 17:56:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1de8f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: ae4ae80a27a3 - stable/15 - pciconf: Add a tree 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ae4ae80a27a348474f0be17168bd5f2d9dbdd960 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:23 +0000 Message-Id: <69ebaec7.1de8f.126cd80f@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ae4ae80a27a348474f0be17168bd5f2d9dbdd960 commit ae4ae80a27a348474f0be17168bd5f2d9dbdd960 Author: John Baldwin AuthorDate: 2026-03-10 16:51:00 +0000 Commit: John Baldwin CommitDate: 2026-04-24 17:49:11 +0000 pciconf: Add a tree mode This lists PCI devices in a hierarchy showing the parent/child relationship of PCI devices and bridges. While this is inspired by lspci -t output, the format is closer to ps -d and also prefers using new-bus device names when possible. If a device does not have a driver, the PCI selector is output in place of the device name. When the -v flag is given, the vendor and device ID strings are output after the device name. If a string for an ID isn't found, the hex ID values are output instead. Reviewed by: imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D55774 (cherry picked from commit 14b8a27883c15d3add3114f855eff7c6bda1b015) --- usr.sbin/pciconf/pciconf.8 | 24 +++++ usr.sbin/pciconf/pciconf.c | 255 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 277 insertions(+), 2 deletions(-) diff --git a/usr.sbin/pciconf/pciconf.8 b/usr.sbin/pciconf/pciconf.8 index c9cbe483a1ac..7958a538f3d9 100644 --- a/usr.sbin/pciconf/pciconf.8 +++ b/usr.sbin/pciconf/pciconf.8 @@ -33,6 +33,8 @@ .Nm .Fl l Oo Fl BbceVv Oc Op Ar device .Nm +.Fl t Oo Fl v Oc +.Nm .Fl a Ar device .Nm .Fl r Oo Fl b | h Oc Ar device addr Ns Op : Ns Ar addr2 @@ -285,6 +287,28 @@ argument is given with the flag, .Nm will only list details about a single device instead of all devices. +.Ss Tree Mode +With the +.Fl t +flag, +.Nm +lists PCI devices in a tree prefixing each device with indentation text showing +the sibling and parent/child relationships. +If the device has an attached driver, the device is identified by the driver +name and unit number; +otherwise, the device is identified by a PCI selector. +.Pp +Top-level entries in the tree identify top-level PCI buses. +Each bus is named as a partial PCI selector: +.Li pci Ns Va domain Ns \&: Ns Va bus Ns . +.Pp +If the +.Fl v +flag is specified, +the device name or PCI selector is followed by the device's vendor and device +strings from the vendor/device information database. +If an identification string is not found in the database, +the ID register values are output instead. .Ss Device Information Modes With the .Fl a diff --git a/usr.sbin/pciconf/pciconf.c b/usr.sbin/pciconf/pciconf.c index 48520687197b..b40c7dce4e40 100644 --- a/usr.sbin/pciconf/pciconf.c +++ b/usr.sbin/pciconf/pciconf.c @@ -38,10 +38,12 @@ #include #include +#include #include #include #include #include +#include #include #include #include @@ -65,6 +67,13 @@ struct pci_vendor_info char *desc; }; + +struct pci_tree_entry { + TAILQ_ENTRY(pci_tree_entry) link; + TAILQ_HEAD(pci_tree_list, pci_tree_entry) children; + struct pci_conf *p; +}; + static TAILQ_HEAD(,pci_vendor_info) pci_vendors; static struct pcisel getsel(const char *str); @@ -72,6 +81,7 @@ static void list_bridge(int fd, struct pci_conf *p); static void list_bars(int fd, struct pci_conf *p); static void list_devs(const char *name, int verbose, int bars, int bridge, int caps, int errors, int vpd, int compact); +static void show_tree(int verbose); static void list_verbose(struct pci_conf *p); static void list_vpd(int fd, struct pci_conf *p); static const char *guess_class(struct pci_conf *p); @@ -91,6 +101,7 @@ usage(void) fprintf(stderr, "%s", "usage: pciconf -l [-BbcevV] [device]\n" + " pciconf -t [-v]\n" " pciconf -a device\n" " pciconf -r [-b | -h] device addr[:addr2]\n" " pciconf -w [-b | -h] device addr value\n" @@ -103,14 +114,14 @@ int main(int argc, char **argv) { int c, width; - enum { NONE, LIST, READ, WRITE, ATTACHED, DUMPBAR } mode; + enum { NONE, LIST, TREE, READ, WRITE, ATTACHED, DUMPBAR } mode; int compact, bars, bridge, caps, errors, verbose, vpd; mode = NONE; compact = bars = bridge = caps = errors = verbose = vpd = 0; width = 4; - while ((c = getopt(argc, argv, "aBbcDehlrwVvx")) != -1) { + while ((c = getopt(argc, argv, "aBbcDehlrtwVvx")) != -1) { switch(c) { case 'a': mode = ATTACHED; @@ -151,6 +162,9 @@ main(int argc, char **argv) mode = READ; break; + case 't': + mode = TREE; + break; case 'w': mode = WRITE; break; @@ -179,6 +193,11 @@ main(int argc, char **argv) list_devs(optind + 1 == argc ? argv[optind] : NULL, verbose, bars, bridge, caps, errors, vpd, compact); break; + case TREE: + if (optind != argc) + usage(); + show_tree(verbose); + break; case ATTACHED: if (optind + 1 != argc) usage(); @@ -338,6 +357,238 @@ list_devs(const char *name, int verbose, int bars, int bridge, int caps, close(fd); } +static int +pci_conf_compar(const void *lhs, const void *rhs) +{ + const struct pci_conf *l, *r; + + l = lhs; + r = rhs; + if (l->pc_sel.pc_domain != r->pc_sel.pc_domain) + return (l->pc_sel.pc_domain - r->pc_sel.pc_domain); + if (l->pc_sel.pc_bus != r->pc_sel.pc_bus) + return (l->pc_sel.pc_bus - r->pc_sel.pc_bus); + if (l->pc_sel.pc_dev != r->pc_sel.pc_dev) + return (l->pc_sel.pc_dev - r->pc_sel.pc_dev); + return (l->pc_sel.pc_func - r->pc_sel.pc_func); +} + +static void +tree_add_device(struct pci_tree_list *head, struct pci_conf *p, + struct pci_conf *conf, size_t count, bitstr_t *added) +{ + struct pci_tree_entry *e; + struct pci_conf *child; + size_t i; + + e = malloc(sizeof(*e)); + TAILQ_INIT(&e->children); + e->p = p; + TAILQ_INSERT_TAIL(head, e, link); + + switch (p->pc_hdr) { + case PCIM_HDRTYPE_BRIDGE: + case PCIM_HDRTYPE_CARDBUS: + break; + default: + return; + } + if (p->pc_secbus == 0) + return; + + assert(p->pc_subbus >= p->pc_secbus); + for (i = 0; i < count; i++) { + child = conf + i; + if (child->pc_sel.pc_domain < p->pc_sel.pc_domain) + continue; + if (child->pc_sel.pc_domain > p->pc_sel.pc_domain) + break; + if (child->pc_sel.pc_bus < p->pc_secbus) + continue; + if (child->pc_sel.pc_bus > p->pc_subbus) + break; + + if (child->pc_sel.pc_bus == p->pc_secbus) { + assert(bit_test(added, i) == 0); + bit_set(added, i); + tree_add_device(&e->children, conf + i, conf, count, + added); + continue; + } + + if (bit_test(added, i) == 0) { + /* + * This really shouldn't happen, but if for + * some reason a child bridge doesn't claim + * this device, display it now rather than + * later. + */ + bit_set(added, i); + tree_add_device(&e->children, conf + i, conf, count, + added); + continue; + } + } +} + +static bool +build_tree(struct pci_tree_list *head, struct pci_conf *conf, size_t count) +{ + bitstr_t *added; + size_t i; + + TAILQ_INIT(head); + + /* + * Allocate a bitstring to track which devices have already + * been added to the tree. + */ + added = bit_alloc(count); + if (added == NULL) + return (false); + + for (i = 0; i < count; i++) { + if (bit_test(added, i)) + continue; + + bit_set(added, i); + tree_add_device(head, conf + i, conf, count, added); + } + + free(added); + return (true); +} + +static void +free_tree(struct pci_tree_list *head) +{ + struct pci_tree_entry *e, *n; + + TAILQ_FOREACH_SAFE(e, head, link, n) { + free_tree(&e->children); + TAILQ_REMOVE(head, e, link); + free(e); + } +} + +static void +print_tree_entry(struct pci_tree_entry *e, const char *indent, bool last, + int verbose) +{ + struct pci_vendor_info *vi; + struct pci_device_info *di; + struct pci_tree_entry *child; + struct pci_conf *p = e->p; + char *indent_buf; + + printf("%s%c--- ", indent, last ? '`' : '|'); + if (p->pd_name[0] != '\0') + printf("%s%lu", p->pd_name, p->pd_unit); + else + printf("pci%d:%d:%d:%d", p->pc_sel.pc_domain, p->pc_sel.pc_bus, + p->pc_sel.pc_dev, p->pc_sel.pc_func); + + if (verbose) { + di = NULL; + TAILQ_FOREACH(vi, &pci_vendors, link) { + if (vi->id == p->pc_vendor) { + printf(" %s", vi->desc); + TAILQ_FOREACH(di, &vi->devs, link) { + if (di->id == p->pc_device) { + printf(" %s", di->desc); + break; + } + } + break; + } + } + if (vi == NULL) + printf(" vendor=0x%04x device=0x%04x", p->pc_vendor, + p->pc_device); + else if (di == NULL) + printf(" device=0x%04x", p->pc_device); + } + printf("\n"); + + if (TAILQ_EMPTY(&e->children)) + return; + + asprintf(&indent_buf, "%s%c ", indent, last ? ' ' : '|'); + TAILQ_FOREACH(child, &e->children, link) { + print_tree_entry(child, indent_buf, TAILQ_NEXT(child, link) == + NULL, verbose); + } + free(indent_buf); +} + +static void +show_tree(int verbose) +{ + struct pci_tree_list head; + struct pci_tree_entry *e, *n; + struct pci_conf *conf; + size_t count; + int fd; + bool last, new_bus; + + if (verbose) + load_vendors(); + + fd = open(_PATH_DEVPCI, O_RDONLY); + if (fd < 0) + err(1, "%s", _PATH_DEVPCI); + + if (!fetch_devs(fd, NULL, &conf, &count)) { + exitstatus = 1; + goto close_fd; + } + + if (count == 0) + goto close_fd; + + if (conf[0].pc_reported_len < offsetof(struct pci_conf, pc_subbus)) { + warnx("kernel too old"); + exitstatus = 1; + goto free_conf; + } + + /* First, sort devices by DBSF. */ + qsort(conf, count, sizeof(*conf), pci_conf_compar); + + if (!build_tree(&head, conf, count)) { + warnx("failed to build tree of PCI devices"); + exitstatus = 1; + goto free_conf; + } + + new_bus = true; + TAILQ_FOREACH(e, &head, link) { + if (new_bus) { + printf("--- pci%d:%d\n", e->p->pc_sel.pc_domain, + e->p->pc_sel.pc_bus); + new_bus = false; + } + + /* Is this the last entry for this bus? */ + n = TAILQ_NEXT(e, link); + if (n == NULL || + n->p->pc_sel.pc_domain != e->p->pc_sel.pc_domain || + n->p->pc_sel.pc_bus != e->p->pc_sel.pc_bus) { + last = true; + new_bus = true; + } else + last = false; + + print_tree_entry(e, " ", last, verbose); + } + + free_tree(&head); +free_conf: + free(conf); +close_fd: + close(fd); +} + static void print_bus_range(struct pci_conf *p) { From nobody Fri Apr 24 17:56:24 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHY01D0z6ZxV0 for ; Fri, 24 Apr 2026 17:56:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LHX3WKJz3qTK for ; Fri, 24 Apr 2026 17:56:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=elODdkXCSqPK11GwegWHS0HLXg04547Lshf1w1u3QzM=; b=L/xBxZS8fNChQ10kNRkpZs5zejfeXvDXE7GcD5dC/KgM5O+/O3LouuLwcEh0R4R3EEK/yd w7pinsssBdLtmsHYdos7RiH3aqiOzM8IuDqfaqtEW9gg6aXM6rpnmL/DgwKcyvkGd6uYrn 3q02izVp9u0IhCxI+FJV/Lgly3wJ3bJpbHL5dzpawNd1mEs1j/rHEjcaEod4FlzM1abzCT sXgepl1SdsMaEo75zrXqwjezUID1NtZMnGdzRACajKUUID9UJc2yoZCD6byRdiE9wI9mps y2t8QWMvvCeRYbscamXGAXJsZVsIo7UbPI/s53bAS/tvWihNYHvSQIHyRBmN6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053384; a=rsa-sha256; cv=none; b=RiKJ5efNOIr4IShm06TygfcLnUa1OPrto3idZ6VK8GimVFwy/qMyXDjUrkVOssDSu77oRc ctKgor8T5hwzqsr+v1FyJORbbqDRJ+PoCnpMWAPrc6sSLD4X4ClqSKLfUAc5tGJbvfRpoS llC6Wmjwx9/DjPPBhEshYbuztTyqFMkUIk/tRikn4qgQoHohf7vlcm2OwAe38UrxtRRn6p 6wLqiZkSn+MPzHdoYIGr5za4w0DJc2C46wQKWMwn1Wc6+/WqegvI84Yekr9zuuNWQAR9ML tlxYGdHW3zT3gI5rnsuVjyIXsaxMuYovaqQETFkf2XInz0Akmmd5Vg+PiwQKXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=elODdkXCSqPK11GwegWHS0HLXg04547Lshf1w1u3QzM=; b=QAHs+D3ZBNrsRe4O8prx/T53OPA0f01ET5YcZ7O7eegtamkhWJD8VRt+PrtmofbRAGo6Tc E2+4H/VQmqRwZ9QXwaBpJo35fe5HrS9BusEfLihPCHUVTu1hw1v22n1NRkGiponx+alN27 ynY/Y6IQbAWm0jXdikiwOPqF8RNSbcmQYDPuuwpYnrhPCzGS7SSMUMuxzuQZBfPFKYf4Kw Aeo2m81Yj/hfEMNEaj8nhqhn4ogg4GyyuVZG9KnElKD/nw9l9zqpmnyBnQgfIfXCxV/W7n tFEivo3VAN1LiSyaqLg25ZJjUFYo6IqXPsy531BtbGfkgqACDoSXqYTLp88R4w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHX2sRqz1CGD for ; Fri, 24 Apr 2026 17:56:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1de21 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: cd1180d273a8 - stable/15 - LinuxKPI: Clear the sbuf at the start of each call to seq_read List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: cd1180d273a88afb43dda9f27cca389e5d68d905 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:24 +0000 Message-Id: <69ebaec8.1de21.30b1e38e@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=cd1180d273a88afb43dda9f27cca389e5d68d905 commit cd1180d273a88afb43dda9f27cca389e5d68d905 Author: John Baldwin AuthorDate: 2026-03-17 16:05:17 +0000 Commit: John Baldwin CommitDate: 2026-04-24 17:49:14 +0000 LinuxKPI: Clear the sbuf at the start of each call to seq_read Each invocation of seq_read invokes the seq_file.show callback which writes into the sbuf. Then it invokes sbuf_finish before copying the data into the caller's buffer. Without this, a second call to seq_read on the same file would try to append data to a finished sbuf. Reviewed by: bz Sponsored by: AFRL, DARPA (cherry picked from commit c181c8f5ca707962359e636ca5aa536e60147eee) --- sys/compat/linuxkpi/common/src/linux_seq_file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/src/linux_seq_file.c b/sys/compat/linuxkpi/common/src/linux_seq_file.c index 9c06fe27bebe..6fe6ccd1e68e 100644 --- a/sys/compat/linuxkpi/common/src/linux_seq_file.c +++ b/sys/compat/linuxkpi/common/src/linux_seq_file.c @@ -49,6 +49,7 @@ seq_read(struct linux_file *f, char *ubuf, size_t size, off_t *ppos) m = f->private_data; sbuf = m->buf; + sbuf_clear(sbuf); p = m->op->start(m, ppos); rc = m->op->show(m, p); From nobody Fri Apr 24 17:56:26 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHb0GWlz6ZxZM for ; Fri, 24 Apr 2026 17:56:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LHZ4Ydnz3qWv for ; Fri, 24 Apr 2026 17:56:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VSrJmGGX7GV/tqOIbKGIDbjPNr1BTAfk+fAKvUzIL1I=; b=chauOIsjRu0axsPkMdZGyGr+kWELMVyBHYLg5l/lM1DUDX3qZCo6NUABdGjF8x9Syj273S 2KMcuifu+UTieaPvL3DvgwhcxnXueLZl8tzyXJ+d8vmzBRumeZgaMhpd60im/HshgEmFTQ RuMg0E8yoiMlIDn7+zHgqSSylLub23x7Al8xbWHMIiW+90vUFZLgy22QBFRlCWPrnj4PNK mg4LZfvOC05aPiesWxZtmus8du3szuHaJxX6P8FxKdXbdTq5bJn7RxuZCORnsCmtJQo7xZ P6BpiM1abDF8IS7PLoqwGPzajw7yCr30cYCPIf5sFoTtbt2l/OoLPzH0O9BuTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053386; a=rsa-sha256; cv=none; b=X7DQMST0MQ8f3ClQ6fmdq1h64ZJyfnoNwyTTcDg4DYVwaWosLLhiNju/UUAZ8r1c3a3tDO z1gFfvc2B6WdnT392NkGIiHy1434TmgrfvDDfFsg602dtwDYbriIMnksJ4BL4gRTlxFnmU PYMKPaNRwKMf+IXQzKVjtHLBsQbRukhls0KP8d+utp3AFfDg8FiPomFIiF0jUADHz1hxud LD5pwxDp/gmzmQnuo4eWxlKyGkLhuNO/rBOEgg9et7ePZEN/shw8tWP0jmiT3jbuZFu2vS gG3tS2BTZN6KuxJP1rMIlBksXJMuaRWGg472HYOpTJgvVIIpIu947ajlTj2Ytw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VSrJmGGX7GV/tqOIbKGIDbjPNr1BTAfk+fAKvUzIL1I=; b=n8aSsKKzvp9ujPfLBXycRoAzIy5vYPfh5YwXNZt+X1DK8Qpi3E4opolDie2v3n+nWJwZUJ ychnqsG4CKG+/d07BperruvcbKFH3HyTf7x9SqsPGO95JvcOrjMujo6be0ewogKRcF0+Gd lUlz/02kX/YvASzAKUf919Nlti1GeZKuMUC0oXMVVOLvNQYxKKS9LhQ4htb5Uoc0I6qW9p OL19LEoiwIFsEg9VnKNxgbq8J0tpuRzjJxq0wRuL3Q1Ga6w0yzRbxSji1n/8WqEMmUF2L2 ByaW8qM5r9t5H0IroJlgqT0lh7AKnthAJ0vonwwwMh4KYiYsWpJtb4Qx4swiVw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHZ44zmz1CZD for ; Fri, 24 Apr 2026 17:56:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1c46c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 2b9d85fd82df - stable/15 - lindebugfs: Pass user buffer pointers to the read/write file operations List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2b9d85fd82df76e5edd69b5b55f78782e716ba78 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:26 +0000 Message-Id: <69ebaeca.1c46c.48a491d@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2b9d85fd82df76e5edd69b5b55f78782e716ba78 commit 2b9d85fd82df76e5edd69b5b55f78782e716ba78 Author: John Baldwin AuthorDate: 2026-03-17 19:45:34 +0000 Commit: John Baldwin CommitDate: 2026-04-24 17:49:14 +0000 lindebugfs: Pass user buffer pointers to the read/write file operations The Linux file_operations API expects the read and write operations to take a single user buffer pointer (along with the length and the file offset as an in/out parameter). However, the debugfs_fill function was violating this part of the contract as it was passing down kernel pointers instead. An earlier commit (5668c22a13c6befa9b8486387d38457c40ce7af4) hacked around this by modifying simple_read_from_buffer() to treat its user pointer argument as a kernel pointer instead. However, other commits keep tripping over this same API mismatch (e.g. 78e25e65bf381303c8bdac9a713ab7b26a854b8c passes a kernel pointer to copy_from_user in fops_str_write). Instead, change debugfs_fill to use the "raw" pseudofs mode where the uio is passed down to directly to the fill callback rather than an sbuf. debufs_fill now iterates over the iovec in the uio similar to the implementation of uiomove invoking the read or write operation on each user pointer. This also fixes a tiny bug where the initial file offset from uio_offset was ignored. Instead, the operations were always invoked with a file offset of 0. As part of this, revert the the changes to simple_read_from_buffer() from commit 5668c22a13c6befa9b8486387d38457c40ce7af4. Also as part of this, the simple_attr_read/write methods and seq_read now also need to accept and handle user pointers (also matching the API in Linux). For simple_attr_write*(), copy the user buffer into a kernel buffer before parsing. Also, do not permit writes at an offset as it's unclear what the semantics for those would even be (perhaps you would write out the formatted value into a buffer first and then allow the copy_from_user to overwrite/extend that buffer and then re-parse the integer value?). The old handling of *ppos for writes was definitely wrong before and only worked for an offset of 0 anyway. Reviewed by: bz Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D55833 (cherry picked from commit 2cf15144daf7ec44cdcd9bf3ef007939b79c361e) --- sys/compat/lindebugfs/lindebugfs.c | 83 ++++++++++++++-------- sys/compat/linuxkpi/common/include/linux/fs.h | 30 ++++---- .../linuxkpi/common/include/linux/seq_file.h | 2 +- sys/compat/linuxkpi/common/src/linux_seq_file.c | 2 +- sys/compat/linuxkpi/common/src/linux_simple_attr.c | 35 +++++---- 5 files changed, 94 insertions(+), 58 deletions(-) diff --git a/sys/compat/lindebugfs/lindebugfs.c b/sys/compat/lindebugfs/lindebugfs.c index 857546f61e55..88b92afd374a 100644 --- a/sys/compat/lindebugfs/lindebugfs.c +++ b/sys/compat/lindebugfs/lindebugfs.c @@ -117,9 +117,14 @@ debugfs_fill(PFS_FILL_ARGS) struct dentry_meta *d; struct linux_file lf = {}; struct vnode vn; - char *buf; - int rc; - off_t off = 0; + struct iovec *iov; + size_t cnt, orig_resid; + ssize_t rc; + off_t off; + + /* Linux file operations assume a pointer to a user buffer. */ + if (uio->uio_segflg != UIO_USERSPACE) + return (EOPNOTSUPP); if ((rc = linux_set_current_flags(curthread, M_NOWAIT))) return (rc); @@ -130,42 +135,64 @@ debugfs_fill(PFS_FILL_ARGS) rc = d->dm_fops->open(&vn, &lf); if (rc < 0) { #ifdef INVARIANTS - printf("%s:%d open failed with %d\n", __func__, __LINE__, rc); + printf("%s:%d open failed with %zd\n", __func__, __LINE__, rc); #endif return (-rc); } - rc = -ENODEV; - switch (uio->uio_rw) { - case UIO_READ: - if (d->dm_fops->read != NULL) { - rc = -ENOMEM; - buf = malloc(sb->s_size, M_DFSINT, M_ZERO | M_NOWAIT); - if (buf != NULL) { - rc = d->dm_fops->read(&lf, buf, sb->s_size, - &off); - if (rc > 0) - sbuf_bcpy(sb, buf, strlen(buf)); - - free(buf, M_DFSINT); - } + off = uio->uio_offset; + orig_resid = uio->uio_resid; + while (uio->uio_resid > 0) { + KASSERT(uio->uio_iovcnt > 0, + ("%s: uio %p iovcnt underflow", __func__, uio)); + + iov = uio->uio_iov; + cnt = iov->iov_len; + if (cnt == 0) { + uio->uio_iov++; + uio->uio_iovcnt--; + continue; } - break; - case UIO_WRITE: - if (d->dm_fops->write != NULL) { - sbuf_finish(sb); - rc = d->dm_fops->write(&lf, sbuf_data(sb), sbuf_len(sb), - &off); + if (cnt > uio->uio_resid) + cnt = uio->uio_resid; + + switch (uio->uio_rw) { + case UIO_READ: + if (d->dm_fops->read != NULL) + rc = d->dm_fops->read(&lf, iov->iov_base, cnt, + &off); + else + rc = -ENODEV; + break; + case UIO_WRITE: + if (d->dm_fops->write != NULL) + rc = d->dm_fops->write(&lf, iov->iov_base, cnt, + &off); + else + rc = -ENODEV; + break; } - break; + + if (rc <= 0) + break; + + iov->iov_base = (char *)iov->iov_base + rc; + iov->iov_len -= rc; + uio->uio_resid -= rc; + uio->uio_offset = off; } if (d->dm_fops->release) d->dm_fops->release(&vn, &lf); + /* Return success for short operations. */ + if (orig_resid != uio->uio_resid) + rc = 0; + if (rc < 0) { #ifdef INVARIANTS - printf("%s:%d read/write failed with %d\n", __func__, __LINE__, rc); + printf("%s:%d read/write failed with %zd\n", __func__, __LINE__, + rc); #endif return (-rc); } @@ -207,7 +234,7 @@ debugfs_create_file(const char *name, umode_t mode, flags = fops->write ? PFS_RDWR : PFS_RD; pfs_create_file(pnode, &dnode->d_pfs_node, name, debugfs_fill, - debugfs_attr, NULL, debugfs_destroy, flags | PFS_NOWAIT); + debugfs_attr, NULL, debugfs_destroy, flags | PFS_RAW | PFS_NOWAIT); if (dnode->d_pfs_node == NULL) { free(dm, M_DFSINT); return (NULL); @@ -671,7 +698,7 @@ fops_str_read(struct file *filp, char __user *ubuf, size_t read_size, } static ssize_t -fops_str_write(struct file *filp, const char *buf, size_t write_size, +fops_str_write(struct file *filp, const char __user *buf, size_t write_size, loff_t *ppos) { char *old, *new; diff --git a/sys/compat/linuxkpi/common/include/linux/fs.h b/sys/compat/linuxkpi/common/include/linux/fs.h index f1568ad6282d..40e1b396fe86 100644 --- a/sys/compat/linuxkpi/common/include/linux/fs.h +++ b/sys/compat/linuxkpi/common/include/linux/fs.h @@ -364,8 +364,9 @@ static inline ssize_t simple_read_from_buffer(void __user *dest, size_t read_size, loff_t *ppos, void *orig, size_t buf_size) { - void *p, *read_pos = ((char *) orig) + *ppos; + void *read_pos = ((char *) orig) + *ppos; size_t buf_remain = buf_size - *ppos; + ssize_t num_read; if (buf_remain < 0 || buf_remain > buf_size) return -EINVAL; @@ -373,18 +374,13 @@ simple_read_from_buffer(void __user *dest, size_t read_size, loff_t *ppos, if (read_size > buf_remain) read_size = buf_remain; - /* - * XXX At time of commit only debugfs consumers could be - * identified. If others will use this function we may - * have to revise this: normally we would call copy_to_user() - * here but lindebugfs will return the result and the - * copyout is done elsewhere for us. - */ - p = memcpy(dest, read_pos, read_size); - if (p != NULL) - *ppos += read_size; - - return (read_size); + /* copy_to_user returns number of bytes NOT read */ + num_read = read_size - copy_to_user(dest, read_pos, read_size); + if (num_read == 0) + return -EFAULT; + *ppos += num_read; + + return (num_read); } MALLOC_DECLARE(M_LSATTR); @@ -415,11 +411,13 @@ int simple_attr_open(struct inode *inode, struct file *filp, int simple_attr_release(struct inode *inode, struct file *filp); -ssize_t simple_attr_read(struct file *filp, char *buf, size_t read_size, loff_t *ppos); +ssize_t simple_attr_read(struct file *filp, char __user *buf, size_t read_size, + loff_t *ppos); -ssize_t simple_attr_write(struct file *filp, const char *buf, size_t write_size, loff_t *ppos); +ssize_t simple_attr_write(struct file *filp, const char __user *buf, + size_t write_size, loff_t *ppos); -ssize_t simple_attr_write_signed(struct file *filp, const char *buf, +ssize_t simple_attr_write_signed(struct file *filp, const char __user *buf, size_t write_size, loff_t *ppos); #endif /* _LINUXKPI_LINUX_FS_H_ */ diff --git a/sys/compat/linuxkpi/common/include/linux/seq_file.h b/sys/compat/linuxkpi/common/include/linux/seq_file.h index 3c7862890c67..786c09bd6a20 100644 --- a/sys/compat/linuxkpi/common/include/linux/seq_file.h +++ b/sys/compat/linuxkpi/common/include/linux/seq_file.h @@ -85,7 +85,7 @@ struct seq_operations { int (*show) (struct seq_file *m, void *v); }; -ssize_t seq_read(struct linux_file *, char *, size_t, off_t *); +ssize_t seq_read(struct linux_file *, char __user *, size_t, off_t *); int seq_write(struct seq_file *seq, const void *data, size_t len); void seq_putc(struct seq_file *m, char c); void seq_puts(struct seq_file *m, const char *str); diff --git a/sys/compat/linuxkpi/common/src/linux_seq_file.c b/sys/compat/linuxkpi/common/src/linux_seq_file.c index b1d53aa2db60..eae414ea696e 100644 --- a/sys/compat/linuxkpi/common/src/linux_seq_file.c +++ b/sys/compat/linuxkpi/common/src/linux_seq_file.c @@ -40,7 +40,7 @@ MALLOC_DEFINE(M_LSEQ, "seq_file", "seq_file"); ssize_t -seq_read(struct linux_file *f, char *ubuf, size_t size, off_t *ppos) +seq_read(struct linux_file *f, char __user *ubuf, size_t size, off_t *ppos) { struct seq_file *m; struct sbuf *sbuf; diff --git a/sys/compat/linuxkpi/common/src/linux_simple_attr.c b/sys/compat/linuxkpi/common/src/linux_simple_attr.c index 88fa908e47bb..e5514194cb33 100644 --- a/sys/compat/linuxkpi/common/src/linux_simple_attr.c +++ b/sys/compat/linuxkpi/common/src/linux_simple_attr.c @@ -99,7 +99,8 @@ simple_attr_release(struct inode *inode, struct file *filp) * On failure, negative signed ERRNO */ ssize_t -simple_attr_read(struct file *filp, char *buf, size_t read_size, loff_t *ppos) +simple_attr_read(struct file *filp, char __user *buf, size_t read_size, + loff_t *ppos) { struct simple_attr *sattr; uint64_t data; @@ -146,29 +147,38 @@ unlock: * On failure, negative signed ERRNO */ static ssize_t -simple_attr_write_common(struct file *filp, const char *buf, size_t write_size, - loff_t *ppos, bool is_signed) +simple_attr_write_common(struct file *filp, const char __user *ubuf, + size_t write_size, loff_t *ppos, bool is_signed) { struct simple_attr *sattr; unsigned long long data; - size_t bufsize; + char *buf; ssize_t ret; sattr = filp->private_data; - bufsize = strlen(buf) + 1; if (sattr->set == NULL) return (-EFAULT); - if (*ppos >= bufsize || write_size < 1) + if (*ppos != 0 || write_size < 1) return (-EINVAL); + buf = malloc(write_size, M_LSATTR, M_WAITOK); + if (copy_from_user(buf, ubuf, write_size) != 0) { + free(buf, M_LSATTR); + return (-EFAULT); + } + if (strnlen(buf, write_size) == write_size) { + free(buf, M_LSATTR); + return (-EINVAL); + } + mutex_lock(&sattr->mutex); if (is_signed) - ret = kstrtoll(buf + *ppos, 0, &data); + ret = kstrtoll(buf, 0, &data); else - ret = kstrtoull(buf + *ppos, 0, &data); + ret = kstrtoull(buf, 0, &data); if (ret) goto unlock; @@ -176,23 +186,24 @@ simple_attr_write_common(struct file *filp, const char *buf, size_t write_size, if (ret) goto unlock; - ret = bufsize - *ppos; + ret = write_size; unlock: mutex_unlock(&sattr->mutex); + free(buf, M_LSATTR); return (ret); } ssize_t -simple_attr_write(struct file *filp, const char *buf, size_t write_size, +simple_attr_write(struct file *filp, const char __user *buf, size_t write_size, loff_t *ppos) { return (simple_attr_write_common(filp, buf, write_size, ppos, false)); } ssize_t -simple_attr_write_signed(struct file *filp, const char *buf, size_t write_size, - loff_t *ppos) +simple_attr_write_signed(struct file *filp, const char __user *buf, + size_t write_size, loff_t *ppos) { return (simple_attr_write_common(filp, buf, write_size, ppos, true)); } From nobody Fri Apr 24 17:56:25 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHZ0rgPz6ZxV4 for ; Fri, 24 Apr 2026 17:56: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LHY49ZHz3qYq for ; Fri, 24 Apr 2026 17:56:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wix1ZAmHUtia3aE4a0Gwsw6THuwBTP7eaMdQA3zzMLA=; b=BJziIh9+nr0580x3RwXrzQxjDesoQXG6wE92IOHvgS3rymJIWj84mgAQ2btkUNgvyp/Y5z OHjxt5hyjlshapKBbuiBtapaKQT61vfNCQcsHpE/z+yNndGEz//bjAQA7XMY94IS/JfR+x suxCWlpjKv/ZZq8eBqQHPb+0L11CYP1QXJT3TUcWR4wdTh3E3WZlJdFhbno8EJGwbbun2w iWXSWVKEzRXt1sTzUwPmv3olhMHzCxCo1P4rxBTtTxjJyWpEeaaBq4jk+v+qzIbZIc/qLb QgPiCTMzd+2pXn1z6cwnil0/39jE6jFCPLnY5oKjxp78Rod29UvgXwlyz5dqIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053385; a=rsa-sha256; cv=none; b=SMzZI37+rRNrlyj04KusGngOTPWVCmp4c1D7arALzKMw1K/3T6QxQoiYRDoisr4aOXHREB /XFq4SSLk2P1N+1MahIXHpFDdnlw1geuBFJf7T+qWnHF7dNOXxaR482Ek8BjIRogFQsPEg gM8dAX0iSTQdsk1kvsmur/t98JgpM4ORutf9tIV20TDZ1W2tMuoPi3OyHZXs7ld9wjQNUm EWWR5/vnhpiJNzAxf4ziOg0y3ujR0DmoZ/cJ34/E/EswIwH5GxVs/2EpF7xYwKU9eYwqXk CP9LJa0O/FQHYdFV0oxE32m+MsOe2KebZZGhYXB0r0lw2mf550GjiPge6i2T5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wix1ZAmHUtia3aE4a0Gwsw6THuwBTP7eaMdQA3zzMLA=; b=L/QFTYgW0Wuu3YvexZk3HPbCX9bcVX/PR9RQcMU3AoWLRjQyUBSLig1uGxrW+hPswO4xBO nDKzGDOZVKNw6u06DAtBy73KJxBqnxwfyDGzYHk51LtMYNT4RQR8XVfqsgoMxihQOZooI8 eqTjIeUvjzGNJ4iebjBpSP9iMhzJPak8xDUiVYqs1hFVJx1kPPfxQShYXEcOHAyMhltkbB 6MMoHysEoztgQT7K0pir/ECNrmIwQBZXhfIZt4Bi93uTY9JGheh/lEjfHDXA/m2AfO4CrD hRGGohkLEv3V0/cOmx/J9z9lrQWVyF6wRh3ad5AHvLKlUSPDbIAHCxvGkY2k3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHY3Sjdz1C4h for ; Fri, 24 Apr 2026 17:56:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1d5c4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 072744dbd55b - stable/15 - LinuxKPI: Use simple_read_from_buffer in simple_attr_read and seq_read List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 072744dbd55b78ef22e30abe661ffc8ddd074ff8 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:25 +0000 Message-Id: <69ebaec9.1d5c4.66bcb608@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=072744dbd55b78ef22e30abe661ffc8ddd074ff8 commit 072744dbd55b78ef22e30abe661ffc8ddd074ff8 Author: John Baldwin AuthorDate: 2026-03-17 16:05:30 +0000 Commit: John Baldwin CommitDate: 2026-04-24 17:49:14 +0000 LinuxKPI: Use simple_read_from_buffer in simple_attr_read and seq_read Reviewed by: bz Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D55879 (cherry picked from commit 58d74d7b0ca9bdf3aacfbe014bd00387f87b9be0) --- sys/compat/linuxkpi/common/src/linux_seq_file.c | 11 ++--------- sys/compat/linuxkpi/common/src/linux_simple_attr.c | 13 ++----------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_seq_file.c b/sys/compat/linuxkpi/common/src/linux_seq_file.c index 6fe6ccd1e68e..b1d53aa2db60 100644 --- a/sys/compat/linuxkpi/common/src/linux_seq_file.c +++ b/sys/compat/linuxkpi/common/src/linux_seq_file.c @@ -60,15 +60,8 @@ seq_read(struct linux_file *f, char *ubuf, size_t size, off_t *ppos) if (rc) return (rc); - rc = sbuf_len(sbuf); - if (*ppos >= rc || size < 1) - return (-EINVAL); - - size = min(rc - *ppos, size); - memcpy(ubuf, sbuf_data(sbuf) + *ppos, size); - *ppos += size; - - return (size); + return (simple_read_from_buffer(ubuf, size, ppos, sbuf_data(sbuf), + sbuf_len(sbuf))); } int diff --git a/sys/compat/linuxkpi/common/src/linux_simple_attr.c b/sys/compat/linuxkpi/common/src/linux_simple_attr.c index 8cc9ec7ecbc9..88fa908e47bb 100644 --- a/sys/compat/linuxkpi/common/src/linux_simple_attr.c +++ b/sys/compat/linuxkpi/common/src/linux_simple_attr.c @@ -119,18 +119,9 @@ simple_attr_read(struct file *filp, char *buf, size_t read_size, loff_t *ppos) scnprintf(prebuf, sizeof(prebuf), sattr->fmt, data); - ret = strlen(prebuf) + 1; - if (*ppos >= ret || read_size < 1) { - ret = -EINVAL; - goto unlock; - } - - read_size = min(ret - *ppos, read_size); - ret = strscpy(buf, prebuf + *ppos, read_size); - /* add 1 for null terminator */ - if (ret > 0) - ret += 1; + ret = simple_read_from_buffer(buf, read_size, ppos, prebuf, + strlen(prebuf) + 1); unlock: mutex_unlock(&sattr->mutex); From nobody Fri Apr 24 17:56:27 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHc05vtz6Zxl6 for ; Fri, 24 Apr 2026 17:56:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LHb5CMcz3qmm for ; Fri, 24 Apr 2026 17:56:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fPQftublIZDSD32il1dovbzFmSqR79tFIWBgXU9JDm8=; b=gpTmswK3tRMNzIal4+VCo1XJZp5grEasKCoue83d9wdksI2jPWOkONzXYBfalrmCwTlFWT fc3CHkbCVF+wyAy9vWf0yFKIr8dqiWI1RqbacTpWDwuxKUqTUCqpxAkgDxpeUpr85f9abt IBhnaAuXt+LHXSjwFrczzO6t1hLOCr+QOJRnv2Z2q3+dM7pXJqriUgdpb6DxWOWMj0Ftih mPIw+2B2R62woqIKoVnQFLlSENfcfKBu0IqBolhB7EsbHyeuOfsjCr/AQLfJ44waTyi1MY kSEiICORZSet8u5GN5bbCPf71mnSARdCI3V6EFYROO6N2A45SWwmq1+C8Y8Vaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053387; a=rsa-sha256; cv=none; b=QY/yJ/hyQ2nzy9Jcj7ixy2ciUCfHXmhLykr6MlUuUqIBLmGDgnbD0duQddY+RFNBUVNIWL 5/FoZ3f8i/I8E5STQFHJ0tm1YnStBt+DwjNWmtnTCLXmJeSYGTEqfI9rY0pOhYzw4v+nDs YXA/FZZd5NFYwnYF+G6L+7rWKiqZxcgUPkLjSB0sFCa+/xlxBTRtwu6jvx3ciEhaZu9Hbg iF9L5yvVNp1il6gh8eZj/4BPW0AgSkqM7v1aP1LUKNA2CY1k3qNzxI5qvjx4/2R6E+K+3q u1IJ+G4znOmquzzvWPDBFqq0ZQzZd6N8lDMnlvnCp8W+2P1FXQfHY8FBJFLRJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fPQftublIZDSD32il1dovbzFmSqR79tFIWBgXU9JDm8=; b=J4ij2O6mlMBQ539NF5C6ZWVamPqlKOJ+iZiKOOOQcBuCCPv4UPYJy9GIYfmW1Bilp+4TKo A6CyrOq0s/Hq5PGY2iZB9ET0Kr3afnLN8HMQYJg4lL9wOZi2Avys79oPKrbKgPD3mwvyZ1 nE/QI272EGW4FCX/opLEQhpF+l8zqP7RLonDexwjkllEQ3LASOOvk3cYYDKPlq1jatALlb W4Y0vaSAnXkT3xjgHpsVMRldo96CF07+/4cmI6cv7ck9F4ZoN7r9uXBctl/7EH7nt0tsFa oup16T28SqoS5ZsIu/RLdIyXM4JPDDKqQrjoXsjaukuEHIlHYrIbD8u3dH1H3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHb4glKz1CQT for ; Fri, 24 Apr 2026 17:56:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e135 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 8fae13b0d261 - stable/15 - LinuxKPI: Fix simple_read_from_buffer for zero-size and off-the-end reads List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 8fae13b0d26198b6ac7ac41e025811e4ee9efdf9 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:27 +0000 Message-Id: <69ebaecb.1e135.48f5f076@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8fae13b0d26198b6ac7ac41e025811e4ee9efdf9 commit 8fae13b0d26198b6ac7ac41e025811e4ee9efdf9 Author: John Baldwin AuthorDate: 2026-03-17 19:49:01 +0000 Commit: John Baldwin CommitDate: 2026-04-24 17:49:14 +0000 LinuxKPI: Fix simple_read_from_buffer for zero-size and off-the-end reads I noticed that the buf_size < 0 check can never be true (it's a size_t) and decided to check for this condition by an alternate expression, and I also noticed that a read_size of 0 would incorrectly return -EFAULT. Instead, return success for both of these cases as reading beyond the EOF of a normal file also returns EOF, not EINVAL. Reviewed by: bz Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D55845 (cherry picked from commit 2353fa1aca553883141a7b5d0aa54312a4610412) --- sys/compat/linuxkpi/common/include/linux/fs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/fs.h b/sys/compat/linuxkpi/common/include/linux/fs.h index 40e1b396fe86..7e28be070850 100644 --- a/sys/compat/linuxkpi/common/include/linux/fs.h +++ b/sys/compat/linuxkpi/common/include/linux/fs.h @@ -368,8 +368,8 @@ simple_read_from_buffer(void __user *dest, size_t read_size, loff_t *ppos, size_t buf_remain = buf_size - *ppos; ssize_t num_read; - if (buf_remain < 0 || buf_remain > buf_size) - return -EINVAL; + if (*ppos >= buf_size || read_size == 0) + return (0); if (read_size > buf_remain) read_size = buf_remain; From nobody Fri Apr 24 17:56:28 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHd2Fbjz6ZxhT for ; Fri, 24 Apr 2026 17: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LHc5rnXz3qkj for ; Fri, 24 Apr 2026 17:56:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CeMKMUnPRMYgMAYPSSErSLu9ghmmeq+P08vwlx/gKYs=; b=sJcMbv2SoYzG8HrISeyBji0486xEy7SQ4NHrTstGp0imn0PMrav9iCpvY72j5pehbF+bbh KtAnNODYY55sjTsaVVXYdZpkKbuO/k6RO842eCgjWYP44tbrCzAoQYurkMEzh53+Hl+mA/ 4HUSvCRNHZhZtHfz7riPccFtHj45SQzKwxgobR5NzXpjfDgnKyVFzauWTmP/VM9mTLMkdJ gCb/hHL8lmz4xXGpTIOPkz1DPbMPQZj6iX8EEqP4g20oslAUYF0+POoOi5SDRFtsC8U3i9 AVlLyfHNjOwg2UwRPkAX4h/SRGUu8xAaOB4ob7o7gq7AuZbmuCwLh8u3dgkblw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053388; a=rsa-sha256; cv=none; b=e8mQjvjZpFH1SSpG15bL+r1l3fCTsR5vcnWkWGEJaGiRawn25NICjY/iYeQGw7XUOetBYq ePiIKVSxaFM3XWxXrr3u4APXJNL/v/xFdKkFSiIOGLK+6iki6BqYtaUzgujcmTiTij3q7S P9/26fsh6OID+v87wmtjgs0TS+RyZyWfJEK7kP7ak2NN6vIMOvsckXWYS0XwLp6LM11I+P NCuhZlO+A+flyi+xKaBj4wClr+0apNwyXc+FQdIQj3yq3kH01TeviVCPRG9aUav1IKtl6o B5CV707jp69MrSHAT9R46X0HF0j/7rgs+qTmcPF+I6nzsu0BjAY9YBuo6U/9+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CeMKMUnPRMYgMAYPSSErSLu9ghmmeq+P08vwlx/gKYs=; b=DLk7w0z3r3nZ1YL/PMZfqFCWUTlUIKKWp0tC3XCbkl5QXd8idH+EjJLchTHPSaCyqmQeEb PsIHRV3PIzRqveibeQxxuTPLsNR9TA4S8m0sygCnQ7fm6Bvgr3aMd+PdPsP6INybZ+y5f0 fHBcsK5gn46eNH4mR16UNjEdhQkwnTGQZc5tGchyC/rWwx7KDfNYf2V/3hNtvn4dvmiKG+ l90GCF3OnistHGvz0qJjAGoNIw/D2jsNXAR3kaBBMeS4Xmbtlz5ZSQLBM+LfN7qK1vql9H 6ph2jCAT72Co0nsErPif8EY9QPaY/pkSFXTNqkcusXX9g0YYVBZq9LtXozSY8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHc59pjz1CZG for ; Fri, 24 Apr 2026 17:56:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1d116 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: a7cf142ba904 - stable/15 - acpi_apm: Narrow scope of ACPI_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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a7cf142ba9044c3b8f88b4a8ed7f5720bc39b90c Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:28 +0000 Message-Id: <69ebaecc.1d116.3dc1cb30@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a7cf142ba9044c3b8f88b4a8ed7f5720bc39b90c commit a7cf142ba9044c3b8f88b4a8ed7f5720bc39b90c Author: John Baldwin AuthorDate: 2026-03-30 13:38:54 +0000 Commit: John Baldwin CommitDate: 2026-04-24 17:49:14 +0000 acpi_apm: Narrow scope of ACPI_LOCK This lock doesn't need to be held across seldrain/knlist_destroy. It is also redundant (and a bug) to hold it across knlist_add and knlist_remove since it is the mutex for the knlist. PR: 293901 Reported by: Jiaming Zhang Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55994 (cherry picked from commit cc2715cf1f864345ab175db691d4e152d5fb84af) --- sys/x86/acpica/acpi_apm.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sys/x86/acpica/acpi_apm.c b/sys/x86/acpica/acpi_apm.c index d5fee124703d..74987ad01d0d 100644 --- a/sys/x86/acpica/acpi_apm.c +++ b/sys/x86/acpica/acpi_apm.c @@ -243,9 +243,9 @@ apmdtor(void *data) /* Remove this clone's data from the list and free it. */ ACPI_LOCK(acpi); STAILQ_REMOVE(&acpi_sc->apm_cdevs, clone, apm_clone_data, entries); + ACPI_UNLOCK(acpi); seldrain(&clone->sel_read); knlist_destroy(&clone->sel_read.si_note); - ACPI_UNLOCK(acpi); free(clone, M_APMDEV); } @@ -407,11 +407,9 @@ apmkqfilter(struct cdev *dev, struct knote *kn) struct apm_clone_data *clone; devfs_get_cdevpriv((void **)&clone); - ACPI_LOCK(acpi); kn->kn_hook = clone; kn->kn_fop = &apm_readfiltops; knlist_add(&clone->sel_read.si_note, kn, 0); - ACPI_UNLOCK(acpi); return (0); } @@ -420,10 +418,8 @@ apmreadfiltdetach(struct knote *kn) { struct apm_clone_data *clone; - ACPI_LOCK(acpi); clone = kn->kn_hook; knlist_remove(&clone->sel_read.si_note, kn, 0); - ACPI_UNLOCK(acpi); } static int @@ -432,8 +428,8 @@ apmreadfilt(struct knote *kn, long hint) struct apm_clone_data *clone; int sleeping; - ACPI_LOCK(acpi); clone = kn->kn_hook; + ACPI_LOCK(acpi); sleeping = clone->acpi_sc->acpi_next_sstate ? 1 : 0; ACPI_UNLOCK(acpi); return (sleeping); From nobody Fri Apr 24 17:56:29 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHf2dMPz6Zxhg for ; Fri, 24 Apr 2026 17:56:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2LHd64wlz3qqT for ; Fri, 24 Apr 2026 17: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=1777053389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VteWk5KjWGDcVSQSCGRHiMIefmrNUTAE6p8uzyXrMhA=; b=jHb6Xo/WD/V2z97TKKzGt15qTklbR/4Hcb3v+ZQxyP7tIq7jFVj1CmhHF92FFGlt8h/Wm8 pVpxaKHJrvj7DyH9kHIW2q+9cXVZmzZGLLsET0KvWeDUovq3A9A8r+mJCm3u+boJn4ii9b Zx7FoxZgrEzKVDuK4GOvP4XPbJx/NgZOJRV8CzdDLOZ9HLpq18QPIQBuKuVWCuXOCwdi6k 1IOG0QfLwDUCQr9PvRNlTMcy+gYR7oYrKXBbtkov43d7d9k54Nv83PdxxiLaW1Z3EtuTnZ 8feMOC8XqZmv2is2HLZCJKvD2fuGXZxj1MrokMb9gYKVpTD5RUbSlX7XqatZKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777053389; a=rsa-sha256; cv=none; b=KsKp0FywYHR1sPTA/K2K/VATJnMDElfgVmnvQiNUUn7jGbpEehOz9O6ixKhhGnrEvtGL/s AbdrSwYTC19Hfh3FYxCMiuHTSjK7XLazduBp8ZzNUe41+xaEvozd1f2gsbdhG+jWNB44tJ wu7Q4p6cYyQCY4ww1SAL5dUONXFoYW/Alya0NYENfIQRoQt107pAB4xh6MYj7oIE1kXmU2 fwKCWHt73gZ+/dAJFY421DQ4xS5NULdptgLfkXk0rN+de01IzGjI8D/RG24Mhjxls7Xowf I8TNRAnkESHktCcCuApl3ZvwZlrWLjKZWyW3gu+BuijREaS0hjKRGj8zOJ8AdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777053389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VteWk5KjWGDcVSQSCGRHiMIefmrNUTAE6p8uzyXrMhA=; b=wJzgGvvu1L1z9wkeoSKUyLVAQq6DPncpI41CxU6BG7OZTJ7dxLdd0NF1u5gcTsxNV+HH94 7qwiMxTSoKOHE09XSissklmoyugLp8kCw7rojVmGCbBycOo735v6J7pTnL673ZhPa/EDQ7 DJovsJTQd+QS56yLC3VYbWWawaaDT1TwA3DW7WNn3B62G+opfnMiyxWkZ7GtyktaCFAH2i DyROo/AvpqVlMiEEgfC38aKMbN1ffALP6l+Yp5sr9cUUeyshBKHR41fd5CkVGzltlVwBEi jnySkcQtSgKRUq5jBCA0oGezvtVqlP4K4qVhyEBMETTrsboBcldoWF/tSnkgbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2LHd5WkRz1CGF for ; Fri, 24 Apr 2026 17:56:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1df90 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 17:56:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: a783b0bca2ca - stable/15 - acpi_apm: Don't recurse on ACPI_LOCK in apmreadfilt List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a783b0bca2ca79e9f881538314347c5304edd11f Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 17:56:29 +0000 Message-Id: <69ebaecd.1df90.58a55732@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a783b0bca2ca79e9f881538314347c5304edd11f commit a783b0bca2ca79e9f881538314347c5304edd11f Author: John Baldwin AuthorDate: 2026-04-14 13:25:37 +0000 Commit: John Baldwin CommitDate: 2026-04-24 17:49:14 +0000 acpi_apm: Don't recurse on ACPI_LOCK in apmreadfilt The lock is already held by the caller since it is used as the knlist lock. PR: 293901 Reported by: Jiaming Zhang Fixes: cc2715cf1f86 ("acpi_apm: Narrow scope of ACPI_LOCK") (cherry picked from commit 8c941e313e3925b17e49b093244c159db7a112f8) --- sys/x86/acpica/acpi_apm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/x86/acpica/acpi_apm.c b/sys/x86/acpica/acpi_apm.c index 74987ad01d0d..e781085a442f 100644 --- a/sys/x86/acpica/acpi_apm.c +++ b/sys/x86/acpica/acpi_apm.c @@ -429,9 +429,7 @@ apmreadfilt(struct knote *kn, long hint) int sleeping; clone = kn->kn_hook; - ACPI_LOCK(acpi); sleeping = clone->acpi_sc->acpi_next_sstate ? 1 : 0; - ACPI_UNLOCK(acpi); return (sleeping); } From nobody Fri Apr 24 19:54:21 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2Nvd4tTHz6b8Sh for ; Fri, 24 Apr 2026 19:54:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2Nvd48PHz3NGZ for ; Fri, 24 Apr 2026 19:54:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777060461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b2pItBXdU2QhMg1RaMDX+ULnzXjAh0fbFDZm6Ymf1+U=; b=P1sqFrwJ76Yfo8FOjCF5oLSX2iTrY76oOWIP6SOKWZCQAcZQjWMjChc7jPuTzN/VYrQ8fp XkosINHurGukszY3Gs8r9njXNVkD8tVB1axpT4JxhY71uSho1mnfwD8yQ/FZq6+RBMJIVz b5WWeOuq8vP/7JXAdWJDhHcbir8p7iiMbiAKgnLOvyqvE1+VjXfynj+CtnG0BdvEvLFLWo AcnCWk0cexLM7OBlirVzKXu8DEN7b0gSLRw/prNDmwPcUn9PLinYAk59ib9CazzbAurU1a zpjH55v7JLA5EQztlsRQffIKdRXGo7Tto2kljMGnUJtE4+qA1oSEGEaBu/eBXw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777060461; a=rsa-sha256; cv=none; b=aCfVm+AfhKYhC9gqGG094kHHjyq7WDdeSyAqeQy6pYRV7yCstwi6DZMPKvnzm3Cp9gHEpc bkcDnxpEarQ5AckUONU+Mes+myaApjpIYr4pHrlShAjkYGvs7N0e8vUhFSTBAfoQnJ7FKn l/OQB7p5q7r4tI6LOn9HgEVuZHXGI6JbNS6cLrVL4BSOqS/q6A/JYS3yWlYdIjypmkYrMV aFYek0oem2XRCd0MqMZbSPYd2mGofqdaOFHDAr/Xouf3Qx1XozT3VueN2w/z5pl6Y87lDu lT5pcYCoxhR4Zl/NgAI7YaSVfbXkCMoqlhmNeZlZfgNI0pF28/WtvBxptReRFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777060461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b2pItBXdU2QhMg1RaMDX+ULnzXjAh0fbFDZm6Ymf1+U=; b=Ww/kdco2PFoEJjcfls3eRTeFvVIb1ExGyGpbHVwjB3A4Fdcvr6Kp2TveXULm4BUBw1771Z AVp9xh9PWNNveensbmIYCeEENOexXgh8Vq5zPwdUkGrB2qlujQ+PP6YjoXPOwucuut3iOg VOnUUo1CfuLJZgEJHT4PLIDbBdIIR4zdMv14Da9yXvyjoS48/sY3LRGWDl4FzvAaERmMY9 f6hlfpDb4+Tu15IK0OE+IzJTE2UC4+kMOPRSPYznDZeC3pJHKZpEDQXiYUU4uDj9vcxbV0 EJRQ/90C/kQk4A2IN+G4vNFqdpJKGNFb5GYUi+ZaAv9yELDsrlZS6HEYHO6+jg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2Nvd3Bm3z1GfD for ; Fri, 24 Apr 2026 19:54:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32932 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 19:54:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 50c4b12485fe - stable/14 - acpi_apm: Narrow scope of ACPI_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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 50c4b12485fe1364148c2496ac18946779143ab6 Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 19:54:21 +0000 Message-Id: <69ebca6d.32932.3bc99d80@gitrepo.freebsd.org> The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=50c4b12485fe1364148c2496ac18946779143ab6 commit 50c4b12485fe1364148c2496ac18946779143ab6 Author: John Baldwin AuthorDate: 2026-03-30 13:38:54 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:48:36 +0000 acpi_apm: Narrow scope of ACPI_LOCK This lock doesn't need to be held across seldrain/knlist_destroy. It is also redundant (and a bug) to hold it across knlist_add and knlist_remove since it is the mutex for the knlist. PR: 293901 Reported by: Jiaming Zhang Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55994 (cherry picked from commit cc2715cf1f864345ab175db691d4e152d5fb84af) --- sys/x86/acpica/acpi_apm.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sys/x86/acpica/acpi_apm.c b/sys/x86/acpica/acpi_apm.c index b602047d7bca..7f527af20b41 100644 --- a/sys/x86/acpica/acpi_apm.c +++ b/sys/x86/acpica/acpi_apm.c @@ -243,9 +243,9 @@ apmdtor(void *data) /* Remove this clone's data from the list and free it. */ ACPI_LOCK(acpi); STAILQ_REMOVE(&acpi_sc->apm_cdevs, clone, apm_clone_data, entries); + ACPI_UNLOCK(acpi); seldrain(&clone->sel_read); knlist_destroy(&clone->sel_read.si_note); - ACPI_UNLOCK(acpi); free(clone, M_APMDEV); } @@ -407,11 +407,9 @@ apmkqfilter(struct cdev *dev, struct knote *kn) struct apm_clone_data *clone; devfs_get_cdevpriv((void **)&clone); - ACPI_LOCK(acpi); kn->kn_hook = clone; kn->kn_fop = &apm_readfiltops; knlist_add(&clone->sel_read.si_note, kn, 0); - ACPI_UNLOCK(acpi); return (0); } @@ -420,10 +418,8 @@ apmreadfiltdetach(struct knote *kn) { struct apm_clone_data *clone; - ACPI_LOCK(acpi); clone = kn->kn_hook; knlist_remove(&clone->sel_read.si_note, kn, 0); - ACPI_UNLOCK(acpi); } static int @@ -432,8 +428,8 @@ apmreadfilt(struct knote *kn, long hint) struct apm_clone_data *clone; int sleeping; - ACPI_LOCK(acpi); clone = kn->kn_hook; + ACPI_LOCK(acpi); sleeping = clone->acpi_sc->acpi_next_sstate ? 1 : 0; ACPI_UNLOCK(acpi); return (sleeping); From nobody Fri Apr 24 19:54:22 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2Nvf5qpNz6b8YS for ; Fri, 24 Apr 2026 19:54:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2Nvf4dkbz3NGb for ; Fri, 24 Apr 2026 19:54:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777060462; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NBZWtmC1YJM3TGffUteZ4Swh3rGhbtG0nNu4UmWjedw=; b=uV48ODICrxZ4th35FPRZ5cM/r8VtKhb76fM9N7AO4coZJtR8bABkKxuII5HFW4W+lt3Dbh IZgxFG2GGfxbX6xo4jHvgBN35hR09QNIJ2AOiHolH5dc8Qcjerq7bZK/l17L+l+YM3jtYj fImcVNTTaHkgJzDKBNtzxW1l7FnVd+/XfzrpUgwPPmo8SqDL0VhAo4t6MsNSNzA4YJOGFh kyPraB0gbcYhTYPJcmfkAx97a3L0HCz9jHi3QcY1IyPfFsEjd3tf85TDHgOKfrCPjTlcBL KR1QZzffBS76027mPQWOnCb12g70PquX3sHEstbTOusfd/nMh27lkfD8FKrqqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777060462; a=rsa-sha256; cv=none; b=VHP87VcbV1YAYGNeCjkaYhWDFNJ8TlCh+GKOdAYgtTDEbb85/Uuz3UkPfSY32Y+ZKesGWS 94NOn8khJ67Bxm6CpN8hsVB73CwnWr6oEXYLw298vLidv3bJTzc5WddgAlBUzF2rSyi5vq J+NGYyzXsIBarb3oC58r+5rvZR7zc6H7yh4FafQAwGjqjMxXsawkz+ZueOtxKqlujeqTPR EujanTWMqcqnVgQ11YVtX/V+vh+UKN8JnOM9NZAcPVc3QMIdJYukx8zVriyRUf0sYNN4e3 vM7eZQW0NHfjhRgWxmfHR/dN7LVVWscnRIFwmXjjpU74eXXNU75nR1OZssId1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777060462; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NBZWtmC1YJM3TGffUteZ4Swh3rGhbtG0nNu4UmWjedw=; b=kqqfM4d/MmotNqSerfEDtYM2m6Jyb7lBJyy6Gqxvk7R6siSPvmSApPkGZyDWYANUFTxM3z UuwR9kXCNg4z8P72kPxvsXcdMKw1/UfjRFDtCsMSNQRTa8AWXqjQYd59ixaKs/VbBGz8l4 1y9gPcxTe9p46cHJzasvsW3xj7udVbEjzM+Sgf+Vl2tHZpuQiIqlI+Imi2OMGtIyDmx74h sou+lwFFQLoNOfKOJ5+q0hB+cMZyNwqbduzcSCyf9veAnXGH0Ls8/AwjP5Q70wI2AfrSGn 49Qt1Si2PBe525kzaAUTQgESxcacnrUKU0zVT5/9u+qFF5s5pTwKloJ++AFeGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2Nvf3zRfz1GfF for ; Fri, 24 Apr 2026 19:54:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3250c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 19:54:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 363996314872 - stable/14 - acpi_apm: Don't recurse on ACPI_LOCK in apmreadfilt List-Id: Commits to the stable branches 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3639963148722404e92454ffdd4d795fa636a21e Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 19:54:22 +0000 Message-Id: <69ebca6e.3250c.1f514e6e@gitrepo.freebsd.org> The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3639963148722404e92454ffdd4d795fa636a21e commit 3639963148722404e92454ffdd4d795fa636a21e Author: John Baldwin AuthorDate: 2026-04-14 13:25:37 +0000 Commit: John Baldwin CommitDate: 2026-04-24 15:49:49 +0000 acpi_apm: Don't recurse on ACPI_LOCK in apmreadfilt The lock is already held by the caller since it is used as the knlist lock. PR: 293901 Reported by: Jiaming Zhang Fixes: cc2715cf1f86 ("acpi_apm: Narrow scope of ACPI_LOCK") (cherry picked from commit 8c941e313e3925b17e49b093244c159db7a112f8) --- sys/x86/acpica/acpi_apm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/x86/acpica/acpi_apm.c b/sys/x86/acpica/acpi_apm.c index 7f527af20b41..22bf0cfaef79 100644 --- a/sys/x86/acpica/acpi_apm.c +++ b/sys/x86/acpica/acpi_apm.c @@ -429,9 +429,7 @@ apmreadfilt(struct knote *kn, long hint) int sleeping; clone = kn->kn_hook; - ACPI_LOCK(acpi); sleeping = clone->acpi_sc->acpi_next_sstate ? 1 : 0; - ACPI_UNLOCK(acpi); return (sleeping); } From nobody Fri Apr 24 21:49:00 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2RS14GyXz6bLMY for ; Fri, 24 Apr 2026 21:49:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2RS13d8dz3ck4 for ; Fri, 24 Apr 2026 21:49:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777067345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=syt826MPu+MmjLFRZ62fBccna2gWN39C4rG4wSuJ37c=; b=r554/gd5tooDwQhG68C3HGmxE0X9KUgv5B//eoIoYhhn8QAqauGGAWPRB+PZIqf+bHbo7A 4HTKUJdx71Nmr+6QPl0lSZnAlSPwVdv2karNPxcxn3BIT+tZoxkIEzEFWlzNDeF7Ewpe2r oOnufSq9+lPHF6R0o0O13SAFzxL1d4onbLkkeRch626aU35DEG+Jq5yvRdFySy5c32bFMf KiPtJDy98StOhQWE09UkqLI/pzBQIvB8vMDolo1GQG6PLFm/9/9KA9rRKycVM9Hw3MLri9 QEW2x5R5Jh+zjJ3F8qx6TFmFnMlypegh5/EHybKHDmtW1RPP5C2OY8mm054IGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777067345; a=rsa-sha256; cv=none; b=wsXd5+dzYGMZ0yWruVlRVjbsCLg5qyAWJQUqN0031AQiW5LHDVeTMohopwzdYQM466EbV4 D7GwG65agWVBifrLxIzHimME3qsDRygPflImanjJ3GWBxzVJwQ/ZMCb1hJNlADMKberaYf BAai08JVprtOjx9iHTQNbtjGjazgkKY/9cmsgbr4tNiz5QsuJbI2I3A1Tp1pypqCO7CBN+ tHMijL0bBY5aK+eHIDY/mMp0GEJ0SjxP7jrAGgf0ILzbzqnF9nEDABosADSDDN0hnnXjBb 15fYJ9zOmqQdgGY63D+2nJFQFbWLNhHmMH8aUvucGg1dRlMPp01HY3E4H/5TJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777067345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=syt826MPu+MmjLFRZ62fBccna2gWN39C4rG4wSuJ37c=; b=ASCoa6IqM111Tc8mQk5ZCBUJgFhJmMLNuqZTToaZtKcs4QYwruWC/LRCy19089mrm1+7y6 6Raa+tqHR2/Wcl9xo4n3MDpc66og6ix4QqgF9ME3bfF6FHiu429ewJC27xQghgGf4PfuT+ 8DqzLGVluRgmwtWjUrh19RfE7IRrMCUfZUmQ7bP1L5kI3idKA8lv3+FfFVX4Whh4W//gep 4HV3Cnyu5pTN7q2Rh6uHATlcBFQ7SLlhap2KvHOn/8X0IBImEugoMIW+Qs8HzgdoC+npdo eQfjCjwTxQ4NZwyoT2v1+0pb6WTQW6SI40JP/bh0AD0RLPjYxS9Ya1v7xQ/Kkw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2RS12cyJz1KGl for ; Fri, 24 Apr 2026 21:49:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3eddd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Apr 2026 21:49:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Vince From: Warner Losh Subject: git: 861deac98c4c - stable/15 - Fix xhci detection on Raspberry Pi 400 List-Id: Commits to the stable branches 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 861deac98c4cd403b39c0d978bf2d39115c9caee Auto-Submitted: auto-generated Date: Fri, 24 Apr 2026 21:49:00 +0000 Message-Id: <69ebe54c.3eddd.75e247c6@gitrepo.freebsd.org> The branch stable/15 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=861deac98c4cd403b39c0d978bf2d39115c9caee commit 861deac98c4cd403b39c0d978bf2d39115c9caee Author: Vince AuthorDate: 2026-04-02 01:28:50 +0000 Commit: Warner Losh CommitDate: 2026-04-24 21:44:33 +0000 Fix xhci detection on Raspberry Pi 400 If you use the FreeBSD pre-build Raspberry Pi image, it does not include the specific .dtb file for the Raspberry Pi 400. On this hardware, it will fall back to attempting to load the Raspberry Pi 4 .dtb file instead. The Pi 4 .dtb file reports the board compatible name as "raspberrypi,4-model-b" The Pi 400 .dtb file reports the board compatible name as "raspberrypi,400" However, it's even better to use the generic name. When using the official Pi 400 .dtb file from the Raspberry Pi Firmware collection, the FreeBSD xhci driver currently fails to recognize this, and thus fails to initialize the xhci device. This means no external USB, or internal USB (which feeds the build-in keyboard) The official Raspberry Pi FreeBSD image has been working on the Pi 400 "on accident" simply because it didn't include the Pi 400 .dtb file prior to this. But the Stratipi Builder uses the full Raspberry Pi firmware suite and hit this bug. As a note: this is probably also a bug on the Compute Module 4 (CM4), but I don't own one of these devices in order to test/validate it. MFC After: 5 days Reviewed by: imp, Ali Mashtizadeh Pull Request: https://github.com/freebsd/freebsd-src/pull/2115 (cherry picked from commit 7634043970078f63eea03bb8975bd3fe1e883130) --- sys/arm/broadcom/bcm2835/bcm2838_xhci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arm/broadcom/bcm2835/bcm2838_xhci.c b/sys/arm/broadcom/bcm2835/bcm2838_xhci.c index 25579d7227a5..b1461d17d391 100644 --- a/sys/arm/broadcom/bcm2835/bcm2838_xhci.c +++ b/sys/arm/broadcom/bcm2835/bcm2838_xhci.c @@ -89,7 +89,7 @@ bcm_xhci_probe(device_t dev) root = OF_finddevice("/"); if (root == -1) return (ENXIO); - if (!ofw_bus_node_is_compatible(root, "raspberrypi,4-model-b")) + if (!ofw_bus_node_is_compatible(root, "brcm,bcm2711")) return (ENXIO); /* @@ -105,7 +105,7 @@ bcm_xhci_probe(device_t dev) return (ENXIO); device_set_desc(dev, - "VL805 USB 3.0 controller (on the Raspberry Pi 4b)"); + "VL805 USB 3.0 controller (on the Raspberry Pi 4 series)"); return (BUS_PROBE_SPECIFIC); } From nobody Sat Apr 25 14:34:24 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2sm10SMNz6bbdZ for ; Sat, 25 Apr 2026 14:34:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2sm05CQWz3g2l for ; Sat, 25 Apr 2026 14:34:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777127664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9WbYqxgMjPkh8fO1YTBrqobLuTcPftqaNLw1VgjzJy0=; b=nKEYshOCHK7bOCVCP+JoSnSOh6JM80uVSPGc9303XT130/pfcehFNCIt+p+N5VbuyGvpos Qi63tvFW/GBV4JJRcfqzu/aBE0zFy9EczhH5vx+QKEgfajyw0BZTq7tXjvZvUHL7ySq2ko zDenEzdc6dsUaTQw3T/gTq/Cmoy9WVk4czYOVP/Wpm+B6fe0VdEmnuO/qzO1FIQzZVi2so /xZFsRe3C6wmSx/ISvW5WSs3FU2mlA8yZItL72ylZAdmgFBbnVpFSBBIIWXLCt7TymjLG2 FUNO1hBu0yDaAB8DLJ6y9r19xilCOW/daH2Oc3wZtjiqtn1QsHJQpZ60RQzzwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777127664; a=rsa-sha256; cv=none; b=tf9ByaC4oSEW2ttiU4z9ZKj0L8Y52mZh4ytU3oR9UwcKaxGghSXdcQgrhKTDwlez6Fd1IN C1OiSd7UG93zhimxSTZ/T73QnGAqjU/+2CpjOGudzzWtUPAtDRFJ8Y/s2c/gGrPVB7DMt2 2eLxaBTCVX8Y7kxkIAF8XVSMf1z4EiBSP+72KmJt6SiRENFJP2y9IgoeO7YGes7h0J9a26 22qGzwlXA85nMP9MdxJKRL0drBJ/CcUbd7alFUBG4Um9P8ctJovdHe5+08D2AyzDIcykJp XkEReiTbpnzjtKmk0kcHyFp/4DjROfTjLi8RxX7bzNXqbGLI9ZcCKl8v02es9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777127664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9WbYqxgMjPkh8fO1YTBrqobLuTcPftqaNLw1VgjzJy0=; b=MDQBI2VMl6nsstLY4wvpLtVGScqM/G29RSZK+niyKz7fR9b5VV7Oiwbqo0/wRDSSnB05nI 4r/GbPzmf7l5iqrb5ieYS/PuK3goC5owDwySshSG90P/FcVD6W8PgFcW+Xe5Rt/y0zk/gb gtKTBYdyoo3x+rw2tL1PwA53pJr1iz7mICseXhL/qMBS9e8tkkfNRpkdX47Kjr0xwOSBHU xxuWWmA6/I4/Gd1dRh2FFp/043B0OL/YLoIQiuHHjcRGU4xSpydrCW9EXF799jPgwfnrDm Id1VRNyRCEB8pUY/TYBc0RlXnj+CUPoutqiNWIi+s9YDgk7PXkIwTphKn0I8sw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2sm04hFyzf0k for ; Sat, 25 Apr 2026 14:34:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39985 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 14:34:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Osipov Subject: git: 3541e09bbbcb - stable/15 - mfiutil(8)/mrsasutil(8): "show drives" truncates information List-Id: Commits to the stable branches 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: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 3541e09bbbcb65074b69bc66216de2c1c4aee7c2 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 14:34:24 +0000 Message-Id: <69ecd0f0.39985.7d2bbda6@gitrepo.freebsd.org> The branch stable/15 has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=3541e09bbbcb65074b69bc66216de2c1c4aee7c2 commit 3541e09bbbcb65074b69bc66216de2c1c4aee7c2 Author: Michael Osipov AuthorDate: 2026-04-09 09:19:36 +0000 Commit: Michael Osipov CommitDate: 2026-04-25 14:31:50 +0000 mfiutil(8)/mrsasutil(8): "show drives" truncates information Improve mfi_pd_inq_string() by * Reusing buffer sizes from cam/cam.h according to SCSI specification + NULL byte * Don't truncate vendor-specific information by escaping into a too small buffer * Use cam_strvis() from libcam instead of old, outdated local copy * Recaculate size of inq_string based on the reused buffer sizes and format statements PR: 294354 Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D56328 (cherry picked from commit 850eb149e7ab0733fcf9469a607dca223ff467ad) --- usr.sbin/mfiutil/Makefile | 2 +- usr.sbin/mfiutil/mfi_drive.c | 59 +++++++++----------------------------------- 2 files changed, 13 insertions(+), 48 deletions(-) diff --git a/usr.sbin/mfiutil/Makefile b/usr.sbin/mfiutil/Makefile index 49c0e688e8e2..d7ccb1f2d9c1 100644 --- a/usr.sbin/mfiutil/Makefile +++ b/usr.sbin/mfiutil/Makefile @@ -9,7 +9,7 @@ MLINKS= mfiutil.8 mrsasutil.8 CFLAGS.gcc+= -fno-builtin-strftime -LIBADD= sbuf util +LIBADD= cam sbuf util # Here be dragons .ifdef DEBUG diff --git a/usr.sbin/mfiutil/mfi_drive.c b/usr.sbin/mfiutil/mfi_drive.c index c7c5aeb02f14..88d24623ae27 100644 --- a/usr.sbin/mfiutil/mfi_drive.c +++ b/usr.sbin/mfiutil/mfi_drive.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include "mfiutil.h" @@ -279,50 +280,14 @@ mfi_pd_get_info(int fd, uint16_t device_id, struct mfi_pd_info *info, sizeof(struct mfi_pd_info), mbox, 2, statusp)); } -static void -cam_strvis(char *dst, const char *src, int srclen, int dstlen) -{ - - /* Trim leading/trailing spaces, nulls. */ - while (srclen > 0 && src[0] == ' ') - src++, srclen--; - while (srclen > 0 - && (src[srclen-1] == ' ' || src[srclen-1] == '\0')) - srclen--; - - while (srclen > 0 && dstlen > 1) { - char *cur_pos = dst; - - if (*src < 0x20) { - /* SCSI-II Specifies that these should never occur. */ - /* non-printable character */ - if (dstlen > 4) { - *cur_pos++ = '\\'; - *cur_pos++ = ((*src & 0300) >> 6) + '0'; - *cur_pos++ = ((*src & 0070) >> 3) + '0'; - *cur_pos++ = ((*src & 0007) >> 0) + '0'; - } else { - *cur_pos++ = '?'; - } - } else { - /* normal character */ - *cur_pos++ = *src; - } - src++; - srclen--; - dstlen -= cur_pos - dst; - dst = cur_pos; - } - *dst = '\0'; -} - /* Borrowed heavily from scsi_all.c:scsi_print_inquiry(). */ const char * mfi_pd_inq_string(struct mfi_pd_info *info) { struct scsi_inquiry_data iqd, *inq_data = &iqd; - char vendor[16], product[48], revision[16], rstr[12], serial[SID_VENDOR_SPECIFIC_0_SIZE]; - static char inq_string[64]; + char vendor[SID_VENDOR_SIZE+1], product[SID_PRODUCT_SIZE+1], + revision[SID_REVISION_SIZE+1], rstr[9], serial[SID_VENDOR_SPECIFIC_0_SIZE+1]; + static char inq_string[80]; memcpy(inq_data, info->inquiry_data, (sizeof (iqd) < sizeof (info->inquiry_data))? @@ -334,14 +299,14 @@ mfi_pd_inq_string(struct mfi_pd_info *info) if (SID_QUAL(inq_data) != SID_QUAL_LU_CONNECTED) return (NULL); - cam_strvis(vendor, inq_data->vendor, sizeof(inq_data->vendor), - sizeof(vendor)); - cam_strvis(product, inq_data->product, sizeof(inq_data->product), - sizeof(product)); - cam_strvis(revision, inq_data->revision, sizeof(inq_data->revision), - sizeof(revision)); - cam_strvis(serial, (char *)inq_data->vendor_specific0, sizeof(inq_data->vendor_specific0), - sizeof(serial)); + cam_strvis_flag(vendor, inq_data->vendor, sizeof(inq_data->vendor), + sizeof(vendor), CAM_STRVIS_FLAG_NONASCII_TRIM); + cam_strvis_flag(product, inq_data->product, sizeof(inq_data->product), + sizeof(product), CAM_STRVIS_FLAG_NONASCII_TRIM); + cam_strvis_flag(revision, inq_data->revision, sizeof(inq_data->revision), + sizeof(revision), CAM_STRVIS_FLAG_NONASCII_TRIM); + cam_strvis_flag(serial, (char *)inq_data->vendor_specific0, sizeof(inq_data->vendor_specific0), + sizeof(serial), CAM_STRVIS_FLAG_NONASCII_SPC); /* Hack for SATA disks, no idea how to tell speed. */ if (strcmp(vendor, "ATA") == 0) { From nobody Sat Apr 25 14:37:22 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2sqQ74TLz6bc73 for ; Sat, 25 Apr 2026 14:37:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2sqQ65hDz3gFm for ; Sat, 25 Apr 2026 14:37:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777127842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3fNScq9pDx2sQImZEC667A8E9MSttGY1KYtJdCtd/3A=; b=LYFVCbU7ccPdOqUtLEo/CevkRDC7E2Z5Q1oCazbCTAxAINKNHl+b4cfRM/6EmdHiXcTprS iq+jMa61Shr5PbvbmceGfcvj9Q3zbSnpYt1cSldZNnRQXLQ+t/E6yXatFTZ9FCzFsKMaSE AkZ27bcRGiripHCcqi7ba8Qgo2ge4x7aja+jETn/hU6bAU/KKKMbrlc3/HhkukK7O186qD EkJQP5MvaVQd0cWslykSA34ohWywel+k+30qPhgQAhxBezZKNMzGsEHlVxrkwWSVnW6r/6 5pmxtNXkfVuPHC/58Cp4At6oiChUMot/ZQK0Pln7bvXduUyWDdJQzIFxF5MIpw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777127842; a=rsa-sha256; cv=none; b=azSo9AITCRJdVNddbkXjCVXqNu9RZuJxByAZh566S3u3Hk9oZRq6AlNB3SzD4e5hMZYP/m RV/9K4WPlUFDdu8jUgEH2ZZ5QAyE0wQDlLXKTM6iXeQZ9ksvnFKa4fxS3oDKtk6eABEl2R BaqUxQXvvH2lFybZI1TYP+jUmISpcWgzuxaLDekIr7N98kN8n3VnfvnkbXnvT48YDbn/ZV SlDQNaW52I6ji1lqu3OPz9O1kjeH11FKiIJrcSMPeIUOklCHnXruv0R4FmPdHo9lbzrob2 dZyYVcOQArqPr9fnaYoZrOan51yvVuLBGPqgu5m/NN0+0qCxXKjKBEFhmajsyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777127842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3fNScq9pDx2sQImZEC667A8E9MSttGY1KYtJdCtd/3A=; b=PKI4ZbA9ojaWrVnFB9bYqh5r3n8wX92VD7u89yxZ4VktKgBf8uZvtNkWKJCJqHkYsMrpmA cHlSDd7r2c/czKgUU+6RsCfiqQLEH1oNyiHg03pe/uzfP0BUrzVwf3n1G5k02k1RISHXL1 cVfAf+6IHOIaPDBG4KZ099OU0fgHCc6QquG+jR5fR2Dw6zdTKzFls9MlLxE+ILT3MwiF2l dpjIoXV2Zfudqeltd0RuoeC6JLxEzQ81uxgJAMg+fo1J7fx6kenXBnXDFuLlvojXu3uCD+ LAAa36S1jpk9r8/ov6zwNbOabvKPRg4IVQpJ2oIkuuHV8csFJnUHRBAfaDJ7Iw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2sqQ5gfbzdh0 for ; Sat, 25 Apr 2026 14:37:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38a37 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 14:37:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Osipov Subject: git: eb55ca209aa2 - stable/14 - mfiutil(8)/mrsasutil(8): "show drives" truncates information List-Id: Commits to the stable branches 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: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: eb55ca209aa21bc2b274f129bef954d0931ab23c Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 14:37:22 +0000 Message-Id: <69ecd1a2.38a37.22538401@gitrepo.freebsd.org> The branch stable/14 has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=eb55ca209aa21bc2b274f129bef954d0931ab23c commit eb55ca209aa21bc2b274f129bef954d0931ab23c Author: Michael Osipov AuthorDate: 2026-04-09 09:19:36 +0000 Commit: Michael Osipov CommitDate: 2026-04-25 14:36:44 +0000 mfiutil(8)/mrsasutil(8): "show drives" truncates information Improve mfi_pd_inq_string() by * Reusing buffer sizes from cam/cam.h according to SCSI specification + NULL byte * Don't truncate vendor-specific information by escaping into a too small buffer * Use cam_strvis() from libcam instead of old, outdated local copy * Recaculate size of inq_string based on the reused buffer sizes and format statements PR: 294354 Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D56328 (cherry picked from commit 850eb149e7ab0733fcf9469a607dca223ff467ad) --- usr.sbin/mfiutil/Makefile | 2 +- usr.sbin/mfiutil/mfi_drive.c | 59 +++++++++----------------------------------- 2 files changed, 13 insertions(+), 48 deletions(-) diff --git a/usr.sbin/mfiutil/Makefile b/usr.sbin/mfiutil/Makefile index da1c9249f8cd..94c24b5632ac 100644 --- a/usr.sbin/mfiutil/Makefile +++ b/usr.sbin/mfiutil/Makefile @@ -9,7 +9,7 @@ MLINKS= mfiutil.8 mrsasutil.8 CFLAGS.gcc+= -fno-builtin-strftime -LIBADD= util +LIBADD= cam util # Here be dragons .ifdef DEBUG diff --git a/usr.sbin/mfiutil/mfi_drive.c b/usr.sbin/mfiutil/mfi_drive.c index e8e945c566c4..7f464fe956dd 100644 --- a/usr.sbin/mfiutil/mfi_drive.c +++ b/usr.sbin/mfiutil/mfi_drive.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include "mfiutil.h" @@ -289,50 +290,14 @@ mfi_pd_get_info(int fd, uint16_t device_id, struct mfi_pd_info *info, sizeof(struct mfi_pd_info), mbox, 2, statusp)); } -static void -cam_strvis(char *dst, const char *src, int srclen, int dstlen) -{ - - /* Trim leading/trailing spaces, nulls. */ - while (srclen > 0 && src[0] == ' ') - src++, srclen--; - while (srclen > 0 - && (src[srclen-1] == ' ' || src[srclen-1] == '\0')) - srclen--; - - while (srclen > 0 && dstlen > 1) { - char *cur_pos = dst; - - if (*src < 0x20) { - /* SCSI-II Specifies that these should never occur. */ - /* non-printable character */ - if (dstlen > 4) { - *cur_pos++ = '\\'; - *cur_pos++ = ((*src & 0300) >> 6) + '0'; - *cur_pos++ = ((*src & 0070) >> 3) + '0'; - *cur_pos++ = ((*src & 0007) >> 0) + '0'; - } else { - *cur_pos++ = '?'; - } - } else { - /* normal character */ - *cur_pos++ = *src; - } - src++; - srclen--; - dstlen -= cur_pos - dst; - dst = cur_pos; - } - *dst = '\0'; -} - /* Borrowed heavily from scsi_all.c:scsi_print_inquiry(). */ const char * mfi_pd_inq_string(struct mfi_pd_info *info) { struct scsi_inquiry_data iqd, *inq_data = &iqd; - char vendor[16], product[48], revision[16], rstr[12], serial[SID_VENDOR_SPECIFIC_0_SIZE]; - static char inq_string[64]; + char vendor[SID_VENDOR_SIZE+1], product[SID_PRODUCT_SIZE+1], + revision[SID_REVISION_SIZE+1], rstr[9], serial[SID_VENDOR_SPECIFIC_0_SIZE+1]; + static char inq_string[80]; memcpy(inq_data, info->inquiry_data, (sizeof (iqd) < sizeof (info->inquiry_data))? @@ -344,14 +309,14 @@ mfi_pd_inq_string(struct mfi_pd_info *info) if (SID_QUAL(inq_data) != SID_QUAL_LU_CONNECTED) return (NULL); - cam_strvis(vendor, inq_data->vendor, sizeof(inq_data->vendor), - sizeof(vendor)); - cam_strvis(product, inq_data->product, sizeof(inq_data->product), - sizeof(product)); - cam_strvis(revision, inq_data->revision, sizeof(inq_data->revision), - sizeof(revision)); - cam_strvis(serial, (char *)inq_data->vendor_specific0, sizeof(inq_data->vendor_specific0), - sizeof(serial)); + cam_strvis_flag(vendor, inq_data->vendor, sizeof(inq_data->vendor), + sizeof(vendor), CAM_STRVIS_FLAG_NONASCII_TRIM); + cam_strvis_flag(product, inq_data->product, sizeof(inq_data->product), + sizeof(product), CAM_STRVIS_FLAG_NONASCII_TRIM); + cam_strvis_flag(revision, inq_data->revision, sizeof(inq_data->revision), + sizeof(revision), CAM_STRVIS_FLAG_NONASCII_TRIM); + cam_strvis_flag(serial, (char *)inq_data->vendor_specific0, sizeof(inq_data->vendor_specific0), + sizeof(serial), CAM_STRVIS_FLAG_NONASCII_SPC); /* Hack for SATA disks, no idea how to tell speed. */ if (strcmp(vendor, "ATA") == 0) { From nobody Sat Apr 25 14:39:31 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2ssw05Bkz6bc3l for ; Sat, 25 Apr 2026 14:39:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2ssv6N8pz3gqD for ; Sat, 25 Apr 2026 14:39:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777127971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6nlMsBQfA4m7Fk1vQkDgsSjWpPN+UNU7vh5tjB+pwec=; b=wKF+0WgnjYvLCssf0ZJ7+uDeZOOCTP0Y0n2nfi7jcIvcWnvVj2bxHTsov9feMikFzK1lwR 5qnvY/G1gdBzGkR69fIp2Fo/yFuoPaFYkKydcgYS5kHXandCVPXvvJ5somcfmA7MREJv5n FxkXqfymf/yQ+St5g8g9UOFgdlSpqOSCD5z4rsJ2EPRILXCx0qT6ACpuly9FiZlHlUp83h P+gNAkEYMVqgCDDwfh3KwlBmwFY3+h/6OW/SA3qCUI+A8tUyTbVqPdZTalxpldiPFS5Lty kU1kfU5uiGiXR1sO1ZhLI+hWUmXvFWL1JIw7bntV2FGWw0PBqB7+Jm9rIVYsTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777127971; a=rsa-sha256; cv=none; b=VOufcKzQCmhbwsvQDHGXZgm1BRMipxF9hZQmqOGwMyYOvmrRLco1XPOq2N0bTdetfXlLJp BNiNCDeqVTIhW/ALb103UM4PdrcvYDq7RQnkQLQhEjAGT0RMmMeZUSBiAp568Wi/C9ATy8 I0scxL1gLXXrPG9Enl8q/2xmpaWIsRJIPvsT/kdkAsOFV00AgEAMKs6pP/dzFc4sYk7Fvd HFkP4hKmIMMAkvekJEVCk2Q3RxxISkBxLT0CzxCQ6PZR9Ga8gwAIR9+q4LF1SmX7GvKQwx Wo0+vkreOAWdst4G3S79zvSGI/a6N3vXP8U02NLFbLCNbWC6B7M/6KMOG9tIAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777127971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6nlMsBQfA4m7Fk1vQkDgsSjWpPN+UNU7vh5tjB+pwec=; b=wcGoZAaGCyb5ykDthIWxF6fXgCfQ0+/HMLQxINSf5/uUyimtmE/xp7p1hDnyiV4TgNzUz0 A/aoeNgKK9tGiQtmPWBJp1viUlLAkZ+9LRRHBfXyajyyLRk1wnkxriMwguUNAvzBkgwzIh 5Ea9lJbMGowO4SC6UDjcPEGD/AiEuHrJz0PENyCBT+cmew1YEO5tyNg1PqTtfb3ZhGsmvn /+27JMSnBuzI7SbDc7aQtzaCVthWDiJyLPxpiieGWLTuqLcZDTCebSzkJqmR/IZ1aQgs7Y mCv/ORF3FvyPPy7aQ419hlG/0dpqjTwZlaqGiR1uj9LTIK6xdicfgroZB6ccTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2ssv5gGLzdvZ for ; Sat, 25 Apr 2026 14:39:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38de3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 14:39:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Osipov Subject: git: f890f8e17ca2 - stable/13 - mfiutil(8): "show drives" truncates information List-Id: Commits to the stable branches 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: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f890f8e17ca2181afeff8dd237abaf024da19896 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 14:39:31 +0000 Message-Id: <69ecd223.38de3.798f672@gitrepo.freebsd.org> The branch stable/13 has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=f890f8e17ca2181afeff8dd237abaf024da19896 commit f890f8e17ca2181afeff8dd237abaf024da19896 Author: Michael Osipov AuthorDate: 2026-04-09 09:19:36 +0000 Commit: Michael Osipov CommitDate: 2026-04-25 14:39:02 +0000 mfiutil(8): "show drives" truncates information Improve mfi_pd_inq_string() by * Reusing buffer sizes from cam/cam.h according to SCSI specification + NULL byte * Don't truncate vendor-specific information by escaping into a too small buffer * Use cam_strvis() from libcam instead of old, outdated local copy * Recaculate size of inq_string based on the reused buffer sizes and format statements PR: 294354 Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D56328 (cherry picked from commit 850eb149e7ab0733fcf9469a607dca223ff467ad) --- usr.sbin/mfiutil/Makefile | 2 +- usr.sbin/mfiutil/mfi_drive.c | 59 +++++++++----------------------------------- 2 files changed, 13 insertions(+), 48 deletions(-) diff --git a/usr.sbin/mfiutil/Makefile b/usr.sbin/mfiutil/Makefile index 0523606e55bf..71be623afff8 100644 --- a/usr.sbin/mfiutil/Makefile +++ b/usr.sbin/mfiutil/Makefile @@ -7,7 +7,7 @@ MAN8= mfiutil.8 CFLAGS.gcc+= -fno-builtin-strftime -LIBADD= util +LIBADD= cam util # Here be dragons .ifdef DEBUG diff --git a/usr.sbin/mfiutil/mfi_drive.c b/usr.sbin/mfiutil/mfi_drive.c index 3685aa285fe2..2e1d9dd4808c 100644 --- a/usr.sbin/mfiutil/mfi_drive.c +++ b/usr.sbin/mfiutil/mfi_drive.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include "mfiutil.h" @@ -289,50 +290,14 @@ mfi_pd_get_info(int fd, uint16_t device_id, struct mfi_pd_info *info, sizeof(struct mfi_pd_info), mbox, 2, statusp)); } -static void -cam_strvis(char *dst, const char *src, int srclen, int dstlen) -{ - - /* Trim leading/trailing spaces, nulls. */ - while (srclen > 0 && src[0] == ' ') - src++, srclen--; - while (srclen > 0 - && (src[srclen-1] == ' ' || src[srclen-1] == '\0')) - srclen--; - - while (srclen > 0 && dstlen > 1) { - char *cur_pos = dst; - - if (*src < 0x20) { - /* SCSI-II Specifies that these should never occur. */ - /* non-printable character */ - if (dstlen > 4) { - *cur_pos++ = '\\'; - *cur_pos++ = ((*src & 0300) >> 6) + '0'; - *cur_pos++ = ((*src & 0070) >> 3) + '0'; - *cur_pos++ = ((*src & 0007) >> 0) + '0'; - } else { - *cur_pos++ = '?'; - } - } else { - /* normal character */ - *cur_pos++ = *src; - } - src++; - srclen--; - dstlen -= cur_pos - dst; - dst = cur_pos; - } - *dst = '\0'; -} - /* Borrowed heavily from scsi_all.c:scsi_print_inquiry(). */ const char * mfi_pd_inq_string(struct mfi_pd_info *info) { struct scsi_inquiry_data iqd, *inq_data = &iqd; - char vendor[16], product[48], revision[16], rstr[12], serial[SID_VENDOR_SPECIFIC_0_SIZE]; - static char inq_string[64]; + char vendor[SID_VENDOR_SIZE+1], product[SID_PRODUCT_SIZE+1], + revision[SID_REVISION_SIZE+1], rstr[9], serial[SID_VENDOR_SPECIFIC_0_SIZE+1]; + static char inq_string[80]; memcpy(inq_data, info->inquiry_data, (sizeof (iqd) < sizeof (info->inquiry_data))? @@ -344,14 +309,14 @@ mfi_pd_inq_string(struct mfi_pd_info *info) if (SID_QUAL(inq_data) != SID_QUAL_LU_CONNECTED) return (NULL); - cam_strvis(vendor, inq_data->vendor, sizeof(inq_data->vendor), - sizeof(vendor)); - cam_strvis(product, inq_data->product, sizeof(inq_data->product), - sizeof(product)); - cam_strvis(revision, inq_data->revision, sizeof(inq_data->revision), - sizeof(revision)); - cam_strvis(serial, (char *)inq_data->vendor_specific0, sizeof(inq_data->vendor_specific0), - sizeof(serial)); + cam_strvis_flag(vendor, inq_data->vendor, sizeof(inq_data->vendor), + sizeof(vendor), CAM_STRVIS_FLAG_NONASCII_TRIM); + cam_strvis_flag(product, inq_data->product, sizeof(inq_data->product), + sizeof(product), CAM_STRVIS_FLAG_NONASCII_TRIM); + cam_strvis_flag(revision, inq_data->revision, sizeof(inq_data->revision), + sizeof(revision), CAM_STRVIS_FLAG_NONASCII_TRIM); + cam_strvis_flag(serial, (char *)inq_data->vendor_specific0, sizeof(inq_data->vendor_specific0), + sizeof(serial), CAM_STRVIS_FLAG_NONASCII_SPC); /* Hack for SATA disks, no idea how to tell speed. */ if (strcmp(vendor, "ATA") == 0) { From nobody Sat Apr 25 16:08:10 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2vrB6FDZz6bkXG for ; Sat, 25 Apr 2026 16:08:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2vrB5GmLz3tQp for ; Sat, 25 Apr 2026 16:08:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777133290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=udq8Wmkv6+D/UEP2c9M3Jkm7fzOELzC3pCuN2nhf7XY=; b=Mzedfl9jJg8ivR4w7Knkn2P6dq4pkKI8BKvNA0ecQmWOKUSici/nWsrGrOoVEYygZ9JyFP cTmLDHFIvKGyp4dx4dtNCcZbsqcQllDYc6YI6yKunduaq6yqeeJ2JvA4PNv66XO75dK1wa xN8Sk/M49GgdI52338hmIcNnjVtd4UZigkw9KSIf+flS2j94eevAUNkeZ1gO5mFI/TU/NF usP/9MlK67+oj5WhFaDhkHQugv6u9ueUFebfVn5r135aJp7j+fVvH8cnA+141KqqbQE6U3 zty0VlRc/F0T9R93soKgIytZgxzGTpWXoZkVR7+hcrte+xab6wblzGYX91frbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777133290; a=rsa-sha256; cv=none; b=NtANzhZRL8YDWoULWLHQbwGAIzdUpkaFBIpSuTzonibKX19AO2YWO4i2OGqzrQ6Y376Y7o gqFT21g51sUadXCjyb1H+VS6sTcLiirvw/9o0kcz9DGhnLWdzkTa4XEfYhlZbHSZeKNQke aU6CkCMXXfJ98MxN/YWEA7OUIGUiCEWnF7cNMMa6MKX5u7ACfKdGTvmn7zA3QS85Xxqo5Q obRclGgH/5qnnt3WOjZ5q5r78xSMRBMgQHcX1BY76oMYQi7iYBqJrCwx5lsYfcZbylCGGg jh22d1/t0pQqXAT/5fgDRHTALWIXPL6qRZ4YhTUiBEFvY/ec0SJ+lKJgAhzatQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777133290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=udq8Wmkv6+D/UEP2c9M3Jkm7fzOELzC3pCuN2nhf7XY=; b=PH3kQ/mZPG5BqCOIZ3DLrCddlYWrwPOaZuXo1gxADZqO90fsrwjLk38A2Q3gdFCheNFxIP aGRv0wEkXUtLJ7cBaq3YnjMkXz7K8Wt7gu40E2FyaW4tCuxxb5htPQc2k/dhEAflw4Z251 +1Br3Hb2l6siK2PN2UodZxmXD6gdZ+2lVbx2xFf1i2mc8vCnRptXJFBknnZKxMnkGtP1B/ /h291jpniqW5pyXkcCFYOFkK3uuTcNe7KdfoMaIZNGcOnujG/IW12Kdqxgu/BVxC7NwuXy SQO+P+tbWIfYrhC7C0AiGWnLQz3gpp6escwg95w0yA+fyF8R2h3GeAHIarkmNg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2vrB4b0GzhJs for ; Sat, 25 Apr 2026 16:08:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42508 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:08:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 689cc820446a - stable/15 - libcrypto: compile all PIC objects with -DOPENSSL_PIC -fPIC List-Id: Commits to the stable branches 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/15 X-Git-Reftype: branch X-Git-Commit: 689cc820446a6c11b521163b1b48a8c98bbfce1f Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:08:10 +0000 Message-Id: <69ece6ea.42508.142ca1a3@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=689cc820446a6c11b521163b1b48a8c98bbfce1f commit 689cc820446a6c11b521163b1b48a8c98bbfce1f Author: Enji Cooper AuthorDate: 2026-03-22 00:39:16 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:07:56 +0000 libcrypto: compile all PIC objects with -DOPENSSL_PIC -fPIC This change modifies the libcrypto PIC objects to always compile with `-DOPENSSL_PIC -fPIC` to restore parity with the upstream build process. This ensures that the legacy provider is built with parity to the upstream legacy provider. MFC after: 12 days Tested with: `make check` (legacy provider), `make universe` Fixes: 14b9955e Differential Revision: https://reviews.freebsd.org/D44896 (cherry picked from commit 3797fe720a37ff9fb5b20546494ef1c4a6c01541) --- secure/lib/libcrypto/Makefile | 6 ------ secure/lib/libcrypto/Makefile.inc | 3 +++ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile index 738de3479987..9d484e9d480c 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -687,12 +687,6 @@ SUBDIR.${MK_TESTS}= tests .include -.if ${MACHINE} == "powerpc" -# Work around "relocation R_PPC_GOT16 out of range" errors -PICFLAG= -fPIC -.endif -PICFLAG+= -DOPENSSL_PIC - .if defined(ASM_${MACHINE_CPUARCH}) .PATH: ${SRCTOP}/sys/crypto/openssl/${MACHINE_CPUARCH} .if defined(ASM_amd64) diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makefile.inc index 73c650d590ff..8f22d501e005 100644 --- a/secure/lib/libcrypto/Makefile.inc +++ b/secure/lib/libcrypto/Makefile.inc @@ -12,6 +12,9 @@ CFLAGS+= -I${LCRYPTO_SRC}/providers/common/include CFLAGS+= -I${LCRYPTO_SRC}/providers/fips/include CFLAGS+= -I${LCRYPTO_SRC}/providers/implementations/include +PICFLAG= -fPIC +PICFLAG+= -DOPENSSL_PIC + .SUFFIXES: .pc .PATH.pc: ${LCRYPTO_SRC}/exporters From nobody Sat Apr 25 16:08:11 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2vrC6zLGz6bkTc for ; Sat, 25 Apr 2026 16:08:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2vrC5jrzz3ttD for ; Sat, 25 Apr 2026 16:08:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777133291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=URwyjWrbcC7sktIQ3btTiqJbMZSYSRbXgKdEXDAcOqM=; b=aibK9/RUHdGLq16887tyEiJQKSaKxYy+YNF+56qS1p1K4TJ7ZHc2Oiozkm2gTe/xy5FZvk QWIVK6QUjOPSpDwvZQeZFaSrgHYNjvKBC215kH1Jsj/ruU9nau3L9RdK52Fu94Bs16MxMA +AeqvZdnK5YoNbvRONCqydsPZU6ssOqk4ar5qFE5s62L5dE8h1cnYY6PqQkS3TBBh3TtcD hN0PjwQNhk4jTpZjR7YAh8gvtt2EQ3FTITPBKgH6PyLDPZSEAEQ5IEpOyDPSyWZ40oJ+Ja cN+d1iv8fXQKpvZjGDoC99gfbO50XGSIDNvGeBpUn0xnGLm+7PAltx9V5gtLGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777133291; a=rsa-sha256; cv=none; b=D/lyw82+cgw3CfdP9eiwnGHoZVv23LNBUTrVlBuc5LDc9mmQQ2Uvyg82D0/Z8FeTV5esBZ TvyvdOLnl5IHprcJ0xIgsmDKbcI7Xa9g6//EQgxHXsFD0nSSB+XpDtrpzlqxgHUxO6rbcZ XwPSQ3QZvBZNSSEX0X/Fex3zeiVXBJ9hkmYKr+aBG+HmelXJnwwpCuK9iZniGV5MuaQHmn Ufyv1jQPoTO1lSwDsfXzBQ7MHv6L81yJGFdptu8yzBOa1fXpcv6PhO/73DCMLgZFnLTVWc rmYe3SDQ00Ha2eyzZwtBWnxf+6tA7VXBcxiTRVLvCQ5tSH1qjyLSiZOkgl4fdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777133291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=URwyjWrbcC7sktIQ3btTiqJbMZSYSRbXgKdEXDAcOqM=; b=C9zIRChRUURvqRYlFPOEyh6OpZVhIioGx50FnUGrMCCGGLfwGLIb8SzIygrUSAM5UZxyiO aeBhONEihpEeQT9Zfj5ZjDvdWr248P38laSlGMrzEvefZjJoPcHbwmaAeBYiMHTMzbT1Yz Wkg8ZhWx/5r/GtEVgU9U3yiXRbDYaLnz6e16eDtcH4jiiAz22kLsQP0rVYHn0rIXN5hBc6 DRm6vVK01SE/CfyNupgpuYm+Hcbxg5vQ0LOZz1QZjPzcE4nYUVKZZjz6IbMd2cuvSqbW8m 8GtjKCdHKjn0/44fKG/d86AOcaec3caH/dDPNNts7y8lN88IsDCv6GhZRzlAcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2vrC562kzh9v for ; Sat, 25 Apr 2026 16:08:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4232e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:08:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 9725e00dcfdc - stable/15 - OpenSSL: move `-DOPENSSL_PIC` from `PIC_FLAG` to `SHARED_CFLAGS` List-Id: Commits to the stable branches 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/15 X-Git-Reftype: branch X-Git-Commit: 9725e00dcfdcf09d4c8720c3e8e00adb263ed08c Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:08:11 +0000 Message-Id: <69ece6eb.4232e.529daf83@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=9725e00dcfdcf09d4c8720c3e8e00adb263ed08c commit 9725e00dcfdcf09d4c8720c3e8e00adb263ed08c Author: Enji Cooper AuthorDate: 2026-04-21 23:46:19 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:07:56 +0000 OpenSSL: move `-DOPENSSL_PIC` from `PIC_FLAG` to `SHARED_CFLAGS` `PIC_FLAG` should be used strictly for `-fPIC`, `-fpic`, etc, options. `SHARED_CFLAGS` is the more appropriate place to this flag to be set. Requested by: jrtc27 MFC after: 3 days MFC with: 3797fe720a (cherry picked from commit 48d6db4932c8ec04ca3df79119803f8c7c1570d7) --- secure/lib/libcrypto/Makefile.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makefile.inc index 8f22d501e005..85e2c0813b79 100644 --- a/secure/lib/libcrypto/Makefile.inc +++ b/secure/lib/libcrypto/Makefile.inc @@ -13,7 +13,7 @@ CFLAGS+= -I${LCRYPTO_SRC}/providers/fips/include CFLAGS+= -I${LCRYPTO_SRC}/providers/implementations/include PICFLAG= -fPIC -PICFLAG+= -DOPENSSL_PIC +SHARED_CFLAGS+= -DOPENSSL_PIC .SUFFIXES: .pc .PATH.pc: ${LCRYPTO_SRC}/exporters From nobody Sat Apr 25 16:08:12 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2vrF0slZz6bkXM for ; Sat, 25 Apr 2026 16: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2vrD5x1hz3tQr for ; Sat, 25 Apr 2026 16:08:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777133292; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=czBgtDJoS2f9y2hhzLWlw6nclrGzr7+FVd3PVXs/+AA=; b=tGCvAQTzTA2jHZSvDw1T8fMyXq/FKCc/O6Mj3KDLkKC7GcMlU1/WRz6TpVpE3iUYZhbTpm 97fhNimVlwE2dZGqKeU1+VNXnHZj/0lRliwP1NcGZOgIdbc0c1rlVwTRh0mzMrFlmfvNk4 kKfp6mOoKmuG7c+h8qGcUsbj2DRj/NBLxcf0XODrbPxcPmnLtKmDWrsGluPoP1F8cHER5L acPW8Q4BQtIn2hecnmzZ+PclfspJSwlENUdi6DH1qjd4yrpx6mk/OaCYMc3CtAR9Wp6Os9 VxvLdahSq7FzEtqeMyD6mGxahkyMdaadBUqJn7EKYn49mkEwlIe13VjuVrf+7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777133292; a=rsa-sha256; cv=none; b=bt2DqvpDONibjiAOKskM13BDRzmkr/zLm6i/Lz7gVawK0/CFto4+cKgz7POFlZ5tLzosiK aE6zplHRKsMi9HFf2zW2eOEG00Czn41We7/rmT860QswlbgLaSkogUEIyTdvhugoVun8Kl 01JrR3gzewW5cB09sge9aWULXB8d547ef+hURUdAcUpCp8XPQjlqZpVOHsqCF9ewu1Loye na0AhdoASG7UrXnYIBcwGEjKINHD2cUaQoqQNGCa3w3qToLE9brNO/ZZCICTPvT7KPwMv6 jfQowq/0X18KZwgdKSkxNqTTUuGrFmNSMC9q+1Dd4blB+TaGEcskCbYoxcQzJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777133292; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=czBgtDJoS2f9y2hhzLWlw6nclrGzr7+FVd3PVXs/+AA=; b=GU4gVGGlp3VrrExM0QxCR8iIeeg4nVgclh0HRkY87a79ibzZU1k5Sh8P+wetD5tGTbaQFS AteXFYqrGkegSgGhKpzK8hl/8078iPQGCFGFtqT68D6oSY0YjP0HjS5a0CQa2KO14t4O4x T3XkfXx10aFAMSn/y+EUyIoys4zBVHOptG1Q4x991veKjqj4Yw7ZrdKICGqfI6E6UfIIM7 6JgEmp7SkPmwIICeZLk1fC4zQQewM4n0YD+bg8Z6X8WEMvIgt9ZfxZrbWq5odK/67y/Aj2 BM4tX1ZKFldCzaPkBjncIyafTJbjoqexcXdKwa4wUfxgSLDUY00qQkCwa9i6kA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2vrD5SpYzhJt for ; Sat, 25 Apr 2026 16:08:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42e22 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:08:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Po-Chuan Hsieh From: Enji Cooper Subject: git: 16c350eb95ec - stable/15 - [OpenSSL] Add missing header file (openssl/ml_kem.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: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 16c350eb95ec0f7cb7dd7f144b440059134c2d36 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:08:12 +0000 Message-Id: <69ece6ec.42e22.3358f7c2@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=16c350eb95ec0f7cb7dd7f144b440059134c2d36 commit 16c350eb95ec0f7cb7dd7f144b440059134c2d36 Author: Po-Chuan Hsieh AuthorDate: 2026-04-12 18:07:14 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:07:56 +0000 [OpenSSL] Add missing header file (openssl/ml_kem.h) Add missing header file (openssl/ml_kem.h) of OpenSSL 3.5 Reviewed by: fluffy, ngie Approved by: ngie (maintainer) Differential Revision: https://reviews.freebsd.org/D56291 (cherry picked from commit 98118af4f08a020c8c5925e933bdd523d6a6e8aa) --- secure/lib/libcrypto/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile index 9d484e9d480c..f57f53a8c71f 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -635,7 +635,7 @@ INCS+= des.h dh.h dherr.h dsa.h INCS+= dsaerr.h INCS+= dtls1.h e_os2.h e_ostime.h ebcdic.h ec.h ecdh.h ecdsa.h ecerr.h encoder.h encodererr.h INCS+= engine.h engineerr.h err.h ess.h esserr.h evp.h evperr.h fips_names.h fipskey.h hmac.h hpke.h http.h httperr.h idea.h indicator.h -INCS+= kdf.h kdferr.h lhash.h macros.h md2.h md4.h md5.h mdc2.h modes.h obj_mac.h +INCS+= kdf.h kdferr.h lhash.h macros.h md2.h md4.h md5.h mdc2.h ml_kem.h modes.h obj_mac.h INCS+= objects.h objectserr.h ocsp.h ocsperr.h opensslconf.h opensslv.h INCS+= ossl_typ.h param_build.h params.h pem.h pem2.h pemerr.h pkcs12.h pkcs12err.h pkcs7.h INCS+= pkcs7err.h prov_ssl.h proverr.h provider.h quic.h rand.h randerr.h rc2.h rc4.h rc5.h ripemd.h From nobody Sat Apr 25 16:09:36 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2vsr3tTpz6bkXd for ; Sat, 25 Apr 2026 16:09:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2vsr2tlmz3vlF for ; Sat, 25 Apr 2026 16:09:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777133376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6bwxYdZIgT88Ih8U0Of30Yfx9iVK3FWjaxXSkpx4RYQ=; b=mSrPpWNXbUZKxxumGj9J+NoRGC2RNi8nin+bjKbGQpFd4SjRneI+E2bTPxTNk6p9jlP8Le 10ZyLNPULd8cio+I3PoHtKTSl0an1FMrlLVYhTTBWwChVOQ7P6CTmdxN96gn0Z0OEXV0tn eZOBn8Nbbn82+c0G9/tST52VwLsboUrutl41OTijM2BgaYkKJqQXqb2sgHk9x3Vs+VvIdc +zOk0uBkfK+d68zwV7qe6nHp7Hr25HbGHM6rVCoWA00Z9pZvQLGDpJnI5TTLRQVsOxk+qL 5i58qElAn/MM0Xg9FRDT7A12k/XpXySrsKpEocoBPu+f/n4dd7gSDKgBOp1h7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777133376; a=rsa-sha256; cv=none; b=o1XlPsDMyag2MEnad7+n9iKeUqRYkhE/DC5JMJ4WAwyZUHfbl1K1c1cE6eqlRUUtImE59j 5gY107wE4N2h50jmODlVUaIF3ZfstMg0l8YLtyLEFCcs6hR8rR9W1Qa0mD+zHNn2YPfZ7K 7wGUz0zwkozV3SQ5mQQRrAasEv4T/I7S1vtCAL36b6ZS4PqsDq6l/pKjpEf6o6E++lnYvS nuI+3LsVm8cIR2YlfSEQitsXvwbZVAS2nodtxfLqdx/twuCaexjmBwyzWQYpmj5Y75k/OB o3KO7C+buveDxARRQmk723yUV8QyF9ZfQRoCI5TGjqXp9FxwTJENxwEiqouOHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777133376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6bwxYdZIgT88Ih8U0Of30Yfx9iVK3FWjaxXSkpx4RYQ=; b=Zwn+fKfIdV81fgBKMbVblkunWtUxt3QCB7olu7pRYchRi9mn6NShpwSZXaEjP2xYb2Zkwu bvrTO3Crfb/NEtWvRXqmciXUge6/6JIm65md3sT9GRLrAvTdNwXjlEPyyWA3ReJzwlwYv9 L+B5mMMUQx4LYrWWrq6Unyri1/ejBD3BO5Cj5EUbDs3dLUBWEpzWG89gRsVIuZFSVI0ZRK 5cLPeFTTPhKtbBvP3PFISOocp1EWpj44PFbbdl1fzPlPBaIakZ9G4nTWV9GVadwmCzWwOx MNpMtd/F6z/Qmj0Jq+tUej0laLpSreGx8fdWasA/jb2A08zpxDxlnL16GzCQ1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2vsr2RqfzhMf for ; Sat, 25 Apr 2026 16:09:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 406f0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:09:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 70e8c36d097e - stable/15 - acpi: build dev/acpi_support/acpi_wmi_if.m on ARM64 List-Id: Commits to the stable branches 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/15 X-Git-Reftype: branch X-Git-Commit: 70e8c36d097ed5be1ee7cf9525f3ea80fc1b28ca Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:09:36 +0000 Message-Id: <69ece740.406f0.1e478631@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=70e8c36d097ed5be1ee7cf9525f3ea80fc1b28ca commit 70e8c36d097ed5be1ee7cf9525f3ea80fc1b28ca Author: Enji Cooper AuthorDate: 2026-03-03 04:09:41 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:09:19 +0000 acpi: build dev/acpi_support/acpi_wmi_if.m on ARM64 Per Wikipedia, ACPI WMI support is available on all x86* platforms and ARM platforms. Add the source to `files.arm64` so code that relies on its headers (thunderbolt(4) for instance), can be built on ARM64. MFC after: 1 month Reviewed By: andrew Differential Revision: https://reviews.freebsd.org/D55535 (cherry picked from commit 876d2b8392e6570a835a500d8fd7c4a5b0abf844) --- sys/conf/files.arm64 | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index df64e812716e..1f3a072fefdb 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -201,6 +201,7 @@ dev/acpica/acpi_pci.c optional acpi pci dev/acpica/acpi_pci_link.c optional acpi pci dev/acpica/acpi_pcib.c optional acpi pci dev/acpica/acpi_pxm.c optional acpi +dev/acpi_support/acpi_wmi_if.m optional acpi acpi_wmi dev/ahci/ahci_generic.c optional ahci cddl/dev/dtrace/aarch64/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" From nobody Sat Apr 25 16:13:52 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2vym3VXnz6bksX for ; Sat, 25 Apr 2026 16: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2vym2ZyGz3wcj for ; Sat, 25 Apr 2026 16: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=1777133632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OW3LnjNH6OEYZXwV1mjl2ZEZSoDW0bwKi5ieSDcdk0g=; b=wzdnVwnx7Zbkby1jdjmly7bhHeDb8oYuTBKvB3MG05Gwt35Ia//tjZkOTkXMfeFGoqB36g C3BA0xxs0tLA77cFbTtCzgr5vAs6AKW7OYFZ2gVeMjBkMghhaewEhG7nPwrUsaU3kAMpQq j1ovgL2LSFoW1Py8GwuLYhUszSZA+cKzpTsKzUxvSa+cwImd1ksxATCGjQIwIVC1wJBK/P 0OvOG72XIdthls4VdD0S86aDT3lbfMFocCD1fse6rdq6v8GeMdSRFNfeYqTdEvrmuei4rB G0wm24pUv9IMaxS2WgK7PiwPtXZ884FjmDZ/DroaXyv68PQM1tf2gtJFW99mPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777133632; a=rsa-sha256; cv=none; b=SQkRCWDZ3tsd0n6xKKoapYAIOIgo9PhSd0KkNqlTIZjT2eethSqN8GkSQOmKLcZ2OshUcE HOQ1VPuJuKgJWpdZkHBUyZl4uN47Q7NnBYVVq9OBw0u6rPH+W9YKtijnCMI0QS5vI3pVaE vaVwFh5cPfk4dbP3j1bm7qyUAklGqfRC6sV3rzIBSJjV3NBSB+gjTZTt1qF/P1UsY/8Z+I udEYmNIaFT/8pb9fzMWFUO7cTqGGF2sBUmyg86j9PUpPC93UyL96NNx4O3ig5Ufwi6qwK2 yGasc0+i8oNHmNbx2Nrzhb+eGxB0b1EwnMmGdJLfBxlDnfmpVPBOm9+QNXqi7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777133632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OW3LnjNH6OEYZXwV1mjl2ZEZSoDW0bwKi5ieSDcdk0g=; b=UyiQxpNz2K5cSwHoxEuDxcqyBe9BS2u0pZrLuIf2o2jGWu56vFlaDh7FY4Nj2K6zfnvSnu IZFecwugyZZyct8pemkYBZqt4cznG6UF6ktnzhtgyAHnYksgBeOpnVo14PRDML1A+laxfz mzvun5zaNlKbKBmM2XzqMNtvaBzZonqEt56HQ/RDuYCyveOIIEZhg8SUzRoEMz6buSYYFj GiBbe/fFItL5oA3afU5GCvA8IvHyXKFzR6fFQYZQVJFOMahc92bVH5ucxu/iKllEqgf2io hMPTPswgEx++BSssOYZ7ru182ekEjstswcbsdd+jJgAdHxxXJvnuP6y8nCjR5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2vym26G5zhj7 for ; Sat, 25 Apr 2026 16:13:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4381e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:13:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: ca38f51b4c58 - stable/15 - asmc: introduce the concept of generic models List-Id: Commits to the stable branches 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/15 X-Git-Reftype: branch X-Git-Commit: ca38f51b4c58edf78b8a7c0d25e5afb414bb9831 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:13:52 +0000 Message-Id: <69ece840.4381e.16f00e3e@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=ca38f51b4c58edf78b8a7c0d25e5afb414bb9831 commit ca38f51b4c58edf78b8a7c0d25e5afb414bb9831 Author: Enji Cooper AuthorDate: 2026-02-20 06:37:05 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:10:00 +0000 asmc: introduce the concept of generic models Having to enter in each of the models for Apple hardware, recompiling, etc, is tedious. Provide generic models so end-users can leverage some of the capabilities provided by the driver, i.e., common features like minimal fans and lights (if present on the generic model) support. The generic models are as follows: - Macmini - MacBookAir - MacBookPro - MacPro This sort of follows the pattern established by the `applesmc` driver in Linux. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D55395 (cherry picked from commit 3023bb49e115b4149f9fc0683dabde172ecb1336) --- sys/dev/asmc/asmc.c | 80 ++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 67 insertions(+), 13 deletions(-) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index 772df00f34eb..cdaf5d0f45eb 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -160,6 +160,11 @@ static const struct asmc_model *asmc_match(device_t dev); #define ASMC_LIGHT_FUNCS_DISABLED NULL, NULL, NULL +#define ASMC_TEMPS_FUNCS_DISABLED \ + .smc_temps = {}, \ + .smc_tempnames = {}, \ + .smc_tempdescs = {} \ + static const struct asmc_model asmc_models[] = { { "MacBook1,1", "Apple SMC MacBook Core Duo", @@ -492,8 +497,42 @@ static const struct asmc_model asmc_models[] = { ASMC_FAN_FUNCS2, ASMC_LIGHT_FUNCS, ASMC_MBA7_TEMPS, ASMC_MBA7_TEMPNAMES, ASMC_MBA7_TEMPDESCS + } +}; + +static const struct asmc_model asmc_generic_models[] = { + { + .smc_model = "MacBookAir", + .smc_desc = NULL, + ASMC_SMS_FUNCS_DISABLED, + ASMC_FAN_FUNCS2, + ASMC_LIGHT_FUNCS, + ASMC_TEMPS_FUNCS_DISABLED + }, + { + .smc_model = "MacBookPro", + .smc_desc = NULL, + ASMC_SMS_FUNCS_DISABLED, + ASMC_FAN_FUNCS2, + ASMC_LIGHT_FUNCS, + ASMC_TEMPS_FUNCS_DISABLED + }, + { + .smc_model = "MacPro", + .smc_desc = NULL, + ASMC_SMS_FUNCS_DISABLED, + ASMC_FAN_FUNCS2, + ASMC_LIGHT_FUNCS_DISABLED, + ASMC_TEMPS_FUNCS_DISABLED }, - { NULL, NULL } + { + .smc_model = "Macmini", + .smc_desc = NULL, + ASMC_SMS_FUNCS_DISABLED, + ASMC_FAN_FUNCS2, + ASMC_LIGHT_FUNCS_DISABLED, + ASMC_TEMPS_FUNCS_DISABLED + } }; #undef ASMC_SMS_FUNCS @@ -542,28 +581,41 @@ MODULE_DEPEND(asmc, acpi, 1, 1, 1); static const struct asmc_model * asmc_match(device_t dev) { + const struct asmc_model *model; + char *model_name; int i; - char *model; - model = kern_getenv("smbios.system.product"); - if (model == NULL) - return (NULL); + model = NULL; + + model_name = kern_getenv("smbios.system.product"); + if (model_name == NULL) + goto out; - for (i = 0; asmc_models[i].smc_model; i++) { - if (!strncmp(model, asmc_models[i].smc_model, strlen(model))) { - freeenv(model); - return (&asmc_models[i]); + for (i = 0; i < nitems(asmc_models); i++) { + if (strncmp(model_name, asmc_models[i].smc_model, + strlen(model_name)) == 0) { + model = &asmc_models[i]; + goto out; + } + } + for (i = 0; i < nitems(asmc_generic_models); i++) { + if (strncmp(model_name, asmc_generic_models[i].smc_model, + strlen(asmc_generic_models[i].smc_model)) == 0) { + model = &asmc_generic_models[i]; + goto out; } } - freeenv(model); - return (NULL); +out: + freeenv(model_name); + return (model); } static int asmc_probe(device_t dev) { const struct asmc_model *model; + const char *device_desc; int rv; if (resource_disabled("asmc", 0)) @@ -573,11 +625,13 @@ asmc_probe(device_t dev) return (rv); model = asmc_match(dev); - if (!model) { + if (model == NULL) { device_printf(dev, "model not recognized\n"); return (ENXIO); } - device_set_desc(dev, model->smc_desc); + device_desc = model->smc_desc == NULL ? + model->smc_model : model->smc_desc; + device_set_desc(dev, device_desc); return (rv); } From nobody Sat Apr 25 16:15:32 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2w0h5p1Lz6blD2 for ; Sat, 25 Apr 2026 16:15:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2w0h311hz3x8s for ; Sat, 25 Apr 2026 16:15:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777133732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gtdDPrFHeZbkz3IkN0dBGi09rwYjKeFTI1IwMeEhlWs=; b=uVItfvkrMhFaPvGa9VLloyiNH9rHDcPUtw3RYjGbzjbI/Dnf6vuSbmsKYafjN6B/DC0lCX 23Z1XwEdZ7pmcLm549J5YidLihLmk/tjOY+44ZS7qnlyW00vxfxb57k35zzK2812f1sDL7 XsOajhCJ4iV++eIPHc6s1zF/iUNziakVEkLPKSzCZiDL8k4RNf3fb+PZWPWvQVo857C0tX 86VUAhgAZsdm89G4UL//phlZE0D2y+DYRZ2hAgnzOUpxfN9TbJs7LHhUCYHu1HlB/HoJwz PMcU9sxXuOJutUjX/w7+Ev+u0g8Lx/oSAxRjjmQNkaiQM+zDJoAL6JqEhYOGjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777133732; a=rsa-sha256; cv=none; b=MEODyPtCnZedwQ1g5vKZZvJzw3GZ/0cZhYWPA8SiiCVuEslW5K2Ds++E8sdN0Za+AHgPII xYYyPI/7P3zWlnKzpq2rVCqVAtu1rramh5Ze7bE7v35IH3HK1Wd3TWLfPxmetPu5y8MeJy zXP+rg1Gx3L9ArcmlRsShYBVlOFmw68o4umgh+pjVIxEW7Hk4v8yUhqqz5aB1mbrQlyqSE UdpiQtBQZy21alE2UWIy9qZqiZ92YndXE4/aCg3yTa981Zm5WrM8UrmyuAdsrcgzPoEKy+ nxJhzJSTCrCu97arD8WUnMSBY0hCpItrTem0vca2SDwbLAQ/pyHwDHeqrL93qQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777133732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gtdDPrFHeZbkz3IkN0dBGi09rwYjKeFTI1IwMeEhlWs=; b=K8NcHG8fP50BBo+8sUKssGoIcwBIRnar1rENpZCUXF6SJ1+RAaUcp01p5UbjpHg65vKNJs MbqxdBXfetf/7PYNjasLTQq1+V9tHfGcm6BaD5yqzEm7LJY7IDrDUrkwferSMfZsCeJ93S tZ7zItbup7wuyjThX/d9nuwnRQrFKhw6dmSmavUSfy3E+4ewdE4gEPpOFrm5WsNPxeo3aZ ohyu4xUpQtqMtQTx/PbRbVnzMkaQiL8lfUMsCfv1OdPt5Ityc0F21DQrETg2+dTXA4OMCg qIDEghY5Y0Fvz+I68ZqFXyFmx6ldRSbH7bLDOVu0MGUHEEgJ8EMXjGoXbvRRDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2w0h2K27zhWV for ; Sat, 25 Apr 2026 16:15:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 415ec by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:15:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Abdelkader Boudih From: Enji Cooper Subject: git: a0d44a70bae8 - stable/15 - asmc: add Wake-on-LAN control via sysctl List-Id: Commits to the stable branches 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/15 X-Git-Reftype: branch X-Git-Commit: a0d44a70bae878bdcb4bf65987a5c13b5162c0a2 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:15:32 +0000 Message-Id: <69ece8a4.415ec.596dede3@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=a0d44a70bae878bdcb4bf65987a5c13b5162c0a2 commit a0d44a70bae878bdcb4bf65987a5c13b5162c0a2 Author: Abdelkader Boudih AuthorDate: 2026-02-25 06:32:42 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:14:50 +0000 asmc: add Wake-on-LAN control via sysctl Apple Mac systems support Wake-on-LAN from powered-off state (S5/G2) via the AUPO SMC key. This change adds a convenience sysctl, `dev.asmc.0.wol`. This can be disabled if set to 0 and enabled if set to 1. The AUPO key is volatile and resets to 0x00 on every boot, so WoL must be manually enabled before each shutdown to work from powered-off state. Users need to run: `sysctl dev.asmc.0.wol=1` before shutting down the system. The sysctl is best set to persist in `/etc/sysctl.conf`. MFC after: 1 week Reviewed By: markj, ngie Differential Revision: https://reviews.freebsd.org/D54439 (cherry picked from commit 94db365042d35ff7e3ee7365a87a89bab1560030) --- sys/dev/asmc/asmc.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ sys/dev/asmc/asmcvar.h | 5 +++++ 2 files changed, 50 insertions(+) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index cdaf5d0f45eb..1623d2d9bf98 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -108,6 +108,7 @@ static int asmc_mbp_sysctl_light_left(SYSCTL_HANDLER_ARGS); static int asmc_mbp_sysctl_light_right(SYSCTL_HANDLER_ARGS); static int asmc_mbp_sysctl_light_control(SYSCTL_HANDLER_ARGS); static int asmc_mbp_sysctl_light_left_10byte(SYSCTL_HANDLER_ARGS); +static int asmc_wol_sysctl(SYSCTL_HANDLER_ARGS); struct asmc_model { const char *smc_model; /* smbios.system.product env var. */ @@ -916,9 +917,12 @@ static int asmc_init(device_t dev) { struct asmc_softc *sc = device_get_softc(dev); + struct sysctl_ctx_list *sysctlctx; int i, error = 1; uint8_t buf[4]; + sysctlctx = device_get_sysctl_ctx(dev); + if (sc->sc_model->smc_sms_x == NULL) goto nosms; @@ -988,6 +992,16 @@ asmc_init(device_t dev) out: asmc_sms_calibrate(dev); nosms: + /* Wake-on-LAN convenience sysctl */ + if (asmc_key_read(dev, ASMC_KEY_AUPO, buf, 1) == 0) { + SYSCTL_ADD_PROC(sysctlctx, + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "wol", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, + dev, 0, asmc_wol_sysctl, "I", + "Wake-on-LAN enable (0=off, 1=on)"); + } + sc->sc_nfan = asmc_fan_count(dev); if (sc->sc_nfan > ASMC_MAXFANS) { device_printf(dev, "more than %d fans were detected. Please " @@ -1742,3 +1756,34 @@ asmc_mbp_sysctl_light_left_10byte(SYSCTL_HANDLER_ARGS) return (error); } + +/* + * Wake-on-LAN convenience sysctl. + * Reading returns 1 if WoL is enabled, 0 if disabled. + * Writing 1 enables WoL, 0 disables it. + */ +static int +asmc_wol_sysctl(SYSCTL_HANDLER_ARGS) +{ + device_t dev = (device_t)arg1; + uint8_t aupo; + int val, error; + + /* Read current AUPO value */ + if (asmc_key_read(dev, ASMC_KEY_AUPO, &aupo, 1) != 0) + return (EIO); + + val = (aupo != 0) ? 1 : 0; + error = sysctl_handle_int(oidp, &val, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + + /* Clamp to 0 or 1 */ + aupo = (val != 0) ? 1 : 0; + + /* Write AUPO */ + if (asmc_key_write(dev, ASMC_KEY_AUPO, &aupo, 1) != 0) + return (EIO); + + return (0); +} diff --git a/sys/dev/asmc/asmcvar.h b/sys/dev/asmc/asmcvar.h index 102bee8a15b7..602f363594b9 100644 --- a/sys/dev/asmc/asmcvar.h +++ b/sys/dev/asmc/asmcvar.h @@ -125,6 +125,11 @@ struct asmc_softc { */ #define ASMC_KEY_CLAMSHELL "MSLD" /* RO; 1 byte */ +/* + * Auto power on / Wake-on-LAN. + */ +#define ASMC_KEY_AUPO "AUPO" /* RW; 1 byte */ + /* * Interrupt keys. */ From nobody Sat Apr 25 16:15:34 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2w0k5RxWz6bl9g for ; Sat, 25 Apr 2026 16:15:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2w0k2px2z3xCH for ; Sat, 25 Apr 2026 16:15:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777133734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M88akCbP6ayi/nso4iZ5toeQ7EplCM0nlVIOaQ1T2/0=; b=ipyi3CqGFeyd8kE/6clhN7Fmn9RNVS+j0mtcY6SxErP9SwzJQIFoEFQINA8WsWArgq7Ums g0mE/aPOj8D3BDP7BE3eD7XFG3iuPiRGSnXjeI8TlOuL9cuQ9Tir33glPMkIESJbkjkgo9 mKJgtpsBDAJAl0xgBPjVlYx+DMAOekXTta1MrKez/hbu0oFQbdMEtZkfqRNYuKhD6JiHaO 0HwCVDcN5is0tZJ0vFoFnin/BNOzE5Y/WxkUINwfU1QuVY+N0OJfklKyiEF0Rt5rLLcTp8 iGPkXoq9usRm9ybEX5e4p7ChLKCn+iOkKuLPZ+H78TS7+425vP/TEixDxdPLUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777133734; a=rsa-sha256; cv=none; b=xvDlXEyHD8Q1CQNgGzxLqhVTbRKGxc+cFMh/iQ0hTk6bZ5QTZROV70yUtpRoLhh7ld20lz vedVJMHuxArICd85bfkoMum9k496w94ZYQTyneymN5Ni2PQb3XNa6AZI/nzahi/VQjY8Rl QLmeMUQRhAEvm/GsPnWaO0Np92vclkVvTVsGsnB1oPlA0iQVG/AB19ig1iB5aZzyx4fuU/ pR8DGm0JkgFWOUxZBvS2WBKEttQ/zvzZlvwRYGgTA0vt99SwttLbi64x44jl+6RgI8+BFS zOg7sFo0cBYYV3zwME0o+8mtZkjEWamYnsUgBj5Ytf4WueZnjGuM/KvJ0d2Apg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777133734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M88akCbP6ayi/nso4iZ5toeQ7EplCM0nlVIOaQ1T2/0=; b=wjJBelrpEKDMTY846RT5hUKy/gnHUA0OORutO6bMFn7uv/57MXgn80lXwJqZ4kMuOqtEYV weLD2V/zgT9kVKIlvAfKxaROWSRXOZHaCVp7IctW5xIpH33SMJ/KHFEvhTDBTM8EXvRgM/ B0NTfItxfqiv/ty8uM1pvUwo4xprFRG6QPn72rxyV7UJQRALYxy8daDTfX5y9MiX8PQpKx nvXjUw76j1runk+KGtG71O3Np5QgqS8XUdcImwJ1lUa7VqAfWAur55a0KeID+IscrkHz1l 6vS18fokCIGcf6E+z2jD58n6vsGN283P8O//ZZvC3jrGYf/wup0l5BM8x/3/kg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2w0k1jcwzhj9 for ; Sat, 25 Apr 2026 16:15:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 43c97 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:15:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 67504e71521d - stable/15 - chore: asmc: use designated initializers in macros List-Id: Commits to the stable branches 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/15 X-Git-Reftype: branch X-Git-Commit: 67504e71521d7806e3a6b67fe43da350839eabc8 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:15:34 +0000 Message-Id: <69ece8a6.43c97.538f16d@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=67504e71521d7806e3a6b67fe43da350839eabc8 commit 67504e71521d7806e3a6b67fe43da350839eabc8 Author: Enji Cooper AuthorDate: 2026-02-20 06:31:21 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:14:51 +0000 chore: asmc: use designated initializers in macros This code cleanup makes it easier for human readers to understand what each of the fields actually represents, as well as makes it easier to modify what the macros actually do under the covers, without introducing potential human errors. No functional change intended. MFC after: 1 week (cherry picked from commit ef1cde51032d395492caae302fedf183c58a482b) --- sys/dev/asmc/asmc.c | 61 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 23 deletions(-) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index b874599dcc81..756f4c12e43d 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -135,31 +135,46 @@ struct asmc_model { static const struct asmc_model *asmc_match(device_t dev); -#define ASMC_SMS_FUNCS asmc_mb_sysctl_sms_x, asmc_mb_sysctl_sms_y, \ - asmc_mb_sysctl_sms_z - -#define ASMC_SMS_FUNCS_DISABLED NULL, NULL, NULL - -#define ASMC_FAN_FUNCS asmc_mb_sysctl_fanid, asmc_mb_sysctl_fanspeed, asmc_mb_sysctl_fansafespeed, \ - asmc_mb_sysctl_fanminspeed, \ - asmc_mb_sysctl_fanmaxspeed, \ - asmc_mb_sysctl_fantargetspeed - -#define ASMC_FAN_FUNCS2 asmc_mb_sysctl_fanid, asmc_mb_sysctl_fanspeed, NULL, \ - asmc_mb_sysctl_fanminspeed, \ - asmc_mb_sysctl_fanmaxspeed, \ - asmc_mb_sysctl_fantargetspeed - -#define ASMC_LIGHT_FUNCS asmc_mbp_sysctl_light_left, \ - asmc_mbp_sysctl_light_right, \ - asmc_mbp_sysctl_light_control +#define ASMC_SMS_FUNCS \ + .smc_sms_x = asmc_mb_sysctl_sms_x, \ + .smc_sms_y = asmc_mb_sysctl_sms_y, \ + .smc_sms_z = asmc_mb_sysctl_sms_z + +#define ASMC_SMS_FUNCS_DISABLED \ + .smc_sms_x = NULL, \ + .smc_sms_y = NULL, \ + .smc_sms_z = NULL + +#define ASMC_FAN_FUNCS \ + .smc_fan_id = asmc_mb_sysctl_fanid, \ + .smc_fan_speed = asmc_mb_sysctl_fanspeed, \ + .smc_fan_safespeed = asmc_mb_sysctl_fansafespeed, \ + .smc_fan_minspeed = asmc_mb_sysctl_fanminspeed, \ + .smc_fan_maxspeed = asmc_mb_sysctl_fanmaxspeed, \ + .smc_fan_targetspeed = asmc_mb_sysctl_fantargetspeed + +#define ASMC_FAN_FUNCS2 \ + .smc_fan_id = asmc_mb_sysctl_fanid, \ + .smc_fan_speed = asmc_mb_sysctl_fanspeed, \ + .smc_fan_safespeed = NULL, \ + .smc_fan_minspeed = asmc_mb_sysctl_fanminspeed, \ + .smc_fan_maxspeed = asmc_mb_sysctl_fanmaxspeed, \ + .smc_fan_targetspeed = asmc_mb_sysctl_fantargetspeed + +#define ASMC_LIGHT_FUNCS \ + .smc_light_left = asmc_mbp_sysctl_light_left, \ + .smc_light_right = asmc_mbp_sysctl_light_right, \ + .smc_light_control = asmc_mbp_sysctl_light_control #define ASMC_LIGHT_FUNCS_10BYTE \ - asmc_mbp_sysctl_light_left_10byte, \ - NULL, \ - asmc_mbp_sysctl_light_control - -#define ASMC_LIGHT_FUNCS_DISABLED NULL, NULL, NULL + .smc_light_left = asmc_mbp_sysctl_light_left_10byte, \ + .smc_light_right = NULL, \ + .smc_light_control = asmc_mbp_sysctl_light_control + +#define ASMC_LIGHT_FUNCS_DISABLED \ + .smc_light_left = NULL, \ + .smc_light_right = NULL, \ + .smc_light_control = NULL #define ASMC_TEMPS_FUNCS_DISABLED \ .smc_temps = {}, \ From nobody Sat Apr 25 16:15:33 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2w0p2sXLz6bl7c for ; Sat, 25 Apr 2026 16:15:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2w0p1hgKz3wyq for ; Sat, 25 Apr 2026 16:15:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777133738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rjpYR3EOOSNWx9h9L70QfBSFgcxEGjMLBfwINvJ8PDM=; b=pjN1YFJB5mIgM1Cxl/5vKqwDmPZDrVGk1wYJwAeo6twXAfNWcZ8kAZceyqiFPNdFrjXCmX SmJ73mc+MclS/fCbk4N0KryRoeHjqqqFul70Fje5ioqdjaUu/4qyMqxx3N7P7lzb2Wo48e QeFi/20zLQtj2KIpIK2eiTV7weCsRJLMdjwSkMLFM8cI9GjQ+R4h9pLTXuPGCF8l4RuB/t nMqVxWFEEe3PAx8p3clVir/c467RsVx90pPln64j9cLLLAgUXDhzogdXO/aXlvd7YX5scZ nO9gm8K2ZJPTts5l3Sp6F6Fad0oUlH3hZHmOhmKOTs6aAAlVmyNhtuz6tGSl8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777133738; a=rsa-sha256; cv=none; b=X8wAZbWgrB1IXKRvF/xTrloWQIPrk/PUnSaKkaZR+ZxLecV4kH4hx2X2KxkRqT8gJQwazt SFwVsmymJTV4NTZvXesxF5jihfylgq3VkKwmmjzS91zqCUgBdXF6pvHlKdzgK0F/+A//I1 ZkBbd8lr4dFvWVMpvFllvzUT7eNPA7zrWkjw33NZu+wOzj/00duAaPn9RLQBEse5smKn21 /FRvHnczjjZAvonLem64Tx8EnA0i6Wa6XwB3gC/J/MoLuKymRotYK2asNL+r4TUWKEujZ0 c1/BzT0kGw406nXx/NTgN5hrywZpteNEF9Qe3KC8Wnumr9n2ccjyGrq5G1GkLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777133738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rjpYR3EOOSNWx9h9L70QfBSFgcxEGjMLBfwINvJ8PDM=; b=wqC+epJXMrlUdAYZg2GxCmfZrxTj9/kDGXzyO1EPAynX82ZN6qrFpJtpLpMtEQEdr9sjwE rm6muzHHmi7Cb28NCVw+isqhrsb/608CEIZasKCSojS2FP3x8yqnQBq4mCxONOTJiVq/dV CjXxW4S13q8iJdU1UhmLE5l15CZnWR7bdstdaii0kaQXPAVib426gDFizrsKV4YvrY18fs r0x8/Fg+SIU+grn5k6fuG8Et57RQA3ZZPczXwgUhv/CbvwkZrx+6mYrIsmrvwCCWBMtCja Twdm89xwWkv/Aneo2NoyMaof9OFogSq+RFsn0EsJ4Kk4BNxe6VpOuAwds+8+Mg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2w0j16Kkzhj8 for ; Sat, 25 Apr 2026 16:15:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 41f63 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:15:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 589ece518441 - stable/15 - asmc: resource cleanup simplifications List-Id: Commits to the stable branches 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/15 X-Git-Reftype: branch X-Git-Commit: 589ece518441d787a5267abfa8fe6f704171dd78 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:15:33 +0000 Message-Id: <69ece8a5.41f63.192ce6f8@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=589ece518441d787a5267abfa8fe6f704171dd78 commit 589ece518441d787a5267abfa8fe6f704171dd78 Author: Enji Cooper AuthorDate: 2026-01-30 06:55:08 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:14:50 +0000 asmc: resource cleanup simplifications This change makes `asmc_detach(..)` reentrant by setting freed resources to known invalid values when done, and makes `asmc_attach(..)` call `asmc_detach(..)` instead of attempting to the semi-equivalent way of cleaning up the driver resources allocated in `asmc_detach(..)`. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55413 (cherry picked from commit eda36ae09dd1fab78bd377739fc5d6c65c61f5d7) --- sys/dev/asmc/asmc.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index 1623d2d9bf98..b874599dcc81 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -835,7 +835,7 @@ asmc_attach(device_t dev) if (sc->sc_irq == NULL) { device_printf(dev, "unable to allocate IRQ resource\n"); ret = ENXIO; - goto err2; + goto err; } ret = bus_setup_intr(dev, sc->sc_irq, @@ -845,18 +845,14 @@ asmc_attach(device_t dev) if (ret) { device_printf(dev, "unable to setup SMS IRQ\n"); - goto err1; + goto err; } + nosms: return (0); -err1: - bus_release_resource(dev, SYS_RES_IRQ, sc->sc_rid_irq, sc->sc_irq); -err2: - bus_release_resource(dev, SYS_RES_IOPORT, sc->sc_rid_port, - sc->sc_ioport); - mtx_destroy(&sc->sc_mtx); - if (sc->sc_sms_tq) - taskqueue_free(sc->sc_sms_tq); + +err: + asmc_detach(dev); return (ret); } @@ -869,16 +865,25 @@ asmc_detach(device_t dev) if (sc->sc_sms_tq) { taskqueue_drain(sc->sc_sms_tq, &sc->sc_sms_task); taskqueue_free(sc->sc_sms_tq); + sc->sc_sms_tq = NULL; } - if (sc->sc_cookie) + if (sc->sc_cookie) { bus_teardown_intr(dev, sc->sc_irq, sc->sc_cookie); - if (sc->sc_irq) + sc->sc_cookie = NULL; + } + if (sc->sc_irq) { bus_release_resource(dev, SYS_RES_IRQ, sc->sc_rid_irq, sc->sc_irq); - if (sc->sc_ioport) + sc->sc_irq = NULL; + } + if (sc->sc_ioport) { bus_release_resource(dev, SYS_RES_IOPORT, sc->sc_rid_port, sc->sc_ioport); - mtx_destroy(&sc->sc_mtx); + sc->sc_ioport = NULL; + } + if (mtx_initialized(&sc->sc_mtx)) { + mtx_destroy(&sc->sc_mtx); + } return (0); } From nobody Sat Apr 25 16:21:48 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2w7w52H8z6blY7 for ; Sat, 25 Apr 2026 16:21:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2w7w3fCgz3y4W for ; Sat, 25 Apr 2026 16:21:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134108; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/8jOW5xbS7EPg0ZQ3pb9qBj8MBq+vhQHykVt7DSwBUk=; b=c+oRfJ4aQB6cqkGthD1G1wmCpiUYQsa5ENhZScG7Ku/ef2z8k6lhm/SzttBd1xQFH/PzVa ltc6ugQEVw0YNVP6zc9bJnzPKiMLBxLGwDEmtPrl8Al8+HwT11YGkXOo9L5Yuqqo5lbbq5 BrAOVt+s2uzR5CMeCo/Y37Fc/BKTZWW3duU5fRSLyxTZDZIo3cAiHakUomK+qH8r7EHIB7 8v4KFQoxACwBNlIzdA8Gp5iE46MYAF2/23L7iQflcWd5jzi/BuqyigwN9O3/cDbZyXMV7m gG4CxMQpO7lCIeygvw3V3d0l7LA37g4fsQZLXRUf3ygzaedlfrpdcfir1Aflug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134108; a=rsa-sha256; cv=none; b=KHy0DNbYkUTHLLETgFDK8HIHyQeGy9mn+nBF0NilSCaG+xSCLm3YswxGXsQfxikedgqi7f JC0r5I87jjum0IZGafy4QlpSChUilS4vydKyXqew7TZ3a2JC3QU4vUYfNK5hnFfQeeKoXn 5MLB16j/6ZSJMr23+t04PYJJWQ7nDx8S3bXhwdVG8FwyOMso0PmtVTvJKnjVb8iU+66RPW 8v+K/XDtgKHgG0AP3oKycZjh0kjyEUC5blRpvACSnFc0gtItJ6OGfaevwiFI+XOfiAJ/nq cbNez6fpC2pQLTitPhmV+dB+gPvnjJBiksXM5Pb2IBZeqNSrbFkDtsNbEu6FuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134108; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/8jOW5xbS7EPg0ZQ3pb9qBj8MBq+vhQHykVt7DSwBUk=; b=gLBRv4cjUcue8yWLFPTe8sl5LRfMlj8ZUbDu8U82iYYySaEK1/JR5w5gfreu4js/8BgEwT p0PfGmcerA3BVIyzdZa6QVg5aDRz53mUWY9dl8DnMELbfeHONeir9daDbyETCpf91GLQ35 W+nUSYWtG9TmejWl9XND5PTcdwlPqMO/wbdRRSO98ML61KgYO7sIJe3qcvMEo+oIgeaK2N 588MRtI6O0FbFCZUbZJWozTwoAzTc80RmRzKdDfoCTkcuXj0I96pI5q9w73PeNRCH5yTFB OV0pOI/o5ZApQn0qf2s3HAOAwQYLKoqHpdsUtfc6TzZ9PfRPPoRODyVMSBIE3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2w7w316HzhHC for ; Sat, 25 Apr 2026 16:21:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42e78 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:21:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 91c6c5fe7b12 - stable/15 - release.sh: add chroot cleanup routine List-Id: Commits to the stable branches 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/15 X-Git-Reftype: branch X-Git-Commit: 91c6c5fe7b1240a589807c6a1b8f1dddb73e105c Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:21:48 +0000 Message-Id: <69ecea1c.42e78.2097f669@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=91c6c5fe7b1240a589807c6a1b8f1dddb73e105c commit 91c6c5fe7b1240a589807c6a1b8f1dddb73e105c Author: Enji Cooper AuthorDate: 2026-03-22 02:57:25 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:21:42 +0000 release.sh: add chroot cleanup routine The chroot_cleanup routine handles any cleanup needed post-chroot_setup, etc. This consists of purely tearing down `${CHROOTDIR}/dev` today, but might involve additional steps, as needed for custom functions. This allows end-users to override the various chroot functions without having to modify code in main() or replicate the unmount procedure in an equivalent routine setup via the trap builtin. This change modifies the /dev unmount process to use `umount -f` instead of `umount`. The latter can result in failures if resources are still mounted or are running post-build, whereas the former will clean up any resources still in use by processes running in the chroot at time of build. Moreover, the `chroot_cleanup` routine is now called when the script is killed with `SIGINT` and `SIGTERM`, as well as at `EXIT`, better ensuring that the script's resources are cleaned up in relatively common scenarios that can be detected/handled. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55450 (as part of a larger change) (cherry picked from commit 60baee1fa4848ac969522e03d2c6f273f334edb7) --- release/release.sh | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/release/release.sh b/release/release.sh index 480d6b34f191..da5cc9dc5d25 100755 --- a/release/release.sh +++ b/release/release.sh @@ -44,6 +44,14 @@ load_chroot_env() { } load_target_env() { } buildenv_setup() { } +# chroot_cleanup(): Clean up resources setup in chroot_setup() at exit. +# +# This function can be built upon. `_chroot_cleanup` must be added to the end of +# the override function, if overridden. +chroot_cleanup() { + _chroot_cleanup +} # chroot_cleanup() + usage() { echo "Usage: $0 [-c release.conf]" exit 1 @@ -427,6 +435,18 @@ chroot_arm_build_release() { return 0 } # chroot_arm_build_release() +# chroot_cleanup(): Clean up resources setup in chroot_setup() at exit. +# +# This contains steps which must be executed at exit. +# +# Do not override this function: override `chroot_cleanup instead. +_chroot_cleanup() { + if [ -c "${CHROOTDIR}/dev/null" ]; then + echo "Unmounting /dev in ${CHROOTDIR}" + umount -f "${CHROOTDIR}/dev" + fi +} + # main(): Start here. main() { set -e # Everything must succeed @@ -451,7 +471,7 @@ main() { fi fi env_check - trap "umount ${CHROOTDIR}/dev" EXIT # Clean up devfs mount on exit + trap chroot_cleanup INT EXIT TERM chroot_setup extra_chroot_setup chroot_build_target From nobody Sat Apr 25 16:21:49 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2w7y1DwWz6blSq for ; Sat, 25 Apr 2026 16:21:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2w7x4T5dz3yBC for ; Sat, 25 Apr 2026 16:21:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WtwTELkn6YVETjTVEprKnQvclvIfmnGqsSj+zfbMCXA=; b=cZl4FfNtdR6CHF2gSpVawwvUxv05z+HN77hetSQpbISeWxk4uhVsSbLVIf7fyFqISowIeu 1ftRzInZoGUfgp4xjVUXBZTtNLiCMiZ+xPAnQIM+3M5BCv7IU0DtLIRoNmFRa2L0fnDFZQ 50e9BZNz+hj2xhVWLomdQWzYccI0jxIqz9bgOEXdWN/lly+Ek9WavGWYYRy8kuDKbrN1cK yY611mq2pY24W9db69TF6Ku9G9FfwP/YkE/P7nVXvsQBlFQzD1mMyx3b3w/ljaTYAgO0DY qH1uyRtB4zEFmipdgYefrejXqLgoh6huVwxmzUr14AvsvjoqPzBjcr9CLiFwBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134109; a=rsa-sha256; cv=none; b=iwX+2+mlqL91Jci2xo+ZBD/ijqeDGuUO4AlHAGJgEtES3yu6hKyrsyMf3JCgwMvXPNO+5X rH6eCi22Rbkt08FpenIIAGElcWHaf5SR111QWUxgFXTZTSfDm5T9P+WeXOQ3H8DZ9UURKQ g2abAHV5to9nvQWZ1QIItTHntdsReruBmjyKrqsg7jKAbKgQ81++rdq5D75cw/+/Hgw0Si DdCC0ULRB9HFOir2wSgEq+4C/dZ4QEJWfBCDdkuvgy6SMKIa+Be8M2XT8uXefFO+SE6dwb 7LRz40iZIP37wqyXYMxC+hjQbY4FiqJn6yc9IcBbhdsGm8CDHKZQivaaYeKRwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WtwTELkn6YVETjTVEprKnQvclvIfmnGqsSj+zfbMCXA=; b=yFsxjmklbr7gIlobFDFecxvcZ55MnhI0bfNoTntf+dcfUBD1+rxwWp9Dmct4LQLscdSsKr vcHAFjD2GQQp5XP7zHUfLv/4OlzgvGE01WcZ4U4yWgC/iScLRJ9wu6G5ijKJeldy+8nhlk l5gmYQfTvMClDKChf9H6xQLu6dyIG9FnEEsDfg+Pm3m68Q1f66vGAInE5s//ftjk8CJ9At KLFi8g0pCXwC4cWMnbo+OeHMfbLUh0zfpdsnIstFjyg0vTAYI3kM6dKAuHFAktK2d/Cr3j 9KwsVVmp5rnZtxoS89fH4/pDtp86RbLwi2iztMZ6pnrOH6SMS1FbAMRJ2DlZnA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2w7x3nmKzhHF for ; Sat, 25 Apr 2026 16:21:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4461e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:21:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 72fc340ba71d - stable/15 - release.sh: document user-overriddable 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: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 72fc340ba71d5548a51ae6604f8b71735940ceac Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:21:49 +0000 Message-Id: <69ecea1d.4461e.682cda32@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=72fc340ba71d5548a51ae6604f8b71735940ceac commit 72fc340ba71d5548a51ae6604f8b71735940ceac Author: Enji Cooper AuthorDate: 2026-03-22 02:45:57 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:21:42 +0000 release.sh: document user-overriddable functions This helps others attempting to customize the behavior of `release.sh`. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55450 (as part of a larger change) (cherry picked from commit b24fc79095c640620a643a11fa2f4f833326bfed) --- release/release.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/release/release.sh b/release/release.sh index da5cc9dc5d25..48c505470524 100755 --- a/release/release.sh +++ b/release/release.sh @@ -40,8 +40,17 @@ export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin" VERSION=3 # Prototypes that can be redefined per-chroot or per-target. + +# load_chroot_env(): Set up the build environment needed. +# +# Done as part of chroot_env(). load_chroot_env() { } + +# load_target_env(): set up the build environment needed for the +# chroot_build_target() and `${chroot_build_release}` steps. load_target_env() { } + +# buildenv_setup(): set up the build environment needed for post-chroot_setup() buildenv_setup() { } # chroot_cleanup(): Clean up resources setup in chroot_setup() at exit. From nobody Sat Apr 25 16:22:24 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2w8d34k9z6blrS for ; Sat, 25 Apr 2026 16:22:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2w8c42DWz40jN for ; Sat, 25 Apr 2026 16:22:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134144; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vSiSHPwsERAdqL/MBvdDdjb4ePdNW1gxyI6aDEpso7w=; b=NwKfjLDq9c/gyw8V4YOxvokXkZawhBRhQzJzBy2iIZ+gGrVoMrFnaHc3F/aVniPEUZ0lkp nn/DBh5TBdMaazSajvCWO8xYNxVVAxpb9FT3/LZcCVEN/Dhupm1WOSak6flsgN49KH9OAb xH0ZZT82MGSoMBy+TItk6MbY1sgKCPLHkt1nBPYZLVxThmzjZkOvgCzotR2ri7L4FgdbZb XGFdziHQ1eKkE4U45Ph85JFH96bCQpDx4scB5PnndSRLs79qWJAiakx8tAOuxn/muBbgBI cFMpXA5REKe9ExrXMTzo0Z9y/GF069coErOPE0NyB6IXfvxjSV/CIAiIjysSrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134144; a=rsa-sha256; cv=none; b=xQN+W9Az4IUS9W4TZBqS+ndhBdUGrA5dCeYYbzZhiSLC7C1h3iUwm1diLVpfHocUZ+X3zy wYdShGbdUXiHDHC/v5N8qGiGHjCyEXZC5U2RZG6IN9Qd7q21wrCm6nWqeWc7pXFCPePGN4 qgj3h1taEQam6eUjwZ8W4+Qqh88v/wRfiGZdVfqwBY+2GBJ0/FPXRXxiR3GTzRfNVu0Grm cNC0SZnCDO2nfq6BbFRZlN4mpZdVy3Ue6uefUwCs+Z5gydExNpSafHzPVIHoiN+Fi9itXv 6ypaTO4KvDgdlynhusQPwc3PDBbuo4MHw3aTFfljVIah+2ip9lWqsZR4nMcfdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134144; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vSiSHPwsERAdqL/MBvdDdjb4ePdNW1gxyI6aDEpso7w=; b=MtMUysNNXEL1RM1TV05VYwH+ZaToeKyheZ57BfTkx+2cFYuy6De6tCC0AkJzaJvISeYb4P 9omAj+Heuesi3IZile/vPve+CTHN9B1svmwbb81C6s8UWEr2c327n1N3lH43jayypWYgwR nxncqc5XfywL+pHzpSLQ7m2AIHOwcARXUl2PzQWbrvfcFlV/5ChQXkE2Wrw8r3h82I1N+G sdWltPLiTkyvzVCeazOI0yWSrHLpK8UELX/+nzp2wXskI8BjCERxPvxzsiEiGqWQamSRa2 dF8DUIkM4fCxeVJ5eaFfNzl+BBeT+65vifIfluyd74VtIpbteuW807yDZ/KIxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2w8c3KxCzhHQ for ; Sat, 25 Apr 2026 16:22:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 43633 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:22:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: d6faa06d8936 - stable/14 - release.sh: document user-overriddable 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: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d6faa06d8936cf42accbf98860b9333710deda2c Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:22:24 +0000 Message-Id: <69ecea40.43633.54612a45@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=d6faa06d8936cf42accbf98860b9333710deda2c commit d6faa06d8936cf42accbf98860b9333710deda2c Author: Enji Cooper AuthorDate: 2026-03-22 02:45:57 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:22:18 +0000 release.sh: document user-overriddable functions This helps others attempting to customize the behavior of `release.sh`. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55450 (as part of a larger change) (cherry picked from commit b24fc79095c640620a643a11fa2f4f833326bfed) --- release/release.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/release/release.sh b/release/release.sh index 1f366e287adc..df3128f5c70f 100755 --- a/release/release.sh +++ b/release/release.sh @@ -40,8 +40,17 @@ export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin" VERSION=3 # Prototypes that can be redefined per-chroot or per-target. + +# load_chroot_env(): Set up the build environment needed. +# +# Done as part of chroot_env(). load_chroot_env() { } + +# load_target_env(): set up the build environment needed for the +# chroot_build_target() and `${chroot_build_release}` steps. load_target_env() { } + +# buildenv_setup(): set up the build environment needed for post-chroot_setup() buildenv_setup() { } # chroot_cleanup(): Clean up resources setup in chroot_setup() at exit. From nobody Sat Apr 25 16:22:23 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2w8d34mvz6blSy for ; Sat, 25 Apr 2026 16:22:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2w8b31mcz40gG for ; Sat, 25 Apr 2026 16:22:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134143; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ItNBp+dV9GRPJrSKnEUFbIF3JGyFqp+EGaMd1rbL7Bg=; b=BwNVrXBbTlpCMyneB7BHwmPLwt8yVg1arVsSrtuFF21WKhxMxYqjVRp7iG/TgH3cGqRctV 7wRMBM9uBTaEhc1WSKJnHW2qUMoadTYlOIS9NRHDqMufBxh/O3WJohWyjv64+VWgAObnPC 5aGFCsmKJ5kjlbkHMcSrmJAEF3/I/IF1x7t2gUjHgYAKfvIczvkouNfZkLpdvlrf+TI13w XiaSFOWINs/HVwEs2OR/kS/rLfbuFb22rO8px7dWHJHvDD4FexvUHckc40MRYrtAb1PcYj lqITxi7NAw58avqPxEo9FJhTf2mMNG68sxwQ1B1pUNMWR/CYDBAmKlqhDyr18Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134143; a=rsa-sha256; cv=none; b=YtjnOt/PQsHdUZapa/PtWytPyjxHgFebW2t772PQZ+nzafMAtQILYoobcEQ4ZDbVX2oPmd vBlXYtnHWp7zV+/vTDszkpRIVq+6uluYFjQXStmCATZ3J905Vh6SHrIR68+b758edbdNL1 Scvh9eV+WzqHsZL7sQPfdoSL8WJ11IoAnxCiBjOngGEWDM4hoA3QzUohP1Dw1lbJnK942k bN0A2YckqIBveX/Vo2RBV4l1ixb/EHOWMfPzUnLnXbnHQ+/g7A9qFO/CzG+8HtjgU40P0O h3cEfGTX2q73fSX7/yRGj7e6/bDj54VlNPIh8IcegmEzPAZ/f5+pRl/T0iuUhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134143; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ItNBp+dV9GRPJrSKnEUFbIF3JGyFqp+EGaMd1rbL7Bg=; b=OnEC6yZ8UNYRGLUe6ZGN/1cUVpvQE31sOs7PvW5NLnj3fB0s8Q92t+OsjlEYhkGh8pm8tI 9UJfLtdK38c7kwngvRTJyrQdODsimnXiEaRlksIyH0NLHXGWcsQEYTHVdE2qlZVx1iOQh5 ah8gmmoJJpyQ/CCmFKUnxPu0fs3NxRKwe9C70xcBwFrCdi43hd2JpA3xFVGyY8S7E5f1x7 2qfULDiFUO03teH520PyfSggE+LM6UJo9PkV1HS14ey/YFvA2qCeOYd9WjqqIGtFmU6zMw 2loF2sXh+WqvHkxlKJSDaZ5tD5fIzaI2C/PSkZ6X/r0pfhs28x+Ehiq/3oMfwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2w8b2YVLzj0g for ; Sat, 25 Apr 2026 16:22:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 448b4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:22:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 99b65c8b4772 - stable/14 - release.sh: add chroot cleanup routine List-Id: Commits to the stable branches 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: 99b65c8b47724952a22186b7214523fadd012560 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:22:23 +0000 Message-Id: <69ecea3f.448b4.579a1ad@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=99b65c8b47724952a22186b7214523fadd012560 commit 99b65c8b47724952a22186b7214523fadd012560 Author: Enji Cooper AuthorDate: 2026-03-22 02:57:25 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:22:18 +0000 release.sh: add chroot cleanup routine The chroot_cleanup routine handles any cleanup needed post-chroot_setup, etc. This consists of purely tearing down `${CHROOTDIR}/dev` today, but might involve additional steps, as needed for custom functions. This allows end-users to override the various chroot functions without having to modify code in main() or replicate the unmount procedure in an equivalent routine setup via the trap builtin. This change modifies the /dev unmount process to use `umount -f` instead of `umount`. The latter can result in failures if resources are still mounted or are running post-build, whereas the former will clean up any resources still in use by processes running in the chroot at time of build. Moreover, the `chroot_cleanup` routine is now called when the script is killed with `SIGINT` and `SIGTERM`, as well as at `EXIT`, better ensuring that the script's resources are cleaned up in relatively common scenarios that can be detected/handled. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55450 (as part of a larger change) (cherry picked from commit 60baee1fa4848ac969522e03d2c6f273f334edb7) --- release/release.sh | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/release/release.sh b/release/release.sh index 5a6de297f7a1..1f366e287adc 100755 --- a/release/release.sh +++ b/release/release.sh @@ -44,6 +44,14 @@ load_chroot_env() { } load_target_env() { } buildenv_setup() { } +# chroot_cleanup(): Clean up resources setup in chroot_setup() at exit. +# +# This function can be built upon. `_chroot_cleanup` must be added to the end of +# the override function, if overridden. +chroot_cleanup() { + _chroot_cleanup +} # chroot_cleanup() + usage() { echo "Usage: $0 [-c release.conf]" exit 1 @@ -424,6 +432,18 @@ chroot_arm_build_release() { return 0 } # chroot_arm_build_release() +# chroot_cleanup(): Clean up resources setup in chroot_setup() at exit. +# +# This contains steps which must be executed at exit. +# +# Do not override this function: override `chroot_cleanup instead. +_chroot_cleanup() { + if [ -c "${CHROOTDIR}/dev/null" ]; then + echo "Unmounting /dev in ${CHROOTDIR}" + umount -f "${CHROOTDIR}/dev" + fi +} + # main(): Start here. main() { set -e # Everything must succeed @@ -448,7 +468,7 @@ main() { fi fi env_check - trap "umount ${CHROOTDIR}/dev" EXIT # Clean up devfs mount on exit + trap chroot_cleanup INT EXIT TERM chroot_setup extra_chroot_setup chroot_build_target From nobody Sat Apr 25 16:22:39 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2w8v4RcYz6blrW for ; Sat, 25 Apr 2026 16:22:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2w8v3RF9z417l for ; Sat, 25 Apr 2026 16:22:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ewmhs8CqSH3eKAJ0TerdGUhGHIg44vsuM8aPvCXACMg=; b=mRmRNLQdnMugN8Jb2ANN+Xr519LkyJfU07Z2UCXFEoGDx2cSnakhhkEEoPzSW3ZAZ/oDJT T0F4K93IBbdjDMsNAjz3SQqDLc3GmTkb6x4ZgLwkr2P1w6voHiRylEr8bjeSYdw5RqGObO wBR3yxwbO61hQjHLD7h6nlcszd9hSICsnx7fB6UIMOzDcxCz/3sBA76/VtzVkLp7/RRiPZ Y7usIdNFCNnPSeT4vTTP2SkytPEytsBkLmWEVrM55rdOl6Jq/QeKy4W6Prx5rV9kCT40iF iYpcYmvsrRkHZEHjNr4rRR8Ac6r+9kuve27ddDIp6CgQg2VwUKpUJy3mnER2Bg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134159; a=rsa-sha256; cv=none; b=S5aBFZjObaz3h5Mbl447cPucZrztIuQcK4CSerzF5HcTXIZNqSoq/fh4Zkn3sqa8OZtVc4 TdwT4OEXvh/1JlUyCmU+nqDPw19s8CjaWIWJQYF8PXfPVFoGdsuZmtUGN2Jwz3r1MpJFn6 KtaXf1FDkfFYMUWVtxE9KWMN+VaP5YcWj1AsAhnTkswYuR1SmvinxWQu+tkm3UniD+vaN0 upmz3GnO0MvwTrZNY+j4p8/jw1v+6Im1Kp64KDgVqgUVu8AOsgn5cLJO2tgPtdMvdLRUO7 LpbeDH0jh8wSjVvWhqpbgw6UoK6KEtIn08MxrSCG0e1dzpWVVaTM4/bFK1JXsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ewmhs8CqSH3eKAJ0TerdGUhGHIg44vsuM8aPvCXACMg=; b=rV/jPXpclp0FDD0fmk43/K0hZtcRRNSzIe0QpWfJJLzeNbJREuxQ5zhRsMzuRbwuRIWP/n 8dg6dUuD047nSYk6kQtxzFUt2TeFhIgv3nG2XXJyO3vrEEd+OWl4vuPA3VJjer0EtzLgyO zVD2bF7zsXik5/w/ys0N6jApACNPcVry0wWd0BLU3GeGCQ++fTgVhaCwojc8Oz38Fyjf5h SwTMP2wc4WrHpo5qZzzzqtfaHUsxQarSZXMeLxNhxTXUs6O5lzfx+znmcvowwcKGnXPXfp OER69X1+j0tvHcv39CG/pGTQjjTu1+gXqwgSDvllPNrfdqBifzeA9e1I+wurbA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2w8v2bGNzj0l for ; Sat, 25 Apr 2026 16:22:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 44b6c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:22:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: a826f61110e6 - stable/15 - Run `make obj` before running `make test-includes` List-Id: Commits to the stable branches 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/15 X-Git-Reftype: branch X-Git-Commit: a826f61110e69f1d6eaa1ec06885e16a7a79c1cc Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:22:39 +0000 Message-Id: <69ecea4f.44b6c.73d76a65@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=a826f61110e69f1d6eaa1ec06885e16a7a79c1cc commit a826f61110e69f1d6eaa1ec06885e16a7a79c1cc Author: Enji Cooper AuthorDate: 2026-03-03 05:59:50 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:22:33 +0000 Run `make obj` before running `make test-includes` Before this change, `make test-includes` (run as part of buildworld) would place test files in the current directory, which would clutter up git clones. Run `make obj` beforehand to ensure that the files are put in `${.OBJDIR}` instead of `${.CURDIR}`. This helps cut down on the noise significantly when running commands like `git status`. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55499 (cherry picked from commit 912864912b71951f9a636190b1dba80528f588eb) --- Makefile.inc1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 8d8d8cbfe931..2255b61a30ff 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1208,7 +1208,7 @@ _includes: .if !empty(SUBDIR_OVERRIDE) && make(buildworld) ${_+_}cd ${.CURDIR}; ${WMAKE} MK_INCLUDES=yes SHARED=symlinks includes .endif - ${_+_}cd ${.CURDIR}; ${WMAKE} test-includes + ${_+_}cd ${.CURDIR}; ${WMAKE} test-includes _libraries: @echo @echo "--------------------------------------------------------------" @@ -1576,6 +1576,7 @@ makeman: .PHONY # Ensure no regressions in self-includeability of sys/*.h and net*/*.h test-includes: .PHONY ${_+_}cd ${.CURDIR}/tools/build/test-includes; \ + ${WMAKEENV} ${MAKE} ${WORLD_FLAGS} obj; \ ${WMAKEENV} ${MAKE} ${WORLD_FLAGS} DESTDIR=${WORLDTMP} test-includes # We can't assume here that ${TMPPATH} will include ${PATH} or /usr/libexec From nobody Sat Apr 25 16:23:09 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2w9T33Lrz6blQv for ; Sat, 25 Apr 2026 16:23:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2w9T1dZcz41dN for ; Sat, 25 Apr 2026 16:23:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VSIyEuOPoqebKKzcEQBWO/aW+WTlPjRdqo+Yu7LujoA=; b=e+siFvnBqRr8IRPsClbkXFK/xg3Cm3fURjXzjJxMF2VJ3mW1fugVxIrXfn7BaBGchT2KjE mNkv0XAgoSnw0MPK1/igacYVAgra+m/LVF6REc4LltDxG+FTpSnDHu8dIrRQNbFojfH6nn Z7TYXESnVDYdYZi92Byxu62NG6e9xvVZvHbU9zCY+FxhIosihbjWbq7/yOLQbQdyGUtZdy DsIG0I22h31ZTE5Gws7eWH0pAnEXPMHtJDEL8OGCH4Vwnxh5bMyqbZAaIJrb+25feu/uBQ rU0Mir5+hCXmchNVG+eiu5UzL8ruEn2oTTvrOnY08UB4kY1jp8BZBQCIgC9xzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134189; a=rsa-sha256; cv=none; b=nOx/zjVllqItxkVCgSvzeDmjz0yMMR0/NIhXSpFB+EbhNjrIL4ZsrS2oIkh3VSfoy+xhyf Y4q5lT5hjDRBfQv0lZ2D6oJsqy2tZRd2wN1LBs0p+WCseaLngLiGQrLoABUtiWw0yBbxPK BkF2LW99TenRiLRIgGxXVzBGztzVeaylvLbXcP6eDE70zdZdPq4bhn6b9rG8E7rrTxZeQZ zv48SdjpwPYgbsqFDFPdEY6btsbd4rSl7zxpTVJw6yUXqYZPvh3oEC0Wt8ELp8iYltWPw1 O4h7TYOly+nG028Ds7yI6XOdc/a/OwPoeusoYCyWEiMsKwPv8xl+l35Ipmxyow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VSIyEuOPoqebKKzcEQBWO/aW+WTlPjRdqo+Yu7LujoA=; b=nFjDHZkNvB3t5c0rMGp8u0C9JpWSmlHdJwnmg0uv7ql+KI44wuqagONKbHNliNtKwL/11N GwVMiljzyaqsHXgtzWMldWyImv+lcyc3c1iDI3BCSbfcGPHIVMfkUA8E+o/TNgyPXFXiBp gI/lCpS5iwJSiSdzRyRNdM7m2hNLSbNqyNe7vi5PsvtKWc7pZkkVc9cp4Lz1A0Pco5U7SN Ey652fP35CEcjcYEvoo99cuxHhD/LVIhiiGH+2VGHt/12sWCrmxcJgPSrx6YHE/TWqWpAo Wvh1q2HWFLzy2DkjQ8bWG77O7HWgZmbgeZ9utr6Ji43e0VZs7lAGNp7woqFl3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2w9T0hk7zh0k for ; Sat, 25 Apr 2026 16:23:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42656 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:23:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 253d17af2e6a - stable/15 - Only build USB-related modules if MK_USB != no List-Id: Commits to the stable branches 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/15 X-Git-Reftype: branch X-Git-Commit: 253d17af2e6ac2254d8939dd34659d1c269bcbaf Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:23:09 +0000 Message-Id: <69ecea6d.42656.6429388a@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=253d17af2e6ac2254d8939dd34659d1c269bcbaf commit 253d17af2e6ac2254d8939dd34659d1c269bcbaf Author: Enji Cooper AuthorDate: 2026-03-03 04:49:54 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:23:04 +0000 Only build USB-related modules if MK_USB != no This change moves the thunderbolt module and other USB modules under a MK_USB != no conditional to ensure that users not desiring USB support can easily build systems without USB-specific drivers using this knob. MFC after: 1 week Reviewed By: imp Differential Revision: https://reviews.freebsd.org/D55576 (cherry picked from commit c47cefba831240a1b3de375f18134b93cf998f5c) --- sys/conf/kern.opts.mk | 5 +++++ sys/conf/kmod.mk | 8 ++++++-- sys/modules/Makefile | 12 ++++++++++-- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/sys/conf/kern.opts.mk b/sys/conf/kern.opts.mk index 045e55d1b19a..7daac67f8077 100644 --- a/sys/conf/kern.opts.mk +++ b/sys/conf/kern.opts.mk @@ -51,6 +51,7 @@ __DEFAULT_YES_OPTIONS = \ SOURCELESS_UCODE \ SPLIT_KERNEL_DEBUG \ TESTS \ + USB \ USB_GADGET_EXAMPLES \ ZFS @@ -210,6 +211,10 @@ MK_KERNEL_SYMBOLS:= no MK_DTRACE:= no .endif +.if ${MK_USB} == "no" +MK_USB_GADGET_EXAMPLES:= no +.endif + # Some modules only compile successfully if option FDT is set, due to #ifdef FDT # wrapped around declarations. Module makefiles can optionally compile such # things using .if !empty(OPT_FDT) diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 00335f24e2e4..b5e30d48fff1 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -103,10 +103,14 @@ LINUXKPI_GENSRCS+= \ pci_iov_if.h \ pcib_if.h \ vnode_if.h \ - usb_if.h \ - opt_usb.h \ opt_stack.h +.if ${MK_USB} != "no" +LINUXKPI_GENSRCS+= \ + usb_if.h \ + opt_usb.h +.endif + LINUXKPI_INCLUDES+= \ -I${SYSDIR}/compat/linuxkpi/common/include \ -I${SYSDIR}/compat/linuxkpi/dummy/include \ diff --git a/sys/modules/Makefile b/sys/modules/Makefile index cb18bb07b8ab..a3b0cda92feb 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -356,7 +356,7 @@ SUBDIR= \ ${_rtw89} \ rtwn \ rtwn_pci \ - rtwn_usb \ + ${_rtwn_usb} \ ${_rtwnfw} \ ${_s3} \ ${_safe} \ @@ -409,7 +409,7 @@ SUBDIR= \ ${_ufshci} \ uinput \ unionfs \ - usb \ + ${_usb} \ ${_vesa} \ ${_vf_i2c} \ virtio \ @@ -704,6 +704,14 @@ SUBDIR+= ktest SUBDIR+= tests .endif +.if ${MK_USB} != "no" || defined(ALL_MODULES) +_rtwn_usb= rtwn_usb +_usb= usb +. if ${MACHINE_CPUARCH} == "amd64" +_thunderbolt= thunderbolt +. endif +.endif + .if ${MK_ZFS} != "no" || defined(ALL_MODULES) SUBDIR+= zfs .endif From nobody Sat Apr 25 16:23:23 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2w9l70fxz6blrl for ; Sat, 25 Apr 2026 16:23:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2w9l4SN2z421l for ; Sat, 25 Apr 2026 16:23:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4c8l18JSL9/IRM3uIJgGT5w3FNEHOqud3KLYmFMqxY4=; b=fLzDmR1zbwN68Rg5HXsH1oJaxvS2YF1aFnrR1I16TvF+o58nqJtVd3qprSm4xsfqt/VI3R Zb8g98qSDR4FF44CC5nM8uPXOi8H0bvEHU2OGPwo0DUp8PjlalgPC+ykvhdD2DTfQtySe/ 4fQFqtJIuuw837BxWOg8P3TZQQBBXPdFRIIf9fuBZYiRJ0LGGOwO2i6klBI+ymG/Q5Mx2Q RGZLf5Fx7tLy9JfcgCL8DnsR0Oj/arO5yAFb1qxWxqGbTNlz4fSHoaXyblK9nnk7qzdGDS OyLz72UyfsNJ96wxh2hKoVE7UfrtWtrsDCQbh4S/7blo8ZvDBNeSV+aRx1MC5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134203; a=rsa-sha256; cv=none; b=Nm7GBo1MqjrK9q8yV7gaWRhcExXEkZy+1G7Cf9XvxBczCDQ/yZ7XG1Jrtn3OMXaM+qog9t QcW8nO+GrCTH3nND61SYNwaATu4JRL6vlpLTfHa7kOxbnHv8YyOObLfDKMTbBLH5d8Pxdb etyI6OrLl0O2cvxivoma+IRpJTJjKIQKsWjPHRNVN7Hr1vAjH380DZqT5eidlG6eVfodKV a1UZhuh4xsbg1aCFWgNqevpfrdUNdPg9Ky6Q1x2yK6yMhw+tBHnSGgJO/++btMMw0Ku5zH Mgqy09p1BJEfiL4Be0mN+NlTCnC7/tMZ3SciDHmkI8fjFlsbdEFQfvVcSdVHiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4c8l18JSL9/IRM3uIJgGT5w3FNEHOqud3KLYmFMqxY4=; b=vkln5F9Ql386NQLUAm8ORQN6Q+Rh5yO1p5/xjAGonfNSwJ2IZx6qVBjlJNyywoIT/uzVDe eb/Ji6kxJ/JnGhtXV4PnXVK6ZP9FHSg0oiwqh909vAQmTTHo4nZmY2GC+OG94fZE3khWq+ /3PVta1CcHPa6FOeoYW7qtjrpjv0CSgQsv6qh2Ikpaiz5UDNmpZ9f1X5D2MxKnQsnF5v6D oDX3dyXUxHIHDOp75ww1GmBY4f3u0XPgjVOH7Qb/hRoXT+ZclZ4QlgvASPgg1dIkdj/nwJ IlGWX8eYY1zVtnCiap2IzSN6UYFp2W86qdMoDPKA0dNT+cD9vjUVBXTXPyAkQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2w9l3nNfzhnt for ; Sat, 25 Apr 2026 16:23:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 433d9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:23:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: b44a9bd37e60 - stable/15 - asmc: output the SMC firmware revision on attach List-Id: Commits to the stable branches 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/15 X-Git-Reftype: branch X-Git-Commit: b44a9bd37e605e5f9a06af5a39ac26eb6962239c Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:23:23 +0000 Message-Id: <69ecea7b.433d9.1bbd9a6d@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=b44a9bd37e605e5f9a06af5a39ac26eb6962239c commit b44a9bd37e605e5f9a06af5a39ac26eb6962239c Author: Enji Cooper AuthorDate: 2026-03-01 18:54:56 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:23:18 +0000 asmc: output the SMC firmware revision on attach The SMC firmware revision can prove helpful when determining why the behavior of a given controller varies from the maintainers' expected behavior. This should be a sysctl (eventually), but for now dumping out the information via `device_printf(..)` suffices, given that only one asmc(4) compatible device can exist in an Apple platform at any given point in time. This will become a sysctl in the future after additional improvements are incorporated from OpenBSD and NetBSD. MFC after: 1 week Obtained from: https://github.com/openbsd/src/ (sys/dev/acpi/asmc.c @ 142d064) Differential Revision: https://reviews.freebsd.org/D55577 (cherry picked from commit e81e724358e43dcf951e244a9df9df3eaa983fe9) --- sys/dev/asmc/asmc.c | 11 +++++++++-- sys/dev/asmc/asmcvar.h | 3 +++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index 756f4c12e43d..58a0b573d4c9 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -51,6 +51,7 @@ #include #include +#include #include @@ -938,11 +939,17 @@ asmc_init(device_t dev) { struct asmc_softc *sc = device_get_softc(dev); struct sysctl_ctx_list *sysctlctx; + uint8_t buf[6]; int i, error = 1; - uint8_t buf[4]; sysctlctx = device_get_sysctl_ctx(dev); + error = asmc_key_read(dev, ASMC_KEY_REV, buf, 6); + if (error != 0) + goto out_err; + device_printf(dev, "SMC revision: %x.%x%x%x\n", buf[0], buf[1], buf[2], + ntohs(*(uint16_t *)buf + 4)); + if (sc->sc_model->smc_sms_x == NULL) goto nosms; @@ -1041,10 +1048,10 @@ nosms: sc->sc_nkeys = 0; } +out_err: #ifdef ASMC_DEBUG asmc_dumpall(dev); #endif - return (error); } diff --git a/sys/dev/asmc/asmcvar.h b/sys/dev/asmc/asmcvar.h index 602f363594b9..d216fd1416e4 100644 --- a/sys/dev/asmc/asmcvar.h +++ b/sys/dev/asmc/asmcvar.h @@ -78,6 +78,9 @@ struct asmc_softc { /* Number of keys */ #define ASMC_NKEYS "#KEY" /* RO; 4 bytes */ +/* Query the ASMC revision */ +#define ASMC_KEY_REV "REV " /* RO: 6 bytes */ + /* * Fan control via SMC. */ From nobody Sat Apr 25 16:26:52 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wFm43Lxz6blvt for ; Sat, 25 Apr 2026 16:26:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wFm3TRQz42Jx for ; Sat, 25 Apr 2026 16: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=1777134412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EIE7adLofvwil2S/7OVhquqimuofsR1tXyEgiBfT8J4=; b=ARAAv16Gjs34+H7wZ+3xPers0pBzMl3mIwMJz0QHsRVltQKARIaWG0UBqkotY+jFM9WlV/ M8T/BpPSUa6xxjM677PUHjL7QVO7Ib+vNm10p64eiTgf+ejB/D8GxpQTfna0q2POow90HX Z4n3zR1iNUk9d2DO3Ie2I4IqNRd8WgDi6MRgyFDBT9xAg0YLANyFJwsMOITMH+SvBH7NpW ge4+5D7xcFnq6zZBkgqdSmHAd2Yj8oU+uFJTvC0QXoSXTsmNw5YSRkrE1yg08wbkYWoUGt haQYCrh8B3EvPAHNLpfGFyRKtQBNWnvOQve0tRRYOuHdk7x2IRa9VQFhxYM74w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134412; a=rsa-sha256; cv=none; b=Duf7Nnl1m7GpZVxm4hEQ30Xv2RKhWpnMDHEd4cC6fPbrg+xyV+526Uf1+cdY0Hc9VBo4yN F3Qvl8x9DiZRXwlRfp67yGvoDUnJyxebJ9hKlWrvardraK8kCSjTyTMNjjrgzqyKKCXpa7 bWu4jnscx/mhNLL7oPowJNNtbS0oxKjg+wvTQCmaBgz8FPE7a5hf1W213Pytpn9RVsHMQP 7/PZ35KwjlDcL9zmFEgZ6d8tZ/ufrYGyYIAwF7z3RDpIhZanAbLiY18Nvk23jE6ESCZ9TB X1Wnyli6+UTysV9kx2mapyAz/kQrIZ0MvGDpfEe6jwX1rH664NxE96xF0lJRsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EIE7adLofvwil2S/7OVhquqimuofsR1tXyEgiBfT8J4=; b=dSWhb6QX62Q7pDfor1OxIy/k0/Xscefkyxj32sYrsFzxcK4wyxNvkwlo0dUB1EmLzB4Od+ bKN9bAzY3cs+eRcQnmIeGT9FaK/NSzp2ugECWs9hpQdoBL2Eaonm7xtsY36ODFIS0LLDst w2cwx78a5y4SYwxWbP5XsoR6rX3919pMk/dyuPAmNYg/3PjHVXA44ppqnFmufaAcSI4mlV W/oax0PpluWV6N/8hjrHPXjWyuHbX9jMmroO1sqyhBme3MGK/oqqMc2q09Ajh5Mknd+AQO cuwphlJKtk/hfQXmZZGHnBSycpFzocchTvGU93+e9ALotWXWBiwyejLf3Fz54g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wFm2nHxzhXD for ; Sat, 25 Apr 2026 16:26:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 442dc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:26:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 464afc5d0e85 - stable/14 - asmc: introduce the concept of generic models List-Id: Commits to the stable branches 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: 464afc5d0e855b478f7e8260a0ce8a1f7884806d Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:26:52 +0000 Message-Id: <69eceb4c.442dc.29159d19@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=464afc5d0e855b478f7e8260a0ce8a1f7884806d commit 464afc5d0e855b478f7e8260a0ce8a1f7884806d Author: Enji Cooper AuthorDate: 2026-02-20 06:37:05 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:25:42 +0000 asmc: introduce the concept of generic models Having to enter in each of the models for Apple hardware, recompiling, etc, is tedious. Provide generic models so end-users can leverage some of the capabilities provided by the driver, i.e., common features like minimal fans and lights (if present on the generic model) support. The generic models are as follows: - Macmini - MacBookAir - MacBookPro - MacPro This sort of follows the pattern established by the `applesmc` driver in Linux. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D55395 (cherry picked from commit 3023bb49e115b4149f9fc0683dabde172ecb1336) --- sys/dev/asmc/asmc.c | 80 ++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 67 insertions(+), 13 deletions(-) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index b6b98b1c8953..56518269be07 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -160,6 +160,11 @@ static const struct asmc_model *asmc_match(device_t dev); #define ASMC_LIGHT_FUNCS_DISABLED NULL, NULL, NULL +#define ASMC_TEMPS_FUNCS_DISABLED \ + .smc_temps = {}, \ + .smc_tempnames = {}, \ + .smc_tempdescs = {} \ + static const struct asmc_model asmc_models[] = { { "MacBook1,1", "Apple SMC MacBook Core Duo", @@ -492,8 +497,42 @@ static const struct asmc_model asmc_models[] = { ASMC_FAN_FUNCS2, ASMC_LIGHT_FUNCS, ASMC_MBA7_TEMPS, ASMC_MBA7_TEMPNAMES, ASMC_MBA7_TEMPDESCS + } +}; + +static const struct asmc_model asmc_generic_models[] = { + { + .smc_model = "MacBookAir", + .smc_desc = NULL, + ASMC_SMS_FUNCS_DISABLED, + ASMC_FAN_FUNCS2, + ASMC_LIGHT_FUNCS, + ASMC_TEMPS_FUNCS_DISABLED + }, + { + .smc_model = "MacBookPro", + .smc_desc = NULL, + ASMC_SMS_FUNCS_DISABLED, + ASMC_FAN_FUNCS2, + ASMC_LIGHT_FUNCS, + ASMC_TEMPS_FUNCS_DISABLED + }, + { + .smc_model = "MacPro", + .smc_desc = NULL, + ASMC_SMS_FUNCS_DISABLED, + ASMC_FAN_FUNCS2, + ASMC_LIGHT_FUNCS_DISABLED, + ASMC_TEMPS_FUNCS_DISABLED }, - { NULL, NULL } + { + .smc_model = "Macmini", + .smc_desc = NULL, + ASMC_SMS_FUNCS_DISABLED, + ASMC_FAN_FUNCS2, + ASMC_LIGHT_FUNCS_DISABLED, + ASMC_TEMPS_FUNCS_DISABLED + } }; #undef ASMC_SMS_FUNCS @@ -541,28 +580,41 @@ MODULE_DEPEND(asmc, acpi, 1, 1, 1); static const struct asmc_model * asmc_match(device_t dev) { + const struct asmc_model *model; + char *model_name; int i; - char *model; - model = kern_getenv("smbios.system.product"); - if (model == NULL) - return (NULL); + model = NULL; + + model_name = kern_getenv("smbios.system.product"); + if (model_name == NULL) + goto out; - for (i = 0; asmc_models[i].smc_model; i++) { - if (!strncmp(model, asmc_models[i].smc_model, strlen(model))) { - freeenv(model); - return (&asmc_models[i]); + for (i = 0; i < nitems(asmc_models); i++) { + if (strncmp(model_name, asmc_models[i].smc_model, + strlen(model_name)) == 0) { + model = &asmc_models[i]; + goto out; + } + } + for (i = 0; i < nitems(asmc_generic_models); i++) { + if (strncmp(model_name, asmc_generic_models[i].smc_model, + strlen(asmc_generic_models[i].smc_model)) == 0) { + model = &asmc_generic_models[i]; + goto out; } } - freeenv(model); - return (NULL); +out: + freeenv(model_name); + return (model); } static int asmc_probe(device_t dev) { const struct asmc_model *model; + const char *device_desc; int rv; if (resource_disabled("asmc", 0)) @@ -572,11 +624,13 @@ asmc_probe(device_t dev) return (rv); model = asmc_match(dev); - if (!model) { + if (model == NULL) { device_printf(dev, "model not recognized\n"); return (ENXIO); } - device_set_desc(dev, model->smc_desc); + device_desc = model->smc_desc == NULL ? + model->smc_model : model->smc_desc; + device_set_desc(dev, device_desc); return (rv); } From nobody Sat Apr 25 16:26:53 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wFn69bfz6blkD for ; Sat, 25 Apr 2026 16: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wFn4JRGz42XL for ; Sat, 25 Apr 2026 16:26:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M33prnmV4ylp7995Ia9njPvAFlyRSDdxnXmF2xIHVlM=; b=QQse19hJoJJT5NIh7nw/2Swcjy/XHnPrkmBjaqUAaWRJR/gCrggIBr568nyKoT+fsVKPet z2M/O9cMMQXYrYyTpJ8ciBsIXYvGzZ3ko6WzKu/R/gOFeYbZbelwL2LMrvqF4xhs4Z4Jpi rOfmK3NfOJ+KECN/Ztr3wo77Rbu9H7NB4Yv4JjNw9WnRcYCWg77vz2uxo5LR8SNlNIFJd3 osE32XDSUcedJYo0IINMOgQtohyWvU790tm/ObVghxJBMt4B8Yeiz3UksOAaaIMlGf1Qpx gBThhFxKdTipyHADLzx4Zd0BOB/2T+4MHiuHbJG69aqbqATSNFu4oiwVlGMoTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134413; a=rsa-sha256; cv=none; b=fa10NjM3Yw5LYpIdu3pF7hiJMLRjh22RD66myIYPSO5dRtqkhNmajjvWncnYoonG9nS6bu AwglKQVyY8Bl5qpc9iH5sPGDJlzB8FgdBI9Ci4QJSvPkz/pj1yyJOG1kI25M34LzubBcBm QIlUz0cdRU2Dpws1KMDxbxfo1UjltPGSp3vkvRpiimSmzT0mWPH0vqVG/sdkCtT06rREFh LLYVNx1l0QyBxBf8ydecLGBTngVUJ/JSYD1RJ9tMRnHke8ZT68h/51fdcqDeq7snef09rN RO9R7WW0XWQI/cCbaiN34yJko67NeCvZe5x3buIWiT0twIZJsGXbzHqsltOpDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M33prnmV4ylp7995Ia9njPvAFlyRSDdxnXmF2xIHVlM=; b=l0iSESStobs3ADMSrWmmhVJ3apcopEd+PYmMPJItrbmz9PiP+y3iOMdmcvP0D6N4hlJfYm 7Fnxrg2XJb4rnoLFGKkR70izLqK9e8APBRNI4RXwDhQWbkAyzqhepoTSevHeKDnwqKKgLH MAqZ+CiAzXuvsq4t7ja+cRX+px4nDG6K6+TiS6J6o4qGbyPLYCKl/Oe4ht6KdTuFCnNAfI 5CpKAV1UbUwoiyCCGSvm2eZUB7b7MuBAzlegGIoDwTklZ0cRmVgbo1Rkru8VLJwWpgTiP1 8AOirCPF81/y9J6LLueD+LbphCaKFOBMYIE2jXHxTeM8cBK0q5RIV2FebTGwQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wFn32xnzhjd for ; Sat, 25 Apr 2026 16:26:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42dfe by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:26:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Abdelkader Boudih From: Enji Cooper Subject: git: 1198b0ca9d6d - stable/14 - asmc: add Wake-on-LAN control via sysctl List-Id: Commits to the stable branches 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: 1198b0ca9d6d7b579304404bc38ed17d394fc5a4 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:26:53 +0000 Message-Id: <69eceb4d.42dfe.4e622f8c@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=1198b0ca9d6d7b579304404bc38ed17d394fc5a4 commit 1198b0ca9d6d7b579304404bc38ed17d394fc5a4 Author: Abdelkader Boudih AuthorDate: 2026-02-25 06:32:42 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:25:42 +0000 asmc: add Wake-on-LAN control via sysctl Apple Mac systems support Wake-on-LAN from powered-off state (S5/G2) via the AUPO SMC key. This change adds a convenience sysctl, `dev.asmc.0.wol`. This can be disabled if set to 0 and enabled if set to 1. The AUPO key is volatile and resets to 0x00 on every boot, so WoL must be manually enabled before each shutdown to work from powered-off state. Users need to run: `sysctl dev.asmc.0.wol=1` before shutting down the system. The sysctl is best set to persist in `/etc/sysctl.conf`. MFC after: 1 week Reviewed By: markj, ngie Differential Revision: https://reviews.freebsd.org/D54439 (cherry picked from commit 94db365042d35ff7e3ee7365a87a89bab1560030) --- sys/dev/asmc/asmc.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ sys/dev/asmc/asmcvar.h | 5 +++++ 2 files changed, 50 insertions(+) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index 56518269be07..40aa74202a67 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -108,6 +108,7 @@ static int asmc_mbp_sysctl_light_left(SYSCTL_HANDLER_ARGS); static int asmc_mbp_sysctl_light_right(SYSCTL_HANDLER_ARGS); static int asmc_mbp_sysctl_light_control(SYSCTL_HANDLER_ARGS); static int asmc_mbp_sysctl_light_left_10byte(SYSCTL_HANDLER_ARGS); +static int asmc_wol_sysctl(SYSCTL_HANDLER_ARGS); struct asmc_model { const char *smc_model; /* smbios.system.product env var. */ @@ -915,9 +916,12 @@ static int asmc_init(device_t dev) { struct asmc_softc *sc = device_get_softc(dev); + struct sysctl_ctx_list *sysctlctx; int i, error = 1; uint8_t buf[4]; + sysctlctx = device_get_sysctl_ctx(dev); + if (sc->sc_model->smc_sms_x == NULL) goto nosms; @@ -987,6 +991,16 @@ asmc_init(device_t dev) out: asmc_sms_calibrate(dev); nosms: + /* Wake-on-LAN convenience sysctl */ + if (asmc_key_read(dev, ASMC_KEY_AUPO, buf, 1) == 0) { + SYSCTL_ADD_PROC(sysctlctx, + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "wol", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, + dev, 0, asmc_wol_sysctl, "I", + "Wake-on-LAN enable (0=off, 1=on)"); + } + sc->sc_nfan = asmc_fan_count(dev); if (sc->sc_nfan > ASMC_MAXFANS) { device_printf(dev, "more than %d fans were detected. Please " @@ -1741,3 +1755,34 @@ asmc_mbp_sysctl_light_left_10byte(SYSCTL_HANDLER_ARGS) return (error); } + +/* + * Wake-on-LAN convenience sysctl. + * Reading returns 1 if WoL is enabled, 0 if disabled. + * Writing 1 enables WoL, 0 disables it. + */ +static int +asmc_wol_sysctl(SYSCTL_HANDLER_ARGS) +{ + device_t dev = (device_t)arg1; + uint8_t aupo; + int val, error; + + /* Read current AUPO value */ + if (asmc_key_read(dev, ASMC_KEY_AUPO, &aupo, 1) != 0) + return (EIO); + + val = (aupo != 0) ? 1 : 0; + error = sysctl_handle_int(oidp, &val, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + + /* Clamp to 0 or 1 */ + aupo = (val != 0) ? 1 : 0; + + /* Write AUPO */ + if (asmc_key_write(dev, ASMC_KEY_AUPO, &aupo, 1) != 0) + return (EIO); + + return (0); +} diff --git a/sys/dev/asmc/asmcvar.h b/sys/dev/asmc/asmcvar.h index 102bee8a15b7..602f363594b9 100644 --- a/sys/dev/asmc/asmcvar.h +++ b/sys/dev/asmc/asmcvar.h @@ -125,6 +125,11 @@ struct asmc_softc { */ #define ASMC_KEY_CLAMSHELL "MSLD" /* RO; 1 byte */ +/* + * Auto power on / Wake-on-LAN. + */ +#define ASMC_KEY_AUPO "AUPO" /* RW; 1 byte */ + /* * Interrupt keys. */ From nobody Sat Apr 25 16:26:54 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wFp6Z8Kz6bm0t for ; Sat, 25 Apr 2026 16: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wFp3tN4z42Zg for ; Sat, 25 Apr 2026 16: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=1777134414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NHLHjL4qjr4Adr12vTFaDi8WC3Lauy+2hrT0bBp+nZM=; b=UPIPa6l9p/IOHmhLDkcJQDaXr1dZaaaM1aIjuEDsOBu+rqZW2/QERqEglzjmB8j3X3yOc/ 5YOElZ6D/yLhHJtloNQNaMSrOjLoihEV62gn+GsQZMOlU7GtlZTuGbNfj5/fz59Kq8kUt5 hMiLAzQKixjldLnzPBuerVHWDgsqIK3AKSdr7GVT6hSdZzmaj6w5pillIEXAUcsMFRLArX wFcNEVfx/4/FonNL1JlMqYcFUtNdlJQ6moY+dXkSM3vAUKk0T1Mj2x1yMxpjm1p/5xLORO syukyfcQTaYtfg2zh40TTTuYdLN15ljCtJ3u0OZ8QuyeE66PDSZMKLCy1Azp8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134414; a=rsa-sha256; cv=none; b=bjdMAJ6dyqbjSQ0Wyw6EqLz6d5AeEiT683FuOTQ4bAL4zu55xY0cxz/OgQ4f4XeoNIeX7S JFsWZb+B4xzQCOv4dSW120uHt4LA5jfrjcVJNBHHwqAZhEx0/UeuHjRectkP/clWRxBXlU ORPzOlezaXF/fZ7/srbsRReLNyhA1K2pG3g6rX1bmohqm1lG/9OTO9Jcbc27ekoYDUOBXm zPUtZiLKzquLUkc+up9Q+PbJ44xkhFRGoxTLT3ByTabgHH+M3UECbENW1wzf5LGGI6efyM pq1vYtx1HVIej/PUcnKzwDPIMALeLki3upNuuDzTxq7mauW5Me2gJ3sss4diTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NHLHjL4qjr4Adr12vTFaDi8WC3Lauy+2hrT0bBp+nZM=; b=Otdg5W7YUvSGSI4qSBzWk/Px6ub/jbWchc3Uzan4KqTD30m5r1XBcAiAI+l1hwtjWbMklG 7SbqpjSyPMU/FoeaOBfQPv1tVOVh/NNm663KHRZpw6vO9PmyxiW18R1j0P+jhAbMi4/a6c viGRe3KcjQlzpYGLnopucAimS/4Y3EhKMiwo4KjPVTel8GpIjqWyA6XrQpbPs4PDn4cHgr fDfcwZkVKXxlnBqudUfPS6IIFWoFNWvBX3Sj2zzV7/G3+gmFwKYx5e1M+64pgY37PaI7oa 16Jw/9yiovtaac5hIjgU+SAfBkMld0MsMydq++C68g9DM89l73aSRlXEY0vyEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wFp3TmqzhHT for ; Sat, 25 Apr 2026 16:26:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 44a9a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:26:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 4c91d2e1a42e - stable/14 - asmc: resource cleanup simplifications List-Id: Commits to the stable branches 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: 4c91d2e1a42e0b1be49578e01cf6fde5827abbc0 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:26:54 +0000 Message-Id: <69eceb4e.44a9a.f2c02c0@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=4c91d2e1a42e0b1be49578e01cf6fde5827abbc0 commit 4c91d2e1a42e0b1be49578e01cf6fde5827abbc0 Author: Enji Cooper AuthorDate: 2026-01-30 06:55:08 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:25:43 +0000 asmc: resource cleanup simplifications This change makes `asmc_detach(..)` reentrant by setting freed resources to known invalid values when done, and makes `asmc_attach(..)` call `asmc_detach(..)` instead of attempting to the semi-equivalent way of cleaning up the driver resources allocated in `asmc_detach(..)`. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55413 (cherry picked from commit eda36ae09dd1fab78bd377739fc5d6c65c61f5d7) --- sys/dev/asmc/asmc.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index 40aa74202a67..91a4ebe454ae 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -834,7 +834,7 @@ asmc_attach(device_t dev) if (sc->sc_irq == NULL) { device_printf(dev, "unable to allocate IRQ resource\n"); ret = ENXIO; - goto err2; + goto err; } ret = bus_setup_intr(dev, sc->sc_irq, @@ -844,18 +844,14 @@ asmc_attach(device_t dev) if (ret) { device_printf(dev, "unable to setup SMS IRQ\n"); - goto err1; + goto err; } + nosms: return (0); -err1: - bus_release_resource(dev, SYS_RES_IRQ, sc->sc_rid_irq, sc->sc_irq); -err2: - bus_release_resource(dev, SYS_RES_IOPORT, sc->sc_rid_port, - sc->sc_ioport); - mtx_destroy(&sc->sc_mtx); - if (sc->sc_sms_tq) - taskqueue_free(sc->sc_sms_tq); + +err: + asmc_detach(dev); return (ret); } @@ -868,16 +864,25 @@ asmc_detach(device_t dev) if (sc->sc_sms_tq) { taskqueue_drain(sc->sc_sms_tq, &sc->sc_sms_task); taskqueue_free(sc->sc_sms_tq); + sc->sc_sms_tq = NULL; } - if (sc->sc_cookie) + if (sc->sc_cookie) { bus_teardown_intr(dev, sc->sc_irq, sc->sc_cookie); - if (sc->sc_irq) + sc->sc_cookie = NULL; + } + if (sc->sc_irq) { bus_release_resource(dev, SYS_RES_IRQ, sc->sc_rid_irq, sc->sc_irq); - if (sc->sc_ioport) + sc->sc_irq = NULL; + } + if (sc->sc_ioport) { bus_release_resource(dev, SYS_RES_IOPORT, sc->sc_rid_port, sc->sc_ioport); - mtx_destroy(&sc->sc_mtx); + sc->sc_ioport = NULL; + } + if (mtx_initialized(&sc->sc_mtx)) { + mtx_destroy(&sc->sc_mtx); + } return (0); } From nobody Sat Apr 25 16:26:55 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wFr0QQjz6bm2h for ; Sat, 25 Apr 2026 16:26:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wFq4MX0z42gD for ; Sat, 25 Apr 2026 16:26:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yy7mOjJ2+RI97Sq82rJxxeloBWPK8JS/yCitQkQ/jRI=; b=h8GVuQ9XAiWmT+HV7QvwQlzvhD1BesR1dcksC9QewGt59DTu3ieA87kSejcMhZ1NyRvJH7 y+c/MZAXtfw715grxEo0GQOVD0WCqr8ajorn8E94A6t6oj0StXa0SjQGDWRt0HS1aOz6oo pPMrj+LpvpO7kHHkgHP3koPk31cPFkwArtkNCY7GwkpTPq01IeuDIcSmYWXsjrFxveitxP YyTi2cFHzOiVVNM1iOaqmnxF/knnZjxSf8RWDw6Hpl5MAJCDZRQ78VskfqIKB64iF6+bUd D/5fBpD2+BFa8CtDOQDXcS9ZR1IhjokRCXrNk1X0vZwKjt/B0rqZPZouny9Nzg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134415; a=rsa-sha256; cv=none; b=IxjrkTVNP7Wu9p/9o1HxXdfStqCdwsdyczxb/wlLQ0N1w45CZUMmiMlA1yKyn12jjXKZ9i tq0kh3oXZnaQoGU1byjlQ2Wgb1/JYagtLPC5uNzkRIARW7VYob8hEWp06EGJcmBTqQBYP1 uDM7K+DewzGwd91jkbc4n2te0H1rXF/UnRzXpAl1BdvDZw1l+r1miDjYITjXK4aMybTp9u Xkbq2YlKqrB0iW4cU9sFofuTq3goj9gq3FJA9Iil1PCO3yxg6Z5vRx7Y74Awg7mAZ23URS 0TG5SdhGqvR+pDr8qwsvGp4W1GaP2SNMZCKkbvg3dTuIpf3NFJDLbK53qvWaQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yy7mOjJ2+RI97Sq82rJxxeloBWPK8JS/yCitQkQ/jRI=; b=BLmo8ihVUVZbC5a3HDpTfnzEiUAIYNIwlrJloqG/WgQl61JehgHX++uExQmQ5uPCjcwvZb RYz+JD1x4bcUSXT2d9sxgS5lZasYs1u19iY3ot6fencwPkURntSTsdRpCKTd/KghzCt0P7 PxS6+vL5kkWJqYwRnoZns4osnZzXNeA4tQRSyNp7pvxZ8GMFJpbZXs0s8E4JPTLJSDovuG xYEEN4KwwnRiYQFY+5spX2HWGKtHYiaL/DcCHN8k1pZSOOaHQashxGaLxyhbk7dq1RD45J ZVoqMjaOw1QGs+eyOAlqcTfKhbMQV0E6b7jSXieijqeHOtr+i8/8DtIn+30bfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wFq3tcwzhXJ for ; Sat, 25 Apr 2026 16:26:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 43960 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:26:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 9dbe7570c275 - stable/14 - chore: asmc: use designated initializers in macros List-Id: Commits to the stable branches 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: 9dbe7570c27513c0e5f8ea57c1994740cad10e92 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:26:55 +0000 Message-Id: <69eceb4f.43960.4ac957a9@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=9dbe7570c27513c0e5f8ea57c1994740cad10e92 commit 9dbe7570c27513c0e5f8ea57c1994740cad10e92 Author: Enji Cooper AuthorDate: 2026-02-20 06:31:21 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:25:43 +0000 chore: asmc: use designated initializers in macros This code cleanup makes it easier for human readers to understand what each of the fields actually represents, as well as makes it easier to modify what the macros actually do under the covers, without introducing potential human errors. No functional change intended. MFC after: 1 week (cherry picked from commit ef1cde51032d395492caae302fedf183c58a482b) --- sys/dev/asmc/asmc.c | 61 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 23 deletions(-) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index 91a4ebe454ae..079689e2ec2b 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -135,31 +135,46 @@ struct asmc_model { static const struct asmc_model *asmc_match(device_t dev); -#define ASMC_SMS_FUNCS asmc_mb_sysctl_sms_x, asmc_mb_sysctl_sms_y, \ - asmc_mb_sysctl_sms_z - -#define ASMC_SMS_FUNCS_DISABLED NULL, NULL, NULL - -#define ASMC_FAN_FUNCS asmc_mb_sysctl_fanid, asmc_mb_sysctl_fanspeed, asmc_mb_sysctl_fansafespeed, \ - asmc_mb_sysctl_fanminspeed, \ - asmc_mb_sysctl_fanmaxspeed, \ - asmc_mb_sysctl_fantargetspeed - -#define ASMC_FAN_FUNCS2 asmc_mb_sysctl_fanid, asmc_mb_sysctl_fanspeed, NULL, \ - asmc_mb_sysctl_fanminspeed, \ - asmc_mb_sysctl_fanmaxspeed, \ - asmc_mb_sysctl_fantargetspeed - -#define ASMC_LIGHT_FUNCS asmc_mbp_sysctl_light_left, \ - asmc_mbp_sysctl_light_right, \ - asmc_mbp_sysctl_light_control +#define ASMC_SMS_FUNCS \ + .smc_sms_x = asmc_mb_sysctl_sms_x, \ + .smc_sms_y = asmc_mb_sysctl_sms_y, \ + .smc_sms_z = asmc_mb_sysctl_sms_z + +#define ASMC_SMS_FUNCS_DISABLED \ + .smc_sms_x = NULL, \ + .smc_sms_y = NULL, \ + .smc_sms_z = NULL + +#define ASMC_FAN_FUNCS \ + .smc_fan_id = asmc_mb_sysctl_fanid, \ + .smc_fan_speed = asmc_mb_sysctl_fanspeed, \ + .smc_fan_safespeed = asmc_mb_sysctl_fansafespeed, \ + .smc_fan_minspeed = asmc_mb_sysctl_fanminspeed, \ + .smc_fan_maxspeed = asmc_mb_sysctl_fanmaxspeed, \ + .smc_fan_targetspeed = asmc_mb_sysctl_fantargetspeed + +#define ASMC_FAN_FUNCS2 \ + .smc_fan_id = asmc_mb_sysctl_fanid, \ + .smc_fan_speed = asmc_mb_sysctl_fanspeed, \ + .smc_fan_safespeed = NULL, \ + .smc_fan_minspeed = asmc_mb_sysctl_fanminspeed, \ + .smc_fan_maxspeed = asmc_mb_sysctl_fanmaxspeed, \ + .smc_fan_targetspeed = asmc_mb_sysctl_fantargetspeed + +#define ASMC_LIGHT_FUNCS \ + .smc_light_left = asmc_mbp_sysctl_light_left, \ + .smc_light_right = asmc_mbp_sysctl_light_right, \ + .smc_light_control = asmc_mbp_sysctl_light_control #define ASMC_LIGHT_FUNCS_10BYTE \ - asmc_mbp_sysctl_light_left_10byte, \ - NULL, \ - asmc_mbp_sysctl_light_control - -#define ASMC_LIGHT_FUNCS_DISABLED NULL, NULL, NULL + .smc_light_left = asmc_mbp_sysctl_light_left_10byte, \ + .smc_light_right = NULL, \ + .smc_light_control = asmc_mbp_sysctl_light_control + +#define ASMC_LIGHT_FUNCS_DISABLED \ + .smc_light_left = NULL, \ + .smc_light_right = NULL, \ + .smc_light_control = NULL #define ASMC_TEMPS_FUNCS_DISABLED \ .smc_temps = {}, \ From nobody Sat Apr 25 16:26:56 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wFs104lz6blkJ for ; Sat, 25 Apr 2026 16:26:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wFr4rSzz42Pw for ; Sat, 25 Apr 2026 16:26:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2OIMNdnFif/kbJzDw8ggtlbMCzIjlWUT7Qv6kp59og8=; b=qA5x4AapSPIHZRumIJ0+JaAzcw/OL50cw1cGeXR8EoB0AUxKlmgvgwenFBqsqN36TJJFIc 2hrCbBBKtUVYXM83daFabEh4Mhlk9vuqEn6Z3UKXCBSnrT7BNzLCM/60bFMzyZr8aeZULD itPQ1/kPW+catBI7GkXdg8rNNyHv0zeyqie9nbZGLqClxXBZT3xopIK8005Re/p7ekudvE 1l885zSYhovaDPmRUmHfSwazBw0zBfz84JSfxoKFuJw/GukzYV7+da0LV3I/Yi6qv9gvWw aNXaXHsRe8wIdbtzPcNCh7xl2FxBB1vC75w6dY13jrvwECqZuHU/w05qJQ7XYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134416; a=rsa-sha256; cv=none; b=F/sfEbwwtFCuBZGGy2EUqOrJE/QEZaVWh7T/wMTvKjFXIWBFGV+ubxRUp/F8HYUy7vkpjy YA3H7XC06jm6KKvg+bYWv9sM3Qj1lbGR4PVZyX4FjekBNOmmK2yPQqKBXgIOIqRgRKo+9O e7Rn8wibNoeAVN6WjCxRxseqgYU5+j7OL/SzE3nVPbhj2v5Q0qbiQQq9iBtKYc2hELnqIM zIXnSKk9vK3qrr9KwNnh5PqIHdigZFPDLKMOHZ2bfbRQ7c0N/Z2A/IT11+scyqk6d4gFhr +gnrnE29D11Vy5QppRTjlj96krg9W3jObRGP94I3lsIPotgq3XzjVyp7az3+Hg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2OIMNdnFif/kbJzDw8ggtlbMCzIjlWUT7Qv6kp59og8=; b=VQlz4tPLjhVb0F3t2cC4HePwF0gQa2JtobhjqIKLP6x+VxjLONzEbWv/fhJL23V8tIp90I +yEqvLH5v1pMSF/QvZMGAYr8XpzaWZ8Ri+MooxXSQeqFtWpTGzFjNzedYIdsDgLoGY8fdZ TlglWhLrWaqQjLBzKBA2AevJ3GyBdf3U44Djcc9ynB+8B0VN92qi6pDfH+Y1RDPInZ8XVc biR5AiNwltkUh2Hrn94deha5lt0nbyuzwqpJTXtGkZCzUAH+DcxoNl2I8ijQpg0O38tC83 kVKYfGxQ//EP9EYyjbPqYO7o1obmgOv//snMD4XKElDuUmBQns16Xt7y/m8EUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wFr4KpvzhXK for ; Sat, 25 Apr 2026 16:26:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 43c3a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:26:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 78e9708c98aa - stable/14 - asmc: output the SMC firmware revision on attach List-Id: Commits to the stable branches 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: 78e9708c98aa7b1362cdb909f3530592c97ee904 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:26:56 +0000 Message-Id: <69eceb50.43c3a.2ecc694b@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=78e9708c98aa7b1362cdb909f3530592c97ee904 commit 78e9708c98aa7b1362cdb909f3530592c97ee904 Author: Enji Cooper AuthorDate: 2026-03-01 18:54:56 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:25:43 +0000 asmc: output the SMC firmware revision on attach The SMC firmware revision can prove helpful when determining why the behavior of a given controller varies from the maintainers' expected behavior. This should be a sysctl (eventually), but for now dumping out the information via `device_printf(..)` suffices, given that only one asmc(4) compatible device can exist in an Apple platform at any given point in time. This will become a sysctl in the future after additional improvements are incorporated from OpenBSD and NetBSD. MFC after: 1 week Obtained from: https://github.com/openbsd/src/ (sys/dev/acpi/asmc.c @ 142d064) Differential Revision: https://reviews.freebsd.org/D55577 (cherry picked from commit e81e724358e43dcf951e244a9df9df3eaa983fe9) --- sys/dev/asmc/asmc.c | 11 +++++++++-- sys/dev/asmc/asmcvar.h | 3 +++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index 079689e2ec2b..066b9c80de23 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -51,6 +51,7 @@ #include #include +#include #include @@ -937,11 +938,17 @@ asmc_init(device_t dev) { struct asmc_softc *sc = device_get_softc(dev); struct sysctl_ctx_list *sysctlctx; + uint8_t buf[6]; int i, error = 1; - uint8_t buf[4]; sysctlctx = device_get_sysctl_ctx(dev); + error = asmc_key_read(dev, ASMC_KEY_REV, buf, 6); + if (error != 0) + goto out_err; + device_printf(dev, "SMC revision: %x.%x%x%x\n", buf[0], buf[1], buf[2], + ntohs(*(uint16_t *)buf + 4)); + if (sc->sc_model->smc_sms_x == NULL) goto nosms; @@ -1040,10 +1047,10 @@ nosms: sc->sc_nkeys = 0; } +out_err: #ifdef ASMC_DEBUG asmc_dumpall(dev); #endif - return (error); } diff --git a/sys/dev/asmc/asmcvar.h b/sys/dev/asmc/asmcvar.h index 602f363594b9..d216fd1416e4 100644 --- a/sys/dev/asmc/asmcvar.h +++ b/sys/dev/asmc/asmcvar.h @@ -78,6 +78,9 @@ struct asmc_softc { /* Number of keys */ #define ASMC_NKEYS "#KEY" /* RO; 4 bytes */ +/* Query the ASMC revision */ +#define ASMC_KEY_REV "REV " /* RO: 6 bytes */ + /* * Fan control via SMC. */ From nobody Sat Apr 25 16:28:59 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wJC5H6Vz6blyP for ; Sat, 25 Apr 2026 16:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wJC4SQbz43lG for ; Sat, 25 Apr 2026 16:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G6qOK4ym8h/ZJ7d1vvAfrcJYwvjglFPx52tE6iuXjpA=; b=YeDpCiXNGsyeVcSWHZ+Eoj2tWnmiGyqK6ESWYGtoEnOPlbmW8sU9DjF340qrM4Dpo9/9XG RKcF3yHnOnJ+fpZl5jfGNR7tbdowm8/DhrjYK/rHr2nnU2+PoekPzky9hA0bTTn2Z87uaX 7u0R79qUXi1Ip/uSPoWTA3cPo9kIxmbaOEWmrs/ImvRdFTs3pnPM+xqhLG3wXo2iiXjKdH vN360sJ79RrEx0DGa2EvbwAsvHyu/5uWChvGwhAsIipst8tmAqyDzmAd1ty9IO7heoSWkS 5lhDjGFeCthCRTr/y3kDgOKgyx6QUNvPNNPVMh4JJcldMF49PuY6oqgEcIGqsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134539; a=rsa-sha256; cv=none; b=wEyzS3CKVYP6jS/GVZ61O4bIlAMEffoYlOWrkbzqoP3P8Zp88ZT2HluC5ouEhynU+MkqJ3 O16MVh477i39jzRP9XGWSWoP32yR3jf3KF7IPUNFfi+GbAsyBgBJVkEi7OWF17KVNTyHdd SQjy7QBqPzKXf+nrAPE78H+6X7msa9MvdhqMUnFkqMWvHFqXovelb3V2lWoYEpMEmm0NeC G3orA5VIMW/jgKMZ9T1ga8fAGAeFxvRDu2+8u8mfte7GHiYlJGxkdejlq4r0q8M9AIRmgS HTehXyCcLW21UZ2IORoqP5YTkozpn0Thlo9X+fpjezFfYl4U6uHptIfA8wbvoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G6qOK4ym8h/ZJ7d1vvAfrcJYwvjglFPx52tE6iuXjpA=; b=GZqjTS9eb+mg+nD/aSrTqlh+p5aQEoRpnfx62D24EvmtD5OqVbfrdsqTWovpFZvR46kPTt B0CR2hG1wwPJQVoaaQQExrJRa4j+EtGJwLwQBfM+roTmnf5KnZAK2czsbP+B/hJLSw6Zr8 HBbAvARTv4FRuKU0cNfVecpfCL9P0Y18siQvYUXRM9F8drAxyhHAeGFBGnSp7HcpAvQdDX hd5ETHSbvAa7ctqM+smqMJp5zg5o+A8UMY91kVyj5j3ypHtm4UAdTbd9JwGmiN0eTVuI5K qzB2Veklr3ON7qEN/WPBAmbsf4qf1/o/dga1cPqeE4EsWz1PwG87eg7TtihnQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wJC3qBwzhXL for ; Sat, 25 Apr 2026 16:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 45125 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:28:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: c264355ebd72 - stable/15 - asmc: use `ASMC_FAN_FUNCS2` with the Macmini4,1 List-Id: Commits to the stable branches 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/15 X-Git-Reftype: branch X-Git-Commit: c264355ebd722e0d26e53be1e682d5084b631919 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:28:59 +0000 Message-Id: <69ecebcb.45125.1ef16741@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=c264355ebd722e0d26e53be1e682d5084b631919 commit c264355ebd722e0d26e53be1e682d5084b631919 Author: Enji Cooper AuthorDate: 2026-02-20 05:43:37 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:28:54 +0000 asmc: use `ASMC_FAN_FUNCS2` with the Macmini4,1 The Macmini4,1 model does not have "fansafespeed" support. This issue typically manifests with messages like so: ``` asmc0: asmc_key_read for key F0Sf failed 10 times, giving up ``` Swap out `ASMC_FAN_FUNCS` with `ASMC_FAN_FUNCS2` to explicitly drop "fansafespeed" checks in the driver for the model as it doesn't support that hardware feature. MFC after: 1 week Reported by: @probonopd Closes: https://github.com/helloSystem/ISO/issues/357 (cherry picked from commit 7b862cf8a252d80ab1fb90fa5371fd8462c7c16f) --- sys/dev/asmc/asmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index 58a0b573d4c9..3bbe9457dd72 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -347,7 +347,7 @@ static const struct asmc_model asmc_models[] = { { "Macmini4,1", "Apple SMC Mac mini 4,1 (Mid-2010)", ASMC_SMS_FUNCS_DISABLED, - ASMC_FAN_FUNCS, + ASMC_FAN_FUNCS2, ASMC_LIGHT_FUNCS_DISABLED, ASMC_MM41_TEMPS, ASMC_MM41_TEMPNAMES, ASMC_MM41_TEMPDESCS }, From nobody Sat Apr 25 16:29:08 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wJP2WyJz6bmDp for ; Sat, 25 Apr 2026 16:29:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wJP0SdQz44Lv for ; Sat, 25 Apr 2026 16:29:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134549; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ku4OtOGEgU6A1Toj7CYc6HbiS2mSxj0njeER7cHbQAw=; b=Vva59E6e5JqgXXIy3BCQlBEJHK5tC1m/mrZ4ZWuVVfJXvkF5LHhq/tl/4esAv3gn6GmbL/ i+1UV7L5pH0T87nkn66PSraXlke7LEmy9T1pZz8ibTZh6mAQm9RpNiMB8lzxJ7W+TR3c07 dipRBlwqeVO4vwzSp43kGeLguSbIghsZaBorvc2bla6Kq6z4wBW1NB2epdu7fMlUuKEbYp FgcZTYEyhF1XKl2qJgjp9nc2hYTeK6TqAaWUd0nwW7rG6l99Z4++ixjW8OQlbDMDsnVmZ0 dFBauXkf1fvX7chIO2E7Jy3hImorwCI9RvDWDU5NfJxdZXq/zfDfcDAqF167wA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134549; a=rsa-sha256; cv=none; b=uEKjQ9hIQwVcYx+44X08VhgxcAfnyrmtZDiWKlZgOhlybtKVan3DxirTJBkTC3stxNr7jc kh/JTF5l+7ZHt0lMr7/yWVyHG6juPWwrCuUUxYrsz61a/awQV89yeYsLXRL+CgR7taYj9D CwH9gRgYtMyYIhqVN725KMpqltKyw88JmFtTYxJXo1L9MX1H87bGqMkYddpu/HjeM0VbY2 Df+Sxv9Xaktu+/5SvPcx3rl2PKodp97MbYNB5eM/jDkxlUf6avAr5f9IjNOQReu4GEgcKg XcRvoz1xcdNcVLuc/TKlIv+sAM8BlwLCcviU3p2jL6F6qpph6CV+wMmtVGRBaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134549; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ku4OtOGEgU6A1Toj7CYc6HbiS2mSxj0njeER7cHbQAw=; b=v7m6xMordv+WsCWgh6pCZS6TdGUMN3EQjW4gbV5sxywITw3s1rwZJX+YURklgS0Xdy5Yrz 2LiGqv7tIZT5PRSF4BYjZpYQ/yZITvVUamh5BqAjJDVFfXlmnXsqSpYz/Vgv+2c8K4ZtXN T5sOF32GVMfsES7cnFGc7KL1PMa5om4ggHfEsVkCsw4YTU/BBcVe2b+vxBNn3gQTtG7g2k U/padLlv8FAKESizUQ8FmZh6J8BuOxGGNsLvIjEPPUnmJdEonkiiU8ybFZVRG6P9TQPx4J XPkjS7wengcIsSZo78fn7a6yZTWyV3qqBh4uE1Lk8vq9+9pl3U/2KKogMwZwOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wJN6sv6zhHV for ; Sat, 25 Apr 2026 16:29:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 44b70 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:29:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 41924423f7eb - stable/14 - asmc: use `ASMC_FAN_FUNCS2` with the Macmini4,1 List-Id: Commits to the stable branches 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: 41924423f7eb6e84449a37d5273598e665cd138f Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:29:08 +0000 Message-Id: <69ecebd4.44b70.4670c26c@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=41924423f7eb6e84449a37d5273598e665cd138f commit 41924423f7eb6e84449a37d5273598e665cd138f Author: Enji Cooper AuthorDate: 2026-02-20 05:43:37 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:29:03 +0000 asmc: use `ASMC_FAN_FUNCS2` with the Macmini4,1 The Macmini4,1 model does not have "fansafespeed" support. This issue typically manifests with messages like so: ``` asmc0: asmc_key_read for key F0Sf failed 10 times, giving up ``` Swap out `ASMC_FAN_FUNCS` with `ASMC_FAN_FUNCS2` to explicitly drop "fansafespeed" checks in the driver for the model as it doesn't support that hardware feature. MFC after: 1 week Reported by: @probonopd Closes: https://github.com/helloSystem/ISO/issues/357 (cherry picked from commit 7b862cf8a252d80ab1fb90fa5371fd8462c7c16f) --- sys/dev/asmc/asmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index 066b9c80de23..5620c8c42d89 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -347,7 +347,7 @@ static const struct asmc_model asmc_models[] = { { "Macmini4,1", "Apple SMC Mac mini 4,1 (Mid-2010)", ASMC_SMS_FUNCS_DISABLED, - ASMC_FAN_FUNCS, + ASMC_FAN_FUNCS2, ASMC_LIGHT_FUNCS_DISABLED, ASMC_MM41_TEMPS, ASMC_MM41_TEMPNAMES, ASMC_MM41_TEMPDESCS }, From nobody Sat Apr 25 16:29:53 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wKF3WjBz6bmDq for ; Sat, 25 Apr 2026 16:29:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wKF148wz44WD for ; Sat, 25 Apr 2026 16:29:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fDWZ0lHfZDlgHGVYidKbPr4rA/W6oG02iaVzbP/FTGg=; b=I0CvYy+86wc4/6sxAUmNBlwi5PuKaWzMgiZBAUgZq287g3X0DM8VhMmkaI9dLKcxMq2atg FhqT2/ob/jukViUyPY9QcqGfcXoh83keaw9pssEuKS586dmd8WDlaCUoj1NE4/0jvEnkcV P5FSHjIlQPKFPidN53Wvv/BQrWFrh+EVOxRNp3DbNFSGfoVCnupY+s/MYj32F20kdbxTEp uKQPNhnvZNYLP5DuyAFqg2foZLMRoZkKyoPm3DYVzcVM7OJak6wiOSB3PqUvT+QglGfMnh PI/zN11DzQGPX/eS7XKZa/zchFv8XJ3FSfe4HqbYVYbSPbGKQCOOCoLweS48dQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134593; a=rsa-sha256; cv=none; b=m6x/TLeVeC37PzjQTsBnwRTXH8N15AT0Z7zA7XXDmJnugPcQB+nKRoiBc7RucHPLKod3sW 6vu37Ctk4XpJX6Iz4Ztc7Zu+trQYVKvBt1j0kg1X7l71W/IdZzkA9AkCfHvG5lC3WLdsCL iXs0YXfGwLSGsn9YfB7I0j6sgNPgHWgTZw2M+60qRp4vox3vzuia4fBzwj1ixrhSPBGokW HhNrpS2RrvceLV1Flnyz3tLyWaEhEPiI9bG36R5sRRWfs/3A9bKo7/jk1O3xxg6MgzEE86 oXa45wZ4h8Qej+/lLJRVf3hidBkVL4gEuyECCOaA2eZrGaLmj9Y0lLLab8nVuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fDWZ0lHfZDlgHGVYidKbPr4rA/W6oG02iaVzbP/FTGg=; b=tUOtGO4jc9RPbqMSUpgwXnDEO/U8h0S0zbNYeAzue6PmnsbDMrzZeTCrh12Z9igECqJncO htSnj5Pf0NDp79ZIptvUv0kPH2rY6DEhQPhXSpWZ+1GJIOpaEvw9D/l9Ml+4B0O/t/OtUS 8ueeNIID7D8iNw5vTe+EeIqgeKX6O0bjeTHuNma/d4BrTppIlydwp/3HsbW8lKtdDHxdOj h0qSL9PLsLwBj31y1/sT55/1mwEq/i8RnY2+uPnGi6B3tByRGcP59+nWGuM8qr3NaP2R5K XMVe92lYAHhtMl5ODwt4FmGXNQJqx8dIkCSamvJYmyfCzKtZyl9fIrsrn/dfcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wKF0KjFzj0x for ; Sat, 25 Apr 2026 16:29:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4499d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:29:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Abdelkader Boudih From: Enji Cooper Subject: git: 16c9bce6ae12 - stable/15 - asmc: Convert driver to CTLFLAG_MPSAFE List-Id: Commits to the stable branches 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/15 X-Git-Reftype: branch X-Git-Commit: 16c9bce6ae1295d8068d2f1ac7db51965ee6f81d Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:29:53 +0000 Message-Id: <69ecec01.4499d.638e4ed7@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=16c9bce6ae1295d8068d2f1ac7db51965ee6f81d commit 16c9bce6ae1295d8068d2f1ac7db51965ee6f81d Author: Abdelkader Boudih AuthorDate: 2026-02-13 03:00:22 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:29:40 +0000 asmc: Convert driver to CTLFLAG_MPSAFE Replace CTLFLAG_NEEDGIANT with CTLFLAG_MPSAFE for all sysctls. The driver already uses spin mutexes (sc->sc_mtx) for hardware access protection and does not require the Giant lock. This improves scalability by allowing concurrent sysctl access without Giant serialization. Reviewed by: ngie, adrian Differential Revision: https://reviews.freebsd.org/D54613 (cherry picked from commit 1a6bdd6266e3b53c8b6b597a77a100353b7ae13a) --- sys/dev/asmc/asmc.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index 3bbe9457dd72..a2357f873ccc 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -700,49 +700,49 @@ asmc_attach(device_t dev) SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_fan_tree[i]), OID_AUTO, "id", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, j, model->smc_fan_id, "I", "Fan ID"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_fan_tree[i]), OID_AUTO, "speed", - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, j, model->smc_fan_speed, "I", "Fan speed in RPM"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_fan_tree[i]), OID_AUTO, "safespeed", - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, j, model->smc_fan_safespeed, "I", "Fan safe speed in RPM"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_fan_tree[i]), OID_AUTO, "minspeed", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, dev, j, model->smc_fan_minspeed, "I", "Fan minimum speed in RPM"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_fan_tree[i]), OID_AUTO, "maxspeed", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, dev, j, model->smc_fan_maxspeed, "I", "Fan maximum speed in RPM"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_fan_tree[i]), OID_AUTO, "targetspeed", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, dev, j, model->smc_fan_targetspeed, "I", "Fan target speed in RPM"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_fan_tree[i]), OID_AUTO, "manual", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, dev, j, asmc_mb_sysctl_fanmanual, "I", "Fan manual mode (0=auto, 1=manual)"); } @@ -758,7 +758,7 @@ asmc_attach(device_t dev) SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_temp_tree), OID_AUTO, model->smc_tempnames[i], - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, i, asmc_temp_sysctl, "I", model->smc_tempdescs[i]); } @@ -775,14 +775,14 @@ asmc_attach(device_t dev) SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_light_tree), OID_AUTO, "left", - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, 0, model->smc_light_left, "I", "Keyboard backlight left sensor"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_light_tree), OID_AUTO, "right", - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, 0, model->smc_light_right, "I", "Keyboard backlight right sensor"); @@ -790,7 +790,7 @@ asmc_attach(device_t dev) SYSCTL_CHILDREN(sc->sc_light_tree), OID_AUTO, "control", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_ANYBODY | - CTLFLAG_NEEDGIANT, dev, 0, + CTLFLAG_MPSAFE, dev, 0, model->smc_light_control, "I", "Keyboard backlight brightness control"); } @@ -808,21 +808,21 @@ asmc_attach(device_t dev) SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_sms_tree), OID_AUTO, "x", - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, 0, model->smc_sms_x, "I", "Sudden Motion Sensor X value"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_sms_tree), OID_AUTO, "y", - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, 0, model->smc_sms_y, "I", "Sudden Motion Sensor Y value"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_sms_tree), OID_AUTO, "z", - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, 0, model->smc_sms_z, "I", "Sudden Motion Sensor Z value"); From nobody Sat Apr 25 16:29:54 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wKG3ltGz6bm3V for ; Sat, 25 Apr 2026 16:29:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wKG21YDz44dc for ; Sat, 25 Apr 2026 16:29:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ujbyd6wc6FLran1GQMaF0PauL7FD8dfls6NoHoFJH/w=; b=EqozO7cBt3be6h7gkDjVi6HT7eWWErOZXkjldNpFti/vUSbArA2cac1mOEmVVdaM8/mP+s Z2pBts/Z/7R6cIZvq1NcWQNXHZxVST/FksJWUkAvwsksoPbudlqkHMogv3RzGyVn5VVpr0 zh7FGdcT3w7Wvy+lNJyhfZFDY3/o9Nvoye0Scl7f88d69E+Gqxpd828MhuJ6aEkCeZ9Exx 3rhKeYLhaqa/lUAxIfqw1TR4aLSeiDQv7+OoShczK/OYo+mbc+5Ty5VsossyEDiyY/CpYl m+kpg1U9e14Dr8Ea5jib/qguIxxj2y1Zy5x5r0xsB3W9/6FPce4XJDPdYucRlQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134594; a=rsa-sha256; cv=none; b=N1ey3Mm0EVduwxPpJCU0rMWToMgxylIPnTvzl1xzcZAeKCYXdSO5TkQfWAlQYcW2ayxt4m iI3Pon8sGAElm3aQGPBE4znsSbSmZgBjqxcGAmJ40nkJgXlP2RNRi2wmulJmlYclsU98sc KN7sxkJU1zyw0s4ApgEWdnDatfI7b67/CtVYzCKOFotOZYtnx8QrzW7lbzybg8n+L8py01 HHrwJjeKqsQEJ+ntAIylUUlTISIlkxLGb9Jhose0nc9uSrm8o7eWWLHUp/VoOK5rY+3ZNt SblwIJELe8nuegoqzF5Oy4v+Xp2lJOzsE40+qQkyXur516APksVn0Zth+E2eyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ujbyd6wc6FLran1GQMaF0PauL7FD8dfls6NoHoFJH/w=; b=sH3tMbdOPvF6cGzyzySnQIOvvDuAlss72o/9NTilXg3G8xk13/eS6O0lD+jd5VpQZ77+/x OSeMRlWjtRSPMdNDlXpoV3opdMonts3W+D55kzp7S20FNJJsYZ8GoCW3KPMfp3xH4AhAbj /8DCGLz/TbSvcx6No1OM80gPYiz0/deIzHDTucd1Oor3Nl4vShwXmmzd89shr9Hw+tlYvu YmQAwxdV076hNAv6lgyoUpYvpZhveKGA9UFWUOvFTsdEewsyO3VuXjeY13occXqm0qirin Lru5WkzZE6oDOQcLCayfr1ZfGYvJoI+XTJhGXXpoh5B1xjuKi4YxkSumKUkUMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wKG0gqszhXN for ; Sat, 25 Apr 2026 16:29:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 433dd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:29:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Abdelkader Boudih From: Enji Cooper Subject: git: 3c4d1f5f81e8 - stable/15 - asmc: Add MacPro3,1 temperature sensor 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/15 X-Git-Reftype: branch X-Git-Commit: 3c4d1f5f81e82b641413af58dc88cf2c47378b30 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:29:54 +0000 Message-Id: <69ecec02.433dd.6cf28e4@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=3c4d1f5f81e82b641413af58dc88cf2c47378b30 commit 3c4d1f5f81e82b641413af58dc88cf2c47378b30 Author: Abdelkader Boudih AuthorDate: 2026-02-15 01:44:50 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:29:40 +0000 asmc: Add MacPro3,1 temperature sensor support Test and verified with Sonicblue7 Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D54952 (cherry picked from commit 90d79dd549461dac053b34d47ae32968afb2834c) --- sys/dev/asmc/asmc.c | 9 +++++++ sys/dev/asmc/asmcvar.h | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index a2357f873ccc..be5b4b9ca911 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -417,6 +417,15 @@ static const struct asmc_model asmc_models[] = { ASMC_MP1_TEMPS, ASMC_MP1_TEMPNAMES, ASMC_MP1_TEMPDESCS }, + /* Idem for the Mac Pro (Early 2008) */ + { + "MacPro3,1", "Apple SMC Mac Pro (Early 2008)", + NULL, NULL, NULL, + ASMC_FAN_FUNCS, + NULL, NULL, NULL, + ASMC_MP31_TEMPS, ASMC_MP31_TEMPNAMES, ASMC_MP31_TEMPDESCS + }, + /* Idem for the Mac Pro (8-core) */ { "MacPro2", "Apple SMC Mac Pro (8-core)", diff --git a/sys/dev/asmc/asmcvar.h b/sys/dev/asmc/asmcvar.h index d216fd1416e4..5afc1012849c 100644 --- a/sys/dev/asmc/asmcvar.h +++ b/sys/dev/asmc/asmcvar.h @@ -764,6 +764,75 @@ struct asmc_softc { "Power Supply, Location 2", \ "Tv0S", "Tv1S", } +#define ASMC_MP31_TEMPS { "TA0P", \ + "TC0C", "TC0D", "TC0P", \ + "TC1C", "TC1D", \ + "TC2C", "TC2D", \ + "TC3C", "TC3D", \ + "TCAG", "TCAH", "TCBG", "TCBH", \ + "TH0P", "TH1P", "TH2P", "TH3P", \ + "TM0P", "TM0S", "TM1P", "TM1S", \ + "TM2P", "TM2S", "TM3S", \ + "TM8P", "TM8S", "TM9P", "TM9S", \ + "TMAP", "TMAS", "TMBS", \ + "TN0C", "TN0D", "TN0H", \ + "TS0C", \ + "Tp0C", "Tp1C", \ + "Tv0S", "Tv1S", NULL } + +#define ASMC_MP31_TEMPNAMES { "ambient", \ + "cpu_core0", "cpu_diode0", "cpu_a_proximity", \ + "cpu_core1", "cpu_diode1", \ + "cpu_core2", "cpu_diode2", \ + "cpu_core3", "cpu_diode3", \ + "cpu_a_pkg", "cpu_a_heatsink", \ + "cpu_b_pkg", "cpu_b_heatsink", \ + "hdd_bay0", "hdd_bay1", \ + "hdd_bay2", "hdd_bay3", \ + "mem_riser_a_prox0", "mem_riser_a_slot0", \ + "mem_riser_a_prox1", "mem_riser_a_slot1", \ + "mem_riser_a_prox2", "mem_riser_a_slot2", \ + "mem_riser_a_slot3", \ + "mem_riser_b_prox0", "mem_riser_b_slot0", \ + "mem_riser_b_prox1", "mem_riser_b_slot1", \ + "mem_riser_b_prox2", "mem_riser_b_slot2", \ + "mem_riser_b_slot3", \ + "northbridge_core", "northbridge_diode", \ + "northbridge_heatsink", \ + "expansion_slots", \ + "power_supply0", "power_supply1", \ + "vrm0", "vrm1", } + +#define ASMC_MP31_TEMPDESCS { "Ambient Air", \ + "CPU Core 1", "CPU Diode 1", \ + "CPU A Proximity", \ + "CPU Core 2", "CPU Diode 2", \ + "CPU Core 3", "CPU Diode 3", \ + "CPU Core 4", "CPU Diode 4", \ + "CPU A Package", "CPU A Heatsink", \ + "CPU B Package", "CPU B Heatsink", \ + "Hard Drive Bay 1", "Hard Drive Bay 2", \ + "Hard Drive Bay 3", "Hard Drive Bay 4", \ + "Memory Riser A, Proximity 1", \ + "Memory Riser A, Slot 1", \ + "Memory Riser A, Proximity 2", \ + "Memory Riser A, Slot 2", \ + "Memory Riser A, Proximity 3", \ + "Memory Riser A, Slot 3", \ + "Memory Riser A, Slot 4", \ + "Memory Riser B, Proximity 1", \ + "Memory Riser B, Slot 1", \ + "Memory Riser B, Proximity 2", \ + "Memory Riser B, Slot 2", \ + "Memory Riser B, Proximity 3", \ + "Memory Riser B, Slot 3", \ + "Memory Riser B, Slot 4", \ + "Northbridge Core", "Northbridge Diode", \ + "Northbridge Heatsink", \ + "Expansion Slots", \ + "Power Supply 1", "Power Supply 2", \ + "VRM 1", "VRM 2", } + #define ASMC_MP2_TEMPS { "TA0P", "TCAG", "TCAH", "TCBG", "TCBH", \ "TC0C", "TC0D", "TC0P", "TC1C", "TC1D", \ "TC2C", "TC2D", "TC3C", "TC3D", "THTG", \ From nobody Sat Apr 25 16:30:05 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wKT6FSvz6bm4r for ; Sat, 25 Apr 2026 16:30:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wKT2mPfz44kC for ; Sat, 25 Apr 2026 16:30:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nEGZaZwBUvpuMHcXgIMYDBsJEc4JBBpV9RQkrJ+ps/c=; b=pttkZIeeclT3Ql5PY4PQkzwlu5vZmwdBtzuGpz+gzwCc9nFuxx89kUpu9hFlHlyYE7QNlu nY4nDz9/y0uecCFVXxfXMFzbXiRZN6pWLclWSEyMFQlxz87LlK2fDzr6hKeufBNG4VTSQw H4YAvyspIdXSKYt1TKPxboMvejpBhB5cMfi2ueS8HQfof3xQtSkRC+/8oA/ygZQNb6QA+v npuPEZE87/7T/CY3aHgsBEw0dv+OB/a5ek1htO1Wu9safB+pcSQ2moqzxFhEILRrc19TU2 rl6MGdS5jz6alFYq9S4MVLr9YHLwtqfq9L0YZPjjAa1SzyRyLphbkwySy1YtQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134605; a=rsa-sha256; cv=none; b=iF1m1iM0/pMKKk8I90IRxOQD0BsRGz1ldDTSBzieO8opICSid9KAfmAgsopYz/UmG7Tx3e a9NbGmqoC7PcqDqgKIpatbBgcP3lc0QUOLBRbNOhvd/anqDRgnxLP5wiJOyBsIa1FFCvrR O5J0UYAMxqUf4IE6tC+o3GwcrEG8eZeM9ex6oK+NA07WqRtQ/uuhxDgJR3q9EuroLokoeo 2k7PbPjJlDZZsIP9Oys4hxoACJIt/71jYWWMn9jdAX0mnUfFbpDVLISNaYcC2pV0ZxhSS0 1DwbmIknJ3p3hggslEAAjmG32hxHF6pliw3H9muxMTu4l1ZU4KiKKunYw9Iy7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nEGZaZwBUvpuMHcXgIMYDBsJEc4JBBpV9RQkrJ+ps/c=; b=oqkhZC3dV6enX0zDq/sMMgNtfvZbS8c4fieY83d7I9FfuIZfmja138e8BD2HmBzkbDch7V 0VLLoUd7b3s4gmpVaRAaw52VEoBIX9phlDAcdFaeG+GvcpiS/0UyrPN12Ie4TOHSA6U7sW p9QkRCPs5T7LCeMtq+CMGtNR8J8OCAbGOgwqFPGhQxbafeQh5zafgE838o//9NtyUcXOwr 2Y60jkEBkgoZPf0lo2ec2/F1zK2k/X/KlVHpbUYH4oKMeG76vswwRtH96kRB0y/I+R/y6X kYhHCBxmm/V3huD+YdPiG9w726rT8nuDJA3iZ3EKN8lG61SwBivd8xF6/rf/UA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wKT2KCXzhm9 for ; Sat, 25 Apr 2026 16:30:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 44bc2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:30:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Abdelkader Boudih From: Enji Cooper Subject: git: 4dd720279f86 - stable/14 - asmc: Convert driver to CTLFLAG_MPSAFE List-Id: Commits to the stable branches 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: 4dd720279f867c73c5ddbfbad926f4be1b5f1299 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:30:05 +0000 Message-Id: <69ecec0d.44bc2.1126ad26@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=4dd720279f867c73c5ddbfbad926f4be1b5f1299 commit 4dd720279f867c73c5ddbfbad926f4be1b5f1299 Author: Abdelkader Boudih AuthorDate: 2026-02-13 03:00:22 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:29:59 +0000 asmc: Convert driver to CTLFLAG_MPSAFE Replace CTLFLAG_NEEDGIANT with CTLFLAG_MPSAFE for all sysctls. The driver already uses spin mutexes (sc->sc_mtx) for hardware access protection and does not require the Giant lock. This improves scalability by allowing concurrent sysctl access without Giant serialization. Reviewed by: ngie, adrian Differential Revision: https://reviews.freebsd.org/D54613 (cherry picked from commit 1a6bdd6266e3b53c8b6b597a77a100353b7ae13a) --- sys/dev/asmc/asmc.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index 5620c8c42d89..494cb7d75593 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -699,49 +699,49 @@ asmc_attach(device_t dev) SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_fan_tree[i]), OID_AUTO, "id", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, j, model->smc_fan_id, "I", "Fan ID"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_fan_tree[i]), OID_AUTO, "speed", - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, j, model->smc_fan_speed, "I", "Fan speed in RPM"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_fan_tree[i]), OID_AUTO, "safespeed", - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, j, model->smc_fan_safespeed, "I", "Fan safe speed in RPM"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_fan_tree[i]), OID_AUTO, "minspeed", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, dev, j, model->smc_fan_minspeed, "I", "Fan minimum speed in RPM"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_fan_tree[i]), OID_AUTO, "maxspeed", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, dev, j, model->smc_fan_maxspeed, "I", "Fan maximum speed in RPM"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_fan_tree[i]), OID_AUTO, "targetspeed", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, dev, j, model->smc_fan_targetspeed, "I", "Fan target speed in RPM"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_fan_tree[i]), OID_AUTO, "manual", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, dev, j, asmc_mb_sysctl_fanmanual, "I", "Fan manual mode (0=auto, 1=manual)"); } @@ -757,7 +757,7 @@ asmc_attach(device_t dev) SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_temp_tree), OID_AUTO, model->smc_tempnames[i], - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, i, asmc_temp_sysctl, "I", model->smc_tempdescs[i]); } @@ -774,14 +774,14 @@ asmc_attach(device_t dev) SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_light_tree), OID_AUTO, "left", - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, 0, model->smc_light_left, "I", "Keyboard backlight left sensor"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_light_tree), OID_AUTO, "right", - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, 0, model->smc_light_right, "I", "Keyboard backlight right sensor"); @@ -789,7 +789,7 @@ asmc_attach(device_t dev) SYSCTL_CHILDREN(sc->sc_light_tree), OID_AUTO, "control", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_ANYBODY | - CTLFLAG_NEEDGIANT, dev, 0, + CTLFLAG_MPSAFE, dev, 0, model->smc_light_control, "I", "Keyboard backlight brightness control"); } @@ -807,21 +807,21 @@ asmc_attach(device_t dev) SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_sms_tree), OID_AUTO, "x", - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, 0, model->smc_sms_x, "I", "Sudden Motion Sensor X value"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_sms_tree), OID_AUTO, "y", - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, 0, model->smc_sms_y, "I", "Sudden Motion Sensor Y value"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_sms_tree), OID_AUTO, "z", - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, 0, model->smc_sms_z, "I", "Sudden Motion Sensor Z value"); From nobody Sat Apr 25 16:30:06 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wKV60LPz6bmCD for ; Sat, 25 Apr 2026 16:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wKV3GNvz44pj for ; Sat, 25 Apr 2026 16:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KW4Xea/TaH39G8ig7xkxKxTj7AF/A69svOIvQnf9Clw=; b=Eo8SAEs5t0NXH3XRV6yZ2wvUCTV25WfKi+i9oeuB9wF/Cray5X2NtApZ0DKID4S0uzTY6t fGzvtAcbwiL6e8eCHLKrjb+apssjEvh+YTjnzLoG5/56O0ZY66civ4jGK9u83wOp7kYaln GpdT4cqfDCUydLnSt3wO6zGGCl5vF3tPbORO7MmhiFa2Fr4fLgXq4eXzYxfR8oD/Bk1mgR /RgTxxeClNO22405zr/UKYpC5vLWXd9CUhjh3uXLRZbVSW6bijmawz/FUpFyrF5p3Xgr/a yl1Sm/JNtowuAxcAHphuay6Fdg9BAuI7ZY8oxZAvJARVMNA45n+jrXKHsNDLbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134606; a=rsa-sha256; cv=none; b=cUyCwQs8M6lZ1EDZuAbJc7hb/CQgyWsNOngZnvZlU9Tfwvai+53n74Qp1PIikOwssGvkEp Xc5aNR6K3NN4ks2JCEm2iIvbMBoP6rC3+fE9nmo/2G/VC/UvqPF0KlRWWVv0MKW8UwWYkF H9IY+brQS3jfqwQgBBh357s9/1CFNNydX+Larm3z48eN+v6SXmze0AcvXt1T5RE/67yYW9 TwuuQlMVrj2Ni8Oh/ckOUqCTQnZjNKaBVSl9rUpzy3pEDK0kBImSVrkzNN5s6dx0wUqr4a 0wMr8mkfKh0xtfiSwN2QPJ/W8/CBnyYEj8LAtMWe9boIznTpMIRdJKihsd/QdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KW4Xea/TaH39G8ig7xkxKxTj7AF/A69svOIvQnf9Clw=; b=gOGiPcT+o7THWuNuqvxxYZ9QAm8vooG7dmgrtuwOwvTGmQ3fGfaG5aVipL5phhjrYns3l6 LnU12GeR8At42ESmF9/XzPL2bw3AoXQqyGSOQwCnmfjQfoYPODwYSHuJV4+gZJ2mdicDG8 ua9Pow1fxwPey9cA3aP/UBoVtBGXWupRszml95bL1i/72rzn1+dxWWEXxhbOfBmNhih7lI NcX+BjgRBjthx3kx6iIiBfrcaQRxkOfEUH5A0705mnZJUE5BG9mzURos78gE6TZB9ptH1L PADdwWIy3efdux5t566ZmyuE9zX66nmxXEVkkFqQWWSLfnWy+TzPU/ULpPknNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wKV2jpyzhmB for ; Sat, 25 Apr 2026 16:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42474 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:30:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Abdelkader Boudih From: Enji Cooper Subject: git: 833df8dabb6b - stable/14 - asmc: Add MacPro3,1 temperature sensor 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/14 X-Git-Reftype: branch X-Git-Commit: 833df8dabb6bb5f6e87ee6ef11110165af298433 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:30:06 +0000 Message-Id: <69ecec0e.42474.3a5649e2@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=833df8dabb6bb5f6e87ee6ef11110165af298433 commit 833df8dabb6bb5f6e87ee6ef11110165af298433 Author: Abdelkader Boudih AuthorDate: 2026-02-15 01:44:50 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:29:59 +0000 asmc: Add MacPro3,1 temperature sensor support Test and verified with Sonicblue7 Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D54952 (cherry picked from commit 90d79dd549461dac053b34d47ae32968afb2834c) --- sys/dev/asmc/asmc.c | 9 +++++++ sys/dev/asmc/asmcvar.h | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index 494cb7d75593..f43cced30755 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -417,6 +417,15 @@ static const struct asmc_model asmc_models[] = { ASMC_MP1_TEMPS, ASMC_MP1_TEMPNAMES, ASMC_MP1_TEMPDESCS }, + /* Idem for the Mac Pro (Early 2008) */ + { + "MacPro3,1", "Apple SMC Mac Pro (Early 2008)", + NULL, NULL, NULL, + ASMC_FAN_FUNCS, + NULL, NULL, NULL, + ASMC_MP31_TEMPS, ASMC_MP31_TEMPNAMES, ASMC_MP31_TEMPDESCS + }, + /* Idem for the Mac Pro (8-core) */ { "MacPro2", "Apple SMC Mac Pro (8-core)", diff --git a/sys/dev/asmc/asmcvar.h b/sys/dev/asmc/asmcvar.h index d216fd1416e4..5afc1012849c 100644 --- a/sys/dev/asmc/asmcvar.h +++ b/sys/dev/asmc/asmcvar.h @@ -764,6 +764,75 @@ struct asmc_softc { "Power Supply, Location 2", \ "Tv0S", "Tv1S", } +#define ASMC_MP31_TEMPS { "TA0P", \ + "TC0C", "TC0D", "TC0P", \ + "TC1C", "TC1D", \ + "TC2C", "TC2D", \ + "TC3C", "TC3D", \ + "TCAG", "TCAH", "TCBG", "TCBH", \ + "TH0P", "TH1P", "TH2P", "TH3P", \ + "TM0P", "TM0S", "TM1P", "TM1S", \ + "TM2P", "TM2S", "TM3S", \ + "TM8P", "TM8S", "TM9P", "TM9S", \ + "TMAP", "TMAS", "TMBS", \ + "TN0C", "TN0D", "TN0H", \ + "TS0C", \ + "Tp0C", "Tp1C", \ + "Tv0S", "Tv1S", NULL } + +#define ASMC_MP31_TEMPNAMES { "ambient", \ + "cpu_core0", "cpu_diode0", "cpu_a_proximity", \ + "cpu_core1", "cpu_diode1", \ + "cpu_core2", "cpu_diode2", \ + "cpu_core3", "cpu_diode3", \ + "cpu_a_pkg", "cpu_a_heatsink", \ + "cpu_b_pkg", "cpu_b_heatsink", \ + "hdd_bay0", "hdd_bay1", \ + "hdd_bay2", "hdd_bay3", \ + "mem_riser_a_prox0", "mem_riser_a_slot0", \ + "mem_riser_a_prox1", "mem_riser_a_slot1", \ + "mem_riser_a_prox2", "mem_riser_a_slot2", \ + "mem_riser_a_slot3", \ + "mem_riser_b_prox0", "mem_riser_b_slot0", \ + "mem_riser_b_prox1", "mem_riser_b_slot1", \ + "mem_riser_b_prox2", "mem_riser_b_slot2", \ + "mem_riser_b_slot3", \ + "northbridge_core", "northbridge_diode", \ + "northbridge_heatsink", \ + "expansion_slots", \ + "power_supply0", "power_supply1", \ + "vrm0", "vrm1", } + +#define ASMC_MP31_TEMPDESCS { "Ambient Air", \ + "CPU Core 1", "CPU Diode 1", \ + "CPU A Proximity", \ + "CPU Core 2", "CPU Diode 2", \ + "CPU Core 3", "CPU Diode 3", \ + "CPU Core 4", "CPU Diode 4", \ + "CPU A Package", "CPU A Heatsink", \ + "CPU B Package", "CPU B Heatsink", \ + "Hard Drive Bay 1", "Hard Drive Bay 2", \ + "Hard Drive Bay 3", "Hard Drive Bay 4", \ + "Memory Riser A, Proximity 1", \ + "Memory Riser A, Slot 1", \ + "Memory Riser A, Proximity 2", \ + "Memory Riser A, Slot 2", \ + "Memory Riser A, Proximity 3", \ + "Memory Riser A, Slot 3", \ + "Memory Riser A, Slot 4", \ + "Memory Riser B, Proximity 1", \ + "Memory Riser B, Slot 1", \ + "Memory Riser B, Proximity 2", \ + "Memory Riser B, Slot 2", \ + "Memory Riser B, Proximity 3", \ + "Memory Riser B, Slot 3", \ + "Memory Riser B, Slot 4", \ + "Northbridge Core", "Northbridge Diode", \ + "Northbridge Heatsink", \ + "Expansion Slots", \ + "Power Supply 1", "Power Supply 2", \ + "VRM 1", "VRM 2", } + #define ASMC_MP2_TEMPS { "TA0P", "TCAG", "TCAH", "TCBG", "TCBH", \ "TC0C", "TC0D", "TC0P", "TC1C", "TC1D", \ "TC2C", "TC2D", "TC3C", "TC3D", "THTG", \ From nobody Sat Apr 25 16:31:39 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wMJ0qhHz6bmCr for ; Sat, 25 Apr 2026 16:31:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wMH5D1Bz45lP for ; Sat, 25 Apr 2026 16:31:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vy8kN1MHhs5RRHg64qi8dWZhTOBfEkP9S8H3iOJvUZo=; b=sNnEu9vxudTCgLADgL6D8Mg4yPBMYSxp3PBmCKtF4wfUoe8JwriQaR9CnxjY59URSTuTWq VT1o1p7e6886foiwRaTM1ED672s03KSWmCF/UUs6FDzdaPwlC6NbjgnBzk11q4G43ELYwO 05fPnC0fZ3Lnyv2Z6OPCz/Hs+tpvPqkeqP7zues4irZKyZRPmkbaiHEJDqi/7KrxDkB4fQ kbQ1TwnA1kT/0ExWER0SFkTNbHJ0uJ0CRyAXFf4lm4DYhfvyuFUO9Ul4lbWT3f3nKKuzmR IFEvqVpPIkuxjKsyuxqDtgfiEFHT7P85tlduERdGYO/g2lAuOs6jFL65WzQQgQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134699; a=rsa-sha256; cv=none; b=xXd0xEWncD4vPgTHFo//HZSKjNR3kng3nymsQQN+tr3F4tIMZeoi/nQkM/ax51mi5o+cZA ulTBUiG1EQ6K9RzxhhKoL1+fE1bZM9vudsd1VZmJBa7iP0o/h3UUfLO74dbhYX70bVdrRI sgUXaUhBrKAHG9vf19ev0hQE6GwsO0IWLTOPUjSyony747WPqvKL+NG2QWgRjlyYFgqc/9 komGazDWGo38n0BBKAmC9h/ut7TvKJGfhdAS3pnc+QN8kI3AYy0dFPHDt9/b20umiavqJk SFlcx/4bexHdDFFYcywvcjMmmR93eZeFGr7A9fT41DRN+YYBGnf+ZUF0a/fNMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vy8kN1MHhs5RRHg64qi8dWZhTOBfEkP9S8H3iOJvUZo=; b=i8CtPEHIpVo2PG2myMp2+8F66uLSHAJznco/Ato/2vSXb1KCeQXYpmTJ++WMAYGsyy+XZD EMZ2yEW9AIum2EvRXwk4wke1PMzL0jyUte2aE+uT4agN1XhWqZZ8qzuwfOMhybzULew8oY hQg2XrpLNcVKeeaMBOf5qfAVSXYYtMgZBDeMlki1mB4oA2OHmslY2oQwk7nBFtoy4srq5b TuA80v0glS6WEa76MKuUbl/gD/FNKmL+lMN9qnqHZWBZ1vFXBGi4hUlNu6t0kB3bFxUNBD chO1c2dbQfRMtAaJ7JGkqESkSOCVY/ArW4585kcg+BlMaXF7WMB2EiKLMC6WGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wMH4h0HzhpC for ; Sat, 25 Apr 2026 16:31:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 45bec by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:31:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 079bfe2a372f - stable/14 - .gitignore: ignore additional unwanted 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: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 079bfe2a372fb9000e2573f4135537e2b0c3adda Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:31:39 +0000 Message-Id: <69ecec6b.45bec.5d0f1f24@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=079bfe2a372fb9000e2573f4135537e2b0c3adda commit 079bfe2a372fb9000e2573f4135537e2b0c3adda Author: Enji Cooper AuthorDate: 2026-02-04 07:39:03 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:31:33 +0000 .gitignore: ignore additional unwanted files Ignore more files generated by toolchains, e.g., `.pico`, etc. Ignore the `.DS_Store` produced by macOS as well because all they provide is additional file metadata that shouldn't be committed to `git`. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55096 (cherry picked from commit 4544f34f2d30ee63ab1eec9fa52c31bd92d457ca) --- .gitignore | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitignore b/.gitignore index ffa366fde357..220afda3b2ce 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,17 @@ *.a *.core +*.lo +*.nossppico *.o *.orig +*.pico +*.pieo +*.po +# Don't ignore translation files under `contrib/...`. +!contrib/**/po *.rej *.so +*.so.[0-9]* *.sw[nop] *~ _.tinderbox.* @@ -14,6 +22,8 @@ _.arm64.* _.i386.* _.powerpc.* _.riscv.* +.*DS_Store +.depend* GPATH GRTAGS GTAGS From nobody Sat Apr 25 16:31:48 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wMT06vnz6bmCv for ; Sat, 25 Apr 2026 16:31:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wMS5z9yz461Y for ; Sat, 25 Apr 2026 16:31:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P2frmw8ngXrFKi/r5FVVFK5+S+kWIyGVGhbCEh6KNYI=; b=Nufgr91c/d2RCKZPHxS59eUOez77E1rbJM95nc6Fi92irVvHxWMLRimZCQ/OPlZpYO8qf1 po6fP5iO6jLCef+yeLxATn3n2Mw5nGYNy8HigRkkx16X1iY35r6PRYhSY5SjUjZ1JCrrq0 ODF4rUopxnmAWltUMSntL6U+L+8Zz5nwhqy1RxN7P04+G3LWaQfg/B4hiK+49pU9EMuRg/ fFnoXwcZMXo/fSDRi2d13S/aVO13Ps5re25jFMbhRxKJ63x8fbml5yCWr2RqxrsgVTIzuR lqfTHfQCe0ZwkaOisyUIyyPTzocue500mXCCT73qSaPgNkieRGjo1ad3aT4vwQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134708; a=rsa-sha256; cv=none; b=tAXdKuqVYWS+FNHsZKmbZiIQjVu3AwiaZTuAlSIWO7iXVPRWmDAwdUJU+I3gCvkhG43f2a hUe3bsbesChid5Cs9l71y0ka1xbEzkPXjUIQVUpAq2ti/TKggxqqxAWP2R0kiOdQH3iWac t3h/PBQnh1i5a4cnkjvgkYfkPx8tsCcb4hE9+YmZBqSqIpKhbg8kRnMaII4B5IxuFA5S/1 5Pt2wJ4IoEZaRxzdA4AwKpCOMsaDGknfYlwu8ZN/di7+w/fvZHUlcMWpF8nnckP4+1USYv GVBlWooc0k6m5SopJHeR4LTcIi0K5OtJNkOjJTxyzXFUInBwNwdYN/0KL7sdrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P2frmw8ngXrFKi/r5FVVFK5+S+kWIyGVGhbCEh6KNYI=; b=pGimEY6h2sR5tfVlqK9l0++4JUv8NvengWJ1VyHfRW1jvS0egdA73D6W9vAsqxJYLAnu3p HQD7Q6hSqIlhu6rK9Fjou0UbUdeq0I6o2hU9R7i7ybi4zLI6hVTb1nXUV5j2o4nvDgTtxy 3ObtIQuZR950+qdt3DEmXZQm21F+Ud6pSRxZPaj+ooPnreHjdJQ5Cre8a7qvNLjBPizvSZ M5+QOVsvtaOI7mO2seikiYwH09An5bGOkNuwafP6Yt2GcOFNiMWVX5zpBu90p5pLyGQphk DkKAxs0XkWZ72YMDr8dkb5PJH3rVjQZZDrOjpyjUN5TGiG7vWwVsugfNKIrZMw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wMS5J5Nzj39 for ; Sat, 25 Apr 2026 16:31:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 453b1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:31:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 68511df3b526 - stable/15 - .gitignore: ignore additional unwanted 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: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 68511df3b5266adc3dce9580fe33940ceec142e6 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:31:48 +0000 Message-Id: <69ecec74.453b1.2381d071@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=68511df3b5266adc3dce9580fe33940ceec142e6 commit 68511df3b5266adc3dce9580fe33940ceec142e6 Author: Enji Cooper AuthorDate: 2026-02-04 07:39:03 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:31:43 +0000 .gitignore: ignore additional unwanted files Ignore more files generated by toolchains, e.g., `.pico`, etc. Ignore the `.DS_Store` produced by macOS as well because all they provide is additional file metadata that shouldn't be committed to `git`. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55096 (cherry picked from commit 4544f34f2d30ee63ab1eec9fa52c31bd92d457ca) --- .gitignore | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitignore b/.gitignore index a53a26f16d4f..91a9252d80f3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,17 @@ *.a *.core +*.lo +*.nossppico *.o *.orig +*.pico +*.pieo +*.po +# Don't ignore translation files under `contrib/...`. +!contrib/**/po *.rej *.so +*.so.[0-9]* *.sw[nop] *~ _.tinderbox.* @@ -14,6 +22,8 @@ _.arm64.* _.i386.* _.powerpc.* _.riscv.* +.*DS_Store +.depend* GPATH GRTAGS GTAGS From nobody Sat Apr 25 16:32:18 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wN254VQz6bmcr for ; Sat, 25 Apr 2026 16:32:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wN24TCpz46gR for ; Sat, 25 Apr 2026 16:32:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1kybdYphXCl6WNQWQ6zjSaDcBeAl0H1TkUtiFvgi5Mg=; b=P4ZhCi6nRHx5dMld4VQ81QitYk7+vJbtphU4/Tw/GD68qgXIMsF63HWNvEBCcxVVd1mDDV 6BO1IM/ikOkXm8LkiXWcKB2sxjKWzWxPAgfpLxptT7kUzsu1l8jQxQOVXIWhHZxKumbHqm jEq3Fc1zYf85xKWDJ2T7z2jKHTVnUJsXDDwPWOn15SQEXm+SSg7ewKscuizMEhHm2kgaB9 ZgJQ+7XFUkmCCOAobs0baSdhVQyOzoBht/A1jwjxFYk5iErO8rUTRIDTcDSScTxDXM2g9P 9s9VAu479BksUOKKsShMl4oZlBO+EXrS50trLivJ6W9FSPJeY5JtzXjqYCHfng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134738; a=rsa-sha256; cv=none; b=mR1XAx8zTfFcY2neLQd37ytGo6cCT+4MF5T1H1pIFDwp+YLt6Z+esXzhFMt/DqxMIeMgJ+ FJrxWyq8kwYUGMs6dJZd3naWc1/yUNCVgIBLLaeH5UodDaoKG1gPoAFnDfoWibMJOvmbZm 3vw96z/u8PZgsZj3Yg3LeUTnjNApNGjWsMaFRybO7+DGeArJYj62P+oQiIQ46GHh41XaVA 9erepuLuYCpL3hYwMnioFbd133l1Zoye0e28LAbHS7t2Afwz1TA0kdAGy8ZejhL9tAfpuP cxjGRYGtvUHGnN4bWszCLHME2hbyenS7uR2xgmo1Tc5BBYQGAyeZ71DCh8K4kQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1kybdYphXCl6WNQWQ6zjSaDcBeAl0H1TkUtiFvgi5Mg=; b=rTRx5nVml7S0bmW7yLY1KN63fRIucqBBaMzj5BCG4hvVyg8vwaekhfQhRHVjDJW1N/zUKW 2P6PDLCzRiWFItUedfrI0wI3ca6oX4Zwje8AZq4BCpY2thALbCGUh+VKgnsJ9AS8qfP324 2KPjJKxqqj9tnrQzfgUgI+DJvOM62c3TV3qgPOVTOA2teC4+7LjTR2hJVGuOwPw2luPDd+ zt/Ak5ix5CBy6qpZX6CWqB7ZAvODs1czoHmGCrfM5gKg+PiCQhVbvW9cre6NA3arHeefzA lJHAIJXVIu6d4pVt/bUb3kJp7cPA1Sv5+49oK9ltITlFlSdVyLEHB77lidrHeA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wN23XNHzj1q for ; Sat, 25 Apr 2026 16:32:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4614e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:32:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: f8162575f211 - stable/15 - libnetbsd: add math.h and sys/time.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: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f8162575f2114c26e52753ece0fac9738b97a79e Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:32:18 +0000 Message-Id: <69ecec92.4614e.72c4489c@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=f8162575f2114c26e52753ece0fac9738b97a79e commit f8162575f2114c26e52753ece0fac9738b97a79e Author: Enji Cooper AuthorDate: 2026-02-25 23:19:56 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:32:11 +0000 libnetbsd: add math.h and sys/time.h - `math.h`: `isinff(..)` - `sys/time.h`: `timespec*(x)` These two headers are used by tests in newer snapshots of `contrib/netbsd-tests`. MFC after: 1 week (cherry picked from commit 2a6c2d9c38dc421025b6c18cac68fe9965c574c0) --- lib/libnetbsd/math.h | 14 ++++++++++++++ lib/libnetbsd/sys/time.h | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/lib/libnetbsd/math.h b/lib/libnetbsd/math.h new file mode 100644 index 000000000000..bffc94f82d67 --- /dev/null +++ b/lib/libnetbsd/math.h @@ -0,0 +1,14 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2026 Enji Cooper + */ + +#ifndef __LIBNETBSD_MATH_H__ +#define __LIBNETBSD_MATH_H__ + +#include_next + +#define isinff(x) __isinff(x) + +#endif diff --git a/lib/libnetbsd/sys/time.h b/lib/libnetbsd/sys/time.h new file mode 100644 index 000000000000..9ddde16e84e3 --- /dev/null +++ b/lib/libnetbsd/sys/time.h @@ -0,0 +1,35 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2026 Enji Cooper + */ + +#ifndef _LIBNETBSD_SYS_TIME_H_ +#define _LIBNETBSD_SYS_TIME_H_ + +#include_next + +#define timercmp(tvp, uvp, cmp) \ + (((tvp)->tv_sec == (uvp)->tv_sec) ? \ + ((tvp)->tv_usec cmp (uvp)->tv_usec) : \ + ((tvp)->tv_sec cmp (uvp)->tv_sec)) +#define timespecadd(tsp, usp, vsp) \ + do { \ + (vsp)->tv_sec = (tsp)->tv_sec + (usp)->tv_sec; \ + (vsp)->tv_nsec = (tsp)->tv_nsec + (usp)->tv_nsec; \ + if ((vsp)->tv_nsec >= 1000000000L) { \ + (vsp)->tv_sec++; \ + (vsp)->tv_nsec -= 1000000000L; \ + } \ + } while (0) +#define timespecsub(tsp, usp, vsp) \ + do { \ + (vsp)->tv_sec = (tsp)->tv_sec - (usp)->tv_sec; \ + (vsp)->tv_nsec = (tsp)->tv_nsec - (usp)->tv_nsec; \ + if ((vsp)->tv_nsec < 0) { \ + (vsp)->tv_sec--; \ + (vsp)->tv_nsec += 1000000000L; \ + } \ + } while (0) + +#endif From nobody Sat Apr 25 16:32:19 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wN3694hz6bm9k for ; Sat, 25 Apr 2026 16:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wN34MLVz46d2 for ; Sat, 25 Apr 2026 16:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2A0gz4TS4nfr61Qotla1d0ay84z/i663BfpyAJkMFxs=; b=WzVA7cbPq+IJ15O81VImT3u3x4eB9OnjavJq1E1AuGn09B41SVD8UZ7VYno8gI4Tuy+CVe 0y+wMVlBwldsOr749JgUWl/EmmuHtKVsyykRe0Phfr2maZYj9d6CeidDtFSV1mRWsM0NCe C39lDfF9ECmqenBOqbXn7KEVi0MkdafyrmLQGACvmah0hy0/nstFKuWy/GhNLU7hMsVchk U0YqeYfKNCudddESd+2595m/7TJZw3mI+a35NKCtgaUZzPRBgeYxxBc08SodY3mHu1iVRy lW91bfMSrILRvvo+ZRF54fNePfejkoYV4ZsiXLmb/jcaVktVvxb1wooe45AZWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134739; a=rsa-sha256; cv=none; b=CJJHKHG2klbO6DTrdYpacKsLeaNdBTOJgb6q7smk+TC8uj3d75BE33FnADGlNylKVBs1az 0xRwBle5OW0Tt7YYreyDTqXmczFKAkQxiBc85K4XvxVNYW/W4nQ4iVlMtiLGuPBrsUIjei 5D6Jfa2XSDFBBwUeXmhHNxQIQpvunm3Epo8xIDwlCmkfOr9oM6fsk33mX7bwckZ+b53BOs GZxg73is3OoQE+e879csoXENXuWdq1u54nstindyGG4Gyji7865N8MDhTRRGUVRrWnS62B NX1Rwde23QTjLM1eCzpWXeCR8fmSJwQ0dF0zcOihETKr8NTjYrK5kMeIp87DNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2A0gz4TS4nfr61Qotla1d0ay84z/i663BfpyAJkMFxs=; b=d3pfA4edpu6B45JtVPXlBu4fz25ZA5HYF0ZKGvyXK6SagKPG8w/PC9oNTMyoeVUF+I0KOu 68QUak+XiINjfv8MGHx3y2WwkASsiNvjEvYr4VyH69k2yVamfE8GAEToVAdGV+OC0//lNq TvanfXzsnoXdH+Ri/7zKOPMkBAIfERlaGc6E+kFk1vhb8H+jtgl0pbeIOnSzOjllYOkufp GcwbwvG9AjQistJDBtVcLyNWmT4WL1DBcBq6hF2/j6guGqTS0OSsZ0QjJ9DIHdML9i+nFP hp0bsf29nyr67jm2JwHuos6ynHXVpDvo3CJ35InG0ABuamcn0aVeCj97HQN2jg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wN33sk0zj1r for ; Sat, 25 Apr 2026 16:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 456f0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:32:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 1f86a86b21fc - stable/15 - lib/libnetbsd: bring in `__type_m{ax,in}*` macro family List-Id: Commits to the stable branches 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/15 X-Git-Reftype: branch X-Git-Commit: 1f86a86b21fc4e2796d5d489ad0a8e6148328790 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:32:19 +0000 Message-Id: <69ecec93.456f0.5cf013e9@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=1f86a86b21fc4e2796d5d489ad0a8e6148328790 commit 1f86a86b21fc4e2796d5d489ad0a8e6148328790 Author: Enji Cooper AuthorDate: 2026-02-26 02:29:49 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:32:11 +0000 lib/libnetbsd: bring in `__type_m{ax,in}*` macro family These macros are used by some of the NetBSD tests which calculate the size of types, e.g., `__type_max(time_t)`. This wraps up the set of macros needed in order to update to the a netbsd-tests snapshot from this past month. Obtained from: https://github.com/netbsd/src (55b4b44) MFC after: 1 week (cherry picked from commit db5344a7445f1a796bc3cacd32a46e88e3e589a7) --- lib/libnetbsd/sys/cdefs.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/lib/libnetbsd/sys/cdefs.h b/lib/libnetbsd/sys/cdefs.h index fcc3cc6f15be..d0e06e46d241 100644 --- a/lib/libnetbsd/sys/cdefs.h +++ b/lib/libnetbsd/sys/cdefs.h @@ -94,4 +94,34 @@ */ #define __nothing (/*LINTED*/(void)0) +#define __negative_p(x) (!((x) > 0) && ((x) != 0)) + +#define __type_min_s(t) ((t)((1ULL << (sizeof(t) * __CHAR_BIT__ - 1)))) +#define __type_max_s(t) ((t)~((1ULL << (sizeof(t) * __CHAR_BIT__ - 1)))) +#define __type_min_u(t) ((t)0ULL) +#define __type_max_u(t) ((t)~0ULL) +#define __type_is_signed(t) (/*LINTED*/__type_min_s(t) + (t)1 < (t)1) +#define __type_min(t) (__type_is_signed(t) ? __type_min_s(t) : __type_min_u(t)) +#define __type_max(t) (__type_is_signed(t) ? __type_max_s(t) : __type_max_u(t)) + + +#define __type_fit_u(t, a) \ + (/*LINTED*/!__negative_p(a) && \ + ((__UINTMAX_TYPE__)((a) + __zeroull()) <= \ + (__UINTMAX_TYPE__)__type_max_u(t))) + +#define __type_fit_s(t, a) \ + (/*LINTED*/__negative_p(a) \ + ? ((__INTMAX_TYPE__)((a) + __zeroll()) >= \ + (__INTMAX_TYPE__)__type_min_s(t)) \ + : ((__INTMAX_TYPE__)((a) + __zeroll()) >= (__INTMAX_TYPE__)0 && \ + ((__INTMAX_TYPE__)((a) + __zeroll()) <= \ + (__INTMAX_TYPE__)__type_max_s(t)))) + +/* + * return true if value 'a' fits in type 't' + */ +#define __type_fit(t, a) (__type_is_signed(t) ? \ + __type_fit_s(t, a) : __type_fit_u(t, a)) + #endif /* _LIBNETBSD_SYS_CDEFS_H_ */ From nobody Sat Apr 25 16:32:20 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wN50DGZz6bm9l for ; Sat, 25 Apr 2026 16:32:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wN4503Kz46Zp for ; Sat, 25 Apr 2026 16:32:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5Drf73g+F6ZC40iMgy4OL3JpZFzW72z9D6qUxdJmc9E=; b=T2l7D1vORri6wGhDc/d5w3dRSYZ85j4n4Ab0n5L5/SaEDa3jgQQKSA5/q6PnSAN64PXmmp pD34x3t4Z//YSVINLx48GIxZ8a1xOTwlwiwTHEQY9X552crrvB7Hqhk3vUXTSqissa9okd Joua1btSu13YVXfZc+VviQxNV36c55QV+TZVexFG6a8kV+BobcwLZdspVm4dRcUfXHaPlb emn4uQbcr1zVX9dkXNi/lN3yL9rgY7qjjYT1ZQv6TMm8GUKIj3bjniJcohNMMOqLyPypbZ FC3Hn/TrE1Bz2LHKMA4/B87vVkFcbIaQZum8zwbh25uUVpygDmE95wp4ibUWpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134740; a=rsa-sha256; cv=none; b=Ch8tzbgMHj5VOJO1et/2Bh0adg5fvvPbd+BqEWwiPrvbIe+rGU37nZWsv/8bX1WmJoi1Dy E0XqWQJwSfpbSat0hG75YOVk46ZXnkyrlmnwmXR8RmQCWHYvwgVOJxWAb7mntVmQY/k8cI A5QLBOmY04VfMDyV5CuXGrC5l0ovUg4UN2WjQhqcrLbVaWKioYKTSXeopYXEeJH/UUb2XA iRJL2Em8dIq0hOHig+JJJCKKx2/43U6nm42/4CND6yCLezovhUM19Wq2EEeG9yaI9m4eA1 uVlkdODc9IntoKjRXORMnSnV7lIIcBlkTL0gYTlDDo7uccwQ5vPB07AmNXgpwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5Drf73g+F6ZC40iMgy4OL3JpZFzW72z9D6qUxdJmc9E=; b=LKYtpDkDu4LMbvv3wurpBnLtOKtt7aKn6jqfpHiCkxvbm9w1GxIzITy7tm4mzkVA6BzZFG 8rIXtqJXt9nN9dhi3GuV3FEjANj1mFJU09NcQOFY+Cvf5xd9uHVzaBduX5V+hWSWZsvtDQ pL//S8iysqefqVxYWkEVYG9VEXaNQy+hL0q9DNOgbm7D5ekKT7S5qiPKmPA7h6yyalNd2O k3CzfkAMODJFnHdFp2Hjnqx+yLM8Xfx63dLOAkvRZdUo/0mhtlO7Pf/1ZEDvwlY7oYOqNm fvqN/Ais+jCAPNdVXfb6gR6ouwdfIEWZgPLpJcycPc5nqER3NPXU/86bAEHZWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wN44GkFzhb2 for ; Sat, 25 Apr 2026 16:32:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 45bf0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:32:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 0b97aba5c25b - stable/15 - libnetbsd: import `__CTASSERT(..)` macros List-Id: Commits to the stable branches 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/15 X-Git-Reftype: branch X-Git-Commit: 0b97aba5c25be8a76cca6f77a40a972a7e70a98f Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:32:20 +0000 Message-Id: <69ecec94.45bf0.e4a75be@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=0b97aba5c25be8a76cca6f77a40a972a7e70a98f commit 0b97aba5c25be8a76cca6f77a40a972a7e70a98f Author: Enji Cooper AuthorDate: 2026-02-20 20:24:46 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:32:11 +0000 libnetbsd: import `__CTASSERT(..)` macros These compile-time assert macros are similar to `Static_assert` on FreeBSD. These macros are in use in newer versions of `contrib/netbsd-tests`. Obtained from: https://github.com/NetBSD/src (c26cc77b3a0b26b95a2) MFC after: 1 week (cherry picked from commit d1f1402dff63dd163d4ba4ac65f7f2ffd00c5e08) --- lib/libnetbsd/sys/cdefs.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/libnetbsd/sys/cdefs.h b/lib/libnetbsd/sys/cdefs.h index d0e06e46d241..e4ff4a516519 100644 --- a/lib/libnetbsd/sys/cdefs.h +++ b/lib/libnetbsd/sys/cdefs.h @@ -54,6 +54,22 @@ #define ___STRING(x) __STRING(x) #define ___CONCAT(x,y) __CONCAT(x,y) +/* + * Compile Time Assertion. + */ +#ifdef __COUNTER__ +#define __CTASSERT(x) __CTASSERT0(x, __ctassert, __COUNTER__) +#else +#define __CTASSERT(x) __CTASSERT99(x, __INCLUDE_LEVEL__, __LINE__) +#define __CTASSERT99(x, a, b) __CTASSERT0(x, __CONCAT(__ctassert,a), \ + __CONCAT(_,b)) +#endif +#define __CTASSERT0(x, y, z) __CTASSERT1(x, y, z) +#define __CTASSERT1(x, y, z) \ + struct y ## z ## _struct { \ + unsigned int y ## z : /*CONSTCOND*/(x) ? 1 : -1; \ + } + /* * The following macro is used to remove const cast-away warnings * from gcc -Wcast-qual; it should be used with caution because it From nobody Sat Apr 25 16:32:31 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wNH3pP3z6bmD8 for ; Sat, 25 Apr 2026 16:32:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wNH0yfFz46tB for ; Sat, 25 Apr 2026 16:32:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GzZGM1L4AtAhB1q9YASaEpkGfbKoDx/v+LM1d28VAwg=; b=aC40IUD5Y3xXERP8Uad5DTyRvkqRKqBUlleJTKc9PUddu96uMR2FtPvzBX1CsAzt3Vk6/y UrBy26slGe0My5OR3zdTLIop6zSCY8Mbrvfe8jG6Re4ldG6sNHNsFvkao4j/UwcLN++AeD aIaqA3JPCc8Xc7DHUwG/18JGNzFAa2y5Nhdr+du/1JWmUKJ72DW7c218sIxth/4hfMSrxf ypBGBdk8w7us1Q/7byULielnUqYLSXQ4GPFp6zZG4aYhORb3e0Sh7/vlirmX/GdneYuGG+ 5nFCL4Y60R4lf+oPWZkK84YaTFiTvjhWptyR1JzZH8aC/MBWP+sC7QaycGopBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134751; a=rsa-sha256; cv=none; b=G32h3XBsV9J4LTt33EpnM1/q0gbbWGyVTFDPMnUSPNKmXX4CtCLE38Trd0nNnfdORh3SyD WSkKij4qpoS/xecmqnbwUAhqDSZXfPUrz+P+dxOu2qr4vEu8Dm1ICgDwuHigQbSd9w2H7V clKA2SUHPOR24V7eo6FG+5pQ3TvZfV4afly7xO65oy7EmFOBO4df6jFU7OfaAvy4JL6G5H cPU7A4Sq3ojAf7yjow3e6xXVJFsYeW6vl5ID6bOhF5OZHKdSDUOGHwAk4nLi+SkWtVBROa bFEGxTeKGbgnlLkZpaKRLXtPTeqkIS7h2/x9DVXU/xNx7L2FhqxAsKebJlP2yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GzZGM1L4AtAhB1q9YASaEpkGfbKoDx/v+LM1d28VAwg=; b=l9XrCW9Dv8jwpjb6Hq84afY/tUuEKnAB5RFY43KZ4v7BKLlMURA4NC0M3LpM3I2Z7tl72g GXp7ODGoU4BoGJEWmTjSjXBsi3YTtQ0d2yambar5vN2oTxbpIwbHo65fEvN6nai4ekKLEM sENSUbIujG6jMPVOpAx0XAvsk0nYkaUOha6XaeaJtJFamV3ysiTj2Jit6AKzk5Uo6ubopF 8aE0qAer9HVWEEd1WHirDy35EQYDLvdZbrYEMQgSpWf1e4TsHhcnVsFw95GFNCSvCSYL7b hZ9WXUtv1ScQfHisC0m4ImAvqUOr6rADCZsz1qMqjsUtP2Xyde5zYIvkUtNotg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wNH0Bd6zjDf for ; Sat, 25 Apr 2026 16:32:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4464e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:32:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 33030906cdd3 - stable/14 - libnetbsd: add math.h and sys/time.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: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 33030906cdd373b92e4a263b2ce0d5d9fe02fade Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:32:31 +0000 Message-Id: <69ecec9f.4464e.3d5680c3@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=33030906cdd373b92e4a263b2ce0d5d9fe02fade commit 33030906cdd373b92e4a263b2ce0d5d9fe02fade Author: Enji Cooper AuthorDate: 2026-02-25 23:19:56 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:32:25 +0000 libnetbsd: add math.h and sys/time.h - `math.h`: `isinff(..)` - `sys/time.h`: `timespec*(x)` These two headers are used by tests in newer snapshots of `contrib/netbsd-tests`. MFC after: 1 week (cherry picked from commit 2a6c2d9c38dc421025b6c18cac68fe9965c574c0) --- lib/libnetbsd/math.h | 14 ++++++++++++++ lib/libnetbsd/sys/time.h | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/lib/libnetbsd/math.h b/lib/libnetbsd/math.h new file mode 100644 index 000000000000..bffc94f82d67 --- /dev/null +++ b/lib/libnetbsd/math.h @@ -0,0 +1,14 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2026 Enji Cooper + */ + +#ifndef __LIBNETBSD_MATH_H__ +#define __LIBNETBSD_MATH_H__ + +#include_next + +#define isinff(x) __isinff(x) + +#endif diff --git a/lib/libnetbsd/sys/time.h b/lib/libnetbsd/sys/time.h new file mode 100644 index 000000000000..9ddde16e84e3 --- /dev/null +++ b/lib/libnetbsd/sys/time.h @@ -0,0 +1,35 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2026 Enji Cooper + */ + +#ifndef _LIBNETBSD_SYS_TIME_H_ +#define _LIBNETBSD_SYS_TIME_H_ + +#include_next + +#define timercmp(tvp, uvp, cmp) \ + (((tvp)->tv_sec == (uvp)->tv_sec) ? \ + ((tvp)->tv_usec cmp (uvp)->tv_usec) : \ + ((tvp)->tv_sec cmp (uvp)->tv_sec)) +#define timespecadd(tsp, usp, vsp) \ + do { \ + (vsp)->tv_sec = (tsp)->tv_sec + (usp)->tv_sec; \ + (vsp)->tv_nsec = (tsp)->tv_nsec + (usp)->tv_nsec; \ + if ((vsp)->tv_nsec >= 1000000000L) { \ + (vsp)->tv_sec++; \ + (vsp)->tv_nsec -= 1000000000L; \ + } \ + } while (0) +#define timespecsub(tsp, usp, vsp) \ + do { \ + (vsp)->tv_sec = (tsp)->tv_sec - (usp)->tv_sec; \ + (vsp)->tv_nsec = (tsp)->tv_nsec - (usp)->tv_nsec; \ + if ((vsp)->tv_nsec < 0) { \ + (vsp)->tv_sec--; \ + (vsp)->tv_nsec += 1000000000L; \ + } \ + } while (0) + +#endif From nobody Sat Apr 25 16:32:32 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wNJ2qGzz6bmMT for ; Sat, 25 Apr 2026 16:32:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wNJ1Zy1z46wj for ; Sat, 25 Apr 2026 16:32:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gdxYZ6d6yfl7M1MPgEU/P9PMgZtLkBgzAYst3khx6+s=; b=kAKEvQprkX1TjdfX3Qcmqcf9S+zhJh4FBycgs83cs9gY/qWvC+p21DPRRu66HZGn6c4jSJ y3cpR+kiEIquS4LpUlOlioySfXXOHhgN7CABqCBy9cz26OoTovu/c5uUkgd0SrTPlGlRtm FvHdu0xpWEOdDsSBnQ5aFlm63t3kd2+yHYujCdTJ/EuRJQBqe28WrPPKa5dIv3m6Ji7VLU ikm6TClGjEIApIYihZgO2f2kqXLhGo7UvxVIlxQb5LHa8Ifhifxr9fJIwTRBYxISaIerA/ dmjQBDNurU47t2CAy5EkEN4jBQVtobs20XJSNTxtJCEtz8KNR3bUsz3i1nvybA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134752; a=rsa-sha256; cv=none; b=uCfmZQiF++yI3+gOi3Lt+S+/uPym1ifRDK7Rwnxp3CMFcLXiNR308gMivC2sN9vLE4WpnA Cpeqnah1kPUD1joBrRgrLu7rr3PwbY/cqdap+Ks3RCmhOMzq20Mi2EQCAQsCrX8QTc/kXo WeKEIpBvWxmFaNwq0JXfnJTP2iaXNQvfcnTaJqbXkSMrz8d+ujZdJCng9zWMhhs64+buup sIR4msgX+XmC62yIN+cZ561ADJpgkDA+JMNnFKxk5o/7mL+lTnLBwcNu5AFckBMZdz1/n4 94jdRn5MHWTtstg3gpPBMxLRLZ94XVtZ7SvBTq2qmsq3CscC9kKHl1nhNjco7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gdxYZ6d6yfl7M1MPgEU/P9PMgZtLkBgzAYst3khx6+s=; b=qdfYLCMk14JEImHe1ZuXWX1CVmHgu71+WXDSsHK5OtedfNp8wbE3QCMghP0+1GDPw/Cznu lKUQX4/m9EMAVmuNY41wG0HDB6HxkjVatDbjUg6xirMHwftzCcPrunIVTqfnsbwqgDN5q6 kzXoyTZgnOPQ+J4FQQOISiiG3SJi+i8OGDBFdd+pD66I7Q6hFKyFybJbpZWhulsVf+EM29 TgbueEcduQpcQJcEMpiSwEQ+hNdqBMWA3syrqgzRec1rJ6GKJNHcwIBMb4EwS5F/jx9De8 spz7Jb6lyLFAZ5vjot/KEM1LkRlov/Kc04ZWkKvUkDLdaefzTZlk9pS2VsIRBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wNJ10MZzhnF for ; Sat, 25 Apr 2026 16:32:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4519c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:32:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: ee828a44e8d1 - stable/14 - lib/libnetbsd: bring in `__type_m{ax,in}*` macro family List-Id: Commits to the stable branches 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: ee828a44e8d16e7bf74c0761bd088024821f1eb6 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:32:32 +0000 Message-Id: <69ececa0.4519c.39b6132b@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=ee828a44e8d16e7bf74c0761bd088024821f1eb6 commit ee828a44e8d16e7bf74c0761bd088024821f1eb6 Author: Enji Cooper AuthorDate: 2026-02-26 02:29:49 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:32:25 +0000 lib/libnetbsd: bring in `__type_m{ax,in}*` macro family These macros are used by some of the NetBSD tests which calculate the size of types, e.g., `__type_max(time_t)`. This wraps up the set of macros needed in order to update to the a netbsd-tests snapshot from this past month. Obtained from: https://github.com/netbsd/src (55b4b44) MFC after: 1 week (cherry picked from commit db5344a7445f1a796bc3cacd32a46e88e3e589a7) --- lib/libnetbsd/sys/cdefs.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/lib/libnetbsd/sys/cdefs.h b/lib/libnetbsd/sys/cdefs.h index fcc3cc6f15be..d0e06e46d241 100644 --- a/lib/libnetbsd/sys/cdefs.h +++ b/lib/libnetbsd/sys/cdefs.h @@ -94,4 +94,34 @@ */ #define __nothing (/*LINTED*/(void)0) +#define __negative_p(x) (!((x) > 0) && ((x) != 0)) + +#define __type_min_s(t) ((t)((1ULL << (sizeof(t) * __CHAR_BIT__ - 1)))) +#define __type_max_s(t) ((t)~((1ULL << (sizeof(t) * __CHAR_BIT__ - 1)))) +#define __type_min_u(t) ((t)0ULL) +#define __type_max_u(t) ((t)~0ULL) +#define __type_is_signed(t) (/*LINTED*/__type_min_s(t) + (t)1 < (t)1) +#define __type_min(t) (__type_is_signed(t) ? __type_min_s(t) : __type_min_u(t)) +#define __type_max(t) (__type_is_signed(t) ? __type_max_s(t) : __type_max_u(t)) + + +#define __type_fit_u(t, a) \ + (/*LINTED*/!__negative_p(a) && \ + ((__UINTMAX_TYPE__)((a) + __zeroull()) <= \ + (__UINTMAX_TYPE__)__type_max_u(t))) + +#define __type_fit_s(t, a) \ + (/*LINTED*/__negative_p(a) \ + ? ((__INTMAX_TYPE__)((a) + __zeroll()) >= \ + (__INTMAX_TYPE__)__type_min_s(t)) \ + : ((__INTMAX_TYPE__)((a) + __zeroll()) >= (__INTMAX_TYPE__)0 && \ + ((__INTMAX_TYPE__)((a) + __zeroll()) <= \ + (__INTMAX_TYPE__)__type_max_s(t)))) + +/* + * return true if value 'a' fits in type 't' + */ +#define __type_fit(t, a) (__type_is_signed(t) ? \ + __type_fit_s(t, a) : __type_fit_u(t, a)) + #endif /* _LIBNETBSD_SYS_CDEFS_H_ */ From nobody Sat Apr 25 16:32:33 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wNK4Clnz6bmK1 for ; Sat, 25 Apr 2026 16:32:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wNK2Fqsz472K for ; Sat, 25 Apr 2026 16:32:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qnqVuz6OuIayqviNO3umYoGuyF2JafFgtjKFz2TC9EQ=; b=ijaPxWVNXcEypvjzkH7KbsCESPSehS3LQMi/eHevLbKZ4RIa2Vpni604y+KXvpsBR+aGkx x/i+VwXiiteq+obWhV/M4fzxYMrxo+jx+AcVrVLufmofzxnI8D3YEzRgPxr3IGRXjEPSGk PimKZqRav776RlJqjBLQOFG9+w8SIHvoLLoQddNjfwOicc0hLYFjPvil2IzDguv3n1uzu2 ShqQV0xzDvYhw2/iB5zm4FRjOSfkBidnhCTIylonBtZrGuk7iy3VD0so0oSK3+YwkJkxAb DSDOxM06sYKu8DITfQqlgLkh/2Mix8dWxmOF2k6TU+PzNc1bYix5gnoXGGKgrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134753; a=rsa-sha256; cv=none; b=H7yjQVwUiZWQ569pX1gGPCKWx16pLdarmQ3gkOKL6LnD3/mTFugY9PqS8xy3wXEjyUH6QI fPvKsKMqqsOy5n99r+ozIqCeVXg/vhNlM0+eDu3Z8MC4tPKGYruzX+PUAkvRjncxK95QKp SdltCwH7QGKvVHxX+gBO0GZjr7tSNUzYzAYOfjeZTq3xuGfKvV9HauM/dpRHZNanowo/2D BL7OR6UXOmJxbySsJchcD9OVy5awWwdwyyJDMd00ZeurDvYhJ4e9n9ej1ruoBlqcsJhqfE l/1xNOSK+q8DoRudP1xKdKWlbZ+4bciyihAaBVRaAl1QOtEJBEusbUWFcfpLkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qnqVuz6OuIayqviNO3umYoGuyF2JafFgtjKFz2TC9EQ=; b=ywpsjhjF4MQTZgb2yfjbU5bvdxbVhWZPmsjSmzT/5Ioh1uyTW5D9ftBKgWYf2gziUNxrgj DjQ7NoLbx9ml8w7n2LOm6YP0ufeh2YVGbHoK19cfQoAa+pEqhs7nIi3AEVe7HIQfP2Qmyk EyKFhzZqtkQ69op5/q918zVjBlEwtrDFiZrD+ucu8bSHNSunzT3zjDyP1wWROypTWB4+JU YwYTA+HRAaB7gQ5ZMbbIpgwHO13/VfKLkO1vXdbDgeTQ7Nc6T4cpllus1aGZPEYTPAR+xg acnWY4ME3ZQeX4SOD3oXFJGupp0zn99SBta+d6Ud8+nrVR68CeI7Aj8WpQJ5Jg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wNK1n03zhnG for ; Sat, 25 Apr 2026 16:32:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 45160 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:32:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 7be895e50035 - stable/14 - libnetbsd: import `__CTASSERT(..)` macros List-Id: Commits to the stable branches 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: 7be895e5003534e51efe37cc63a359219099bf4a Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:32:33 +0000 Message-Id: <69ececa1.45160.4641cbd7@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=7be895e5003534e51efe37cc63a359219099bf4a commit 7be895e5003534e51efe37cc63a359219099bf4a Author: Enji Cooper AuthorDate: 2026-02-20 20:24:46 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:32:25 +0000 libnetbsd: import `__CTASSERT(..)` macros These compile-time assert macros are similar to `Static_assert` on FreeBSD. These macros are in use in newer versions of `contrib/netbsd-tests`. Obtained from: https://github.com/NetBSD/src (c26cc77b3a0b26b95a2) MFC after: 1 week (cherry picked from commit d1f1402dff63dd163d4ba4ac65f7f2ffd00c5e08) --- lib/libnetbsd/sys/cdefs.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/libnetbsd/sys/cdefs.h b/lib/libnetbsd/sys/cdefs.h index d0e06e46d241..e4ff4a516519 100644 --- a/lib/libnetbsd/sys/cdefs.h +++ b/lib/libnetbsd/sys/cdefs.h @@ -54,6 +54,22 @@ #define ___STRING(x) __STRING(x) #define ___CONCAT(x,y) __CONCAT(x,y) +/* + * Compile Time Assertion. + */ +#ifdef __COUNTER__ +#define __CTASSERT(x) __CTASSERT0(x, __ctassert, __COUNTER__) +#else +#define __CTASSERT(x) __CTASSERT99(x, __INCLUDE_LEVEL__, __LINE__) +#define __CTASSERT99(x, a, b) __CTASSERT0(x, __CONCAT(__ctassert,a), \ + __CONCAT(_,b)) +#endif +#define __CTASSERT0(x, y, z) __CTASSERT1(x, y, z) +#define __CTASSERT1(x, y, z) \ + struct y ## z ## _struct { \ + unsigned int y ## z : /*CONSTCOND*/(x) ? 1 : -1; \ + } + /* * The following macro is used to remove const cast-away warnings * from gcc -Wcast-qual; it should be used with caution because it From nobody Sat Apr 25 16:34:16 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wQJ2D9wz6bmMj for ; Sat, 25 Apr 2026 16:34:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wQJ1HzTz49LM for ; Sat, 25 Apr 2026 16:34:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+LJIiy+oZYPJZf3Vc7GXLRtLzCLExmsKQ3dpvCdsh7I=; b=Zc+GwdPhBErsbpAGYHJlhoJf6NOg6Zesiag0xhg+8cfsMa45eqZuATZYCnX1e6XXafrdAZ l8jkNZhHloeIGmuRtQpvk6rucNhx333b3JbP+9zhhEjeA22YijpxbKo9t5tAtjRZ1Adxp9 sfTOaQvNyF1mczzvjwaU6ecY1BqU+swQAR/Pyk6VufpWJF8qTLiH4wGfykbQCqT4ixokFp vk91iW6hxxh37W4Sp88fFMOcLqGhzXyez6U3ifUVEC0+WW5vWU+M74gi3TPGPh4zFng15j oojdrwwd/XBgkSBFsL3TglsMRs0krP+WdnpI6Q0+RUW2INvYNbOnYerDBuE3eA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134856; a=rsa-sha256; cv=none; b=hBzJJH19B9Fr4D/g9AIi4s5sSeNYpf++bIWfgT2VrStGXMB9PpltthD+yIp9Z09Drrr6Yw 8nEmXmarG1YfpoOW0dJE/UexxUSgsHQBkPLNOk6EqHRFUFMaciJqCBvwoYlb5lokmWpAUZ RN3LLB40MLYBW9sAncufdM0ECjxjPTq65nN2KhabO+pkSAT7xMBQkPCl4fY7xZTflcux9T HmJ3dGu3lE3kpT6YBiS87cX/4GHsSbDbkRReonplJYlkfogbMq+3xBk2HNxFHbjXBVTbrJ fLHrp2dp7lwHqzhOgkNss3tRDFCIUxxL+cMI9tYqvRIOeyPuQvwcS7ghuzo8VQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+LJIiy+oZYPJZf3Vc7GXLRtLzCLExmsKQ3dpvCdsh7I=; b=fiJ9U2ab11Kmu02fy0AdsEpPU0iR2xp09GUyO5fPHOIiCzqy66xb+yPr5YoYNfatQhdcIo vYEY1ksEMUnXe9Q6f7h9Aixam2cB9iyllFwDIrWHaZmPH4tpbnZRMPSOuaEqYRG1u0m49Z gLNVVPf/oMgdB4XePBQbFLjfgSsZOmyybKIb5XMMdEbruobXukG3dMl/bkBP2Qkq/iQFpu WhbdqPhdRCXqEZrjQYD8U/4EPTxTe38MiQpwa4fhiWl/Xevn7nNhoj8w64Oe3kO8C71vN6 RVyE4i6n8rmMsTnL+2hilJDT5Fzxfj2yhkUdih4PCkk1TcfD88lOyWIrd5xBmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wQJ0vBnzhb9 for ; Sat, 25 Apr 2026 16:34:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 45327 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:34:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 608749ca473d - stable/14 - divert: unbreak the LINT-NOIP 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: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 608749ca473de286ff40447510c201cb8579aee2 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:34:16 +0000 Message-Id: <69eced08.45327.3624cf69@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=608749ca473de286ff40447510c201cb8579aee2 commit 608749ca473de286ff40447510c201cb8579aee2 Author: Enji Cooper AuthorDate: 2026-02-26 23:06:36 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:33:22 +0000 divert: unbreak the LINT-NOIP build Only expose `dcb` when either `INET` or `INET6` is defined. Reported by: clang (`-Wunused`) MFC after: 1 week Fixes 5547a7bb39 ("divert: Use a better source identifier...") Differential Revision: https://reviews.freebsd.org/D55548 (cherry picked from commit bd758ebac3272f720c051570e043e4bc653dcd48) --- sys/netinet/ip_divert.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index b9a9f0edc946..849119969c5f 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -502,10 +502,11 @@ static int div_output_inbound(int family, struct socket *so, struct mbuf *m, struct sockaddr_in *sin) { - struct divcb *dcb; +#if defined(INET) || defined(INET6) + struct divcb *dcb = so->so_pcb; +#endif struct ifaddr *ifa; - dcb = so->so_pcb; if (m->m_pkthdr.rcvif == NULL) { /* * No luck with the name, check by IP address. From nobody Sat Apr 25 16:35:46 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wS25z3cz6bmWF for ; Sat, 25 Apr 2026 16:35:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wS25FJTz49gy for ; Sat, 25 Apr 2026 16:35:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134946; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+x/Ks8VrlNGXiaquoO3tCmP2vPg89kgl0jKz6SBYgjo=; b=WzRj9Tw2Juwv3WkH0UV2qcYNYp6gfqgMQ6bkR/cRoxDgbE567FjKW13PhN6ldAHE2vkBDO 1dcnHQikJ85cjf0h/O1pK92g3GWo+1Ii4Vv3K5sWfMZJYNZwT2GanzreScBPC7+vJANXMs MPvwUQi/hGdIW3DKyyM3SlD833DiyMN7eLKnX6FVhFVw1qbR03WGojmh+Inxb+uhtRhBjm iT2X60LOMOyFaAty+pJwsHNxo3EwcPq9gH10vRlJU5UZj7eol7rAPRI6dak24P3M6W045+ PXqgmcHmcHZIfm4jW7V2s/l4hqoftpE8vVxxBQXMr7lKfWncqlujejHc6wvDjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134946; a=rsa-sha256; cv=none; b=HS1W0L8weJZS1P1zAVJ8Kv4PrPb0uaF+m18X/3qLXnszyB1IFN3RLG2ZUnouG6+/2PpusZ DFh631XWyNF//gfBjep5DYI3/asxUSzJrtU5tS/2u9cSxrrKGR6fnulkdKnwtZ5911jmQl Ke7Xjt2OZPdWi767HcxaZX62E/JmKMjJ7hU260G0CdAhIVGqNcOkC8T9kzIL4ZXjZAh3xQ 8BYtyWH/7MJIxK5Qjs1zw9phF1Y2ZoSfbyeMo+77D0pw43g8g2A38Hb7EnCn+Ijdx6dEQD Tuix9TNYUiIvX1Bz1shEaBd+wcfwoaWgq7m5fvaSDFFySW9VUcUCshgpUAFXLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134946; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+x/Ks8VrlNGXiaquoO3tCmP2vPg89kgl0jKz6SBYgjo=; b=nZqDroJ2wVX0k/e3zRhAeFbqg2wOdsOVm8fjDheAIG+HKUDgtSwIX3VQJhQFdY+9Fpftut LlzWddKmK2Jazd4Y0wILgv/eWFdl/gUKx6JxHiz1sPCXw3NoUavC9a72xEsyym4jM3S1YV D1CSK2/H99UszS8zgkOrpXRq6MtJ6wFQiBXsI+vJvv1OsSqSJgHwaRhxnaZwWeuvoG5a/E T1+pA8RIzrOk1blkVyFJzQcs7R+XvQhpEIzrCXHp1xVIRdiTKLzbeev4Zv7HMTdAuL/XiH N6Cn8HDLvsjJHPCUgns/viQ1MHEjfip7nf1ecE9fpFVaWYxnBjD65jJkitnH0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wS24j8XzhbB for ; Sat, 25 Apr 2026 16:35:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 44652 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:35:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 732d45e72d9c - stable/15 - asmc: code style modernization and minor cleanups List-Id: Commits to the stable branches 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/15 X-Git-Reftype: branch X-Git-Commit: 732d45e72d9c480b56a8d4e599179c4cf3f551a7 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:35:46 +0000 Message-Id: <69eced62.44652.20ef5fff@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=732d45e72d9c480b56a8d4e599179c4cf3f551a7 commit 732d45e72d9c480b56a8d4e599179c4cf3f551a7 Author: Enji Cooper AuthorDate: 2026-02-20 03:51:13 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:35:23 +0000 asmc: code style modernization and minor cleanups - Allow `ASMC_DEBUG` to be treated as a variadic macro. - Add ellipses around `sizeof(..)` calls. - Reindent some of the lines to better follow style(9) with line wrapping. A number of other clang-format changes were not taken as they are not compatible with style(9). MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55394 (cherry picked from commit e20e26e4e271ecb74e40d9a95ed3112ceaf9604f) --- sys/dev/asmc/asmc.c | 106 +++++++++++++++++++++++----------------------------- 1 file changed, 47 insertions(+), 59 deletions(-) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index be5b4b9ca911..4007670ab8d9 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -590,9 +590,9 @@ static driver_t asmc_driver = { #define _COMPONENT ACPI_OEM ACPI_MODULE_NAME("ASMC") #ifdef ASMC_DEBUG -#define ASMC_DPRINTF(str) device_printf(dev, str) +#define ASMC_DPRINTF(str, ...) device_printf(dev, str, ##__VA_ARGS__) #else -#define ASMC_DPRINTF(str) +#define ASMC_DPRINTF(str, ...) #endif /* NB: can't be const */ @@ -702,57 +702,50 @@ asmc_attach(device_t dev) name[0] = '0' + j; name[1] = 0; sc->sc_fan_tree[i] = SYSCTL_ADD_NODE(sysctlctx, - SYSCTL_CHILDREN(sc->sc_fan_tree[0]), - OID_AUTO, name, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, - "Fan Subtree"); + SYSCTL_CHILDREN(sc->sc_fan_tree[0]), OID_AUTO, name, + CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "Fan Subtree"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_fan_tree[i]), OID_AUTO, "id", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, - dev, j, model->smc_fan_id, "I", - "Fan ID"); + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, j, + model->smc_fan_id, "I", "Fan ID"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_fan_tree[i]), OID_AUTO, "speed", - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, - dev, j, model->smc_fan_speed, "I", - "Fan speed in RPM"); + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, j, + model->smc_fan_speed, "I", "Fan speed in RPM"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_fan_tree[i]), OID_AUTO, "safespeed", - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, - dev, j, model->smc_fan_safespeed, "I", - "Fan safe speed in RPM"); + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, j, + model->smc_fan_safespeed, "I", "Fan safe speed in RPM"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_fan_tree[i]), OID_AUTO, "minspeed", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, - dev, j, model->smc_fan_minspeed, "I", - "Fan minimum speed in RPM"); + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, dev, j, + model->smc_fan_minspeed, "I", "Fan minimum speed in RPM"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_fan_tree[i]), OID_AUTO, "maxspeed", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, - dev, j, model->smc_fan_maxspeed, "I", - "Fan maximum speed in RPM"); + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, dev, j, + model->smc_fan_maxspeed, "I", "Fan maximum speed in RPM"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_fan_tree[i]), OID_AUTO, "targetspeed", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, - dev, j, model->smc_fan_targetspeed, "I", - "Fan target speed in RPM"); + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, dev, j, + model->smc_fan_targetspeed, "I", "Fan target speed in RPM"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_fan_tree[i]), OID_AUTO, "manual", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, - dev, j, asmc_mb_sysctl_fanmanual, "I", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, dev, j, + asmc_mb_sysctl_fanmanual, "I", "Fan manual mode (0=auto, 1=manual)"); } @@ -767,8 +760,8 @@ asmc_attach(device_t dev) SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_temp_tree), OID_AUTO, model->smc_tempnames[i], - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, - dev, i, asmc_temp_sysctl, "I", + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, i, + asmc_temp_sysctl, "I", model->smc_tempdescs[i]); } @@ -791,16 +784,15 @@ asmc_attach(device_t dev) SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_light_tree), OID_AUTO, "right", - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, - dev, 0, model->smc_light_right, "I", + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, 0, + model->smc_light_right, "I", "Keyboard backlight right sensor"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_light_tree), OID_AUTO, "control", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_ANYBODY | - CTLFLAG_MPSAFE, dev, 0, - model->smc_light_control, "I", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_ANYBODY | CTLFLAG_MPSAFE, + dev, 0, model->smc_light_control, "I", "Keyboard backlight brightness control"); } @@ -863,11 +855,8 @@ asmc_attach(device_t dev) goto err; } - ret = bus_setup_intr(dev, sc->sc_irq, - INTR_TYPE_MISC | INTR_MPSAFE, - asmc_sms_intrfast, NULL, - dev, &sc->sc_cookie); - + ret = bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_MISC | INTR_MPSAFE, + asmc_sms_intrfast, NULL, dev, &sc->sc_cookie); if (ret) { device_printf(dev, "unable to setup SMS IRQ\n"); goto err; @@ -920,7 +909,7 @@ asmc_resume(device_t dev) buf[0] = light_control; buf[1] = 0x00; - asmc_key_write(dev, ASMC_KEY_LIGHTVALUE, buf, sizeof buf); + asmc_key_write(dev, ASMC_KEY_LIGHTVALUE, buf, sizeof(buf)); return (0); } @@ -1040,8 +1029,9 @@ nosms: sc->sc_nfan = asmc_fan_count(dev); if (sc->sc_nfan > ASMC_MAXFANS) { - device_printf(dev, "more than %d fans were detected. Please " - "report this.\n", ASMC_MAXFANS); + device_printf(dev, + "more than %d fans were detected. Please report this.\n", + ASMC_MAXFANS); sc->sc_nfan = ASMC_MAXFANS; } @@ -1101,12 +1091,9 @@ asmc_wait(device_t dev, uint8_t val) #ifdef ASMC_DEBUG sc = device_get_softc(dev); -#endif - val = val & ASMC_STATUS_MASK; -#ifdef ASMC_DEBUG - device_printf(dev, "%s failed: 0x%x, 0x%x\n", __func__, val, - ASMC_CMDPORT_READ(sc)); + device_printf(dev, "%s failed: 0x%x, 0x%x\n", __func__, + val & ASMC_STATUS_MASK, ASMC_CMDPORT_READ(sc)); #endif return (1); } @@ -1247,16 +1234,17 @@ out: type[5] = 0; if (maxlen > sizeof(v)) { device_printf(dev, - "WARNING: cropping maxlen from %d to %zu\n", - maxlen, sizeof(v)); + "WARNING: cropping maxlen from %d to %zu\n", maxlen, + sizeof(v)); maxlen = sizeof(v); } for (i = 0; i < sizeof(v); i++) { v[i] = 0; } asmc_key_read(dev, key, v, maxlen); - snprintf(buf, sizeof(buf), "key %d is: %s, type %s " - "(len %d), data", number, key, type, maxlen); + snprintf(buf, sizeof(buf), + "key %d is: %s, type %s (len %d), data", + number, key, type, maxlen); for (i = 0; i < maxlen; i++) { snprintf(buf2, sizeof(buf2), " %02x", v[i]); strlcat(buf, buf2, sizeof(buf)); @@ -1320,7 +1308,7 @@ asmc_fan_count(device_t dev) { uint8_t buf[1]; - if (asmc_key_read(dev, ASMC_KEY_FANCOUNT, buf, sizeof buf) != 0) + if (asmc_key_read(dev, ASMC_KEY_FANCOUNT, buf, sizeof(buf)) != 0) return (-1); return (buf[0]); @@ -1334,7 +1322,7 @@ asmc_fan_getvalue(device_t dev, const char *key, int fan) char fankey[5]; snprintf(fankey, sizeof(fankey), key, fan); - if (asmc_key_read(dev, fankey, buf, sizeof buf) != 0) + if (asmc_key_read(dev, fankey, buf, sizeof(buf)) != 0) return (-1); speed = (buf[0] << 6) | (buf[1] >> 2); @@ -1368,7 +1356,7 @@ asmc_fan_setvalue(device_t dev, const char *key, int fan, int speed) buf[1] = speed; snprintf(fankey, sizeof(fankey), key, fan); - if (asmc_key_write(dev, fankey, buf, sizeof buf) < 0) + if (asmc_key_write(dev, fankey, buf, sizeof(buf)) < 0) return (-1); return (0); @@ -1536,7 +1524,7 @@ asmc_temp_getvalue(device_t dev, const char *key) /* * Check for invalid temperatures. */ - if (asmc_key_read(dev, key, buf, sizeof buf) != 0) + if (asmc_key_read(dev, key, buf, sizeof(buf)) != 0) return (-1); return (buf[0]); @@ -1569,12 +1557,12 @@ asmc_sms_read(device_t dev, const char *key, int16_t *val) case 'X': case 'Y': case 'Z': - error = asmc_key_read(dev, key, buf, sizeof buf); + error = asmc_key_read(dev, key, buf, sizeof(buf)); break; default: device_printf(dev, "%s called with invalid argument %s\n", __func__, key); - error = 1; + error = EINVAL; goto out; } *val = ((int16_t)buf[0] << 8) | buf[1]; @@ -1719,7 +1707,7 @@ asmc_mbp_sysctl_light_left(SYSCTL_HANDLER_ARGS) int error; int32_t v; - asmc_key_read(dev, ASMC_KEY_LIGHTLEFT, buf, sizeof buf); + asmc_key_read(dev, ASMC_KEY_LIGHTLEFT, buf, sizeof(buf)); v = buf[2]; error = sysctl_handle_int(oidp, &v, 0, req); @@ -1734,7 +1722,7 @@ asmc_mbp_sysctl_light_right(SYSCTL_HANDLER_ARGS) int error; int32_t v; - asmc_key_read(dev, ASMC_KEY_LIGHTRIGHT, buf, sizeof buf); + asmc_key_read(dev, ASMC_KEY_LIGHTRIGHT, buf, sizeof(buf)); v = buf[2]; error = sysctl_handle_int(oidp, &v, 0, req); @@ -1758,7 +1746,7 @@ asmc_mbp_sysctl_light_control(SYSCTL_HANDLER_ARGS) light_control = v; buf[0] = light_control; buf[1] = 0x00; - asmc_key_write(dev, ASMC_KEY_LIGHTVALUE, buf, sizeof buf); + asmc_key_write(dev, ASMC_KEY_LIGHTVALUE, buf, sizeof(buf)); } return (error); } @@ -1771,7 +1759,7 @@ asmc_mbp_sysctl_light_left_10byte(SYSCTL_HANDLER_ARGS) int error; uint32_t v; - asmc_key_read(dev, ASMC_KEY_LIGHTLEFT, buf, sizeof buf); + asmc_key_read(dev, ASMC_KEY_LIGHTLEFT, buf, sizeof(buf)); /* * This seems to be a 32 bit big endian value from buf[6] -> buf[9]. From nobody Sat Apr 25 16:36:04 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wSN4ngXz6bmrV for ; Sat, 25 Apr 2026 16:36: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wSN2XkXz3Bxp for ; Sat, 25 Apr 2026 16:36:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5jn2sWfApdNTzGygdplfv2GElk9BzA6+UbdmugXRxeQ=; b=YwlT6OKkJ31ZAgafRy5n/dKemRRsMeCV2NxA5xvXw3JKZ/PJGGg5OI+ZQENAXgNX2mPa07 WoWz/SIyhb9FeHTGt7YEpGcQFg1p0WQ/GKKCD6T+Qv1X2zEPfXkn5kSFK32iQe52goqDH0 yG18i2ZSW8GQMjF1idlfHaHPKC2NQvUDe5Su6At7h+a9riEeRx3MCLjoW7/3bSSlGFzRng kwrePJSxKNugAiIQiLxsvAtGz4k6ulkjxexHMDsYXkqpEGT6SD5VJJjUdW+FUsPASIv8Uq /ThSdOpEncc8ZXWBudraiRvKOHScsqk3vKfS+bWj0x4t6pGuPV7wIBZYPQYUzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777134964; a=rsa-sha256; cv=none; b=fzjSqvzzzek1E2sdVBnU710LMlUYdoF7IGZbKMkuJjAwSIVLrBjblPN0yJTC5U+gKBPqmP +A4BcNqUHCN/F6Mo7b5daoSQgW5wCASExYcfFrenQbYlJDaHHOsfnXlsykfL+bUP/Lbnt5 5nkgxZ++7p5sbC9i751Y9VNjkvjgAHI0gKXBWm1oKTr8Gntm1gXES6COGMs/z9TY8nyU+5 wiLcshWCeRXUSe3Q+GNtAMgJ/RMmHUcWP50z858jAkIOIn5pf38h3dKOZggDeSSjSneRHn ITl4kg757Gw7NdK4IseB/fnP93sxMmWBxyF76pqP6mjY72S0hUbL3lsosLO32g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777134964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5jn2sWfApdNTzGygdplfv2GElk9BzA6+UbdmugXRxeQ=; b=CaKI4SIK88OMNcl4kk5zc9In9jyLjQcl41CCoDJ/E0IEdWdoZhmCSZeYHkOy+5aODPImoh HNgaT1zJvoDSOI6c9QOpj37XBorQhcoXJnUpUzMEgenW+JJF3rM/qCXfK/VUvdDJ4Nn6oi VJSqfi2naAqDkScQGNcVAGjDC1aMtqTeSCzFiwGkiWPU3fp+SucM0U+rNsH8PC7UamjbFu s2gn6RNKnRfo/uHMqVA3aTqDrSIktFXpXtjIOfWS0eMwcSR4Mt0IbS1oCsKkYWZjvWMk46 pV1BaLraFRmLTT7DuAFfQ6IY0tmorg2K61+aX0pQRrvLgBM2mrr+lLLJqlYz9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wSN1hrjzj3W for ; Sat, 25 Apr 2026 16:36:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4540f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:36:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 0770a765a204 - stable/14 - asmc: code style modernization and minor cleanups List-Id: Commits to the stable branches 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: 0770a765a20415701c42074fdc2f03aa37a908e3 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:36:04 +0000 Message-Id: <69eced74.4540f.7707e482@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=0770a765a20415701c42074fdc2f03aa37a908e3 commit 0770a765a20415701c42074fdc2f03aa37a908e3 Author: Enji Cooper AuthorDate: 2026-02-20 03:51:13 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:35:58 +0000 asmc: code style modernization and minor cleanups - Allow `ASMC_DEBUG` to be treated as a variadic macro. - Add ellipses around `sizeof(..)` calls. - Reindent some of the lines to better follow style(9) with line wrapping. A number of other clang-format changes were not taken as they are not compatible with style(9). MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55394 (cherry picked from commit e20e26e4e271ecb74e40d9a95ed3112ceaf9604f) --- sys/dev/asmc/asmc.c | 106 +++++++++++++++++++++++----------------------------- 1 file changed, 47 insertions(+), 59 deletions(-) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index f43cced30755..8c7e48dfd121 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -590,9 +590,9 @@ static driver_t asmc_driver = { #define _COMPONENT ACPI_OEM ACPI_MODULE_NAME("ASMC") #ifdef ASMC_DEBUG -#define ASMC_DPRINTF(str) device_printf(dev, str) +#define ASMC_DPRINTF(str, ...) device_printf(dev, str, ##__VA_ARGS__) #else -#define ASMC_DPRINTF(str) +#define ASMC_DPRINTF(str, ...) #endif /* NB: can't be const */ @@ -701,57 +701,50 @@ asmc_attach(device_t dev) name[0] = '0' + j; name[1] = 0; sc->sc_fan_tree[i] = SYSCTL_ADD_NODE(sysctlctx, - SYSCTL_CHILDREN(sc->sc_fan_tree[0]), - OID_AUTO, name, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, - "Fan Subtree"); + SYSCTL_CHILDREN(sc->sc_fan_tree[0]), OID_AUTO, name, + CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "Fan Subtree"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_fan_tree[i]), OID_AUTO, "id", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, - dev, j, model->smc_fan_id, "I", - "Fan ID"); + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, j, + model->smc_fan_id, "I", "Fan ID"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_fan_tree[i]), OID_AUTO, "speed", - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, - dev, j, model->smc_fan_speed, "I", - "Fan speed in RPM"); + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, j, + model->smc_fan_speed, "I", "Fan speed in RPM"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_fan_tree[i]), OID_AUTO, "safespeed", - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, - dev, j, model->smc_fan_safespeed, "I", - "Fan safe speed in RPM"); + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, j, + model->smc_fan_safespeed, "I", "Fan safe speed in RPM"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_fan_tree[i]), OID_AUTO, "minspeed", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, - dev, j, model->smc_fan_minspeed, "I", - "Fan minimum speed in RPM"); + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, dev, j, + model->smc_fan_minspeed, "I", "Fan minimum speed in RPM"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_fan_tree[i]), OID_AUTO, "maxspeed", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, - dev, j, model->smc_fan_maxspeed, "I", - "Fan maximum speed in RPM"); + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, dev, j, + model->smc_fan_maxspeed, "I", "Fan maximum speed in RPM"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_fan_tree[i]), OID_AUTO, "targetspeed", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, - dev, j, model->smc_fan_targetspeed, "I", - "Fan target speed in RPM"); + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, dev, j, + model->smc_fan_targetspeed, "I", "Fan target speed in RPM"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_fan_tree[i]), OID_AUTO, "manual", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, - dev, j, asmc_mb_sysctl_fanmanual, "I", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, dev, j, + asmc_mb_sysctl_fanmanual, "I", "Fan manual mode (0=auto, 1=manual)"); } @@ -766,8 +759,8 @@ asmc_attach(device_t dev) SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_temp_tree), OID_AUTO, model->smc_tempnames[i], - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, - dev, i, asmc_temp_sysctl, "I", + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, i, + asmc_temp_sysctl, "I", model->smc_tempdescs[i]); } @@ -790,16 +783,15 @@ asmc_attach(device_t dev) SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_light_tree), OID_AUTO, "right", - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, - dev, 0, model->smc_light_right, "I", + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, 0, + model->smc_light_right, "I", "Keyboard backlight right sensor"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sc->sc_light_tree), OID_AUTO, "control", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_ANYBODY | - CTLFLAG_MPSAFE, dev, 0, - model->smc_light_control, "I", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_ANYBODY | CTLFLAG_MPSAFE, + dev, 0, model->smc_light_control, "I", "Keyboard backlight brightness control"); } @@ -862,11 +854,8 @@ asmc_attach(device_t dev) goto err; } - ret = bus_setup_intr(dev, sc->sc_irq, - INTR_TYPE_MISC | INTR_MPSAFE, - asmc_sms_intrfast, NULL, - dev, &sc->sc_cookie); - + ret = bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_MISC | INTR_MPSAFE, + asmc_sms_intrfast, NULL, dev, &sc->sc_cookie); if (ret) { device_printf(dev, "unable to setup SMS IRQ\n"); goto err; @@ -919,7 +908,7 @@ asmc_resume(device_t dev) buf[0] = light_control; buf[1] = 0x00; - asmc_key_write(dev, ASMC_KEY_LIGHTVALUE, buf, sizeof buf); + asmc_key_write(dev, ASMC_KEY_LIGHTVALUE, buf, sizeof(buf)); return (0); } @@ -1039,8 +1028,9 @@ nosms: sc->sc_nfan = asmc_fan_count(dev); if (sc->sc_nfan > ASMC_MAXFANS) { - device_printf(dev, "more than %d fans were detected. Please " - "report this.\n", ASMC_MAXFANS); + device_printf(dev, + "more than %d fans were detected. Please report this.\n", + ASMC_MAXFANS); sc->sc_nfan = ASMC_MAXFANS; } @@ -1100,12 +1090,9 @@ asmc_wait(device_t dev, uint8_t val) #ifdef ASMC_DEBUG sc = device_get_softc(dev); -#endif - val = val & ASMC_STATUS_MASK; -#ifdef ASMC_DEBUG - device_printf(dev, "%s failed: 0x%x, 0x%x\n", __func__, val, - ASMC_CMDPORT_READ(sc)); + device_printf(dev, "%s failed: 0x%x, 0x%x\n", __func__, + val & ASMC_STATUS_MASK, ASMC_CMDPORT_READ(sc)); #endif return (1); } @@ -1246,16 +1233,17 @@ out: type[5] = 0; if (maxlen > sizeof(v)) { device_printf(dev, - "WARNING: cropping maxlen from %d to %zu\n", - maxlen, sizeof(v)); + "WARNING: cropping maxlen from %d to %zu\n", maxlen, + sizeof(v)); maxlen = sizeof(v); } for (i = 0; i < sizeof(v); i++) { v[i] = 0; } asmc_key_read(dev, key, v, maxlen); - snprintf(buf, sizeof(buf), "key %d is: %s, type %s " - "(len %d), data", number, key, type, maxlen); + snprintf(buf, sizeof(buf), + "key %d is: %s, type %s (len %d), data", + number, key, type, maxlen); for (i = 0; i < maxlen; i++) { snprintf(buf2, sizeof(buf2), " %02x", v[i]); strlcat(buf, buf2, sizeof(buf)); @@ -1319,7 +1307,7 @@ asmc_fan_count(device_t dev) { uint8_t buf[1]; - if (asmc_key_read(dev, ASMC_KEY_FANCOUNT, buf, sizeof buf) != 0) + if (asmc_key_read(dev, ASMC_KEY_FANCOUNT, buf, sizeof(buf)) != 0) return (-1); return (buf[0]); @@ -1333,7 +1321,7 @@ asmc_fan_getvalue(device_t dev, const char *key, int fan) char fankey[5]; snprintf(fankey, sizeof(fankey), key, fan); - if (asmc_key_read(dev, fankey, buf, sizeof buf) != 0) + if (asmc_key_read(dev, fankey, buf, sizeof(buf)) != 0) return (-1); speed = (buf[0] << 6) | (buf[1] >> 2); @@ -1367,7 +1355,7 @@ asmc_fan_setvalue(device_t dev, const char *key, int fan, int speed) buf[1] = speed; snprintf(fankey, sizeof(fankey), key, fan); - if (asmc_key_write(dev, fankey, buf, sizeof buf) < 0) + if (asmc_key_write(dev, fankey, buf, sizeof(buf)) < 0) return (-1); return (0); @@ -1535,7 +1523,7 @@ asmc_temp_getvalue(device_t dev, const char *key) /* * Check for invalid temperatures. */ - if (asmc_key_read(dev, key, buf, sizeof buf) != 0) + if (asmc_key_read(dev, key, buf, sizeof(buf)) != 0) return (-1); return (buf[0]); @@ -1568,12 +1556,12 @@ asmc_sms_read(device_t dev, const char *key, int16_t *val) case 'X': case 'Y': case 'Z': - error = asmc_key_read(dev, key, buf, sizeof buf); + error = asmc_key_read(dev, key, buf, sizeof(buf)); break; default: device_printf(dev, "%s called with invalid argument %s\n", __func__, key); - error = 1; + error = EINVAL; goto out; } *val = ((int16_t)buf[0] << 8) | buf[1]; @@ -1718,7 +1706,7 @@ asmc_mbp_sysctl_light_left(SYSCTL_HANDLER_ARGS) int error; int32_t v; - asmc_key_read(dev, ASMC_KEY_LIGHTLEFT, buf, sizeof buf); + asmc_key_read(dev, ASMC_KEY_LIGHTLEFT, buf, sizeof(buf)); v = buf[2]; error = sysctl_handle_int(oidp, &v, 0, req); @@ -1733,7 +1721,7 @@ asmc_mbp_sysctl_light_right(SYSCTL_HANDLER_ARGS) int error; int32_t v; - asmc_key_read(dev, ASMC_KEY_LIGHTRIGHT, buf, sizeof buf); + asmc_key_read(dev, ASMC_KEY_LIGHTRIGHT, buf, sizeof(buf)); v = buf[2]; error = sysctl_handle_int(oidp, &v, 0, req); @@ -1757,7 +1745,7 @@ asmc_mbp_sysctl_light_control(SYSCTL_HANDLER_ARGS) light_control = v; buf[0] = light_control; buf[1] = 0x00; - asmc_key_write(dev, ASMC_KEY_LIGHTVALUE, buf, sizeof buf); + asmc_key_write(dev, ASMC_KEY_LIGHTVALUE, buf, sizeof(buf)); } return (error); } @@ -1770,7 +1758,7 @@ asmc_mbp_sysctl_light_left_10byte(SYSCTL_HANDLER_ARGS) int error; uint32_t v; - asmc_key_read(dev, ASMC_KEY_LIGHTLEFT, buf, sizeof buf); + asmc_key_read(dev, ASMC_KEY_LIGHTLEFT, buf, sizeof(buf)); /* * This seems to be a 32 bit big endian value from buf[6] -> buf[9]. From nobody Sat Apr 25 16:37:04 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wTX59G0z6bmrg for ; Sat, 25 Apr 2026 16:37:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wTX4B4tz3C4W for ; Sat, 25 Apr 2026 16:37:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777135024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0o/LdUam9SJlmWVnUA69DDtMDGWZkSeufSvPaEY8LL4=; b=abtnfnqxIoscbt96aCxTMlXCKBGtsSBMR7o2Wd+vWnu0Gw1SgyF9jYXUMcP0CjHSZw5jCn HfJUWC0B/b6nRitssnMsr6kNMQhNdMdBjvJIb0UsenhiHIg36GeVAI/g43UF21obYiCpAM 0/AfRuNuVQiboN1qEoGHQCJ7v/Yv4dPYuxTXmSXQRcoweDks728frn8EmcfdtQZj3Y/w/h aWxiuJVz8dng9hnOkdmgp13hOYLFHyqW7J7fW9GJKQW26iRxkR1YF2+zhGFvc+nMj6mcaC SPsToMr7OpIDbS7MVNnc89vGFTXMlDxfThpF45xDyDWRGRFPusIu2CG3WL+Kow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777135024; a=rsa-sha256; cv=none; b=WcrDlvYaSvZLCiYQW9pzEvkP/jgukI5rpp9w1FILttnIdPEaxSogA1w9SjQOxj1FrcIpVc nEo6lWT+Xtgslhr4hN1JTLy92WifT75MyJ0sfp/ne/qmjEU/FS1htFNKY+AFPe6fUKhXBV m4G+9x01Fdaz5GFWbjWVJ70RNB/RL8Lu76YqNBlxMlRp6l2bSSyxWHna8eGUZ0OkTwnpSY qMmD1A6KUzl+Gsit2+TCbW3+aDkPlCYBiiA5mIG35kMqfqU2PywEo0r8zCq2tMTKMt8kBV Jbh0zQX0WLpfL6Jdy6owQ82YUPobTs2EfSnLspAGXQ/VqK6Ld+OemJY2ByHXHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777135024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0o/LdUam9SJlmWVnUA69DDtMDGWZkSeufSvPaEY8LL4=; b=IyIrjLZ7c56fTgmrSTGlR6SGMKISc+Xg9b31cAYCZY0mU2SDpC5ebMEdH3ZXhVh13xghCB ENZx55Q6oaFnv+8JB1ucwMAya5v/gO+/YdwMWOO+ZqTruZ6ZKO8CJSlQerLQ9mNvLW7hWM 1ptqBw5ZQoS3BY42H4nHwjMFyZ6OFIGoeAGo9/d026XlOJc9Kr9WGDXtSiJrbJ0rMGgEN3 l5M7OpBuy3R0AWiwFx4sl49LxzJoYjV5NaDbPHjacddAnXuYG39Cor3DQUOQoFizw7Evsm oLBt1fBIryg8ODMRMNx0ttfyZnAy+wSI8khGffvIUXVawWJL2P54geJOFvpoGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wTX3lFhzhpb for ; Sat, 25 Apr 2026 16:37:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 451a0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:37:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 0f79ce721c25 - stable/15 - asmc: use symbolic names with the MacPro3,1 model List-Id: Commits to the stable branches 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/15 X-Git-Reftype: branch X-Git-Commit: 0f79ce721c25486c03f7b9bfa7c57efb815f40f7 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:37:04 +0000 Message-Id: <69ecedb0.451a0.27172673@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=0f79ce721c25486c03f7b9bfa7c57efb815f40f7 commit 0f79ce721c25486c03f7b9bfa7c57efb815f40f7 Author: Enji Cooper AuthorDate: 2026-02-20 06:24:38 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:36:55 +0000 asmc: use symbolic names with the MacPro3,1 model Use `ASMC_LIGHT_FUNCS_DISABLED` and `ASMC_SMS_FUNCS_DISABLED` instead of the unrolled versions of the macros. This makes it easier to adjust the underlying macros/fields for `struct asmc_model`. No functional change intended. MFC after: 1 week (cherry picked from commit 90edc16166a6fef03d2384247d07d64656f03309) --- sys/dev/asmc/asmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index 4007670ab8d9..f4e38736d31f 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -420,9 +420,9 @@ static const struct asmc_model asmc_models[] = { /* Idem for the Mac Pro (Early 2008) */ { "MacPro3,1", "Apple SMC Mac Pro (Early 2008)", - NULL, NULL, NULL, + ASMC_SMS_FUNCS_DISABLED, ASMC_FAN_FUNCS, - NULL, NULL, NULL, + ASMC_LIGHT_FUNCS_DISABLED, ASMC_MP31_TEMPS, ASMC_MP31_TEMPNAMES, ASMC_MP31_TEMPDESCS }, From nobody Sat Apr 25 16:37:50 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wVR0C85z6bmlb for ; Sat, 25 Apr 2026 16:37:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wVQ6YGCz3CQJ for ; Sat, 25 Apr 2026 16:37:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777135070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M6Qj28mDhn+YUvDJeJVcjfJ8jhy8X8uwwPgolBM4zS8=; b=pGed+Z6RsrylhiYTZ3ebUrtOw+qX5IW1IlJjLEkkjgJzgs2j2kc91wu6VZALNE9qjjOmnF d/Q3xCSqGJbwXGFiC4aO08I6fQ026cz1B4YTMJ7G5UnhSstQTxmpfy2q50d9DYFlWKW4g9 z/2H9sUXPDQztj40IEThRG9qHPwYWLPt/YGDq74WWMGwetlA8Vk9X1hTFs6hITWyV4BJ8N cZh97dGjxZH2XBMe0DQOK53ulZz5vtRiGjoXAQogLMpYIvpGWMeGdrjHeYOblKGqE1puIs Scu6h1JUTJ6XYJD68B+htCG1cHtbE72z2c6ye7nWbVYbdCGfid3+/AUU60V7SQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777135070; a=rsa-sha256; cv=none; b=SvIOpagDWtgeGMXQSJ2O28+Xv705SLKUVCRrat7VxWFUij5fNa9x1Ey4HmwAaiSqhgBO9Q sHnXlmanIMyggJXvU6JYeZg673r6csjOHMBXOI0V3yDGoOek05ebWa4+MHVTbMOdNzXimM RPoOs5E6+4CEm9MUE3JeCLdFtcoiAm4SyvKiKo92Fh0Xd25ig4D5glm/CKTOLOySPZUybW YQ504jtOcI/P7gpz+Fxmwuv8xH3bVL5kDxNVakpVweHatWwWze6k3L4pD5fNfdZKdjnQLH FV9PR6zyOeed+RhQ3/Jtg0sHhYyorsRq033wLInkLDnvBLBZbu7uzhoNR6mKJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777135070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M6Qj28mDhn+YUvDJeJVcjfJ8jhy8X8uwwPgolBM4zS8=; b=c/1N75ewwX4g0fLLnTFI+w7fgR8w99tNTtBHasUR+Srhcj8eL07c9Abump9+7Mmyn/tLLq Qm+RU5MlxXpKz+11ZelSdkH/L+85byKMY0CW8vUkabRJnMzyYMSLw3g0jt3PDRdzbtj8qP pOViejeX/3cd7i5Zea09SHptRVyP5FUS/ZeLdfrbrZBJI92PVLSMjYZwbNImBgjWzjlPcP IXpdWqIYsCrHxiIc3HyXreOp8hxQUX45VkWf9aTfucCmUphBpISox9pIeWxrbfzJMDTSnE fZDCKkWqYTMu/zGtB2gwiySaBlDZcoyljOtcG3yCoR6zAx+RMgvtrmlTmVVglQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wVQ5sDTzj3X for ; Sat, 25 Apr 2026 16:37:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42b75 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:37:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: c8ad757af8c8 - stable/14 - asmc: use symbolic names with the MacPro3,1 model List-Id: Commits to the stable branches 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: c8ad757af8c87f15ae6e007c2e6bc65140464c15 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:37:50 +0000 Message-Id: <69ecedde.42b75.528df51@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=c8ad757af8c87f15ae6e007c2e6bc65140464c15 commit c8ad757af8c87f15ae6e007c2e6bc65140464c15 Author: Enji Cooper AuthorDate: 2026-02-20 06:24:38 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:37:08 +0000 asmc: use symbolic names with the MacPro3,1 model Use `ASMC_LIGHT_FUNCS_DISABLED` and `ASMC_SMS_FUNCS_DISABLED` instead of the unrolled versions of the macros. This makes it easier to adjust the underlying macros/fields for `struct asmc_model`. No functional change intended. MFC after: 1 week (cherry picked from commit 90edc16166a6fef03d2384247d07d64656f03309) --- sys/dev/asmc/asmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index 8c7e48dfd121..7f3a661b863b 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -420,9 +420,9 @@ static const struct asmc_model asmc_models[] = { /* Idem for the Mac Pro (Early 2008) */ { "MacPro3,1", "Apple SMC Mac Pro (Early 2008)", - NULL, NULL, NULL, + ASMC_SMS_FUNCS_DISABLED, ASMC_FAN_FUNCS, - NULL, NULL, NULL, + ASMC_LIGHT_FUNCS_DISABLED, ASMC_MP31_TEMPS, ASMC_MP31_TEMPNAMES, ASMC_MP31_TEMPDESCS }, From nobody Sat Apr 25 16:40:57 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wZ71Gmpz6bnGr for ; Sat, 25 Apr 2026 16:41: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wZ70FnCz3D43 for ; Sat, 25 Apr 2026 16:41:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777135263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EqqTT3VNv3NL5N9PmXgcdidwPJg+5h3mYNh0LYui8Uw=; b=LkHEXap7qRd3lIsGkyceLcywi4Xp+aA6FMIKOOnn3WxtcfFUgAZtwE5WNvu22DAQioqXb1 LGOtaDqUjOz1Lbj75DErd6C72wYnNHxa7WsyXXhqPlhtlLQvT72qhjwdA8EM97ekkczzOL t6CLdKER/C+LsNx82JYYx0BX9GuolOwJz4WHxqKTr3JUsLdylHcPMsFV7kV8PcKMiGVTMk r3cEbNU552oQmDB+4ddy8pwIypA2SVFmdPHjOc6kswWE6i8I8Tg27xfeYMq9GEiOqoGucM uoH/ZScn3EpHj8JyD45yJHAs+7yPXwk3Yijr9d43CIJCpOc6xfxhjF22EVqQvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777135263; a=rsa-sha256; cv=none; b=A4WN2ZuLrTAYJibyeuG56vjuRj+ow2SkDkcJQ3AfbCkDRh6Lm6+Yqq2RZV8Lurv5SmDmDP uKvBqzAHdX5ZPDkB4Jduh7W4vzcW2eGNORHKreyON6XWdjcYbSaKRBsBMPs2QGZBpd+qy/ P2DvRIN/28A46vPY1l2sQnyFAb3pYFzPuh2a38VXbLgI/CI5OTk38c16/ccqyFrqEH3/zA oMkuRUBX9Dg0beq5SqYx065rJqLt9qFWI3URVFTM3rXP80At5txg+iKiQLLzhM7hb37Rhi HEKXvh9peogvp20sHNOUIJG7LChq6TXqVoQramTFSK1dMADafr84AMBkp0PhaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777135263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EqqTT3VNv3NL5N9PmXgcdidwPJg+5h3mYNh0LYui8Uw=; b=hsxJA1H9MLr8SVPgwhGood0WxdMJ5b2MxWgeEcQQ053+99INkDdCzhNfOAu3nRLtx1lBHy WH64PM3Vi+WNC6WEJWT0+EMfZzcFCk/01xKu8vIx2IhBxDZpMkQylbbAiTFfY8CCERhQO2 qlIhEMvARRNyh9IXGWC+C4wOozFv/mYEimQhvGUteBGLbiSyoAkdVJgv5Yaml9xsssgRyi FLMVSToqswFwBxOC6cb6za0tIXREFAvpJSLwQXCfH+I46zJcGvAIMHj7xhR0bCSTLa35/a WVzMMtg5AydIntP3BufJXv/lq4DDKjmxdmYYr41PjLlzkrcJhHMOZsck/h3J+Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wZ66tR0zjNl for ; Sat, 25 Apr 2026 16:41:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4616d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:40:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: tslight From: Enji Cooper Subject: git: ae09e4a904e5 - stable/14 - Add ASMC support for Macbook Pro 8,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/14 X-Git-Reftype: branch X-Git-Commit: ae09e4a904e5b6bca9ba2847d2788cd4e5fd19c7 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:40:57 +0000 Message-Id: <69ecee99.4616d.3eb4a08b@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=ae09e4a904e5b6bca9ba2847d2788cd4e5fd19c7 commit ae09e4a904e5b6bca9ba2847d2788cd4e5fd19c7 Author: tslight AuthorDate: 2026-01-27 16:44:40 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:40:45 +0000 Add ASMC support for Macbook Pro 8,3 Signed-off-by: tslight Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1992 (cherry picked from commit 16c82e28404ec959a7335ceae1d4f43881a50d9e) --- sys/dev/asmc/asmc.c | 6 ++++++ sys/dev/asmc/asmcvar.h | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index 7f3a661b863b..adacf98ed9e0 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -279,6 +279,12 @@ static const struct asmc_model asmc_models[] = { ASMC_MBP82_TEMPS, ASMC_MBP82_TEMPNAMES, ASMC_MBP82_TEMPDESCS }, + { + "MacBookPro8,3", "Apple SMC MacBook Pro (early 2011, 17-inch)", + ASMC_SMS_FUNCS, ASMC_FAN_FUNCS2, ASMC_LIGHT_FUNCS, + ASMC_MBP83_TEMPS, ASMC_MBP83_TEMPNAMES, ASMC_MBP83_TEMPDESCS + }, + { "MacBookPro9,1", "Apple SMC MacBook Pro (mid 2012, 15-inch)", ASMC_SMS_FUNCS_DISABLED, ASMC_FAN_FUNCS, ASMC_LIGHT_FUNCS, diff --git a/sys/dev/asmc/asmcvar.h b/sys/dev/asmc/asmcvar.h index 5afc1012849c..95a117f59533 100644 --- a/sys/dev/asmc/asmcvar.h +++ b/sys/dev/asmc/asmcvar.h @@ -335,6 +335,39 @@ struct asmc_softc { "TMBS", "TP0P", "TPCD", "TW0P", "Th1H", \ "Th2H", "Tm0P", "Ts0P", "Ts0S" } +#define ASMC_MBP83_TEMPS { "ALSL", "F0Ac", "F1Ac", "IB0R", "IC0R", \ + "ID0R", "IG0R", "IO0R", "PCPC", "PCPG", \ + "PCPT", "PD0R", "TB1T", "TB2T", "TC0C", \ + "TC0D", "TC0P", "TC1C", "TC2C", "TC3C", \ + "TC4C", "TG0D", "TG0P", "THSP", "TP0P", \ + "TPCD", "Th1H", "Th2H", "Tm0P", "Ts0P", \ + "VC0C", "VD0R", "VG0C", "VN0C", "VP0R", NULL } + +#define ASMC_MBP83_TEMPNAMES { "ambient_light", "fan_leftside", "fan_rightside", \ + "battery_current", "cpu_vcorevtt", "dc_current", \ + "gpu_voltage", "other", "cpu_package_core", \ + "cpu_package_gpu", "cpu_package_total", "dc_in", \ + "battery_1", "battery_2", "cpu_die_digital", \ + "cpu_die_analog", "cpu_proximity", "cpu_core_1", \ + "cpu_core_2", "cpu_core_3", "cpu_core_4", "gpu_die_analog", \ + "gpu_proximity", "thunderbolt", "platform_controller", \ + "pch_die_digital", "right_fin_stack", "left_fin_stack", \ + "dc_in_air_flow", "palm_rest", "cpu_vcore", "dc_in_voltage", \ + "gpu_vcore", "intel_gpu_vcore", "pbus_voltage" } + +#define ASMC_MBP83_TEMPDESCS { "Ambient Light", "Fan Leftside", "Fan Rightside", \ + "Battery BMON Current", "CPU VcoreVTT", "DC In AMON Current", \ + "GPU Voltage", "Other 5V 3V", "CPU Package Core", \ + "CPU Package GPU", "CPU Package Total", "DC In", \ + "Battery Sensor 1", "Battery Sensor 2", "CPU Die Digital", \ + "CPU Die Analog", "CPU Proximity", "CPU Core 1 DTS", \ + "CPU Core 2 DTS", "CPU Core 3 DTS", "CPU Core 4 DTS", \ + "GPU Die Analog", "GPU Proximity", "Thunderbolt Proximity", \ + "Platform Controller Hub", "PCH Die Digital", \ + "Right Fin Stack Proximity", "Left Fin Stack Proximity", \ + "DC In Proximity Air Flow", "Palm Rest", "CPU VCore", \ + "DC In Voltage", "GPU VCore", "Intel GPU VCore", "PBus Voltage" } + #define ASMC_MBP91_TEMPS { "TA0P", "TB0T", "TB1T", "TB2T", "TC0E", \ "TC0F", "TC0P", "TC1C", "TC2C", "TC3C", \ "TC4C", "TCGC", "TCSA", "TCXC", "TG0D", \ From nobody Sat Apr 25 16:41:08 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wZD5gJnz6bn0v for ; Sat, 25 Apr 2026 16:41:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wZD49lHz3D0J for ; Sat, 25 Apr 2026 16:41:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777135268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MGNXViianLANczcGHsrfDt3YClMQfOWa1f44ygBLFNo=; b=J2hXDKMt7fwYRFk9WI9wF4DGf1fkbRsubFisSJNMtJatJLXeWcTQYYRRdOrI5H8AqNjdvu uYWyoGQm/rJgryaHU1cJ8ebPf5ve1jQ2LUjqmk7izcaTWSPeTqZ5vosZFvOq1oLNDkt2HO 17aRSE1TD4HGjHwL176Nt+fwzsMQzBw8sbcIhYbnTFXtSbFMZzsEyz9peYfqpO2PSBovtz NmkPYQPxROvCSKxha5EHLsD0izyUXtZWUBNVfYhM1JrJvXQfTod2xotCXe8xB9YuoM5VrY fjpn3doBazYxwoyiAXa4ue3XkChEdmJ9Sj2eFt0CyOVwdvHFhoNsFWNYXQNqtA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777135268; a=rsa-sha256; cv=none; b=Fmw5F32lcvojZRc5lbVS0+7bv4acS/+ADIvoxrxv2Zi/34KbD3EJLnnJVDJIjUGeUk7izN SnVSlJI6DdsdNUlRt/mGw725UdSy8gjcrRGsgSC9LWwYw/mXBq7MLCH/BTehbvh+CoV4Ra 6PECinmF7u7CUdAF7tWEN6ZbAyx3tgobTwgUSVErJk0m6ORrtrD6M3tX9cdMsyrHFjQqrL foEf0A0JlMhpQhVifOm87QiFN6/qrbx6sozBLT9TpIgRf8gY16jpKY2SindzZCQz7wpUEF UyR3SV48lkLaKa5sgiqGisehWnfHeuTxMcvQpY9nT5loPKnXQEhpD9tAqTioTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777135268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MGNXViianLANczcGHsrfDt3YClMQfOWa1f44ygBLFNo=; b=UAP+6fX+uofOdZccLwNP+OEQa8iO+pDozYS93WACiR2NGFw91G8HXDWam1mBfY7EOye07S zkOMVo4r50qX7BcWQQWC+GoOWQ3s7x1xjGbo6pnIX0eQBi9dlh/JvU/aQLpYWD0xM+8/uI 4y3CGEp2JURMcV8IImThrFOdiEo/EdFnR76pWLqEsZZKN4UvOt/imTgOZZWtOWJ0txoizD LeHNBIotpeEP2y5v+LNLw96dI3mK75cIFU6ll1gVUUDrqeMpRK4PZBfzTyAWTZsEDBKZDO CMpEs2mKGB6ayKRdInaS6WqcT4EB8NS9aQJmHwcVR3ycRwWalaUPOiMqqN2LZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wZD3Q2szjHl for ; Sat, 25 Apr 2026 16:41:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 451d2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:41:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: tslight From: Enji Cooper Subject: git: cac23681cbbb - stable/15 - Add ASMC support for Macbook Pro 8,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/15 X-Git-Reftype: branch X-Git-Commit: cac23681cbbb7cb459c515a8a924d89bc08ba7a5 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:41:08 +0000 Message-Id: <69eceea4.451d2.3e7a5df5@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=cac23681cbbb7cb459c515a8a924d89bc08ba7a5 commit cac23681cbbb7cb459c515a8a924d89bc08ba7a5 Author: tslight AuthorDate: 2026-01-27 16:44:40 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:41:02 +0000 Add ASMC support for Macbook Pro 8,3 Signed-off-by: tslight Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1992 (cherry picked from commit 16c82e28404ec959a7335ceae1d4f43881a50d9e) --- sys/dev/asmc/asmc.c | 6 ++++++ sys/dev/asmc/asmcvar.h | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index f4e38736d31f..757f8d72e1b9 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -279,6 +279,12 @@ static const struct asmc_model asmc_models[] = { ASMC_MBP82_TEMPS, ASMC_MBP82_TEMPNAMES, ASMC_MBP82_TEMPDESCS }, + { + "MacBookPro8,3", "Apple SMC MacBook Pro (early 2011, 17-inch)", + ASMC_SMS_FUNCS, ASMC_FAN_FUNCS2, ASMC_LIGHT_FUNCS, + ASMC_MBP83_TEMPS, ASMC_MBP83_TEMPNAMES, ASMC_MBP83_TEMPDESCS + }, + { "MacBookPro9,1", "Apple SMC MacBook Pro (mid 2012, 15-inch)", ASMC_SMS_FUNCS_DISABLED, ASMC_FAN_FUNCS, ASMC_LIGHT_FUNCS, diff --git a/sys/dev/asmc/asmcvar.h b/sys/dev/asmc/asmcvar.h index 5afc1012849c..95a117f59533 100644 --- a/sys/dev/asmc/asmcvar.h +++ b/sys/dev/asmc/asmcvar.h @@ -335,6 +335,39 @@ struct asmc_softc { "TMBS", "TP0P", "TPCD", "TW0P", "Th1H", \ "Th2H", "Tm0P", "Ts0P", "Ts0S" } +#define ASMC_MBP83_TEMPS { "ALSL", "F0Ac", "F1Ac", "IB0R", "IC0R", \ + "ID0R", "IG0R", "IO0R", "PCPC", "PCPG", \ + "PCPT", "PD0R", "TB1T", "TB2T", "TC0C", \ + "TC0D", "TC0P", "TC1C", "TC2C", "TC3C", \ + "TC4C", "TG0D", "TG0P", "THSP", "TP0P", \ + "TPCD", "Th1H", "Th2H", "Tm0P", "Ts0P", \ + "VC0C", "VD0R", "VG0C", "VN0C", "VP0R", NULL } + +#define ASMC_MBP83_TEMPNAMES { "ambient_light", "fan_leftside", "fan_rightside", \ + "battery_current", "cpu_vcorevtt", "dc_current", \ + "gpu_voltage", "other", "cpu_package_core", \ + "cpu_package_gpu", "cpu_package_total", "dc_in", \ + "battery_1", "battery_2", "cpu_die_digital", \ + "cpu_die_analog", "cpu_proximity", "cpu_core_1", \ + "cpu_core_2", "cpu_core_3", "cpu_core_4", "gpu_die_analog", \ + "gpu_proximity", "thunderbolt", "platform_controller", \ + "pch_die_digital", "right_fin_stack", "left_fin_stack", \ + "dc_in_air_flow", "palm_rest", "cpu_vcore", "dc_in_voltage", \ + "gpu_vcore", "intel_gpu_vcore", "pbus_voltage" } + +#define ASMC_MBP83_TEMPDESCS { "Ambient Light", "Fan Leftside", "Fan Rightside", \ + "Battery BMON Current", "CPU VcoreVTT", "DC In AMON Current", \ + "GPU Voltage", "Other 5V 3V", "CPU Package Core", \ + "CPU Package GPU", "CPU Package Total", "DC In", \ + "Battery Sensor 1", "Battery Sensor 2", "CPU Die Digital", \ + "CPU Die Analog", "CPU Proximity", "CPU Core 1 DTS", \ + "CPU Core 2 DTS", "CPU Core 3 DTS", "CPU Core 4 DTS", \ + "GPU Die Analog", "GPU Proximity", "Thunderbolt Proximity", \ + "Platform Controller Hub", "PCH Die Digital", \ + "Right Fin Stack Proximity", "Left Fin Stack Proximity", \ + "DC In Proximity Air Flow", "Palm Rest", "CPU VCore", \ + "DC In Voltage", "GPU VCore", "Intel GPU VCore", "PBus Voltage" } + #define ASMC_MBP91_TEMPS { "TA0P", "TB0T", "TB1T", "TB2T", "TC0E", \ "TC0F", "TC0P", "TC1C", "TC2C", "TC3C", \ "TC4C", "TCGC", "TCSA", "TCXC", "TG0D", \ From nobody Sat Apr 25 16:43:02 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wcW5yCjz6bnVl for ; Sat, 25 Apr 2026 16:43:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wcW54hVz3Dt0 for ; Sat, 25 Apr 2026 16:43:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777135387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iReIGWlT6nyfzP3MGw2cCPkofCNcstcg16JwupTzvB0=; b=JVKDdNGgRjXYSJiEm5E5fgTQcPHKNV3ozLKYA2DN8QNWNTgnqto6xoRLaJwcRJrnwf9qYw 0IzwcH8IfXbXyYi2OPjPgtt21IhvpPCKslUGFhgGCsmacf+zETVHqUCj6sSTY0jhg88UeR znG+yoRb/6ym6Kn/JLAsOiLlA56TjPjfvqjPlpaonmYA7yS+Wo16IPPN3vDj22gWi5wcwH 2ml+xWgQ4lEG6qZ95xxpmb7VG2fYJ5XgfGGgYME6J6hMyj4bpwmMXLSbeRCiOtd5IDBImU Toi27tGtYkwx+igban/Bzxcusynwr7Q+Eygg7Yraqxku8HM2wQlhFJm2MOFnvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777135387; a=rsa-sha256; cv=none; b=jCUePO22ZNXEs+awlTy+6cgqo+RGSQoibMP9sxWGx3q/55f8xB71d9Ev+bYT2H29CGqL4x uJlhCoggKRh4YwTx9WgBhH7qv1fxHMR9iO8JHz3ygFq+VxQOCKTdFnlLeXerKJEJv8GtrY qM+2yMN+cH9hB0sgxjUNjvudlhXB0ayKhICq8X9ebWT4kfYxsqOLuWQSRM/HBZN8S+unzW GFGgKZG/f07U4BQyIkHWaWaEI92Ct5X82hNavOhk95l8vcqRZKYtP0M6NvYJmybSxb1cl/ 5KXTI92oTvbvZza8wQGLlmSqraabcHcsrYxMf8apZ0dpbqwKpp/JIwOvhqPwaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777135387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iReIGWlT6nyfzP3MGw2cCPkofCNcstcg16JwupTzvB0=; b=CM97ApyiMUTSled8RDSSXCOZhxkuCDzAehQFe4TFReWb28FY7LG1SPQ7Qpg5TYwlnysoxe Vr1Dpq1AN5avUsi9YRrq+v9Dk47/cATrl8HX8KUu8bIaChoKpwTnbef05QKxsneo80/QQd 2oaTQcq02UzgdT0BB7q7J7Ug+qoXnEE6VwLhaB5MyjLbcND8a1sNRIoBa5pDKTDdDVKwGc VE1Ddb2CYILTuIhWxs/yLJsSi5D70lL7Z56X9eg6qR38KjIhnbeu5SCH9Qz96Aa7KAYusv swyedEbk3dToPjA4BStjd3wZ5GBuMeEZq764SHOqWFuwa+DfgY650QZ60y9npA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wcW4SVqzjP8 for ; Sat, 25 Apr 2026 16:43:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 46311 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:43:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: tslight From: Enji Cooper Subject: git: a2c76430981f - stable/15 - use ASMC_FAN_FUNCS2 to avoid trying to read non-existent keys List-Id: Commits to the stable branches 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/15 X-Git-Reftype: branch X-Git-Commit: a2c76430981f50c553bc1fbd699fa30bd75e5eba Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:43:02 +0000 Message-Id: <69ecef16.46311.7e7ce743@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=a2c76430981f50c553bc1fbd699fa30bd75e5eba commit a2c76430981f50c553bc1fbd699fa30bd75e5eba Author: tslight AuthorDate: 2026-02-26 07:44:44 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:42:53 +0000 use ASMC_FAN_FUNCS2 to avoid trying to read non-existent keys Signed-off-by: tslight Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2051 (cherry picked from commit cecd12ac3b4d98bd52dc0e802a4a38bc72f50e2c) --- sys/dev/asmc/asmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index 757f8d72e1b9..d680db49dfda 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -311,7 +311,7 @@ static const struct asmc_model asmc_models[] = { { "MacBookPro11,4", "Apple SMC MacBook Pro Retina Core i7 (mid 2015, 15-inch)", - ASMC_SMS_FUNCS_DISABLED, ASMC_FAN_FUNCS, ASMC_LIGHT_FUNCS, + ASMC_SMS_FUNCS_DISABLED, ASMC_FAN_FUNCS2, ASMC_LIGHT_FUNCS, ASMC_MBP114_TEMPS, ASMC_MBP114_TEMPNAMES, ASMC_MBP114_TEMPDESCS }, From nobody Sat Apr 25 16:43:11 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wcb73Jrz6bnVq for ; Sat, 25 Apr 2026 16:43:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wcb4DXpz3F7s for ; Sat, 25 Apr 2026 16:43:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777135391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qVz1gK0kKPHcNkG6b6OC5A7XDhknA/yH0MseqR6z5KA=; b=T00pEqDAFYaiDkNe3DQ8tW0GA7qRJwoXqYUNacIFx38TDS2DS9wX9Nbl6lXWcprTa4RvJ0 HLrF2U1iIeK1mBUXoJJEvoG6ihQekKi52KmTbVWWlH8S6e2NJB1bnrDPxzcnnQMPhhd6ji aJxtsM3++2gQPMi79p2pqT2Ap2rYZIWfvQWAKksHJm7yUdo/BYsB8HwJz9fwRC4btey/2A ddmAr36zEQadN4ML/A9mc8j3Shw2fg+EVN+1KNiN4t2IIsiGTdW1okcq/e1nXGFuXBP6SC m0wFb0aG3w3ONU4wtW+slnZ8Q4PO5CrEdVdkl3cuTqMufRJI4CYynVq14k7Q/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777135391; a=rsa-sha256; cv=none; b=yENHPF9c05OWsG37i/+aFu5Yr6XCofWafI7kAM5PXMZvchHuzjrnzox7GBDCTh+2ii31SI 8H5Wf14aOMsCXi0aDsD+kjakUlUP48KTfs4B8Ctvh3eT1Hbyp96oNK7/b/EQVqfT1kZWFB ShS2kRZpY3zybvAWZqbD0MI6mhJd74CnkBhe5r0Qim31LrAnEdNrFwSOy/mN9JLj2iLC8D Dpxyi6W3pmBxaJgdwzwd79h6x9njZqGwd8Q/Py+j0HIHrb0HBO3tPcDZ+uvUBQAvNeH5IS SdkXvUeXfhxdMCp4RkxHKHzfsVQPqh5IfSkoWlcCoTfINJRunKd6YdIAkeX6lg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777135391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qVz1gK0kKPHcNkG6b6OC5A7XDhknA/yH0MseqR6z5KA=; b=gSNCt27/hGGHmELjEml+6D2N0r/XNgUGmjQMrOw+l0c63/Lz2EsAEDwrifP8B+FsdDlVxD JtNYrFEXr514b0OHQ9YtSUCvogssSQVztX+ppfCDC2QGzhhc25BmVDpXoefQicXIlWMu2C GDnVVLknmc5i2nDuXtAlvk/RAFipj+5yIpYghvccOMo/Csr4H+WnD3WVNS0fPFApE1J1/3 PDn0c+EbW9hMlXzIBSjt10lqjUH8E3nVQQRmdBbu+OPez8f33F21WAniDrCQA/W65H+tUL mhZDaRVEytBr/DnD4iLj7eOgXvBGAofC4TvefnPUlrMaIL/WNyNLwgvN85Eb1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wcb2PbjzjY3 for ; Sat, 25 Apr 2026 16:43:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 47039 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:43:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: tslight From: Enji Cooper Subject: git: ca93c983ab94 - stable/14 - use ASMC_FAN_FUNCS2 to avoid trying to read non-existent keys List-Id: Commits to the stable branches 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: ca93c983ab9480264fe867b49b44b03578baeae2 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:43:11 +0000 Message-Id: <69ecef1f.47039.7dac181c@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=ca93c983ab9480264fe867b49b44b03578baeae2 commit ca93c983ab9480264fe867b49b44b03578baeae2 Author: tslight AuthorDate: 2026-02-26 07:44:44 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:43:06 +0000 use ASMC_FAN_FUNCS2 to avoid trying to read non-existent keys Signed-off-by: tslight Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2051 (cherry picked from commit cecd12ac3b4d98bd52dc0e802a4a38bc72f50e2c) --- sys/dev/asmc/asmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index adacf98ed9e0..4bba16fa6a89 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -311,7 +311,7 @@ static const struct asmc_model asmc_models[] = { { "MacBookPro11,4", "Apple SMC MacBook Pro Retina Core i7 (mid 2015, 15-inch)", - ASMC_SMS_FUNCS_DISABLED, ASMC_FAN_FUNCS, ASMC_LIGHT_FUNCS, + ASMC_SMS_FUNCS_DISABLED, ASMC_FAN_FUNCS2, ASMC_LIGHT_FUNCS, ASMC_MBP114_TEMPS, ASMC_MBP114_TEMPNAMES, ASMC_MBP114_TEMPDESCS }, From nobody Sat Apr 25 16:48:03 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wkD2RvPz6bnJZ for ; Sat, 25 Apr 2026 16:48: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wkD1wsYz3FgH for ; Sat, 25 Apr 2026 16:48:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777135684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kxM7lMXhJBjXo6EdWaY7pKpRwl9/4uaOOROKk3vfTPw=; b=GERkpabp4irPaRzZz4x/jQks8cwsn4mOWt0eAUTx2+6/ICrX89GazZQat8DqmJHZLULEgy woxy+zbh8sgZdjekz85MRw8wG+jDU4CBmT7ejRDFs12ZeW5hpTQ2+evN+SMZB6UQsq6w+k m+IDnahBW//0c9AYCftLxZDF7S5+wHv4EPUqERaOpadWHUsX8CUvUNpSGrp4x//Z8md7gL 28mZ5hJYu0YXn7OnVap90HXsji8afVtWuD13rrv7Q0Lj4qu1eKAsY4SPy7p760wWuRKmrT c+GqmTmg8Q/Isyxz0Lxto7rm952zsrFUf0n9G90KlIFgZ/GBwymH++bE+Sli7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777135684; a=rsa-sha256; cv=none; b=x9bjay0kL4GdQlSEtamKFWPlZn+D7krlx7rGbOS78grGGEvDa0NkKInwLpn0CEXdZfTc9y wATGi38QAPTbyTYQhIbIbkug4TXObUjNrESwknnUS5FKgl/eZjT2B62GL6zLdXFVkJT/pz IDi/xWzE6hJI+NgIa7Sg5WJg2hnQf9WYHoMuuX7r647C+49O9pSGT0kUke2Z/DCngk/Hy7 CVMmUkPkKvvlGcJmgZSxHW3XQ3XE/naY8RbODaWRgX1UP67yp91y40JLUR8NC9avMAorCg 8ZYEaYbTNqPnmOO20YussefD7BlkPLLzAPai5o2Q0b1e4Pn2VVcB7uYhxNT7jQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777135684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kxM7lMXhJBjXo6EdWaY7pKpRwl9/4uaOOROKk3vfTPw=; b=KqJ2+w8RDwtdXN36h561gIenhhAbPQzver2RFFOF57BVrJ+2TIygPxoRddOL1Gi8zkCcuJ 4zaHrb69zl+MAXCM27aqKXGgjTB0++024zXJKd0kLEfwJehk7AkEpK1vePSt/iAf5sEro4 N5Py2HAU/0xH7PhePng7lxwmqPS7xNhw9z2uwdpPoE3MWytoTUGIRPVCRG5h5JfN8He3N1 uibtB1SMlyflW4kpftYcGD4JAp1tVpCUmpWbEaKXxMWiqTZzvRDdPfy06lpjjam47NrpD0 h7tLghczgpJcLcjnVFF7rktoACutXZ/vCdOdnCW1Z5otR/RSwKplltYQFEDDBQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wkD0tsXzhqM for ; Sat, 25 Apr 2026 16:48:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 45251 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:48:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 1b5bee9b2d88 - stable/15 - chore: replace {0, 0} with {DEV,KOBJ}METHOD_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: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 1b5bee9b2d8845bbab884c6106857d06de99dae3 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:48:03 +0000 Message-Id: <69ecf043.45251.e9e2500@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=1b5bee9b2d8845bbab884c6106857d06de99dae3 commit 1b5bee9b2d8845bbab884c6106857d06de99dae3 Author: Enji Cooper AuthorDate: 2026-02-21 06:14:46 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:46:07 +0000 chore: replace {0, 0} with {DEV,KOBJ}METHOD_END Both of the aforementioned macros have been present in FreeBSD for well over a decade: 2009 for `KOBJMETHOD_END`; 2011 for `DEVMETHOD_END`. Adapt all hardcoded references of `{0, 0}` with `DEVMETHOD_END` and `KOBJMETHOD_END` as appropriate. This helps ensure that future adaptations to drivers following patterns documented in driver(9) can be made more easily/without issue. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55414 MFC notes: - All changes to nvme/nvd were dropped as they didn't apply. - Change to ufshci_pci.c was adjusted to match code in branch. Conflicts: sys/dev/nvd/nvd.c sys/dev/nvme/nvme_sim.c sys/dev/ufshci/ufshci_pci.c (cherry picked from commit 0fc6c3f731a2cca3120798806c330a3081c9424b) --- sys/dev/aacraid/aacraid_cam.c | 2 +- sys/dev/aacraid/aacraid_pci.c | 2 +- sys/dev/acpi_support/acpi_asus.c | 2 +- sys/dev/acpica/acpi_video.c | 2 +- sys/dev/adb/adb_bus.c | 12 ++++++------ sys/dev/adb/adb_buttons.c | 2 +- sys/dev/adb/adb_kbd.c | 2 +- sys/dev/adb/adb_mouse.c | 2 +- sys/dev/agp/agp_ali.c | 2 +- sys/dev/agp/agp_amd.c | 2 +- sys/dev/agp/agp_amd64.c | 2 +- sys/dev/agp/agp_apple.c | 2 +- sys/dev/agp/agp_ati.c | 2 +- sys/dev/agp/agp_i810.c | 2 +- sys/dev/agp/agp_intel.c | 2 +- sys/dev/agp/agp_nvidia.c | 2 +- sys/dev/agp/agp_sis.c | 2 +- sys/dev/agp/agp_via.c | 2 +- sys/dev/aic7xxx/ahc_isa.c | 2 +- sys/dev/aic7xxx/ahc_pci.c | 2 +- sys/dev/aic7xxx/ahd_pci.c | 2 +- sys/dev/al_eth/al_eth.c | 2 +- sys/dev/alpm/alpm.c | 2 +- sys/dev/amdpm/amdpm.c | 2 +- sys/dev/amdsmb/amdsmb.c | 2 +- sys/dev/asmc/asmc.c | 2 +- sys/dev/atkbdc/atkbd_atkbdc.c | 2 +- sys/dev/atkbdc/atkbdc_isa.c | 2 +- sys/dev/atkbdc/psm.c | 4 ++-- sys/dev/axgbe/if_axgbe.c | 4 ++-- sys/dev/cfe/cfe_resource.c | 2 +- sys/dev/cfi/cfi_disk.c | 2 +- sys/dev/chromebook_platform/chromebook_platform.c | 2 +- sys/dev/ciss/ciss.c | 2 +- sys/dev/cxgb/cxgb_main.c | 2 +- sys/dev/cxgbe/cxgbei/icl_cxgbei.c | 2 +- sys/dev/cxgbe/t4_main.c | 4 ++-- sys/dev/dcons/dcons_crom.c | 2 +- sys/dev/dpaa/bman_fdt.c | 4 ++-- sys/dev/dpaa/fman_fdt.c | 2 +- sys/dev/dpaa/fman_mdio.c | 2 +- sys/dev/dpaa/if_dtsec_fdt.c | 2 +- sys/dev/dpaa/qman_fdt.c | 4 ++-- sys/dev/dpms/dpms.c | 2 +- sys/dev/dwc/if_dwc.c | 2 +- sys/dev/fb/fbd.c | 2 +- sys/dev/fdc/fdc.c | 2 +- sys/dev/fdc/fdc_isa.c | 2 +- sys/dev/firewire/if_fwe.c | 2 +- sys/dev/firewire/if_fwip.c | 2 +- sys/dev/firewire/sbp.c | 2 +- sys/dev/firewire/sbp_targ.c | 2 +- sys/dev/flash/cqspi.c | 2 +- sys/dev/flash/flexspi/flex_spi.c | 2 +- sys/dev/flash/mx25l.c | 2 +- sys/dev/flash/n25q.c | 2 +- sys/dev/flash/w25n.c | 2 +- sys/dev/ftwd/ftwd.c | 2 +- sys/dev/fxp/inphy.c | 2 +- sys/dev/glxiic/glxiic.c | 2 +- sys/dev/gpio/dwgpio/dwgpio.c | 2 +- sys/dev/hpt27xx/hpt27xx_osm_bsd.c | 2 +- sys/dev/hptiop/hptiop.c | 2 +- sys/dev/hptnr/hptnr_osm_bsd.c | 2 +- sys/dev/hyperv/input/hv_kbdc.c | 2 +- sys/dev/hyperv/utilities/hv_kvp.c | 2 +- sys/dev/hyperv/utilities/hv_snapshot.c | 2 +- sys/dev/ida/ida_disk.c | 2 +- sys/dev/iicbus/adc/ad7417.c | 2 +- sys/dev/iicbus/controller/twsi/a10_twsi.c | 2 +- sys/dev/iicbus/controller/twsi/twsi.c | 2 +- sys/dev/iicbus/if_ic.c | 2 +- sys/dev/iicbus/iic.c | 2 +- sys/dev/iicbus/iicbb.c | 2 +- sys/dev/iicbus/pwm/adt746x.c | 2 +- sys/dev/iicbus/sensor/ds1631.c | 2 +- sys/dev/iicbus/sensor/ds1775.c | 2 +- sys/dev/iicbus/sensor/max6690.c | 2 +- sys/dev/ipmi/ipmi_acpi.c | 2 +- sys/dev/ipmi/ipmi_isa.c | 2 +- sys/dev/ipmi/ipmi_pci.c | 4 ++-- sys/dev/ipmi/ipmi_smbus.c | 2 +- sys/dev/ips/ips_disk.c | 2 +- sys/dev/isci/isci.c | 2 +- sys/dev/iscsi/icl_soft.c | 2 +- sys/dev/iser/icl_iser.c | 2 +- sys/dev/isp/isp_pci.c | 2 +- sys/dev/itwd/itwd.c | 2 +- sys/dev/le/if_le_isa.c | 2 +- sys/dev/le/if_le_pci.c | 2 +- sys/dev/mfi/mfi_disk.c | 2 +- sys/dev/mfi/mfi_syspd.c | 2 +- sys/dev/mge/if_mge.c | 2 +- sys/dev/mlx/mlx_disk.c | 2 +- sys/dev/mpi3mr/mpi3mr_pci.c | 2 +- sys/dev/mpr/mpr_pci.c | 2 +- sys/dev/mvs/mvs.c | 2 +- sys/dev/mvs/mvs_pci.c | 2 +- sys/dev/mvs/mvs_soc.c | 2 +- sys/dev/ncthwm/ncthwm.c | 2 +- sys/dev/nfsmb/nfsmb.c | 4 ++-- sys/dev/nvme/nvme_ahci.c | 2 +- sys/dev/nvme/nvme_pci.c | 2 +- sys/dev/ow/ow.c | 2 +- sys/dev/ow/ow_temp.c | 2 +- sys/dev/ow/owc_gpiobus.c | 2 +- sys/dev/pbio/pbio.c | 2 +- sys/dev/pcf/pcf_isa.c | 2 +- sys/dev/pci/fixup_pci.c | 2 +- sys/dev/pci/hostb_pci.c | 2 +- sys/dev/pci/ignore_pci.c | 2 +- sys/dev/pci/vga_pci.c | 2 +- sys/dev/pms/freebsd/driver/ini/src/agtiapi.c | 2 +- sys/dev/powermac_nvram/powermac_nvram.c | 2 +- sys/dev/ppbus/if_plip.c | 2 +- sys/dev/ppbus/lpt.c | 2 +- sys/dev/ppbus/pcfclock.c | 2 +- sys/dev/ppbus/ppbconf.c | 2 +- sys/dev/ppbus/ppi.c | 2 +- sys/dev/ppbus/pps.c | 2 +- sys/dev/ppc/ppc_acpi.c | 2 +- sys/dev/ppc/ppc_isa.c | 2 +- sys/dev/ppc/ppc_pci.c | 2 +- sys/dev/ppc/ppc_puc.c | 2 +- sys/dev/pst/pst-pci.c | 2 +- sys/dev/pst/pst-raid.c | 2 +- sys/dev/qlnx/qlnxe/qlnx_os.c | 4 ++-- sys/dev/qlxgb/qla_os.c | 2 +- sys/dev/qlxgbe/ql_os.c | 2 +- sys/dev/qlxge/qls_os.c | 2 +- sys/dev/sbni/if_sbni_isa.c | 2 +- sys/dev/sbni/if_sbni_pci.c | 2 +- sys/dev/siis/siis.c | 4 ++-- sys/dev/smartpqi/smartpqi_main.c | 2 +- sys/dev/smbios/smbios.c | 2 +- sys/dev/smbus/smb.c | 2 +- sys/dev/smc/if_smc.c | 2 +- sys/dev/smc/if_smc_acpi.c | 2 +- sys/dev/smc/if_smc_fdt.c | 2 +- sys/dev/sound/macio/davbus.c | 2 +- sys/dev/sound/macio/i2s.c | 4 ++-- sys/dev/sound/macio/onyx.c | 2 +- sys/dev/sound/macio/snapper.c | 2 +- sys/dev/sound/macio/tumbler.c | 2 +- sys/dev/sound/pci/als4000.c | 2 +- sys/dev/sound/pci/atiixp.c | 2 +- sys/dev/sound/pci/cmi.c | 2 +- sys/dev/sound/pci/cs4281.c | 2 +- sys/dev/sound/pci/csapcm.c | 2 +- sys/dev/sound/pci/envy24.c | 2 +- sys/dev/sound/pci/envy24ht.c | 2 +- sys/dev/sound/pci/es137x.c | 2 +- sys/dev/sound/pci/hdsp-pcm.c | 2 +- sys/dev/sound/pci/hdsp.c | 2 +- sys/dev/sound/pci/hdspe-pcm.c | 2 +- sys/dev/sound/pci/hdspe.c | 2 +- sys/dev/sound/pci/ich.c | 2 +- sys/dev/sound/pci/maestro3.c | 2 +- sys/dev/sound/pci/neomagic.c | 2 +- sys/dev/sound/pci/solo.c | 2 +- sys/dev/sound/pci/t4dwave.c | 2 +- sys/dev/sound/pci/vibes.c | 12 ++++++------ sys/dev/spibus/spigen.c | 2 +- sys/dev/tdfx/tdfx_pci.c | 2 +- sys/dev/ti/if_ti.c | 2 +- sys/dev/tpm/tpm_acpi.c | 2 +- sys/dev/tpm/tpm_isa.c | 2 +- sys/dev/uart/uart_bus_acpi.c | 2 +- sys/dev/uart/uart_bus_fdt.c | 2 +- sys/dev/uart/uart_bus_isa.c | 2 +- sys/dev/uart/uart_bus_puc.c | 2 +- sys/dev/uart/uart_bus_scc.c | 2 +- sys/dev/uart/uart_dev_imx.c | 2 +- sys/dev/uart/uart_dev_lowrisc.c | 2 +- sys/dev/uart/uart_dev_mu.c | 2 +- sys/dev/uart/uart_dev_mvebu.c | 2 +- sys/dev/uart/uart_dev_pl011.c | 2 +- sys/dev/uart/uart_dev_quicc.c | 2 +- sys/dev/uart/uart_dev_z8530.c | 2 +- sys/dev/ufshci/ufshci_pci.c | 2 +- sys/dev/usb/controller/ehci_fsl.c | 2 +- sys/dev/usb/input/uep.c | 4 ++-- sys/dev/usb/net/uhso.c | 2 +- sys/dev/xilinx/if_xae.c | 2 +- 184 files changed, 205 insertions(+), 205 deletions(-) diff --git a/sys/dev/aacraid/aacraid_cam.c b/sys/dev/aacraid/aacraid_cam.c index 919bf1ad55ca..6cb515462f08 100644 --- a/sys/dev/aacraid/aacraid_cam.c +++ b/sys/dev/aacraid/aacraid_cam.c @@ -122,7 +122,7 @@ static device_method_t aacraid_pass_methods[] = { DEVMETHOD(device_probe, aac_cam_probe), DEVMETHOD(device_attach, aac_cam_attach), DEVMETHOD(device_detach, aac_cam_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t aacraid_pass_driver = { diff --git a/sys/dev/aacraid/aacraid_pci.c b/sys/dev/aacraid/aacraid_pci.c index cb4c6fb8eeba..37bcede44878 100644 --- a/sys/dev/aacraid/aacraid_pci.c +++ b/sys/dev/aacraid/aacraid_pci.c @@ -72,7 +72,7 @@ static device_method_t aacraid_methods[] = { DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_driver_added, bus_generic_driver_added), - { 0, 0 } + DEVMETHOD_END }; static driver_t aacraid_pci_driver = { diff --git a/sys/dev/acpi_support/acpi_asus.c b/sys/dev/acpi_support/acpi_asus.c index b9ba6650d2b7..975d7f93554a 100644 --- a/sys/dev/acpi_support/acpi_asus.c +++ b/sys/dev/acpi_support/acpi_asus.c @@ -517,7 +517,7 @@ static device_method_t acpi_asus_methods[] = { DEVMETHOD(device_probe, acpi_asus_probe), DEVMETHOD(device_attach, acpi_asus_attach), DEVMETHOD(device_detach, acpi_asus_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t acpi_asus_driver = { diff --git a/sys/dev/acpica/acpi_video.c b/sys/dev/acpica/acpi_video.c index 7a22c9dc0994..f949e14f58e6 100644 --- a/sys/dev/acpica/acpi_video.c +++ b/sys/dev/acpica/acpi_video.c @@ -176,7 +176,7 @@ static device_method_t acpi_video_methods[] = { DEVMETHOD(device_detach, acpi_video_detach), DEVMETHOD(device_resume, acpi_video_resume), DEVMETHOD(device_shutdown, acpi_video_shutdown), - { 0, 0 } + DEVMETHOD_END }; static driver_t acpi_video_driver = { diff --git a/sys/dev/adb/adb_bus.c b/sys/dev/adb/adb_bus.c index 7f4bd8676fcf..52d38caf7a24 100644 --- a/sys/dev/adb/adb_bus.c +++ b/sys/dev/adb/adb_bus.c @@ -57,15 +57,15 @@ static device_method_t adb_bus_methods[] = { DEVMETHOD(device_probe, adb_bus_probe), DEVMETHOD(device_attach, adb_bus_attach), DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), /* Bus Interface */ - DEVMETHOD(bus_probe_nomatch, adb_probe_nomatch), - DEVMETHOD(bus_print_child, adb_print_child), + DEVMETHOD(bus_probe_nomatch, adb_probe_nomatch), + DEVMETHOD(bus_print_child, adb_print_child), - { 0, 0 }, + DEVMETHOD_END }; driver_t adb_driver = { diff --git a/sys/dev/adb/adb_buttons.c b/sys/dev/adb/adb_buttons.c index e003183f9e9d..14d96cc5a05c 100644 --- a/sys/dev/adb/adb_buttons.c +++ b/sys/dev/adb/adb_buttons.c @@ -67,7 +67,7 @@ static device_method_t abtn_methods[] = { /* ADB interface */ DEVMETHOD(adb_receive_packet, abtn_receive_packet), - { 0, 0 } + DEVMETHOD_END }; static driver_t abtn_driver = { diff --git a/sys/dev/adb/adb_kbd.c b/sys/dev/adb/adb_kbd.c index f1b8d3589be9..ce81da855efc 100644 --- a/sys/dev/adb/adb_kbd.c +++ b/sys/dev/adb/adb_kbd.c @@ -99,7 +99,7 @@ static device_method_t adb_kbd_methods[] = { /* ADB interface */ DEVMETHOD(adb_receive_packet, adb_kbd_receive_packet), - { 0, 0 } + DEVMETHOD_END }; static driver_t adb_kbd_driver = { diff --git a/sys/dev/adb/adb_mouse.c b/sys/dev/adb/adb_mouse.c index e89612abddb2..92fc512efb45 100644 --- a/sys/dev/adb/adb_mouse.c +++ b/sys/dev/adb/adb_mouse.c @@ -104,7 +104,7 @@ static device_method_t adb_mouse_methods[] = { /* ADB interface */ DEVMETHOD(adb_receive_packet, adb_mouse_receive_packet), - { 0, 0 } + DEVMETHOD_END }; static driver_t adb_mouse_driver = { diff --git a/sys/dev/agp/agp_ali.c b/sys/dev/agp/agp_ali.c index d0301f3a5c7e..b6dc2d34ddd4 100644 --- a/sys/dev/agp/agp_ali.c +++ b/sys/dev/agp/agp_ali.c @@ -253,7 +253,7 @@ static device_method_t agp_ali_methods[] = { DEVMETHOD(agp_free_memory, agp_generic_free_memory), DEVMETHOD(agp_bind_memory, agp_generic_bind_memory), DEVMETHOD(agp_unbind_memory, agp_generic_unbind_memory), - { 0, 0 } + DEVMETHOD_END }; static driver_t agp_ali_driver = { diff --git a/sys/dev/agp/agp_amd.c b/sys/dev/agp/agp_amd.c index e7f1deed188d..368ea7e4de7d 100644 --- a/sys/dev/agp/agp_amd.c +++ b/sys/dev/agp/agp_amd.c @@ -390,7 +390,7 @@ static device_method_t agp_amd_methods[] = { DEVMETHOD(agp_free_memory, agp_generic_free_memory), DEVMETHOD(agp_bind_memory, agp_generic_bind_memory), DEVMETHOD(agp_unbind_memory, agp_generic_unbind_memory), - { 0, 0 } + DEVMETHOD_END }; static driver_t agp_amd_driver = { diff --git a/sys/dev/agp/agp_amd64.c b/sys/dev/agp/agp_amd64.c index ff36200bd299..287e6fb7218c 100644 --- a/sys/dev/agp/agp_amd64.c +++ b/sys/dev/agp/agp_amd64.c @@ -498,7 +498,7 @@ static device_method_t agp_amd64_methods[] = { DEVMETHOD(agp_free_memory, agp_generic_free_memory), DEVMETHOD(agp_bind_memory, agp_generic_bind_memory), DEVMETHOD(agp_unbind_memory, agp_generic_unbind_memory), - { 0, 0 } + DEVMETHOD_END }; static driver_t agp_amd64_driver = { diff --git a/sys/dev/agp/agp_apple.c b/sys/dev/agp/agp_apple.c index 48938044a5d6..d2a94cd654f7 100644 --- a/sys/dev/agp/agp_apple.c +++ b/sys/dev/agp/agp_apple.c @@ -278,7 +278,7 @@ static device_method_t agp_apple_methods[] = { DEVMETHOD(agp_free_memory, agp_generic_free_memory), DEVMETHOD(agp_bind_memory, agp_generic_bind_memory), DEVMETHOD(agp_unbind_memory, agp_generic_unbind_memory), - { 0, 0 } + DEVMETHOD_END }; static driver_t agp_apple_driver = { diff --git a/sys/dev/agp/agp_ati.c b/sys/dev/agp/agp_ati.c index a383acdb89dc..667be51f48e8 100644 --- a/sys/dev/agp/agp_ati.c +++ b/sys/dev/agp/agp_ati.c @@ -362,7 +362,7 @@ static device_method_t agp_ati_methods[] = { DEVMETHOD(agp_free_memory, agp_generic_free_memory), DEVMETHOD(agp_bind_memory, agp_generic_bind_memory), DEVMETHOD(agp_unbind_memory, agp_generic_unbind_memory), - { 0, 0 } + DEVMETHOD_END }; static driver_t agp_ati_driver = { diff --git a/sys/dev/agp/agp_i810.c b/sys/dev/agp/agp_i810.c index 9d955745f673..8f09f2fe2de3 100644 --- a/sys/dev/agp/agp_i810.c +++ b/sys/dev/agp/agp_i810.c @@ -1913,7 +1913,7 @@ static device_method_t agp_i810_methods[] = { DEVMETHOD(agp_bind_memory, agp_i810_bind_memory), DEVMETHOD(agp_unbind_memory, agp_i810_unbind_memory), DEVMETHOD(agp_chipset_flush, agp_intel_gtt_chipset_flush), - { 0, 0 } + DEVMETHOD_END }; static driver_t agp_i810_driver = { diff --git a/sys/dev/agp/agp_intel.c b/sys/dev/agp/agp_intel.c index d8abd759dec6..0fec1f8a5201 100644 --- a/sys/dev/agp/agp_intel.c +++ b/sys/dev/agp/agp_intel.c @@ -419,7 +419,7 @@ static device_method_t agp_intel_methods[] = { DEVMETHOD(agp_free_memory, agp_generic_free_memory), DEVMETHOD(agp_bind_memory, agp_generic_bind_memory), DEVMETHOD(agp_unbind_memory, agp_generic_unbind_memory), - { 0, 0 } + DEVMETHOD_END }; static driver_t agp_intel_driver = { diff --git a/sys/dev/agp/agp_nvidia.c b/sys/dev/agp/agp_nvidia.c index fa5b73023f59..8a24063f9d90 100644 --- a/sys/dev/agp/agp_nvidia.c +++ b/sys/dev/agp/agp_nvidia.c @@ -435,7 +435,7 @@ static device_method_t agp_nvidia_methods[] = { DEVMETHOD(agp_free_memory, agp_generic_free_memory), DEVMETHOD(agp_bind_memory, agp_generic_bind_memory), DEVMETHOD(agp_unbind_memory, agp_generic_unbind_memory), - { 0, 0 } + DEVMETHOD_END }; static driver_t agp_nvidia_driver = { diff --git a/sys/dev/agp/agp_sis.c b/sys/dev/agp/agp_sis.c index 3df1ca19f478..daea60c5f30f 100644 --- a/sys/dev/agp/agp_sis.c +++ b/sys/dev/agp/agp_sis.c @@ -273,7 +273,7 @@ static device_method_t agp_sis_methods[] = { DEVMETHOD(agp_free_memory, agp_generic_free_memory), DEVMETHOD(agp_bind_memory, agp_generic_bind_memory), DEVMETHOD(agp_unbind_memory, agp_generic_unbind_memory), - { 0, 0 } + DEVMETHOD_END }; static driver_t agp_sis_driver = { diff --git a/sys/dev/agp/agp_via.c b/sys/dev/agp/agp_via.c index 3948f1a96697..9d0871ae9b21 100644 --- a/sys/dev/agp/agp_via.c +++ b/sys/dev/agp/agp_via.c @@ -408,7 +408,7 @@ static device_method_t agp_via_methods[] = { DEVMETHOD(agp_free_memory, agp_generic_free_memory), DEVMETHOD(agp_bind_memory, agp_generic_bind_memory), DEVMETHOD(agp_unbind_memory, agp_generic_unbind_memory), - { 0, 0 } + DEVMETHOD_END }; static driver_t agp_via_driver = { diff --git a/sys/dev/aic7xxx/ahc_isa.c b/sys/dev/aic7xxx/ahc_isa.c index e096a9e5bb6d..37308b9dac6c 100644 --- a/sys/dev/aic7xxx/ahc_isa.c +++ b/sys/dev/aic7xxx/ahc_isa.c @@ -285,7 +285,7 @@ static device_method_t ahc_isa_device_methods[] = { DEVMETHOD(device_probe, ahc_isa_probe), DEVMETHOD(device_attach, ahc_isa_attach), DEVMETHOD(device_detach, ahc_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahc_isa_driver = { diff --git a/sys/dev/aic7xxx/ahc_pci.c b/sys/dev/aic7xxx/ahc_pci.c index 7f8fbe140237..4c3cbc6a2422 100644 --- a/sys/dev/aic7xxx/ahc_pci.c +++ b/sys/dev/aic7xxx/ahc_pci.c @@ -41,7 +41,7 @@ static device_method_t ahc_pci_device_methods[] = { DEVMETHOD(device_probe, ahc_pci_probe), DEVMETHOD(device_attach, ahc_pci_attach), DEVMETHOD(device_detach, ahc_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahc_pci_driver = { diff --git a/sys/dev/aic7xxx/ahd_pci.c b/sys/dev/aic7xxx/ahd_pci.c index 6af7169b49ff..f53563e4ba40 100644 --- a/sys/dev/aic7xxx/ahd_pci.c +++ b/sys/dev/aic7xxx/ahd_pci.c @@ -41,7 +41,7 @@ static device_method_t ahd_pci_device_methods[] = { DEVMETHOD(device_probe, ahd_pci_probe), DEVMETHOD(device_attach, ahd_pci_attach), DEVMETHOD(device_detach, ahd_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahd_pci_driver = { diff --git a/sys/dev/al_eth/al_eth.c b/sys/dev/al_eth/al_eth.c index f4fec7c6aa94..47d31c264f67 100644 --- a/sys/dev/al_eth/al_eth.c +++ b/sys/dev/al_eth/al_eth.c @@ -242,7 +242,7 @@ static device_method_t al_methods[] = { DEVMETHOD(miibus_writereg, al_miibus_writereg), DEVMETHOD(miibus_statchg, al_miibus_statchg), DEVMETHOD(miibus_linkchg, al_miibus_linkchg), - { 0, 0 } + DEVMETHOD_END }; static driver_t al_driver = { diff --git a/sys/dev/alpm/alpm.c b/sys/dev/alpm/alpm.c index d7c3d3657d3b..2bf74c276a5f 100644 --- a/sys/dev/alpm/alpm.c +++ b/sys/dev/alpm/alpm.c @@ -642,7 +642,7 @@ static device_method_t alpm_methods[] = { DEVMETHOD(smbus_readw, alpm_readw), DEVMETHOD(smbus_bwrite, alpm_bwrite), DEVMETHOD(smbus_bread, alpm_bread), - { 0, 0 } + DEVMETHOD_END }; static driver_t alpm_driver = { diff --git a/sys/dev/amdpm/amdpm.c b/sys/dev/amdpm/amdpm.c index d744c0aa5d4b..f93cc5b2eaa7 100644 --- a/sys/dev/amdpm/amdpm.c +++ b/sys/dev/amdpm/amdpm.c @@ -648,7 +648,7 @@ static device_method_t amdpm_methods[] = { DEVMETHOD(smbus_readw, amdpm_readw), DEVMETHOD(smbus_bwrite, amdpm_bwrite), DEVMETHOD(smbus_bread, amdpm_bread), - { 0, 0 } + DEVMETHOD_END }; static driver_t amdpm_driver = { diff --git a/sys/dev/amdsmb/amdsmb.c b/sys/dev/amdsmb/amdsmb.c index 3d2e7a5e0c19..65992dc34b02 100644 --- a/sys/dev/amdsmb/amdsmb.c +++ b/sys/dev/amdsmb/amdsmb.c @@ -560,7 +560,7 @@ static device_method_t amdsmb_methods[] = { DEVMETHOD(smbus_readw, amdsmb_readw), DEVMETHOD(smbus_bwrite, amdsmb_bwrite), DEVMETHOD(smbus_bread, amdsmb_bread), - { 0, 0 } + DEVMETHOD_END }; static driver_t amdsmb_driver = { diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index d680db49dfda..f39eef63aef4 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -581,7 +581,7 @@ static device_method_t asmc_methods[] = { DEVMETHOD(device_attach, asmc_attach), DEVMETHOD(device_detach, asmc_detach), DEVMETHOD(device_resume, asmc_resume), - { 0, 0 } + DEVMETHOD_END }; static driver_t asmc_driver = { diff --git a/sys/dev/atkbdc/atkbd_atkbdc.c b/sys/dev/atkbdc/atkbd_atkbdc.c index d5ef9706d7b9..64545ce63ba9 100644 --- a/sys/dev/atkbdc/atkbd_atkbdc.c +++ b/sys/dev/atkbdc/atkbd_atkbdc.c @@ -61,7 +61,7 @@ static device_method_t atkbd_methods[] = { DEVMETHOD(device_probe, atkbdprobe), DEVMETHOD(device_attach, atkbdattach), DEVMETHOD(device_resume, atkbdresume), - { 0, 0 } + DEVMETHOD_END }; static driver_t atkbd_driver = { diff --git a/sys/dev/atkbdc/atkbdc_isa.c b/sys/dev/atkbdc/atkbdc_isa.c index 057ebbc7ec0d..69969131c63a 100644 --- a/sys/dev/atkbdc/atkbdc_isa.c +++ b/sys/dev/atkbdc/atkbdc_isa.c @@ -75,7 +75,7 @@ static device_method_t atkbdc_isa_methods[] = { DEVMETHOD(bus_delete_resource, bus_generic_rl_delete_resource), DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), - { 0, 0 } + DEVMETHOD_END }; static driver_t atkbdc_isa_driver = { diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c index 95acf43a3bc6..a2fc68d0f52a 100644 --- a/sys/dev/atkbdc/psm.c +++ b/sys/dev/atkbdc/psm.c @@ -745,7 +745,7 @@ static device_method_t psm_methods[] = { DEVMETHOD(device_attach, psmattach), DEVMETHOD(device_detach, psmdetach), DEVMETHOD(device_resume, psmresume), - { 0, 0 } + DEVMETHOD_END }; static driver_t psm_driver = { @@ -7543,7 +7543,7 @@ static device_attach_t psmcpnp_attach; static device_method_t psmcpnp_methods[] = { DEVMETHOD(device_probe, psmcpnp_probe), DEVMETHOD(device_attach, psmcpnp_attach), - { 0, 0 } + DEVMETHOD_END }; static driver_t psmcpnp_driver = { diff --git a/sys/dev/axgbe/if_axgbe.c b/sys/dev/axgbe/if_axgbe.c index b35beca9c886..9a6b2a95d6b2 100644 --- a/sys/dev/axgbe/if_axgbe.c +++ b/sys/dev/axgbe/if_axgbe.c @@ -559,7 +559,7 @@ static device_method_t axgbe_methods[] = { DEVMETHOD(device_probe, axgbe_probe), DEVMETHOD(device_attach, axgbe_attach), - { 0, 0 } + DEVMETHOD_END }; DEFINE_CLASS_0(axgbe, axgbe_driver, axgbe_methods, @@ -602,7 +602,7 @@ static device_method_t axgbephy_methods[] = { DEVMETHOD(device_probe, axgbephy_probe), DEVMETHOD(device_attach, axgbephy_attach), - { 0, 0 } + DEVMETHOD_END }; DEFINE_CLASS_0(axgbephy, axgbephy_driver, axgbephy_methods, 0); diff --git a/sys/dev/cfe/cfe_resource.c b/sys/dev/cfe/cfe_resource.c index 78c5f149ba7d..223178e36e47 100644 --- a/sys/dev/cfe/cfe_resource.c +++ b/sys/dev/cfe/cfe_resource.c @@ -144,7 +144,7 @@ static device_method_t cferes_methods[] = { DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD(device_suspend, bus_generic_suspend), DEVMETHOD(device_resume, bus_generic_resume), - { 0, 0 } + DEVMETHOD_END }; static driver_t cferes_driver = { diff --git a/sys/dev/cfi/cfi_disk.c b/sys/dev/cfi/cfi_disk.c index 4c3eae473fb6..3beef8821ae4 100644 --- a/sys/dev/cfi/cfi_disk.c +++ b/sys/dev/cfi/cfi_disk.c @@ -346,7 +346,7 @@ static device_method_t cfi_disk_methods[] = { DEVMETHOD(device_probe, cfi_disk_probe), DEVMETHOD(device_attach, cfi_disk_attach), DEVMETHOD(device_detach, cfi_disk_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t cfi_disk_driver = { "cfid", diff --git a/sys/dev/chromebook_platform/chromebook_platform.c b/sys/dev/chromebook_platform/chromebook_platform.c index f873338a3ba6..c7c1ff4222a1 100644 --- a/sys/dev/chromebook_platform/chromebook_platform.c +++ b/sys/dev/chromebook_platform/chromebook_platform.c @@ -82,7 +82,7 @@ chromebook_i2c_identify(driver_t *driver, device_t bus) static device_method_t chromebook_i2c_methods[] = { DEVMETHOD(device_identify, chromebook_i2c_identify), - { 0, 0 } + DEVMETHOD_END }; static driver_t chromebook_i2c_driver = { diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index dd3df631119a..416f6e86e663 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -217,7 +217,7 @@ static device_method_t ciss_methods[] = { DEVMETHOD(device_attach, ciss_attach), DEVMETHOD(device_detach, ciss_detach), DEVMETHOD(device_shutdown, ciss_shutdown), - { 0, 0 } + DEVMETHOD_END }; static driver_t ciss_pci_driver = { diff --git a/sys/dev/cxgb/cxgb_main.c b/sys/dev/cxgb/cxgb_main.c index 616a2ecc1a37..81fd3cb45841 100644 --- a/sys/dev/cxgb/cxgb_main.c +++ b/sys/dev/cxgb/cxgb_main.c @@ -187,7 +187,7 @@ static device_method_t cxgb_port_methods[] = { DEVMETHOD(device_probe, cxgb_port_probe), DEVMETHOD(device_attach, cxgb_port_attach), DEVMETHOD(device_detach, cxgb_port_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t cxgb_port_driver = { diff --git a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c index 9cdfd0fb9652..d90d7904a8ae 100644 --- a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c +++ b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c @@ -164,7 +164,7 @@ static kobj_method_t icl_cxgbei_methods[] = { KOBJMETHOD(icl_conn_task_done, icl_cxgbei_conn_task_done), KOBJMETHOD(icl_conn_transfer_setup, icl_cxgbei_conn_transfer_setup), KOBJMETHOD(icl_conn_transfer_done, icl_cxgbei_conn_transfer_done), - { 0, 0 } + KOBJMETHOD_END }; DEFINE_CLASS(icl_cxgbei, icl_cxgbei_methods, sizeof(struct icl_cxgbei_conn)); diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 88a1cb9d3eb9..92e5d5ffd8ed 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -130,7 +130,7 @@ device_method_t cxgbe_methods[] = { DEVMETHOD(device_probe, cxgbe_probe), DEVMETHOD(device_attach, cxgbe_attach), DEVMETHOD(device_detach, cxgbe_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t cxgbe_driver = { "cxgbe", @@ -146,7 +146,7 @@ static device_method_t vcxgbe_methods[] = { DEVMETHOD(device_probe, vcxgbe_probe), DEVMETHOD(device_attach, vcxgbe_attach), DEVMETHOD(device_detach, vcxgbe_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t vcxgbe_driver = { "vcxgbe", diff --git a/sys/dev/dcons/dcons_crom.c b/sys/dev/dcons/dcons_crom.c index d31a69adf03c..59e30935d04b 100644 --- a/sys/dev/dcons/dcons_crom.c +++ b/sys/dev/dcons/dcons_crom.c @@ -253,7 +253,7 @@ static device_method_t dcons_crom_methods[] = { DEVMETHOD(device_probe, dcons_crom_probe), DEVMETHOD(device_attach, dcons_crom_attach), DEVMETHOD(device_detach, dcons_crom_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t dcons_crom_driver = { diff --git a/sys/dev/dpaa/bman_fdt.c b/sys/dev/dpaa/bman_fdt.c index dffec52d5248..ac7288c7f230 100644 --- a/sys/dev/dpaa/bman_fdt.c +++ b/sys/dev/dpaa/bman_fdt.c @@ -56,7 +56,7 @@ static device_method_t bman_methods[] = { DEVMETHOD(device_resume, bman_resume), DEVMETHOD(device_shutdown, bman_shutdown), - { 0, 0 } + DEVMETHOD_END }; static driver_t bman_driver = { @@ -93,7 +93,7 @@ static device_method_t bm_portals_methods[] = { DEVMETHOD(device_attach, bman_portals_fdt_attach), DEVMETHOD(device_detach, bman_portals_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t bm_portals_driver = { diff --git a/sys/dev/dpaa/fman_fdt.c b/sys/dev/dpaa/fman_fdt.c index 2386f4e7ec0b..4d3723b6de4d 100644 --- a/sys/dev/dpaa/fman_fdt.c +++ b/sys/dev/dpaa/fman_fdt.c @@ -56,7 +56,7 @@ static device_method_t fman_methods[] = { DEVMETHOD(bus_alloc_resource, fman_alloc_resource), DEVMETHOD(bus_activate_resource, fman_activate_resource), DEVMETHOD(bus_release_resource, fman_release_resource), - { 0, 0 } + DEVMETHOD_END }; DEFINE_CLASS_1(fman, fman_driver, fman_methods, diff --git a/sys/dev/dpaa/fman_mdio.c b/sys/dev/dpaa/fman_mdio.c index 6ca12befe9e7..8df716fc5571 100644 --- a/sys/dev/dpaa/fman_mdio.c +++ b/sys/dev/dpaa/fman_mdio.c @@ -90,7 +90,7 @@ static device_method_t pqmdio_methods[] = { DEVMETHOD(miibus_readreg, pqmdio_miibus_readreg), DEVMETHOD(miibus_writereg, pqmdio_miibus_writereg), - { 0, 0 } + DEVMETHOD_END }; static struct ofw_compat_data mdio_compat_data[] = { diff --git a/sys/dev/dpaa/if_dtsec_fdt.c b/sys/dev/dpaa/if_dtsec_fdt.c index b37f32c07b99..441ff9c96c50 100644 --- a/sys/dev/dpaa/if_dtsec_fdt.c +++ b/sys/dev/dpaa/if_dtsec_fdt.c @@ -77,7 +77,7 @@ static device_method_t dtsec_methods[] = { DEVMETHOD(miibus_writereg, dtsec_miibus_writereg), DEVMETHOD(miibus_statchg, dtsec_miibus_statchg), - { 0, 0 } + DEVMETHOD_END }; static driver_t dtsec_driver = { diff --git a/sys/dev/dpaa/qman_fdt.c b/sys/dev/dpaa/qman_fdt.c index 3f22ea4d651a..713f500d8657 100644 --- a/sys/dev/dpaa/qman_fdt.c +++ b/sys/dev/dpaa/qman_fdt.c @@ -56,7 +56,7 @@ static device_method_t qman_methods[] = { DEVMETHOD(device_resume, qman_resume), DEVMETHOD(device_shutdown, qman_shutdown), - { 0, 0 } + DEVMETHOD_END }; static driver_t qman_driver = { @@ -93,7 +93,7 @@ static device_method_t qm_portals_methods[] = { DEVMETHOD(device_attach, qman_portals_fdt_attach), DEVMETHOD(device_detach, qman_portals_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t qm_portals_driver = { diff --git a/sys/dev/dpms/dpms.c b/sys/dev/dpms/dpms.c index 05397e880b85..659b852c046e 100644 --- a/sys/dev/dpms/dpms.c +++ b/sys/dev/dpms/dpms.c @@ -106,7 +106,7 @@ static device_method_t dpms_methods[] = { DEVMETHOD(device_detach, dpms_detach), DEVMETHOD(device_suspend, dpms_suspend), DEVMETHOD(device_resume, dpms_resume), - { 0, 0 } + DEVMETHOD_END }; static driver_t dpms_driver = { diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c index f57a19e8a112..21a520db8b89 100644 --- a/sys/dev/dwc/if_dwc.c +++ b/sys/dev/dwc/if_dwc.c @@ -684,7 +684,7 @@ static device_method_t dwc_methods[] = { DEVMETHOD(miibus_writereg, dwc1000_miibus_write_reg), DEVMETHOD(miibus_statchg, dwc1000_miibus_statchg), - { 0, 0 } + DEVMETHOD_END }; driver_t dwc_driver = { diff --git a/sys/dev/fb/fbd.c b/sys/dev/fb/fbd.c index 6bae94aa6db6..f74c11bbf86b 100644 --- a/sys/dev/fb/fbd.c +++ b/sys/dev/fb/fbd.c @@ -348,7 +348,7 @@ static device_method_t fbd_methods[] = { DEVMETHOD(device_shutdown, bus_generic_shutdown), - { 0, 0 } + DEVMETHOD_END }; driver_t fbd_driver = { diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index 58fcd1d5ea3d..2a1e426c24d0 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -2087,7 +2087,7 @@ static device_method_t fd_methods[] = { DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD(device_suspend, bus_generic_suspend), /* XXX */ DEVMETHOD(device_resume, bus_generic_resume), /* XXX */ - { 0, 0 } + DEVMETHOD_END }; static driver_t fd_driver = { diff --git a/sys/dev/fdc/fdc_isa.c b/sys/dev/fdc/fdc_isa.c index c1c8991e3e33..0216e1fda793 100644 --- a/sys/dev/fdc/fdc_isa.c +++ b/sys/dev/fdc/fdc_isa.c @@ -210,7 +210,7 @@ static device_method_t fdc_methods[] = { DEVMETHOD(bus_write_ivar, fdc_write_ivar), /* Our children never use any other bus interface methods. */ - { 0, 0 } + DEVMETHOD_END }; static driver_t fdc_driver = { diff --git a/sys/dev/firewire/if_fwe.c b/sys/dev/firewire/if_fwe.c index 44d3425799e9..4f8d0087e9ab 100644 --- a/sys/dev/firewire/if_fwe.c +++ b/sys/dev/firewire/if_fwe.c @@ -613,7 +613,7 @@ static device_method_t fwe_methods[] = { DEVMETHOD(device_probe, fwe_probe), DEVMETHOD(device_attach, fwe_attach), DEVMETHOD(device_detach, fwe_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t fwe_driver = { diff --git a/sys/dev/firewire/if_fwip.c b/sys/dev/firewire/if_fwip.c index 41143e2e59d4..42f0c6f53743 100644 --- a/sys/dev/firewire/if_fwip.c +++ b/sys/dev/firewire/if_fwip.c @@ -916,7 +916,7 @@ static device_method_t fwip_methods[] = { DEVMETHOD(device_probe, fwip_probe), DEVMETHOD(device_attach, fwip_attach), DEVMETHOD(device_detach, fwip_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t fwip_driver = { diff --git a/sys/dev/firewire/sbp.c b/sys/dev/firewire/sbp.c index be1e60e45e75..9e76000f5fb6 100644 --- a/sys/dev/firewire/sbp.c +++ b/sys/dev/firewire/sbp.c @@ -2835,7 +2835,7 @@ static device_method_t sbp_methods[] = { DEVMETHOD(device_detach, sbp_detach), DEVMETHOD(device_shutdown, sbp_shutdown), - { 0, 0 } + DEVMETHOD_END }; static driver_t sbp_driver = { diff --git a/sys/dev/firewire/sbp_targ.c b/sys/dev/firewire/sbp_targ.c index 4efc16c1ee47..96a86c25b684 100644 --- a/sys/dev/firewire/sbp_targ.c +++ b/sys/dev/firewire/sbp_targ.c @@ -2036,7 +2036,7 @@ static device_method_t sbp_targ_methods[] = { DEVMETHOD(device_probe, sbp_targ_probe), DEVMETHOD(device_attach, sbp_targ_attach), DEVMETHOD(device_detach, sbp_targ_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t sbp_targ_driver = { diff --git a/sys/dev/flash/cqspi.c b/sys/dev/flash/cqspi.c index 4774d14add0e..9da1676bae5a 100644 --- a/sys/dev/flash/cqspi.c +++ b/sys/dev/flash/cqspi.c @@ -754,7 +754,7 @@ static device_method_t cqspi_methods[] = { DEVMETHOD(qspi_write, cqspi_write), DEVMETHOD(qspi_erase, cqspi_erase), - { 0, 0 } + DEVMETHOD_END }; DEFINE_CLASS_1(cqspi, cqspi_driver, cqspi_methods, diff --git a/sys/dev/flash/flexspi/flex_spi.c b/sys/dev/flash/flexspi/flex_spi.c index 44246f4b1c2d..12f431548d2a 100644 --- a/sys/dev/flash/flexspi/flex_spi.c +++ b/sys/dev/flash/flexspi/flex_spi.c @@ -970,7 +970,7 @@ static device_method_t flex_spi_methods[] = { DEVMETHOD(device_attach, flex_spi_attach), DEVMETHOD(device_detach, flex_spi_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t flex_spi_driver = { diff --git a/sys/dev/flash/mx25l.c b/sys/dev/flash/mx25l.c index 64e3e53d4291..c7c95716aaed 100644 --- a/sys/dev/flash/mx25l.c +++ b/sys/dev/flash/mx25l.c @@ -673,7 +673,7 @@ static device_method_t mx25l_methods[] = { DEVMETHOD(device_attach, mx25l_attach), *** 1742 LINES SKIPPED *** From nobody Sat Apr 25 16:51:13 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2wnt0gBsz6bnjw for ; Sat, 25 Apr 2026 16:51:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2wnt09sRz3FlY for ; Sat, 25 Apr 2026 16:51:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777135874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s2d3hcpv+AUq+euQZbo2OdAPUgeuY76YlT3YD/5NaCQ=; b=oqoUHCutwdPnyUDGa+zSBRBOqH7bCC4I6hFBkSOoJuNmOog7rEVApY7SSY2idhG3xNwPc5 mPilN2ONpfnGxNaSs7aCz6ZKIfgOu4U7ekQahO23RkLmI8U9Px53vl64SDXkknvqzrU7jC dMgfGSZp38iJMYrbSo7Uxy2Kuw3Wqzt/45e7LyPy/NNVIsaT90LtNvIglNLP6WGMg97hbn MUl9zuAyVwaCKVqgesQd+P+F93z9TBwpIft0UO/CJVQST5zpaWaXtZnT2GnZ/ncNRYTM8G 32bJoF/nrVDDIlaofgGnRahDvM2TQ0Z8SeOsMnV5YovDwLc43xihd9Bs3Jc65w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777135874; a=rsa-sha256; cv=none; b=mN6SFj4TJw3cEdtcRrj8W6s6y41VOkHOCCDhYYw58qmbKi42Jy90Z4XnkI2tqeJ0RLOIaO n2LmKKwz9x3+DSkSqKisrMs45ERV9PoQZzDZztrWzc8MvHIMH9L+yWrfGeejBB35m7yDRP vG5KeuOCu2q2xKQkXho8Ipq6l1dEXs40I6f+Hcwy1lg4roFVUhcg3wHApaugABtbllEqRs vObnsbFskL12/dGzEqeK2kV999vgmCwGPUy64x455/iccvgfxW2816733jQzb1y6iFc+pO 2KTMKjp/X/vP4czUbLMlXQ8FV82ALeWKdbtoZgbDVVZUrtXvp28YIeuERPbTaw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777135874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s2d3hcpv+AUq+euQZbo2OdAPUgeuY76YlT3YD/5NaCQ=; b=IQeNTKW3kXXdsPIkPgexvD+1tDO3zwnKWQ2HPvYJcEa3ocz5/vB99k1Btt4ZWMEAf3ergQ mJAWK0n4TdPjaENgIB3+JrplC3dTie+DqZivWqzxWYOaHD0JN6yBsBZdQ6+PvvqPRHKH9h lTpU+lCgp0Bi4YNgQvzQNZeqZ/6cmu6+ZGV7+1fnvwOF1Z9YppKUNEYOUOI5cigS4ju0WW 1mncH2Lqhcc4j0fl5zuk0nLTVKHifMaeKEQ/K+1xz1vwfvwCy9s4vMEjcVjhJLJZ3x0sAJ 8UkgePvS4pCaUpSHyrGJq+qLQQvu48mKQWgcag1Vpf3xvYHGite+F5SvRpGRfA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2wns6t90zjJT for ; Sat, 25 Apr 2026 16:51:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4730f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 16:51:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 1633c00828ac - stable/14 - chore: replace {0, 0} with {DEV,KOBJ}METHOD_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: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1633c00828ac84fc5f9c08e5445fb6e6ead1939c Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 16:51:13 +0000 Message-Id: <69ecf101.4730f.54a398c7@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=1633c00828ac84fc5f9c08e5445fb6e6ead1939c commit 1633c00828ac84fc5f9c08e5445fb6e6ead1939c Author: Enji Cooper AuthorDate: 2026-02-21 06:14:46 +0000 Commit: Enji Cooper CommitDate: 2026-04-25 16:50:07 +0000 chore: replace {0, 0} with {DEV,KOBJ}METHOD_END Both of the aforementioned macros have been present in FreeBSD for well over a decade: 2009 for `KOBJMETHOD_END`; 2011 for `DEVMETHOD_END`. Adapt all hardcoded references of `{0, 0}` with `DEVMETHOD_END` and `KOBJMETHOD_END` as appropriate. This helps ensure that future adaptations to drivers following patterns documented in driver(9) can be made more easily/without issue. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55414 MFC notes: All conflicts were dropped as they didn't apply to code in branch. Conflicts: sys/dev/flash/w25n.c sys/dev/nvd/nvd.c sys/dev/nvme/nvme_sim.c sys/dev/sound/pci/hdsp-pcm.c sys/dev/sound/pci/hdsp.c sys/dev/ufshci/ufshci_pci.c (cherry picked from commit 0fc6c3f731a2cca3120798806c330a3081c9424b) --- sys/dev/aacraid/aacraid_cam.c | 2 +- sys/dev/aacraid/aacraid_pci.c | 2 +- sys/dev/acpi_support/acpi_asus.c | 2 +- sys/dev/acpica/acpi_video.c | 2 +- sys/dev/adb/adb_bus.c | 12 ++++++------ sys/dev/adb/adb_buttons.c | 2 +- sys/dev/adb/adb_kbd.c | 2 +- sys/dev/adb/adb_mouse.c | 2 +- sys/dev/agp/agp_ali.c | 2 +- sys/dev/agp/agp_amd.c | 2 +- sys/dev/agp/agp_amd64.c | 2 +- sys/dev/agp/agp_apple.c | 2 +- sys/dev/agp/agp_ati.c | 2 +- sys/dev/agp/agp_i810.c | 2 +- sys/dev/agp/agp_intel.c | 2 +- sys/dev/agp/agp_nvidia.c | 2 +- sys/dev/agp/agp_sis.c | 2 +- sys/dev/agp/agp_via.c | 2 +- sys/dev/aic7xxx/ahc_isa.c | 2 +- sys/dev/aic7xxx/ahc_pci.c | 2 +- sys/dev/aic7xxx/ahd_pci.c | 2 +- sys/dev/al_eth/al_eth.c | 2 +- sys/dev/alpm/alpm.c | 2 +- sys/dev/amdpm/amdpm.c | 2 +- sys/dev/amdsmb/amdsmb.c | 2 +- sys/dev/asmc/asmc.c | 2 +- sys/dev/atkbdc/atkbd_atkbdc.c | 2 +- sys/dev/atkbdc/atkbdc_isa.c | 2 +- sys/dev/atkbdc/psm.c | 4 ++-- sys/dev/axgbe/if_axgbe.c | 4 ++-- sys/dev/cfe/cfe_resource.c | 2 +- sys/dev/cfi/cfi_disk.c | 2 +- sys/dev/chromebook_platform/chromebook_platform.c | 2 +- sys/dev/ciss/ciss.c | 2 +- sys/dev/cxgb/cxgb_main.c | 2 +- sys/dev/cxgbe/cxgbei/icl_cxgbei.c | 2 +- sys/dev/cxgbe/t4_main.c | 4 ++-- sys/dev/dcons/dcons_crom.c | 2 +- sys/dev/dpaa/bman_fdt.c | 4 ++-- sys/dev/dpaa/fman_fdt.c | 2 +- sys/dev/dpaa/fman_mdio.c | 2 +- sys/dev/dpaa/if_dtsec_fdt.c | 2 +- sys/dev/dpaa/qman_fdt.c | 4 ++-- sys/dev/dpms/dpms.c | 2 +- sys/dev/dwc/if_dwc.c | 2 +- sys/dev/fb/fbd.c | 2 +- sys/dev/fdc/fdc.c | 2 +- sys/dev/fdc/fdc_isa.c | 2 +- sys/dev/firewire/if_fwe.c | 2 +- sys/dev/firewire/if_fwip.c | 2 +- sys/dev/firewire/sbp.c | 2 +- sys/dev/firewire/sbp_targ.c | 2 +- sys/dev/flash/cqspi.c | 2 +- sys/dev/flash/flexspi/flex_spi.c | 2 +- sys/dev/flash/mx25l.c | 2 +- sys/dev/flash/n25q.c | 2 +- sys/dev/ftwd/ftwd.c | 2 +- sys/dev/fxp/inphy.c | 2 +- sys/dev/glxiic/glxiic.c | 2 +- sys/dev/gpio/dwgpio/dwgpio.c | 2 +- sys/dev/hpt27xx/hpt27xx_osm_bsd.c | 2 +- sys/dev/hptiop/hptiop.c | 2 +- sys/dev/hptnr/hptnr_osm_bsd.c | 2 +- sys/dev/hyperv/input/hv_kbdc.c | 2 +- sys/dev/hyperv/utilities/hv_kvp.c | 2 +- sys/dev/hyperv/utilities/hv_snapshot.c | 2 +- sys/dev/ida/ida_disk.c | 2 +- sys/dev/iicbus/adc/ad7417.c | 2 +- sys/dev/iicbus/controller/twsi/a10_twsi.c | 2 +- sys/dev/iicbus/controller/twsi/twsi.c | 2 +- sys/dev/iicbus/if_ic.c | 2 +- sys/dev/iicbus/iic.c | 2 +- sys/dev/iicbus/iicbb.c | 2 +- sys/dev/iicbus/pwm/adt746x.c | 2 +- sys/dev/iicbus/sensor/ds1631.c | 2 +- sys/dev/iicbus/sensor/ds1775.c | 2 +- sys/dev/iicbus/sensor/max6690.c | 2 +- sys/dev/ipmi/ipmi_acpi.c | 2 +- sys/dev/ipmi/ipmi_isa.c | 2 +- sys/dev/ipmi/ipmi_pci.c | 4 ++-- sys/dev/ipmi/ipmi_smbus.c | 2 +- sys/dev/ips/ips_disk.c | 2 +- sys/dev/isci/isci.c | 2 +- sys/dev/iscsi/icl_soft.c | 2 +- sys/dev/iser/icl_iser.c | 2 +- sys/dev/isp/isp_pci.c | 2 +- sys/dev/itwd/itwd.c | 2 +- sys/dev/le/if_le_isa.c | 2 +- sys/dev/le/if_le_pci.c | 2 +- sys/dev/mfi/mfi_disk.c | 2 +- sys/dev/mfi/mfi_syspd.c | 2 +- sys/dev/mge/if_mge.c | 2 +- sys/dev/mlx/mlx_disk.c | 2 +- sys/dev/mpi3mr/mpi3mr_pci.c | 2 +- sys/dev/mpr/mpr_pci.c | 2 +- sys/dev/mvs/mvs.c | 2 +- sys/dev/mvs/mvs_pci.c | 2 +- sys/dev/mvs/mvs_soc.c | 2 +- sys/dev/ncthwm/ncthwm.c | 2 +- sys/dev/nfsmb/nfsmb.c | 4 ++-- sys/dev/nvme/nvme_ahci.c | 2 +- sys/dev/nvme/nvme_pci.c | 2 +- sys/dev/ow/ow.c | 2 +- sys/dev/ow/ow_temp.c | 2 +- sys/dev/ow/owc_gpiobus.c | 2 +- sys/dev/pbio/pbio.c | 2 +- sys/dev/pcf/pcf_isa.c | 2 +- sys/dev/pci/fixup_pci.c | 2 +- sys/dev/pci/hostb_pci.c | 2 +- sys/dev/pci/ignore_pci.c | 2 +- sys/dev/pci/vga_pci.c | 2 +- sys/dev/pms/freebsd/driver/ini/src/agtiapi.c | 2 +- sys/dev/powermac_nvram/powermac_nvram.c | 2 +- sys/dev/ppbus/if_plip.c | 2 +- sys/dev/ppbus/lpt.c | 2 +- sys/dev/ppbus/pcfclock.c | 2 +- sys/dev/ppbus/ppbconf.c | 2 +- sys/dev/ppbus/ppi.c | 2 +- sys/dev/ppbus/pps.c | 2 +- sys/dev/ppc/ppc_acpi.c | 2 +- sys/dev/ppc/ppc_isa.c | 2 +- sys/dev/ppc/ppc_pci.c | 2 +- sys/dev/ppc/ppc_puc.c | 2 +- sys/dev/pst/pst-pci.c | 2 +- sys/dev/pst/pst-raid.c | 2 +- sys/dev/qlnx/qlnxe/qlnx_os.c | 4 ++-- sys/dev/qlxgb/qla_os.c | 2 +- sys/dev/qlxgbe/ql_os.c | 2 +- sys/dev/qlxge/qls_os.c | 2 +- sys/dev/sbni/if_sbni_isa.c | 2 +- sys/dev/sbni/if_sbni_pci.c | 2 +- sys/dev/siis/siis.c | 4 ++-- sys/dev/smartpqi/smartpqi_main.c | 2 +- sys/dev/smbios/smbios.c | 2 +- sys/dev/smbus/smb.c | 2 +- sys/dev/smc/if_smc.c | 2 +- sys/dev/smc/if_smc_acpi.c | 2 +- sys/dev/smc/if_smc_fdt.c | 2 +- sys/dev/sound/macio/davbus.c | 2 +- sys/dev/sound/macio/i2s.c | 4 ++-- sys/dev/sound/macio/onyx.c | 2 +- sys/dev/sound/macio/snapper.c | 2 +- sys/dev/sound/macio/tumbler.c | 2 +- sys/dev/sound/pci/als4000.c | 2 +- sys/dev/sound/pci/atiixp.c | 2 +- sys/dev/sound/pci/cmi.c | 2 +- sys/dev/sound/pci/cs4281.c | 2 +- sys/dev/sound/pci/csapcm.c | 2 +- sys/dev/sound/pci/envy24.c | 2 +- sys/dev/sound/pci/envy24ht.c | 2 +- sys/dev/sound/pci/es137x.c | 2 +- sys/dev/sound/pci/hdspe-pcm.c | 2 +- sys/dev/sound/pci/hdspe.c | 2 +- sys/dev/sound/pci/ich.c | 2 +- sys/dev/sound/pci/maestro3.c | 2 +- sys/dev/sound/pci/neomagic.c | 2 +- sys/dev/sound/pci/solo.c | 2 +- sys/dev/sound/pci/t4dwave.c | 2 +- sys/dev/sound/pci/vibes.c | 12 ++++++------ sys/dev/spibus/spigen.c | 2 +- sys/dev/tdfx/tdfx_pci.c | 2 +- sys/dev/ti/if_ti.c | 2 +- sys/dev/tpm/tpm_acpi.c | 2 +- sys/dev/tpm/tpm_isa.c | 2 +- sys/dev/uart/uart_bus_acpi.c | 2 +- sys/dev/uart/uart_bus_fdt.c | 2 +- sys/dev/uart/uart_bus_isa.c | 2 +- sys/dev/uart/uart_bus_puc.c | 2 +- sys/dev/uart/uart_bus_scc.c | 2 +- sys/dev/uart/uart_dev_imx.c | 2 +- sys/dev/uart/uart_dev_lowrisc.c | 2 +- sys/dev/uart/uart_dev_mu.c | 2 +- sys/dev/uart/uart_dev_mvebu.c | 2 +- sys/dev/uart/uart_dev_pl011.c | 2 +- sys/dev/uart/uart_dev_quicc.c | 2 +- sys/dev/uart/uart_dev_z8530.c | 2 +- sys/dev/usb/controller/ehci_fsl.c | 2 +- sys/dev/usb/input/uep.c | 4 ++-- sys/dev/usb/net/uhso.c | 2 +- sys/dev/xilinx/if_xae.c | 2 +- 180 files changed, 201 insertions(+), 201 deletions(-) diff --git a/sys/dev/aacraid/aacraid_cam.c b/sys/dev/aacraid/aacraid_cam.c index 919bf1ad55ca..6cb515462f08 100644 --- a/sys/dev/aacraid/aacraid_cam.c +++ b/sys/dev/aacraid/aacraid_cam.c @@ -122,7 +122,7 @@ static device_method_t aacraid_pass_methods[] = { DEVMETHOD(device_probe, aac_cam_probe), DEVMETHOD(device_attach, aac_cam_attach), DEVMETHOD(device_detach, aac_cam_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t aacraid_pass_driver = { diff --git a/sys/dev/aacraid/aacraid_pci.c b/sys/dev/aacraid/aacraid_pci.c index cb4c6fb8eeba..37bcede44878 100644 --- a/sys/dev/aacraid/aacraid_pci.c +++ b/sys/dev/aacraid/aacraid_pci.c @@ -72,7 +72,7 @@ static device_method_t aacraid_methods[] = { DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_driver_added, bus_generic_driver_added), - { 0, 0 } + DEVMETHOD_END }; static driver_t aacraid_pci_driver = { diff --git a/sys/dev/acpi_support/acpi_asus.c b/sys/dev/acpi_support/acpi_asus.c index b9ba6650d2b7..975d7f93554a 100644 --- a/sys/dev/acpi_support/acpi_asus.c +++ b/sys/dev/acpi_support/acpi_asus.c @@ -517,7 +517,7 @@ static device_method_t acpi_asus_methods[] = { DEVMETHOD(device_probe, acpi_asus_probe), DEVMETHOD(device_attach, acpi_asus_attach), DEVMETHOD(device_detach, acpi_asus_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t acpi_asus_driver = { diff --git a/sys/dev/acpica/acpi_video.c b/sys/dev/acpica/acpi_video.c index da7c2a4d19cb..e3ec70b70ef1 100644 --- a/sys/dev/acpica/acpi_video.c +++ b/sys/dev/acpica/acpi_video.c @@ -176,7 +176,7 @@ static device_method_t acpi_video_methods[] = { DEVMETHOD(device_detach, acpi_video_detach), DEVMETHOD(device_resume, acpi_video_resume), DEVMETHOD(device_shutdown, acpi_video_shutdown), - { 0, 0 } + DEVMETHOD_END }; static driver_t acpi_video_driver = { diff --git a/sys/dev/adb/adb_bus.c b/sys/dev/adb/adb_bus.c index 144cce51b9f4..269e737b8597 100644 --- a/sys/dev/adb/adb_bus.c +++ b/sys/dev/adb/adb_bus.c @@ -58,15 +58,15 @@ static device_method_t adb_bus_methods[] = { DEVMETHOD(device_probe, adb_bus_probe), DEVMETHOD(device_attach, adb_bus_attach), DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), /* Bus Interface */ - DEVMETHOD(bus_probe_nomatch, adb_probe_nomatch), - DEVMETHOD(bus_print_child, adb_print_child), + DEVMETHOD(bus_probe_nomatch, adb_probe_nomatch), + DEVMETHOD(bus_print_child, adb_print_child), - { 0, 0 }, + DEVMETHOD_END }; driver_t adb_driver = { diff --git a/sys/dev/adb/adb_buttons.c b/sys/dev/adb/adb_buttons.c index e003183f9e9d..14d96cc5a05c 100644 --- a/sys/dev/adb/adb_buttons.c +++ b/sys/dev/adb/adb_buttons.c @@ -67,7 +67,7 @@ static device_method_t abtn_methods[] = { /* ADB interface */ DEVMETHOD(adb_receive_packet, abtn_receive_packet), - { 0, 0 } + DEVMETHOD_END }; static driver_t abtn_driver = { diff --git a/sys/dev/adb/adb_kbd.c b/sys/dev/adb/adb_kbd.c index 911d952ee52a..494b71375413 100644 --- a/sys/dev/adb/adb_kbd.c +++ b/sys/dev/adb/adb_kbd.c @@ -100,7 +100,7 @@ static device_method_t adb_kbd_methods[] = { /* ADB interface */ DEVMETHOD(adb_receive_packet, adb_kbd_receive_packet), - { 0, 0 } + DEVMETHOD_END }; static driver_t adb_kbd_driver = { diff --git a/sys/dev/adb/adb_mouse.c b/sys/dev/adb/adb_mouse.c index 464cf2b1f862..32e54df23f12 100644 --- a/sys/dev/adb/adb_mouse.c +++ b/sys/dev/adb/adb_mouse.c @@ -105,7 +105,7 @@ static device_method_t adb_mouse_methods[] = { /* ADB interface */ DEVMETHOD(adb_receive_packet, adb_mouse_receive_packet), - { 0, 0 } + DEVMETHOD_END }; static driver_t adb_mouse_driver = { diff --git a/sys/dev/agp/agp_ali.c b/sys/dev/agp/agp_ali.c index 0762d903fffe..31704aa60813 100644 --- a/sys/dev/agp/agp_ali.c +++ b/sys/dev/agp/agp_ali.c @@ -254,7 +254,7 @@ static device_method_t agp_ali_methods[] = { DEVMETHOD(agp_free_memory, agp_generic_free_memory), DEVMETHOD(agp_bind_memory, agp_generic_bind_memory), DEVMETHOD(agp_unbind_memory, agp_generic_unbind_memory), - { 0, 0 } + DEVMETHOD_END }; static driver_t agp_ali_driver = { diff --git a/sys/dev/agp/agp_amd.c b/sys/dev/agp/agp_amd.c index b2dc6527392d..c87ec0d11b66 100644 --- a/sys/dev/agp/agp_amd.c +++ b/sys/dev/agp/agp_amd.c @@ -391,7 +391,7 @@ static device_method_t agp_amd_methods[] = { DEVMETHOD(agp_free_memory, agp_generic_free_memory), DEVMETHOD(agp_bind_memory, agp_generic_bind_memory), DEVMETHOD(agp_unbind_memory, agp_generic_unbind_memory), - { 0, 0 } + DEVMETHOD_END }; static driver_t agp_amd_driver = { diff --git a/sys/dev/agp/agp_amd64.c b/sys/dev/agp/agp_amd64.c index 9b5a4c342dac..a0b91428a5b5 100644 --- a/sys/dev/agp/agp_amd64.c +++ b/sys/dev/agp/agp_amd64.c @@ -499,7 +499,7 @@ static device_method_t agp_amd64_methods[] = { DEVMETHOD(agp_free_memory, agp_generic_free_memory), DEVMETHOD(agp_bind_memory, agp_generic_bind_memory), DEVMETHOD(agp_unbind_memory, agp_generic_unbind_memory), - { 0, 0 } + DEVMETHOD_END }; static driver_t agp_amd64_driver = { diff --git a/sys/dev/agp/agp_apple.c b/sys/dev/agp/agp_apple.c index ee22f1cc44fa..13730bcc619e 100644 --- a/sys/dev/agp/agp_apple.c +++ b/sys/dev/agp/agp_apple.c @@ -279,7 +279,7 @@ static device_method_t agp_apple_methods[] = { DEVMETHOD(agp_free_memory, agp_generic_free_memory), DEVMETHOD(agp_bind_memory, agp_generic_bind_memory), DEVMETHOD(agp_unbind_memory, agp_generic_unbind_memory), - { 0, 0 } + DEVMETHOD_END }; static driver_t agp_apple_driver = { diff --git a/sys/dev/agp/agp_ati.c b/sys/dev/agp/agp_ati.c index b30d80038a3d..649a851ba9ad 100644 --- a/sys/dev/agp/agp_ati.c +++ b/sys/dev/agp/agp_ati.c @@ -363,7 +363,7 @@ static device_method_t agp_ati_methods[] = { DEVMETHOD(agp_free_memory, agp_generic_free_memory), DEVMETHOD(agp_bind_memory, agp_generic_bind_memory), DEVMETHOD(agp_unbind_memory, agp_generic_unbind_memory), - { 0, 0 } + DEVMETHOD_END }; static driver_t agp_ati_driver = { diff --git a/sys/dev/agp/agp_i810.c b/sys/dev/agp/agp_i810.c index 6ed04297f6c8..4325274f4855 100644 --- a/sys/dev/agp/agp_i810.c +++ b/sys/dev/agp/agp_i810.c @@ -1913,7 +1913,7 @@ static device_method_t agp_i810_methods[] = { DEVMETHOD(agp_bind_memory, agp_i810_bind_memory), DEVMETHOD(agp_unbind_memory, agp_i810_unbind_memory), DEVMETHOD(agp_chipset_flush, agp_intel_gtt_chipset_flush), - { 0, 0 } + DEVMETHOD_END }; static driver_t agp_i810_driver = { diff --git a/sys/dev/agp/agp_intel.c b/sys/dev/agp/agp_intel.c index 32b3e920adf5..1766ecc74097 100644 --- a/sys/dev/agp/agp_intel.c +++ b/sys/dev/agp/agp_intel.c @@ -420,7 +420,7 @@ static device_method_t agp_intel_methods[] = { DEVMETHOD(agp_free_memory, agp_generic_free_memory), DEVMETHOD(agp_bind_memory, agp_generic_bind_memory), DEVMETHOD(agp_unbind_memory, agp_generic_unbind_memory), - { 0, 0 } + DEVMETHOD_END }; static driver_t agp_intel_driver = { diff --git a/sys/dev/agp/agp_nvidia.c b/sys/dev/agp/agp_nvidia.c index fa5b73023f59..8a24063f9d90 100644 --- a/sys/dev/agp/agp_nvidia.c +++ b/sys/dev/agp/agp_nvidia.c @@ -435,7 +435,7 @@ static device_method_t agp_nvidia_methods[] = { DEVMETHOD(agp_free_memory, agp_generic_free_memory), DEVMETHOD(agp_bind_memory, agp_generic_bind_memory), DEVMETHOD(agp_unbind_memory, agp_generic_unbind_memory), - { 0, 0 } + DEVMETHOD_END }; static driver_t agp_nvidia_driver = { diff --git a/sys/dev/agp/agp_sis.c b/sys/dev/agp/agp_sis.c index f7572e487658..4b2804782a6e 100644 --- a/sys/dev/agp/agp_sis.c +++ b/sys/dev/agp/agp_sis.c @@ -274,7 +274,7 @@ static device_method_t agp_sis_methods[] = { DEVMETHOD(agp_free_memory, agp_generic_free_memory), DEVMETHOD(agp_bind_memory, agp_generic_bind_memory), DEVMETHOD(agp_unbind_memory, agp_generic_unbind_memory), - { 0, 0 } + DEVMETHOD_END }; static driver_t agp_sis_driver = { diff --git a/sys/dev/agp/agp_via.c b/sys/dev/agp/agp_via.c index f101c08e8cc3..5ee0a9e13cee 100644 --- a/sys/dev/agp/agp_via.c +++ b/sys/dev/agp/agp_via.c @@ -409,7 +409,7 @@ static device_method_t agp_via_methods[] = { DEVMETHOD(agp_free_memory, agp_generic_free_memory), DEVMETHOD(agp_bind_memory, agp_generic_bind_memory), DEVMETHOD(agp_unbind_memory, agp_generic_unbind_memory), - { 0, 0 } + DEVMETHOD_END }; static driver_t agp_via_driver = { diff --git a/sys/dev/aic7xxx/ahc_isa.c b/sys/dev/aic7xxx/ahc_isa.c index 06ef509f2782..456ada6c2879 100644 --- a/sys/dev/aic7xxx/ahc_isa.c +++ b/sys/dev/aic7xxx/ahc_isa.c @@ -286,7 +286,7 @@ static device_method_t ahc_isa_device_methods[] = { DEVMETHOD(device_probe, ahc_isa_probe), DEVMETHOD(device_attach, ahc_isa_attach), DEVMETHOD(device_detach, ahc_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahc_isa_driver = { diff --git a/sys/dev/aic7xxx/ahc_pci.c b/sys/dev/aic7xxx/ahc_pci.c index 6911f167c081..ed14cdfa0d2a 100644 --- a/sys/dev/aic7xxx/ahc_pci.c +++ b/sys/dev/aic7xxx/ahc_pci.c @@ -42,7 +42,7 @@ static device_method_t ahc_pci_device_methods[] = { DEVMETHOD(device_probe, ahc_pci_probe), DEVMETHOD(device_attach, ahc_pci_attach), DEVMETHOD(device_detach, ahc_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahc_pci_driver = { diff --git a/sys/dev/aic7xxx/ahd_pci.c b/sys/dev/aic7xxx/ahd_pci.c index ec828517c1c4..04eb89ec21a5 100644 --- a/sys/dev/aic7xxx/ahd_pci.c +++ b/sys/dev/aic7xxx/ahd_pci.c @@ -42,7 +42,7 @@ static device_method_t ahd_pci_device_methods[] = { DEVMETHOD(device_probe, ahd_pci_probe), DEVMETHOD(device_attach, ahd_pci_attach), DEVMETHOD(device_detach, ahd_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahd_pci_driver = { diff --git a/sys/dev/al_eth/al_eth.c b/sys/dev/al_eth/al_eth.c index 1b976e7a724c..b799e4233247 100644 --- a/sys/dev/al_eth/al_eth.c +++ b/sys/dev/al_eth/al_eth.c @@ -243,7 +243,7 @@ static device_method_t al_methods[] = { DEVMETHOD(miibus_writereg, al_miibus_writereg), DEVMETHOD(miibus_statchg, al_miibus_statchg), DEVMETHOD(miibus_linkchg, al_miibus_linkchg), - { 0, 0 } + DEVMETHOD_END }; static driver_t al_driver = { diff --git a/sys/dev/alpm/alpm.c b/sys/dev/alpm/alpm.c index cde535d5868c..44bf9c5f11ba 100644 --- a/sys/dev/alpm/alpm.c +++ b/sys/dev/alpm/alpm.c @@ -642,7 +642,7 @@ static device_method_t alpm_methods[] = { DEVMETHOD(smbus_readw, alpm_readw), DEVMETHOD(smbus_bwrite, alpm_bwrite), DEVMETHOD(smbus_bread, alpm_bread), - { 0, 0 } + DEVMETHOD_END }; static driver_t alpm_driver = { diff --git a/sys/dev/amdpm/amdpm.c b/sys/dev/amdpm/amdpm.c index 660e0b2d04b8..21b47c112d1b 100644 --- a/sys/dev/amdpm/amdpm.c +++ b/sys/dev/amdpm/amdpm.c @@ -649,7 +649,7 @@ static device_method_t amdpm_methods[] = { DEVMETHOD(smbus_readw, amdpm_readw), DEVMETHOD(smbus_bwrite, amdpm_bwrite), DEVMETHOD(smbus_bread, amdpm_bread), - { 0, 0 } + DEVMETHOD_END }; static driver_t amdpm_driver = { diff --git a/sys/dev/amdsmb/amdsmb.c b/sys/dev/amdsmb/amdsmb.c index c29af735ffce..d39e8519ff25 100644 --- a/sys/dev/amdsmb/amdsmb.c +++ b/sys/dev/amdsmb/amdsmb.c @@ -561,7 +561,7 @@ static device_method_t amdsmb_methods[] = { DEVMETHOD(smbus_readw, amdsmb_readw), DEVMETHOD(smbus_bwrite, amdsmb_bwrite), DEVMETHOD(smbus_bread, amdsmb_bread), - { 0, 0 } + DEVMETHOD_END }; static driver_t amdsmb_driver = { diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index 4bba16fa6a89..17a282ce0b97 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -581,7 +581,7 @@ static device_method_t asmc_methods[] = { DEVMETHOD(device_attach, asmc_attach), DEVMETHOD(device_detach, asmc_detach), DEVMETHOD(device_resume, asmc_resume), - { 0, 0 } + DEVMETHOD_END }; static driver_t asmc_driver = { diff --git a/sys/dev/atkbdc/atkbd_atkbdc.c b/sys/dev/atkbdc/atkbd_atkbdc.c index d5ef9706d7b9..64545ce63ba9 100644 --- a/sys/dev/atkbdc/atkbd_atkbdc.c +++ b/sys/dev/atkbdc/atkbd_atkbdc.c @@ -61,7 +61,7 @@ static device_method_t atkbd_methods[] = { DEVMETHOD(device_probe, atkbdprobe), DEVMETHOD(device_attach, atkbdattach), DEVMETHOD(device_resume, atkbdresume), - { 0, 0 } + DEVMETHOD_END }; static driver_t atkbd_driver = { diff --git a/sys/dev/atkbdc/atkbdc_isa.c b/sys/dev/atkbdc/atkbdc_isa.c index cb42c8bda40c..65b4312c33aa 100644 --- a/sys/dev/atkbdc/atkbdc_isa.c +++ b/sys/dev/atkbdc/atkbdc_isa.c @@ -75,7 +75,7 @@ static device_method_t atkbdc_isa_methods[] = { DEVMETHOD(bus_delete_resource, bus_generic_rl_delete_resource), DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), - { 0, 0 } + DEVMETHOD_END }; static driver_t atkbdc_isa_driver = { diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c index 6b6a24ba7f31..41905164ca6a 100644 --- a/sys/dev/atkbdc/psm.c +++ b/sys/dev/atkbdc/psm.c @@ -733,7 +733,7 @@ static device_method_t psm_methods[] = { DEVMETHOD(device_attach, psmattach), DEVMETHOD(device_detach, psmdetach), DEVMETHOD(device_resume, psmresume), - { 0, 0 } + DEVMETHOD_END }; static driver_t psm_driver = { @@ -7510,7 +7510,7 @@ static device_attach_t psmcpnp_attach; static device_method_t psmcpnp_methods[] = { DEVMETHOD(device_probe, psmcpnp_probe), DEVMETHOD(device_attach, psmcpnp_attach), - { 0, 0 } + DEVMETHOD_END }; static driver_t psmcpnp_driver = { diff --git a/sys/dev/axgbe/if_axgbe.c b/sys/dev/axgbe/if_axgbe.c index 9c6d7d845f2d..36b053971552 100644 --- a/sys/dev/axgbe/if_axgbe.c +++ b/sys/dev/axgbe/if_axgbe.c @@ -560,7 +560,7 @@ static device_method_t axgbe_methods[] = { DEVMETHOD(device_probe, axgbe_probe), DEVMETHOD(device_attach, axgbe_attach), - { 0, 0 } + DEVMETHOD_END }; DEFINE_CLASS_0(axgbe, axgbe_driver, axgbe_methods, @@ -603,7 +603,7 @@ static device_method_t axgbephy_methods[] = { DEVMETHOD(device_probe, axgbephy_probe), DEVMETHOD(device_attach, axgbephy_attach), - { 0, 0 } + DEVMETHOD_END }; DEFINE_CLASS_0(axgbephy, axgbephy_driver, axgbephy_methods, 0); diff --git a/sys/dev/cfe/cfe_resource.c b/sys/dev/cfe/cfe_resource.c index 062d739c3f8f..629f655f4fbd 100644 --- a/sys/dev/cfe/cfe_resource.c +++ b/sys/dev/cfe/cfe_resource.c @@ -145,7 +145,7 @@ static device_method_t cferes_methods[] = { DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD(device_suspend, bus_generic_suspend), DEVMETHOD(device_resume, bus_generic_resume), - { 0, 0 } + DEVMETHOD_END }; static driver_t cferes_driver = { diff --git a/sys/dev/cfi/cfi_disk.c b/sys/dev/cfi/cfi_disk.c index 573dece03f5a..653f1d2dfdeb 100644 --- a/sys/dev/cfi/cfi_disk.c +++ b/sys/dev/cfi/cfi_disk.c @@ -347,7 +347,7 @@ static device_method_t cfi_disk_methods[] = { DEVMETHOD(device_probe, cfi_disk_probe), DEVMETHOD(device_attach, cfi_disk_attach), DEVMETHOD(device_detach, cfi_disk_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t cfi_disk_driver = { "cfid", diff --git a/sys/dev/chromebook_platform/chromebook_platform.c b/sys/dev/chromebook_platform/chromebook_platform.c index 533556fa17ce..9218d730fdc0 100644 --- a/sys/dev/chromebook_platform/chromebook_platform.c +++ b/sys/dev/chromebook_platform/chromebook_platform.c @@ -83,7 +83,7 @@ chromebook_i2c_identify(driver_t *driver, device_t bus) static device_method_t chromebook_i2c_methods[] = { DEVMETHOD(device_identify, chromebook_i2c_identify), - { 0, 0 } + DEVMETHOD_END }; static driver_t chromebook_i2c_driver = { diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index 36030dd86eef..14818db93ee4 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -217,7 +217,7 @@ static device_method_t ciss_methods[] = { DEVMETHOD(device_attach, ciss_attach), DEVMETHOD(device_detach, ciss_detach), DEVMETHOD(device_shutdown, ciss_shutdown), - { 0, 0 } + DEVMETHOD_END }; static driver_t ciss_pci_driver = { diff --git a/sys/dev/cxgb/cxgb_main.c b/sys/dev/cxgb/cxgb_main.c index 4fc07dc126a1..c7ddb3962a7a 100644 --- a/sys/dev/cxgb/cxgb_main.c +++ b/sys/dev/cxgb/cxgb_main.c @@ -187,7 +187,7 @@ static device_method_t cxgb_port_methods[] = { DEVMETHOD(device_probe, cxgb_port_probe), DEVMETHOD(device_attach, cxgb_port_attach), DEVMETHOD(device_detach, cxgb_port_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t cxgb_port_driver = { diff --git a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c index 89b3628bae6d..0058e5185b9e 100644 --- a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c +++ b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c @@ -164,7 +164,7 @@ static kobj_method_t icl_cxgbei_methods[] = { KOBJMETHOD(icl_conn_task_done, icl_cxgbei_conn_task_done), KOBJMETHOD(icl_conn_transfer_setup, icl_cxgbei_conn_transfer_setup), KOBJMETHOD(icl_conn_transfer_done, icl_cxgbei_conn_transfer_done), - { 0, 0 } + KOBJMETHOD_END }; DEFINE_CLASS(icl_cxgbei, icl_cxgbei_methods, sizeof(struct icl_cxgbei_conn)); diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 537249c8e5c3..c3a73bdfe994 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -131,7 +131,7 @@ device_method_t cxgbe_methods[] = { DEVMETHOD(device_probe, cxgbe_probe), DEVMETHOD(device_attach, cxgbe_attach), DEVMETHOD(device_detach, cxgbe_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t cxgbe_driver = { "cxgbe", @@ -147,7 +147,7 @@ static device_method_t vcxgbe_methods[] = { DEVMETHOD(device_probe, vcxgbe_probe), DEVMETHOD(device_attach, vcxgbe_attach), DEVMETHOD(device_detach, vcxgbe_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t vcxgbe_driver = { "vcxgbe", diff --git a/sys/dev/dcons/dcons_crom.c b/sys/dev/dcons/dcons_crom.c index d31a69adf03c..59e30935d04b 100644 --- a/sys/dev/dcons/dcons_crom.c +++ b/sys/dev/dcons/dcons_crom.c @@ -253,7 +253,7 @@ static device_method_t dcons_crom_methods[] = { DEVMETHOD(device_probe, dcons_crom_probe), DEVMETHOD(device_attach, dcons_crom_attach), DEVMETHOD(device_detach, dcons_crom_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t dcons_crom_driver = { diff --git a/sys/dev/dpaa/bman_fdt.c b/sys/dev/dpaa/bman_fdt.c index 2ff695bf7d89..8f117cacd663 100644 --- a/sys/dev/dpaa/bman_fdt.c +++ b/sys/dev/dpaa/bman_fdt.c @@ -56,7 +56,7 @@ static device_method_t bman_methods[] = { DEVMETHOD(device_resume, bman_resume), DEVMETHOD(device_shutdown, bman_shutdown), - { 0, 0 } + DEVMETHOD_END }; static driver_t bman_driver = { @@ -93,7 +93,7 @@ static device_method_t bm_portals_methods[] = { DEVMETHOD(device_attach, bman_portals_fdt_attach), DEVMETHOD(device_detach, bman_portals_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t bm_portals_driver = { diff --git a/sys/dev/dpaa/fman_fdt.c b/sys/dev/dpaa/fman_fdt.c index 8fb06924e10a..82c4e80eb1e4 100644 --- a/sys/dev/dpaa/fman_fdt.c +++ b/sys/dev/dpaa/fman_fdt.c @@ -57,7 +57,7 @@ static device_method_t fman_methods[] = { DEVMETHOD(bus_alloc_resource, fman_alloc_resource), DEVMETHOD(bus_activate_resource, fman_activate_resource), DEVMETHOD(bus_release_resource, fman_release_resource), - { 0, 0 } + DEVMETHOD_END }; DEFINE_CLASS_1(fman, fman_driver, fman_methods, diff --git a/sys/dev/dpaa/fman_mdio.c b/sys/dev/dpaa/fman_mdio.c index 82e65cacda48..91e2248a3b11 100644 --- a/sys/dev/dpaa/fman_mdio.c +++ b/sys/dev/dpaa/fman_mdio.c @@ -91,7 +91,7 @@ static device_method_t pqmdio_methods[] = { DEVMETHOD(miibus_readreg, pqmdio_miibus_readreg), DEVMETHOD(miibus_writereg, pqmdio_miibus_writereg), - { 0, 0 } + DEVMETHOD_END }; static struct ofw_compat_data mdio_compat_data[] = { diff --git a/sys/dev/dpaa/if_dtsec_fdt.c b/sys/dev/dpaa/if_dtsec_fdt.c index f2f61777fbec..4bab2aa2b481 100644 --- a/sys/dev/dpaa/if_dtsec_fdt.c +++ b/sys/dev/dpaa/if_dtsec_fdt.c @@ -78,7 +78,7 @@ static device_method_t dtsec_methods[] = { DEVMETHOD(miibus_writereg, dtsec_miibus_writereg), DEVMETHOD(miibus_statchg, dtsec_miibus_statchg), - { 0, 0 } + DEVMETHOD_END }; static driver_t dtsec_driver = { diff --git a/sys/dev/dpaa/qman_fdt.c b/sys/dev/dpaa/qman_fdt.c index fac845c8f2b5..15b8d16f59ba 100644 --- a/sys/dev/dpaa/qman_fdt.c +++ b/sys/dev/dpaa/qman_fdt.c @@ -56,7 +56,7 @@ static device_method_t qman_methods[] = { DEVMETHOD(device_resume, qman_resume), DEVMETHOD(device_shutdown, qman_shutdown), - { 0, 0 } + DEVMETHOD_END }; static driver_t qman_driver = { @@ -93,7 +93,7 @@ static device_method_t qm_portals_methods[] = { DEVMETHOD(device_attach, qman_portals_fdt_attach), DEVMETHOD(device_detach, qman_portals_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t qm_portals_driver = { diff --git a/sys/dev/dpms/dpms.c b/sys/dev/dpms/dpms.c index 47eb9d03c820..5ed4b5a86a6d 100644 --- a/sys/dev/dpms/dpms.c +++ b/sys/dev/dpms/dpms.c @@ -107,7 +107,7 @@ static device_method_t dpms_methods[] = { DEVMETHOD(device_detach, dpms_detach), DEVMETHOD(device_suspend, dpms_suspend), DEVMETHOD(device_resume, dpms_resume), - { 0, 0 } + DEVMETHOD_END }; static driver_t dpms_driver = { diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c index 147b6351a9f8..158bb04f3de0 100644 --- a/sys/dev/dwc/if_dwc.c +++ b/sys/dev/dwc/if_dwc.c @@ -1809,7 +1809,7 @@ static device_method_t dwc_methods[] = { DEVMETHOD(miibus_writereg, dwc_miibus_write_reg), DEVMETHOD(miibus_statchg, dwc_miibus_statchg), - { 0, 0 } + DEVMETHOD_END }; driver_t dwc_driver = { diff --git a/sys/dev/fb/fbd.c b/sys/dev/fb/fbd.c index cbd6c3de4cd8..48532b9daf32 100644 --- a/sys/dev/fb/fbd.c +++ b/sys/dev/fb/fbd.c @@ -349,7 +349,7 @@ static device_method_t fbd_methods[] = { DEVMETHOD(device_shutdown, bus_generic_shutdown), - { 0, 0 } + DEVMETHOD_END }; driver_t fbd_driver = { diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index c51d36baaecb..0cb2896c09e8 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -2090,7 +2090,7 @@ static device_method_t fd_methods[] = { DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD(device_suspend, bus_generic_suspend), /* XXX */ DEVMETHOD(device_resume, bus_generic_resume), /* XXX */ - { 0, 0 } + DEVMETHOD_END }; static driver_t fd_driver = { diff --git a/sys/dev/fdc/fdc_isa.c b/sys/dev/fdc/fdc_isa.c index fcdd6bc0cdd5..e206d9fcb932 100644 --- a/sys/dev/fdc/fdc_isa.c +++ b/sys/dev/fdc/fdc_isa.c @@ -211,7 +211,7 @@ static device_method_t fdc_methods[] = { DEVMETHOD(bus_write_ivar, fdc_write_ivar), /* Our children never use any other bus interface methods. */ - { 0, 0 } + DEVMETHOD_END }; static driver_t fdc_driver = { diff --git a/sys/dev/firewire/if_fwe.c b/sys/dev/firewire/if_fwe.c index 44d3425799e9..4f8d0087e9ab 100644 --- a/sys/dev/firewire/if_fwe.c +++ b/sys/dev/firewire/if_fwe.c @@ -613,7 +613,7 @@ static device_method_t fwe_methods[] = { DEVMETHOD(device_probe, fwe_probe), DEVMETHOD(device_attach, fwe_attach), DEVMETHOD(device_detach, fwe_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t fwe_driver = { diff --git a/sys/dev/firewire/if_fwip.c b/sys/dev/firewire/if_fwip.c index 41143e2e59d4..42f0c6f53743 100644 --- a/sys/dev/firewire/if_fwip.c +++ b/sys/dev/firewire/if_fwip.c @@ -916,7 +916,7 @@ static device_method_t fwip_methods[] = { DEVMETHOD(device_probe, fwip_probe), DEVMETHOD(device_attach, fwip_attach), DEVMETHOD(device_detach, fwip_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t fwip_driver = { diff --git a/sys/dev/firewire/sbp.c b/sys/dev/firewire/sbp.c index 5f4ebb747057..24746ce4f137 100644 --- a/sys/dev/firewire/sbp.c +++ b/sys/dev/firewire/sbp.c @@ -2835,7 +2835,7 @@ static device_method_t sbp_methods[] = { DEVMETHOD(device_detach, sbp_detach), DEVMETHOD(device_shutdown, sbp_shutdown), - { 0, 0 } + DEVMETHOD_END }; static driver_t sbp_driver = { diff --git a/sys/dev/firewire/sbp_targ.c b/sys/dev/firewire/sbp_targ.c index 4efc16c1ee47..96a86c25b684 100644 --- a/sys/dev/firewire/sbp_targ.c +++ b/sys/dev/firewire/sbp_targ.c @@ -2036,7 +2036,7 @@ static device_method_t sbp_targ_methods[] = { DEVMETHOD(device_probe, sbp_targ_probe), DEVMETHOD(device_attach, sbp_targ_attach), DEVMETHOD(device_detach, sbp_targ_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t sbp_targ_driver = { diff --git a/sys/dev/flash/cqspi.c b/sys/dev/flash/cqspi.c index 9332ec85477c..417aa231e4ba 100644 --- a/sys/dev/flash/cqspi.c +++ b/sys/dev/flash/cqspi.c @@ -754,7 +754,7 @@ static device_method_t cqspi_methods[] = { DEVMETHOD(qspi_write, cqspi_write), DEVMETHOD(qspi_erase, cqspi_erase), - { 0, 0 } + DEVMETHOD_END }; DEFINE_CLASS_1(cqspi, cqspi_driver, cqspi_methods, diff --git a/sys/dev/flash/flexspi/flex_spi.c b/sys/dev/flash/flexspi/flex_spi.c index b4c2ce985e08..f845a1d8afc2 100644 --- a/sys/dev/flash/flexspi/flex_spi.c +++ b/sys/dev/flash/flexspi/flex_spi.c @@ -970,7 +970,7 @@ static device_method_t flex_spi_methods[] = { DEVMETHOD(device_attach, flex_spi_attach), DEVMETHOD(device_detach, flex_spi_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t flex_spi_driver = { diff --git a/sys/dev/flash/mx25l.c b/sys/dev/flash/mx25l.c index 64e3e53d4291..c7c95716aaed 100644 --- a/sys/dev/flash/mx25l.c +++ b/sys/dev/flash/mx25l.c @@ -673,7 +673,7 @@ static device_method_t mx25l_methods[] = { DEVMETHOD(device_attach, mx25l_attach), DEVMETHOD(device_detach, mx25l_detach), *** 1688 LINES SKIPPED *** From nobody Sat Apr 25 17:03:13 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2x3j4ldDz6bpjg for ; Sat, 25 Apr 2026 17:03:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2x3j3xkSz3HMT for ; Sat, 25 Apr 2026 17:03:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777136593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4E+5wOIQAjUPkdTWPZcZSBg3FsLaRpN2YP5GHXGN+Gk=; b=TYrPSPV6aAv1vctLYmRgy31W8E11q4vVwxJFVn3O3CeG+SXGbfFr9FLGbtHJC0yLjHygxi 0fprScH64GWxDlHw+QwyKjGHrbjBx1wncOyZ4MW3ORxFOQAhZdsHmQQ9ZYhpS4ti+PuNPu zx+gFEz2aDgplNk8Rjf55RfP9GiyVjeu5eKUfX2D+mw29nz2OSYT2F/oS0npdIIeryQvx0 sjBy6BM4XEdzLlECLfWjf2a57fhCWUQCJCipn+w0QE/DhdFd+F41WPkOSjqRH6NJakVgim 4KLs6uhGJpyxOreUQd9SUl5ETZNjlj8PjKrqRbpxt4vBXtUmBqTQ8Er/e8Pzjw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777136593; a=rsa-sha256; cv=none; b=eF8Nvx7Mk5v/AFCRn4MrMB3ms95SBcaiCSulGWMQ1rdlBp4SlZYpqXTYFFr2+a85+AxZtV R9/grBDUqJRHlOwmk9QsnnIWrcyEkXI6TE+C4xU55jWAGUR9OVQf3ssA9GS92pznale9+6 XYUwQfDyawEPSbliWpqnqZDlpqmLMUIyxOf/YhIyPloEdRUL5Sb8dIhA9oDw6cTDx5v1Tl PsRfNUbh8MpbvDNLHcBM2WOE5Ko4nXOT/BbNnVMlltonuJCgk6UF6j1gbRkFYbapdihQ9d maM2XU9h2WpceinmafTL4b4JQJBAf4a2rs8wd598mYgta2eVRNNoVPbJeBsLzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777136593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4E+5wOIQAjUPkdTWPZcZSBg3FsLaRpN2YP5GHXGN+Gk=; b=n8/rVtym8CpaTWEEko6YCBStPd4c0FfWErW4MPXujtH7ELXNYopnPtb+wHdNDZgQQRnTSa ZlYLXVY3vQnRBuPRp4AB/g3ONyQCDw4YSSfMN9fK7i7ipOBbE83Z+8Qgl4efqHgoaKZ36A o8LhQKK+oBczsP/EPaUD89pxo4uHs5XxtJeHacveU44dO7iMU0A7lZ/j8wzXE2mo5i+N+w Z6sO6ne2Lszf7vb4QrsNQ9TS+W0utd1/qoQPxkO52EtH9D/8BABAdDexr7lWtBgJ0mKodm AuUXJx+z6V6GSHNUiJhPopPrJGSY7Gezqfp6t/2J849yG5xMsT2OZVt7cu4/Rg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2x3j2yDfzk2g for ; Sat, 25 Apr 2026 17:03:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 180a0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 17:03:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: 73a02425e434 - stable/15 - build.7: Improve make delete-old example List-Id: Commits to the stable branches 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: 73a02425e4340f763974fa323ab7f3f63a2ce1ec Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 17:03:13 +0000 Message-Id: <69ecf3d1.180a0.1e8a774d@gitrepo.freebsd.org> The branch stable/15 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=73a02425e4340f763974fa323ab7f3f63a2ce1ec commit 73a02425e4340f763974fa323ab7f3f63a2ce1ec Author: Alexander Ziaee AuthorDate: 2026-04-22 17:24:38 +0000 Commit: Alexander Ziaee CommitDate: 2026-04-25 17:02:56 +0000 build.7: Improve make delete-old example Be more explicit that deleting old files and libraries needs to be really after you're rebooted a third time and you're really actually sure your applications aren't using old libs, following irc discussion. Also adjust an example slightly to fit on 80 character console. MFC after: 3 days Discussed with: emaste, fuz, jhb Differential Revision: https://reviews.freebsd.org/D54079 (cherry picked from commit 1d69c8e4ac7da648f63a830b23b872582469ba37) --- share/man/man7/build.7 | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index fa2b6c32fda4..d15b08d5a2ce 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 25, 2025 +.Dd April 6, 2026 .Dt BUILD 7 .Os .Sh NAME @@ -1004,16 +1004,20 @@ shutdown -r now .Pp 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: +After verifying that you do not need them, delete old files: .Bd -literal -offset indent cd /usr/src etcupdate -p make installworld etcupdate -B -make delete-old delete-old-libs +make delete-old shutdown -r now .Ed +.Pp +After testing the new system and verifying that your applications do not +depend on them, delete the old libraries: +.Pp +.Dl make delete-old-libs .Ss Example 2: Build and upgrade a custom kernel in place Create a custom kernel configuration, .Va MYKERNEL , @@ -1089,21 +1093,21 @@ such as amd64: .Bd -literal -offset indent cd /usr/src make TARGET_ARCH=aarch64 buildworld buildkernel -make TARGET_ARCH=aarch64 DESTDIR=/armclient installworld installkernel +make TARGET_ARCH=aarch64 DESTDIR=/client 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 +make clean all install DESTDIR=/client .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 +make kernel KERNFAST=1 DESTDIR=/client .Ed .Sh DIAGNOSTICS .Bl -diag From nobody Sat Apr 25 17:03:14 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2x3k6xj4z6bpqc for ; Sat, 25 Apr 2026 17:03:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2x3k48Mfz3HTw for ; Sat, 25 Apr 2026 17:03:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777136594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5tFfzz9o23vokP4SAIVfubof8EC6QVOlOsIppr3uOLw=; b=IWdsfPoJTY/yxIniaXZTLsspqu80HammRc2CeRbW57aQbmOzvI0nPlQSdsb57dD7zdpSC4 ZVBnsdtuNaSk+GjH8pVC/yNux8FuEjVq8kSS10lvqZYnTPC54EuXJNN0HZoN8U9cnR+IiW sbTLFUpuzuS2vftQLbUH0zxvhHLw2BGgClX9RfvjjHn2RRVtprQ6ivZqMVpJQo0KjL9d8y 3jzkmhWuJr/3YuGgVN+nTGtzJJ5MZqkXN3TcUrHP2vURhdE97PPcyFbXhDQNrh9X5PyDGc dsbmbelqcDtH6BspNk91wkbeTMJ21tnOt6py/cFMZfXP/GQ9g5RowZfC8JzpFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777136594; a=rsa-sha256; cv=none; b=aP7UKxYZoVXRKXAQi37EKsR0ECO+bkOgwuWMgDy1L6MLmgTVG4ynhEnb78gP8h9euw1gO5 kMbiC0QTPAh5o/EkMZXNKWMz+b251JmaON+t5+Gjbif/qvDAaVJtj88BYvMS5i5hpQbx/Y /PCsJn1V1tTesQH8+ErOR8O+GUtPsnhIG1JawkiJT5EeZJ8U8Y/m7dbLzjwmBbjAEICREv LHGhslzA6NgVabmGdqKls+oASDtEx7SggibvxgjPlcdj2auE3ek6S6oD9Gg8ajEZs9toZ2 Dhj++sWP6lQqR8L5wTqwrAt+QgrqQ8C+UuMJ50scU5sWHd8SSrGvhmiERnJgGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777136594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5tFfzz9o23vokP4SAIVfubof8EC6QVOlOsIppr3uOLw=; b=qB1mqH+cRRfDUcLTemKpOU8LtQt1BZ0R0/KlwRaqX2wQuAI62//YAsgt4F0C2+K2/T89Od pJ2aiBOs1CDll+7FhfU2YhzmC5hAmIp/6EpeVA9upW8fZTZ3V1ejvAvZpwe6yTX+Ujc8jq 65afqVqhxDnfWs8cuRXL4zhT0ITJCYgwJsJ6bR62Nvt89Cn7djzxqQmbr2r3tMgDwrQkCg SP30yHqhMa+6XUi+o+Eu9Rc240wM642qOwpp+GVUELqUy5ZZknmVWXgPJ+NVOdM3DPfWGD 8H1nL+CqYKiGOonUGWmny50y3FeIR6lLRwxLPThEaRCTN8pFqpLSl77aK3/tLA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2x3k3l7tzjqW for ; Sat, 25 Apr 2026 17:03:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4733b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 17:03:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: 7bb347ccc774 - stable/15 - build.7: Explain packaging a custom kernel List-Id: Commits to the stable branches 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: 7bb347ccc7740938b40a2551d98bc3f703eac955 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 17:03:14 +0000 Message-Id: <69ecf3d2.4733b.40de1def@gitrepo.freebsd.org> The branch stable/15 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=7bb347ccc7740938b40a2551d98bc3f703eac955 commit 7bb347ccc7740938b40a2551d98bc3f703eac955 Author: Alexander Ziaee AuthorDate: 2026-04-22 17:26:45 +0000 Commit: Alexander Ziaee CommitDate: 2026-04-25 17:02:56 +0000 build.7: Explain packaging a custom kernel MFC after: 3 days (to 15 only) Requested by: vermaden Discussed with: emaste, ivy, Mark Millard Differential Revision: https://reviews.freebsd.org/D56217 (cherry picked from commit 1bcd2e2f8311b737170e4bae8381dcb7de2c4413) --- share/man/man7/build.7 | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index d15b08d5a2ce..f2c8395f6669 100644 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 6, 2026 +.Dd April 13, 2026 .Dt BUILD 7 .Os .Sh NAME @@ -1018,7 +1018,7 @@ After testing the new system and verifying that your applications do not depend on them, delete the old libraries: .Pp .Dl make delete-old-libs -.Ss Example 2: Build and upgrade a custom kernel in place +.Ss Example 2: Build and upgrade a custom kernel Create a custom kernel configuration, .Va MYKERNEL , by including an existing configuration and using @@ -1036,7 +1036,7 @@ EOF .Ed .Pp After creating the new kernel configuration, build a fresh toolchain, -build the kernel, and install it, moving the old kernel to +build the kernel, and install it directly, moving the old kernel to .Pa /boot/kernel.old/ : .Bd -literal -offset indent make kernel-toolchain @@ -1045,7 +1045,18 @@ make -DALWAYS_CHECK_MAKE installkernel KERNCONF=MYKERNEL shutdown -r now .Ed .Pp -To build the kernel to an alternate location, use the +To package the kernel into a +.Xr freebsd-base 7 +package instead of installing it directly, use +.Cm update-packages +instead of +.Cm installkernel : +.Bd -literal -offset indent +make buildworld buildkernel KERNCONF=MYKERNEL +make update-packages KERNCONF=MYKERNEL +.Ed +.Pp +To install the kernel directly to an alternate location, use the .Va INSTKERNNAME variable and boot it once to test via .Xr nextboot 8 : From nobody Sat Apr 25 17:03:15 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2x3m0n50z6bpVm for ; Sat, 25 Apr 2026 17:03:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2x3l6bKHz3HTx for ; Sat, 25 Apr 2026 17:03:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777136595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/ZUTd4eDasok7c90m3N5eIsKpmwGiwUKejU25JvWEP0=; b=xAd+qYBGHvRxjYY4zwvjrcQ/8Edh1PV9ECiBaqkd+KhB4cBQ/MgW0yIh1apQlmGP80vwz0 U0Xukz3meas81c0kaR+hXBtJ6oIDWrsq/gKgQCsd+q8R4pZ1yoKusM5syx2GJo0LqLZzNT 4LrVU+iKRKGQAtjX7xYKP5Icfna2wvwjcehObXB10xiBJjdcZvqKKTXowMJoaxHDuP1A4p rHMdWxpInGjjU7vBlMtztDiDg0zWVPLA0NcS64fcXg9jUi4z6lBMOqwEFZzxGbLyMS24SR 1AvX576Krc7IJvv5Bqa3gR1pxltMwDnJ9Bho5TyXySo8nMnEuT5HwieCKaITMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777136595; a=rsa-sha256; cv=none; b=v/+fURv4lr2WEw6WbwZeBhN60veYH6hx949CQJELlVMWZMtKK85/c5yDGYlWH19EHQDqdF n/mJyawRcKwBT8yeG0RaV0GLdNeEJ3cTT1nUi3qgri2WcNhMTtCeRCzABIv5ICM1px1qP3 tAN7EMRKf3iDIxcnEzoC01254ngh93xa0rVqqbhZwYecLfIpPqfzndcuYYjNTyal4IGNVM mx6BIrbrVXTtAX3CB9uUVo3ZjdIkEa3FGeUC2K4TyIVs09+6anuNwg4o1C9M6BQmZVCiE8 mr7weO0ro7s8VqRxJ1HhwM2/6sOSgjXE5QgWN984gdiUz0zJVLIRqDpY8NMNdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777136595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/ZUTd4eDasok7c90m3N5eIsKpmwGiwUKejU25JvWEP0=; b=Qw66H4l9grHj743eGC8SBHPwk5AQjWJYd1ZYGHF/BbnyKGklzDyjlEBWR0JxgqQNsHJAML qsgrE7rJvOCC4MsF8FGvOxYRCyPAjn3vZIH9QFLvq5wGf/05R6pV2ZhxbmHShaY2I8f5Mb JYfUONQxHmbOEcUy5E8x142Bg/LCAhk+rA9ap2wP6RhIypbGu4sUWRlzoeLpF9sCO1e3hf 1zm2CRUNRXWm3eclLHf5TAMFiqlCcUi7UckD5nWLuiB+5xnYI76mbMUxmh6IoFZpzMpDJS TvR84iFZtaQA7SftrH2QUJI11+O0JSzKOQMaYtaPJ/9RLaIQpCQsYjoreAQ+xg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2x3l4VmBzk6B for ; Sat, 25 Apr 2026 17:03:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18490 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 17:03:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: e6b2a404fa82 - stable/15 - build.7: Explain specifying multiple KERNCONFs List-Id: Commits to the stable branches 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: e6b2a404fa82f2124d4fd453ae51e4db3281c360 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 17:03:15 +0000 Message-Id: <69ecf3d3.18490.5897fe42@gitrepo.freebsd.org> The branch stable/15 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=e6b2a404fa82f2124d4fd453ae51e4db3281c360 commit e6b2a404fa82f2124d4fd453ae51e4db3281c360 Author: Alexander Ziaee AuthorDate: 2026-04-22 17:31:04 +0000 Commit: Alexander Ziaee CommitDate: 2026-04-25 17:02:56 +0000 build.7: Explain specifying multiple KERNCONFs MFC after: 3 days Reviewed by: ivy, mhorne Differential Revision: https://reviews.freebsd.org/D56281 (cherry picked from commit b183dae4a9934ed9bb91763b5f9d9d4e4d4120a2) --- share/man/man7/build.7 | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index f2c8395f6669..6d040b6f8f02 100644 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 13, 2026 +.Dd April 22, 2026 .Dt BUILD 7 .Os .Sh NAME @@ -564,11 +564,20 @@ name ${MACHINE_ARCH}-gcc. .It Va INSTKERNNAME If set, specify an alternative name to build and install for the various kernel make targets. +Defaults to +.Dq Li kernel . .It Va KERNCONF -Overrides which kernel to build and install for the various kernel -make targets. -It defaults to -.Cm GENERIC . +Specify one or more space-separated kernels to build and install for the +various kernel make targets. +If multiple kernels are specified, the first listed kernel installs to +.Pa /boot/${INSTKERNNAME} , +and subsequent kernels install to +.Pa /boot/${INSTKERNNAME}.NAME . +.Pp +If unset, it defaults to GENERIC, +except on POWER architectures, +where it defaults to GENERIC64 for powerpc64, +and GENERIC64LE for powerpc64le. .It Va KERNBUILDDIR Overrides the default directory to get all the opt_*.h files for building a kernel module. From nobody Sat Apr 25 17:03:16 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2x3n2vJ6z6bpRH for ; Sat, 25 Apr 2026 17:03:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2x3m5wTyz3HRZ for ; Sat, 25 Apr 2026 17:03:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777136596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=McWgFnP6BI/NwSgql+Jgq1fNmz7ext+4JAVVPxIwioE=; b=kVQnvw/l/H7UclAy2uJ1V3h2XKd/KnLHaTmcavNPzBbWVwtIAgVIE9NGSeS1Z5j0lJctkh 74PDg4qah/0OsExPCFLMVU9K2G3obMLZjwmMZyqTq6f4FQlhnWnyGidtvGxRDD/kDny7FR wLvu6ZxnRycLCcAjjScENnHMu7IVkKqYN2TXQuPCON+pmoaufhbVNyn5pvWX8DLNpXF1Y5 lI4V6+rPT02P0peplBSkAIkH6V8NoBdEOBLnunjNfpc3JlhjH9XgbN1AsQcFIXATCjvZM8 zBRX/LIFlqpKuaJiWo/OnH7LV4uboJV4kVehkxDS4IDddhVXVWFU6te6pnwrfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777136596; a=rsa-sha256; cv=none; b=a7KsVAQN2n18FUE66xl40SwtvlQD7VgOzw2Nn2z7H2K6pdIKj5CNwTn5fH1uQA5zf5kZpK tGfGvkVQ5HVWx4RIqKw7lMLBbdOyr9xhJ8Nx0n87eJ02nowe/yyFsWaQQKvGDWb3wPA9kZ TevIf/AqvrapolrWyUFo7a3iLMaLbatguYk/UMk4jUAcNg97UN0thvENSoOCdVdbzXQWXM S+zCTpcie/GkezsHjS3p1YhV8Yt/JmAeje6JWunR1cjkfL3WYOhYK6pXJL4o2jQf6Wbo9R bD+R6ZKRAXNdBE5hMHMNDDeLS7UtDM7tgAOmhl1zSEomdncv+6RlwQ648ZfksA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777136596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=McWgFnP6BI/NwSgql+Jgq1fNmz7ext+4JAVVPxIwioE=; b=Q71aSbyyuyXjW9gKlO9CXzpiDSg35AJMXnx2B/JMMLkRJ6YWGP8akt18+IeyFfd1Gk3IHx 8C9Q5L/ssiAzKePNQ2cfNPNten01c+A5SSZpYUIqN9ure3YUNSmVHFzPmcXZXaQ7blnTVz yLTHtiXSPGRjlNZv578j/p1ciYQ/4NKnCTyvCR3QRqcVAJkwuHI9+Lv0xQAjvZqM7cPO9c 6OQMBpDwwp/Z4N2l0mYbPw0aOt6Tcig1e7PJy/CAyJF+62Z3TcUg2IygXvrmfhMlBVeNNT CrxIWdhclmXyVgtpYYkHsh6oBQAmtuhSxyXpL7wjvOMk5SXvh+teksbv62mrbA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2x3m5HV4zk6D for ; Sat, 25 Apr 2026 17:03:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 191d6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 17:03:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: a4a4dbecb727 - stable/15 - freebsd-base.7: Add a caveat about dev branches List-Id: Commits to the stable branches 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: a4a4dbecb72776bedc54a0662af0916f7d8df33b Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 17:03:16 +0000 Message-Id: <69ecf3d4.191d6.2ca3b046@gitrepo.freebsd.org> The branch stable/15 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=a4a4dbecb72776bedc54a0662af0916f7d8df33b commit a4a4dbecb72776bedc54a0662af0916f7d8df33b Author: Alexander Ziaee AuthorDate: 2026-04-22 17:35:50 +0000 Commit: Alexander Ziaee CommitDate: 2026-04-25 17:02:56 +0000 freebsd-base.7: Add a caveat about dev branches MFC after: 3 days (to 15) Discussed with: bapt, emaste, ivy Differential Revision: https://reviews.freebsd.org/D56389 (cherry picked from commit 886610c1003e0d0e270531f5a75b0f2c2b5eb2b8) --- share/man/man7/freebsd-base.7 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/share/man/man7/freebsd-base.7 b/share/man/man7/freebsd-base.7 index c690a7a9e0b9..51de679ea9d1 100644 --- a/share/man/man7/freebsd-base.7 +++ b/share/man/man7/freebsd-base.7 @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd April 1, 2026 +.Dd April 14, 2026 .Dt FREEBSD-BASE 7 .Os .Sh NAME @@ -259,3 +259,6 @@ Support for installing the base system as packages was introduced in .Fx 15.0 . Earlier releases supported a subset of this functionality. Support for unregistering an existing installation appeared in pkg 2.5. +.Sh CAVEATS +Upgrading from a RELEASE to a STABLE or CURRENT branch requires +.Dq Li pkg upgrade -f . From nobody Sat Apr 25 17:11:48 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2xFc6821z6bqCv for ; Sat, 25 Apr 2026 17:11:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2xFc2k2Bz3Kv9 for ; Sat, 25 Apr 2026 17:11:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777137108; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c4ZzI0lsbQIqyExujRfSowNUxwNF2nAhjqxC8V1wSw0=; b=mz49ZGFHVURISIhAIsKoQ0Byk2CUZLCC+17MB1QpKycdaTfh2cfp9Lvizu9Nk80uTyaXCq FNU3Rmrl6zLJiy0Qt7oMShVo4FNw+YkASt+w9OxMjtRO4zOVSAyxBv/qD75VSNt6/KsV3+ AtajkfHuCj0PIqWsolixiBi1wXnYFsHW5B73Eugzhe5ZHigp9S7nSgYuaG/UGKFkHUebkD iOA36nVlWoWHPRh4urAsXtz02nZIDnVKYI3uRE6kh577l4/MDnfiFnsSmu2sn2jropXwPI NOvY+3a8Ooebnm3WjQ6dKWSce45vmBX4myH3ETT9YgWZAGIjCgsiD6MgCYq4tg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777137108; a=rsa-sha256; cv=none; b=qgCN6yteTrjBNS6T5vvUIebTqT0dEz4fchAN8SKsleXVTftVp0Tn3Z75O/Ysr8FxCLiPhw mAwQsRGfZueRbAqxoa+ucrwpWhS7MMkzSJoQ5pIYRl8V69xwZYlkkB+BOZGBHlHUQq1OsY XgKMRHH/34f+qMfkbfY+PymZQStAbEW7T15wkm3VfsAkoHk+w9yTDNAhx+jJIhskpMb4Nz plXPJC1iEz7GNCIWndoOo09STARFRHhnevdcDBU0c3cNdDnYakxDQuWlSWW19jdggYlYz3 fgoFvueOKLlVYgCVm79xmorNM1sH4n/tHK4SDdMgBKCCCRrLTSeoQHK6SSyvag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777137108; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c4ZzI0lsbQIqyExujRfSowNUxwNF2nAhjqxC8V1wSw0=; b=RDXaNbIjEkus14CBwCFNfbitIJwBFpz0KROASvO68Nd9GhjYE1OyTf3xpYw31t8EizO6mJ UNxxNztbaglz/LTZFWcxDU8Y+QBdjJ0HvfZhLPUO12tmb+R76/H1JAp9PX5QCMaeToinhe bghVxVqWU9j4f5kMAbCFpbRGNB/8c3Qa2q34k+Zx1zqRAdxunyScSixS2jkVzJ2PhUkecS lyvkn7hQrUWAZwH9FlQ2TFupx5pNoPgPk01m/l4AXNdjF4WQ/8QMr5pOLnbq05Hmumkoa9 rSCA7NaF0O3XFqdcHnxasQzMCet3gYg/8Ps0jZFBfd2QJyKcIhguNOiXGAGzRQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2xFc21HZzk3F for ; Sat, 25 Apr 2026 17:11:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18747 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 17:11:48 +0000 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=B8rg?=rav Subject: git: 47799d176ba3 - stable/15 - README: Update and harmonize List-Id: Commits to the stable branches 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: 47799d176ba3e56452a21f4f29156db5671704fe Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 17:11:48 +0000 Message-Id: <69ecf5d4.18747.6ee92778@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=47799d176ba3e56452a21f4f29156db5671704fe commit 47799d176ba3e56452a21f4f29156db5671704fe Author: Dag-Erling Smørgrav AuthorDate: 2026-04-18 14:12:32 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-04-25 17:11:25 +0000 README: Update and harmonize MFC after: 1 week Reviewed by: imp, markj, jhb Differential Revision: https://reviews.freebsd.org/D56499 (cherry picked from commit 480ba21efdc7df5d972083e64c88c39357877c0b) --- README.md | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index bb0c34d39ec4..737afe1566ec 100644 --- a/README.md +++ b/README.md @@ -22,25 +22,26 @@ Source Roadmap: | Directory | Description | | --------- | ----------- | | bin | System/user commands. | -| cddl | Various commands and libraries under the Common Development and Distribution License. | -| contrib | Packages contributed by 3rd parties. | -| crypto | Cryptography stuff (see [crypto/README](crypto/README)). | +| cddl | Source code for third-party software under the Common Development and Distribution License. | +| contrib | Source code for third-party software. | +| crypto | Source code for cryptographic libraries and commands (see [crypto/README](crypto/README)). | | etc | Template files for /etc. | -| gnu | Commands and libraries under the GNU General Public License (GPL) or Lesser General Public License (LGPL). Please see [gnu/COPYING](gnu/COPYING) and [gnu/COPYING.LIB](gnu/COPYING.LIB) for more information. | +| gnu | Source code for third-party software under the GNU General Public License (GPL) or Lesser General Public License (LGPL). Please see [gnu/COPYING](gnu/COPYING) and [gnu/COPYING.LIB](gnu/COPYING.LIB) for more information. | | include | System include files. | -| kerberos5 | Kerberos5 (Heimdal) package. | +| kerberos5 | Build system for Kerberos 5 (Heimdal). | +| krb5 | Build system for Kerberos 5 (MIT). | | lib | System libraries. | -| libexec | System daemons. | -| release | Release building Makefile & associated tools. | -| rescue | Build system for statically linked /rescue utilities. | +| libexec | System commands intended to be executed by other commands or daemons. | +| release | Makefiles and scripts used for building releases and VM images. | +| rescue | Build system for statically linked /rescue commands. | | sbin | System commands. | -| secure | Cryptographic libraries and commands. | +| secure | Build system for cryptographic libraries and commands (excluding Kerberos). | | share | Shared resources. | | stand | Boot loader sources. | | sys | Kernel sources (see [sys/README.md](sys/README.md)). | | targets | Support for experimental `DIRDEPS_BUILD` | -| tests | Regression tests which can be run by Kyua. See [tests/README](tests/README) for additional information. | -| tools | Utilities for regression testing and miscellaneous tasks. | +| tests | Tests which can be run by Kyua. See [tests/README](tests/README) for additional information. | +| tools | Ancillary utilities and tests (not included in the build). | | usr.bin | User commands. | | usr.sbin | System administration commands. | From nobody Sat Apr 25 17:11:49 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2xFf0Hrcz6bqCy for ; Sat, 25 Apr 2026 17:11:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2xFd3HSHz3KvB for ; Sat, 25 Apr 2026 17:11:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777137109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sh+XM8Wv7ELhxBd1kPEDubIVNIH0vtTF6OOeE5zBu7k=; b=ctTRU+IUFdphtVCKCr9fe5WqTrXsFPB7J2dvEPxCc5fxxBc+C7YFMS5E0Lft00YiUiPnzx TiExHFfqixqughhTj+j5kR7zjFc2FA92IZSzuRqVmM8hQ6K9cDndH/xCmBdTYxy35YIgdp DHachR2MHAUC9tjZYY1sTlTcnU+jlusyBxb29FkxXmwmsSYbzoIFJHwvnbtqHnsGszvAZu 9VO0OmqwCXGWU7EwE5OKhXDKEWpbVQeLSMAg/T2yzofgmkx3G2EBEooX6KHfRygxhgNiXj ccTcMB8QTqjYL53wJ/kf3S38xwvT9GKITW9NcS8zNZd6leg/qFEmZ8BcBHL6FA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777137109; a=rsa-sha256; cv=none; b=HYgJykx0kgjV/Cz15AzMxr6r5/Elp9bBizi29kSzocuQbct+rXd1Y5bKFH9OxwpHo+95+t Hc3c8jBSqszal+4i4NE/ORjB8qORYsmJzRpTfMyYgxNdwuU0+RIKFIDqLwgp2NqtmTKT0c hx2aZstNBZoagb/Ul7u0dyNJBT2fZtYt7es7OHu53ZWVf/8RxE7GO1b0Vl7A73tPbeF/gt RY0NcR49pPP9doZLfaD8GaJNS0CpTJwCxtgnL9Dd36o0TjV3q0rorE+Ba0pUvOixC+uhH3 NlJQQsO+RMrmGRFgnQBWqVndcWXV6EciEkKniG6jgF2P6eKyHq7J3xQYejJTBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777137109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sh+XM8Wv7ELhxBd1kPEDubIVNIH0vtTF6OOeE5zBu7k=; b=G/OXQS+zdEqyPeo2eF2ePWW/tCxgz4x/8un/QkkWZPwfe9gPOBBFLWKDuTn9U+qxkR1MFY ISeidoxy5Ev9ggNxa1lPOuQWiBfGDJxpEd5TDdVGrD38tATUfXbnHS8Ik6z9dosaY72tIB HEuf9GH2LXiOcd6JqGocySlaQrBWxrNIxe690/12kI/Q54uHt8a1EpWH24H1/GdgqS/qC/ rWJhWCDBoTpqMCa4dMM/oOfrNLRsnsjCk2JFcpejuW3JD12HZW3Sla5R2Jd+uy0zpAQftV rDJ+8g89TMYe1Qb2OGKWVrAkajc/sUlaJWBRZFk3URfk5pGsQA6gVfc1cXN7WQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2xFd2t17zk6j for ; Sat, 25 Apr 2026 17:11:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18446 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 17:11:49 +0000 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=B8rg?=rav Subject: git: 3e08beca5acb - stable/15 - tests.7: Provide better 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: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 3e08beca5acb8ceef831d78c507c93406c46831f Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 17:11:49 +0000 Message-Id: <69ecf5d5.18446.552dc72c@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=3e08beca5acb8ceef831d78c507c93406c46831f commit 3e08beca5acb8ceef831d78c507c93406c46831f Author: Dag-Erling Smørgrav AuthorDate: 2026-04-22 08:19:32 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-04-25 17:11:25 +0000 tests.7: Provide better examples Previous authors appear to have prioritized brevity over clarity. This unfortunately resulted in a manual page that left its reader with the false impression that Kyua is difficult to use. Attempt to correct this by providing more and simpler examples with longer explanations. While here, correct outdated information about where Kyua stores its logs and results. MFC after: 1 week Reviewed by: ziaee, ngie Differential Revision: https://reviews.freebsd.org/D56475 (cherry picked from commit 3d00db6b8b73ef7f89654a2928d247d62d39ee29) --- share/man/man7/tests.7 | 102 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 89 insertions(+), 13 deletions(-) diff --git a/share/man/man7/tests.7 b/share/man/man7/tests.7 index 61b0789b9149..97cc6beba4dc 100644 --- a/share/man/man7/tests.7 +++ b/share/man/man7/tests.7 @@ -25,7 +25,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 1, 2025 +.Dd April 17, 2026 .Dt TESTS 7 .Os .Sh NAME @@ -97,37 +97,107 @@ third-party packages or manual modifications to configuration files) do not introduce unexpected failures. .El .Ss Running the tests -Use the following command to run the whole test suite: +By default, Kyua looks for tests in the current directory. +To run the whole test suite, either use the +.Fl k +option to specify the top-level +.Pa Kyuafile : .Bd -literal -offset indent $ kyua test -k /usr/tests/Kyuafile .Ed .Pp +or just change to the test suite root before running Kyua: +.Bd -literal -offset indent +$ cd /usr/tests +$ kyua test +.Ed +.Pp The above will iterate through all test programs in .Pa /usr/tests recursively, execute them, store their results and debugging data in Kyua's database (by default in -.Pa ~/.kyua/store.db ) , +.Pa ~/.kyua/store/ ) , and print a summary of the results. This summary includes a brief count of all total tests run and how many of them failed. .Pp -It is possible to restrict which tests to run by providing their names in -the command line. -For example, this would execute the tests for the +It is possible to restrict which tests to run by providing their +names, or a portion of their path, on the command line. +For example, this would execute all of the tests provided for the .Xr cp 1 and -.Xr cut 1 +.Xr stat 1 utilities: .Bd -literal -offset indent -$ kyua test -k /usr/tests/Kyuafile bin/cp usr.bin/cut +$ cd /usr/tests +$ kyua test bin/cp usr.bin/stat +.Ed +.Pp +This would execute only one of the two test programs provided for +.Xr stat 1 : +.Bd -literal -offset indent +$ cd /usr/tests +$ kyua test usr.bin/stat/stat_test +.Ed +.Pp +This would execute just a single test case: +.Bd -literal -offset indent +$ cd /usr/tests +$ kyua test usr.bin/stat/stat_test:t_flag +.Ed +.Pp +Finally, this would execute that test case in debug mode: +.Bd -literal -offset indent +$ cd /usr/tests +$ kyua debug -p usr.bin/stat/stat_test:t_flag .Ed +.Pp +The +.Fl p +option tells Kyua to pause before cleanup so you can inspect the +temporary directory to better understand why the test failed. +.Pp +Note that some tests may require root privileges to execute: +.Bd -literal -offset indent +$ cd /usr/tests +$ kyua debug usr.bin/stat/stat_test:h_flag +usr.bin/stat/stat_test:h_flag -> skipped: Requires root privileges +$ sudo kyua debug usr.bin/stat/stat_test:h_flag +[...] +usr.bin/stat/stat_test:h_flag -> passed +.Ed +.Pp +Conversely, some tests will only work correctly if run as an +unprivileged user. +This will normally be noted in the test's metadata, causing Kyua to +automatically drop privileges before running the test. .Ss Obtaining reports of the tests execution Additional information about the test results can be retrieved by using Kyua's various reporting commands. -For example, the following would print a plain-text report of the executed -tests and show which ones failed: +For example, the following would print a plain-text report of the +tests executed in the latest test run and show which ones failed: +.Bd -literal -offset indent +$ kyua report --verbose +.Ed +.Pp +To show the results of an arbitrary test run, use the +.Fl r +option to specify which results file to read: +.Bd -literal -offset indent +$ kyua report --verbose \\ + -r ~/.kyua/store/results.usr_tests.20260417-173009-335060.db +.Ed +.Pp +Keep in mind that if the tests were run as root, the results will have +been stored in root's +.Pa kyua +directory, and the easiest way to access them will be to run the +.Cm report +command as root as well: .Bd -literal -offset indent -$ kyua report --verbose -r <.db file from output of test> +$ cd /usr/tests +$ sudo kyua test usr.bin/stat +$ sudo kyua report --verbose .Ed .Pp This example would generate an HTML report ready to be published on a @@ -207,8 +277,14 @@ System-wide configuration file for User-specific configuration file for .Xr kyua 1 ; overrides the system file. -.It Pa ~/.kyua/store.db -Default result database used by Kyua. +.It Pa ~/.kyua/logs/ +Default location of Kyua debug logs (one +.Pa .log +file per test run). +.It Pa ~/.kyua/store/ +Default location of Kyua test results (one +.Pa .db +file per test run). .It Pa /usr/tests/ Location of the .Fx From nobody Sat Apr 25 17:11:50 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2xFf6w15z6bq9v for ; Sat, 25 Apr 2026 17:11:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2xFf4ddmz3KrT for ; Sat, 25 Apr 2026 17:11:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777137110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/UleFVKuVwbfxVF3xZMbCCzGe6dGe08ahO3ft6pNJgM=; b=yih7Z7EYQwChx0wTeJxxi5Et2Lf44hgEJ0HvYCycw5NmDpj3z7fxvEr+exjgUbigp13BYr 5xEibY7dnViycm8dQnlaeIGbwbur5US1pG8xg21kZohf5itr1QWBxXmO4ONMOiRf2Ci2wL 7MFE3i2ZNI+Ff1zkFmxK0sVZ606DYnB9MFxbdC6/xIyYgqOJAas+webeW43heA7Ye2q8x4 eB9SILfb3IKsc2EMCVnCYPJMQBh7DN+CA+VZU9Ar1VCbVIzGn6XZV9DU1SnQTdyp4tqclb xJ5+VA5b71Y2BQyBELAhHmciKRHCxGab/p34g+ndJ9MKsrChrJzq3jVaoU5kEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777137110; a=rsa-sha256; cv=none; b=KGBvYDf+YDmENsO8FXGL6F8sts1iIFJxfrPO5+atw+ZkN9zxn0ueipxOABIiwpj3sNhQ9E EvH88PVe2u3sjNWo5c5gb8clMXmnf1hUzIeydw8kdlAU5TK9DvRjBHIlzt0BwGjRXhLhGm DnB24FoePELYQupw5XF36iqF8tEx4b20YMapEdKHPJd7mQzvHotIjSvvRRbSuO0KuZ+VxI v+V8JOhN7g6HXyF0jQdcZZ0ZDaqyVGYWyfHQLY7ISHIq2DwkoNrHJNYRvTo0WLq0s9hWlN Tzrmr1ZczCzMXMtBIjlRIndss6YTPzzvcvUXl0qBs7WueqebTLWbz/u/bo7isg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777137110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/UleFVKuVwbfxVF3xZMbCCzGe6dGe08ahO3ft6pNJgM=; b=WT3OSrE6+sKmcSUnS1oS4wJVYH8W9G4Qh5+NaTzujio9lKkoTU5xnHl+D2EEVyhOL+VMj5 PaXMJbbi+eVrqOFgBmt0hvE/VO2qQmBX0BS5P1ypd5CzdbdxuwCVobBpuFQU+6dENF6wmw FesxQzNtSJHuBuhdRHCBmG1sYRRYB05g7Y9OIvAiAaLbscTLAE+fEGo4wEI9CNUgbgWSB8 xi65csFtQLaNS4xI8R4/KRHrOWPq3Lh1iAO04bZ9JQ0u4OZxDFA5GusSa71UKQ4jal72TP ZX2QkvmZ6f+a1cI1+hALTnUoq8UTZJpmD7xixLII0OYUvkE0YU+Olbgqndf3sw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2xFf3jhXzjby for ; Sat, 25 Apr 2026 17:11:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 46379 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 17:11:50 +0000 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=B8rg?=rav Subject: git: 9671282905e7 - stable/15 - ident: Clean up List-Id: Commits to the stable branches 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: 9671282905e78fd54787cc03fde8ddc729d386d5 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 17:11:50 +0000 Message-Id: <69ecf5d6.46379.8315f60@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=9671282905e78fd54787cc03fde8ddc729d386d5 commit 9671282905e78fd54787cc03fde8ddc729d386d5 Author: Dag-Erling Smørgrav AuthorDate: 2026-04-22 08:19:35 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-04-25 17:11:25 +0000 ident: Clean up * Use libcasper instead of reinventing it. * Add long option support. * Drop pointless use of temporary locales. * Consistently check for stdio errors. * Clean up the code. * Clean up and expand the tests. MFC after: 1 week Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D56505 (cherry picked from commit 394f6b1b0a658755a9420906fb7a459c3d9501a5) --- usr.bin/ident/Makefile | 6 ++ usr.bin/ident/ident.1 | 11 +-- usr.bin/ident/ident.c | 146 ++++++++++++++++++++------------------ usr.bin/ident/tests/ident_test.sh | 94 +++++++++++++++++++++--- 4 files changed, 172 insertions(+), 85 deletions(-) diff --git a/usr.bin/ident/Makefile b/usr.bin/ident/Makefile index 8695ae3e6003..5c1a75f5a56e 100644 --- a/usr.bin/ident/Makefile +++ b/usr.bin/ident/Makefile @@ -2,6 +2,12 @@ PROG= ident +.if ${MK_CASPER} != "no" +LIBADD+= casper +LIBADD+= cap_fileargs +CFLAGS+= -DWITH_CASPER +.endif + HAS_TESTS= SUBDIR.${MK_TESTS}+= tests diff --git a/usr.bin/ident/ident.1 b/usr.bin/ident/ident.1 index c17279720517..3583b319d80b 100644 --- a/usr.bin/ident/ident.1 +++ b/usr.bin/ident/ident.1 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 25, 2015 +.Dd April 18, 2026 .Dt IDENT 1 .Os .Sh NAME @@ -52,15 +52,18 @@ and a space. .Pp These options are supported: .Bl -tag -width "XXX" -.It Fl q +.It Fl q , Fl -quiet Quiet mode: suppress warnings if no pattern found. -.It Fl V +.It Fl V , Fl -version Do nothing, added for compatibility with GNU ident. .El .Sh EXIT STATUS .Ex -std ident .Sh AUTHORS +.An -nosplit This version of the .Nm utility was written by -.An Baptiste Daroussin Aq Mt bapt@FreeBSD.org . +.An Baptiste Daroussin Aq Mt bapt@FreeBSD.org +and +.An Dag-Erling Sm\(/orrgav Aq Mt des@FreeBSD.org . diff --git a/usr.bin/ident/ident.c b/usr.bin/ident/ident.c index 96190723dbf7..eefb8b3a48de 100644 --- a/usr.bin/ident/ident.c +++ b/usr.bin/ident/ident.c @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2026 Dag-Erling Smørgrav * Copyright (c) 2015-2021 Baptiste Daroussin * Copyright (c) 2015 Xin LI * @@ -24,20 +25,24 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include +#include #include #include #include #include #include +#include +#include #include #include #include #include #include -#include + +#include +#include typedef enum { /* state condition to transit to next state */ @@ -56,20 +61,20 @@ scan(FILE *fp, const char *name, bool quiet) bool hasid = false; bool subversion = false; analyzer_states state = INIT; - FILE* buffp; + FILE *buffp; char *buf; size_t sz; - locale_t l; - l = newlocale(LC_ALL_MASK, "C", NULL); sz = 0; buf = NULL; - buffp = open_memstream(&buf, &sz); - if (buffp == NULL) - err(EXIT_FAILURE, "open_memstream()"); + if ((buffp = open_memstream(&buf, &sz)) == NULL) + goto bufferr; - if (name != NULL) + if (name != NULL) { printf("%s:\n", name); + if (fflush(stdout) == EOF) + err(EXIT_FAILURE, "stdout"); + } while ((c = fgetc(fp)) != EOF) { switch (state) { @@ -83,13 +88,14 @@ scan(FILE *fp, const char *name, bool quiet) } break; case DELIM_SEEN: - if (isalpha_l(c, l)) { + if (isalpha(c)) { /* Transit to KEYWORD if we see letter */ if (buf != NULL) memset(buf, 0, sz); - rewind(buffp); - fputc('$', buffp); - fputc(c, buffp); + if (fseek(buffp, 0, SEEK_SET) != 0 || + fputc('$', buffp) == EOF || + fputc(c, buffp) == EOF) + goto bufferr; state = KEYWORD; continue; @@ -102,9 +108,10 @@ scan(FILE *fp, const char *name, bool quiet) } break; case KEYWORD: - fputc(c, buffp); + if (fputc(c, buffp) == EOF) + goto bufferr; - if (isalpha_l(c, l)) { + if (isalpha(c)) { /* * Stay in KEYWORD if additional letter is seen */ @@ -132,7 +139,8 @@ scan(FILE *fp, const char *name, bool quiet) break; case PUNC_SEEN: case PUNC_SEEN_SVN: - fputc(c, buffp); + if (fputc(c, buffp) == EOF) + goto bufferr; switch (c) { case ':': @@ -166,13 +174,15 @@ scan(FILE *fp, const char *name, bool quiet) } break; case TEXT: - fputc(c, buffp); + if (fputc(c, buffp) == EOF) + goto bufferr; - if (iscntrl_l(c, l)) { + if (iscntrl(c)) { /* Control characters are not allowed in this state */ state = INIT; } else if (c == '$') { - fflush(buffp); + if (fflush(buffp) == EOF) + goto bufferr; /* * valid ident should end with a space. * @@ -182,9 +192,11 @@ scan(FILE *fp, const char *name, bool quiet) * subversion mode. No length check is enforced * because GNU RCS ident(1) does not do it either. */ - c = buf[strlen(buf) -2 ]; + c = buf[strlen(buf) - 2]; if (c == ' ' || (subversion && c == '#')) { printf(" %s\n", buf); + if (fflush(stdout) == EOF) + err(EXIT_FAILURE, "stdout"); hasid = true; } state = INIT; @@ -193,32 +205,49 @@ scan(FILE *fp, const char *name, bool quiet) break; } } - fclose(buffp); + if (fclose(buffp) == EOF) + goto bufferr; free(buf); - freelocale(l); if (!hasid) { - if (!quiet) + if (!quiet) { fprintf(stderr, "%s warning: no id keywords in %s\n", getprogname(), name ? name : "standard input"); - + } return (EXIT_FAILURE); } return (EXIT_SUCCESS); +bufferr: + err(EXIT_FAILURE, "buffer"); } +static void +usage(void) +{ + fprintf(stderr, "usage: %s [-q] [-V] [file...]", getprogname()); + exit(EXIT_FAILURE); +} + +static struct option longopts[] = { + { "quiet", no_argument, NULL, 'q' }, + { "version", no_argument, NULL, 'V' }, + { NULL, 0, NULL, 0 } +}; + int main(int argc, char **argv) { + fileargs_t *fa; + cap_rights_t rights; bool quiet = false; - int ch, i, *fds, fd; - int ret = EXIT_SUCCESS; - size_t nfds; + int i, opt, ret; FILE *fp; - while ((ch = getopt(argc, argv, "qV")) != -1) { - switch (ch) { + setlocale(LC_CTYPE, "C"); + + while ((opt = getopt_long(argc, argv, "+qV", longopts, NULL)) != -1) { + switch (opt) { case 'q': quiet = true; break; @@ -226,61 +255,36 @@ main(int argc, char **argv) /* Do nothing, compat with GNU rcs's ident */ return (EXIT_SUCCESS); default: - errx(EXIT_FAILURE, "usage: %s [-q] [-V] [file...]", - getprogname()); + usage(); } } argc -= optind; argv += optind; - if (caph_limit_stdio() < 0) - err(EXIT_FAILURE, "unable to limit stdio"); + cap_rights_init(&rights, CAP_READ, CAP_FSTAT, CAP_FCNTL); + fa = fileargs_init(argc, argv, O_RDONLY, 0, &rights, FA_OPEN); + if (fa == NULL) + err(EXIT_FAILURE, "Unable to initialize casper"); + caph_cache_catpages(); + if (caph_limit_stdio() != 0) + err(EXIT_FAILURE, "Unable to limit stdio"); + if (caph_enter_casper() != 0) + err(EXIT_FAILURE, "Unable to enter capability mode"); if (argc == 0) { - nfds = 1; - fds = malloc(sizeof(*fds)); - if (fds == NULL) - err(EXIT_FAILURE, "unable to allocate fds array"); - fds[0] = STDIN_FILENO; + ret = scan(stdin, NULL, quiet); } else { - nfds = argc; - fds = malloc(sizeof(*fds) * nfds); - if (fds == NULL) - err(EXIT_FAILURE, "unable to allocate fds array"); - + ret = EXIT_SUCCESS; for (i = 0; i < argc; i++) { - fds[i] = fd = open(argv[i], O_RDONLY); - if (fd < 0) { - warn("%s", argv[i]); + if ((fp = fileargs_fopen(fa, argv[i], "r")) == NULL) + err(EXIT_FAILURE, "%s", argv[i]); + if (scan(fp, argv[i], quiet) != EXIT_SUCCESS) ret = EXIT_FAILURE; - continue; - } - if (caph_limit_stream(fd, CAPH_READ) < 0) - err(EXIT_FAILURE, - "unable to limit fcntls/rights for %s", - argv[i]); - } - } - - /* Enter Capsicum sandbox. */ - if (caph_enter() < 0) - err(EXIT_FAILURE, "unable to enter capability mode"); - - for (i = 0; i < (int)nfds; i++) { - if (fds[i] < 0) - continue; - - fp = fdopen(fds[i], "r"); - if (fp == NULL) { - warn("%s", argv[i]); - ret = EXIT_FAILURE; - continue; + (void)fclose(fp); } - if (scan(fp, argc == 0 ? NULL : argv[i], quiet) != EXIT_SUCCESS) - ret = EXIT_FAILURE; - fclose(fp); } + fileargs_free(fa); return (ret); } diff --git a/usr.bin/ident/tests/ident_test.sh b/usr.bin/ident/tests/ident_test.sh index 5422a9708d65..9dcc45a1625f 100755 --- a/usr.bin/ident/tests/ident_test.sh +++ b/usr.bin/ident/tests/ident_test.sh @@ -1,15 +1,89 @@ +# +# Copyright (c) 2026 Dag-Erling Smørgrav +# +# SPDX-License-Identifier: BSD-2-Clause +# -atf_test_case ident -ident_body() { - atf_check -o file:$(atf_get_srcdir)/test.out \ - ident < $(atf_get_srcdir)/test.in - atf_check -o match:'Foo.*' -s exit:1 \ - -e inline:"ident warning: no id keywords in $(atf_get_srcdir)/testnoid\n" \ - ident $(atf_get_srcdir)/test.in $(atf_get_srcdir)/testnoid - atf_check -o match:'Foo.*' -s exit:1 \ - ident -q $(atf_get_srcdir)/test.in $(atf_get_srcdir)/testnoid +atf_test_case stdin +stdin_head() +{ + atf_set "descr" "Read from stdin" +} +stdin_body() +{ + local dir=$(atf_get_srcdir) + atf_check -o file:"${dir}/test.out" \ + ident < "${dir}/test.in" +} + +atf_test_case file +file_head() +{ + atf_set "descr" "Read from a file" +} +file_body() +{ + local dir=$(atf_get_srcdir) + echo "${dir}/test.in:" >out + cat "${dir}/test.out" >>out + atf_check -o file:out ident "${dir}/test.in" +} + +atf_test_case noid +noid_head() +{ + atf_set "descr" "No id keywords in input" +} +noid_body() +{ + local dir=$(atf_get_srcdir) + atf_check \ + -s exit:1 \ + -o inline:"${dir}/testnoid:\n" \ + -e inline:"ident warning: no id keywords in ${dir}/testnoid\n" \ + ident "${dir}/testnoid" +} + +atf_test_case multi +multi_head() +{ + atf_set "descr" "Multiple inputs" +} +multi_body() +{ + local dir=$(atf_get_srcdir) + echo "${dir}/test.in:" >out + cat "${dir}/test.out" >>out + echo "${dir}/testnoid:" >>out + atf_check \ + -s exit:1 \ + -o file:out \ + -e inline:"ident warning: no id keywords in ${dir}/testnoid\n" \ + ident "${file}" } + +atf_test_case stdout +stdout_head() +{ + atf_set "descr" "Failure to write to stdout" +} +stdout_body() +{ + local dir=$(atf_get_srcdir) + ( + trap "" PIPE + sleep 1 + ident "${dir}"/test.in 2>stderr + echo $? >result + ) | true + atf_check -o inline:"1\n" cat result + atf_check -o match:"stdout" cat stderr +} + atf_init_test_cases() { - atf_add_test_case ident + atf_add_test_case stdin + atf_add_test_case file + atf_add_test_case noid + atf_add_test_case stdout } From nobody Sat Apr 25 17:11:51 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2xFh13Jwz6bqdc for ; Sat, 25 Apr 2026 17:11:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2xFg51l2z3KWp for ; Sat, 25 Apr 2026 17:11:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777137111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5GFbu01Az2fVmPVDm+AWsdPI62igYugo9N6cVv2ia7U=; b=QvUjTm9w/dXFIaBmrPIA4C0c+lm2GLNp89qnl1M4MEI04pO6Z6GXdxYMgmNcCo4QbV3Y4Z LgvucZcbEAdY3f0j0wcf03PFV+1L+sHDseghM/lGF7acPWIO4jF/f49AEv7VDQRMJW+Iic Qvp7kqViaRk9IAM4tcvqaqulmLoXJLRiIdUCKwXQAvY/+TRI58MkhhB21QxvPHZERcDL6u 8maCfoJf5bl0pyXmjHDuHRuHtoQ5tzcoD9s1oFqa36jfjMc5O+kqKB8is4TraLJvnWOYOw EY14H7UwWDvOF/rsri2SmUAcUz9/mKGzOv8/W6Hjk1BbckGDciWFcztlunB7VQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777137111; a=rsa-sha256; cv=none; b=AxqStpehdYJR8aBx2ZQM+V2T9M182pup+tuLLzy5tAE+zpy+6eF2n5aGMLxXbjpzjn0Dwk 1u+kpPZQRV32Xjr6xcd9JXSDlvHRX5Th+aBM/MkiJb8Vu+rsZgmq/Clh8PSSevdlh9zEQi j5Lakki70/gNAvdKfGzukb4UPcofaN1MMDe4GgwB1QxJ7ifPv4ifB1v4p8Adi7FqRqMv9V u7ZRry9wSP56CsXYKFF4WQUljprqUrHx9aHeRLsNGQWwcQJYjkPokqntoyCtyDtDxX8/3p DcW/cDKrGBosfZpUlSdVHabLMzoW9Q81JNythZ4bt2jeJ5K23mj5pykCujeYAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777137111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5GFbu01Az2fVmPVDm+AWsdPI62igYugo9N6cVv2ia7U=; b=RjAdwacQpmrUg1JwZ8+10IMKh+7Mzf7ETDje6yFnct2TXL5zWj3xttoS0ntF/jHEzWdNJN d5e2ObjY3QiCNb5ijx4zO+LgPPvlkj2b5U+U4oqRaOxyCQOiZ6C7dUG3AEorrs/bbDl1Ns r4dzexX1uMEq7cXQc6VFgg+B0y3NaOzjJtLA84h2y6FZ0Pi1AlOzyi4K70XFIWt3+ubIgq ftN8SnhicLNnH3PZ8BB7HjCkJA455Jb0naNuc8WA8PxeIRrDGN59l2Taup4GGF+EN7MaGi 3jg/lfmcwKNbnd5zFwSihgNaTIn6VBwZEEqcGv+uMnK3e3lcfhMDS++5qg7OTg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2xFg4XXXzk77 for ; Sat, 25 Apr 2026 17:11:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1874b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 17:11:51 +0000 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=B8rg?=rav Subject: git: c28508198f3b - stable/15 - printenv: Clean up List-Id: Commits to the stable branches 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: c28508198f3b6ad6ed8942bfdd59ffd0731551e5 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 17:11:51 +0000 Message-Id: <69ecf5d7.1874b.288e761a@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c28508198f3b6ad6ed8942bfdd59ffd0731551e5 commit c28508198f3b6ad6ed8942bfdd59ffd0731551e5 Author: Dag-Erling Smørgrav AuthorDate: 2026-04-22 08:19:39 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-04-25 17:11:25 +0000 printenv: Clean up * Error out if more than one argument is given. * Check for stdio errors. * Clean up the code. * Clean up and expand the tests. MFC after: 1 week Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D56506 (cherry picked from commit abdf2a711cabebc107a04fd286e441e2030827f0) --- usr.bin/printenv/printenv.c | 52 +++++++++++++----------- usr.bin/printenv/tests/printenv_test.sh | 70 ++++++++++++++++++++++++--------- 2 files changed, 82 insertions(+), 40 deletions(-) diff --git a/usr.bin/printenv/printenv.c b/usr.bin/printenv/printenv.c index 43dbdb0c1378..ba221fe70539 100644 --- a/usr.bin/printenv/printenv.c +++ b/usr.bin/printenv/printenv.c @@ -38,9 +38,15 @@ #include #include -void usage(void); extern char **environ; +static void +usage(void) +{ + (void)fprintf(stderr, "usage: printenv [name]\n"); + exit(EXIT_FAILURE); +} + /* * printenv * @@ -52,40 +58,42 @@ main(int argc, char *argv[]) { char *cp, **ep; size_t len; - int ch; + int opt; if (caph_limit_stdio() < 0 || caph_enter() < 0) err(1, "capsicum"); - while ((ch = getopt(argc, argv, "")) != -1) - switch(ch) { - case '?': + while ((opt = getopt(argc, argv, "")) != -1) { + switch (opt) { default: usage(); } + } argc -= optind; argv += optind; + if (argc > 1) + usage(); if (argc == 0) { for (ep = environ; *ep; ep++) (void)printf("%s\n", *ep); - exit(0); - } - len = strlen(*argv); - for (ep = environ; *ep; ep++) - if (!memcmp(*ep, *argv, len)) { - cp = *ep + len; - if (*cp == '=') { - (void)printf("%s\n", cp + 1); - exit(0); + } else { + len = strlen(*argv); + for (ep = environ; *ep != NULL; ep++) { + if (memcmp(*ep, *argv, len) == 0) { + cp = *ep + len; + if (*cp == '=') { + (void)printf("%s\n", cp + 1); + break; + } } } - exit(1); -} - -void -usage(void) -{ - (void)fprintf(stderr, "usage: printenv [name]\n"); - exit(1); + if (*ep == NULL) { + /* *argv not found */ + exit(EXIT_FAILURE); + } + } + if (fflush(stdout) != 0) + err(EXIT_FAILURE, "stdout"); + exit(EXIT_SUCCESS); } diff --git a/usr.bin/printenv/tests/printenv_test.sh b/usr.bin/printenv/tests/printenv_test.sh index 754ad75d3b5b..83535a555b17 100644 --- a/usr.bin/printenv/tests/printenv_test.sh +++ b/usr.bin/printenv/tests/printenv_test.sh @@ -1,6 +1,7 @@ # # SPDX-License-Identifier: BSD-2-Clause # +# Copyright (c) 2026 Dag-Erling Smørgrav # Copyright (c) 2023 The FreeBSD Foundation # # This software was developed by Yan-Hao Wang @@ -28,37 +29,70 @@ # SUCH DAMAGE # -atf_test_case base -base_head() +atf_test_case basic +basic_head() { - atf_set "descr" "Check that all reported variables exist with the reported values." + atf_set "descr" "Check that all reported variables " \ + "exist with the reported values." } -base_body() +basic_body() { - printenv | while IFS= read -r env; do - env_name=${env%%=*} - env_value=${env#*=} - expected_value=$(eval echo "\$$env_name") - atf_check_equal "${env_value}" "${expected_value}" - done + atf_check -o save:out printenv + while IFS= read -r env; do + env_name=${env%%=*} + env_value=${env#*=} + atf_check -o inline:"${env_value}" -x \ + printf "%s" "\"\$${env_name}\"" + done stderr + echo $? >result + ) | true + atf_check -o inline:"1\n" cat result + atf_check -o match:"stdout" cat stderr } atf_init_test_cases() { - atf_add_test_case base - atf_add_test_case add_delete_env + atf_add_test_case basic + atf_add_test_case add_delete_env + atf_add_test_case multi + atf_add_test_case stdout } From nobody Sat Apr 25 17:13:55 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2xJ35Nzxz6bqS0 for ; Sat, 25 Apr 2026 17: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2xJ34L0Hz3MJd for ; Sat, 25 Apr 2026 17: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=1777137235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GarjvFl1DXLCe2f0JELTk1aDH1Ae2P3IbbKpOe35wNg=; b=OZgTvq3ZXLEloK7NfaUNRmlKrnX+huJsXREXfpAxsol+vIeUQMelDT4pX6b/h3zzzU5iCy otisZ3z4xeABHh9enOUdGhHWsNcTRjUUhtIIpuWoBvu3mqNtp6hfU4AtIqxMAgUH8wEU0N trxr9gVOE6GVGHrwizGYPxY0wIY0QD/uyrKnk5L8EhhOAv7TllLTp1gsx0MZWdtVNLKNeM JMcJV6P2cwtFsihnK18Ft9we/A2kZt/nM7xRNZj85T91XDHMIacIaFVdTl+0OZsW2/cIMz YsaMgjvDcHdbGNDzTWzx+BE/t6sZm7YrXmktZzz4ukzEmt5iDCpxutNyJA2ZWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777137235; a=rsa-sha256; cv=none; b=HQn7MYYxDIMrxfLIrUQGc5PH01SeOtDqt8aD3RKzlcKDJIbXLlqbxkflbU/1I0DSeRd+Lw rjzJ1UEuWQ/mvdzZTsNqwa3i7I1W58q8sddyfkwS6R+/LXqvpi+npj69qCK6xRjQrE2grs y3NsCEOwKPcrrQE78ZD0/EltgTbCh8q7z0wGujOViIW6sqspfIM3JwZ5u1lBmGLr8lj/64 e96wZqU4AGnIc8G3WlAUf7GLgtwXWgRn8GSqYkXx5rW+LaDMMhnNYtPsJwddSNXWBoqVc4 1218FN36W2US6oPxhE/mC+L5t7EOSqfv3s6wDoPmhtg8L8gAdAWTv7eI+SgJYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777137235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GarjvFl1DXLCe2f0JELTk1aDH1Ae2P3IbbKpOe35wNg=; b=XCj8LtU7C/nS3e8nXx+TTTEOVK6M8FW23GVu5Pji0qBcU/2JxKMNl82cz6JCznOY9IyRQF PcfM/QhzP2CENck4/jke921Jqa2g+LbGnSo6XdNyroZ7UeeGr+gaz0rmHD00QG1unCJeNT htYl3xYOGCf4bi967jcdpqRN8Qf0WbFaD831xE9e75NZ6fWUHGJokzNXYfVlroW23oa1dS Y3HZz63Uzv9npd4UXOMY+M7XquEg8IxtoAe03zGQHSAcOWHI0s3cQ1Wp2QnNKE3ePl7sbL F35g1G/sKVvCZFLc2jfgNuuCN2MFEWUpPBzFfAf0WmY9E9R99nU+l6vgO8R83w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2xJ32jF4zk3b for ; Sat, 25 Apr 2026 17:13:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 19f62 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 17:13:55 +0000 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=B8rg?=rav Subject: git: 5845acb55615 - stable/15 - sockstat: Unbreak SEE ALSO section List-Id: Commits to the stable branches 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: 5845acb55615d5bc92fb2220005364c74765855a Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 17:13:55 +0000 Message-Id: <69ecf653.19f62.61f8476c@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5845acb55615d5bc92fb2220005364c74765855a commit 5845acb55615d5bc92fb2220005364c74765855a Author: Dag-Erling Smørgrav AuthorDate: 2026-04-15 09:36:40 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-04-25 17:13:49 +0000 sockstat: Unbreak SEE ALSO section MFC after: 1 week Fixes: 7b35b4d19630 ("sockstat: add libxo support") (cherry picked from commit a6bd704850a615ae81076855a2083c7ab6481df1) --- usr.bin/sockstat/sockstat.1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/sockstat/sockstat.1 b/usr.bin/sockstat/sockstat.1 index 1498fb1d88f7..a8ea3ac0a88f 100644 --- a/usr.bin/sockstat/sockstat.1 +++ b/usr.bin/sockstat/sockstat.1 @@ -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 October 14, 2025 +.Dd April 15, 2026 .Dt SOCKSTAT 1 .Os .Sh NAME @@ -256,10 +256,10 @@ $ sockstat --libxo json,pretty .Xr netstat 1 , .Xr procstat 1 , .Xr setfib 1 , +.Xr libxo 3 , .Xr inet 4 , .Xr inet6 4 , -.Xr protocols 5 -.Xr libxo 3 , +.Xr protocols 5 , .Xr xo_options 7 .Sh HISTORY The From nobody Sat Apr 25 18:08:34 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g2yW71xdrz6bv8S for ; Sat, 25 Apr 2026 18: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g2yW66gH3z3TWq for ; Sat, 25 Apr 2026 18:08:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777140514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o4CnNM6ha1wwE1S9G09P5wns8w3/vgo+Xd5OmY+REZI=; b=uQCkrcKFGi8yHoJ8HZnWHxIkuQQQQCyWmCV7UtzixEdUZH8pyEAwNPpVLq/I/y9J5obsG4 IEl0wjbv3ReTgoXKurAXpd7Vn9VE+pUV8PFjQit1Toga7rABK8NZX6TUf3vMpmMPNj9wzH 1RdEevAC6xMaNIs0byWSBdXuVfaIHqcIWCjDG8G8MYv8BO2BT7nFS6lBQfA4stqiNsOhRZ k/3g5yGssNIwVdM1Bn/j2usXf4j7eIXiWhf4P65wd2UJ8b5gBEc9TAKkEi33pcFsqLXJaD sqwzL4qL2nvq5TctgOf96TV/wrOwWn2iSmF39YgGZXRAtKbNYZdcfgHaKs8n0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777140514; a=rsa-sha256; cv=none; b=e7Mw5QqSgorqJSnIXv05aDfilUGeizlnHHDXeyD24OB/S80xMTHJPgANzhO7Q2sr01PceM AYHMwo+UEZR0ec7wX0ufnlYh6MuPHgcAhHB7qZMCkeKTDk4l0i60q9+kvJMR93o1bjFpuA ZrvEoZhHuEEECb8DjDqu3Io3Ofr0ioSshauCu4pCta7arhCqEspEBCaNvz1XBd7f1kQikF HVvawlZszSX3E7mJz0oX4tezsI6A6CB4xSjZy71Ci7Lw6hBZA5O5lTKAldU3JNdf0EFOvg pqgs4eg4yReYeA92B9FPD+6QqDnEZKCwNooguFd8yxqtSZMnA8XOy6d3WBQoKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777140514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o4CnNM6ha1wwE1S9G09P5wns8w3/vgo+Xd5OmY+REZI=; b=LNmDml8xY6YWgfdRcopkms2RV6os4vPg0LNPGIkow/GK8HKhbkFmAcUom5db9Yisd++vPo DD2M1QjG9Rw9RwnVFRaEbyJQSJhuRYMIxRoB3CJLJe757EnQhxufwCuWptEGrj7UhiZ6gn jJUyfwUvIiUlLEWktTOPQXKWkFSdAE5bpvLflwgz43ItblchVTejwIe5/DyxdO4xspD9Xf rjji+uyne3Cx/+OYf4ya8RR3haLz+W9gJ7d6S5LqeJrrW4AL9PQmL3eBgWYdvuAl+YyP2N w5mqyF5ezyuXba+bmXy5TMBprPswKI02cc8yS0dHF3BmRb27Z6lwtJY20SgD3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g2yW66757zkss for ; Sat, 25 Apr 2026 18:08:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1ed56 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 18:08:34 +0000 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=B8rg?=rav Subject: git: 56d81eb17db0 - stable/15 - ident: Fix typo in manual page List-Id: Commits to the stable branches 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: 56d81eb17db0e7d5f4a183b823f9e81cc2293f29 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 18:08:34 +0000 Message-Id: <69ed0322.1ed56.1ae4adad@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=56d81eb17db0e7d5f4a183b823f9e81cc2293f29 commit 56d81eb17db0e7d5f4a183b823f9e81cc2293f29 Author: Dag-Erling Smørgrav AuthorDate: 2026-04-25 18:06:19 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-04-25 18:08:25 +0000 ident: Fix typo in manual page Fixes: 394f6b1b0a65 ("ident: Clean up") (cherry picked from commit 3e6a26df1fb7e0508e1f81f826f8945b15a8bb48) --- usr.bin/ident/ident.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/ident/ident.1 b/usr.bin/ident/ident.1 index 3583b319d80b..0529bb438978 100644 --- a/usr.bin/ident/ident.1 +++ b/usr.bin/ident/ident.1 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 18, 2026 +.Dd April 25, 2026 .Dt IDENT 1 .Os .Sh NAME @@ -66,4 +66,4 @@ This version of the utility was written by .An Baptiste Daroussin Aq Mt bapt@FreeBSD.org and -.An Dag-Erling Sm\(/orrgav Aq Mt des@FreeBSD.org . +.An Dag-Erling Sm\(/orgrav Aq Mt des@FreeBSD.org . From nobody Sat Apr 25 19:25:57 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g30DP5G8kz6NQK7 for ; Sat, 25 Apr 2026 19:25:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g30DP3Kk5z3gK9 for ; Sat, 25 Apr 2026 19:25:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777145157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LjUDFuqW0L+8UhV3LtWxyzKU9vKv40DHWyk0OSZ2wyY=; b=RczChf1i5y/Kz/FNe8ibt1FwS7iJUH4PYWxB9NEA1oEs13ktyn/0snTZWwocQfaZ7St/2M SeLveS5zUcsVpZ+cdm4MCjnTs3qpu+OssUvzMveUK+468XiHt9tlRigK7EcJrNa3wZ1HSV jyGM4KQqiVKd7wh+apdXLc4ubvLV86C9M8N3390lYIDukP9VKZPXQtkVFfaOmspC6wl3IC eZrwS0M3ELG+UjUPFOLMhY/B9p4DEdoa6QvyxZ1qlD7WFXMJnmtDCOqLOQXsIgtOBhFZ0H yxumnxVQMalLlnUmBJ4stKBYxbT3rQvc62v0PRe+uxW6ooR99gxLTXbA/I0l1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777145157; a=rsa-sha256; cv=none; b=bq3E4qR9rsQywjoCS2ffN4vAIu79DgJLX4j61wIt2FMabl4Yi5VcHp8emzuu0p/EojDcW6 VslwAIX/ggX4uVl0aSqu2rS74GT5rWhKHaINcMYTHE88d9gK5lBiI/8j1Igsw9xUFKQ8AS gnQ/ENLRlmoennp7C/zj+0KVaJ42B3WYqLzMRT3XxMuu7vAh/pXVcVTfwfDaGwVSyFtDVp 2ioYqtkHiPRCUnBZ/Xvu3aNoegSFHQru9fxKy+nzU4/UYKW7SVJbBjywBHTifFa50Izem+ Krk62DEakfFnGL2MeKICFLkmpQfvGG4yVCUc4DZ+6j9aUWMBv6DZkoX7RcZevw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777145157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LjUDFuqW0L+8UhV3LtWxyzKU9vKv40DHWyk0OSZ2wyY=; b=aXLsNqOmcby2NO88vYFYBFPKwFxJDSZwLWTjmlK62Yi4x8v/ycwhr46FeimSLlgtMXMCkk bNHWmiWGzllcGUaGG1xo7S2kkR+g1ruvz4NS6MxhgRO96DUsBNsn3BMMTb/Ww7uhbQT/VT oHIwg6ejqgZS0pjqE69+E1SQ7jCXnBQWL9+Vp1W4cPGQq4iUvlUH2E6mhT+TrY0VX3g7hb XJpfWSMHe5TS3a0wZGcv/HCD+HxafczoAvlFlNe0OoecMDZnCbYrYwyfqrLS1rMMzjgjK2 dJV+e/8I94RheE+17UaD8dZnN2CfuXwQD5JGfA05X5dgZEYJvnll2nFLWH1Bbg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g30DP2SqnznSS for ; Sat, 25 Apr 2026 19:25:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26dc4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 19:25:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Timo =?utf-8?Q?V=C3=B6lker?= From: Michael Tuexen Subject: git: c0178169207d - stable/15 - ifinfo: improve output of hwassist 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c0178169207d5171ff52325de7f80df8e36c7fff Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 19:25:57 +0000 Message-Id: <69ed1545.26dc4.f0850bb@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=c0178169207d5171ff52325de7f80df8e36c7fff commit c0178169207d5171ff52325de7f80df8e36c7fff Author: Timo Völker AuthorDate: 2026-02-08 20:02:58 +0000 Commit: Michael Tuexen CommitDate: 2026-04-25 19:24:21 +0000 ifinfo: improve output of hwassist value In addition to print the hexadecimal number hwassist, also print the symbolic names of the corresponding CSUM_* flags. Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D55055 Event: Wiesbaden Hackathon 2026 (cherry picked from commit d84870d90bafe75eb87759df0ab41ff0214c866e) --- tools/tools/ifinfo/ifinfo.c | 48 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/tools/tools/ifinfo/ifinfo.c b/tools/tools/ifinfo/ifinfo.c index 89d17f0c75fa..e8837de0b383 100644 --- a/tools/tools/ifinfo/ifinfo.c +++ b/tools/tools/ifinfo/ifinfo.c @@ -30,6 +30,7 @@ #include /* for PF_LINK */ #include #include +#include #include #include @@ -38,6 +39,8 @@ #include #include #include +#include +#include #include #include @@ -149,6 +152,47 @@ main(int argc, char **argv) return retval; } +/* code after this line copied or based on code from src/sys/kern/subr_prf.c */ +static inline bool +isbitpos(char c) +{ + return (c != '\0' && (c <= ' ' || (c & 0x80) != 0)); +} + +static inline bool +isprintnospace(char c) +{ + return (isprint(c) && c != ' '); +} + +static void +print_bits(uintmax_t num, const char *bitstring) +{ + bool first; + const char *c; + int shift; + + c = ++bitstring; + first = true; + while (isbitpos(*c)) { + if ((*c & 0x80) != 0) + shift = *c++ & 0x7f; + else + shift = *c++ - 1; + if (num & (1ULL << shift)) { + putchar(first ? (first = false, '<') : ','); + for (; isprintnospace(*c); ++c) + putchar(*c); + } else + for (; isprintnospace(*c); ++c) + continue; + } + if (!first) { + putchar('>'); + } +} +/* code before this line copied or based on code from src/sys/kern/subr_prf.c */ + static void printit(const struct ifmibdata *ifmd, const char *dname) { @@ -182,8 +226,10 @@ printit(const struct ifmibdata *ifmd, const char *dname) printf("\tinput queue drops: %lu\n", ifmd->ifmd_data.ifi_iqdrops); printf("\tpackets for unknown protocol: %lu\n", ifmd->ifmd_data.ifi_noproto); - printf("\tHW offload capabilities: 0x%lx\n", + printf("\tHW offload capabilities: 0x%lx", ifmd->ifmd_data.ifi_hwassist); + print_bits(ifmd->ifmd_data.ifi_hwassist, CSUM_BITS); + printf("\n"); printf("\tuptime at attach or stat reset: %lu\n", ifmd->ifmd_data.ifi_epoch); #ifdef notdef From nobody Sat Apr 25 21:51:23 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g33SC22R3z6ZmwW for ; Sat, 25 Apr 2026 21:51: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g33SC0mGgz3xNP for ; Sat, 25 Apr 2026 21:51:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777153883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L5KdFa/GxDW/ELelPjwi0pl62dHARV5DCmb/J3ryBoQ=; b=vfyGpUWtVpU0EGm6vyjBvXgtYiTdp7C6lE0X5KGqYKB+AASjs8KpliaRIYkkne/x0tY5Bm x5LMoCORROKn6avWBph8l7mu4oE9naCGKsd0tbWv0r98Jp0Thl9Nsu+WqoNcGyQ5OUJwXy lQ34qll1I8s/rmRS8Py6p+8pahK4V5gTF3K2aS2fc6uCNXGsoszkPcjLitOQCiOZ26LYfI piOd5IwtxhnozrOpm6gud7ovo3hwJjsNwhH1J6yym9Yty0a8EVM1PjVCMf1Jm+WYU+Reuu XTt/QCFNV9VNHhyXEIdYzXsMoe4kDIOAjar/PebsZ+gq3Ydj15AJmbJH8TxdHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777153883; a=rsa-sha256; cv=none; b=iDfz8IVhMG87/nxld5faMnU2aMMb6yguQBxpD2NkTRwa/Pf9WMZYCXaVld80RNVfolJnyo azxixvnOoz/0274AFxFECagSmLr69MmmHbNweP0X6TjWez7RaWBrrC6grtmVARhyXxH3xa fUAOjoe8A798NbqUmH2QbMjcez4+RXLo96/22s753yyqdCe6Dx6HPJT3n78cDx0/FO3o1S 8ERG3QuPaLkFjVacoAsvXa+EEnvyEaSiThTzRiZWZpZw6lmmuGNeqMaZ71wIHdrsPSNFsN xnlXxPlLNGV+6mKE8Is8h5IKE7yXAJPvSTEVwqEVbZ4VPK9b98cW9iUpD6Ae1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777153883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L5KdFa/GxDW/ELelPjwi0pl62dHARV5DCmb/J3ryBoQ=; b=FzzIqSX+FYWqpKqwx4yrdu6kErR29vweIwWap+QcsNSHhNei+cFDBKV8MzOpw2l2Pe9U6k TA4IikSoigV6SLUhKKKw9bCu93cscQjmyiqroCPkVhYaVtILJEWmM05kL5X8gmFRRTWSKX cZK+Z2t1K3JSuv/7BLBQ9A0vIyjVChMH2fTJ0gRO2xzbKc5wPwpREU7JRW2yQncHoHZIts Y2IZd/geTZl+S22YfrnV5qILOkmR8kTprHMKZt8zqs2Az9Auy7CiCaD4tziTCsj0iWESES hY2Y/zm3xEIHIx3xNXPa084sIVWEAkhsGzBwp5bubJiQogBZUutoQSTqGQLGuQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g33SC0JSfzrqv for ; Sat, 25 Apr 2026 21:51:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3efcc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 21:51:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: cd1c4fb43ed1 - stable/15 - sound: Remove some forward declarations from sound.h and uaudio.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: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: cd1c4fb43ed1919305a82a96b24c1c82b401ebcd Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 21:51:23 +0000 Message-Id: <69ed375b.3efcc.2f93aaba@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=cd1c4fb43ed1919305a82a96b24c1c82b401ebcd commit cd1c4fb43ed1919305a82a96b24c1c82b401ebcd Author: Christos Margiolis AuthorDate: 2026-04-18 10:50:03 +0000 Commit: Christos Margiolis CommitDate: 2026-04-25 21:51:18 +0000 sound: Remove some forward declarations from sound.h and uaudio.h Sponsored by: The FreeBSD Foundation MFC after: 1 week (cherry picked from commit 602249f033d146d9c731d8b1cb4b2e0899c61ad9) --- sys/dev/sound/pcm/sound.h | 5 +---- sys/dev/sound/usb/uaudio.h | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index de9af6bd5324..56ef6af8e546 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -75,15 +75,12 @@ #include #include -struct pcm_channel; -struct pcm_feeder; -struct snd_dbuf; struct snd_mixer; -#include #include #include #include +#include #include #include diff --git a/sys/dev/sound/usb/uaudio.h b/sys/dev/sound/usb/uaudio.h index 54b31a4e7bd2..05858473eb00 100644 --- a/sys/dev/sound/usb/uaudio.h +++ b/sys/dev/sound/usb/uaudio.h @@ -33,9 +33,7 @@ struct uaudio_chan; struct uaudio_softc; -struct snd_dbuf; struct snd_mixer; -struct pcm_channel; extern int uaudio_attach_sub(device_t dev, kobj_class_t mixer_class, kobj_class_t chan_class); From nobody Sat Apr 25 21:51:24 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g33SD3sBfz6ZmwZ for ; Sat, 25 Apr 2026 21:51:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g33SD17fwz3xkv for ; Sat, 25 Apr 2026 21:51:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777153884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LvS84fDxfyt/dyNZ23hWjqwxFHlDEnnJL26iehEGAlA=; b=X1pQ2S4WrxBbqKhBFcoxZO6uTcURUqf15AA6nY5nC63FFuDmDmnGOrHsPn0dVSK7XK59sU 5SPFr0vc9QVeYGK8KcmL4SWXsL15XZFrdofUJhLM6hzJacBrsKQAF7Mt6jwf4o8hTzwqRm LN/pOvSwez9pKgBwd7BnCCovh9hYqFI+C4STs3SrD+UrFF7tQYFCctIrtpfWy6mltQpiX4 aoMrlvQc7Giooe8QuXsWsmVSn6IJvIhFyWNWNm+BZDXygFZV9jUtIm6f0q8lLshUDSSW4i 33sZ6uBXw+PtHIRvMtBCxgC4ttQSmrWlOQJdHDzIWP1m6BrEaih9FgSc3gSfmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777153884; a=rsa-sha256; cv=none; b=xhajVLo+Y6RXv8/7JdKMDcEG29a3aE7e3A1IPv0wWUg0ncg4YsDOrlr/+Rg4kxg02JvzQi hE8rdcE6Y/p2F652ZLpybjEEDpCe4+F/DvEd2iW3CrATL2tnQ9XKJBzBkA0KdqzyFvqPOM MAM5LqWtyxObZp8oOGPqwgR6PPSQnf/tJ/dNRSZYLSnIo09CHiZVZhEEDspP4KCDxFcAda hsglChi2aS/0nwkeI+6TarXML9GoWx9jFDQ/jIR4BpQ3KArLEirn3YBUZuCY//gFltveJl IBs0iDJTfNPPMMkHFsIqe5zhZiAZz40kq3Oi7nBuZlB1dfkLCqyHCFTuWUe0Uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777153884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LvS84fDxfyt/dyNZ23hWjqwxFHlDEnnJL26iehEGAlA=; b=GM5TKTkRkLT291jICTt91Gv6H+qb0kRSGeXFAeaLU2Ux6UkflJQXyejOmLmSesNZ6Wkpq9 fQj4IHtllYRGWPUk7fDpwYdGZ/H05HLWrLa3vjjSNQLxYa9tcyz+RW7qsdgOkPWeRtpums x3LkjQCm9/+VH2CArJ45w4HO1XcznoU7u8+KvpP99V7SYN954DUB1rBAoTI/47HFJpOaD2 zWDPy9INo73LrhWcVmew4EzI93w/+skEheDRtrB7zdmgUzUuq0HePtv9SyZQyCK7l1pb6X hXqxzmXZFFTO2PP5mheGya7Krc5oadxDl1uivLNcHRd4kYMM/xjJH4c3lyzOeA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g33SD0hd9zs68 for ; Sat, 25 Apr 2026 21:51:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e9e8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Apr 2026 21:51:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: f9d4517b53bf - stable/15 - mixer(3): Rename _mixer_readvol() to mixer_readvol() List-Id: Commits to the stable branches 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: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f9d4517b53bf4b8828b7f5ef98e91a2da2f14b18 Auto-Submitted: auto-generated Date: Sat, 25 Apr 2026 21:51:24 +0000 Message-Id: <69ed375c.3e9e8.1e8fc3d5@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=f9d4517b53bf4b8828b7f5ef98e91a2da2f14b18 commit f9d4517b53bf4b8828b7f5ef98e91a2da2f14b18 Author: Christos Margiolis AuthorDate: 2026-04-18 11:50:04 +0000 Commit: Christos Margiolis CommitDate: 2026-04-25 21:51:18 +0000 mixer(3): Rename _mixer_readvol() to mixer_readvol() No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 1 week (cherry picked from commit c39237a4fd2b1472e452052103156c915942d070) --- lib/libmixer/mixer.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/libmixer/mixer.c b/lib/libmixer/mixer.c index 2be3a48eb755..d4c3bf5adf52 100644 --- a/lib/libmixer/mixer.c +++ b/lib/libmixer/mixer.c @@ -35,13 +35,11 @@ #define BASEPATH "/dev/mixer" -static int _mixer_readvol(struct mix_dev *); - /* * Fetch volume from the device. */ static int -_mixer_readvol(struct mix_dev *dev) +mixer_readvol(struct mix_dev *dev) { int v; @@ -120,7 +118,7 @@ dunit: dp->parent_mixer = m; dp->devno = i; dp->nctl = 0; - if (MIX_ISDEV(m, i) && _mixer_readvol(dp) < 0) + if (MIX_ISDEV(m, i) && mixer_readvol(dp) < 0) goto fail; (void)strlcpy(dp->name, names[i], sizeof(dp->name)); TAILQ_INIT(&dp->ctls); @@ -334,7 +332,7 @@ mixer_set_vol(struct mixer *m, mix_volume_t vol) v = MIX_VOLDENORM(vol.left) | MIX_VOLDENORM(vol.right) << 8; if (ioctl(m->fd, MIXER_WRITE(m->dev->devno), &v) < 0) return (-1); - if (_mixer_readvol(m->dev) < 0) + if (mixer_readvol(m->dev) < 0) return (-1); return (0); From nobody Sun Apr 26 02:06:02 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g39624ffwz6b8hv for ; Sun, 26 Apr 2026 02:06: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g39623Xq2z3S6t for ; Sun, 26 Apr 2026 02:06:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777169162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GzDjD03PykuVm1yPbS4lUam0czIjGo1QvTcuJUK1WzQ=; b=daJ8vA8xYxAF5XQ9NFrrXu/Zbpvfr6VTCiRbQe5HNwKgrbgrFkmw8Dg8yDAA0g+10L08xs 42lDkNeguwknj6aCVh+/eIsJqzZRuifkCrKBZsZqwidMsuKr9lVMudEmJkPPofgM6Ad4k0 M6IVHlxVrVXCa9knfJYCRaREWzjnjEoGs4O4YKKSbJTvn5qUSgPPUPSj0YAHzQZyz7B7sS S9Iz7StCYdmWkeQHto4Haqi9N+e0jE84gcEPHxDyU/RnoKRj6HjuwOdvUW028ekIrht3gd dbPRTgp7ZLt/0zqHnZHRL5XrhL1kLfgpg1icTD1uyNLHFgiZUhBa0lgYnLAHlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777169162; a=rsa-sha256; cv=none; b=UStEDu/76phe66fQucoRPOuHdINPflHxhXMEVDwdj7B/HuW86RZ3V0/EmMPrRnBUm0gkI5 l4r2KNTcShK/JiDIUnd8QEJDSxpkitmX15vcwMngEu4IogR+FCVV/M3qLrFZf8bapLrawP wxuL+7kwGr+nyPsx9glfSTIv5b0tjjTHIGxXhYsuriS8lTOlnDtH8X8arSIvF3988uhO8B MKXZTO1Xbkz+dMsrVPiYiiBzj8l1tdYNr2vq5nh0A5mj5bHgCghV+LO0l/oKeqwSfwqMNM DwNo9UFlGqJjNAf0hXBCb+rHirYBM0qv4D/UZQ4Ufnf9zVsyNnQm8rgu3roKxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777169162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GzDjD03PykuVm1yPbS4lUam0czIjGo1QvTcuJUK1WzQ=; b=Y8v45T0/BQtnX3ea35CesiBFZ4Ozu47wm8KaJsj4et359miOFprmzVOHalOeMBRv6wI2XB P0voG2VF7EnsfHSjdXdYfDAt+MaxwJ8MOfLZnPUGZ+5B4jwrmb6dt0Sxh8I2SOf5YS6hsy 584jACAcaItFi56hwbBSpTNziahjedgZ7l2DPNngEj52QQPGgqqsRAujouusxMllot4BAd er+t9vLIKgQhKBGrQKBc4B1KTJshDcX8iKvSOINeJZxWD0ImbcBteix2T5QTA6WtZ/Yowu WumNiDBBE3fjAqQVz59Lv34LwjGo9C8VB0+ssyWjmVITgcVL3WL1ZuN5X9Q1HA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g39622D6yz10Rj for ; Sun, 26 Apr 2026 02:06:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30a73 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 02:06:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: 1e5aff8e5bc6 - stable/15 - contrib/tzdata: import tzdata 2026b List-Id: Commits to the stable branches 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: philip X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 1e5aff8e5bc607f6bfaaf982b9c07ce365cd9bf4 Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 02:06:02 +0000 Message-Id: <69ed730a.30a73.9972fd2@gitrepo.freebsd.org> The branch stable/15 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=1e5aff8e5bc607f6bfaaf982b9c07ce365cd9bf4 commit 1e5aff8e5bc607f6bfaaf982b9c07ce365cd9bf4 Author: Philip Paeps AuthorDate: 2026-04-23 15:44:33 +0000 Commit: Philip Paeps CommitDate: 2026-04-26 01:54:14 +0000 contrib/tzdata: import tzdata 2026b Changes: https://github.com/eggert/tz/blob/2026b/NEWS (cherry picked from commit 9b95cab0a2927dfe07dbe6dc0056a80d5c730414) --- contrib/tzdata/NEWS | 53 +++++++++++++++++++++++++++++++++++------- contrib/tzdata/northamerica | 56 ++++++++++++++++++++++++++++++++++++++++++++- contrib/tzdata/version | 2 +- contrib/tzdata/zone.tab | 2 +- contrib/tzdata/zone1970.tab | 2 +- contrib/tzdata/zonenow.tab | 3 +++ 6 files changed, 106 insertions(+), 12 deletions(-) diff --git a/contrib/tzdata/NEWS b/contrib/tzdata/NEWS index acd22280cb3a..a0042701c687 100644 --- a/contrib/tzdata/NEWS +++ b/contrib/tzdata/NEWS @@ -1,10 +1,47 @@ News for the tz database +Release 2026a - 2026-04-22 23:06:43 -0700 + + Briefly: + British Columbia moved to permanent -07 on 2026-03-09. + Some more overflow bugs have been fixed in zic. + + Changes to future timestamps + + British Columbia’s 2026-03-08 spring forward was its last + foreseeable clock change, as it moved to permanent -07 thereafter. + (Thanks to Arthur David Olson.) Although the change to permanent + -07 legally took place on 2026-03-09, temporarily model the change + to occur on 2026-11-01 at 02:00 instead. This works around a + limitation in CLDR v48.2 (2026-03-17). This temporary hack is + planned to be removed after CLDR is fixed. + + Changes to code + + zic no longer mishandles a last transition to a new time type. + + zic no longer overflows a buffer when generating a TZ string like + "PST-167:59:58PDT-167:59:59,M11.5.6/-167:59:59,M12.5.6/-167:59:59", + which can occur with adversarial input. (Thanks to Naveed Khan.) + + zic no longer generates a longer TZif file than necessary when + an earlier time zone abbreviation is a suffix of a later one. + As a nice side effect, zic no longer overflows a buffer when given + a long series of abbreviations, each a suffix of the next. + (Buffer overflow reported by Arthur Chan.) + + zic no longer overflows an int when processing input like ‘Zone + Ouch 2147483648:00:00 - LMT’. The int overflow can lead to buffer + overflow in adversarial cases. (Thanks to Naveed Khan.) + + zic now checks for signals more often. + + Release 2026a - 2026-03-01 22:59:49 -0800 Briefly: Moldova has used EU transition times since 2022. - The "right" TZif files are no longer installed by default. + The “right” TZif files are no longer installed by default. -DTZ_RUNTIME_LEAPS=0 disables runtime support for leap seconds. TZif files are no longer limited to 50 bytes of abbreviations. zic is no longer limited to 50 leap seconds. @@ -25,23 +62,23 @@ Release 2026a - 2026-03-01 22:59:49 -0800 The Makefile no longer by default installs an alternate set of TZif files for system clocks that count leap seconds. - Install with 'make REDO=posix_right' to get the old default, + Install with ‘make REDO=posix_right’ to get the old default, which is rarely used in major downstream distributions. If your system clock counts leap seconds (contrary to POSIX), - it is better to install with 'make REDO=right_only'. + it is better to install with ‘make REDO=right_only’. This change does not affect the leapseconds file, which is still installed as before. - The Makefile's POSIXRULES option, which was declared obsolete in - release 2019b, has been removed. The Makefile's build procedure + The Makefile’s POSIXRULES option, which was declared obsolete in + release 2019b, has been removed. The Makefile’s build procedure thus no longer optionally installs the obsolete posixrules file. Changes to code Compiling with the new option -DTZ_RUNTIME_LEAPS=0 disables runtime support for leap seconds. Although this conforms to - POSIX, shrinks tzcode's attack surface, and is more efficient, - it fails to support Internet RFC 9636's leap seconds. + POSIX, shrinks tzcode’s attack surface, and is more efficient, + it fails to support Internet RFC 9636’s leap seconds. zic now can generate, and localtime.c can now use, TZif files that hold up to 256 bytes of abbreviations, counting trailing NULs. @@ -51,7 +88,7 @@ Release 2026a - 2026-03-01 22:59:49 -0800 zic -L can now generate TZif files with more than 50 leap seconds. This helps test TZif readers not limited to 50 leap seconds, as - tzcode's localtime.c is; it has little immediate need for + tzcode’s localtime.c is; it has little immediate need for practical timekeeping as there have been only 27 leap seconds and possibly there will be no more, due to planned changes to UTC. zic -v warns if its output exceeds the old 50-second limit. diff --git a/contrib/tzdata/northamerica b/contrib/tzdata/northamerica index 16b79af29b55..3e8641e1c20a 100644 --- a/contrib/tzdata/northamerica +++ b/contrib/tzdata/northamerica @@ -1957,6 +1957,56 @@ Zone America/Edmonton -7:33:52 - LMT 1906 Sep # https://searcharchives.vancouver.ca/daylight-saving-1918-starts-again-july-7-1941-start-d-s-sept-27-end-of-d-s-1941 # We have no further details, so omit them for now. +# From Arthur David Olson (2026-03-02): +# B. C. Gov News: “Adopting permanent daylight saving time: ‘Spring forward’ +# on March 8 will be the last time change, ending twice-yearly clock changes.” +# https://news.gov.bc.ca/releases/2026AG0013-000209 +# +# From Paul Eggert (2026-03-07): +# The law says that 21 hours after the usual 2026-03-08 02:00 switch from +# PST to PDT, the next day inaugurates the new standard time Pacific Time, +# i.e., just one clock change but two name changes separated by 21 hours. +# PT, the obvious abbreviation for Pacific Time, is one letter too short +# to conform to TZDB’s (and POSIX’s) [-+[:alnum:]]{3,6} requirements. +# I asked the BC government for advice, with no response. For now, do this: +# 1. As a temporary hack, pretend that the BC law takes effect +# not on 2026-03-09 at 00:00, but on 2026-11-01 at 02:00. +# This pretense works around a limitation in CLDR v48.2 (2026-03-17), +# which would otherwise say the interval uses “Pacific Standard Time”. +# (Below, this temporary hack is marked “Temporary hack; see above.”) +# Strictly speaking this hack is incorrect since the interval uses +# standard time, but it does have the right UT offset and it +# works around the CLDR limitation. We should be able to remove +# the temporary hack after CLDR is fixed. +# 2. After the BC law takes effect, model the time as MST sans DST. +# We can change this later if another conforming non-numeric abbreviation +# for Pacific Time becomes more popular. Possibilities include: +# MST - the most compatible with existing software and practice, +# and already used in parts of BC and in Yukon +# PDT - almost as software-friendly, but confusing because it implies +# it is DST and is paired with PST, whereas PT is standard time +# PST - straightforward but even more confusing, +# and will likely break much software that assumes PST is -08 +# -07 - accurate and clear in itself, but makes BC look odd vs neighbors +# CPT, CPST - for Canadian Pacific (Standard) Time, +# by analogy with AEST in Australia +# P-T - conforming approximation to “PT” +# PT+ - like P-T but suggesting one-hour advance over PST + +# From Chris Walton (2026-03-15): +# The Regional District of East Kootenay is planning to move to year-round +# Mountain Standard Time (MST) on November 1, 2026.... +# https://www.rdek.bc.ca/news/entry/rdek_board_moves_to_transition_to_year_round_mountain_standard_time +# (2026-03-17): +# The final decision East Kootenay made a few days ago may turn out not to +# be final after all. They are going to reopen the debate next month! +# https://www.cbc.ca/news/canada/british-columbia/what-time-is-it-in-the-east-kootenay-debate-9.7132624 +# From Paul Eggert (2026-03-17): +# Mayor Steve Fairbairn of Elkford asked the question be called a second time, +# saying, “Pardon the pun, but this is not a time-sensitive issue.” +# For now, merely mention the potential change in these comments. +# If it happens it would likely affect clocks starting 2027-03-14 at 02:00. + # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule Vanc 1918 only - Apr 14 2:00 1:00 D Rule Vanc 1918 only - Oct 27 2:00 0 S @@ -1970,7 +2020,11 @@ Rule Vanc 1962 2006 - Oct lastSun 2:00 0 S # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone America/Vancouver -8:12:28 - LMT 1884 -8:00 Vanc P%sT 1987 - -8:00 Canada P%sT + -8:00 Canada P%sT 2026 Mar 9 + # Temporary hack; see above. + -8:00 1:00 PDT 2026 Nov 1 02:00 + # End of temporary hack. + -7:00 - MST Zone America/Dawson_Creek -8:00:56 - LMT 1884 -8:00 Canada P%sT 1947 -8:00 Vanc P%sT 1972 Aug 30 2:00 diff --git a/contrib/tzdata/version b/contrib/tzdata/version index 5d9126009e7f..75d34ee38931 100644 --- a/contrib/tzdata/version +++ b/contrib/tzdata/version @@ -1 +1 @@ -2026a +2026b diff --git a/contrib/tzdata/zone.tab b/contrib/tzdata/zone.tab index 2626b0550341..2ae8a8c439eb 100644 --- a/contrib/tzdata/zone.tab +++ b/contrib/tzdata/zone.tab @@ -124,12 +124,12 @@ CA +5017-10750 America/Swift_Current CST - SK (midwest) CA +5333-11328 America/Edmonton Mountain - AB, BC(E), NT(E), SK(W) CA +690650-1050310 America/Cambridge_Bay Mountain - NU (west) CA +682059-1334300 America/Inuvik Mountain - NT (west) +CA +4916-12307 America/Vancouver MST - BC (most areas) CA +4906-11631 America/Creston MST - BC (Creston) CA +5546-12014 America/Dawson_Creek MST - BC (Dawson Cr, Ft St John) CA +5848-12242 America/Fort_Nelson MST - BC (Ft Nelson) CA +6043-13503 America/Whitehorse MST - Yukon (east) CA +6404-13925 America/Dawson MST - Yukon (west) -CA +4916-12307 America/Vancouver Pacific - BC (most areas) CC -1210+09655 Indian/Cocos CD -0418+01518 Africa/Kinshasa Dem. Rep. of Congo (west) CD -1140+02728 Africa/Lubumbashi Dem. Rep. of Congo (east) diff --git a/contrib/tzdata/zone1970.tab b/contrib/tzdata/zone1970.tab index 92fc36544c75..48b9aa978d53 100644 --- a/contrib/tzdata/zone1970.tab +++ b/contrib/tzdata/zone1970.tab @@ -116,11 +116,11 @@ CA +5017-10750 America/Swift_Current CST - SK (midwest) CA +5333-11328 America/Edmonton Mountain - AB, BC(E), NT(E), SK(W) CA +690650-1050310 America/Cambridge_Bay Mountain - NU (west) CA +682059-1334300 America/Inuvik Mountain - NT (west) +CA +4916-12307 America/Vancouver MST - BC (most areas) CA +5546-12014 America/Dawson_Creek MST - BC (Dawson Cr, Ft St John) CA +5848-12242 America/Fort_Nelson MST - BC (Ft Nelson) CA +6043-13503 America/Whitehorse MST - Yukon (east) CA +6404-13925 America/Dawson MST - Yukon (west) -CA +4916-12307 America/Vancouver Pacific - BC (most areas) CH,DE,LI +4723+00832 Europe/Zurich Büsingen CI,BF,GH,GM,GN,IS,ML,MR,SH,SL,SN,TG +0519-00402 Africa/Abidjan CK -2114-15946 Pacific/Rarotonga diff --git a/contrib/tzdata/zonenow.tab b/contrib/tzdata/zonenow.tab index aa3a64f3d7b9..54e4485d7441 100644 --- a/contrib/tzdata/zonenow.tab +++ b/contrib/tzdata/zonenow.tab @@ -58,6 +58,9 @@ XX -2504-13005 Pacific/Pitcairn Pitcairn # -08/-07 - PST/PDT (North America DST) XX +340308-1181434 America/Los_Angeles Pacific (PST/PDT) - US & Canada; Mexico near US border # +# -08/-07 - PST/PDT (North America DST) until 2026-11-01 02:00; then MST +XX +4916-12307 America/Vancouver MST - BC (most areas) +# # -07 - MST XX +332654-1120424 America/Phoenix Mountain Standard (MST) - Arizona; western Mexico; Yukon # From nobody Sun Apr 26 02:07:53 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g39896BK7z6b8y9 for ; Sun, 26 Apr 2026 02:07:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g39895Fhmz3SbY for ; Sun, 26 Apr 2026 02:07:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777169273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0IiMPSR/ExylVnFKYtwl/b9o08J/pLIiHds7JH5746A=; b=NAhlP2jXA3hb++2wbMXVS+yT9RpDVn+PUWjYrPWfwGLhcOltHjv1L2s9GFzP/OJMfSnyfR FFBojaOIC6PzmvLi5x7qm/lW+ee8DSES1T+w2u7ebIZvO8eo+IxkMkHR1n9cDGJlWC9l6F CL1/zYHOphKSJJY4WI9xHmot7ZBhRiaqYLj22r1OC92aFONLW7xamMfUjSS0NLUgoWp/qX cdfXfV/7mkLFR+DjE3Kojiml0Rt3Xzv7idltC4xFWXGy2VVjRE0Fm8WvSxfv1aqsyfadNZ 3FG3Lj7BWJ/2ELIReghozXUs7KrxusGKi/XyCYlkS7N2bHt9JbzJDckNkxi3wA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777169273; a=rsa-sha256; cv=none; b=UildkQex1/541+AFbezMONRSibmrMNGDdDTM9VffWzrmF0kP+QJ3PB5bmKHdt6j8torIxh Ekrfgs769YqWbIDRkJha8azDTexQSvncWEL6yk9DN/IS7zyRL6zzma9EKzaiCwk9ZnNVwx TCLqncaOZTLc8T0HGlLGf5Jbqh3ucwLo0GCccEBnmRqBbHDPohg8Oa2F6GpZwmPJw6HXno qHvYTMmM9lbWXJMdzE4ShSp4D4Ol61C58pXRzDPZp2IAEw1cjlKpINkYTwhi4RL7lPb47Y R3LQit5uoG/qPJU+yDl3e77OoWaSmvQadj1RZdoNoN/daIwI9vgbIEony975Lg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777169273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0IiMPSR/ExylVnFKYtwl/b9o08J/pLIiHds7JH5746A=; b=HJqJDaqAjmz3cHjzOpcT2+NlueGL6F+voXtBAcIBQlOCY4jMhvc5WQeYGpZjyXVdVBPX8N 3GqZ6JMRI8ar4i+gp9jlRB9AZwTahCp5dhpwoi7owKgoTYvC09v/ZSKrrE3uKb0JRDcwn7 R2gRweFIu3eA+se8Omxr4sHc2IeXkwfU3d+CyYmwd4686r/pPI2K764jA8eY/5EwvgNy07 Ss1BHDBaiyOXt/Czws1MtviohepQkki5+UvkB4W7QN5jESmVIU2zX3741TYqgKHVqoa3in yWelfpbP1E1NnFbyea4jaL4Kbui14qZ2Dhyhvv0mvXHy4ERePzKHQc7DhdcO9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g39894pdCz103G for ; Sun, 26 Apr 2026 02:07:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32213 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 02:07:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: 30eb33424e74 - stable/14 - contrib/tzdata: import tzdata 2026b List-Id: Commits to the stable branches 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: philip X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 30eb33424e74f467346319876e20a83ff71e00cd Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 02:07:53 +0000 Message-Id: <69ed7379.32213.7f2bccbb@gitrepo.freebsd.org> The branch stable/14 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=30eb33424e74f467346319876e20a83ff71e00cd commit 30eb33424e74f467346319876e20a83ff71e00cd Author: Philip Paeps AuthorDate: 2026-04-23 15:44:33 +0000 Commit: Philip Paeps CommitDate: 2026-04-26 02:05:49 +0000 contrib/tzdata: import tzdata 2026b Changes: https://github.com/eggert/tz/blob/2026b/NEWS (cherry picked from commit 9b95cab0a2927dfe07dbe6dc0056a80d5c730414) --- contrib/tzdata/NEWS | 53 +++++++++++++++++++++++++++++++++++------- contrib/tzdata/northamerica | 56 ++++++++++++++++++++++++++++++++++++++++++++- contrib/tzdata/version | 2 +- contrib/tzdata/zone.tab | 2 +- contrib/tzdata/zone1970.tab | 2 +- contrib/tzdata/zonenow.tab | 3 +++ 6 files changed, 106 insertions(+), 12 deletions(-) diff --git a/contrib/tzdata/NEWS b/contrib/tzdata/NEWS index acd22280cb3a..a0042701c687 100644 --- a/contrib/tzdata/NEWS +++ b/contrib/tzdata/NEWS @@ -1,10 +1,47 @@ News for the tz database +Release 2026a - 2026-04-22 23:06:43 -0700 + + Briefly: + British Columbia moved to permanent -07 on 2026-03-09. + Some more overflow bugs have been fixed in zic. + + Changes to future timestamps + + British Columbia’s 2026-03-08 spring forward was its last + foreseeable clock change, as it moved to permanent -07 thereafter. + (Thanks to Arthur David Olson.) Although the change to permanent + -07 legally took place on 2026-03-09, temporarily model the change + to occur on 2026-11-01 at 02:00 instead. This works around a + limitation in CLDR v48.2 (2026-03-17). This temporary hack is + planned to be removed after CLDR is fixed. + + Changes to code + + zic no longer mishandles a last transition to a new time type. + + zic no longer overflows a buffer when generating a TZ string like + "PST-167:59:58PDT-167:59:59,M11.5.6/-167:59:59,M12.5.6/-167:59:59", + which can occur with adversarial input. (Thanks to Naveed Khan.) + + zic no longer generates a longer TZif file than necessary when + an earlier time zone abbreviation is a suffix of a later one. + As a nice side effect, zic no longer overflows a buffer when given + a long series of abbreviations, each a suffix of the next. + (Buffer overflow reported by Arthur Chan.) + + zic no longer overflows an int when processing input like ‘Zone + Ouch 2147483648:00:00 - LMT’. The int overflow can lead to buffer + overflow in adversarial cases. (Thanks to Naveed Khan.) + + zic now checks for signals more often. + + Release 2026a - 2026-03-01 22:59:49 -0800 Briefly: Moldova has used EU transition times since 2022. - The "right" TZif files are no longer installed by default. + The “right” TZif files are no longer installed by default. -DTZ_RUNTIME_LEAPS=0 disables runtime support for leap seconds. TZif files are no longer limited to 50 bytes of abbreviations. zic is no longer limited to 50 leap seconds. @@ -25,23 +62,23 @@ Release 2026a - 2026-03-01 22:59:49 -0800 The Makefile no longer by default installs an alternate set of TZif files for system clocks that count leap seconds. - Install with 'make REDO=posix_right' to get the old default, + Install with ‘make REDO=posix_right’ to get the old default, which is rarely used in major downstream distributions. If your system clock counts leap seconds (contrary to POSIX), - it is better to install with 'make REDO=right_only'. + it is better to install with ‘make REDO=right_only’. This change does not affect the leapseconds file, which is still installed as before. - The Makefile's POSIXRULES option, which was declared obsolete in - release 2019b, has been removed. The Makefile's build procedure + The Makefile’s POSIXRULES option, which was declared obsolete in + release 2019b, has been removed. The Makefile’s build procedure thus no longer optionally installs the obsolete posixrules file. Changes to code Compiling with the new option -DTZ_RUNTIME_LEAPS=0 disables runtime support for leap seconds. Although this conforms to - POSIX, shrinks tzcode's attack surface, and is more efficient, - it fails to support Internet RFC 9636's leap seconds. + POSIX, shrinks tzcode’s attack surface, and is more efficient, + it fails to support Internet RFC 9636’s leap seconds. zic now can generate, and localtime.c can now use, TZif files that hold up to 256 bytes of abbreviations, counting trailing NULs. @@ -51,7 +88,7 @@ Release 2026a - 2026-03-01 22:59:49 -0800 zic -L can now generate TZif files with more than 50 leap seconds. This helps test TZif readers not limited to 50 leap seconds, as - tzcode's localtime.c is; it has little immediate need for + tzcode’s localtime.c is; it has little immediate need for practical timekeeping as there have been only 27 leap seconds and possibly there will be no more, due to planned changes to UTC. zic -v warns if its output exceeds the old 50-second limit. diff --git a/contrib/tzdata/northamerica b/contrib/tzdata/northamerica index 16b79af29b55..3e8641e1c20a 100644 --- a/contrib/tzdata/northamerica +++ b/contrib/tzdata/northamerica @@ -1957,6 +1957,56 @@ Zone America/Edmonton -7:33:52 - LMT 1906 Sep # https://searcharchives.vancouver.ca/daylight-saving-1918-starts-again-july-7-1941-start-d-s-sept-27-end-of-d-s-1941 # We have no further details, so omit them for now. +# From Arthur David Olson (2026-03-02): +# B. C. Gov News: “Adopting permanent daylight saving time: ‘Spring forward’ +# on March 8 will be the last time change, ending twice-yearly clock changes.” +# https://news.gov.bc.ca/releases/2026AG0013-000209 +# +# From Paul Eggert (2026-03-07): +# The law says that 21 hours after the usual 2026-03-08 02:00 switch from +# PST to PDT, the next day inaugurates the new standard time Pacific Time, +# i.e., just one clock change but two name changes separated by 21 hours. +# PT, the obvious abbreviation for Pacific Time, is one letter too short +# to conform to TZDB’s (and POSIX’s) [-+[:alnum:]]{3,6} requirements. +# I asked the BC government for advice, with no response. For now, do this: +# 1. As a temporary hack, pretend that the BC law takes effect +# not on 2026-03-09 at 00:00, but on 2026-11-01 at 02:00. +# This pretense works around a limitation in CLDR v48.2 (2026-03-17), +# which would otherwise say the interval uses “Pacific Standard Time”. +# (Below, this temporary hack is marked “Temporary hack; see above.”) +# Strictly speaking this hack is incorrect since the interval uses +# standard time, but it does have the right UT offset and it +# works around the CLDR limitation. We should be able to remove +# the temporary hack after CLDR is fixed. +# 2. After the BC law takes effect, model the time as MST sans DST. +# We can change this later if another conforming non-numeric abbreviation +# for Pacific Time becomes more popular. Possibilities include: +# MST - the most compatible with existing software and practice, +# and already used in parts of BC and in Yukon +# PDT - almost as software-friendly, but confusing because it implies +# it is DST and is paired with PST, whereas PT is standard time +# PST - straightforward but even more confusing, +# and will likely break much software that assumes PST is -08 +# -07 - accurate and clear in itself, but makes BC look odd vs neighbors +# CPT, CPST - for Canadian Pacific (Standard) Time, +# by analogy with AEST in Australia +# P-T - conforming approximation to “PT” +# PT+ - like P-T but suggesting one-hour advance over PST + +# From Chris Walton (2026-03-15): +# The Regional District of East Kootenay is planning to move to year-round +# Mountain Standard Time (MST) on November 1, 2026.... +# https://www.rdek.bc.ca/news/entry/rdek_board_moves_to_transition_to_year_round_mountain_standard_time +# (2026-03-17): +# The final decision East Kootenay made a few days ago may turn out not to +# be final after all. They are going to reopen the debate next month! +# https://www.cbc.ca/news/canada/british-columbia/what-time-is-it-in-the-east-kootenay-debate-9.7132624 +# From Paul Eggert (2026-03-17): +# Mayor Steve Fairbairn of Elkford asked the question be called a second time, +# saying, “Pardon the pun, but this is not a time-sensitive issue.” +# For now, merely mention the potential change in these comments. +# If it happens it would likely affect clocks starting 2027-03-14 at 02:00. + # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule Vanc 1918 only - Apr 14 2:00 1:00 D Rule Vanc 1918 only - Oct 27 2:00 0 S @@ -1970,7 +2020,11 @@ Rule Vanc 1962 2006 - Oct lastSun 2:00 0 S # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone America/Vancouver -8:12:28 - LMT 1884 -8:00 Vanc P%sT 1987 - -8:00 Canada P%sT + -8:00 Canada P%sT 2026 Mar 9 + # Temporary hack; see above. + -8:00 1:00 PDT 2026 Nov 1 02:00 + # End of temporary hack. + -7:00 - MST Zone America/Dawson_Creek -8:00:56 - LMT 1884 -8:00 Canada P%sT 1947 -8:00 Vanc P%sT 1972 Aug 30 2:00 diff --git a/contrib/tzdata/version b/contrib/tzdata/version index 5d9126009e7f..75d34ee38931 100644 --- a/contrib/tzdata/version +++ b/contrib/tzdata/version @@ -1 +1 @@ -2026a +2026b diff --git a/contrib/tzdata/zone.tab b/contrib/tzdata/zone.tab index 2626b0550341..2ae8a8c439eb 100644 --- a/contrib/tzdata/zone.tab +++ b/contrib/tzdata/zone.tab @@ -124,12 +124,12 @@ CA +5017-10750 America/Swift_Current CST - SK (midwest) CA +5333-11328 America/Edmonton Mountain - AB, BC(E), NT(E), SK(W) CA +690650-1050310 America/Cambridge_Bay Mountain - NU (west) CA +682059-1334300 America/Inuvik Mountain - NT (west) +CA +4916-12307 America/Vancouver MST - BC (most areas) CA +4906-11631 America/Creston MST - BC (Creston) CA +5546-12014 America/Dawson_Creek MST - BC (Dawson Cr, Ft St John) CA +5848-12242 America/Fort_Nelson MST - BC (Ft Nelson) CA +6043-13503 America/Whitehorse MST - Yukon (east) CA +6404-13925 America/Dawson MST - Yukon (west) -CA +4916-12307 America/Vancouver Pacific - BC (most areas) CC -1210+09655 Indian/Cocos CD -0418+01518 Africa/Kinshasa Dem. Rep. of Congo (west) CD -1140+02728 Africa/Lubumbashi Dem. Rep. of Congo (east) diff --git a/contrib/tzdata/zone1970.tab b/contrib/tzdata/zone1970.tab index 92fc36544c75..48b9aa978d53 100644 --- a/contrib/tzdata/zone1970.tab +++ b/contrib/tzdata/zone1970.tab @@ -116,11 +116,11 @@ CA +5017-10750 America/Swift_Current CST - SK (midwest) CA +5333-11328 America/Edmonton Mountain - AB, BC(E), NT(E), SK(W) CA +690650-1050310 America/Cambridge_Bay Mountain - NU (west) CA +682059-1334300 America/Inuvik Mountain - NT (west) +CA +4916-12307 America/Vancouver MST - BC (most areas) CA +5546-12014 America/Dawson_Creek MST - BC (Dawson Cr, Ft St John) CA +5848-12242 America/Fort_Nelson MST - BC (Ft Nelson) CA +6043-13503 America/Whitehorse MST - Yukon (east) CA +6404-13925 America/Dawson MST - Yukon (west) -CA +4916-12307 America/Vancouver Pacific - BC (most areas) CH,DE,LI +4723+00832 Europe/Zurich Büsingen CI,BF,GH,GM,GN,IS,ML,MR,SH,SL,SN,TG +0519-00402 Africa/Abidjan CK -2114-15946 Pacific/Rarotonga diff --git a/contrib/tzdata/zonenow.tab b/contrib/tzdata/zonenow.tab index aa3a64f3d7b9..54e4485d7441 100644 --- a/contrib/tzdata/zonenow.tab +++ b/contrib/tzdata/zonenow.tab @@ -58,6 +58,9 @@ XX -2504-13005 Pacific/Pitcairn Pitcairn # -08/-07 - PST/PDT (North America DST) XX +340308-1181434 America/Los_Angeles Pacific (PST/PDT) - US & Canada; Mexico near US border # +# -08/-07 - PST/PDT (North America DST) until 2026-11-01 02:00; then MST +XX +4916-12307 America/Vancouver MST - BC (most areas) +# # -07 - MST XX +332654-1120424 America/Phoenix Mountain Standard (MST) - Arizona; western Mexico; Yukon # From nobody Sun Apr 26 02:08:52 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g399K1Z9Lz6b9JH for ; Sun, 26 Apr 2026 02:08:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g399J69mdz3Sx5 for ; Sun, 26 Apr 2026 02:08:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777169332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MonyStd2uiESp1fb0IV6PAlTvQ13Cp/o52/22fInmIg=; b=obpxVOQudWWMA0yAcM0G8+xKPPYoCHEY+sMFCBW0eXKpr+VZX3+IphBzkyf0qaFMCI4BOw ZTwffuFdPd9SZpxTvhyOinJzdM1KzqM+r9i9vuUcZrTiqYJKEVh6N9P1lrWyhhnl9TC9es wMZryEpl3kdy96lTv/Bv1oTLuaLQpfxEAKGl6qkOBMfpQe53bFrxKK6mUQW1btRJIRFfS/ fMNbzTcM4Bkd9nMlR7UUTKwq3WYBFxgcvhC23OrVZZVZjoxeFJ+EU/2ZhsGEMIBPG7s2S9 2Mpf7DE0snosJX/L7sA7r3/2meLRzDz1c7RlZ10KsbrTgLhgoURaPC843DFOGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777169332; a=rsa-sha256; cv=none; b=lxNO4jXSDgR7sTqcO+zd1Azsl7nLJfGb/y5VOV2wg+DkS4NtQZAzdbrqYuCq2XYADD2bxp /xZtGFJRqsaNvj/m9FsVqZ1kMMZe56NqCymOjOrt8HZWnsmmsP43R+vgP4FfLyiyrPbxUM JXZ2/KBfMjCYVciAg5a0kXlsShc7wAvFgGhWajd4N1QFR9wUiDoWt70zDulGLdGz+Ti2K9 j8GJbnv1IZMcIffL+PBhMS7ggAYoJtyTpF7NYOyOK7kODNiVBtpP8T2EsTKV6QEUt+bshg ZC2kUz6z7e2QNe9p6uWn7rhOtL+CGk8AObtwHxak7UBSkOs0jkbj5jkJkm1aiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777169332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MonyStd2uiESp1fb0IV6PAlTvQ13Cp/o52/22fInmIg=; b=th/UeJ8N62QEPn8unF+wwX8mcW0bz744Qwmb/7dLTjaheDXyzM6PYc57rgZSF/Pk3HWMoF MYj1LQsi648vF2ouewhFy2SSjAQ5oSXQXAYGcqCsQFwUKAbcBMybwGo+7U/kBp0wtL7rAO FISECfqyDrIHNuU+l1yFBeTt8r3SEn86BLZft4D4f+w82KgE4Ywial+H1Ynr2akr9AHmo5 a75JbPpYVeDIEmAkwjvHDUGie3owPXzvUTxUHBLx0qZBFUMOXY9wbscjZAdWSC64QkmDMg 3BhkOsxQXissdiYlLnbuRzmdU0zWmp6QoGbRTEUoLFlwt/scjLbgASrhs/jE3w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g399J5ldbz10Rm for ; Sun, 26 Apr 2026 02:08:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 301eb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 02:08:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: 18787e4ae2bc - stable/13 - contrib/tzdata: import tzdata 2026b List-Id: Commits to the stable branches 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: philip X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 18787e4ae2bc909637f61856819c317493b6b5a8 Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 02:08:52 +0000 Message-Id: <69ed73b4.301eb.133a8c33@gitrepo.freebsd.org> The branch stable/13 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=18787e4ae2bc909637f61856819c317493b6b5a8 commit 18787e4ae2bc909637f61856819c317493b6b5a8 Author: Philip Paeps AuthorDate: 2026-04-23 15:44:33 +0000 Commit: Philip Paeps CommitDate: 2026-04-26 02:06:49 +0000 contrib/tzdata: import tzdata 2026b Changes: https://github.com/eggert/tz/blob/2026b/NEWS (cherry picked from commit 9b95cab0a2927dfe07dbe6dc0056a80d5c730414) --- contrib/tzdata/NEWS | 53 +++++++++++++++++++++++++++++++++++------- contrib/tzdata/northamerica | 56 ++++++++++++++++++++++++++++++++++++++++++++- contrib/tzdata/version | 2 +- contrib/tzdata/zone.tab | 2 +- contrib/tzdata/zone1970.tab | 2 +- contrib/tzdata/zonenow.tab | 3 +++ 6 files changed, 106 insertions(+), 12 deletions(-) diff --git a/contrib/tzdata/NEWS b/contrib/tzdata/NEWS index acd22280cb3a..a0042701c687 100644 --- a/contrib/tzdata/NEWS +++ b/contrib/tzdata/NEWS @@ -1,10 +1,47 @@ News for the tz database +Release 2026a - 2026-04-22 23:06:43 -0700 + + Briefly: + British Columbia moved to permanent -07 on 2026-03-09. + Some more overflow bugs have been fixed in zic. + + Changes to future timestamps + + British Columbia’s 2026-03-08 spring forward was its last + foreseeable clock change, as it moved to permanent -07 thereafter. + (Thanks to Arthur David Olson.) Although the change to permanent + -07 legally took place on 2026-03-09, temporarily model the change + to occur on 2026-11-01 at 02:00 instead. This works around a + limitation in CLDR v48.2 (2026-03-17). This temporary hack is + planned to be removed after CLDR is fixed. + + Changes to code + + zic no longer mishandles a last transition to a new time type. + + zic no longer overflows a buffer when generating a TZ string like + "PST-167:59:58PDT-167:59:59,M11.5.6/-167:59:59,M12.5.6/-167:59:59", + which can occur with adversarial input. (Thanks to Naveed Khan.) + + zic no longer generates a longer TZif file than necessary when + an earlier time zone abbreviation is a suffix of a later one. + As a nice side effect, zic no longer overflows a buffer when given + a long series of abbreviations, each a suffix of the next. + (Buffer overflow reported by Arthur Chan.) + + zic no longer overflows an int when processing input like ‘Zone + Ouch 2147483648:00:00 - LMT’. The int overflow can lead to buffer + overflow in adversarial cases. (Thanks to Naveed Khan.) + + zic now checks for signals more often. + + Release 2026a - 2026-03-01 22:59:49 -0800 Briefly: Moldova has used EU transition times since 2022. - The "right" TZif files are no longer installed by default. + The “right” TZif files are no longer installed by default. -DTZ_RUNTIME_LEAPS=0 disables runtime support for leap seconds. TZif files are no longer limited to 50 bytes of abbreviations. zic is no longer limited to 50 leap seconds. @@ -25,23 +62,23 @@ Release 2026a - 2026-03-01 22:59:49 -0800 The Makefile no longer by default installs an alternate set of TZif files for system clocks that count leap seconds. - Install with 'make REDO=posix_right' to get the old default, + Install with ‘make REDO=posix_right’ to get the old default, which is rarely used in major downstream distributions. If your system clock counts leap seconds (contrary to POSIX), - it is better to install with 'make REDO=right_only'. + it is better to install with ‘make REDO=right_only’. This change does not affect the leapseconds file, which is still installed as before. - The Makefile's POSIXRULES option, which was declared obsolete in - release 2019b, has been removed. The Makefile's build procedure + The Makefile’s POSIXRULES option, which was declared obsolete in + release 2019b, has been removed. The Makefile’s build procedure thus no longer optionally installs the obsolete posixrules file. Changes to code Compiling with the new option -DTZ_RUNTIME_LEAPS=0 disables runtime support for leap seconds. Although this conforms to - POSIX, shrinks tzcode's attack surface, and is more efficient, - it fails to support Internet RFC 9636's leap seconds. + POSIX, shrinks tzcode’s attack surface, and is more efficient, + it fails to support Internet RFC 9636’s leap seconds. zic now can generate, and localtime.c can now use, TZif files that hold up to 256 bytes of abbreviations, counting trailing NULs. @@ -51,7 +88,7 @@ Release 2026a - 2026-03-01 22:59:49 -0800 zic -L can now generate TZif files with more than 50 leap seconds. This helps test TZif readers not limited to 50 leap seconds, as - tzcode's localtime.c is; it has little immediate need for + tzcode’s localtime.c is; it has little immediate need for practical timekeeping as there have been only 27 leap seconds and possibly there will be no more, due to planned changes to UTC. zic -v warns if its output exceeds the old 50-second limit. diff --git a/contrib/tzdata/northamerica b/contrib/tzdata/northamerica index 16b79af29b55..3e8641e1c20a 100644 --- a/contrib/tzdata/northamerica +++ b/contrib/tzdata/northamerica @@ -1957,6 +1957,56 @@ Zone America/Edmonton -7:33:52 - LMT 1906 Sep # https://searcharchives.vancouver.ca/daylight-saving-1918-starts-again-july-7-1941-start-d-s-sept-27-end-of-d-s-1941 # We have no further details, so omit them for now. +# From Arthur David Olson (2026-03-02): +# B. C. Gov News: “Adopting permanent daylight saving time: ‘Spring forward’ +# on March 8 will be the last time change, ending twice-yearly clock changes.” +# https://news.gov.bc.ca/releases/2026AG0013-000209 +# +# From Paul Eggert (2026-03-07): +# The law says that 21 hours after the usual 2026-03-08 02:00 switch from +# PST to PDT, the next day inaugurates the new standard time Pacific Time, +# i.e., just one clock change but two name changes separated by 21 hours. +# PT, the obvious abbreviation for Pacific Time, is one letter too short +# to conform to TZDB’s (and POSIX’s) [-+[:alnum:]]{3,6} requirements. +# I asked the BC government for advice, with no response. For now, do this: +# 1. As a temporary hack, pretend that the BC law takes effect +# not on 2026-03-09 at 00:00, but on 2026-11-01 at 02:00. +# This pretense works around a limitation in CLDR v48.2 (2026-03-17), +# which would otherwise say the interval uses “Pacific Standard Time”. +# (Below, this temporary hack is marked “Temporary hack; see above.”) +# Strictly speaking this hack is incorrect since the interval uses +# standard time, but it does have the right UT offset and it +# works around the CLDR limitation. We should be able to remove +# the temporary hack after CLDR is fixed. +# 2. After the BC law takes effect, model the time as MST sans DST. +# We can change this later if another conforming non-numeric abbreviation +# for Pacific Time becomes more popular. Possibilities include: +# MST - the most compatible with existing software and practice, +# and already used in parts of BC and in Yukon +# PDT - almost as software-friendly, but confusing because it implies +# it is DST and is paired with PST, whereas PT is standard time +# PST - straightforward but even more confusing, +# and will likely break much software that assumes PST is -08 +# -07 - accurate and clear in itself, but makes BC look odd vs neighbors +# CPT, CPST - for Canadian Pacific (Standard) Time, +# by analogy with AEST in Australia +# P-T - conforming approximation to “PT” +# PT+ - like P-T but suggesting one-hour advance over PST + +# From Chris Walton (2026-03-15): +# The Regional District of East Kootenay is planning to move to year-round +# Mountain Standard Time (MST) on November 1, 2026.... +# https://www.rdek.bc.ca/news/entry/rdek_board_moves_to_transition_to_year_round_mountain_standard_time +# (2026-03-17): +# The final decision East Kootenay made a few days ago may turn out not to +# be final after all. They are going to reopen the debate next month! +# https://www.cbc.ca/news/canada/british-columbia/what-time-is-it-in-the-east-kootenay-debate-9.7132624 +# From Paul Eggert (2026-03-17): +# Mayor Steve Fairbairn of Elkford asked the question be called a second time, +# saying, “Pardon the pun, but this is not a time-sensitive issue.” +# For now, merely mention the potential change in these comments. +# If it happens it would likely affect clocks starting 2027-03-14 at 02:00. + # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule Vanc 1918 only - Apr 14 2:00 1:00 D Rule Vanc 1918 only - Oct 27 2:00 0 S @@ -1970,7 +2020,11 @@ Rule Vanc 1962 2006 - Oct lastSun 2:00 0 S # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone America/Vancouver -8:12:28 - LMT 1884 -8:00 Vanc P%sT 1987 - -8:00 Canada P%sT + -8:00 Canada P%sT 2026 Mar 9 + # Temporary hack; see above. + -8:00 1:00 PDT 2026 Nov 1 02:00 + # End of temporary hack. + -7:00 - MST Zone America/Dawson_Creek -8:00:56 - LMT 1884 -8:00 Canada P%sT 1947 -8:00 Vanc P%sT 1972 Aug 30 2:00 diff --git a/contrib/tzdata/version b/contrib/tzdata/version index 5d9126009e7f..75d34ee38931 100644 --- a/contrib/tzdata/version +++ b/contrib/tzdata/version @@ -1 +1 @@ -2026a +2026b diff --git a/contrib/tzdata/zone.tab b/contrib/tzdata/zone.tab index 2626b0550341..2ae8a8c439eb 100644 --- a/contrib/tzdata/zone.tab +++ b/contrib/tzdata/zone.tab @@ -124,12 +124,12 @@ CA +5017-10750 America/Swift_Current CST - SK (midwest) CA +5333-11328 America/Edmonton Mountain - AB, BC(E), NT(E), SK(W) CA +690650-1050310 America/Cambridge_Bay Mountain - NU (west) CA +682059-1334300 America/Inuvik Mountain - NT (west) +CA +4916-12307 America/Vancouver MST - BC (most areas) CA +4906-11631 America/Creston MST - BC (Creston) CA +5546-12014 America/Dawson_Creek MST - BC (Dawson Cr, Ft St John) CA +5848-12242 America/Fort_Nelson MST - BC (Ft Nelson) CA +6043-13503 America/Whitehorse MST - Yukon (east) CA +6404-13925 America/Dawson MST - Yukon (west) -CA +4916-12307 America/Vancouver Pacific - BC (most areas) CC -1210+09655 Indian/Cocos CD -0418+01518 Africa/Kinshasa Dem. Rep. of Congo (west) CD -1140+02728 Africa/Lubumbashi Dem. Rep. of Congo (east) diff --git a/contrib/tzdata/zone1970.tab b/contrib/tzdata/zone1970.tab index 92fc36544c75..48b9aa978d53 100644 --- a/contrib/tzdata/zone1970.tab +++ b/contrib/tzdata/zone1970.tab @@ -116,11 +116,11 @@ CA +5017-10750 America/Swift_Current CST - SK (midwest) CA +5333-11328 America/Edmonton Mountain - AB, BC(E), NT(E), SK(W) CA +690650-1050310 America/Cambridge_Bay Mountain - NU (west) CA +682059-1334300 America/Inuvik Mountain - NT (west) +CA +4916-12307 America/Vancouver MST - BC (most areas) CA +5546-12014 America/Dawson_Creek MST - BC (Dawson Cr, Ft St John) CA +5848-12242 America/Fort_Nelson MST - BC (Ft Nelson) CA +6043-13503 America/Whitehorse MST - Yukon (east) CA +6404-13925 America/Dawson MST - Yukon (west) -CA +4916-12307 America/Vancouver Pacific - BC (most areas) CH,DE,LI +4723+00832 Europe/Zurich Büsingen CI,BF,GH,GM,GN,IS,ML,MR,SH,SL,SN,TG +0519-00402 Africa/Abidjan CK -2114-15946 Pacific/Rarotonga diff --git a/contrib/tzdata/zonenow.tab b/contrib/tzdata/zonenow.tab index aa3a64f3d7b9..54e4485d7441 100644 --- a/contrib/tzdata/zonenow.tab +++ b/contrib/tzdata/zonenow.tab @@ -58,6 +58,9 @@ XX -2504-13005 Pacific/Pitcairn Pitcairn # -08/-07 - PST/PDT (North America DST) XX +340308-1181434 America/Los_Angeles Pacific (PST/PDT) - US & Canada; Mexico near US border # +# -08/-07 - PST/PDT (North America DST) until 2026-11-01 02:00; then MST +XX +4916-12307 America/Vancouver MST - BC (most areas) +# # -07 - MST XX +332654-1120424 America/Phoenix Mountain Standard (MST) - Arizona; western Mexico; Yukon # From nobody Sun Apr 26 07:45:07 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3JdN2Yh0z6bBK9 for ; Sun, 26 Apr 2026 07:45:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3JdN1yXCz40ML for ; Sun, 26 Apr 2026 07:45:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777189512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ha73fl7Yfjo6e4W0ceBIz0yLTjjQMqw3q0RRdoC5B9A=; b=LfZgaXgKkqJCQHZgORESoUOFMX1dkBL5FHDEivjcTVwKxfpolopc/K+GFuk4Nc8zeugdxQ TpGLCE8or2hoG6pruhENevXpUaSQ3YG60A4bQKgQPeU6HVmcOUE50gdY+zSsS9l0i5Vm8C PUtIMnnLQph58C3tR504HNSV6SsOJY/E6dfPKCNiwd9zeHRWroZcvzEKINmyEt+HQFJVOT h+RHP86PfwXQzxpqp1oAuepv0V+LSw9ncnOrVMALFNpAuZXjfkgbE08R7CVQnwxp7xgzwh 6fupWEL1u5rouEp1oXNZVyTnJjo7WQZT8+v2wwbfd/bdmt5MKdZxy1Phvi/TOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777189512; a=rsa-sha256; cv=none; b=XFgUbD52X9WnFhjFUy4ma4J8oIyiPzeTmu8lM3+a1ad5b6suqHGe6XZGXbN5Y0jegrQM8T vNmUVPyIPbASGC7bYmpnyTpc+YY3UU1clF2AV1hodRH+VFiXlPdefP9+nxJR8nkwOMuHyO VDsNA598HHP429A3UdYGfW5LfROw/tHl7trar8WsB7YJxnNT7xuGzIKS/k7J85g3+Oi5dX dGNLcHOWIdKw0v4UJqkL5M3IT4z0RMxKW92JqOHdjEXJbUuOnExPvMF/nHsL3iLWmgyfKJ NbMaSAGSDkCtebDqZ6bfwYiDi01/G3/xmdmxgmGd6evvocpgvyLarJVJ/aMyVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777189512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ha73fl7Yfjo6e4W0ceBIz0yLTjjQMqw3q0RRdoC5B9A=; b=vxIqClc5YH2yG42D8UvLe2eHHfNW7mqoRHSG5QviUzsL9ttYjJA36PiqsZ5p9T6DJUq0H2 RkAlyGKbP2a5rxPQxlqu8fUBM0njXTfxJViC+kTuopAhZTsnpWauEW/oRHxOnGtMtbHOpL 1KrBJiUpXjEgxyY9oYkativ+qzLOmn0ISlNtKbBFIRCOACCIfHIxtNJzikf3yZPMhlpZkj ajOLo6Xi0DxBjbu4x+WPrHNmOothsr8RfXTeWIPGiZmB1YwEMmStoUCkCzybpA8GbUzENY +9lP8487GmH528xqrxHnIskL188Pc53ogvYDhwEYWOo8JudyOj9Kenl4CYovxg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3JdN1SK8z19Qw for ; Sun, 26 Apr 2026 07:45:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 253d2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 07:45:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Timo =?utf-8?Q?V=C3=B6lker?= From: Michael Tuexen Subject: git: bba71b3f7c15 - stable/15 - ip: improve deferred computation of checksums List-Id: Commits to the stable branches 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: bba71b3f7c1561fd40d279001536540f43c707c4 Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 07:45:07 +0000 Message-Id: <69edc283.253d2.757126ff@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=bba71b3f7c1561fd40d279001536540f43c707c4 commit bba71b3f7c1561fd40d279001536540f43c707c4 Author: Timo Völker AuthorDate: 2026-01-20 10:30:19 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 07:42:55 +0000 ip: improve deferred computation of checksums This patch adds the same functionality for the IPv4 header checksum as was done erlier for the SCTP/TCP/UDP transport checksum. When the IP implementation sends a packet, it does not compute the corresponding checksum but defers that. It will determine whether the network interface selected for the packet has the requested capability and computes the checksum in software, if the selected network interface does not have the requested capability. Do this not only for packets being sent by the local IP stack, but also when forwarding packets. Furthermore, when such packets are delivered to a local IP stack, do not compute or validate the checksum, since such packets have never been on the wire. This allows to support checksum offloading also in the case of local virtual machines or jails. Support for epair interfaces will be added in a separate commit. Reviewed by: pouria, tuexen Differential Revision: https://reviews.freebsd.org/D54455 Event: Wiesbaden Hackathon 2026 (cherry picked from commit 6f15ba8004c3fdc2fb12f0cd6618d1b3a40aab7d) --- share/man/man9/mbuf.9 | 5 +++-- sys/netinet/ip_fastfwd.c | 32 +++++++++++++++++++++++--------- sys/netinet/ip_input.c | 6 ++++++ 3 files changed, 32 insertions(+), 11 deletions(-) diff --git a/share/man/man9/mbuf.9 b/share/man/man9/mbuf.9 index e4f30962ccab..265a6dddda98 100644 --- a/share/man/man9/mbuf.9 +++ b/share/man/man9/mbuf.9 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 1, 2025 +.Dd January 20, 2026 .Dt MBUF 9 .Os .\" @@ -1216,13 +1216,14 @@ in is not set, since SCTP does not use a pseudo header checksum. .Pp If IP delivers a packet with the flags +.Dv CSUM_IP , .Dv CSUM_SCTP , .Dv CSUM_TCP , or .Dv CSUM_UDP set in .Va csum_flags -to a local SCTP, TCP, or UDP stack, the packet will be processed without +to a local IP, SCTP, TCP, or UDP stack, the packet will be processed without computing or validating the checksum, since the packet has not been on the wire. This can happen if the packet was handled by a virtual interface such as diff --git a/sys/netinet/ip_fastfwd.c b/sys/netinet/ip_fastfwd.c index c567d28f24f0..ecba083dbb77 100644 --- a/sys/netinet/ip_fastfwd.c +++ b/sys/netinet/ip_fastfwd.c @@ -360,15 +360,20 @@ passin: } /* - * Decrement the TTL and incrementally change the IP header checksum. - * Don't bother doing this with hw checksum offloading, it's faster - * doing it right here. + * Decrement the TTL. + * If the IP header checksum field contains a valid value, incrementally + * change this value. Don't use hw checksum offloading, which would + * recompute the checksum. It's faster to just change it here + * according to the decremented TTL. + * If the checksum still needs to be computed, don't touch it. */ ip->ip_ttl -= IPTTLDEC; - if (ip->ip_sum >= (u_int16_t) ~htons(IPTTLDEC << 8)) - ip->ip_sum -= ~htons(IPTTLDEC << 8); - else - ip->ip_sum += htons(IPTTLDEC << 8); + if (__predict_true((m->m_pkthdr.csum_flags & CSUM_IP) == 0)) { + if (ip->ip_sum >= (u_int16_t) ~htons(IPTTLDEC << 8)) + ip->ip_sum -= ~htons(IPTTLDEC << 8); + else + ip->ip_sum += htons(IPTTLDEC << 8); + } #ifdef IPSTEALTH } #endif @@ -466,9 +471,18 @@ passout: gw = (const struct sockaddr *)dst; /* - * If TCP/UDP header still needs a valid checksum and interface will not - * calculate it for us, do it here. + * If the IP/SCTP/TCP/UDP header still needs a valid checksum and the + * interface will not calculate it for us, do it here. + * Note that if we defer checksum calculation, we might send an ICMP + * message later that reflects this packet, which still has an + * invalid checksum. */ + if (__predict_false(m->m_pkthdr.csum_flags & CSUM_IP & + ~nh->nh_ifp->if_hwassist)) { + ip->ip_sum = 0; + ip->ip_sum = in_cksum(m, (ip->ip_hl << 2)); + m->m_pkthdr.csum_flags &= ~CSUM_IP; + } if (__predict_false(m->m_pkthdr.csum_flags & CSUM_DELAY_DATA & ~nh->nh_ifp->if_hwassist)) { in_delayed_cksum(m); diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 652aa4a99e79..cc7b35f5d168 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -525,6 +525,12 @@ ip_input(struct mbuf *m) if (m->m_pkthdr.csum_flags & CSUM_IP_CHECKED) { sum = !(m->m_pkthdr.csum_flags & CSUM_IP_VALID); + } else if (m->m_pkthdr.csum_flags & CSUM_IP) { + /* + * Packet from local host that offloaded checksum computation. + * Checksum not required since the packet wasn't on the wire. + */ + sum = 0; } else { if (hlen == sizeof(struct ip)) { sum = in_cksum_hdr(ip); From nobody Sun Apr 26 07:46:33 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3Jfx5DPDz6bBGj for ; Sun, 26 Apr 2026 07:46:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3Jfx4Xdsz40LN for ; Sun, 26 Apr 2026 07:46:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777189593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VQrHjOSAPNz4i6vGxbNiiKhBW2WKrX+6Jq3PmYgm3v4=; b=bf6APQz0mv8xjzmep60V4AzVEiWm6gvEU8JVxdLbqpKXE0o71MMkzyPaatnDRj6c1oIfna 3ePZq3BJxJVtzh/CsmgJ+z4RgwMbipFvOhFXZLYLLrVdDVGpw8bw+bk8mMAXX5haiWAn5B iAc0A174ioJT7o3N+Y1RcoOSpWpCaoMaATAOdhMwwcyr/mQzU46sJ/jXU+Z+6HB2lvm3q6 9HyoaFi6p4ePj0ObB/ok0d3YrKt9u+5Shjw3Jk3sKB5V8BzKLJxhssxcoXVC3C2aCKFV7b kQFPD9HtQyIn5gR+uoUX8qKr7mGCKBE0HQ81xbNQdWmXWH+BWJ/lxZT9WAZb5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777189593; a=rsa-sha256; cv=none; b=DMFP00oQYxlGPX+H6q8Tf81oXgSXYM+ASokDbTmUWStVRcljAGBlu5XtUV9bdDqmMY7skR xjU6LG8MzJD/Cnqm8xTnZGbAe1trfo5sU/nO7r+QJd+1dLiDFyRNXMGvOk0+deBPo5DIC+ UWB0q9Xj7glleX8gbHLT2zlJoYBcCQPEJq6G7aPx0yHo+t3Pkr7ORU5U/SuEw/VsorMy7t dSpr1UGt8poIY8GJdY3WOzoeCJcG4EQlCmYF0TAnFZiqNvWE/lnMpDt5KygUgJXIM+tniA l8D3ehek4gbDqvHeZ6+3KlSXHezat5OArVQj1sNX9EK8d+1eHvJsjUkIPcmiYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777189593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VQrHjOSAPNz4i6vGxbNiiKhBW2WKrX+6Jq3PmYgm3v4=; b=n2DGiVgRpPVXyC7k+MVjD24o7iDVicIuenuroMB4ott/tRrZmJjh0XEAlSpz8zNGqToQR4 1Js/flkalEQYSi1uQjBJqVnTQwJ1ZbEk+/HsLiEyancLwqtUMJAJ6ig5IlLJDYeNK5ENAl K5SQTN7FHJvZVDIhf57iZRTKZO/bmdMf32atllad+OWu3Fxzq0CxYgvQtRVBgvzUScseIS OxbJUvdG/3Q6GPGQihk72++IKwEdvSJGHsRw4V5vQf+jSmzFiut7donst3BzW1w+HZGhDQ vVnsBKzKFcfH3vItxuwQfvAWytDawwxRw4dANW4uDmvNwYL8qau2qYK5cS36Fg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3Jfx3tN0z1994 for ; Sun, 26 Apr 2026 07:46:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 254cb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 07:46:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Timo =?utf-8?Q?V=C3=B6lker?= From: Michael Tuexen Subject: git: b10d8b3b9134 - stable/15 - epair: add VLAN_HWTAGGING List-Id: Commits to the stable branches 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: b10d8b3b9134b97ebf0deb53cff790d9e5e9e3ed Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 07:46:33 +0000 Message-Id: <69edc2d9.254cb.59c44a85@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=b10d8b3b9134b97ebf0deb53cff790d9e5e9e3ed commit b10d8b3b9134b97ebf0deb53cff790d9e5e9e3ed Author: Timo Völker AuthorDate: 2026-01-30 10:54:33 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 07:45:05 +0000 epair: add VLAN_HWTAGGING Add capability VLAN_HWTAGGING to the epair interface and enable it by default. When sending a packet over a VLAN interface that uses an epair interface, the flag M_VLANTAG and the ether_vtag (which contains the VLAN ID and/or PCP) are set in the mbuf to inform the hardware that the VLAN header has to be added. The sending epair end does not need to actually add a VLAN header. It can just pass the mbuf with this setting to the other epair end, which receives the packet. The receiving epair end can just pass the mbuf with this setting to the upper layer. Due to this setting, the upper layer believes that there was a VLAN header that has been removed by the interface. If the packet later leaves the host, the outgoing physical interface can add the VLAN header in hardware if it supports VLAN_HWTAGGING. If not, the implementation of Ethernet or bridge adds the VLAN header in software. Reviewed by: zlei, tuexen Differential Revision: https://reviews.freebsd.org/D52465 Event: Wiesbaden Hackathon 2026 (cherry picked from commit 574d46b25ab6f42ad97017bb8b72520e9539e36f) --- share/man/man4/epair.4 | 20 +++++++++++++++++++- sys/net/if_epair.c | 28 ++++++++++++++++------------ 2 files changed, 35 insertions(+), 13 deletions(-) diff --git a/share/man/man4/epair.4 b/share/man/man4/epair.4 index b406c423361b..ba42106d45f8 100644 --- a/share/man/man4/epair.4 +++ b/share/man/man4/epair.4 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 4, 2025 +.Dd January 30, 2026 .Dt EPAIR 4 .Os .Sh NAME @@ -113,6 +113,7 @@ The .Nm has RXCSUM and RXCSUM6 enabled because it may receive a packet where the checksum has already been validated by a physical interface. +.Pp The .Nm supports TXCSUM and TXCSUM6 for TCP and UDP, but only by forwarding the order @@ -131,6 +132,23 @@ enables/disables it on the other end). In case one end is in a bridge and the bridge disabled TXCSUM or TXCSUM6, this avoids a sender to send packets with checksum offloading into the bridge by using the other end. +.Pp +The +.Nm +supports VLAN_HWTAGGING without actually adding a VLAN tag. +The sending +.Nm +end just forwards the offloading information to the other end. +The receiving +.Nm +end leaves the offloading information set to pretend that there was a VLAN tag +in the Ethernet header, which has been removed already. +To avoid a situation where the receiving +.Nm +end has VLAN_HWTAGGING disabled, this capability is synchronized between the +.Nm +interface pair (i.e., enabling/disabling the capability on one end +enables/disables it on the other end). .Sh SEE ALSO .Xr ioctl 2 , .Xr altq 4 , diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c index fbffa8f359a0..60849ca1d4f2 100644 --- a/sys/net/if_epair.c +++ b/sys/net/if_epair.c @@ -150,10 +150,6 @@ epair_clear_mbuf(struct mbuf *m) m->m_pkthdr.csum_flags &= ~CSUM_SND_TAG; } - /* Clear vlan information. */ - m->m_flags &= ~M_VLANTAG; - m->m_pkthdr.ether_vtag = 0; - m_tag_delete_nonpersistent(m); } @@ -493,6 +489,7 @@ epair_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifp->if_capenable = ifr->ifr_reqcap | IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6; epair_caps_changed(ifp); + VLAN_CAPABILITIES(ifp); /* * If IFCAP_TXCSUM(_IPV6) has been changed, change it on the * other epair interface as well. @@ -501,17 +498,23 @@ epair_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) * In that case this capability needs to be disabled on the * other epair interface to avoid sending packets in the bridge * that rely on this capability. + * Do the same for IFCAP_VLAN_HWTAGGING. If the sending epair + * end has this capability enabled, the other end has to have + * it enabled too. Otherwise, epair would have to add the VLAN + * tag in the Ethernet header. */ sc = ifp->if_softc; if ((ifp->if_capenable ^ sc->oifp->if_capenable) & - (IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6)) { + (IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6 | IFCAP_VLAN_HWTAGGING)) { sc->oifp->if_capenable &= - ~(IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6); + ~(IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6 | + IFCAP_VLAN_HWTAGGING); sc->oifp->if_capenable |= ifp->if_capenable & - (IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6); + (IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6 | + IFCAP_VLAN_HWTAGGING); epair_caps_changed(sc->oifp); + VLAN_CAPABILITIES(sc->oifp); } - VLAN_CAPABILITIES(ifp); error = 0; break; @@ -626,10 +629,11 @@ epair_setup_ifp(struct epair_softc *sc, char *name, int unit) ifp->if_dname = epairname; ifp->if_dunit = unit; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; - ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_TXCSUM | - IFCAP_TXCSUM_IPV6 | IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6; - ifp->if_capenable = IFCAP_VLAN_MTU | IFCAP_TXCSUM | - IFCAP_TXCSUM_IPV6 | IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6; + ifp->if_capabilities = + IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING | + IFCAP_TXCSUM | IFCAP_RXCSUM | + IFCAP_TXCSUM_IPV6 | IFCAP_RXCSUM_IPV6; + ifp->if_capenable = ifp->if_capabilities; epair_caps_changed(ifp); ifp->if_transmit = epair_transmit; ifp->if_qflush = epair_qflush; From nobody Sun Apr 26 07:47:56 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3JhY07wbz6bBNb for ; Sun, 26 Apr 2026 07:47:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3JhX5h63z40k6 for ; Sun, 26 Apr 2026 07:47:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777189676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y2Q88yc05p8DBb4V78qVZcxFDlDE4WBQEqaO6t4qB0Y=; b=e6L2oJy22NxMHulqJ47qPB46mRCMhbwYpa6o0knKWZ8ofadHeG3T/DSHbQqk1t9ijlj3L2 x/d9someiTiNhS+dvw7p95v3T+7EU59vA88/imH3E1MlkPGd8vray42oz3Rx1fjcciwR/a 2Q7zJV0MlpM4WjrLcm21JeUrR3S9GgbPRr4OhJIK98S3ITOeJfAaUani0HpPJ3i99RvLI5 lO+bNiaYiBC/CcozIr/wzwy6RSPDXBOUgfeI1jo2id4CzNldEo08FwfJrS+ll8E6k6Y6Jx wCAfryHFM2jtQTtqzuYwD05kVk3tqnL7B9gJHOazI7cEvSEZQQIub71ajrYOXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777189676; a=rsa-sha256; cv=none; b=jDXHf8H/0Di+YgnKs/z08SednFVm30fUHLmM+WoDs0kiZAfkpIUg+TyRq8AUs7HWmMxYD5 K3U5eg/rNnRQK8NnDyK2DCgRWYZenUALYhPlkL2xiFdNXnrtUJyvgBidzyCC2p/yzlsUqs qarG2unWK2od0uaYFIRVkmM4RnFIlhFBKfkFQJSfpn2HKmI9zF1PMa5B+5UrU0gAm13z3l YKdjD4t31CxNBf3yY4NWsVFp0eyigUQqOutRx1/gA3a0cP660sjK2qSzwhM+ZpNnBwroOs EZC5RInoT/rTveDFfBIRyVleMXf2QRh86s/gai56qxiZReMUDiE0m6T4nTFatQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777189676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y2Q88yc05p8DBb4V78qVZcxFDlDE4WBQEqaO6t4qB0Y=; b=PcmlnMGFdV/XeMro0YbQy0+aEDCBCGuM8naykgSFx2c4hpEPq+9V/37/1lAcvFYZ7uQALW JQULONIRdIB8/gQht+Lat2/VFPGgnPHhJvtzGpyYO2Tx2/DcbuElwvIdtAKbUXoNbFcIuS kdqQXuqEYHMWRWR85F6Yv9wOuEqZfLiLGnoyw3VbEZViEZUK5B0QXAQ5vD3rras+M9Bcxa WXRaIw/HcRbiCnEWmP07NCoYTWoIojdcnKHj+CF5UIEvQ2CmZqWI+qfZO2l28ZtwdKcESb dmXhsBBhiLyl6QiBTbCH2wt0a4TFt2kTeJ4dAB0vDKQRG+1FxD9BqeNEBViLyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3JhX50Fqz19k0 for ; Sun, 26 Apr 2026 07:47:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2626c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 07:47:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 86970ddcc829 - stable/15 - ure: improve checksum offloading List-Id: Commits to the stable branches 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: 86970ddcc829dfc5b00349a4f6c80616bfe1537f Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 07:47:56 +0000 Message-Id: <69edc32c.2626c.1887e826@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=86970ddcc829dfc5b00349a4f6c80616bfe1537f commit 86970ddcc829dfc5b00349a4f6c80616bfe1537f Author: Michael Tuexen AuthorDate: 2026-01-31 10:42:10 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 07:46:25 +0000 ure: improve checksum offloading This patch fixes three issues: (1) Initially, set the hwassist flags correctly when enabling transmit checksum offload for TCP/IPv6 and UDP/IPv6. (2) Keep the hwassist flags in sync with the capabilities when changing txcsum. (3) Keep the hwasssit flags in sync with the capabilities when changing txcsum6. Without this patch, transmit checksum offloading for TCP/IPv6 and UDP/IPv6 is never used and transmit checksum offloading for IPv4, TCP/IPv4 and UDP/IPv4 is always used, even if disabled via ifconfig ue? -txcsum. Reviewed by: Timo Völker Differential Revision: https://reviews.freebsd.org/D54974 Event: Wiesbaden Hackathon 2026 (cherry picked from commit 7b6e84c9ac5668134ab2d075019ef0b827d90c84) --- sys/dev/usb/net/if_ure.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/usb/net/if_ure.c b/sys/dev/usb/net/if_ure.c index c3f7b622d687..3dea88eb10f1 100644 --- a/sys/dev/usb/net/if_ure.c +++ b/sys/dev/usb/net/if_ure.c @@ -1015,6 +1015,7 @@ ure_attach_post_sub(struct usb_ether *ue) if_sethwassist(ifp, CSUM_IP|CSUM_IP_UDP|CSUM_IP_TCP); #ifdef INET6 if_setcapabilitiesbit(ifp, IFCAP_HWCSUM_IPV6, 0); + if_sethwassistbits(ifp, CSUM_IP6_UDP|CSUM_IP6_TCP, 0); #endif if_setcapenable(ifp, if_getcapabilities(ifp)); @@ -1463,6 +1464,7 @@ ure_ioctl(if_t ifp, u_long cmd, caddr_t data) if ((mask & IFCAP_TXCSUM) != 0 && (if_getcapabilities(ifp) & IFCAP_TXCSUM) != 0) { if_togglecapenable(ifp, IFCAP_TXCSUM); + if_togglehwassist(ifp, CSUM_IP|CSUM_IP_UDP|CSUM_IP_TCP); } if ((mask & IFCAP_RXCSUM) != 0 && (if_getcapabilities(ifp) & IFCAP_RXCSUM) != 0) { @@ -1471,6 +1473,7 @@ ure_ioctl(if_t ifp, u_long cmd, caddr_t data) if ((mask & IFCAP_TXCSUM_IPV6) != 0 && (if_getcapabilities(ifp) & IFCAP_TXCSUM_IPV6) != 0) { if_togglecapenable(ifp, IFCAP_TXCSUM_IPV6); + if_togglehwassist(ifp, CSUM_IP6_UDP|CSUM_IP6_TCP); } if ((mask & IFCAP_RXCSUM_IPV6) != 0 && (if_getcapabilities(ifp) & IFCAP_RXCSUM_IPV6) != 0) { From nobody Sun Apr 26 07:48:57 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3Jjk00gKz6bBFy for ; Sun, 26 Apr 2026 07:48:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3Jjj66yKz41Fh for ; Sun, 26 Apr 2026 07:48:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777189737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F8cK+w9rFaP+Sibvg4Wc22vmCqQ6XIPqpFqQSV4ghIE=; b=ewKQWGBS02xMzQvbLBbd06IkqNlmUqg/B51r0Y0/KpfEBRKDvx901B4XOlkRJ40nFfZ/1S zeZ92GDpq8pPiebfnJT9U/DZmWokA9T1GiuOZmNQjWO+SZ7vfmsykk7ofU0/eOl0c2l6Fv SjRlcV1qCulx3qE1KcPtMSjqePpE0dXS4oW/aJOOl8GD4v/VCjczwj/d74fPql0Zu4HzPP XtwskqUIiUjtzM11FSYqp5ndHv0xbh+Y7nBSow+wFFPK3O0NsCz2gBrMu0dU9XmcXSYwME CKF6jJY7AwfohOKtpwdju7d1L4kpQGxnxDZ5MR04asarGSrSMbFY0dZ/eYyhrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777189737; a=rsa-sha256; cv=none; b=XQVSfeD9cxCA+sdGtcbfwJXGvQnOeaNpg6UjQNpEc1U3x86U+tfqh+LfNeMO/qv/hNRCT+ cnmd4a2qDBGf5KKCyY34Sy/wTa5iyqdWN1U9DFLUV0c/M117tENVJz+qN3x9OA9hoBQGN/ gydP0uOt5KG+az0hLf6gcOoDqA8SxgY8KHnYvTy3aJ4qQh97CphIkhK0O5icKSPbVtztcN qyvbwdAcbWlnEXCTKSRrjD21apCJ/eWq/jXpq6cudE8JGPSP7DFR7acQ2TilFGwkV9d1E8 0jh7T+FAdWmMq4bX7b4Q0tAxoCvvDthC938+F6MuXw6NdcYdEpVe3bD77x5nXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777189737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F8cK+w9rFaP+Sibvg4Wc22vmCqQ6XIPqpFqQSV4ghIE=; b=ThS75HpM59bV64IktlcsqZy2zKjVzFH5F/KleNyO5EPh+kGT8UIWz8Cv7gZ/KhA841nDzY 6Mtsvt/wfhg+FLdOkze1eeIW1y7nYwcuQMZX5oC3i2KsV6Y9pIjvPWv2ORSEOscw0XwD79 ruKDDZHjfOqy4vRdGNdh+NhGYawlNTi1PZtPKKpP6wg85nGxYHkbWYiD5krkbp2+zQ8/Pu IXzI/ZfCvyqW+ZQwMk5GI04RvtEBAn0WmA0FgYCrS9pRM8REF/N0C2VBJZlj9Tj8gosvja TzqyWnM3Rl+wAgObr49JtN7ai5RtMoPrAc+thtCsRcfbh0whNSMnb71t2LJPsg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3Jjj5YYDz19T8 for ; Sun, 26 Apr 2026 07:48:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25548 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 07:48:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 19fb4df14257 - stable/15 - sctp: fix socket type created by sctp_peeloff() List-Id: Commits to the stable branches 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: 19fb4df1425706119b78769031def4bf6f131340 Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 07:48:57 +0000 Message-Id: <69edc369.25548.62a18c66@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=19fb4df1425706119b78769031def4bf6f131340 commit 19fb4df1425706119b78769031def4bf6f131340 Author: Michael Tuexen AuthorDate: 2026-01-31 18:11:08 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 07:47:26 +0000 sctp: fix socket type created by sctp_peeloff() When calling sctp_peeloff() on a SOCK_SEQPACKET socket, the created and returned socket has the type SOCK_STREAM. This is specified in section 9.2 of RFC 6458. Reported by: Xin Long MFC after: 3 days Event: Wiesbaden Hackathon 2026 (cherry picked from commit d195b3783fa4de5c1a95f6d95eb9444abce6778b) --- sys/kern/uipc_socket.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index b7e4646fea68..91a3717b876f 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1303,7 +1303,7 @@ solisten_enqueue(struct socket *so, int connstatus) #if defined(SCTP) || defined(SCTP_SUPPORT) /* - * Socket part of sctp_peeloff(). Detach a new socket from an + * Socket part of sctp_peeloff(). Create a new socket for an * association. The new socket is returned with a reference. * * XXXGL: reduce copy-paste with solisten_clone(). @@ -1315,6 +1315,8 @@ sopeeloff(struct socket *head) VNET_ASSERT(head->so_vnet != NULL, ("%s:%d so_vnet is NULL, head=%p", __func__, __LINE__, head)); + KASSERT(head->so_type == SOCK_SEQPACKET, + ("%s: unexpecte so_type: %d", __func__, head->so_type)); so = soalloc(head->so_vnet); if (so == NULL) { log(LOG_DEBUG, "%s: pcb %p: New socket allocation failure: " @@ -1322,7 +1324,7 @@ sopeeloff(struct socket *head) __func__, head->so_pcb); return (NULL); } - so->so_type = head->so_type; + so->so_type = SOCK_STREAM; so->so_options = head->so_options; so->so_linger = head->so_linger; so->so_state = (head->so_state & SS_NBIO) | SS_ISCONNECTED; From nobody Sun Apr 26 07:50:34 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3JlZ6MRHz6bBlF for ; Sun, 26 Apr 2026 07:50:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3JlZ5RC6z41cM for ; Sun, 26 Apr 2026 07:50:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777189834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pxU4EbfBNBiVmCDB0v9BRl9CqiAU6pGuh9DoEeLR02c=; b=d84Kg2+xmRHo7/oYVfNEcK5FVZ1uQXMexadDVFqjXwYdCI7C8V4wR+3tKdc8p9AohEpw3X VtOvWZie3BEqlJVBSMHl7RtrbA9eu9B10Hjd2u3F/leEPqCrFQnlbQ7GTqelKupuxZzSA2 CKfVFZyX2aeMvgPY3CSgZcmBZS/IkqJyKXxNsdDoGBpLQuw7YaCvpuW7dBpkB2fnjYnBb6 5bDVSWEFAyys7ROiWCtOvtC5YUIGMXimJcrw5epLSk4ri+cYq03MyulLqbT6vrouKVRdgh JrS+ir/qhKEHW/b9X2S1tRqZ4aUMGXLEC5vtEfhtz1HE/gk6p2nCk2rGRYVvAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777189834; a=rsa-sha256; cv=none; b=mdMSuppo+rzVBwQPftn3j+FGDfBoCijdWWLJ3pqntswcqmJ4Ro2MVitgLcCVG6+Qa1Pkqy BYYYSFuWe8vGTPejuGoxH3AaSZsvhDZVLAH74FU4eHMqCer6kZcIoScoWjxyh+5/9ZDANs 1BDU3kZ7bA4QdW0PxODlkHomb3U22yFW2NcytzGFJ1bgvQ8UnKPKotJuJR4myBadIFNrkG Q0o0i4CrdQ6cDHTbvXwvsjvEcwVE8cl2QFPJIIRgbgBYo734AVnZ3Lc2hOZx8BeqFmfkMd laUFnR/hBl5J8R93WLkjACboyZrA+LbkrEAVOTtDDOR46jmC4wJEofQDBEqxfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777189834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pxU4EbfBNBiVmCDB0v9BRl9CqiAU6pGuh9DoEeLR02c=; b=LxT7XY3pfe4wqpvrys+b+ovzYU24pDxQ6G3HAOtsU/RkJ4adEBKaW+oB8W37DtdQgcwPrx EP66mF8TH5O1DJG08hFjuk6TO892u39RRb3krPIFeXFAhLT7wRrZAVPtPHf6ii/BRKREJ6 AESs+h2dv8WBCWzSWn+HJzTURcgice/0QIAXeEqATIwxeW1qs5z9sc5RbNowKtlhFJ4Glw eonziEx/zyy2f2PwOiBQnMTEdTutmuUPYBIsLC6b9nWxkvIwPoQHSacQVbLVe15EOgcuFC 6N03JZM2Rgazk2T8OCRquDq82adAJ2bY8f1szKfMsh4t3SdUDb36ThaXxG9rgg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3JlZ3jVkz19T9 for ; Sun, 26 Apr 2026 07:50:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25765 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 07:50:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: a095924c7d4c - stable/15 - ure: improve transmit checksum offloading List-Id: Commits to the stable branches 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: a095924c7d4cdfabedfdf17f9c4d8fbae4a75dfe Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 07:50:34 +0000 Message-Id: <69edc3ca.25765.66304662@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=a095924c7d4cdfabedfdf17f9c4d8fbae4a75dfe commit a095924c7d4cdfabedfdf17f9c4d8fbae4a75dfe Author: Michael Tuexen AuthorDate: 2026-02-08 20:11:18 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 07:49:03 +0000 ure: improve transmit checksum offloading Apparently, the name of the variable l4off was correct. Providing the offset to the TCP or UDP header allows the transmit checksum offload to work for TCP/IPv4, TCP/IPv6, UDP/IPv4, and UDP/IPv6. Reported by: vishwin Reviewed by: vishwin Differential Revision: https://reviews.freebsd.org/D55187 Event: Wiesbaden Hackathon 2026 (cherry picked from commit 7266121ce985a1a895441357c20b0e9d56b4e5f5) --- sys/dev/usb/net/if_ure.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/sys/dev/usb/net/if_ure.c b/sys/dev/usb/net/if_ure.c index 3dea88eb10f1..92160fe9b1d2 100644 --- a/sys/dev/usb/net/if_ure.c +++ b/sys/dev/usb/net/if_ure.c @@ -24,6 +24,8 @@ * SUCH DAMAGE. */ +#include "opt_inet6.h" + #include #include #include @@ -44,6 +46,10 @@ /* needed for checksum offload */ #include #include +#ifdef INET6 +#include +#include +#endif #include #include @@ -62,8 +68,6 @@ #include "miibus_if.h" -#include "opt_inet6.h" - #ifdef USB_DEBUG static int ure_debug = 0; @@ -2179,7 +2183,6 @@ ure_txcsum(struct mbuf *m, int caps, uint32_t *regout) struct ip ip; struct ether_header *eh; int flags; - uint32_t data; uint32_t reg; int l3off, l4off; uint16_t type; @@ -2214,10 +2217,9 @@ ure_txcsum(struct mbuf *m, int caps, uint32_t *regout) if (flags & CSUM_IP) reg |= URE_TXPKT_IPV4_CS; - data = m->m_pkthdr.csum_data; if (flags & (CSUM_IP_TCP | CSUM_IP_UDP)) { m_copydata(m, l3off, sizeof ip, (caddr_t)&ip); - l4off = l3off + (ip.ip_hl << 2) + data; + l4off = l3off + (ip.ip_hl << 2); if (__predict_false(l4off > URE_L4_OFFSET_MAX)) return (1); @@ -2230,7 +2232,9 @@ ure_txcsum(struct mbuf *m, int caps, uint32_t *regout) } #ifdef INET6 else if (flags & (CSUM_IP6_TCP | CSUM_IP6_UDP)) { - l4off = l3off + data; + l4off = ip6_lasthdr(m, l3off, IPPROTO_IPV6, NULL); + if (__predict_false(l4off < 0)) + return (1); if (__predict_false(l4off > URE_L4_OFFSET_MAX)) return (1); From nobody Sun Apr 26 07:52:12 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3JnY6DM2z6bBs3 for ; Sun, 26 Apr 2026 07:52:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3JnS5164z428v for ; Sun, 26 Apr 2026 07:52:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777189932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+v4fhlqATbRPRm29QXb/fnVJRE3OE7CWomtYTlwPgAQ=; b=s82f2lF3WvG6JacdofvxL46pLS6MTnalaJI5lj6BVPheN6aPApz869dUi4LHj4GrwlpDc+ ujZQKlZ49zyVU0vvWgHMapFgZ9STy6WOyi129Ynts/s6mpK2QoTnb7fq3CWaG8esjHYntU W31mhUzMhJni8ncQfZFvj1opN5z/EPLMm2lLv593Q+7HIxqK9e4F5+tqf+s48wdBtVds1v FiUJXi+T6WxHrY2K0p5YsBx1fxH3zqXNKRBwZVN4agQp0w+yzmMqEuODxGpgRv/RBCN8DX TSKCcINAkYlLWdl8ZCa5GEYNtg420hiBaanGa0xNLqtyAjZqxQqYSPpkYSN+9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777189932; a=rsa-sha256; cv=none; b=F+xY4u6K+NTvzEeJrPfKYo5K8Rl8QVIkF1HeodxarvvwnSEcrNrQqSNH7NNAW0NAU1BLOM 7rj6mpBgDBTwjaL+k2pqjvipHMLJfCVQ1RJa2qIxAwrM+bnPRglLlLIV+FZgajwZdUWL0+ +s5oBcqTKzqUAd57PjpCPTN31T7aU6GXxvGGEikunfMCHJirf7NniXDmHZ1GgzoL0YcvMi jVsvP2mVniQBMlSyvI4/hWrCuq3HogzvjS6zNtFozOwZe1H/jXtmqSLtPBCSLRkdXKVQBR urMCmIHwdZrpvgjmDVHFljVbX0gwP0Iw5+g97xh3VgDlR0Wd0aN8JTBaJDlGRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777189932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+v4fhlqATbRPRm29QXb/fnVJRE3OE7CWomtYTlwPgAQ=; b=c+TPwiG7Prd3HGjD9lTesyt52UbR3neXldfFxdpVueETR8ykyc2OrtZROaERaJnLhkuMz2 PzljQH072a5Rxw6OFDW9JTrbmhPtnNA7xuWmh4UqQ1jSgdRE35WQuKhbg+qRqKSEP8EbVh v8cCLWR3WBcDoZH+hQbvBBKJQ0Z01VRc5qYODcZRJkopiBeU3sbidjIjzArIlkq3Xn3T53 D8qfa1oplB4GtAt2M3zYzS9jL8IkKYYNGqV0WNhGmfhDFUSqFpbi3JosMDnLmozxzbcAhL OCxSjUfG79/89j/fTeTtt+eE/tzYhnJzlrKvpqE0Phfm7QtB19vRghFIUCvR9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3JnS4WFfz19lq for ; Sun, 26 Apr 2026 07:52:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25d41 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 07:52:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: f2d2ce09fd95 - stable/15 - ure: improve receive checksum offloading List-Id: Commits to the stable branches 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: f2d2ce09fd957fd6a2502ea9db784e053b268865 Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 07:52:12 +0000 Message-Id: <69edc42c.25d41.75731ba1@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=f2d2ce09fd957fd6a2502ea9db784e053b268865 commit f2d2ce09fd957fd6a2502ea9db784e053b268865 Author: Michael Tuexen AuthorDate: 2026-02-10 17:08:07 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 07:50:48 +0000 ure: improve receive checksum offloading Let the receive checksum offload for TCP/IPv6 and UDP/IPv6 be controlled by ifconfig rxcsum6 and not by ifconfig rxcsum. While there, make the code more compact and improve stlye.9 conformity. Reviewed by: Timo Völker Differential Revision: https://reviews.freebsd.org/D55188 Event: Wiesbaden Hackathon 2026 (cherry picked from commit 378577393e407fa2cd9677392da2287e37b4dd33) --- sys/dev/usb/net/if_ure.c | 38 +++++++++++++++----------------------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/sys/dev/usb/net/if_ure.c b/sys/dev/usb/net/if_ure.c index 92160fe9b1d2..257051e6e379 100644 --- a/sys/dev/usb/net/if_ure.c +++ b/sys/dev/usb/net/if_ure.c @@ -2131,41 +2131,33 @@ ure_rtl8152_nic_reset(struct ure_softc *sc) static void ure_rxcsum(int capenb, struct ure_rxpkt *rp, struct mbuf *m) { - int flags; uint32_t csum, misc; - int tcp, udp; m->m_pkthdr.csum_flags = 0; - if (!(capenb & IFCAP_RXCSUM)) - return; - csum = le32toh(rp->ure_csum); misc = le32toh(rp->ure_misc); - tcp = udp = 0; - - flags = 0; - if (csum & URE_RXPKT_IPV4_CS) - flags |= CSUM_IP_CHECKED; - else if (csum & URE_RXPKT_IPV6_CS) - flags = 0; - - tcp = rp->ure_csum & URE_RXPKT_TCP_CS; - udp = rp->ure_csum & URE_RXPKT_UDP_CS; + if ((capenb & IFCAP_RXCSUM) == 0 && + (csum & URE_RXPKT_IPV4_CS) != 0) + return; + if ((capenb & IFCAP_RXCSUM_IPV6) == 0 && + (csum & URE_RXPKT_IPV6_CS) != 0) + return; - if (__predict_true((flags & CSUM_IP_CHECKED) && - !(misc & URE_RXPKT_IP_F))) { - flags |= CSUM_IP_VALID; + if ((csum & URE_RXPKT_IPV4_CS) != 0) { + m->m_pkthdr.csum_flags |= CSUM_IP_CHECKED; + if (__predict_true((misc & URE_RXPKT_IP_F) == 0)) + m->m_pkthdr.csum_flags |= CSUM_IP_VALID; } if (__predict_true( - (tcp && !(misc & URE_RXPKT_TCP_F)) || - (udp && !(misc & URE_RXPKT_UDP_F)))) { - flags |= CSUM_DATA_VALID|CSUM_PSEUDO_HDR; + ((rp->ure_csum & URE_RXPKT_TCP_CS) != 0 && + (misc & URE_RXPKT_TCP_F) == 0) || + ((rp->ure_csum & URE_RXPKT_UDP_CS) != 0 && + (misc & URE_RXPKT_UDP_F) == 0))) { + m->m_pkthdr.csum_flags |= CSUM_DATA_VALID | CSUM_PSEUDO_HDR; m->m_pkthdr.csum_data = 0xFFFF; } - - m->m_pkthdr.csum_flags = flags; } /* From nobody Sun Apr 26 07:57:03 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3Jv36rxYz6bCC6 for ; Sun, 26 Apr 2026 07:57: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3Jv368s8z42yT for ; Sun, 26 Apr 2026 07:57:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777190223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tVcEN6KFXp76V95tFF9GnzvNAsmwp91c6+WYXOqZCZ4=; b=Xhn2cUl3e4WmDQ30CvpuOczJ2hk6YQkcjlOB29fNGeDUPxNHuHqJpgK/X0hOi2yL8HuxMg 3siKYNCGDw47ebqgcvQ9Co9uG5ovdV2gRoLopRNDHE6FOnA8W1mQh9kidERnXDFiz8/jz5 11aYQu8WUEq0VeMwkNNb2DgQmL+qfrUzF2bbtKJwwsMtY0La70zsPXGeUyGss4eStjcZwS TXdkxR5cbYEcfpQ7PRbwxyD1GKugDulS5KUfs8uEF1PBintcm4IQihRfcqSRdsOc9jkOZU KRVZ2qu64gfnGDVG09PKntzD7Pze+WLNbVOC6+J/3PWpsZu6gSY6LiAiWAcEfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777190223; a=rsa-sha256; cv=none; b=u2g0mT3pxws8vKe4o3iGykiD0v5htnhy5XoW2rx+kjWS2pMMzd/5muMA2R3rf1U7+pCaJf 2LpMhVQNfWWBL9X92zkltNinoWj8gi/rc6Cbs72/j5GPYFnrMUepHtIWLcaUdEGz8lF7P0 isJe8demeVV343ZtayBBVGsoN1TToSYBcaHG9Bv1drHLib4XZRKvhEBC/jD+PKOdrPeF59 Mpgi0grcrFqnoX0kuhVDff6utdd6tcpYzDTEgNBU6bMddkUWLgs+vXMF8lI88AFe9NgfR3 2IgJmw+w/SzU1UQIiPpBRrVQzcKxObDaieG/RBfy68n7/x6R6SJlNXXmiQEhsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777190223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tVcEN6KFXp76V95tFF9GnzvNAsmwp91c6+WYXOqZCZ4=; b=EXcTuP0Ekj2+JsRNBoxUSwAkwwwjqq5Zv07QtGkwTH38xPJiw3XY2yTJDWxkzTZ2kOE66D 7wMeKX2BJRrrZVdwcihRQSl1cQqYjVzXxa3cqW/t1lGWSIvyrIPZGNyXi8wL/lpjLuy1+Q Vi+/J67c9q7f21RHvViwODUgmH3UHD1jUQLSb+q7nM6dk3jFTxkmtnfhHqSRQM6wMkPJ7N RR2jD4lsc44Un5iONJ9RCUdtcloyapwAPsn+igUYL79xcZc4t+0VMFw8QvI37Lob7+wQI4 fxaZAdGeQB6/EgIKbz1MMlIpO37sI7ThqkAswI3YkpNIqmnU5SVabeX6b85WFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3Jv35kN9z19vX for ; Sun, 26 Apr 2026 07:57:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 264c0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 07:57:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 902f2016450a - stable/15 - sctp: fix so_proto when peeling off a socket List-Id: Commits to the stable branches 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: 902f2016450ae02d889c62b57631d491b0a67e6d Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 07:57:03 +0000 Message-Id: <69edc54f.264c0.43a1fc4c@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=902f2016450ae02d889c62b57631d491b0a67e6d commit 902f2016450ae02d889c62b57631d491b0a67e6d Author: Michael Tuexen AuthorDate: 2026-02-25 12:55:54 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 07:53:49 +0000 sctp: fix so_proto when peeling off a socket Reported by: glebius Reviewed by: rrs Fixes: d195b3783fa4 ("sctp: fix socket type created by sctp_peeloff()") Differential Revision: https://reviews.freebsd.org/D55454 Event: Wiesbaden Hackathon 2026 (cherry picked from commit 454212b9718b55b43781f81bef252658e20e0fd3) --- sys/kern/uipc_socket.c | 4 ++-- sys/netinet/sctp_syscalls.c | 4 +++- sys/sys/socketvar.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 91a3717b876f..358393a3bf9a 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1309,7 +1309,7 @@ solisten_enqueue(struct socket *so, int connstatus) * XXXGL: reduce copy-paste with solisten_clone(). */ struct socket * -sopeeloff(struct socket *head) +sopeeloff(struct socket *head, struct protosw *so_proto) { struct socket *so; @@ -1329,7 +1329,7 @@ sopeeloff(struct socket *head) so->so_linger = head->so_linger; so->so_state = (head->so_state & SS_NBIO) | SS_ISCONNECTED; so->so_fibnum = head->so_fibnum; - so->so_proto = head->so_proto; + so->so_proto = so_proto; so->so_cred = crhold(head->so_cred); #ifdef MAC mac_socket_newconn(head, so); diff --git a/sys/netinet/sctp_syscalls.c b/sys/netinet/sctp_syscalls.c index 9d85576e2592..79c1dfb21495 100644 --- a/sys/netinet/sctp_syscalls.c +++ b/sys/netinet/sctp_syscalls.c @@ -76,6 +76,8 @@ #include #include +#include +#include #include #include @@ -172,7 +174,7 @@ sys_sctp_peeloff(struct thread *td, struct sctp_peeloff_args *uap) td->td_retval[0] = fd; CURVNET_SET(head->so_vnet); - so = sopeeloff(head); + so = sopeeloff(head, &sctp_stream_protosw); if (so == NULL) { error = ENOMEM; goto noconnection; diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index 6512a2d69fd5..0417223680fe 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -525,7 +525,7 @@ struct socket * struct socket * sonewconn(struct socket *head, int connstatus); struct socket * - sopeeloff(struct socket *); + sopeeloff(struct socket *, struct protosw *); int sopoll_generic(struct socket *so, int events, struct thread *td); int sokqfilter_generic(struct socket *so, struct knote *kn); int soaio_queue_generic(struct socket *so, struct kaiocb *job); From nobody Sun Apr 26 07:58:13 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3JwP46Yzz6bC0R for ; Sun, 26 Apr 2026 07:58:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3JwP2fQNz42y5 for ; Sun, 26 Apr 2026 07:58:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777190293; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dWJAX/ywN4SeQask8ATyKnG3O0iE9Q/CuP8VHW+SIus=; b=AYswgKeOtMGI4gIEm9TFfhF9bADLKDg3v1QQtQdaXUdLYyApKi5Qtxho56nqY1fwG46pCS t3QCWCsm+f+PKebhgjpvkwXasatQ1Dl+OR90iLCSDwV7JYFUu4eAriMWifKmgoJOMIL86l Akqay+NMlC6YwcymnxvF23afbMVh4FvMtgqZkwvkIW4m/AG1vxnrkWx2cuZEV067JUpkCS DoafHfQeC77MCh/f44i/zrjm1q/GJqCtd5ZGqVBRgMfxZbp1uK57v7uejnyOCo/pSfa+GZ noEWCDXJ02GVXbrvQrHIsHDUqXi5UYU1SN9n+ccwCbHI4dRXSeSB90XPMwgWgw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777190293; a=rsa-sha256; cv=none; b=i1Qul3mLhDOJIzzqZ+PNJjqfoW9MhWU/fM2jVO0HurflwivhnE+7SGX3X8eq+OTdURHAqW ATSTR8yHxMbkjIZ1dxFQliQVbBx2Ju4vgAjDMjaiSk130V1NUWlmiLBWjyFzq8jp4AwGUm 9SrKJk//y5yOgPK9ZgDZ9t0em9isnw9MOtU/QsmIpoTBdmu0GFumT5n6Bwk+Pyvg+nOBes vIZnCfDknXjR8keTJRXrAiH3/YQ/k9xuI6pC6dAv3v/ywfT35OIIUh+o+EyFga3jv6e/9k NqurkQiCejtFa3qzmeAUVUGz/vQDDL9+++MyKbBwf7fwUU/t1tCBkPOoXidF4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777190293; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dWJAX/ywN4SeQask8ATyKnG3O0iE9Q/CuP8VHW+SIus=; b=UW6mVSWMTO2nkh9to11FYhLea1f9UWthZNrJNtpueddyFNLpymdzW2Mla62TOnjgg60T5D fXh6bWUcRJUWNFut86nj+bkEjC3I1Hov33Eu/bZavGMVUGGBqCcJ0DCqzwNKimRHHWl+Xa sdR6XNvH9espLKydce92n0nHdoac7zg2OVI9HznCy2f5+vMYMvsVZjjxYapkgbaVf6htxk aEkunxn65AsOiaQ4VjDyRZwdAu7beMZZWReValPXoqD+hQyg5ge/+n+TlJ5cBGtawZEbji iSjB7wX2B4/YfM/JxkigM9knwkpmp9vxepyfC9oVh4gkA4PLgVBx/O853N2z9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3JwP25d5z19vY for ; Sun, 26 Apr 2026 07:58:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 243fa by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 07:58:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 5a29c53eb3b4 - stable/15 - tcp: BBLog incoming packets in TCPS_TIME_WAIT List-Id: Commits to the stable branches 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: 5a29c53eb3b4c8e7af28ebf5176a492ea7c46a7b Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 07:58:13 +0000 Message-Id: <69edc595.243fa.50de9601@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=5a29c53eb3b4c8e7af28ebf5176a492ea7c46a7b commit 5a29c53eb3b4c8e7af28ebf5176a492ea7c46a7b Author: Michael Tuexen AuthorDate: 2026-02-25 13:01:50 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 07:56:31 +0000 tcp: BBLog incoming packets in TCPS_TIME_WAIT PR: 292293 Reviewed by: rrs, rscheff, pouria, Nick Banks, Peter Lei Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D5546 Event: Wiesbaden Hackathon 2026 (cherry picked from commit 8d2f910ceb0f1c366bcf2146a5ba1d1074d07933) --- sys/netinet/tcp_timewait.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index ce63fcf9ffc0..5032f5bf4c28 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -76,6 +76,7 @@ #include #include #include +#include #include #include @@ -331,6 +332,8 @@ tcp_twcheck(struct inpcb *inp, struct tcpopt *to, struct tcphdr *th, */ if (thflags != TH_ACK || tlen != 0 || th->th_seq != tp->rcv_nxt || th->th_ack != tp->snd_nxt) { + TCP_LOG_EVENT(tp, th, NULL, NULL, TCP_LOG_IN, 0, tlen, NULL, + true); TCP_PROBE5(receive, NULL, NULL, m, NULL, th); tcp_respond(tp, mtod(m, void *), th, m, tp->rcv_nxt, tp->snd_nxt, TH_ACK); From nobody Sun Apr 26 07:59:17 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3Jxd6bYpz6bCV7 for ; Sun, 26 Apr 2026 07:59:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3Jxd5f1jz43TS for ; Sun, 26 Apr 2026 07:59:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777190357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YghWCoVwTeayfncRz3NLzQoUMQYv+CJfC5RPrnAZBrY=; b=u7CMJWmU06esrKwXEHB1HbzeRfkpQqcnHwROBNxI6gN7eOgDDfKA/Rqq+8+OYfw18a3FOG 6kWzMQo/4iCSZgTol5cKBXHwQopDj80bwm3LjAlbqj44K4lLPNdHuJ6V7ecJFi6LLVUXzU AzpWGojKFgs3J0+StXATKD0CJXxRhxvS0GYT6p7ZH3yVhtVwrgqYyO722JQdIxJkjQKub9 1hROPIfVrYO0JSKM7znBHEUiKF1812ImZ3OyzZE+B93YX1cjPBTy7WlAsVCAACmbV7FkSo l1tmOel4ghJpc9nX9hcN6TYC7loalIkOLSwEUB+1SiCWmaiIbehrto5BSMIz1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777190357; a=rsa-sha256; cv=none; b=MhTMwGCx0bYpcwQXMCaZFujzuPgJ5Xdq6Hh/aQZEOgEo/06hR04f7FFDONigaCl8bdC/8q lAkEsGZTSWHEu0NGswhgTSZ5VfS5smgTf2Oog8pRrexWhhanX3YYQeOROVzYDZIAmXx2Mx ZYHobeqikJbgdKpZTAair+POatA48V6qQnenb9bhc9ieGM06Nqiq5AhsrhM3rhFb/oliuS w9mIs6NOd8mLtW8i0uLybzhzipKtnGhooWSjYQzawRafYKyYZ2N+iSVU88OJfl2HqrTEex HZlW3HlaydE1LLqFmoK7NIPSx5MXezPm3GPwxbSoPQMSuBkhVBlTQTDfwRNFRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777190357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YghWCoVwTeayfncRz3NLzQoUMQYv+CJfC5RPrnAZBrY=; b=PPigj/8tN3lKvqNIUgi4/0WoioXhwKRHibsry9dVJ77zTDEwc9AFBHXNKvAPSCwbOGLf/4 9WLtNkqwFhGx80D98vnXs3oQD7SX6+A4z+3Xz+aUfQ7qgAvC9Xdulrr5p6+A07n3dmwxoh hcgKyCOr0Xs8PBYxcE3uQbqBdHDTLB9GAGBlwGFhtADxgDhY3dk2epXM8oXMHjLW5fw+yl vQFN7ywYFHg+NS/t3kpH17SWnfK9Y6IAyZG24Cw/oT9oMNOrPr2Guv66Uj1fcQv1MLMgeE asSSPRs1zPbu0KUtaTIGYUtcR4EFmj8Tki35JI2AFCZsrX5akr819BnylR2luw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3Jxd5F5Mz19vb for ; Sun, 26 Apr 2026 07:59:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26d14 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 07:59:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 88603890a770 - stable/15 - tcp: improve handling of segments in TIME WAIT List-Id: Commits to the stable branches 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: 88603890a7702464af837cf373e792697c5335e9 Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 07:59:17 +0000 Message-Id: <69edc5d5.26d14.3aa23795@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=88603890a7702464af837cf373e792697c5335e9 commit 88603890a7702464af837cf373e792697c5335e9 Author: Michael Tuexen AuthorDate: 2026-02-25 13:06:15 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 07:57:44 +0000 tcp: improve handling of segments in TIME WAIT The check for excluding duplicate ACKs needs to consider only TH_SYN and TH_FIN. We know that TH_ACK is set and TH_RST is cleared. All other flags, in particular TH_ECE, TH_CWR, and TH_AE needs to be ignored for the check. PR: 292293 Reviewed by: rrs Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D55489 Event: Wiesbaden Hackathon 2026 (cherry picked from commit f3364d3c8c876074a9a6f68168e5eb8bd60207de) --- sys/netinet/tcp_timewait.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index 5032f5bf4c28..66103f8d0b11 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -330,7 +330,7 @@ tcp_twcheck(struct inpcb *inp, struct tcpopt *to, struct tcphdr *th, /* * Acknowledge the segment if it has data or is not a duplicate ACK. */ - if (thflags != TH_ACK || tlen != 0 || + if ((thflags & (TH_SYN | TH_FIN)) != 0 || tlen != 0 || th->th_seq != tp->rcv_nxt || th->th_ack != tp->snd_nxt) { TCP_LOG_EVENT(tp, th, NULL, NULL, TCP_LOG_IN, 0, tlen, NULL, true); From nobody Sun Apr 26 08:03:36 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3K2j6wtbz6bCj6 for ; Sun, 26 Apr 2026 08: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3K2j5Nk3z44Gq for ; Sun, 26 Apr 2026 08: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=1777190621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W6PobpDz4pBlGV1OmlxmfFHruURxtlH7osoQS/DLVLk=; b=MoaOPYbmOFHMnLbtfohCV6IFIMq9PFBmT+T1DFB7EuL22clsE1wy38g38MBoX0ltAQ+SOK b7A6Msj3o1o+sRb/HK4m2lsIXSn81tz+qRTJytxHMa6Zt3oMBrf4PlkyS0fTHYfETV3INM M67TftRFAN3cUsUiCBf5eo1tOrVFDZoKAP5kegsUTYFRjIRULFk64a9rv9qfRRkO3Oze+H h12QnYoSxZ0gciaD+rVv6foWnKj+mRUuko6GXMb+ENQdOTU+5QvPLmkS2GYduy3quc2+mi VARXnO/5oTC89tGHUJ4PA57TuIm2KDJAVfWTrh+LCIrIHCMfW1cYsBOB5n0aKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777190621; a=rsa-sha256; cv=none; b=ZLqZo2A2twahpFIqYmlpRb02sR5IaAO4RZ27EacZ6rQHYh9DuZB6Ewjfq3IVbeCca5FT7R CkAuGvaPWGiI2aLUQod/RDixKDH3dOou+Ynr864mm8I/9zTNmIz4P6IaJjLOfOKJ45JhOw KF71lUijGH29JVlMBXgqyCdXFsWXH7lEQpyYWBsZzoXDS1e845y2xFJeYw2zcPMH1aRyeJ 6DtL92ZTWBeHf12zKK2FMHjDeUXgYZBNvACd06GIqV0XwjhVGc8/jUjIlV8HyOPvnOWtX+ V83qZ/wmzzRFEjtGVz7I9/9l3kQzTMtPKJ7CfFOHg5KVJ5kGD7cMxTq1aA/Apw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777190621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W6PobpDz4pBlGV1OmlxmfFHruURxtlH7osoQS/DLVLk=; b=CEGOxF65xgXZ1sQkXs3u0bYJHJklaUvgcHQY0fSm4YhmzYPuLmgiEGKZRxCSen0Ks7J4Qw V89R/i4vIsMcpHvJl+XFE1rF/c1g7d5p3Ym/3aR9Inrlr+g9q1lyuoe9sCrShNv/RnrsIz xA6mZY/f58Q7yjNzLADNw1Ddmh9WmrFNcSA0B7SiiUPODf4ZF/LUFSAD2m6vcTF3juzuHi hmtEYjyZ6LwL4AiaEDUZ4gBDIICSQL9h/GOlnsV1+dsECpEhiMXoH9S8wDxduXsRzco8Xc n29mKWPgWdr15qiThNEWeCOMMyn9lRxFBwa8Q8iX1L09P4S7um0IsEEsvDsr0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3K2j4ybpz19yj for ; Sun, 26 Apr 2026 08:03:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26dbe by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 08:03:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Timo =?utf-8?Q?V=C3=B6lker?= From: Michael Tuexen Subject: git: 09bcf5a57a13 - stable/15 - arm64/pmap: fix pmap_is_valid_memattr() List-Id: Commits to the stable branches 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: 09bcf5a57a138313e8330483b3e9335f9fdd5308 Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 08:03:36 +0000 Message-Id: <69edc6d8.26dbe.41a93a9e@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=09bcf5a57a138313e8330483b3e9335f9fdd5308 commit 09bcf5a57a138313e8330483b3e9335f9fdd5308 Author: Timo Völker AuthorDate: 2026-03-02 17:59:45 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 07:58:59 +0000 arm64/pmap: fix pmap_is_valid_memattr() The function pmap_is_valid_memattr(pmap, mode) checks whether the given variable mode is between the two constant values VM_MEMATTR_DEVICE and VM_MEMATTR_WRITE_THROUGH. After the code for this function was written, the value of VM_MEMATTR_DEVICE changed from 0 to 4. Since VM_MEMATTR_WRITE_THROUGH is still 3, the condition is always false. This patch changes the condition to check whether mode is equal to any of the VM_MEMATTR* constants. Reviewed by: andrew, tuexen Differential Revision: https://reviews.freebsd.org/D55534 Event: Wiesbaden Hackathon 2026 (cherry picked from commit 0272359ada144aa540c28fefaf996afa30dc0aa5) --- sys/arm64/arm64/pmap.c | 2 +- sys/arm64/include/vm.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index cae46f7c2f1e..678030f827dd 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -9627,7 +9627,7 @@ bool pmap_is_valid_memattr(pmap_t pmap __unused, vm_memattr_t mode) { - return (mode >= VM_MEMATTR_DEVICE && mode <= VM_MEMATTR_WRITE_THROUGH); + return (mode >= 0 && mode < VM_MEMATTR_END); } static void * diff --git a/sys/arm64/include/vm.h b/sys/arm64/include/vm.h index 342143c57246..e03e615bb841 100644 --- a/sys/arm64/include/vm.h +++ b/sys/arm64/include/vm.h @@ -33,6 +33,7 @@ #define VM_MEMATTR_WRITE_BACK 2 #define VM_MEMATTR_WRITE_THROUGH 3 #define VM_MEMATTR_DEVICE_nGnRE 4 +#define VM_MEMATTR_END (VM_MEMATTR_DEVICE_nGnRE + 1) #define VM_MEMATTR_DEVICE VM_MEMATTR_DEVICE_nGnRE #define VM_MEMATTR_DEVICE_NP VM_MEMATTR_DEVICE_nGnRnE From nobody Sun Apr 26 08:05:03 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3K4J0qLJz6bCvH for ; Sun, 26 Apr 2026 08: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3K4H5JKxz44gL for ; Sun, 26 Apr 2026 08:05:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777190703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SISbAq41nWjoMo5vOf1gLT077pzUVqkhyUwDtpuztow=; b=lT35fUdH+ArT1bJWfZzQgPuGAkLCEWbtI10h0XgrG08jueCcMb0obSLEGSQeO/TCwruIIV 1/g2kKilL68CInFHp51WF/u9FEHKc3UtvnwD3Zk75cOmbKJ49C4zcPtg+waPobPWR3rJzz 6YV0xmoKGCiwAhUczXtRKdo/Zxe8HLgdH9KTmHzCCFSf5nkB0HvR7+WA/1hlvc0JMfoQo5 D+4ZpVqynxvx2mdDtYHIGyUN3d6aSTOjq7b7XPUga9Uj67SpZ7XeapMF1ElI6XAKcIt2L/ qEBevZSewOFU16IbOOYOu8+kglkzx3NuFp8+YkFz041vERYJnf3G1xDD/TyP2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777190703; a=rsa-sha256; cv=none; b=neTCapi01uLlUFkEQ76HupmZJd1RpVWmykOKdohtjOscoHQ1llzHBTQ18jltuB1tejTdvg 8xGibEva0wpSUP3uEqH+R6xIx7Uki+biSUzaszpICzW5HA3RzI8laj1Dk8AMShiTANVr0v 2HjeWDIw9lsO1LfIDi60V9vRILpo7sjpkqjhtFo8GDrZhfyhquhcECTgTyC1F/WwIWaJyE K2LZYVX4R6aORxNnAPyAOkZn9XYzPimZ7lDit4Md6SvAWu9znNN+crDBkBizSOe4DJphkV /h9b60FvR6Ksknz10hbUSrSiCwnJJqzEj3O+UqppowBnb1lToASX6fw8ZBZibg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777190703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SISbAq41nWjoMo5vOf1gLT077pzUVqkhyUwDtpuztow=; b=FWzCV2NC2O4h1SgLspjddYmDBlVsLNn7hlRESe+ok9f//UTOApb/ND+FlTB7kJmETfTIgY nCilyMDMb3pae3KmdQGgLGWVMHJABj7uck1BHsMHT/su0abbaRLRnLcVS8lTlOPpOIQCLe X5i9cNP/k+ZPArk61tgqAvFKo0gNJ+V99H+GNV7NIVttvMOOfcE8tIUaTiHbFMMNKxS78K +RxqmzAhx6DWRh24edcLpJrC0PTC60wymZ6iK0ZPwicac903lnA3z9oqkR+Q9FV9YPGviG sPrNyT/JghIteShiyDfrrdFhpaHpYpMa+El20GAWKcdE1g4ILbwICk8zaHVf3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3K4H4Gmfz1B24 for ; Sun, 26 Apr 2026 08:05:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27b9e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 08:05:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Timo =?utf-8?Q?V=C3=B6lker?= From: Michael Tuexen Subject: git: 8e13e9865402 - stable/15 - virtio: add loader tunables to sysctl List-Id: Commits to the stable branches 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: 8e13e9865402a4148132da40481b05184e52f1f3 Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 08:05:03 +0000 Message-Id: <69edc72f.27b9e.23cdc6bb@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=8e13e9865402a4148132da40481b05184e52f1f3 commit 8e13e9865402a4148132da40481b05184e52f1f3 Author: Timo Völker AuthorDate: 2026-03-02 18:15:37 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 08:03:35 +0000 virtio: add loader tunables to sysctl virtio_pci uses two loader tunables that should be more visible. This patch adds these loader tunables to sysctl and describes them in the virtio(4) man page. Reviewed by: imp (erlier version), tuexen Differential Revision: https://reviews.freebsd.org/D55533 Event: Wiesbaden Hackathon 2026 (cherry picked from commit c70755bc0d8f703dbaa1520c15e8213a95847dd5) --- share/man/man4/virtio.4 | 28 ++++++++++++++++++++++++++-- sys/dev/virtio/pci/virtio_pci.c | 7 ++++++- sys/dev/virtio/pci/virtio_pci_modern.c | 7 ++++++- sys/dev/virtio/virtio.c | 4 ++++ 4 files changed, 42 insertions(+), 4 deletions(-) diff --git a/share/man/man4/virtio.4 b/share/man/man4/virtio.4 index 1e5ea0e4a7da..0598d5d8621d 100644 --- a/share/man/man4/virtio.4 +++ b/share/man/man4/virtio.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 26, 2019 +.Dd March 2, 2026 .Dt VIRTIO 4 .Os .Sh NAME @@ -54,7 +54,7 @@ The .Nm module provides a shared memory transport called a virtqueue. The -.Xr virtio_pci +.Sy virtio_pci device driver represents an emulated PCI device that the hypervisor makes available to the VM. This device provides the probing, configuration, and @@ -92,6 +92,30 @@ An emulated SCSI HBA is provided by the .Xr virtio_scsi 4 device driver. .El +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +.Bl -tag -width "hw.virtio.pci.transitional" +.It Va hw.virtio.pci.disable_msix +If set to 1, disables MSI-X. +The default value is 0. +.It Va hw.virtio.pci.transitional +For a transitional +.Nm +device, this tunable specifies whether to negotiate +modern mode and use the modern +.Nm +driver +.Pq 1 +or to negotiate legacy mode and +use the legacy +.Nm +driver +.Pq 1 . +The default value is 0. +.El .Sh SEE ALSO .Xr virtio_balloon 4 , .Xr virtio_blk 4 , diff --git a/sys/dev/virtio/pci/virtio_pci.c b/sys/dev/virtio/pci/virtio_pci.c index b7b34b448f6e..2d33d99014ae 100644 --- a/sys/dev/virtio/pci/virtio_pci.c +++ b/sys/dev/virtio/pci/virtio_pci.c @@ -97,8 +97,13 @@ MODULE_VERSION(virtio_pci, 1); MODULE_DEPEND(virtio_pci, pci, 1, 1, 1); MODULE_DEPEND(virtio_pci, virtio, 1, 1, 1); +SYSCTL_DECL(_hw_virtio); +SYSCTL_NODE(_hw_virtio, OID_AUTO, pci, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "VirtIO PCI driver parameters"); + int vtpci_disable_msix = 0; -TUNABLE_INT("hw.virtio.pci.disable_msix", &vtpci_disable_msix); +SYSCTL_INT(_hw_virtio_pci, OID_AUTO, disable_msix, CTLFLAG_RDTUN, + &vtpci_disable_msix, 0, "If set to 1, disables MSI-X."); static uint8_t vtpci_read_isr(struct vtpci_common *cn) diff --git a/sys/dev/virtio/pci/virtio_pci_modern.c b/sys/dev/virtio/pci/virtio_pci_modern.c index eb1d5a1e6989..108fd2b5f8e9 100644 --- a/sys/dev/virtio/pci/virtio_pci_modern.c +++ b/sys/dev/virtio/pci/virtio_pci_modern.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -188,8 +189,12 @@ static void vtpci_modern_write_device_8(struct vtpci_modern_softc *, bus_size_t, uint64_t); /* Tunables. */ +SYSCTL_DECL(_hw_virtio_pci); + static int vtpci_modern_transitional = 0; -TUNABLE_INT("hw.virtio.pci.transitional", &vtpci_modern_transitional); +SYSCTL_INT(_hw_virtio_pci, OID_AUTO, transitional, CTLFLAG_RDTUN, + &vtpci_modern_transitional, 0, + "If 0, a transitional VirtIO device is used in legacy mode; otherwise, in modern mode."); static device_method_t vtpci_modern_methods[] = { /* Device interface. */ diff --git a/sys/dev/virtio/virtio.c b/sys/dev/virtio/virtio.c index 75d65ba4a8c8..be5edcafa7ff 100644 --- a/sys/dev/virtio/virtio.c +++ b/sys/dev/virtio/virtio.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -90,6 +91,9 @@ static struct virtio_feature_desc virtio_common_feature_desc[] = { { 0, NULL } }; +SYSCTL_NODE(_hw, OID_AUTO, virtio, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "VirtIO driver parameters"); + const char * virtio_device_name(uint16_t devid) { From nobody Sun Apr 26 08:06:09 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3K5Y2b5Rz6bD3X for ; Sun, 26 Apr 2026 08:06:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3K5Y1xMrz44vv for ; Sun, 26 Apr 2026 08:06:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777190769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fpje2vVRLBMaNCLSAGTve4qKHmPp+juYc6Oob9NSbqE=; b=hhzkC8R5g0zYPDFuGG6WIKRSAYhMwejxr7bnVPRtzTc0W/rXJyHX8+zXSZwy2Ug6QaE45n TL1xsOgPFvVt+NmEGcXdovcigtcuL4kcHwd6Rc05Dh3ZVqVJV7LcCTSPMqAz1HM/UW8Z7y IbRzKQrnzOxcmnecQZcSetQXP7Ou10Hr8219WQiqhjGfuGgLW9oCIKHTl6eGdqJs3QruH7 81uoYgBuH0qJYQpAf3Wm5T+bOXRAddeCww/RFsLOmBL8eYD3AwZBGSy0nCXZW3Ucld5upX 7qsyOQRG4wuVJd10Ccji4z3Bg6dAkkjBQepttrWZYI0bMI6V5CvM7J9lXAzamw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777190769; a=rsa-sha256; cv=none; b=iIU9q0+q4HWx0Hz21BJn4Y7NLEaDVRgMX63O5sFA/KR7PFJBbHZBc0AU7DmdStQO99na5u Bj/sTUZ+TkopF0c4yAzhXTkyvAAw+UWx41cXOTdWDFSkfi9F2TJJI3z+01BnUu+0xdzz8P bOi6iPhHh27V9jkw4hyR4uqiruFFPyr1bCezEO0cVWmUQns11U98Uj0Ctwj0VxIBRLP0ow hJvRll5r8qJ3hxc8yfKWdssH0qsNm/o3y22WlPq9zvvsovP3kA3bFuKATZ/9pjL9jL9V01 l62/h8mQJif7VQ3LayhKWCmn/yrF7MDdZdr4+FbRF2b+HX/cz84R6vCHXar1Fw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777190769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fpje2vVRLBMaNCLSAGTve4qKHmPp+juYc6Oob9NSbqE=; b=nfM9+OFNEUM2bHljoL0/s/nX/aailIbDA4PGGYuMia9RJ6sJBf1b/2CnwX+XAAIIqM5dRU A13iFa9hnL2dakUE9/R/X9fXIDe5yxLXXXJq0eK0pE9qScg55t0VJYVBPCTOGhM5jKGLyb yNNhQ7N9OOCPvOue6UY1++Yyhx12eThWqPqgWgCKkgNNh5uiCWVlr4EFe1UCcbDwCL7JJW 6mkkb3ua3qbDJ8U43RtM8TRJdyHFrWPiBvtJTEi2Pa/y/iX77Jwu2QxLY4RRX3E2SQGRBq Wb/qV2vB3bNevqYR5N5iq3CwMgDnb7miCCNp/+5Xrfk7kKcqH2/IYZJyL2Is8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3K5Y1JpYz1BBD for ; Sun, 26 Apr 2026 08:06:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27474 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 08:06:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: c8fa77d8e9fa - stable/15 - tcp: improve NOINET builds List-Id: Commits to the stable branches 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: c8fa77d8e9fa2f4bc73debb90af68a391e5c5290 Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 08:06:09 +0000 Message-Id: <69edc771.27474.76136843@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=c8fa77d8e9fa2f4bc73debb90af68a391e5c5290 commit c8fa77d8e9fa2f4bc73debb90af68a391e5c5290 Author: Michael Tuexen AuthorDate: 2026-03-04 14:18:58 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 08:04:29 +0000 tcp: improve NOINET builds Reported by: bz Sponsored by: Netflix, Inc. Event: Wiesbaden Hackathon 2026 (cherry picked from commit 3d69387ece535fc33821d089aab241bfb9551d69) --- sys/netinet/tcp_subr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 5e2b1eb1a86d..7152e8ad600c 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -342,8 +342,11 @@ static struct inpcb *tcp_drop_syn_sent(struct inpcb *, int); static char * tcp_log_addr(struct in_conninfo *inc, struct tcphdr *th, const void *ip4hdr, const void *ip6hdr); static void tcp_default_switch_failed(struct tcpcb *tp); + +#ifdef INET static ipproto_ctlinput_t tcp_ctlinput; static udp_tun_icmp_t tcp_ctlinput_viaudp; +#endif static struct tcp_function_block tcp_def_funcblk = { .tfb_tcp_block_name = "freebsd", From nobody Sun Apr 26 08:07:23 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3K6z3FN5z6bDDT for ; Sun, 26 Apr 2026 08:07: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3K6z1ZF2z45LT for ; Sun, 26 Apr 2026 08:07:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777190843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CocMVcB5WDdhdCYiH8oEHy+/H96OtlUsH2i5F5c25jk=; b=b3vdzhTDIcBcnA7yr8dPS00x/thmre5yQKd7Y3CZ9hzhqbEaOtXLMcWGov6FS104orcztx 96FdztEOGzEgh5xzrsUeP3gnEnhwZsM7k9ZlUZCInSk7Pdv+CaaxUSQk7I9Mduz3nq8x7q otmFGo3tlOD6aoYY53T+FznTjZB+Jm+teUJxChOp6+x9XxdO6DVZHnno0IA/K8NYRpozUu oS8A5JHVXEAjPmfS0ze7AO9eV6gI5blbJ7J100mIMPgOb73rztRoheV1cb72+qx71eMYXZ an/FQdggVo1iclVoaF8fp6Tu3hq6O2O6VujuP3tnemdOo34Ly29VDtGgEfrBNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777190843; a=rsa-sha256; cv=none; b=XVlXKei7JaIDWNLjWhzULoqGELLnfGOVLn3uZ7qYV8EmiaZY4PcC2x+fRypXzXbDZ7RAUk bb10nkixDucQl3CbZIk+ovCDNJ3bSkcLp8w/S7rMyRVQU96FoE63M/2QYVO/2629kC5Fry 7vcB1OHFMazccMgZCcCZ7eKiwK+se8igKgYRMpWTKMDr0f/XTXsa3Eh7j21v5yA+c+BFne hHCmOihWhHc42UHFP2Vuoyfccz1QO8bSBU313HuNsY8UHtkXjHP3/f+4VAaMyImCZOkEFW lfI1GCvnmz7BduP5zDZ74oW6VC0qjAN3EGVlZdKSXtA05aQVCYDSHlf/yH2+NA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777190843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CocMVcB5WDdhdCYiH8oEHy+/H96OtlUsH2i5F5c25jk=; b=m94hmy57NwXLd8wSdYEGX3IhxkS/esaLo57saqPe/MquTRb3ijepfquemkb75TcvrbUIf6 6ap1X5D8/N2ClmP4zooD05Lv3oZoLfA5RabW0s+okDLM696N7XB7ywMTFiPtNO9HX4zijA js9LzdeK4ZmxCInNa99xhgxfpcYo76bgYFo+WPc3O408fESjsgcoQyv3+YoXu9FET+NEEK K6LyIN1+tPnlFb8vUMTXtkjZboeV7m6bt1wbJ+VuVnM2qPrm8zFfHIyFCErqfqUPhMVHmy k4Y6txqZTy+PymffTiIYWM41+IYk8Dfy31r22j/324wgNVLFJSVUwjuKO3lh4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3K6z14gWz19Xn for ; Sun, 26 Apr 2026 08:07:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26ad2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 08:07:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: d3e3c9a93b77 - stable/15 - tcp: retire TF_SENTSYN List-Id: Commits to the stable branches 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: d3e3c9a93b771fa2b531eb7c586e68ad2326823d Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 08:07:23 +0000 Message-Id: <69edc7bb.26ad2.59e559c1@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=d3e3c9a93b771fa2b531eb7c586e68ad2326823d commit d3e3c9a93b771fa2b531eb7c586e68ad2326823d Author: Michael Tuexen AuthorDate: 2026-04-03 19:22:11 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 08:05:33 +0000 tcp: retire TF_SENTSYN This TF_-flag is only used in the RACK stack and not really needed. So replace it, since glebius@ needs a TF_ flag and right now all of them are taken. No functional change intended. Reviewed by: rrs, glebius, rscheff, Nick Banks Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D56025 Event: Wiesbaden Hackathon 2024 (cherry picked from commit 32cc4beb0a8c3cadc0de4c255ba512fd7b196607) --- sys/netinet/tcp_stacks/rack.c | 4 +--- sys/netinet/tcp_var.h | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 9bc4530afe10..219cf2758ff2 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -22031,10 +22031,8 @@ out: * Now for special SYN/FIN handling. */ if (flags & (TH_SYN | TH_FIN)) { - if ((flags & TH_SYN) && - ((tp->t_flags & TF_SENTSYN) == 0)) { + if ((flags & TH_SYN) != 0 && tp->snd_max == tp->iss) { tp->snd_max++; - tp->t_flags |= TF_SENTSYN; } if ((flags & TH_FIN) && ((tp->t_flags & TF_SENTFIN) == 0)) { diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index f9297be46af7..9d1d2bd31674 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -789,7 +789,7 @@ tcp_packets_this_ack(struct tcpcb *tp, tcp_seq ack) #define TF_TSO 0x01000000 /* TSO enabled on this connection */ #define TF_TOE 0x02000000 /* this connection is offloaded */ #define TF_CLOSED 0x04000000 /* close(2) called on socket */ -#define TF_SENTSYN 0x08000000 /* At least one syn has been sent */ +#define TF_UNUSED 0x08000000 /* was TF_SENTSYN */ #define TF_LRD 0x10000000 /* Lost Retransmission Detection */ #define TF_CONGRECOVERY 0x20000000 /* congestion recovery mode */ #define TF_WASCRECOVERY 0x40000000 /* was in congestion recovery */ @@ -803,7 +803,7 @@ tcp_packets_this_ack(struct tcpcb *tp, tcp_seq ack) "\15TF_NOPUSH\16TF_PREVVALID\17TF_WAKESOR\20TF_GPUTINPROG" \ "\21TF_MORETOCOME\22TF_SONOTCONN\23TF_LASTIDLE\24TF_RXWIN0SENT" \ "\25TF_FASTRECOVERY\26TF_WASFRECOVERY\27TF_SIGNATURE\30TF_FORCEDATA" \ - "\31TF_TSO\32TF_TOE\33TF_CLOSED\34TF_SENTSYN" \ + "\31TF_TSO\32TF_TOE\33TF_CLOSED\34TF_UNUSED" \ "\35TF_LRD\36TF_CONGRECOVERY\37TF_WASCRECOVERY\40TF_FASTOPEN" #define IN_FASTRECOVERY(t_flags) (t_flags & TF_FASTRECOVERY) From nobody Sun Apr 26 08:08:34 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3K8L5hFWz6bCxq for ; Sun, 26 Apr 2026 08:08:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3K8L3SNpz45QV for ; Sun, 26 Apr 2026 08:08:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777190914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0189EyxPledd1ppwnundosqjJ+Ew9iBcohjbYzkDVvw=; b=t00mLYToW0iHJ/zS7UOmGLgDSCRQXsKSWe9e4WY5scfuVt7aFH0X0Ht4Lx8GoGDrFDoLT6 GeK7UQyMt8ym+JWqitPlGGvtzCISFEHakzohzxPLColZmz2/3TfHiafD6r9pJhAlpEudvw OzqlztWy5OnEJKQ5dFfQHvfu83O6ylnQuWW6Qp7YCRw8BL2o4xphma/PxOXO03oYM2vpdx 7cfG6loDjfp11f4vK6vJgpvMH8NkMOlEVHXeRJNv7+co+0slirUUC5eSquWRZQH4MIiHhn JqKH5YHIKVTZPdMO68mz0gq/BkBs1wysW3CtzdMrKlqmKHmPZYIoyRXA4cUWTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777190914; a=rsa-sha256; cv=none; b=MCshOVlDb0KaMUKLRsauJlfTTBfZR4eAHF7GVw7XXodXSgx5E/zCNGcF6ho2zFmOc8nfkJ 3SzFWMUu2kz03KvbzgUyL7RiReRx+ysIJlzIxT1rTJfw7h9X2WSfwh/XaSisJjphyGENs2 +PKCRkzIrIA0WzV0/e2K2pMg/Wn0NtUi13Xo++EN5TZ5nN4euN8YWLmnaBdXCzphC9Jh+4 d12TVqPX8THY3+tdaEjzEpQAvXT/Z5e+N+IU7Odg/fFeYCK25kcSW0bGG87MsSIMBxvacG T5EQiutPNgBue8PNTRoLaH8k15iwWtRRTCgjVnVPJdStkihbXgOzMzRwpgDaeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777190914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0189EyxPledd1ppwnundosqjJ+Ew9iBcohjbYzkDVvw=; b=CZAgxw3d9z9tZIINVBgAFjUvIIkBvgroesoHU8IcoxPPvFS4lnYvOavOMvilzQH2bUa0ld hv7citSlsShTI+vqE3SS7M/rqzfBFypBeLPivhSXhi/k1F9/Mj3SO9FTB7r1o76hAs7mQO ZwxTBpzq8UshktEiVGXpWhhl5SYlTzMiyL9b2cbIIXMefWr6zAWEAFWJfPHrb5WtcEkirV N//Ve4VKEszCd8kk4l7LaA31A8TjCGs6bleK2pmTEcf9k9hlZVHnh7kY+PU9WKlQO7k6DP nR5mSWBQftXCUqpNUU5/qWJBvQBeH8dGit2hqI2ZUEkBw9L8EVa0ZpRS1ja8/A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3K8L2pqDz1BBF for ; Sun, 26 Apr 2026 08:08:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27ba3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 08:08:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Timo =?utf-8?Q?V=C3=B6lker?= From: Michael Tuexen Subject: git: b063cfb20aa8 - stable/15 - virtio.4: fix typo List-Id: Commits to the stable branches 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: b063cfb20aa89c5087677463692a59196da23957 Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 08:08:34 +0000 Message-Id: <69edc802.27ba3.6c82b173@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=b063cfb20aa89c5087677463692a59196da23957 commit b063cfb20aa89c5087677463692a59196da23957 Author: Timo Völker AuthorDate: 2026-04-04 14:43:07 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 08:07:16 +0000 virtio.4: fix typo Reviewed by: tuexen Fixes: c70755bc0d8f ("virtio: add loader tunables to sysctl") Event: Wiesbaden Hackathon 2026 (cherry picked from commit 39c44fc55f0ed595623fb6d66a4060b7be32fa51) --- share/man/man4/virtio.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man4/virtio.4 b/share/man/man4/virtio.4 index 0598d5d8621d..8252cc1b7954 100644 --- a/share/man/man4/virtio.4 +++ b/share/man/man4/virtio.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 2, 2026 +.Dd April 4, 2026 .Dt VIRTIO 4 .Os .Sh NAME @@ -113,7 +113,7 @@ or to negotiate legacy mode and use the legacy .Nm driver -.Pq 1 . +.Pq 0 . The default value is 0. .El .Sh SEE ALSO From nobody Sun Apr 26 08:09:34 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3K9b5653z6bDTM for ; Sun, 26 Apr 2026 08:09:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3K9b4SD3z46MV for ; Sun, 26 Apr 2026 08:09:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777190979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KK+KYe95zSQ8U3BhKM7Of934wr+BluWq2iKruT8DFOo=; b=c+Ra+FEd8SYZPaPsYjF16aYt0omgNvaXCEllWTTeEHbpKKPLooQ969PJ5qEDYhLKjvjr9D EwfG0Uedfit/inW0u8CHJPy8yJq2vlJWW+I38DqLaxTRfi93h0Gn/+53gU/1tQ8LbJRN8/ RbDEONmbIgTSx3kD78iCug1QwkXn0xPJN+5dIPwngZjVSYqG+F1A1dA33Ju/Cuq++p5dQ/ ejvYxwQDjvIkw1Za6sdpRonWLcimRKKVzl/OvQLFaP2B5DE3W8Mvs9VWm4xJ32bVBNU5sp qUpCBY6BGvw2QjA/Xxp7x+YkacyAU/5Aq0flUmX7sdG/ljZ1+fpuUIUFvkvQsw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777190979; a=rsa-sha256; cv=none; b=HebkfO9HDrB7pG7oMcDKHkmk7ENP6LZZQTAQX2LixDi/OBhQAGOCa6NNdHbwaXfqLVu+pt Wehng210goy13uA/GX+9rRACAeC0251zyGAjgtk6eNyDwdtPO3bKfIsLo/KQWSRWu/1UM1 4CkWvWKlRlGC8D2Yj78/kxe0bZpg6csCFpMEplm713AXSvSJRi+lDflMQLexKoMDqPE0U3 szqw5ehESZFTparfIKI1Ps6qdrcvX+tZtv+43Vx6/bvVYz/iXwEwB/G8tm8Oq1CqzU/hNI tt7IbmUoiRrsUsCbNVKiBE/pYVAkfUnncAji2yl64M7iUzTutug/QvcdmytjZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777190979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KK+KYe95zSQ8U3BhKM7Of934wr+BluWq2iKruT8DFOo=; b=uZpAwkmLYGUoclsaLAEMLuYVo9DFEUb7qYi0YCGy6v5JcyPVrJUEvqcCFhrhMeujoqAxBR zjSbz5CsWD+zxGCC6snyw7hwdaFSZRdJeZqDjNyhQf0XxyYgO7KUAV/LLqIAW9ojzghH84 hxVa8tRh6a9JP+HFisxWi//ljSM7LLIbovoGKj6VXuFZtl0l4cvQo/pq0L49D6/lapQNR0 6Tb/bTmRcgTo9xWlWU4POcwWeLdvu1m5Tbfm4NCSpucL4z1Mn6kq0EdWG79ZozzpOqmSIA Jt/kPqsZqhue0o+bvzVvbGQR94NmY+FyE/lGTsgje1LiTSwDE3PgGmi8RqbfWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3K9b3Fkpz19Xp for ; Sun, 26 Apr 2026 08:09:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30605 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 08:09:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 8e629780d32f - stable/15 - bpf: fix handling the read timeout on ppc64 List-Id: Commits to the stable branches 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: 8e629780d32f4405359e33f128e57a7bb704f684 Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 08:09:34 +0000 Message-Id: <69edc83e.30605.3010c78@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=8e629780d32f4405359e33f128e57a7bb704f684 commit 8e629780d32f4405359e33f128e57a7bb704f684 Author: Michael Tuexen AuthorDate: 2026-04-15 19:24:05 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 08:08:05 +0000 bpf: fix handling the read timeout on ppc64 On platforms other than amd64, BIOCSRTIMEOUT is equal to BIOCSRTIMEOUT32. Therefore, running the COMPAT_FREEBSD32 code basically clears tv_usec on big endian platforms. When tcpdump is used, the timeout requested is 100ms, which gets cleared to 0 on ppc64 platforms. This results in tcpdump showing the packets only when the read buffer is full. Thanks to kib for guiding me to the correct fix. Reported by: ivy Reviewed by: adrian, kib Differential Revision: https://reviews.freebsd.org/D56399 Event: Wiesbaden Hackathon 2026 (cherry picked from commit 04b994d19eec68a6b5d27ff4b0fa223a05f00e1f) --- sys/net/bpf.c | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/sys/net/bpf.c b/sys/net/bpf.c index f598733773d0..ff30aa7a3a9a 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -1439,7 +1439,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, case BIOCGDLTLIST32: case BIOCGRTIMEOUT32: case BIOCSRTIMEOUT32: - if (SV_PROC_FLAG(td->td_proc, SV_ILP32)) { + if (SV_CURPROC_FLAG(SV_ILP32)) { BPFD_LOCK(d); d->bd_compat32 = 1; BPFD_UNLOCK(d); @@ -1447,6 +1447,19 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, } #endif +#if defined(COMPAT_FREEBSD32) + if (SV_CURPROC_FLAG(SV_ILP32)) { + /* + * On platforms other than amd64, BIOC[GS]RTIMEOUT32 is equal to + * BIOC[GS]RTIMEOUT. Since this is difficult to handle in the + * switch command, map them. + */ + if (cmd == BIOCSRTIMEOUT32) + cmd = BIOCSRTIMEOUT; + if (cmd == BIOCGRTIMEOUT32) + cmd = BIOCGRTIMEOUT; + } +#endif CURVNET_SET(TD_TO_VNET(td)); switch (cmd) { default: @@ -1641,23 +1654,19 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, * Set read timeout. */ case BIOCSRTIMEOUT: -#if defined(COMPAT_FREEBSD32) && defined(__amd64__) - case BIOCSRTIMEOUT32: -#endif { struct timeval *tv = (struct timeval *)addr; -#if defined(COMPAT_FREEBSD32) +#ifdef COMPAT_FREEBSD32 struct timeval32 *tv32; struct timeval tv64; - if (cmd == BIOCSRTIMEOUT32) { + if (SV_CURPROC_FLAG(SV_ILP32)) { tv32 = (struct timeval32 *)addr; tv = &tv64; tv->tv_sec = tv32->tv_sec; tv->tv_usec = tv32->tv_usec; - } else + } #endif - tv = (struct timeval *)addr; /* * Subtract 1 tick from tvtohz() since this isn't @@ -1672,31 +1681,24 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, * Get read timeout. */ case BIOCGRTIMEOUT: -#if defined(COMPAT_FREEBSD32) && defined(__amd64__) - case BIOCGRTIMEOUT32: -#endif { - struct timeval *tv; -#if defined(COMPAT_FREEBSD32) && defined(__amd64__) + struct timeval *tv = (struct timeval *)addr; +#ifdef COMPAT_FREEBSD32 struct timeval32 *tv32; struct timeval tv64; - if (cmd == BIOCGRTIMEOUT32) + if (SV_CURPROC_FLAG(SV_ILP32)) tv = &tv64; - else #endif - tv = (struct timeval *)addr; - tv->tv_sec = d->bd_rtout / hz; tv->tv_usec = (d->bd_rtout % hz) * tick; -#if defined(COMPAT_FREEBSD32) && defined(__amd64__) - if (cmd == BIOCGRTIMEOUT32) { +#ifdef COMPAT_FREEBSD32 + if (SV_CURPROC_FLAG(SV_ILP32)) { tv32 = (struct timeval32 *)addr; tv32->tv_sec = tv->tv_sec; tv32->tv_usec = tv->tv_usec; } #endif - break; } From nobody Sun Apr 26 08:10:42 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3KBq10xqz6bDJc for ; Sun, 26 Apr 2026 08:10:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3KBp6fTPz46Cb for ; Sun, 26 Apr 2026 08:10:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777191043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2250pvT5NTim4topA/BEyZB+UEOyf4QCgoPLjaI0ypg=; b=jTEjRuFlImxFhhMt63A7mf/w/ep81stIS1/JmJL5P6dkK4F/ZINBlJQxYiphXV4FG08G+7 KUCYC4mSPXHM4dJhVLbStJLVPQQOLgz1Kho/PlMRo6+RCMiDuKADHouxmPVJut/Kw7wLZw Q9FTF1CrvH37ifxmDgRSaa9MsbouJoWEn5yKUqW3foXwdY9ehucVYh+fTAD+nMuJpD7Cl3 DFJ+6Ngfb08pTEByYjKWujk2iDeJO48U8iV0lVWDJdY0Jn06B1xMJfBpE6DgjHVV8sbQRQ MVzBx3x8bYneJxsUAGR1NIEZkuIWQBo7Wnc1VV0HqYeoItuPZ46haPYmXYZGmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777191043; a=rsa-sha256; cv=none; b=JeIajUf8VUpcdHjZ7pqqfJVhuLzb5fP3q5WIqwoFO6cAWJW7qL/IZ7aUCN5kPchcM3nLA9 pz5HohgmjmCf95/B+q5omuwvcih7ZWJC1myMTAMLvVGoNtIXEFC510JKnY+to1IDIeDEps ibbLPktJ/M6GePIfjJZwwwQ1PW9SyReqDdfy9fv+Ac/lxWFcaOEt4Yz2kuKHfx8w4O2g1R 9qYBIa7WkNoLf6M5iXX3iVa2ba1PyUVdNLryB5G/zFuV70KJLR4ua6BoQJd2VUKkh7VrPg 4qm2VQUQrF6TP96FFaH7fQVsfDvbjWXkLVTndeV+q9k7GO/V8dqukTivJz/45w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777191043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2250pvT5NTim4topA/BEyZB+UEOyf4QCgoPLjaI0ypg=; b=BFCQ5uJYrLITVU5ClbpO7lLg0QI6KMVGZ5dIG3PBDXZTvAqkjXnO9d44KscVl2VLiXcYYF OX8zkTO6y4Dqrybh6b0Ml5dDzHtFph5aLvZqv0yzj0Eho2DpnTER5Go38gsNf7zE7J507e dui3MgtB5vqhwuaMVqb0XwzdPwsFbr1/up0BvGOKsG1eWiCsPTWa5NQQVeyJPo6CEF1a2L LjdKWrtxAHcKfTxwjMJjxFLFxXhtYXuCFIqBgb9P/jBtWn9rvIJZrtxwSg2cIlHc/18GVe dm1O7H2jeHZL19XagOUwpC9oWJomKFfhQAGXGICXkADw5CRG1LKq74ME3RO/gQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3KBp6Dvvz19Xs for ; Sun, 26 Apr 2026 08:10:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31431 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 08:10:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 724ad12c947d - stable/15 - tcp: use RFC 6191 for connection recycling in TIME-WAIT List-Id: Commits to the stable branches 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: 724ad12c947dabaa9f62f81f4342a738e0f42971 Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 08:10:42 +0000 Message-Id: <69edc882.31431.66996632@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=724ad12c947dabaa9f62f81f4342a738e0f42971 commit 724ad12c947dabaa9f62f81f4342a738e0f42971 Author: Michael Tuexen AuthorDate: 2026-04-17 07:11:41 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 08:09:03 +0000 tcp: use RFC 6191 for connection recycling in TIME-WAIT Implement the criteria specified in RFC 6191 for recycling TCP connections in TIME-WAIT. Reviewed by: rscheff, Marius Halden Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D56321 Event: Wiesbaden Hackathon 2026 (cherry picked from commit 3a54aa3b0911bef15e014b8a8185e116efb0a918) --- sys/netinet/tcp_timewait.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index 66103f8d0b11..d90178ee03ec 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -261,12 +261,17 @@ tcp_twcheck(struct inpcb *inp, struct tcpopt *to, struct tcphdr *th, /* * If a new connection request is received * while in TIME_WAIT, drop the old connection - * and start over if the sequence numbers - * are above the previous ones. + * and start over if allowed by RFC 6191. * Allow UDP port number changes in this case. */ if (((thflags & (TH_SYN | TH_ACK)) == TH_SYN) && - SEQ_GT(th->th_seq, tp->rcv_nxt)) { + ((((tp->t_flags & TF_RCVD_TSTMP) != 0) && + ((to->to_flags & TOF_TS) != 0) && + TSTMP_LT(tp->ts_recent, to->to_tsval)) || + (((tp->t_flags & TF_RCVD_TSTMP) == 0) && + ((to->to_flags & TOF_TS) != 0) && + (V_tcp_tolerate_missing_ts == 0)) || + SEQ_GT(th->th_seq, tp->rcv_nxt))) { /* * In case we can't upgrade our lock just pretend we have * lost this packet. From nobody Sun Apr 26 08:16:38 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3KKl46qWz6bDSB for ; Sun, 26 Apr 2026 08:16:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3KKl1wknz47Lp for ; Sun, 26 Apr 2026 08:16:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777191403; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D3PI0woB51zxrsov1zfa48ectcYoc589FQS/5SjEhXs=; b=lMQm4M3shWI2hkodjBxYsKpHL4ymwijnjZgBQpxglgqgTzvxqvT+IIMvbLuWkHZT5RWAOq o1PrWwFcEA+avNwNJmT577YjGs3LgO04ZGGLc/mfeUYENCjC8u6IUbsni/t1eBmZe5SXNa UQIEjTOXE2DwILuCaxfP430WJIqrNCy4FeaotRSxSb+2WDpGUGMypLVpW/bDq979H58dp0 0Q4eZ+34lbqDrUEqF01VlfhDMu2766oK04jXlOdcTZYeMpwkEX/aSrvFd4weQAb1lbL5he MWliiPDKG/zS8SRCuHyee+WZtDll6FSfb2woDGLSGD7XV5k0GJaLv+/mWx+paA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777191403; a=rsa-sha256; cv=none; b=MRyHlMjD21Z7ylfXCJM8+0ie9f6lMlves0YxQqHxGXSr92rJj8O9ohdPOGfL9FD6hQsWVE qCGp+4rOMJU/CRJeraTu/metARypV1ePuVu9EgxY/P3gbEPz0u/WDY7ttfwyM2N4OTy9s1 /3/ogwW65dtTod45JA/lhigJYW1jnOzqQ/4lNMxpKjUmpdaEgatYVpiDoR1cFCcPWnjNH2 0U+v9FfWdZ6HHXTvIEqsFTjTCs1+Ri2X300Ehf1gi0NegpLnyyPrqX+QmcuKjELIp0YiAq Gur9S1pEUvA76gN+HLUDvUNi5DgTKUrss9vA5kJM0RhjGf6yM4YU1qTdaFpmWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777191403; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D3PI0woB51zxrsov1zfa48ectcYoc589FQS/5SjEhXs=; b=jCxRg0xSBfbH4T9xWDqWfU7C44vjl7OjBSuh2jTLZpdpdm7h9vuJrAMu6cIuPXs7ic6GQI 2h91G9jPU0JFQfUbhCZafYN+Ohw0Tsqlj0FyYK3dJDzFS6b+N08DNb0rWs/nlrV9HifcGB C9YplQRWyVOgei6Xg6IawAYjXFrh0faNwgoCa7Yq9HKR369jzhz7bHvKEJK9ysKe2WjmiN jaAWnR1gImMMpEK36OEjKUxf/D7xacf+3mJbMq7jOxhQFiue1jmritfNAnfiNdroZHKy1Y cnqdCUzJHoEb0yXas3FaBpo833YsH7XziMxZb4qLWad5OH+h+jQfL+yR5W9nDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3KKl0sJpz1BGF for ; Sun, 26 Apr 2026 08:16:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31438 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 08:16:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Timo =?utf-8?Q?V=C3=B6lker?= From: Michael Tuexen Subject: git: 453958b8d889 - stable/14 - ip: improve deferred computation of checksums List-Id: Commits to the stable branches 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: 453958b8d8890f707215cb6641df6865d662b9d9 Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 08:16:38 +0000 Message-Id: <69edc9e6.31438.468db525@gitrepo.freebsd.org> The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=453958b8d8890f707215cb6641df6865d662b9d9 commit 453958b8d8890f707215cb6641df6865d662b9d9 Author: Timo Völker AuthorDate: 2026-01-20 10:30:19 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 06:14:20 +0000 ip: improve deferred computation of checksums This patch adds the same functionality for the IPv4 header checksum as was done erlier for the SCTP/TCP/UDP transport checksum. When the IP implementation sends a packet, it does not compute the corresponding checksum but defers that. It will determine whether the network interface selected for the packet has the requested capability and computes the checksum in software, if the selected network interface does not have the requested capability. Do this not only for packets being sent by the local IP stack, but also when forwarding packets. Furthermore, when such packets are delivered to a local IP stack, do not compute or validate the checksum, since such packets have never been on the wire. This allows to support checksum offloading also in the case of local virtual machines or jails. Support for epair interfaces will be added in a separate commit. Reviewed by: pouria, tuexen Differential Revision: https://reviews.freebsd.org/D54455 Event: Wiesbaden Hackathon 2026 (cherry picked from commit 6f15ba8004c3fdc2fb12f0cd6618d1b3a40aab7d) --- share/man/man9/mbuf.9 | 5 +++-- sys/netinet/ip_fastfwd.c | 32 +++++++++++++++++++++++--------- sys/netinet/ip_input.c | 6 ++++++ 3 files changed, 32 insertions(+), 11 deletions(-) diff --git a/share/man/man9/mbuf.9 b/share/man/man9/mbuf.9 index e4f30962ccab..265a6dddda98 100644 --- a/share/man/man9/mbuf.9 +++ b/share/man/man9/mbuf.9 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 1, 2025 +.Dd January 20, 2026 .Dt MBUF 9 .Os .\" @@ -1216,13 +1216,14 @@ in is not set, since SCTP does not use a pseudo header checksum. .Pp If IP delivers a packet with the flags +.Dv CSUM_IP , .Dv CSUM_SCTP , .Dv CSUM_TCP , or .Dv CSUM_UDP set in .Va csum_flags -to a local SCTP, TCP, or UDP stack, the packet will be processed without +to a local IP, SCTP, TCP, or UDP stack, the packet will be processed without computing or validating the checksum, since the packet has not been on the wire. This can happen if the packet was handled by a virtual interface such as diff --git a/sys/netinet/ip_fastfwd.c b/sys/netinet/ip_fastfwd.c index eb1dd5c3e17f..e99ac47fe988 100644 --- a/sys/netinet/ip_fastfwd.c +++ b/sys/netinet/ip_fastfwd.c @@ -362,15 +362,20 @@ passin: } /* - * Decrement the TTL and incrementally change the IP header checksum. - * Don't bother doing this with hw checksum offloading, it's faster - * doing it right here. + * Decrement the TTL. + * If the IP header checksum field contains a valid value, incrementally + * change this value. Don't use hw checksum offloading, which would + * recompute the checksum. It's faster to just change it here + * according to the decremented TTL. + * If the checksum still needs to be computed, don't touch it. */ ip->ip_ttl -= IPTTLDEC; - if (ip->ip_sum >= (u_int16_t) ~htons(IPTTLDEC << 8)) - ip->ip_sum -= ~htons(IPTTLDEC << 8); - else - ip->ip_sum += htons(IPTTLDEC << 8); + if (__predict_true((m->m_pkthdr.csum_flags & CSUM_IP) == 0)) { + if (ip->ip_sum >= (u_int16_t) ~htons(IPTTLDEC << 8)) + ip->ip_sum -= ~htons(IPTTLDEC << 8); + else + ip->ip_sum += htons(IPTTLDEC << 8); + } #ifdef IPSTEALTH } #endif @@ -468,9 +473,18 @@ passout: gw = (const struct sockaddr *)dst; /* - * If TCP/UDP header still needs a valid checksum and interface will not - * calculate it for us, do it here. + * If the IP/SCTP/TCP/UDP header still needs a valid checksum and the + * interface will not calculate it for us, do it here. + * Note that if we defer checksum calculation, we might send an ICMP + * message later that reflects this packet, which still has an + * invalid checksum. */ + if (__predict_false(m->m_pkthdr.csum_flags & CSUM_IP & + ~nh->nh_ifp->if_hwassist)) { + ip->ip_sum = 0; + ip->ip_sum = in_cksum(m, (ip->ip_hl << 2)); + m->m_pkthdr.csum_flags &= ~CSUM_IP; + } if (__predict_false(m->m_pkthdr.csum_flags & CSUM_DELAY_DATA & ~nh->nh_ifp->if_hwassist)) { in_delayed_cksum(m); diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 7c01c4959841..ba7a9802c0db 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -526,6 +526,12 @@ ip_input(struct mbuf *m) if (m->m_pkthdr.csum_flags & CSUM_IP_CHECKED) { sum = !(m->m_pkthdr.csum_flags & CSUM_IP_VALID); + } else if (m->m_pkthdr.csum_flags & CSUM_IP) { + /* + * Packet from local host that offloaded checksum computation. + * Checksum not required since the packet wasn't on the wire. + */ + sum = 0; } else { if (hlen == sizeof(struct ip)) { sum = in_cksum_hdr(ip); From nobody Sun Apr 26 08:22:18 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3KSB1gV8z6bFND for ; Sun, 26 Apr 2026 08:22:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3KSB0gKvz47w5 for ; Sun, 26 Apr 2026 08:22:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777191738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ucYsJDWdbtc9qroOxUUOLS7gg7LuMtF+QXcMysmTABs=; b=xIL/WsVNnqWUpR808xo5Lb6aysX0H0QB1hDcmhgKmCr6FnEJWKVswEW5jwKPmBjWx9Urur CZq6524K0Bq14N75vrFjzwPby6JeCK5/kXLBDYm/tjjCHxHlmxdE+GUo8tmQJY6PMkXZIx YPSlo7nGarPzYOBe3S/9OG9G0Kl/ueqaVmQyytHdHdQdGsrDEDSvvQ2P9P3EV4dmVhJmPI B9/EfX62r3OHLVj2G4lsn8i57/q+di4em9XbAjAcbzH877ZYLOmQW3oYXuYBKx6oxdaGMy gdmsRsbExaWrLYEF5ZKpfzRmbCp8W9VhS9e3NmWPNJZyzGFKgOOxK3AlRVGRZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777191738; a=rsa-sha256; cv=none; b=Fex89m1AZQTWXy8Xc6nrWoKH+0xT+2uK3f5X6YrwmTkJFRCPmbKJLMhFAmF9yXvfq7sMoY ty0KgD80RuVjwuqxu2NoIQNexH64ZrjFox3/YTKTsq+9aNSB/bPc6hK8yqhtKwvJtDTXQE lGAmxwTZ/IVEwEG1y5144UQ+gxhlh8T2EPa+bQ/vpLvgpAKfBljpvLhG/NyL8A3PK10Gx1 892/RVKUmqqON+NiItXUpJtf15qVKPvdfjR12GPIqg2MIF6EzWLcSRnt1XH9vROpkXWSIS fSbQfXbocq8iYFZDzzm6pbH2iT/g4eRooiaucI6Au5gf8iQYwnVAF9IOfkI6IQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777191738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ucYsJDWdbtc9qroOxUUOLS7gg7LuMtF+QXcMysmTABs=; b=yd0+SRcuk5qzqISPdaqDtQIeoR9sIwI+wehehwgB9xLEwfDKfIOMdq9Y8v7jpZfVLXKgim O3XEm0tkLyDuyTkBt3poRPB9jU1kesxpm7+fmqWdsgwQ6WcMUZ0G13uKuuNPm+z8hvvOtx gvFhmVvsEmI9DtYV60m8xSO2iFbKwSD8mCxJQH5UIKi60qHhEQtV2WOVBOo19fWsWHL3dg QptUeX4CEGjbGlxULp3hRNFxeCHDQ2c3U+/AUdUH5aDY+nviG5kvMm8nF62wpV6fB0yE9K iefUkl8ugZ8MfNiHsKSZ/Zww2EKifwDDiQdCA1D1OaOM0ko/7jC/5+LlqqUfVg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3KSB05Bpz1BVg for ; Sun, 26 Apr 2026 08:22:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27cea by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 08:22:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Timo =?utf-8?Q?V=C3=B6lker?= From: Michael Tuexen Subject: git: acbc8e49ae0f - stable/14 - epair: add VLAN_HWTAGGING List-Id: Commits to the stable branches 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: acbc8e49ae0fdf22fd9e40e031fa6312a815068a Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 08:22:18 +0000 Message-Id: <69edcb3a.27cea.7b3fc557@gitrepo.freebsd.org> The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=acbc8e49ae0fdf22fd9e40e031fa6312a815068a commit acbc8e49ae0fdf22fd9e40e031fa6312a815068a Author: Timo Völker AuthorDate: 2026-01-30 10:54:33 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 06:20:49 +0000 epair: add VLAN_HWTAGGING Add capability VLAN_HWTAGGING to the epair interface and enable it by default. When sending a packet over a VLAN interface that uses an epair interface, the flag M_VLANTAG and the ether_vtag (which contains the VLAN ID and/or PCP) are set in the mbuf to inform the hardware that the VLAN header has to be added. The sending epair end does not need to actually add a VLAN header. It can just pass the mbuf with this setting to the other epair end, which receives the packet. The receiving epair end can just pass the mbuf with this setting to the upper layer. Due to this setting, the upper layer believes that there was a VLAN header that has been removed by the interface. If the packet later leaves the host, the outgoing physical interface can add the VLAN header in hardware if it supports VLAN_HWTAGGING. If not, the implementation of Ethernet or bridge adds the VLAN header in software. Reviewed by: zlei, tuexen Differential Revision: https://reviews.freebsd.org/D52465 Event: Wiesbaden Hackathon 2026 (cherry picked from commit 574d46b25ab6f42ad97017bb8b72520e9539e36f) --- share/man/man4/epair.4 | 20 +++++++++++++++++++- sys/net/if_epair.c | 28 ++++++++++++++++------------ 2 files changed, 35 insertions(+), 13 deletions(-) diff --git a/share/man/man4/epair.4 b/share/man/man4/epair.4 index 0014836b01ea..1cc9c41fd69e 100644 --- a/share/man/man4/epair.4 +++ b/share/man/man4/epair.4 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 2, 2025 +.Dd January 30, 2026 .Dt EPAIR 4 .Os .Sh NAME @@ -113,6 +113,7 @@ The .Nm has RXCSUM and RXCSUM6 enabled because it may receive a packet where the checksum has already been validated by a physical interface. +.Pp The .Nm supports TXCSUM and TXCSUM6 for TCP and UDP, but only by forwarding the order @@ -130,6 +131,23 @@ enables/disables it on the other end). In case one end is in a bridge and the bridge disabled TXCSUM or TXCSUM6, this avoids a sender to send packets with checksum offloading into the bridge by using the other end. +.Pp +The +.Nm +supports VLAN_HWTAGGING without actually adding a VLAN tag. +The sending +.Nm +end just forwards the offloading information to the other end. +The receiving +.Nm +end leaves the offloading information set to pretend that there was a VLAN tag +in the Ethernet header, which has been removed already. +To avoid a situation where the receiving +.Nm +end has VLAN_HWTAGGING disabled, this capability is synchronized between the +.Nm +interface pair (i.e., enabling/disabling the capability on one end +enables/disables it on the other end). .Sh SEE ALSO .Xr ioctl 2 , .Xr altq 4 , diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c index 3cedd63a5320..3b229f6280b9 100644 --- a/sys/net/if_epair.c +++ b/sys/net/if_epair.c @@ -150,10 +150,6 @@ epair_clear_mbuf(struct mbuf *m) m->m_pkthdr.csum_flags &= ~CSUM_SND_TAG; } - /* Clear vlan information. */ - m->m_flags &= ~M_VLANTAG; - m->m_pkthdr.ether_vtag = 0; - m_tag_delete_nonpersistent(m); } @@ -493,6 +489,7 @@ epair_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifp->if_capenable = ifr->ifr_reqcap | IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6; epair_caps_changed(ifp); + VLAN_CAPABILITIES(ifp); /* * If IFCAP_TXCSUM(_IPV6) has been changed, change it on the * other epair interface as well. @@ -501,17 +498,23 @@ epair_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) * In that case this capability needs to be disabled on the * other epair interface to avoid sending packets in the bridge * that rely on this capability. + * Do the same for IFCAP_VLAN_HWTAGGING. If the sending epair + * end has this capability enabled, the other end has to have + * it enabled too. Otherwise, epair would have to add the VLAN + * tag in the Ethernet header. */ sc = ifp->if_softc; if ((ifp->if_capenable ^ sc->oifp->if_capenable) & - (IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6)) { + (IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6 | IFCAP_VLAN_HWTAGGING)) { sc->oifp->if_capenable &= - ~(IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6); + ~(IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6 | + IFCAP_VLAN_HWTAGGING); sc->oifp->if_capenable |= ifp->if_capenable & - (IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6); + (IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6 | + IFCAP_VLAN_HWTAGGING); epair_caps_changed(sc->oifp); + VLAN_CAPABILITIES(sc->oifp); } - VLAN_CAPABILITIES(ifp); error = 0; break; @@ -626,10 +629,11 @@ epair_setup_ifp(struct epair_softc *sc, char *name, int unit) ifp->if_dname = epairname; ifp->if_dunit = unit; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; - ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_TXCSUM | - IFCAP_TXCSUM_IPV6 | IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6; - ifp->if_capenable = IFCAP_VLAN_MTU | IFCAP_TXCSUM | - IFCAP_TXCSUM_IPV6 | IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6; + ifp->if_capabilities = + IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING | + IFCAP_TXCSUM | IFCAP_RXCSUM | + IFCAP_TXCSUM_IPV6 | IFCAP_RXCSUM_IPV6; + ifp->if_capenable = ifp->if_capabilities; epair_caps_changed(ifp); ifp->if_transmit = epair_transmit; ifp->if_qflush = epair_qflush; From nobody Sun Apr 26 08:23:11 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3KTC4j2rz6bFZd for ; Sun, 26 Apr 2026 08:23:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3KTC1KFXz49QG for ; Sun, 26 Apr 2026 08:23:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777191791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CMouzpV1KJSSbdK82xrABF1B1OcQFIgmx/4QTvmDtys=; b=b9Bly7/YkvUZ3WLU1UZzzrqCQeUMG3ikh3nGTlRt0U1xlJ6vkZ4uHMbZLRAswLkY90K/Zu dUHQPH8LHLohhqXWGvhBVm2FeuFHA52TjAfsjU51Uegj2HM+1WZOxQcHNVLcRUcfZisSdI etSgiRaNFx09wLCOeQaW4oIcZy/5Rq024tdG3sMOsX2fXMgKXiVqN4K0YANrj3HXWZecLL Rvs7qzjAhtgusWS0hAO6F+ipnHagUS7yLnXrlXbMLAHqZTDrK1TRF15hQ4JvPGCM8vyAO9 STziDnZUDA3KOMG2b/SUBPGu3P08mZ0d3zrTPMO93KMPW89m7XyWgEcfUSwYOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777191791; a=rsa-sha256; cv=none; b=ae/d4peDJkfDxCVnOUbp0ZIJJ2jrCdPPi1cwTCXJiSQPxXEhlVES8j03xB57iBSPDoe2TX vtwxGS5xIq7ivwa2uJCO954tfLMiCeyefCpGW+URZFinQt4/rA20Sgujre3PX5Xqxshb4G W/+5G34iQ7Btqw7Yj54uebS5p7S502oolwK0qUOoa84cqH8uMNmE6RfQTzDFxvbi3c8fOX hsDdeWjhHCSQ9AHkuswC3Ba7TyIn7kskaEQDAdMiHQ+DWrD3lDFxd1FIb+kjfx5wgT4AI1 X8TPHI4geflowTh+WlJKR//59CE9WGjXmDgg1A6GLa0/UyOJtRiWHa8iSCLatw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777191791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CMouzpV1KJSSbdK82xrABF1B1OcQFIgmx/4QTvmDtys=; b=DWUzPr0pKycnI7in6ZtB8CTDB0fWuS2/dpUmfC30AvELMl3/DWlU9I6nH/njIxEDSp9wCJ vxeRw3+sMH1h+iIxTfpoWFHIW4BwTNL+UHaSEaiHodscHMYWybZpZaMD3yU4V+WIreDCQF zM1HQh5TeyAV9k9WdkUFXQjnDwI7B8B9tk00SAHMY+bxJLaDgGOmolp7QhqwZHZqmx+pAQ BsP4lhRGwr8srG0367YTKO2CBpEy4VvAcw86UGkKRKUQEhxzPZBzgTTP0Zmod/SbOq1X6n qJBpmXDss4Uq6D6CsX+eszZCdMuFlBMoTg4nlx8PKUKw5f3EB9A+APklX6kldA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3KTC0wt5z1B0X for ; Sun, 26 Apr 2026 08:23:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30bb7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 08:23:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: a0a0fa1dd922 - stable/14 - ure: improve checksum offloading List-Id: Commits to the stable branches 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: a0a0fa1dd92289d3b7b5336c409303662a7ec7fa Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 08:23:11 +0000 Message-Id: <69edcb6f.30bb7.50c08988@gitrepo.freebsd.org> The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=a0a0fa1dd92289d3b7b5336c409303662a7ec7fa commit a0a0fa1dd92289d3b7b5336c409303662a7ec7fa Author: Michael Tuexen AuthorDate: 2026-01-31 10:42:10 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 06:21:44 +0000 ure: improve checksum offloading This patch fixes three issues: (1) Initially, set the hwassist flags correctly when enabling transmit checksum offload for TCP/IPv6 and UDP/IPv6. (2) Keep the hwassist flags in sync with the capabilities when changing txcsum. (3) Keep the hwasssit flags in sync with the capabilities when changing txcsum6. Without this patch, transmit checksum offloading for TCP/IPv6 and UDP/IPv6 is never used and transmit checksum offloading for IPv4, TCP/IPv4 and UDP/IPv4 is always used, even if disabled via ifconfig ue? -txcsum. Reviewed by: Timo Völker Differential Revision: https://reviews.freebsd.org/D54974 Event: Wiesbaden Hackathon 2026 (cherry picked from commit 7b6e84c9ac5668134ab2d075019ef0b827d90c84) --- sys/dev/usb/net/if_ure.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/usb/net/if_ure.c b/sys/dev/usb/net/if_ure.c index b0ddd8af7285..e6b101587421 100644 --- a/sys/dev/usb/net/if_ure.c +++ b/sys/dev/usb/net/if_ure.c @@ -1011,6 +1011,7 @@ ure_attach_post_sub(struct usb_ether *ue) if_sethwassist(ifp, CSUM_IP|CSUM_IP_UDP|CSUM_IP_TCP); #ifdef INET6 if_setcapabilitiesbit(ifp, IFCAP_HWCSUM_IPV6, 0); + if_sethwassistbits(ifp, CSUM_IP6_UDP|CSUM_IP6_TCP, 0); #endif if_setcapenable(ifp, if_getcapabilities(ifp)); @@ -1459,6 +1460,7 @@ ure_ioctl(if_t ifp, u_long cmd, caddr_t data) if ((mask & IFCAP_TXCSUM) != 0 && (if_getcapabilities(ifp) & IFCAP_TXCSUM) != 0) { if_togglecapenable(ifp, IFCAP_TXCSUM); + if_togglehwassist(ifp, CSUM_IP|CSUM_IP_UDP|CSUM_IP_TCP); } if ((mask & IFCAP_RXCSUM) != 0 && (if_getcapabilities(ifp) & IFCAP_RXCSUM) != 0) { @@ -1467,6 +1469,7 @@ ure_ioctl(if_t ifp, u_long cmd, caddr_t data) if ((mask & IFCAP_TXCSUM_IPV6) != 0 && (if_getcapabilities(ifp) & IFCAP_TXCSUM_IPV6) != 0) { if_togglecapenable(ifp, IFCAP_TXCSUM_IPV6); + if_togglehwassist(ifp, CSUM_IP6_UDP|CSUM_IP6_TCP); } if ((mask & IFCAP_RXCSUM_IPV6) != 0 && (if_getcapabilities(ifp) & IFCAP_RXCSUM_IPV6) != 0) { From nobody Sun Apr 26 08:24:20 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3KVX67nLz6bFbf for ; Sun, 26 Apr 2026 08:24: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3KVX3vJsz49dL for ; Sun, 26 Apr 2026 08:24:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777191860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=igyd5hVKPaL7KkO/uX00oJf8GWP5+cyB5h90xXYfrGY=; b=GqvHDFtLzq8ffVQxhsEPOuAKVtAgj0mkCy+zKHY4QMh3zUTtEdSMXrtgTpRtS9UtCcoB4L psKbbachwQ49BBlsTY370fQdgX0iOsBdqUV+Rb+el6pZAgQA1YFkIzIvvZjd6zhDFfdpnl n/iAiE/Beha59SeK0bSPMR66skx/dDXrE4P5mGWNhc9HUNi65WHSawhi4Y92jwXt7wPETB OvO3FsVfAQ3ijPe7CSx/5QZIoPqI0v/pk079u15KMc0PROeQR60zdxVuDyGK9ROaQCENuz nHnPaYv16o0wIHf0O0DuaN4y2i2bFG/3J9DgCeVmffjZBJaVrnAEPBzV+67rzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777191860; a=rsa-sha256; cv=none; b=KSPTGtMOC9p30jKNnIHl4SL66VqQ52VGSE74DG0aI2sVxuo/nkNtfet/DNoIGvaKYGpecO 0n+iqhRxRZVEHF26tTXhO0s7f8gOtpBueyXu3FNPu80KDlM4lqLdIhZOxCOMbfZGNDsICd pe97KXDlDEmTLb6i7ucwU8OMl2b6HaC2Yd40Pl4vcRlqh3TrN5Q/KH4m4BaEEJD/xli4Po r0a9QR7unuC7o3VhC1hlQ1C/2yZtTJ2QKlc0KByrAXjlVlrVyZn6ceD1nTr6HPObMb1q4Y 22rR2Shy8S/gtxgWVdAyhusle42zzQVqn4Vx9u3KB45Xs8M5EJuEolLozdlAFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777191860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=igyd5hVKPaL7KkO/uX00oJf8GWP5+cyB5h90xXYfrGY=; b=vi52E1LXf6dM1TusziiHpnOhomV9L8mhwFhIeA2a6YF84ryx3OpMTfqIoOX+pexbgnyA8l bv5fmF8wyUdT4M86KpYoD5aE8N82XihxBxYraUB6sLjsGv/Mlv0mnCm8dJAXKOvrVjqpDo u9IrSzOGOWxyt7OMGmA7F9P+SuUTgvOigOe2a3M7/9Q07pcqUHwVxyTd0bJopCED1ASDPN raRAJnLO8Z02/xwGl2qOSlFiPWIDsfe+f0UFtMRrEU5h8FnifBhREJz0XK/5i74So6tvTz JpOehDVaSSJZ9LeS/eeBzXKfiXHdrDbbo/aFp5vVr7g8/SZ6kr/UQTuA89Ih4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3KVX3KRVz19xP for ; Sun, 26 Apr 2026 08:24:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30cc8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 08:24:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 70cfba4a0462 - stable/14 - sctp: fix socket type created by sctp_peeloff() List-Id: Commits to the stable branches 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: 70cfba4a0462df22ef48b84870e4b4e54079c1ea Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 08:24:20 +0000 Message-Id: <69edcbb4.30cc8.6eca2864@gitrepo.freebsd.org> The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=70cfba4a0462df22ef48b84870e4b4e54079c1ea commit 70cfba4a0462df22ef48b84870e4b4e54079c1ea Author: Michael Tuexen AuthorDate: 2026-01-31 18:11:08 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 06:22:42 +0000 sctp: fix socket type created by sctp_peeloff() When calling sctp_peeloff() on a SOCK_SEQPACKET socket, the created and returned socket has the type SOCK_STREAM. This is specified in section 9.2 of RFC 6458. Reported by: Xin Long Event: Wiesbaden Hackathon 2026 (cherry picked from commit d195b3783fa4de5c1a95f6d95eb9444abce6778b) --- sys/kern/uipc_socket.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 4687d29b33b1..4fca51a853a3 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1280,7 +1280,7 @@ solisten_enqueue(struct socket *so, int connstatus) #if defined(SCTP) || defined(SCTP_SUPPORT) /* - * Socket part of sctp_peeloff(). Detach a new socket from an + * Socket part of sctp_peeloff(). Create a new socket for an * association. The new socket is returned with a reference. * * XXXGL: reduce copy-paste with solisten_clone(). @@ -1292,6 +1292,8 @@ sopeeloff(struct socket *head) VNET_ASSERT(head->so_vnet != NULL, ("%s:%d so_vnet is NULL, head=%p", __func__, __LINE__, head)); + KASSERT(head->so_type == SOCK_SEQPACKET, + ("%s: unexpecte so_type: %d", __func__, head->so_type)); so = soalloc(head->so_vnet); if (so == NULL) { log(LOG_DEBUG, "%s: pcb %p: New socket allocation failure: " @@ -1299,7 +1301,7 @@ sopeeloff(struct socket *head) __func__, head->so_pcb); return (NULL); } - so->so_type = head->so_type; + so->so_type = SOCK_STREAM; so->so_options = head->so_options; so->so_linger = head->so_linger; so->so_state = (head->so_state & SS_NBIO) | SS_ISCONNECTED; From nobody Sun Apr 26 08:25:10 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3KWW166pz6bFjq for ; Sun, 26 Apr 2026 08:25:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3KWV4BDDz4B3s for ; Sun, 26 Apr 2026 08:25:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777191910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZtJbpeDQ/oZ0hZ9E4S4k5AJDPli42hyTX2/bk1gJQno=; b=sdZGfznD814yxvpHtp49aeFIehaL/yYXv7R29RziQPFhvGBcuHTjZ8/fFsdSODMxYOcQ4I TFpUlsVT2aZIaqml1wlEVlME4o1097Nm3XMRI85a7hW3CvG4KIF8m14xbLmtzEbdhAeIgi hnetaPGyPLEzP5PBG9/xjSxhh24VKtICCl6dMco1mwF1k6dio+nNmgz4fQEFb/xNxZUej1 GAArFcaefZMLMYkmlU3x8gKVsdrju3WSRnbUT9hrR/RUeEk+/shynC2U3WTzonQdfpcdsg vq8etZ+AbqHRX5hJorb5LUq9zjK+VURtwQcH6gRfpngehRGjc/zQwyhstCtPrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777191910; a=rsa-sha256; cv=none; b=Fmja9pmDcCwu///pHd30OM53h7GAjrJDgrTrFyXZlKsV3TkCGdsbi5pcPLBBSSxAIJpMki XBpmfJlFSR4FleU+nWtPh3JaYhOPA58kXEItpJUXyndDBA3NFYgDu7UEUdix102UVj5b2c za2rCmbiRk8w8Dezl+WtHptAjRPbdQXmul6E2bqKrKo8jMjyc5lYzLr8yBU4FStzr78jg8 qRTfdaEK+aShA3bgkNLtAbxbjMBPe/1cdq5QOwdxZx7jty4MBd4qfOUx0zqApl9V8KBi2j y6fG28QjwOb+eoPZ1qd2pOMFXSOL7XlrAC5XMDMsgB7rvI1uqOkHZckKfJUU7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777191910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZtJbpeDQ/oZ0hZ9E4S4k5AJDPli42hyTX2/bk1gJQno=; b=RpOdIWlrYLlm4MUO9j6wkaAsNaPo0ppvNPbPPzAKiSOj4EUzw++nhcxAp7iKq6oYDjDBT1 XsoS5fOA/c8aAzdzuOMkCTzpKxrcBoOAIZcAax5cDwQQdBmrFg+Hkk91bnGcMHRPSCJNpA GS2gEebyAmKI9oONVbZVTPRaGzfPbZvrGG4PltgiYmxHwuquFgL/1nl/sJqAquaXESUv8E W7s/tKUolLQGqxHf2kF2MBbJB2uKL2XomwpMWGE0fLNGmtL/lOM3JAIr0BoCVv4nfN2mAF SIki80ER1xZ8uYNa/ge8uNtRecFkous7F2UL6uU43Y1WAQxXbSj+spNDu5QlZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3KWV3jnTz1B0Z for ; Sun, 26 Apr 2026 08:25:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27d68 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 08:25:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Timo =?utf-8?Q?V=C3=B6lker?= From: Michael Tuexen Subject: git: d3234683f88d - stable/14 - ifinfo: improve output of hwassist 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d3234683f88d7f4a8c1b72d64184435362728ce3 Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 08:25:10 +0000 Message-Id: <69edcbe6.27d68.3468c951@gitrepo.freebsd.org> The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=d3234683f88d7f4a8c1b72d64184435362728ce3 commit d3234683f88d7f4a8c1b72d64184435362728ce3 Author: Timo Völker AuthorDate: 2026-02-08 20:02:58 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 06:23:47 +0000 ifinfo: improve output of hwassist value In addition to print the hexadecimal number hwassist, also print the symbolic names of the corresponding CSUM_* flags. Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D55055 Event: Wiesbaden Hackathon 2026 (cherry picked from commit d84870d90bafe75eb87759df0ab41ff0214c866e) --- tools/tools/ifinfo/ifinfo.c | 48 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/tools/tools/ifinfo/ifinfo.c b/tools/tools/ifinfo/ifinfo.c index 89d17f0c75fa..e8837de0b383 100644 --- a/tools/tools/ifinfo/ifinfo.c +++ b/tools/tools/ifinfo/ifinfo.c @@ -30,6 +30,7 @@ #include /* for PF_LINK */ #include #include +#include #include #include @@ -38,6 +39,8 @@ #include #include #include +#include +#include #include #include @@ -149,6 +152,47 @@ main(int argc, char **argv) return retval; } +/* code after this line copied or based on code from src/sys/kern/subr_prf.c */ +static inline bool +isbitpos(char c) +{ + return (c != '\0' && (c <= ' ' || (c & 0x80) != 0)); +} + +static inline bool +isprintnospace(char c) +{ + return (isprint(c) && c != ' '); +} + +static void +print_bits(uintmax_t num, const char *bitstring) +{ + bool first; + const char *c; + int shift; + + c = ++bitstring; + first = true; + while (isbitpos(*c)) { + if ((*c & 0x80) != 0) + shift = *c++ & 0x7f; + else + shift = *c++ - 1; + if (num & (1ULL << shift)) { + putchar(first ? (first = false, '<') : ','); + for (; isprintnospace(*c); ++c) + putchar(*c); + } else + for (; isprintnospace(*c); ++c) + continue; + } + if (!first) { + putchar('>'); + } +} +/* code before this line copied or based on code from src/sys/kern/subr_prf.c */ + static void printit(const struct ifmibdata *ifmd, const char *dname) { @@ -182,8 +226,10 @@ printit(const struct ifmibdata *ifmd, const char *dname) printf("\tinput queue drops: %lu\n", ifmd->ifmd_data.ifi_iqdrops); printf("\tpackets for unknown protocol: %lu\n", ifmd->ifmd_data.ifi_noproto); - printf("\tHW offload capabilities: 0x%lx\n", + printf("\tHW offload capabilities: 0x%lx", ifmd->ifmd_data.ifi_hwassist); + print_bits(ifmd->ifmd_data.ifi_hwassist, CSUM_BITS); + printf("\n"); printf("\tuptime at attach or stat reset: %lu\n", ifmd->ifmd_data.ifi_epoch); #ifdef notdef From nobody Sun Apr 26 08:29:51 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3Kcw0wC8z6bFyq for ; Sun, 26 Apr 2026 08:29:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3Kcv6n0cz4CHm for ; Sun, 26 Apr 2026 08:29:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777192192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hawPJKem066DT3qYU6E8Om7yAklPrRo/PU0YDRYunaM=; b=mUgUfSkLEDgcf9BxNlC6JxL+ljvQraco+CHr06N8TxicdNgPmmcN01JXX05TMjy4ioJUx1 Fzs3A6jIH+2E1oEBljoohgnBQKbsA2YVwO/RSbpsfQzgqJkzL97C+cI1CrBVdFHkaYqvAf CrODjiPIlejn+nKM6LFjW4aqIuKex3+Mi2xNeXQ+I/Bkn/Kyk0w2USQAjLPC2eaFyw0pqz jSykcAheyQBlLANVChHN3CwBd+SAFc8Z5OrLNXZqacsdxxoleS7srhbr7RJj4TFWYXGuOk ppNIkDJ6eXmTRywm/hcmwau1pn7HVAaVRmUEVdzwQ+g5UGwgveUmYtc80RCOFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777192191; a=rsa-sha256; cv=none; b=RWxPyOuLoV1lD8zuiCEVl1fSiU+WX2iK1SD/yh2e34shA0FE2Q7hVpfP4Am2rTO5ONzkQE jUwyHoqU4fUzU0ILQv+cNUGUbLbYvlvmVDfCUKUkxcvl90korMsPjnGOkDy2r4HDBbq13a jgt+R+p3ZvLiD872Pf4rr7obxAicPT8L7vtZPdWFzk6GCYrNGDATr3ADkjZ35T0nk9Kd0k G+s3P+mKfjQSRakiclcYfqCVhpeF6OOwTNyOjpaca3DvYMA1AxtLnR8ZjMp2CEJd+PDR6m xCLQS9+ciajU9wou55hY44hIEC5O7As66u5mXJHbdg4A8mimzrHsmM5dgTuRYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777192191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hawPJKem066DT3qYU6E8Om7yAklPrRo/PU0YDRYunaM=; b=MX335S3wkKh/Ci0MX/ZNtB16sT7DMbW3mvcQalyuruWvMRvHr8TjvLZUmpyAOmMyH3P57P 4zgFbFuC8piqpjIcRouITOYzTWxJwD6NJTbji7apDete1twAgSHvDzUBT2l/m1l2KrZGSz zOC5z7o82Yzop0S931zhGuhowCYWQk34xyEVdB1CDOWuJQEEmCFS1JFbZhUg+vy/FFSYlm Rrj7COOWTPdYtSCCk7vwbKlCYwKnr5cbATdUe+ICaFtwrqBWaTUoq3Fo54jlgn0M7SMIWw YV2LI235WH5fRxQ8ZU6FMnOi4Roj/sp1ZctKJUGrXjZTQzgS5Y8tCl16DTLgIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3Kcv4xgDz1BF4 for ; Sun, 26 Apr 2026 08:29:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27d6d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 08:29:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 32067a7f49a3 - stable/14 - ure: improve transmit checksum offloading List-Id: Commits to the stable branches 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: 32067a7f49a37a5b1507794df95799ceecc26ad9 Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 08:29:51 +0000 Message-Id: <69edccff.27d6d.4ebd82e4@gitrepo.freebsd.org> The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=32067a7f49a37a5b1507794df95799ceecc26ad9 commit 32067a7f49a37a5b1507794df95799ceecc26ad9 Author: Michael Tuexen AuthorDate: 2026-02-08 20:11:18 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 06:28:16 +0000 ure: improve transmit checksum offloading Apparently, the name of the variable l4off was correct. Providing the offset to the TCP or UDP header allows the transmit checksum offload to work for TCP/IPv4, TCP/IPv6, UDP/IPv4, and UDP/IPv6. Reported by: vishwin Reviewed by: vishwin Differential Revision: https://reviews.freebsd.org/D55187 Event: Wiesbaden Hackathon 2026 (cherry picked from commit 7266121ce985a1a895441357c20b0e9d56b4e5f5) --- sys/dev/usb/net/if_ure.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/sys/dev/usb/net/if_ure.c b/sys/dev/usb/net/if_ure.c index e6b101587421..3f399a6650a6 100644 --- a/sys/dev/usb/net/if_ure.c +++ b/sys/dev/usb/net/if_ure.c @@ -24,6 +24,8 @@ * SUCH DAMAGE. */ +#include "opt_inet6.h" + #include #include #include @@ -45,6 +47,10 @@ /* needed for checksum offload */ #include #include +#ifdef INET6 +#include +#include +#endif #include #include @@ -63,8 +69,6 @@ #include "miibus_if.h" -#include "opt_inet6.h" - #ifdef USB_DEBUG static int ure_debug = 0; @@ -2175,7 +2179,6 @@ ure_txcsum(struct mbuf *m, int caps, uint32_t *regout) struct ip ip; struct ether_header *eh; int flags; - uint32_t data; uint32_t reg; int l3off, l4off; uint16_t type; @@ -2210,10 +2213,9 @@ ure_txcsum(struct mbuf *m, int caps, uint32_t *regout) if (flags & CSUM_IP) reg |= URE_TXPKT_IPV4_CS; - data = m->m_pkthdr.csum_data; if (flags & (CSUM_IP_TCP | CSUM_IP_UDP)) { m_copydata(m, l3off, sizeof ip, (caddr_t)&ip); - l4off = l3off + (ip.ip_hl << 2) + data; + l4off = l3off + (ip.ip_hl << 2); if (__predict_false(l4off > URE_L4_OFFSET_MAX)) return (1); @@ -2226,7 +2228,9 @@ ure_txcsum(struct mbuf *m, int caps, uint32_t *regout) } #ifdef INET6 else if (flags & (CSUM_IP6_TCP | CSUM_IP6_UDP)) { - l4off = l3off + data; + l4off = ip6_lasthdr(m, l3off, IPPROTO_IPV6, NULL); + if (__predict_false(l4off < 0)) + return (1); if (__predict_false(l4off > URE_L4_OFFSET_MAX)) return (1); From nobody Sun Apr 26 08:32:00 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3KgP0ZDBz6bGRS for ; Sun, 26 Apr 2026 08:32:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3KgN6fsHz4D8l for ; Sun, 26 Apr 2026 08:32:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777192321; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eO+M4S+4ZOF+uVAycBErr2nQwntcG+AS0gFWTTZ5czc=; b=dklDjjgxz8roXI7hg0Bv8Wb9DdUX8x7UQ1+8pnjkvCjbeAyvaTNWQLPaqWXy8j4yIJnY9j 6ovczd+rrdcToVP+Ks+XcOvnonsmYxDJmTmYRuq8eA+zc0JV+BUjpOk4KilTE5lebtQ4KR kW1EBWMTVu60u796vPdFY5L+scyARcuPy8bMd05O6u4L0SbC2YDzvvFuClOBsoLSGBss0q py1CRY2haS0EyHXDsPp5L5tz32yngz7JoJFStir7vLyN9So37DpD//GYLRIbghAkPNGqXY oyvP4t9VN2sqEH7i0xQLUHsIc/gMT6YWoSjGOA9LHlSpbk5gT8SsqFKnic3u1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777192320; a=rsa-sha256; cv=none; b=xnFdL/sqX/UWPGpm7d+5NjpNvUy2PHa2G9MACfQt3GddPHB/I0t2oMs4eLtBVLTPdk7Rva DBmWaIksBLdjMczu4YTbaHYvaQeModFIFroIc8b5i/wVSq9wdXaqLaofIo/O7FqnWuZqLd Nm2E5W09CPKIFHO27i0OZPIDiqgimSvsPiJxaJDLh9hZWADLxUUYYQ23ve1R8qjSFghdMb WWkMkKkxHNQxmcMuE/aS9S49P8SgeKLBL82s8Vj8c1vOApSBfhwk/3m1OpI5+GdxWxxW/9 EJ34hOaj1Kn5YftYWSwc/uvxV4dx3HKZ1Tvd5MnSsNIuKeMuCI2X3X3KNYzMdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777192320; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eO+M4S+4ZOF+uVAycBErr2nQwntcG+AS0gFWTTZ5czc=; b=dljbOMEstB8LonaPM7VIgLo6Mi1RXMK1pmNWtZlYMaVugtviP7fh4gWSO+BgMXFzNpYCMp q4Z6ofeD73pALkVPBVTS8puyoeFPwiDNVHUmIgWhOtF3KoZK9qmP27/VtIcOgr/p7UTqM1 BWMXkRlVMpvSnAQzxumPAmONYMzE8vDbjtouMwMvDkV2K1+TClQ6JT+/CJvn4VpAneoZyi HWWeIhBCNunjFC+de1fjOoZaxfk0MFI73rEvYSQ+Dxc4VkO9DJ7HcyQ47VWceLM3/sWg+9 ZaobUYOhOcITJpUCJPYDbMKgby4mojIg4ZIx5L4x10lZ9TjCXcXq1Hjox9fyNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3KgN6DT4z1Bk7 for ; Sun, 26 Apr 2026 08:32:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30bef by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 08:32:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 2c8205002d94 - stable/14 - ure: improve receive checksum offloading List-Id: Commits to the stable branches 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: 2c8205002d94697bb164217dcffb3b280729f022 Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 08:32:00 +0000 Message-Id: <69edcd80.30bef.6027ca0@gitrepo.freebsd.org> The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=2c8205002d94697bb164217dcffb3b280729f022 commit 2c8205002d94697bb164217dcffb3b280729f022 Author: Michael Tuexen AuthorDate: 2026-02-10 17:08:07 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 06:29:25 +0000 ure: improve receive checksum offloading Let the receive checksum offload for TCP/IPv6 and UDP/IPv6 be controlled by ifconfig rxcsum6 and not by ifconfig rxcsum. While there, make the code more compact and improve stlye.9 conformity. Reviewed by: Timo Völker Differential Revision: https://reviews.freebsd.org/D55188 Event: Wiesbaden Hackathon 2026 (cherry picked from commit 378577393e407fa2cd9677392da2287e37b4dd33) --- sys/dev/usb/net/if_ure.c | 38 +++++++++++++++----------------------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/sys/dev/usb/net/if_ure.c b/sys/dev/usb/net/if_ure.c index 3f399a6650a6..5f1e328d56f6 100644 --- a/sys/dev/usb/net/if_ure.c +++ b/sys/dev/usb/net/if_ure.c @@ -2127,41 +2127,33 @@ ure_rtl8152_nic_reset(struct ure_softc *sc) static void ure_rxcsum(int capenb, struct ure_rxpkt *rp, struct mbuf *m) { - int flags; uint32_t csum, misc; - int tcp, udp; m->m_pkthdr.csum_flags = 0; - if (!(capenb & IFCAP_RXCSUM)) - return; - csum = le32toh(rp->ure_csum); misc = le32toh(rp->ure_misc); - tcp = udp = 0; - - flags = 0; - if (csum & URE_RXPKT_IPV4_CS) - flags |= CSUM_IP_CHECKED; - else if (csum & URE_RXPKT_IPV6_CS) - flags = 0; - - tcp = rp->ure_csum & URE_RXPKT_TCP_CS; - udp = rp->ure_csum & URE_RXPKT_UDP_CS; + if ((capenb & IFCAP_RXCSUM) == 0 && + (csum & URE_RXPKT_IPV4_CS) != 0) + return; + if ((capenb & IFCAP_RXCSUM_IPV6) == 0 && + (csum & URE_RXPKT_IPV6_CS) != 0) + return; - if (__predict_true((flags & CSUM_IP_CHECKED) && - !(misc & URE_RXPKT_IP_F))) { - flags |= CSUM_IP_VALID; + if ((csum & URE_RXPKT_IPV4_CS) != 0) { + m->m_pkthdr.csum_flags |= CSUM_IP_CHECKED; + if (__predict_true((misc & URE_RXPKT_IP_F) == 0)) + m->m_pkthdr.csum_flags |= CSUM_IP_VALID; } if (__predict_true( - (tcp && !(misc & URE_RXPKT_TCP_F)) || - (udp && !(misc & URE_RXPKT_UDP_F)))) { - flags |= CSUM_DATA_VALID|CSUM_PSEUDO_HDR; + ((rp->ure_csum & URE_RXPKT_TCP_CS) != 0 && + (misc & URE_RXPKT_TCP_F) == 0) || + ((rp->ure_csum & URE_RXPKT_UDP_CS) != 0 && + (misc & URE_RXPKT_UDP_F) == 0))) { + m->m_pkthdr.csum_flags |= CSUM_DATA_VALID | CSUM_PSEUDO_HDR; m->m_pkthdr.csum_data = 0xFFFF; } - - m->m_pkthdr.csum_flags = flags; } /* From nobody Sun Apr 26 09:07:48 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3LSj0SrFz6bJqs for ; Sun, 26 Apr 2026 09:07:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3LSh4YJfz4H38 for ; Sun, 26 Apr 2026 09:07:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777194468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=snJ2D33NVAxiNAceciw7fyxne+5F6ecSVeaOOqJcpNs=; b=T8V/Xtlj6pHT2OiYJYtOqgujtT389ARRCZf5y18cymAIS7RIC0dm1EbPrhjTpjQtw6FiF2 Gj2WBDtMW18adul7lmPWsaKM4SU6E7NEZ4PrngnoLra6dCX/tdO7yZ6tWNZdBfGmWUXpn6 mKjtKk0mtk0f1ojouqtWrc/c28vU1Uq1T9SK7Fq0ThZV4J6f/t8C6R2d+yl9c1xDm7YW7U FzVosk6v/iZnYB/8HUou858mdfkqgpbwLM6/qbLbcuIw8HPenZEqvHsXthKM7akpXPxzrs foecvCk5BfmMfgKN8WpGhpCvWiJxJYu9LLzKO33kM02mNwohLSJISa4wunSImw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777194468; a=rsa-sha256; cv=none; b=X6HAsXbEEpw/wVje1NKfNsiqlqUP3tHDzaQms940Oya0jkovUP/ILHPIN0Ark7GXqAUL/J 61j0JmxERc/xlkhRbip51qXu8hlIkOXIsjU7tQ+2akovQBqaw9ncyAmR1TJQy2yqnKkSoc Hh9qY5ebVxZ1aB1+/Q+qG0TdhJ0MfWnMHu5HdDD9AETKkI0JBoETFPRNfSYNTLMkM0MTKQ htF779960i3dJJq6kU6cJ9i00NurzJa8j636keQjtzhSOkRRGoVhiwjoKeyBQw12XgiLFN P1dhgD7kZ+NwFUjne+ymj5kfNi6ZmEXgZhaPWru7dsqT5kMbeGaYK2nPZmVTTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777194468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=snJ2D33NVAxiNAceciw7fyxne+5F6ecSVeaOOqJcpNs=; b=wpsNwT/FGsMmW0H0zRCY+/OMgVnP5WrzZGfMz8Z4yj7/Wcz1NBiTGhCVCrRXM/s5onySrC KGEYolTo6fuDNxNIJHkRHkvoWIJyEqWmWXUn6bOK5lFB0aWMXCW4pHyNIIS16oJgZxZYiN YNKBYCrv1pzagXgz8TrZgwdKwEaLMOtkFHnfiXEWMyf/S8mI68SIx4RcTt0Anpvj+uYflt /iXaR5RRCY4UIMXg/rEz/vn2Kw/bypP7x0k3gxjYsrqewSWp8qEGV4O0bnmY7/Qctz9mGm 7rXChFS6+vSqH1G3mfaJFlbXtqzDLQHKeehjb7F/GPUvxzNqiPQ0Z+/ig/Yvow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3LSh43Ghz1CVB for ; Sun, 26 Apr 2026 09:07:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3702f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 09:07:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: dd4e2803da39 - stable/14 - sctp: fix so_proto when peeling off a socket List-Id: Commits to the stable branches 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: dd4e2803da39fdcc3fc73d2ee710f479568ce3ad Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 09:07:48 +0000 Message-Id: <69edd5e4.3702f.313e888a@gitrepo.freebsd.org> The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=dd4e2803da39fdcc3fc73d2ee710f479568ce3ad commit dd4e2803da39fdcc3fc73d2ee710f479568ce3ad Author: Michael Tuexen AuthorDate: 2026-02-25 12:55:54 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 07:00:53 +0000 sctp: fix so_proto when peeling off a socket Reported by: glebius Reviewed by: rrs Fixes: d195b3783fa4 ("sctp: fix socket type created by sctp_peeloff()") Differential Revision: https://reviews.freebsd.org/D55454 Event: Wiesbaden Hackathon 2026 (cherry picked from commit 454212b9718b55b43781f81bef252658e20e0fd3) --- sys/kern/uipc_socket.c | 4 ++-- sys/netinet/sctp_syscalls.c | 4 +++- sys/sys/socketvar.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 4fca51a853a3..2e7bf0b5e5fa 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1286,7 +1286,7 @@ solisten_enqueue(struct socket *so, int connstatus) * XXXGL: reduce copy-paste with solisten_clone(). */ struct socket * -sopeeloff(struct socket *head) +sopeeloff(struct socket *head, struct protosw *so_proto) { struct socket *so; @@ -1306,7 +1306,7 @@ sopeeloff(struct socket *head) so->so_linger = head->so_linger; so->so_state = (head->so_state & SS_NBIO) | SS_ISCONNECTED; so->so_fibnum = head->so_fibnum; - so->so_proto = head->so_proto; + so->so_proto = so_proto; so->so_cred = crhold(head->so_cred); #ifdef MAC mac_socket_newconn(head, so); diff --git a/sys/netinet/sctp_syscalls.c b/sys/netinet/sctp_syscalls.c index 9d85576e2592..79c1dfb21495 100644 --- a/sys/netinet/sctp_syscalls.c +++ b/sys/netinet/sctp_syscalls.c @@ -76,6 +76,8 @@ #include #include +#include +#include #include #include @@ -172,7 +174,7 @@ sys_sctp_peeloff(struct thread *td, struct sctp_peeloff_args *uap) td->td_retval[0] = fd; CURVNET_SET(head->so_vnet); - so = sopeeloff(head); + so = sopeeloff(head, &sctp_stream_protosw); if (so == NULL) { error = ENOMEM; goto noconnection; diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index 1efff4a18bee..fc884467470c 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -525,7 +525,7 @@ struct socket * struct socket * sonewconn(struct socket *head, int connstatus); struct socket * - sopeeloff(struct socket *); + sopeeloff(struct socket *, struct protosw *); int sopoll(struct socket *so, int events, struct ucred *active_cred, struct thread *td); int sopoll_generic(struct socket *so, int events, From nobody Sun Apr 26 09:12:32 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3LZ931TSz6bKdn for ; Sun, 26 Apr 2026 09:12:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3LZ86JFfz4HhW for ; Sun, 26 Apr 2026 09:12:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777194752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JViMAQ/O7PUIeyaw/g2vtC8x6Pe7DO6f0+lGL3AUDN8=; b=KT/vJhhbC7iXf9Hyx7vrZqDQzAGdpGPemgfoxEn1iOYL2s8vWBEUu/2080zsWE3In8grnd c0l4YH37N/B+WGOKaBEVbVWtWKEff7TtOxDCz+gbatG7Gxsq8uhlraYVBq4AckoGhFN64e 9cDCv6P5t05YKn6ZQgSzx/gX5peVg7LCXqxKT/zJhmzGVc05ivB0ux/OYX+EcOCo/3qlfX 56bKBhe996AMm2oaB4bmmCexzA1AGCWyPFV0yHSu7LjCjawqN58cMHMvli8MB2k8e3TMlc Eb5fqdKnL7YGYYwJ7dwMASR15A+dSegQSUMvXHpiHgGucYaCZ0+GSZu7d3p2kg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777194752; a=rsa-sha256; cv=none; b=hPUUAi95LYRJzaTuPxByELZko4bduLLrdzIUyqxL5im59xGQzDfk3kU3wLm6sDa9tdRRq0 QkgruHDyHzXF1L6dTbwW9/Zn7emhhbwXxOPC88T4uvq3B93tWiF6sF6TEgbfajREhOJ4gJ uJowXzlstImwtbjW7QoDrZF3uMhPcm9hO6sspgy62wwVLB5FxeergIV33NwZly9xvJXoX9 1yjj1N7kDMIP8yE54vlX+4uE7H1ApTBS0BjCG5BoyUYL+ac6pUUFFG1LExrlu590HgeXUb ENTk0uVomO/cFYlL1Ac88KDQx/VNDC5O7mGuLsHn7hO+wefvxX5NZOmhFmtokw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777194752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JViMAQ/O7PUIeyaw/g2vtC8x6Pe7DO6f0+lGL3AUDN8=; b=PLUes+V8L3DSuBiMQ7W0CPankRVv1PVc/q48L0OwPGsbdy+//zP99WR1aNOiFh4iZTdAny zmNP7TaneTfyarZyv0D8YtR7L/nWKchSLDbmHP2q769JtXnnypQSUbIdHV+VdzSa15S2i0 sxe7H8ek7MtfkfAnioUHT4l31SHFgc96dnXwmtFijQx98ezgoUBHXQ88vtx5PZb1DSEcA/ YcfWlFBmTdXxrHWlhO4kW/pelNXXA3Q7+yX/entpI6qNG/JW8381uVouDHNy/kIbq/DVCV 1Zs9Mieht8DxuwtuE0Yr+/tKvNlH+wxEZlVghe3pUhLfRlt5LYHugomhnPXrwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3LZ85qlWz1CYp for ; Sun, 26 Apr 2026 09:12:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36859 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 09:12:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 328210f0efc2 - stable/14 - tcp: BBLog incoming packets in TCPS_TIME_WAIT List-Id: Commits to the stable branches 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: 328210f0efc203cc8db503e2cf60333d79227b4b Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 09:12:32 +0000 Message-Id: <69edd700.36859.27bf50b@gitrepo.freebsd.org> The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=328210f0efc203cc8db503e2cf60333d79227b4b commit 328210f0efc203cc8db503e2cf60333d79227b4b Author: Michael Tuexen AuthorDate: 2026-02-25 13:01:50 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 07:07:20 +0000 tcp: BBLog incoming packets in TCPS_TIME_WAIT PR: 292293 Reviewed by: rrs, rscheff, pouria, Nick Banks, Peter Lei Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D5546 Event: Wiesbaden Hackathon 2026 (cherry picked from commit 8d2f910ceb0f1c366bcf2146a5ba1d1074d07933) --- sys/netinet/tcp_timewait.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index 006f325d6d0e..fbabca5554ba 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -78,6 +78,7 @@ #include #include #include +#include #include #include @@ -292,6 +293,8 @@ tcp_twcheck(struct inpcb *inp, struct tcpopt *to, struct tcphdr *th, */ if (thflags != TH_ACK || tlen != 0 || th->th_seq != tp->rcv_nxt || th->th_ack != tp->snd_nxt) { + TCP_LOG_EVENT(tp, th, NULL, NULL, TCP_LOG_IN, 0, tlen, NULL, + true); TCP_PROBE5(receive, NULL, NULL, m, NULL, th); tcp_respond(tp, mtod(m, void *), th, m, tp->rcv_nxt, tp->snd_nxt, TH_ACK); From nobody Sun Apr 26 09:13:52 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3Lbn53KVz6bKT7 for ; Sun, 26 Apr 2026 09:13:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3Lbn3td2z4JKB for ; Sun, 26 Apr 2026 09: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=1777194837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CaVPekPnERRD95+cnax14P25Dkfs4oIlH7+Cxmz+5og=; b=WuiKMeyM9fzOrVpVnvmTLaCKoS/BC0g1yfZlBl7M7rscN/YGnHTRld2L5AT18HaMj+9lQZ g80akcShk7Me/1fY4oufeAAZuI12Mat/8b6AZv9IiZUsLutGgZAWreQpR/foYSPK6MDRVb O0hM6eUyjcrXxt3RUhuyeSoFlDC1nIUJ8r68An0G5jBuoJxZ3RVQl3duC0ArNTNwCuzu4O k6rhOUITi2Zh3zrRWf4LWXIw6IFTFccxOPuGWIobqadG2NPCmPHYqae7L42m1aTLtw8l3k so1AYwqy5QF9M8PKa8wL78xTw5G1WGHb0kUisSMuSqLn+9iHzyLURlrc9gGkCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777194837; a=rsa-sha256; cv=none; b=OsRdSsYq6K4dCkP+/n6FBHZ45zU10UkjmCMUWM/rc5cS9kYAvFeFSPXPDv3KcvCF9fUDmF 0VoV3yG/in6iZlpT7i3Jl8WOV5Q3xnjU1dS428xYoJKoj4bhwtr05nwdhJ2PhWQoOQPPag z/N3rVSfF8zoJY8cKrGnYhlNcXuHdCas0vFEjMr/ewQC+m1qY/+kJRgmMeqPyKig2wFnVA rFY7UMc42i+phd6MGPafktqWMyukfW/j0+yEsT2JMtipLm2gc0YwYN4gJKKqEkAfk/6zIv MEhYTE8RRLJ/D5G2bYrL9AlxPQugkdFn8pazK6xi2aS0P4A2d/rP0WZr+xjhKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777194837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CaVPekPnERRD95+cnax14P25Dkfs4oIlH7+Cxmz+5og=; b=vpBgaxTc8vb2K0BGgf0UMFyu0/DoxSHAn03GRJjd4JBjMDK+RWD4xv/9IwWg4WjcS1sQ1I SFUNxky+EvnkbFA2erpWr9gzXTAXOWAkGX9OLUE/qdHr6hEyLKaJZiPQsapjS8oNN/D+xg XZhJ9gzXfmEbCLl671LmV+M6HnIJIsXBgzhkvoB0lVycWiQ3MeXxD7L/fgMyXoLlGATr76 25b5+tBkGNl6e3Ku8lDt137x8+A5EkNPsOMx0HNWa+eWa/jHUYGtIEXgy3/kjYXyKdfzOp JEWq0LYyfdXgyq7O8bMJVEX+KqHdJ5V0Yajhzql6nHnFw/NXOZC7Gt1vhh/24w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3Lbn3VXmz1Byy for ; Sun, 26 Apr 2026 09:13:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36f6c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 09:13:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 53d8d57fa5e2 - stable/14 - tcp: improve handling of segments in TIME WAIT List-Id: Commits to the stable branches 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: 53d8d57fa5e2e9eaa03f44c24afddc1f3d09e26d Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 09:13:52 +0000 Message-Id: <69edd750.36f6c.63c0d3e4@gitrepo.freebsd.org> The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=53d8d57fa5e2e9eaa03f44c24afddc1f3d09e26d commit 53d8d57fa5e2e9eaa03f44c24afddc1f3d09e26d Author: Michael Tuexen AuthorDate: 2026-02-25 13:06:15 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 07:12:28 +0000 tcp: improve handling of segments in TIME WAIT The check for excluding duplicate ACKs needs to consider only TH_SYN and TH_FIN. We know that TH_ACK is set and TH_RST is cleared. All other flags, in particular TH_ECE, TH_CWR, and TH_AE needs to be ignored for the check. PR: 292293 Reviewed by: rrs Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D55489 Event: Wiesbaden Hackathon (cherry picked from commit f3364d3c8c876074a9a6f68168e5eb8bd60207de) --- sys/netinet/tcp_timewait.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index fbabca5554ba..a833248cd468 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -291,7 +291,7 @@ tcp_twcheck(struct inpcb *inp, struct tcpopt *to, struct tcphdr *th, /* * Acknowledge the segment if it has data or is not a duplicate ACK. */ - if (thflags != TH_ACK || tlen != 0 || + if ((thflags & (TH_SYN | TH_FIN)) != 0 || tlen != 0 || th->th_seq != tp->rcv_nxt || th->th_ack != tp->snd_nxt) { TCP_LOG_EVENT(tp, th, NULL, NULL, TCP_LOG_IN, 0, tlen, NULL, true); From nobody Sun Apr 26 09:21:11 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3LmF1Zzsz6bLgR for ; Sun, 26 Apr 2026 09:21:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3LmD2pbhz4JnP for ; Sun, 26 Apr 2026 09:21:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777195276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l8TCI6HW78AYPCVlJRkwSYfZktMg2Cb3M0yKu6BXjQk=; b=Aeo8cjhnZkOQu/LGdTzRfIctJQ2Y8lFV7mYGXBqnSg0r6UHA7D/eNOzUkn3VL3L0w6R5Z0 MkPPzcWOZI29/dwMUEFkQVRxd5pBprO7UBL3DdaABrckXd4zbM/nqvtdemo1ROzBmDrNLd g6TJ3Z7Go4QwwrDnSiIqXqSnLDejfAjliZArm/xQV3LB/TDsfrgqQASvC39IN1IIz5+PAv fE6FVJqeEnKD0JXWLjweDyf6hQAeAvlU5aJhat6/KODommOzKDzdwGz00Q2W4i+GuQCXJP Xqb3baqPyrO/4xVvzsjeBexBMhYD5RTesb0e6RYLYHs4nys9m2wiwrYFPHxrGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777195276; a=rsa-sha256; cv=none; b=jQ8ZGZqE9fNnsa8UUVjx172oOnyA8twz2POt5waU4JyBNurXL9A0oVS2SFWNUYzGkttSIT E75cLqMwT93Mbdp9a27h4/bKdI+XfVeojDNE5+7boNmFtjo1H7ZtHdu+MCVAYVQxmaRfTf XiKx/rhq9c74FCHNqRzyw3U6Ls1OnSfotaHNG8pbM4T+of7nE1wkwjStpYEREMnP/8JAQq GFcGW7rEWRiVrOmgkFCQntbAwWtXGE2CYwMD3HEZvjDXsFjrtMYkGRhJN4pKMEn30BC9Tr gEbw3ieqKzkhvXjgm5O6jDJMxAxfQMdUkNbNFxQNHiu1AyeLbuNeu4DYFM8wpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777195276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l8TCI6HW78AYPCVlJRkwSYfZktMg2Cb3M0yKu6BXjQk=; b=i5clGgENkld3BxhA5p03rnyF1ctuS07QO2/AA8kk4fGxHtMjWycacfpxegtGRSM35bMhgj Hzr1Pj3ZwR321RQSxGgjcSbJV92UsOWYz+FX1TD39kRfNmWC/2o6CGK1nyjSeGh+xNk5w6 xzIQyxKEWwhSBTxrxJ/pbjx8D7SGeJGaBvXbHmG960/ccXE+OQy7UX3UfoO+gzlQ1gpaXQ yyAugJZZbJA+g0oeMYL0y25Hb9snnY/OOo3CuPnQMypwlrXHwz/oPhdRt4Os3tZDBVApqT REMd5ZnfAX/51qTYE6tyOgyKmFHb0qV9mrxtYI+kIxc1QQQh1j6tqONVZu+I0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3LmD1vnYz3L for ; Sun, 26 Apr 2026 09:21:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37ba2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 09:21:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Timo =?utf-8?Q?V=C3=B6lker?= From: Michael Tuexen Subject: git: 5c6a4b3f8965 - stable/14 - arm64/pmap: fix pmap_is_valid_memattr() List-Id: Commits to the stable branches 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: 5c6a4b3f8965e861322f295f97a2d4e59fd63afb Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 09:21:11 +0000 Message-Id: <69edd907.37ba2.4d6f6611@gitrepo.freebsd.org> The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=5c6a4b3f8965e861322f295f97a2d4e59fd63afb commit 5c6a4b3f8965e861322f295f97a2d4e59fd63afb Author: Timo Völker AuthorDate: 2026-03-02 17:59:45 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 07:13:24 +0000 arm64/pmap: fix pmap_is_valid_memattr() The function pmap_is_valid_memattr(pmap, mode) checks whether the given variable mode is between the two constant values VM_MEMATTR_DEVICE and VM_MEMATTR_WRITE_THROUGH. After the code for this function was written, the value of VM_MEMATTR_DEVICE changed from 0 to 4. Since VM_MEMATTR_WRITE_THROUGH is still 3, the condition is always false. This patch changes the condition to check whether mode is equal to any of the VM_MEMATTR* constants. Reviewed by: andrew, tuexen Differential Revision: https://reviews.freebsd.org/D55534 Event: Wiesbaden Hackathon 2026 (cherry picked from commit 0272359ada144aa540c28fefaf996afa30dc0aa5) --- sys/arm64/arm64/pmap.c | 2 +- sys/arm64/include/vm.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 517052419ed4..7c38ecfe16a2 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -7971,7 +7971,7 @@ boolean_t pmap_is_valid_memattr(pmap_t pmap __unused, vm_memattr_t mode) { - return (mode >= VM_MEMATTR_DEVICE && mode <= VM_MEMATTR_WRITE_THROUGH); + return (mode >= 0 && mode < VM_MEMATTR_END); } #if defined(KASAN) diff --git a/sys/arm64/include/vm.h b/sys/arm64/include/vm.h index 342143c57246..e03e615bb841 100644 --- a/sys/arm64/include/vm.h +++ b/sys/arm64/include/vm.h @@ -33,6 +33,7 @@ #define VM_MEMATTR_WRITE_BACK 2 #define VM_MEMATTR_WRITE_THROUGH 3 #define VM_MEMATTR_DEVICE_nGnRE 4 +#define VM_MEMATTR_END (VM_MEMATTR_DEVICE_nGnRE + 1) #define VM_MEMATTR_DEVICE VM_MEMATTR_DEVICE_nGnRE #define VM_MEMATTR_DEVICE_NP VM_MEMATTR_DEVICE_nGnRnE From nobody Sun Apr 26 09:22:10 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3LnG6JfNz6bLnm for ; Sun, 26 Apr 2026 09:22:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3LnG4stSz4KMD for ; Sun, 26 Apr 2026 09:22:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777195330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uxl7P+qbqwyarUlfAFp/M8ptsPulgvYUocJegbSShVc=; b=mOqI329ZnLpLJr2g4AJxyRC3wiWHMXEF8Q2Xve/JlQwuY3S9LScfQjkAknk72Ys9N5lqMM 2ojOyfomBiGyboTE0sY10B9BzVraVG3roXngqRko/4DwBD8DvwFBzoIIBGFmOY4ysO7qyI PyXnHTm56SDUrPzYm7ts8q7lGXJk8ITaXvQkiivOnKyUnNDLMDDf9Hm6GmsPATeh4ijINh gf07MFKyH4X3FhMiXUo0jF+x/I05fwA2/I/5NUMWtj16zCnAhP1ARrNxrdO+2SObC9lCqW nid6guDO5w5hkR0v8F2/K//xm9Huj4mej+VaJqIZ3xZ8zWHLUhygP0/iOzHq+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777195330; a=rsa-sha256; cv=none; b=m5wGgSPuuqRSnhVt5BzpeOREpTmSukEgjut/1+DVPWVHkWUNP1NqawWOLdv3IaTD+/Ci4W VlDBEFsKu6ZLog7MhdoNl7BaisdfHuq5QaMOjl9bb77rLH5hgRVwLrZIlzU4XYPF+ati/l EEtxnKGoo4RDC4JqdEuli7q0f8F349dhOQtXOH2Axhi3zDZt/9cmGpWomxOsSUC5n4mELh 0ptYH6ebm3RrF9GAzxRoPh+AsI8Ry7M6M/IdcDmQW31Y81JyIOdEkpLJ61d60cbE9o4ZQx hIhpkCXTodjGu1jDDtViOo5WLTOSd4457YmwrDiU692+OjYCa0nCwkd6bevavA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777195330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uxl7P+qbqwyarUlfAFp/M8ptsPulgvYUocJegbSShVc=; b=mtGlmdTNxJeqR2XpquRGWDoaAtFkFTfazYMynUgYKxWfQEicH9+OWsKR7aStRL9JOnXHPC /WNUrC14PntPLnZfp+eXMSWqA8L16cIDr+IqNx7lnZAJLl1kGcI8yb9no2Q2tzjTFWbEYx gQxJ2wCoQo40NiAHJdlIYPD+lgUUxc68ZFt6WHOdMonDfYZyBVkxhU9h4aW45PGUY6KHeZ t7ydnCwfXxKT455skgfeXCN0VaiLMi/jhzl725gFd0umMTSMIX1TxdBbsB2V1aizuexJMB 5PKLUZJJHF9lfYzhPBfUa9r5vTZRnvfw4f6yXGqKNu+bFEqr11jCWs90HpzjbA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3LnG45Fsz3p for ; Sun, 26 Apr 2026 09:22:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38c08 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 09:22:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Timo =?utf-8?Q?V=C3=B6lker?= From: Michael Tuexen Subject: git: 32f8c7821394 - stable/14 - virtio: add loader tunables to sysctl List-Id: Commits to the stable branches 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: 32f8c7821394b3be2d97641dbe8bf8962e2bb90a Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 09:22:10 +0000 Message-Id: <69edd942.38c08.5c5d6f7@gitrepo.freebsd.org> The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=32f8c7821394b3be2d97641dbe8bf8962e2bb90a commit 32f8c7821394b3be2d97641dbe8bf8962e2bb90a Author: Timo Völker AuthorDate: 2026-03-02 18:15:37 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 07:20:41 +0000 virtio: add loader tunables to sysctl virtio_pci uses two loader tunables that should be more visible. This patch adds these loader tunables to sysctl and describes them in the virtio(4) man page. Reviewed by: imp (erlier version), tuexen Differential Revision: https://reviews.freebsd.org/D55533 Event: Wiesbaden Hackathon 2026 (cherry picked from commit c70755bc0d8f703dbaa1520c15e8213a95847dd5) --- share/man/man4/virtio.4 | 28 ++++++++++++++++++++++++++-- sys/dev/virtio/pci/virtio_pci.c | 7 ++++++- sys/dev/virtio/pci/virtio_pci_modern.c | 7 ++++++- sys/dev/virtio/virtio.c | 4 ++++ 4 files changed, 42 insertions(+), 4 deletions(-) diff --git a/share/man/man4/virtio.4 b/share/man/man4/virtio.4 index 1e5ea0e4a7da..0598d5d8621d 100644 --- a/share/man/man4/virtio.4 +++ b/share/man/man4/virtio.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 26, 2019 +.Dd March 2, 2026 .Dt VIRTIO 4 .Os .Sh NAME @@ -54,7 +54,7 @@ The .Nm module provides a shared memory transport called a virtqueue. The -.Xr virtio_pci +.Sy virtio_pci device driver represents an emulated PCI device that the hypervisor makes available to the VM. This device provides the probing, configuration, and @@ -92,6 +92,30 @@ An emulated SCSI HBA is provided by the .Xr virtio_scsi 4 device driver. .El +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +.Bl -tag -width "hw.virtio.pci.transitional" +.It Va hw.virtio.pci.disable_msix +If set to 1, disables MSI-X. +The default value is 0. +.It Va hw.virtio.pci.transitional +For a transitional +.Nm +device, this tunable specifies whether to negotiate +modern mode and use the modern +.Nm +driver +.Pq 1 +or to negotiate legacy mode and +use the legacy +.Nm +driver +.Pq 1 . +The default value is 0. +.El .Sh SEE ALSO .Xr virtio_balloon 4 , .Xr virtio_blk 4 , diff --git a/sys/dev/virtio/pci/virtio_pci.c b/sys/dev/virtio/pci/virtio_pci.c index 4849affae58c..451a93d11759 100644 --- a/sys/dev/virtio/pci/virtio_pci.c +++ b/sys/dev/virtio/pci/virtio_pci.c @@ -98,8 +98,13 @@ MODULE_VERSION(virtio_pci, 1); MODULE_DEPEND(virtio_pci, pci, 1, 1, 1); MODULE_DEPEND(virtio_pci, virtio, 1, 1, 1); +SYSCTL_DECL(_hw_virtio); +SYSCTL_NODE(_hw_virtio, OID_AUTO, pci, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "VirtIO PCI driver parameters"); + int vtpci_disable_msix = 0; -TUNABLE_INT("hw.virtio.pci.disable_msix", &vtpci_disable_msix); +SYSCTL_INT(_hw_virtio_pci, OID_AUTO, disable_msix, CTLFLAG_RDTUN, + &vtpci_disable_msix, 0, "If set to 1, disables MSI-X."); static uint8_t vtpci_read_isr(struct vtpci_common *cn) diff --git a/sys/dev/virtio/pci/virtio_pci_modern.c b/sys/dev/virtio/pci/virtio_pci_modern.c index 2e59448b4b5e..2c54288aefba 100644 --- a/sys/dev/virtio/pci/virtio_pci_modern.c +++ b/sys/dev/virtio/pci/virtio_pci_modern.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -189,8 +190,12 @@ static void vtpci_modern_write_device_8(struct vtpci_modern_softc *, bus_size_t, uint64_t); /* Tunables. */ +SYSCTL_DECL(_hw_virtio_pci); + static int vtpci_modern_transitional = 0; -TUNABLE_INT("hw.virtio.pci.transitional", &vtpci_modern_transitional); +SYSCTL_INT(_hw_virtio_pci, OID_AUTO, transitional, CTLFLAG_RDTUN, + &vtpci_modern_transitional, 0, + "If 0, a transitional VirtIO device is used in legacy mode; otherwise, in modern mode."); static device_method_t vtpci_modern_methods[] = { /* Device interface. */ diff --git a/sys/dev/virtio/virtio.c b/sys/dev/virtio/virtio.c index 0637e0299333..14dad88b3f6d 100644 --- a/sys/dev/virtio/virtio.c +++ b/sys/dev/virtio/virtio.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -84,6 +85,9 @@ static struct virtio_feature_desc virtio_common_feature_desc[] = { { 0, NULL } }; +SYSCTL_NODE(_hw, OID_AUTO, virtio, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "VirtIO driver parameters"); + const char * virtio_device_name(uint16_t devid) { From nobody Sun Apr 26 09:23:08 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3LpN6gGmz6bLyg for ; Sun, 26 Apr 2026 09:23:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3LpN5sJ6z4Kd6 for ; Sun, 26 Apr 2026 09:23:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777195388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ojuPFHbhXPxRgb8qmkKdEjcHnc9RQx1LWLpYTZlPS9o=; b=ovt4RM/nj/ARHcRxfF/VcmsYiARmKdjcg4CTdFG6vAH5M5yTpfuelyE9lzUqrd/O2FFHtO 3j5e26go/WoA+HG9C+xkflwjDYTTxkSYo3u+0ZQmfmZbW8uxMa6h33WZ8THd+FG8uoiSdz sARKcw/86RwVqN9V885KpQY19hQrT3HmEvGQ36co7ktlrMBOCbH4XBZX0iPotllEg4Q/d9 ljHfSUChW2lbgmIjyPhv34wM0a6Htgf34gIdsGqLEdz5Xq3kHsbmbTTjDut+Oim79PL5nm JQLWFTyRupmSGsrFxFEbXAZwd6PcnMiP/i1ZxAyiSxNELRo8c5FJha6QJ5ZlXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777195388; a=rsa-sha256; cv=none; b=XIoj085E9i1B9ANjCeOzGOQw9Gb14chG8mHWk48iTnoJIIVEgkAzvZmHdkdrG2TnnAr5Hg D1Ug8qvA8RNqju4faTyOOO2yCpD1/zqDPi+gpMalfCCqiIBGMjd5I3j2UY0r5Oa/DhlFR8 44wlvyGGsFmGUN/xsQNAEsUupgRQX7Pt78PkQmOuw3WYBQwyrsfLL4n2QhVinvOpsXP+o/ 3EqLtUnL98KbyUie3vpTn1bx9d4Xsj/Sio+aqRGrZv0T8YaCeVou3WyeSMfiOR/qbH9JZY jct95TgPEQmidNhiWZY6veG7YbAGMPGp+h+ISkuwyAKTxrDRlwZGeChPSwxYRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777195388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ojuPFHbhXPxRgb8qmkKdEjcHnc9RQx1LWLpYTZlPS9o=; b=GwtkBYFRLwxXcE7AMzA2VqnB8Io+6jePNllHtIQuot78ThZ9r+Z+cdoihqVzUNvUKm35ke o/P4FC7W4xEQFYIwBpIrhf/lnjdaGa3kYNFNlnScH3YiVBcz/UJbWTSIbLnbl2BDgQeLR0 0YMUGk4xWZLqh3PjE0rDYBtQlV+1yuOAEYkZzeEiv5zixFwn7wgvbydMiRlSSZSFBYqvxq bTJUCWsTcKM+8SOaL4hlUV2AQqb7ZXyC0GnoHE6RUpS17DUfiBOw8Yt+U6oQUdVlgEikBe u12rjPdhMmG+39nIoEzwEslbTgO5HSNR3x+Dgig7Tmm8iQU3gdgvo1VP06ih9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3LpN5J9Pz40 for ; Sun, 26 Apr 2026 09:23:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38d9c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 09:23:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: e4e27b6edcfb - stable/14 - tcp: improve NOINET builds List-Id: Commits to the stable branches 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: e4e27b6edcfb4abcafe9999cee913ff6fc8f4416 Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 09:23:08 +0000 Message-Id: <69edd97c.38d9c.627dcbc7@gitrepo.freebsd.org> The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=e4e27b6edcfb4abcafe9999cee913ff6fc8f4416 commit e4e27b6edcfb4abcafe9999cee913ff6fc8f4416 Author: Michael Tuexen AuthorDate: 2026-03-04 14:18:58 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 07:21:37 +0000 tcp: improve NOINET builds Reported by: bz Sponsored by: Netflix, Inc. Event: Wiesbaden Hackathon 2026 (cherry picked from commit 3d69387ece535fc33821d089aab241bfb9551d69) --- sys/netinet/tcp_subr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 32c30dc4d067..e1346b433899 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -389,8 +389,11 @@ static struct inpcb *tcp_drop_syn_sent(struct inpcb *, int); static char * tcp_log_addr(struct in_conninfo *inc, struct tcphdr *th, const void *ip4hdr, const void *ip6hdr); static void tcp_default_switch_failed(struct tcpcb *tp); + +#ifdef INET static ipproto_ctlinput_t tcp_ctlinput; static udp_tun_icmp_t tcp_ctlinput_viaudp; +#endif static struct tcp_function_block tcp_def_funcblk = { .tfb_tcp_block_name = "freebsd", From nobody Sun Apr 26 09:25:10 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3Lrk52Zyz6bLph for ; Sun, 26 Apr 2026 09:25:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3Lrk4Gchz4L5Z for ; Sun, 26 Apr 2026 09:25:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777195510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tbdd9s8qYTx5+TUWFN+6klO7m6ewPoaX6otRt9qAURc=; b=B3Xk0jqZiJzCd9RXWlFsqlCVXKuiUNPp4T8U92LQHi/X0pFDEZg//Y0yin/9c+bKTNjEbS uLHn7dA7dUrYRv2TjwfdFK1JQ6DxL6ttZ98Zoj84sny25MaoZJnlSgtekHNsTBlRhFCf0D qWXjScfaNXbVttnLUKlYLE21rVMcgWmp2QA/rdc/1GlsaXYzxeSzqZKyeBpa9ED/FIe1O/ uaVy+sb9cEHs6dmAWxjldaMphKctLwiqtXkwX/j8vqO1zbTVgYFvp4OeTlk22paYJfL1MZ SJLWH3oA19Gf65yMKfYRzx+PPagu8QjkyQqEno3PchXhGuuRt0D2Rq31N3UYqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777195510; a=rsa-sha256; cv=none; b=d/7CE1lJIgmwUYkBye+PXNA6KUF1o0RrHeuMQq2Nu2aOLdmAD+imXGfm5Dx/fd/2tbO7x5 dRsSa9oTUILLZ566ySTahLnXHOlFYD7RZYcgcJoYIJfHRfw1oqz6/WD6Gpunv6lNl6pYg6 Guwn/TIaKo0jttEjX5mLHQBrqOm4h1xc9t4/YdBK/DeZJ7aPNhogce4I8m6Qddw8YMGeKo ayAzumB6SH49G+eCURPNszaRKbb7dhOf9xc7Zza3B9HbBBGd+H0z6uZ4ohZyTsTcW73khI GlxhG0LLuZA/3vLK3yw9iLewj87tWhwhFJMjN/Qnzk9hqT7qMg3gY02e3P4WtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777195510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tbdd9s8qYTx5+TUWFN+6klO7m6ewPoaX6otRt9qAURc=; b=Y/2+sBT3cFi3UD53weaWbvs9Vpb7eu27xlAVJGjO51gjDgZTuiQSG6kMRNL62D64pGOmQP 8s4JJ/ix3fH+ep29OrusuDNvXNsPiDTq5RfqpySF0rQ85xKkMl0YkiNQ1N3zvlPOKsov70 EL7Fjqi5fJo09JbzjUZUfyK1yUwtVJIgM6wImqQEVFEZGVfrfasFp9/mHlm1NqqeGV7Xmy 4OUJtsFD43auzJqlYV9Vij0VQ3YJuam9xVKRu7D1OPKi8MInzvuEjjqjiC5/T06puk+a36 nLsistx82rIvZQuyq+tQm5BSWeIYkwV5v1mLgOHKiDM55/LsVbhhDrh7uI8cXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3Lrk3ZbnzH1 for ; Sun, 26 Apr 2026 09:25:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39801 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 09:25:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Timo =?utf-8?Q?V=C3=B6lker?= From: Michael Tuexen Subject: git: 00bf1bc888bb - stable/14 - virtio.4: fix typo List-Id: Commits to the stable branches 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: 00bf1bc888bb6d1510c9247611d727444d14110a Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 09:25:10 +0000 Message-Id: <69edd9f6.39801.72d66034@gitrepo.freebsd.org> The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=00bf1bc888bb6d1510c9247611d727444d14110a commit 00bf1bc888bb6d1510c9247611d727444d14110a Author: Timo Völker AuthorDate: 2026-04-04 14:43:07 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 07:23:16 +0000 virtio.4: fix typo Reviewed by: tuexen Fixes: c70755bc0d8f ("virtio: add loader tunables to sysctl") Event: Wiesbaden Hackathon 2026 (cherry picked from commit 39c44fc55f0ed595623fb6d66a4060b7be32fa51) --- share/man/man4/virtio.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man4/virtio.4 b/share/man/man4/virtio.4 index 0598d5d8621d..8252cc1b7954 100644 --- a/share/man/man4/virtio.4 +++ b/share/man/man4/virtio.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 2, 2026 +.Dd April 4, 2026 .Dt VIRTIO 4 .Os .Sh NAME @@ -113,7 +113,7 @@ or to negotiate legacy mode and use the legacy .Nm driver -.Pq 1 . +.Pq 0 . The default value is 0. .El .Sh SEE ALSO From nobody Sun Apr 26 09:26:27 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3LtC360lz6bLxt for ; Sun, 26 Apr 2026 09:26:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3LtC1yhJz4LJY for ; Sun, 26 Apr 2026 09:26:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777195587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VvFOl/Jivq7o5b5Qkh4mad9ZdPMEy+h1nGxNZvIHMyg=; b=MVIf1Ioa++T7smNLrnnROjihbj4z62CByU9WJnwoMqrka4Jpe9yzhKxCk3JXMGNVVsZR2h N9YQBDQlxoyJGEGPnETMj1j+z+0dDWGVSfNEw4GUQywsaruwW7cP8AAJpeC2ndmqaWJqxi iaVY2ViH3YXN1kjtInerW/QNT4ZUh1eB7Mz3IqYtBccx1IvjTVzhYHTn6aklY4PugULqM5 /BHwg0deGU9K35yAwUeunLRkjhFVfu5tUgwOvqBFaluzuoALqiM8MgRp/w7nuVVpgCuxb3 TPzEqTJUqtXOBu1qVQ/mwgH986ocdyFc1wQjhwceTTWdiRuyLYoI7f9ugQJBWg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777195587; a=rsa-sha256; cv=none; b=avoypOOXaxu/XJ8raOEtvuVf4vZrkn59L/VYvqGwsJHXn43KG4euAFw01qUsoAmQb+ROIJ EV/56GpGZ9LDhHWqGTQdZ7sdefm6p6rN/w/znHMikYGf/0qCDIy2IDKPRRsLR4dR1FeURj VCqe4Be4C7PDqa3z3SXcd/FRtCqoDFcGMkrLFbu0QSUSvCgL0x/yZD7g/oG0/5whhzTQi4 xbANXhlSVmSjCcTYHOieXq6fSLOwLrU2AfzSWDSrzAlfJMaZ+xQRj3wj9uq1wTXRE0LeLA IIG8GHxtSUvKqFPWaMKDouqm2qCbO16vrFQtnpiN/sPeGZ5dvMqkusqM+cxAwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777195587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VvFOl/Jivq7o5b5Qkh4mad9ZdPMEy+h1nGxNZvIHMyg=; b=I0JFMjBs8mIm9C5t09CVpcXKkFVK4RWxxugitD+fB5f/qt21JpgcJJXvYg08lUeu09F6x0 AQ/bpti26VJHOoi+4zhQr+THseJ/SDZi9iUVFDBh8P3GGd6mw9yRp6Edt1YMmXZqvwtchu R4kobyKVCccgVR5q+i+OMUCByQw3KJlV4OX6qVfx3E+Ei9NA9lpa0NiqNH9LhBfKxi/+Kj XTdT6baNLff2/r+iMU7O092YL8u98F5q+hpj/B7H+2WG3ldpVSwTQvgR2ATt1c5FLqPIGm xmLVIG6bhp7WDw38EAs9gEFJZOuQziTrWMU6qznIic+6xYxli/fw7x8byF69Qw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3LtC0yTgzKZ for ; Sun, 26 Apr 2026 09:26:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39731 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 09:26:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 68a749fbd497 - stable/14 - bpf: fix handling the read timeout on ppc64 List-Id: Commits to the stable branches 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: 68a749fbd49797f1f6bfc59c69360302f1381eb6 Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 09:26:27 +0000 Message-Id: <69edda43.39731.520b649f@gitrepo.freebsd.org> The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=68a749fbd49797f1f6bfc59c69360302f1381eb6 commit 68a749fbd49797f1f6bfc59c69360302f1381eb6 Author: Michael Tuexen AuthorDate: 2026-04-15 19:24:05 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 07:24:50 +0000 bpf: fix handling the read timeout on ppc64 On platforms other than amd64, BIOCSRTIMEOUT is equal to BIOCSRTIMEOUT32. Therefore, running the COMPAT_FREEBSD32 code basically clears tv_usec on big endian platforms. When tcpdump is used, the timeout requested is 100ms, which gets cleared to 0 on ppc64 platforms. This results in tcpdump showing the packets only when the read buffer is full. Thanks to kib for guiding me to the correct fix. Reported by: ivy Reviewed by: adrian, kib Differential Revision: https://reviews.freebsd.org/D56399 Event: Wiesbaden Hackathon 2026 (cherry picked from commit 04b994d19eec68a6b5d27ff4b0fa223a05f00e1f) --- sys/net/bpf.c | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/sys/net/bpf.c b/sys/net/bpf.c index a5222c3659c7..39d711c3e021 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -1437,7 +1437,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, case BIOCGDLTLIST32: case BIOCGRTIMEOUT32: case BIOCSRTIMEOUT32: - if (SV_PROC_FLAG(td->td_proc, SV_ILP32)) { + if (SV_CURPROC_FLAG(SV_ILP32)) { BPFD_LOCK(d); d->bd_compat32 = 1; BPFD_UNLOCK(d); @@ -1445,6 +1445,19 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, } #endif +#if defined(COMPAT_FREEBSD32) + if (SV_CURPROC_FLAG(SV_ILP32)) { + /* + * On platforms other than amd64, BIOC[GS]RTIMEOUT32 is equal to + * BIOC[GS]RTIMEOUT. Since this is difficult to handle in the + * switch command, map them. + */ + if (cmd == BIOCSRTIMEOUT32) + cmd = BIOCSRTIMEOUT; + if (cmd == BIOCGRTIMEOUT32) + cmd = BIOCGRTIMEOUT; + } +#endif CURVNET_SET(TD_TO_VNET(td)); switch (cmd) { default: @@ -1639,23 +1652,19 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, * Set read timeout. */ case BIOCSRTIMEOUT: -#if defined(COMPAT_FREEBSD32) && defined(__amd64__) - case BIOCSRTIMEOUT32: -#endif { struct timeval *tv = (struct timeval *)addr; -#if defined(COMPAT_FREEBSD32) +#ifdef COMPAT_FREEBSD32 struct timeval32 *tv32; struct timeval tv64; - if (cmd == BIOCSRTIMEOUT32) { + if (SV_CURPROC_FLAG(SV_ILP32)) { tv32 = (struct timeval32 *)addr; tv = &tv64; tv->tv_sec = tv32->tv_sec; tv->tv_usec = tv32->tv_usec; - } else + } #endif - tv = (struct timeval *)addr; /* * Subtract 1 tick from tvtohz() since this isn't @@ -1670,31 +1679,24 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, * Get read timeout. */ case BIOCGRTIMEOUT: -#if defined(COMPAT_FREEBSD32) && defined(__amd64__) - case BIOCGRTIMEOUT32: -#endif { - struct timeval *tv; -#if defined(COMPAT_FREEBSD32) && defined(__amd64__) + struct timeval *tv = (struct timeval *)addr; +#ifdef COMPAT_FREEBSD32 struct timeval32 *tv32; struct timeval tv64; - if (cmd == BIOCGRTIMEOUT32) + if (SV_CURPROC_FLAG(SV_ILP32)) tv = &tv64; - else #endif - tv = (struct timeval *)addr; - tv->tv_sec = d->bd_rtout / hz; tv->tv_usec = (d->bd_rtout % hz) * tick; -#if defined(COMPAT_FREEBSD32) && defined(__amd64__) - if (cmd == BIOCGRTIMEOUT32) { +#ifdef COMPAT_FREEBSD32 + if (SV_CURPROC_FLAG(SV_ILP32)) { tv32 = (struct timeval32 *)addr; tv32->tv_sec = tv->tv_sec; tv32->tv_usec = tv->tv_usec; } #endif - break; } From nobody Sun Apr 26 09:27:34 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3LvV5mLjz6bMH6 for ; Sun, 26 Apr 2026 09: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3LvV4xghz4Ls6 for ; Sun, 26 Apr 2026 09: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=1777195654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pVpVnbJZC/AUL6jYn88doigGFipk5uNaPjxqTCHFVQ8=; b=RTDqlhukkuKBHC5shz993CmE3kVVfPnIPopY5THids/wTmfOOXMtL3Cz4+AQqqPv39B32Y OEhQ7+fCDslQn+pg8uq4lPrJ0v7aXeFIo7BY8Y/vYqWkvS8U2Ai+I5Phxl7JjxmjRRbuHp IOjDQWXAIBc3Se/5n4EpfV53wpH7dtqAMTqAoxrQbg6F03KsU9VJf3HblPeDn7H3B8w6Yh cousRxEFDrMQhnnTwM+CHXs8S/qKhEuGqwLgVlOGIP6EI4I/sN2mXLMLyvnEIP+xskPC7+ mMmXY0D71doYy63rmay+0f49P9KulRmj1RiUqW6cMJzztSBn4lcYIuS+T10tPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777195654; a=rsa-sha256; cv=none; b=jTS5G5aSg3wLqCi03vIo6axYo4YfemzOhna4+Lqd8GQqVUfywOmdHlpOQEDL4qD9eVzx3/ ZomYHwgmHhmRpJ0Du58xIm3NBFZOpxcKOqxthNaN7wBVgWPekTuw9jzjVn6tUvFlG9kEaK Gl1vADNjHfBjJUZUxO6XjMC6oaiQ+i6bTjaILekmJb9qjt9qA9/4o3NnvkNa3xOCPPhdC+ /fLzzp7xvqLBUEN+vbZ7+T9jEYEsB7vJATvYwWQF5FDhFrhqb1EF1TXMNgf9GQPF9ME9HS 5otGXm7tr69BnwGwM2F/kBFLRhjeF38av6dQVRMjS4btcmBLGnZcbe0IZKhKtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777195654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pVpVnbJZC/AUL6jYn88doigGFipk5uNaPjxqTCHFVQ8=; b=wdfelbHwWLjPweDq9On5EY0Z0+XFCcNgGbZgVherrqEis26zA+eugKsNOYX7biFU16LdOT xEaHxZK+3huSKJZcuIkptIrXTe5a2MHjHpSiEW1SUax++BJf9Ed8S6XXElILiJQ+P8Pfv1 x8KNXyp+QABEVSYxMhQ2WFsSJD45SH3lLBqG8RBPbt4a0Gi3kdEesrCazm7eupb8Mpr8bo t4KOxsuxePDwHrrXtg7EeIkaG3w6lOv6SVTCPThIAxNFGzXJIiECNXItBRWB01VuACv+aC aRk817iL168Id9ae0H+fJ/hsi+GZy2DYUB5Vogdp0esh/1nfYwnxSsZkcqb+Aw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3LvV4BBJzHM for ; Sun, 26 Apr 2026 09:27:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39806 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 09:27:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: dd0e6909ca84 - stable/14 - tcp: use RFC 6191 for connection recycling in TIME-WAIT List-Id: Commits to the stable branches 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: dd0e6909ca842e98066b108ec7efb0d55951260b Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 09:27:34 +0000 Message-Id: <69edda86.39806.6882d20b@gitrepo.freebsd.org> The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=dd0e6909ca842e98066b108ec7efb0d55951260b commit dd0e6909ca842e98066b108ec7efb0d55951260b Author: Michael Tuexen AuthorDate: 2026-04-17 07:11:41 +0000 Commit: Michael Tuexen CommitDate: 2026-04-26 07:26:06 +0000 tcp: use RFC 6191 for connection recycling in TIME-WAIT Implement the criteria specified in RFC 6191 for recycling TCP connections in TIME-WAIT. Reviewed by: rscheff, Marius Halden Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D56321 Event: Wiesbaden Hackathon 2026 (cherry picked from commit 3a54aa3b0911bef15e014b8a8185e116efb0a918) --- sys/netinet/tcp_timewait.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index a833248cd468..f8c8dbe3578f 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -222,12 +222,17 @@ tcp_twcheck(struct inpcb *inp, struct tcpopt *to, struct tcphdr *th, /* * If a new connection request is received * while in TIME_WAIT, drop the old connection - * and start over if the sequence numbers - * are above the previous ones. + * and start over if allowed by RFC 6191. * Allow UDP port number changes in this case. */ if (((thflags & (TH_SYN | TH_ACK)) == TH_SYN) && - SEQ_GT(th->th_seq, tp->rcv_nxt)) { + ((((tp->t_flags & TF_RCVD_TSTMP) != 0) && + ((to->to_flags & TOF_TS) != 0) && + TSTMP_LT(tp->ts_recent, to->to_tsval)) || + (((tp->t_flags & TF_RCVD_TSTMP) == 0) && + ((to->to_flags & TOF_TS) != 0) && + (V_tcp_tolerate_missing_ts == 0)) || + SEQ_GT(th->th_seq, tp->rcv_nxt))) { /* * In case we can't upgrade our lock just pretend we have * lost this packet. From nobody Sun Apr 26 10:12:28 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3MvK02vLz6bR5V for ; Sun, 26 Apr 2026 10:12: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3MvJ5SCXz3GqG for ; Sun, 26 Apr 2026 10:12:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777198348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kyNZBakbGSG8a1Xfgc9bu7jJfGadt9pWTmF9nBZtcyA=; b=OZ2Z6wJ8Sxmipx+zMrjceeaEBbkoQQL5uPJ7emAfr/Wgo7r1FqsV9AN8yzX/AY/ZjfDv+R r6hLZvs6nYckB7G9//2HOJwrAfMWFNVhYm69jq/ciDwepSmzp9kDOi4VI4BdihftvMHf/B sNMmoLNGjQX2wWDXHxp32TfW3lb/U+Bl7Pa1KyHYOj/P9awkxxutoANO9Jat7xCNbMBT/k vQflSrKAgJKgOub+hH/4iPSHldk1Me5YgWRCyvqBcsh4wQ1fcK6UBmtyxOgXwg/LZnM0gx KZc++4iQwiuF14SWkD/6PFTjQfz79IGZDHlMOawYEaPfEG+cX/X8ISqBb8/s8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777198348; a=rsa-sha256; cv=none; b=nxnQzjc2qWgI17cOIL5JHJ+++2Gq06z6lR1lOBSmSyId8IXNOpWdd5VIGenMfQKxldy9U8 C+lr1O4VJIJViqQbC9bmfOu3iy05BWbFdkvtjim279tx2Hc6P8lOjxzHyo0VcpFQN6ESgg eEON9fVj8aNaujy2x34g7yBajLQMkRnty5KEr4H3MZH9NR+7Ru772eRLIjNN/wrXkAuEzp s64vfQ+mb4N5tmAenU/AQxzS4YcQqPB3zVbJX5Cnx8CbgA+Mu+Z0N7kPWw8uEq/REwdbsp jYY2wPPoHbE8MIGtveOTHi15Q4DgIMOjyioUtmyxkWBEX9ybVcPjrkgIwT4krg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777198348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kyNZBakbGSG8a1Xfgc9bu7jJfGadt9pWTmF9nBZtcyA=; b=EYeXLp075MrYMGJVzfn0XKA2JdA6UIvTu6U0Hx1sIE2KUutJf0RXZV49EMCxyRaWyXDC4w e0mIcOqoiU0y2+t0Nz152E8lZ6/xPOlDgaOKh5NFcEAsxabLOuQoaxvkoMJw83bKBYBe5a XmJqaTh3qtXvNCAeX7HggU1RGZo5NPmyuOtktJYMNJMPHqSFADlh0iTwPCUwBPDoXeLI9j NOG9KI73rihS0ZtJ7G5XUmZTHBOmiIEXdyUUnN2CXB9V+4fkunPbL5hovgqa7A29mU/iJL e6MGSklJcSTopIPK0UUK6CqksshK3TtLgrjEF/mhiwM2OqNKCRRO2b7pzMO7Hg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3MvJ4fBsz1NB for ; Sun, 26 Apr 2026 10:12:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3aa72 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 10:12:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: fdcc60f52841 - stable/15 - pf: fix duplicate rule detection for automatic tables List-Id: Commits to the stable branches 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: fdcc60f52841708efda2582b2492b0a460496fcc Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 10:12:28 +0000 Message-Id: <69ede50c.3aa72.6b8824da@gitrepo.freebsd.org> The branch stable/15 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=fdcc60f52841708efda2582b2492b0a460496fcc commit fdcc60f52841708efda2582b2492b0a460496fcc Author: Kristof Provost AuthorDate: 2026-04-09 16:11:41 +0000 Commit: Kristof Provost CommitDate: 2026-04-26 10:11:30 +0000 pf: fix duplicate rule detection for automatic tables We should look at the table name for automatic tables as well. These are different tables, so the rules using them are (or can be) different as well. MFC after: 3 days Reported by: Michael Sinatra Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit fb838352751767e756bd45cd2040fa464ed4de20) --- sys/netpfil/pf/pf_ioctl.c | 4 +--- tests/sys/netpfil/pf/pass_block.sh | 42 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index e4f52931e713..46197a97dae4 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -1345,9 +1345,7 @@ pf_hash_rule_addr(MD5_CTX *ctx, struct pf_rule_addr *pfr) PF_MD5_UPD(pfr, addr.iflags); break; case PF_ADDR_TABLE: - if (strncmp(pfr->addr.v.tblname, PF_OPTIMIZER_TABLE_PFX, - strlen(PF_OPTIMIZER_TABLE_PFX))) - PF_MD5_UPD(pfr, addr.v.tblname); + PF_MD5_UPD(pfr, addr.v.tblname); break; case PF_ADDR_ADDRMASK: case PF_ADDR_RANGE: diff --git a/tests/sys/netpfil/pf/pass_block.sh b/tests/sys/netpfil/pf/pass_block.sh index f6d973de7cf4..a5cd04f1db22 100644 --- a/tests/sys/netpfil/pf/pass_block.sh +++ b/tests/sys/netpfil/pf/pass_block.sh @@ -488,6 +488,47 @@ addr_range_cleanup() pft_cleanup } +atf_test_case "auto_tables" "cleanup" +auto_tables_head() +{ + atf_set descr 'Test rulesets with different automatic tables' + atf_set require.user root +} + +auto_tables_body() +{ + pft_init + + epair=$(vnet_mkepair) + ifconfig ${epair}b 192.0.2.2/24 up + + vnet_mkjail alcatraz ${epair}a + jexec alcatraz ifconfig ${epair}a 192.0.2.1/24 up + + # Sanity check + atf_check -s exit:0 -o ignore ping -c 1 -t 1 192.0.2.1 + + jexec alcatraz pfctl -e + pft_set_rules alcatraz \ + "set ruleset-optimization basic" \ + "test_a = \"203.0.113.1 203.0.113.2 203.0.113.3 203.0.113.4 + 203.0.113.5 203.0.113.6 203.0.113.7 203.0.113.8 203.0.113.9 + 203.0.113.10\"" \ + "test_b = \"192.0.2.1 192.0.2.2 192.0.2.3 192.0.2.4 192.0.2.5 + 192.0.2.6 192.0.2.7 192.0.2.8 192.0.2.9 192.0.2.10\"" \ + "block" \ + "pass inet from any to { \$test_a }" \ + "pass inet from 198.51.100.1 to 198.51.100.2 no state" \ + "pass inet from any to { \$test_b }" + + atf_check -s exit:0 -o ignore ping -c 1 -t 1 192.0.2.1 +} + +auto_tables_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "enable_disable" @@ -500,4 +541,5 @@ atf_init_test_cases() atf_add_test_case "optimize_any" atf_add_test_case "any_if" atf_add_test_case "addr_range" + atf_add_test_case "auto_tables" } From nobody Sun Apr 26 10:12:27 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3MvJ1LkWz6bR01 for ; Sun, 26 Apr 2026 10:12:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3MvH6552z3GsN for ; Sun, 26 Apr 2026 10:12:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777198347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LnNM9JcfJqB+U5ODBtP22MtCit7YohTgrQqIqy7dZnc=; b=mZMesqyxb+ds22zz+FsBwY4WDRKXFWx5ehVwycEUtf5690FdNEfG1zx6QqnYC+dahEMxRr TsINe9NxS8lThY4MFORS92cQJt4hdU0S1QY7leWArfVZHpfPMHzgC0YcZUoy7RjAa0aA1w YHV2gIFZHSW+gucaJAhXXxNtJIpgdLE+d2lYXI4VC87WNm675anCgbe4jUM8hWm4rYEYFt Z1omq7kertaOplpr/821ii+b4LF90FafzKTZsOyx2xpzXu3H2T8lCluaE1QwfZUYAOzKn/ b6Z/VeVSSA2VI2gpk+Pq1Xu9YFE2gsVs4/a+d9CJbB/ZfPXVSWBErmn32hiDTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777198347; a=rsa-sha256; cv=none; b=J0TB1dtVE6rJsqi6jopglfuqspOOzsH278rgFo3uaI8J898ppR3fNeVQCLIA+e/5+H533d 0JqRRxqDPEk7mlwq/2JP+0hO7mgmYYyNMiaashlRtsxqInp5BlzdW55Aa+0b6hkzFJiegV lLtpRnNtB9fn6Ts9yq0mn2bOwOrlHXKZKyQnahsWZldKg6kAGH4s3IxI+UW9dSit8q56eX wJg+SEwXnM7JUXR3HO/cDt2tGMYe9Z7ff5JvciUnuo5SuVISsq2dmA8jKHr8+L4+KcYKD+ NNi+JRuhLOKUGOk0AOhuP1RmGuPpnG/GkQAKmUfBJ84QIGenOItVkp6zgjMbDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777198347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LnNM9JcfJqB+U5ODBtP22MtCit7YohTgrQqIqy7dZnc=; b=xYa0kvif9f7B3T3OLspDMnwGGJcYih2XooiFEqJ+ypAwTSSjlvGFlG/ZPK677Fl1Xak9Dw 9zq9SVVijeIbbdlc3foif9gxDExHUHyzY4zBLFWPuz8zxFCCiYAzEBE2t6xrH9Lz5iGb/U Z5gT6rN3U7KJnq0TNcv6yfBWVMtIk5xpRYvTuQ0zyooQGgmsCSc681W5687PaDMxJXZeTe WGpWgwzH4OWDKJV7NQhvCbNF8hdOqBDMaiHoTygmVgipCgEJSCNdr6hnNCpS6Syax8iC98 MApfwGH0VdHL4k8XDMJxSrrRdFy0CIeps45JDTHr268Uz17sR7QnXMbwvn0jEA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3MvH5dlVz1FS for ; Sun, 26 Apr 2026 10:12:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c931 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 10:12:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 4fc1503f8617 - stable/14 - pf: fix duplicate rule detection for automatic tables List-Id: Commits to the stable branches 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/14 X-Git-Reftype: branch X-Git-Commit: 4fc1503f86177259c140c42eacb073bd17f9f72e Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 10:12:27 +0000 Message-Id: <69ede50b.3c931.3ee282aa@gitrepo.freebsd.org> The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=4fc1503f86177259c140c42eacb073bd17f9f72e commit 4fc1503f86177259c140c42eacb073bd17f9f72e Author: Kristof Provost AuthorDate: 2026-04-09 16:11:41 +0000 Commit: Kristof Provost CommitDate: 2026-04-26 10:12:03 +0000 pf: fix duplicate rule detection for automatic tables We should look at the table name for automatic tables as well. These are different tables, so the rules using them are (or can be) different as well. MFC after: 3 days Reported by: Michael Sinatra Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit fb838352751767e756bd45cd2040fa464ed4de20) --- tests/sys/netpfil/pf/pass_block.sh | 42 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/tests/sys/netpfil/pf/pass_block.sh b/tests/sys/netpfil/pf/pass_block.sh index b91ba7f9ee68..0ebbfcfaf699 100644 --- a/tests/sys/netpfil/pf/pass_block.sh +++ b/tests/sys/netpfil/pf/pass_block.sh @@ -292,6 +292,47 @@ addr_range_cleanup() pft_cleanup } +atf_test_case "auto_tables" "cleanup" +auto_tables_head() +{ + atf_set descr 'Test rulesets with different automatic tables' + atf_set require.user root +} + +auto_tables_body() +{ + pft_init + + epair=$(vnet_mkepair) + ifconfig ${epair}b 192.0.2.2/24 up + + vnet_mkjail alcatraz ${epair}a + jexec alcatraz ifconfig ${epair}a 192.0.2.1/24 up + + # Sanity check + atf_check -s exit:0 -o ignore ping -c 1 -t 1 192.0.2.1 + + jexec alcatraz pfctl -e + pft_set_rules alcatraz \ + "set ruleset-optimization basic" \ + "test_a = \"203.0.113.1 203.0.113.2 203.0.113.3 203.0.113.4 + 203.0.113.5 203.0.113.6 203.0.113.7 203.0.113.8 203.0.113.9 + 203.0.113.10\"" \ + "test_b = \"192.0.2.1 192.0.2.2 192.0.2.3 192.0.2.4 192.0.2.5 + 192.0.2.6 192.0.2.7 192.0.2.8 192.0.2.9 192.0.2.10\"" \ + "block" \ + "pass inet from any to { \$test_a }" \ + "pass inet from 198.51.100.1 to 198.51.100.2 no state" \ + "pass inet from any to { \$test_b }" + + atf_check -s exit:0 -o ignore ping -c 1 -t 1 192.0.2.1 +} + +auto_tables_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "v4" @@ -300,4 +341,5 @@ atf_init_test_cases() atf_add_test_case "nested_inline" atf_add_test_case "urpf" atf_add_test_case "addr_range" + atf_add_test_case "auto_tables" } From nobody Sun Apr 26 16:43:17 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3XZF1QKhz6c14x for ; Sun, 26 Apr 2026 16:43:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3XZF0qyKz49LD for ; Sun, 26 Apr 2026 16:43:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777221797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P/V26ye7/0hE/As1Stb7bdFyGpHQmCIKOByi35g/APk=; b=wtXhUPZWKbepYP7rJrHR3qL6EWVoErgmXZS+OWrtysDv7ZFmCT5oGU2fJej7fznxqJeRUI Ikjh7duBo26tbBKbmYBfYTpWnltDeQouqKCL39McEYdgnLrt1Z55RaZ/VG9qYWpp+nrHxF 1epXAkgR/CVbILJgZ4xp0KhCHwBVeN8IyKWIMaFgHph9xi8pn24GFkQLrfwasbgvLOwY82 ig5SE4jZrX6k3zdE3KpYpMqDOokDqKoDL7gK1PNLKNqKlGeyvFYCRqFzkhMCPswWk4WPkp YCcc4M9ZEz6lfV8hGqz/nHqpYzaXaOuYeDDdq9zd1Cgna/UyXhOxvoWHhReeDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777221797; a=rsa-sha256; cv=none; b=B9t84pz7N8WrgehT8JWeNAvV+HFMM5rF07krtBtrxO6URdPOiEzzhHLJdWMWR+1HmAUNXv QBqNXlEcOfPsj9R24XSWbuXt+SRrDQoYt3m+iSFBHLIJrAW6tRq0We40JRsG2obR+jNbc6 w+gmdXCE6Zus0k79LJdHnc6557Jj8pBm6gtybh1O1A/3DgXXiSegERNu+6+iFyMID9+ZWv uRcuGXGiZNtrk5pISTwi4cTZb728aZrS13w4UPKh1Y/v5fpV3EWYIR9nf9OdUCGEF71CiJ blKIuZjKpx6ty/STFFkhd12tTDgNRqS6hEEHvtPX80XfF/siVV/3ypbj8L6LIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777221797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P/V26ye7/0hE/As1Stb7bdFyGpHQmCIKOByi35g/APk=; b=myB3GwuzmYZ5ad0EjttpJrPBbu8JroUrKwn+OU0fX74Wu2qkSM5DWrgef8m6HHZKdpRU3p D1XqFU3V311BsP/PiZtWg92ZtGFb/dGRFL1PGekWal563jSiKKWX9eAJOmeXvgzUQ2929x PI9drdmM6G/2oRDcd4kCHArrNFFDDpOy7VaVoPRNgCxK84uzURmF4gE9VWi8Tdtr2DTyyU KrVQdu/XGjxO8ISUw6OOPpx0cQ0i6iAG5nQZA/Se2Y8xIUvgY5w6zkvSXiwgj8PvBNM/Sq lwcTTDvhbZ93ZustddVl8ivsP9AJu+5+mHyY6k3CYsQhzGgFiWqfZYIMh1iufQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3XZF07fCzCkM for ; Sun, 26 Apr 2026 16:43:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 466b7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 16:43:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 6e3085491ea3 - stable/15 - service(8): Replace indentation in usage() List-Id: Commits to the stable branches 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: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6e3085491ea3a6d2e73e61d00ecda2bda67ab83e Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 16:43:17 +0000 Message-Id: <69ee40a5.466b7.1d6d0538@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=6e3085491ea3a6d2e73e61d00ecda2bda67ab83e commit 6e3085491ea3a6d2e73e61d00ecda2bda67ab83e Author: Christos Margiolis AuthorDate: 2026-04-19 10:40:31 +0000 Commit: Christos Margiolis CommitDate: 2026-04-26 16:43:11 +0000 service(8): Replace indentation in usage() The -d option was indented with spaces instead of tabs, and this broke formatting. Before: -d Enable debugging of rc.d scripts -j Perform actions within the named jail After: -d Enable debugging of rc.d scripts -j Perform actions within the named jail MFC after: 1 week (cherry picked from commit 554f5aa526266057672740e22af0a75cc32bddd5) --- usr.sbin/service/service.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/service/service.sh b/usr.sbin/service/service.sh index 9387a49051d6..5ae1b2bee933 100755 --- a/usr.sbin/service/service.sh +++ b/usr.sbin/service/service.sh @@ -39,7 +39,7 @@ usage () { echo "${0##*/} [-j ] [-dqv] [-E var=value] start|stop|etc." echo "${0##*/} -h" echo '' - echo "-d Enable debugging of rc.d scripts" + echo "-d Enable debugging of rc.d scripts" echo "-j Perform actions within the named jail" echo "-E n=val Set variable n to val before executing the rc.d script" echo '-e Show services that are enabled'